diff --git a/Kanban/App/ClipboardManifest.swift b/Kanban/App/ClipboardManifest.swift index c06ac20..810fb0d 100644 --- a/Kanban/App/ClipboardManifest.swift +++ b/Kanban/App/ClipboardManifest.swift @@ -3,15 +3,13 @@ import Foundation import UniformTypeIdentifiers // MARK: - The clipboard type - -extension UTType { - - /// What a Lanework copy puts on the pasteboard under its own type — the JSON `ClipboardManifest` - /// (04-interactions.md ▸ Clipboard: "the pasteboard carries a JSON manifest + plain text"). - /// Declared as an exported type in `Info.plist` beside the two drag types, for the same reason - /// those are: a payload nobody has declared is a payload the system will not carry. - static let laneworkClipboard = UTType(exportedAs: "dev.rzen.indie.kanban.clipboard") -} +// +// `UTType.laneworkClipboard` — what a Lanework copy puts on the pasteboard under its own type, the +// JSON `ClipboardManifest` below (04-interactions.md ▸ Clipboard: "the pasteboard carries a JSON +// manifest + plain text"). Declared in `Info.plist` beside the two drag types, for the same reason +// those are: a payload nobody has declared is a payload the system will not carry. The constant +// itself lives in `EditionTypes.swift` — base exports the type, Pro imports it, and each edition's +// twin uses the initializer its own plist can honor. // MARK: - The manifest diff --git a/Kanban/App/EditionTypes.swift b/Kanban/App/EditionTypes.swift new file mode 100644 index 0000000..e5eaea8 --- /dev/null +++ b/Kanban/App/EditionTypes.swift @@ -0,0 +1,26 @@ +import Foundation +import UniformTypeIdentifiers + +// MARK: - The family pasteboard types, as base declares them + +/// **Base's half of the edition UTI posture** (12-editions.md ▸ Targets: base *exports* the family +/// types, Pro *imports* them, declarations verbatim identical). `UTType(exportedAs:)` is a claim of +/// ownership the system checks against the running app's `Info.plist` — in Pro, whose plist imports +/// these, that claim is a runtime fault. So the three constants live in an edition twin rather than +/// beside their payloads: Pro compiles `KanbanPro/Edition/EditionTypes.swift`, which declares the +/// same names with `UTType(importedAs:)` — the edition split's file-level doctrine, applied to an +/// initializer. +/// +/// What each type *is* stays documented at its payload — `DragPayload` for cards and lanes, +/// `ClipboardManifest` for the clipboard type. +extension UTType { + + /// A drag carrying board **cards** — see `DragPayload`. + static let laneworkCards = UTType(exportedAs: "dev.rzen.indie.kanban.cards") + + /// A drag carrying board **lanes** — see `DragPayload`. + static let laneworkLanes = UTType(exportedAs: "dev.rzen.indie.kanban.lanes") + + /// A Lanework copy's pasteboard manifest — see `ClipboardManifest`. + static let laneworkClipboard = UTType(exportedAs: "dev.rzen.indie.kanban.clipboard") +} diff --git a/Kanban/UI/Board/DragPayload.swift b/Kanban/UI/Board/DragPayload.swift index 1174aae..6c400b7 100644 --- a/Kanban/UI/Board/DragPayload.swift +++ b/Kanban/UI/Board/DragPayload.swift @@ -3,18 +3,14 @@ import Foundation import UniformTypeIdentifiers // MARK: - The drag types - -extension UTType { - - /// A drag carrying board **cards** — live card faces or trash rows (04-interactions.md ▸ Drag - /// and drop, ▸ The trash). Declared as an exported type in `Info.plist`, because a system drag - /// session is what crosses window boundaries, shows the copy badge, and gives the full-size - /// replica preview (DRAG-REORDER.md § Cross-board sessions). - static let laneworkCards = UTType(exportedAs: "dev.rzen.indie.kanban.cards") - - /// A drag carrying board **lanes** — the strip's own reorder and the cross-board lane transfer. - static let laneworkLanes = UTType(exportedAs: "dev.rzen.indie.kanban.lanes") -} +// +// `UTType.laneworkCards` — a drag carrying board **cards**, live faces or trash rows +// (04-interactions.md ▸ Drag and drop, ▸ The trash) — and `.laneworkLanes`, the strip's own reorder +// and the cross-board lane transfer. Declared in `Info.plist` beside the clipboard type, because a +// system drag session is what crosses window boundaries, shows the copy badge, and gives the +// full-size replica preview (DRAG-REORDER.md § Cross-board sessions). The constants themselves live +// in `EditionTypes.swift` — base exports the types, Pro imports them, and each edition's twin uses +// the initializer its own plist can honor. // MARK: - What a drag carries diff --git a/KanbanPro/Edition/EditionTypes.swift b/KanbanPro/Edition/EditionTypes.swift new file mode 100644 index 0000000..71ef309 --- /dev/null +++ b/KanbanPro/Edition/EditionTypes.swift @@ -0,0 +1,21 @@ +import Foundation +import UniformTypeIdentifiers + +// MARK: - The family pasteboard types, as Pro declares them + +/// **Pro's half of the edition UTI posture** — the twin of base's `Kanban/App/EditionTypes.swift`, +/// which owns the full story (12-editions.md ▸ Targets: base *exports* the family types, Pro +/// *imports* them). `UTType(importedAs:)` is the initializer that matches Pro's +/// `UTImportedTypeDeclarations`; the identifiers and their `public.data` conformance are verbatim +/// base's, so a payload written by one edition reads in the other by type identity alone. +extension UTType { + + /// A drag carrying board **cards** — see `DragPayload`. + static let laneworkCards = UTType(importedAs: "dev.rzen.indie.kanban.cards") + + /// A drag carrying board **lanes** — see `DragPayload`. + static let laneworkLanes = UTType(importedAs: "dev.rzen.indie.kanban.lanes") + + /// A Lanework copy's pasteboard manifest — see `ClipboardManifest`. + static let laneworkClipboard = UTType(importedAs: "dev.rzen.indie.kanban.clipboard") +} diff --git a/project.yml b/project.yml index 67bb4da..d4a32b2 100644 --- a/project.yml +++ b/project.yml @@ -109,6 +109,11 @@ targets: # Quiet signposts); Pro compiles its own `KanbanPro/Edition/EditionAbout.swift` twin # without it — the edition split's file-level doctrine, applied to a string. - App/EditionAbout.swift + # Base declares the family pasteboard types `UTType(exportedAs:)` to match its + # UTExportedTypeDeclarations; Pro's plist *imports* them (12-editions.md ▸ Targets), so it + # compiles its own `KanbanPro/Edition/EditionTypes.swift` twin using `importedAs` — the + # same doctrine, applied to an initializer. + - App/EditionTypes.swift # Pro's own source root — reserved now, filled by pro-m1. See KanbanPro/Edition/ProEdition.swift. - path: KanbanPro excludes: