1.2.1 release to support some ShoeGaze features
This commit is contained in:
@@ -184,6 +184,23 @@ In the UI, "Save Version" snapshots the live board, the Versions menu loads one
|
||||
|
||||
---
|
||||
|
||||
## Sharing — the `.shoegaze` document type
|
||||
|
||||
Exporting and sharing use a single registered document type: **`.shoegaze`** (UTType `net.realizedsound.shoegaze`, conforming to `public.json`, so the file stays text-readable). The two builder apps (macOS `ShoeGazeBuilder`, iPad `ShoeGazeBuilderiOS`) declare it (`CFBundleDocumentTypes` + `UTExportedTypeDeclarations`) and implement opening (`application(_:open:)` / `.onOpenURL` → import into the library), so the system associates `.shoegaze` files with them for Open and Share. The minimal player demos do not claim the type — they have no library or share UI.
|
||||
|
||||
- `ShoeGazeDocument` (in `LyrebirdShoeGaze`) is a versioned envelope around one of two payloads: `.rigs(RigArchive)` (one or many rigs — a single shared rig is a one-rig archive) or `.board(BoardVersion)` (a single board). `data()` encodes pretty-printed JSON; `ShoeGazeDocument.decoded(from:)` reads it back and also accepts the two legacy shapes (a bare `RigArchive`, a bare `ShoeGazeState`).
|
||||
- `RigLibraryStore.exportDocumentData()` writes the whole library as a `.shoegaze` document; `importArchive(from:)` accepts `.shoegaze`, bare `RigArchive`, and legacy single-rig JSON (internal per-rig library files stay plain `.json`).
|
||||
- The rig-library sidebar (`Share…` per rig) and the board editor's Versions menu (`Share…` per version) present the OS share sheet via SwiftUI `ShareLink`, backed by the `Transferable` wrappers `RigShareItem` / `BoardShareItem` (in `LyrebirdShoeGazeUI`). No backend — share targets are AirDrop, Mail, Messages, and Files.
|
||||
|
||||
```swift
|
||||
// Export the library to a .shoegaze file:
|
||||
let data = try library.exportDocumentData()
|
||||
// Import a received .shoegaze (or legacy) file:
|
||||
let added = try library.importArchive(from: receivedData)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Demo apps
|
||||
|
||||
The package ships two in-repo demo apps in the workspace — a macOS app and an iOS app.
|
||||
|
||||
Reference in New Issue
Block a user