@dxos/plugin-deck 0.8.4-main.fffef41 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +541 -0
- package/README.md +1 -1
- package/dist/lib/neutral/DeckLayout-DEURA3KR.mjs +291 -0
- package/dist/lib/neutral/DeckLayout-DEURA3KR.mjs.map +7 -0
- package/dist/lib/neutral/DeckPlugin.mjs +87 -0
- package/dist/lib/neutral/DeckPlugin.mjs.map +7 -0
- package/dist/lib/neutral/DeckPlugin.node.mjs +18 -0
- package/dist/lib/neutral/DeckPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/DeckPlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/DeckPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs +27 -0
- package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs.map +7 -0
- package/dist/lib/neutral/add-toast-TNB6DXWU.mjs +24 -0
- package/dist/lib/neutral/add-toast-TNB6DXWU.mjs.map +7 -0
- package/dist/lib/neutral/adjust-HNU5CCRO.mjs +93 -0
- package/dist/lib/neutral/adjust-HNU5CCRO.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-HMLT627T.mjs +129 -0
- package/dist/lib/neutral/app-graph-builder-HMLT627T.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +25 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/check-app-scheme-INSOF72J.mjs +10 -0
- package/dist/lib/neutral/chunk-324PPIZB.mjs +101 -0
- package/dist/lib/neutral/chunk-324PPIZB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BS4EOYMK.mjs +282 -0
- package/dist/lib/neutral/chunk-BS4EOYMK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GBIGQKYW.mjs +112 -0
- package/dist/lib/neutral/chunk-GBIGQKYW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GLB73Q6U.mjs +22 -0
- package/dist/lib/neutral/chunk-GLB73Q6U.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-PYEY5SEC.mjs +37 -0
- package/dist/lib/neutral/chunk-PYEY5SEC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-Q4W6B4IB.mjs +8 -0
- package/dist/lib/neutral/chunk-Q4W6B4IB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WAXJPQJI.mjs +1306 -0
- package/dist/lib/neutral/chunk-WAXJPQJI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZYYOSX5I.mjs +69 -0
- package/dist/lib/neutral/chunk-ZYYOSX5I.mjs.map +7 -0
- package/dist/lib/neutral/close-ASKR22A6.mjs +44 -0
- package/dist/lib/neutral/close-ASKR22A6.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +126 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +32 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +159 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +38 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/notification-tracker-P36322BH.mjs +182 -0
- package/dist/lib/neutral/notification-tracker-P36322BH.mjs.map +7 -0
- package/dist/lib/neutral/open-5OYNO3RT.mjs +159 -0
- package/dist/lib/neutral/open-5OYNO3RT.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-266CVMTW.mjs +13 -0
- package/dist/lib/neutral/operation-handler-266CVMTW.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-root-HH5DEUOG.mjs +44 -0
- package/dist/lib/neutral/react-root-HH5DEUOG.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-3UVVCK3O.mjs +34 -0
- package/dist/lib/neutral/react-surface-3UVVCK3O.mjs.map +7 -0
- package/dist/lib/neutral/revert-workspace-B2QLT2C4.mjs +21 -0
- package/dist/lib/neutral/revert-workspace-B2QLT2C4.mjs.map +7 -0
- package/dist/lib/neutral/scroll-into-view-B52C3PJO.mjs +21 -0
- package/dist/lib/neutral/scroll-into-view-B52C3PJO.mjs.map +7 -0
- package/dist/lib/neutral/set-PA35ONXO.mjs +37 -0
- package/dist/lib/neutral/set-PA35ONXO.mjs.map +7 -0
- package/dist/lib/neutral/set-layout-mode-RPCCPQRB.mjs +85 -0
- package/dist/lib/neutral/set-layout-mode-RPCCPQRB.mjs.map +7 -0
- package/dist/lib/neutral/settings-EGNYUM4T.mjs +33 -0
- package/dist/lib/neutral/settings-EGNYUM4T.mjs.map +7 -0
- package/dist/lib/neutral/state-IIDXMQUO.mjs +86 -0
- package/dist/lib/neutral/state-IIDXMQUO.mjs.map +7 -0
- package/dist/lib/neutral/switch-workspace-LZF4KZXH.mjs +60 -0
- package/dist/lib/neutral/switch-workspace-LZF4KZXH.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +63 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +34 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/update-companion-YUCZZVGY.mjs +32 -0
- package/dist/lib/neutral/update-companion-YUCZZVGY.mjs.map +7 -0
- package/dist/lib/neutral/update-complementary-7FZNB55J.mjs +28 -0
- package/dist/lib/neutral/update-complementary-7FZNB55J.mjs.map +7 -0
- package/dist/lib/neutral/update-dialog-FNQTSSAP.mjs +29 -0
- package/dist/lib/neutral/update-dialog-FNQTSSAP.mjs.map +7 -0
- package/dist/lib/neutral/update-plank-size-3YW4NXEY.mjs +26 -0
- package/dist/lib/neutral/update-plank-size-3YW4NXEY.mjs.map +7 -0
- package/dist/lib/neutral/update-popover-G2VUD7E6.mjs +33 -0
- package/dist/lib/neutral/update-popover-G2VUD7E6.mjs.map +7 -0
- package/dist/lib/neutral/update-sidebar-KRHPUHUB.mjs +25 -0
- package/dist/lib/neutral/update-sidebar-KRHPUHUB.mjs.map +7 -0
- package/dist/lib/neutral/url-handler-A6HLW4RB.mjs +229 -0
- package/dist/lib/neutral/url-handler-A6HLW4RB.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts +3 -1
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/DeckPlugin.node.d.ts +4 -0
- package/dist/types/src/DeckPlugin.node.d.ts.map +1 -0
- package/dist/types/src/DeckPlugin.test.d.ts +2 -0
- package/dist/types/src/DeckPlugin.test.d.ts.map +1 -0
- package/dist/types/src/DeckPlugin.workerd.d.ts +4 -0
- package/dist/types/src/DeckPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +17 -2
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +197 -12
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/notification-tracker.d.ts +13 -0
- package/dist/types/src/capabilities/notification-tracker.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root.d.ts +4 -2
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +141 -54
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts +4 -3
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts +3 -2
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +4 -4
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts +67 -0
- package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DeckSettings/index.d.ts +1 -1
- package/dist/types/src/components/DeckSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/Matrix/Matrix.d.ts +41 -0
- package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -0
- package/dist/types/src/components/Matrix/Matrix.stories.d.ts +17 -0
- package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -0
- package/dist/types/src/components/Matrix/index.d.ts +3 -0
- package/dist/types/src/components/Matrix/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/{components/DeckLayout → containers/Deck}/Banner.d.ts +1 -1
- package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/Deck.d.ts +25 -0
- package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/Deck.stories.d.ts +67 -0
- package/dist/types/src/containers/Deck/Deck.stories.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/DeckContent.d.ts +7 -0
- package/dist/types/src/containers/Deck/DeckContent.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/DeckRoot.d.ts +39 -0
- package/dist/types/src/containers/Deck/DeckRoot.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/DeckViewport.d.ts +16 -0
- package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/index.d.ts +2 -0
- package/dist/types/src/containers/Deck/index.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/ActiveNode.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +69 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/Dialog.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/Fallback.d.ts +2 -0
- package/dist/types/src/containers/DeckLayout/Fallback.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/Popover.d.ts +5 -0
- package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/DeckLayout/Toast.d.ts +3 -3
- package/dist/types/src/containers/DeckLayout/Toast.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/constants.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/index.d.ts +4 -0
- package/dist/types/src/containers/DeckLayout/index.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/Plank.d.ts +17 -0
- package/dist/types/src/containers/Plank/Plank.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/Plank.stories.d.ts +67 -0
- package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/PlankComponent.d.ts +17 -0
- package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/PlankContent.d.ts +10 -0
- package/dist/types/src/containers/Plank/PlankContent.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Plank/PlankControls.d.ts +5 -6
- package/dist/types/src/containers/Plank/PlankControls.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/PlankError.d.ts +15 -0
- package/dist/types/src/containers/Plank/PlankError.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Plank/PlankHeading.d.ts +5 -4
- package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankRoot.d.ts +37 -0
- package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/index.d.ts +4 -0
- package/dist/types/src/containers/Plank/index.d.ts.map +1 -0
- package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -0
- package/dist/types/src/containers/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Sidebar/SidebarButton.d.ts +1 -1
- package/dist/types/src/containers/Sidebar/SidebarButton.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Sidebar/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +6 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBreakpoints.d.ts +1 -1
- package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts +4 -4
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckState.d.ts +17 -0
- package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
- package/dist/types/src/hooks/useMainSize.d.ts +2 -2
- package/dist/types/src/hooks/useMainSize.d.ts.map +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
- package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/layout.d.ts +20 -9
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/layout.test.d.ts +2 -0
- package/dist/types/src/layout.test.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-toast.d.ts +5 -0
- package/dist/types/src/operations/add-toast.d.ts.map +1 -0
- package/dist/types/src/operations/adjust.d.ts +5 -0
- package/dist/types/src/operations/adjust.d.ts.map +1 -0
- package/dist/types/src/operations/close.d.ts +5 -0
- package/dist/types/src/operations/close.d.ts.map +1 -0
- package/dist/types/src/operations/helpers.d.ts +3 -0
- package/dist/types/src/operations/helpers.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/revert-workspace.d.ts +5 -0
- package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
- package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
- package/dist/types/src/operations/set-layout-mode.d.ts +9 -0
- package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
- package/dist/types/src/operations/set.d.ts +5 -0
- package/dist/types/src/operations/set.d.ts.map +1 -0
- package/dist/types/src/operations/switch-workspace.d.ts +5 -0
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/update-companion.d.ts +5 -0
- package/dist/types/src/operations/update-companion.d.ts.map +1 -0
- package/dist/types/src/operations/update-complementary.d.ts +5 -0
- package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
- package/dist/types/src/operations/update-dialog.d.ts +5 -0
- package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
- package/dist/types/src/operations/update-plank-size.d.ts +5 -0
- package/dist/types/src/operations/update-plank-size.d.ts.map +1 -0
- package/dist/types/src/operations/update-popover.d.ts +5 -0
- package/dist/types/src/operations/update-popover.d.ts.map +1 -0
- package/dist/types/src/operations/update-sidebar.d.ts +5 -0
- package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +48 -55
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/DeckCapabilities.d.ts +188 -0
- package/dist/types/src/types/DeckCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/DeckEvents.d.ts +5 -0
- package/dist/types/src/types/DeckEvents.d.ts.map +1 -0
- package/dist/types/src/types/DeckOperation.d.ts +15 -0
- package/dist/types/src/types/DeckOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +10 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +69 -69
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +2 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
- package/dist/types/src/util/plank-url-params.d.ts +14 -0
- package/dist/types/src/util/plank-url-params.d.ts.map +1 -0
- package/dist/types/src/util/plank-url-params.test.d.ts +2 -0
- package/dist/types/src/util/plank-url-params.test.d.ts.map +1 -0
- package/dist/types/src/util/sanitize-persisted-state.d.ts +19 -0
- package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -0
- package/dist/types/src/util/sanitize-persisted-state.test.d.ts +2 -0
- package/dist/types/src/util/sanitize-persisted-state.test.d.ts.map +1 -0
- package/dist/types/src/util/set-active.d.ts +19 -4
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/src/util/set-active.test.d.ts +2 -0
- package/dist/types/src/util/set-active.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +126 -62
- package/src/DeckPlugin.node.ts +17 -0
- package/src/DeckPlugin.test.ts +27 -0
- package/src/DeckPlugin.ts +43 -56
- package/src/DeckPlugin.workerd.ts +16 -0
- package/src/capabilities/app-graph-builder.ts +111 -127
- package/src/capabilities/check-app-scheme.ts +123 -24
- package/src/capabilities/index.ts +14 -14
- package/src/capabilities/notification-tracker.ts +170 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-root.tsx +40 -28
- package/src/capabilities/react-surface.tsx +28 -22
- package/src/capabilities/settings.ts +29 -20
- package/src/capabilities/state.ts +74 -96
- package/src/capabilities/tools.ts +57 -50
- package/src/capabilities/url-handler.ts +290 -48
- package/src/components/DeckSettings/DeckSettings.stories.tsx +37 -0
- package/src/components/DeckSettings/DeckSettings.tsx +19 -88
- package/src/components/DeckSettings/index.ts +2 -2
- package/src/components/Matrix/Matrix.stories.tsx +220 -0
- package/src/components/Matrix/Matrix.tsx +205 -0
- package/src/components/Matrix/SPEC.md +219 -0
- package/src/components/Matrix/index.ts +6 -0
- package/src/components/index.ts +6 -3
- package/src/containers/Deck/Banner.tsx +41 -0
- package/src/containers/Deck/Deck.stories.tsx +81 -0
- package/src/containers/Deck/Deck.tsx +21 -0
- package/src/containers/Deck/DeckContent.tsx +102 -0
- package/src/containers/Deck/DeckRoot.tsx +50 -0
- package/src/containers/Deck/DeckViewport.tsx +450 -0
- package/src/{components/DeckLayout → containers/Deck}/StatusBar.tsx +4 -4
- package/src/containers/Deck/index.ts +5 -0
- package/src/{components → containers}/DeckLayout/ActiveNode.tsx +9 -4
- package/src/containers/DeckLayout/DeckLayout.stories.tsx +395 -0
- package/src/containers/DeckLayout/DeckLayout.tsx +62 -0
- package/src/containers/DeckLayout/Dialog.tsx +52 -0
- package/src/containers/DeckLayout/Fallback.tsx +24 -0
- package/src/containers/DeckLayout/Popover.tsx +166 -0
- package/src/containers/DeckLayout/Toast.tsx +76 -0
- package/src/{components → containers}/DeckLayout/constants.ts +1 -0
- package/src/{components → containers}/DeckLayout/index.ts +3 -2
- package/src/containers/Plank/Plank.stories.tsx +108 -0
- package/src/containers/Plank/Plank.tsx +22 -0
- package/src/containers/Plank/PlankComponent.tsx +223 -0
- package/src/containers/Plank/PlankContent.tsx +45 -0
- package/src/{components → containers}/Plank/PlankControls.tsx +43 -37
- package/src/containers/Plank/PlankError.tsx +82 -0
- package/src/{components → containers}/Plank/PlankHeading.tsx +67 -64
- package/src/{components → containers}/Plank/PlankLoading.tsx +1 -1
- package/src/containers/Plank/PlankRoot.tsx +49 -0
- package/src/{components → containers}/Plank/index.ts +0 -2
- package/src/containers/Sidebar/ComplementarySidebar.tsx +189 -0
- package/src/containers/Sidebar/Sidebar.tsx +39 -0
- package/src/containers/Sidebar/SidebarButton.tsx +100 -0
- package/src/containers/index.ts +11 -0
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useCompanions.ts +3 -3
- package/src/hooks/useDeckCompanions.ts +8 -11
- package/src/hooks/useDeckState.ts +73 -0
- package/src/hooks/useMainSize.ts +2 -2
- package/src/hooks/useNodeActionExpander.ts +4 -4
- package/src/hooks/useSelectedCompanion.ts +32 -0
- package/src/index.ts +1 -4
- package/src/layout.test.ts +59 -0
- package/src/layout.ts +38 -40
- package/src/meta.ts +24 -6
- package/src/operations/add-toast.ts +24 -0
- package/src/operations/adjust.ts +82 -0
- package/src/operations/close.ts +35 -0
- package/src/operations/helpers.ts +22 -0
- package/src/operations/index.ts +23 -0
- package/src/operations/open.ts +201 -0
- package/src/operations/revert-workspace.ts +22 -0
- package/src/operations/scroll-into-view.ts +24 -0
- package/src/operations/set-layout-mode.ts +84 -0
- package/src/operations/set.ts +36 -0
- package/src/operations/switch-workspace.ts +66 -0
- package/src/operations/update-companion.ts +35 -0
- package/src/operations/update-complementary.ts +33 -0
- package/src/operations/update-dialog.ts +34 -0
- package/src/operations/update-plank-size.ts +28 -0
- package/src/operations/update-popover.ts +36 -0
- package/src/operations/update-sidebar.ts +28 -0
- package/src/plugin.ts +11 -0
- package/src/translations.ts +48 -54
- package/src/types/DeckCapabilities.ts +34 -0
- package/src/types/DeckEvents.ts +21 -0
- package/src/types/DeckOperation.ts +56 -0
- package/src/types/Settings.ts +36 -0
- package/src/types/index.ts +5 -0
- package/src/types/schema.ts +49 -58
- package/src/util/index.ts +2 -1
- package/src/util/layoutAppliesTopbar.ts +2 -2
- package/src/util/plank-url-params.test.ts +85 -0
- package/src/util/plank-url-params.ts +36 -0
- package/src/util/sanitize-persisted-state.test.ts +79 -0
- package/src/util/sanitize-persisted-state.ts +52 -0
- package/src/util/set-active.test.ts +106 -0
- package/src/util/set-active.ts +50 -30
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs +0 -128
- package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs +0 -32
- package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +0 -7
- package/dist/lib/browser/chunk-5KMJPIQC.mjs +0 -16
- package/dist/lib/browser/chunk-5KMJPIQC.mjs.map +0 -7
- package/dist/lib/browser/chunk-CNTGBCMK.mjs +0 -145
- package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-F3VCCHVL.mjs +0 -162
- package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +0 -7
- package/dist/lib/browser/chunk-QKCGZ45E.mjs +0 -128
- package/dist/lib/browser/chunk-QKCGZ45E.mjs.map +0 -7
- package/dist/lib/browser/chunk-UXLU6CMW.mjs +0 -16
- package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +0 -7
- package/dist/lib/browser/chunk-VBYJ664A.mjs +0 -132
- package/dist/lib/browser/chunk-VBYJ664A.mjs.map +0 -7
- package/dist/lib/browser/chunk-VUJ6UNIJ.mjs +0 -1553
- package/dist/lib/browser/chunk-VUJ6UNIJ.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -174
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs +0 -524
- package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-root-JAMHKYWN.mjs +0 -44
- package/dist/lib/browser/react-root-JAMHKYWN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-6LW337ZT.mjs +0 -40
- package/dist/lib/browser/react-surface-6LW337ZT.mjs.map +0 -7
- package/dist/lib/browser/settings-SDPTOCCM.mjs +0 -30
- package/dist/lib/browser/settings-SDPTOCCM.mjs.map +0 -7
- package/dist/lib/browser/state-7IFAGZQO.mjs +0 -12
- package/dist/lib/browser/toolkit-L5CFXJCF.mjs +0 -52
- package/dist/lib/browser/toolkit-L5CFXJCF.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -32
- package/dist/lib/browser/url-handler-QEYGYE2H.mjs +0 -70
- package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -184
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit.d.ts +0 -25
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +0 -3
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +0 -74
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts +0 -3
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Fallback.d.ts +0 -3
- package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts +0 -5
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Topbar.d.ts +0 -3
- package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/constants.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/index.d.ts +0 -4
- package/dist/types/src/components/DeckLayout/index.d.ts.map +0 -1
- package/dist/types/src/components/Plank/Plank.d.ts +0 -27
- package/dist/types/src/components/Plank/Plank.d.ts.map +0 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +0 -89
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +0 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts.map +0 -1
- package/dist/types/src/components/Plank/PlankError.d.ts +0 -13
- package/dist/types/src/components/Plank/PlankError.d.ts.map +0 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +0 -1
- package/dist/types/src/components/Plank/index.d.ts +0 -6
- package/dist/types/src/components/Plank/index.d.ts.map +0 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +0 -1
- package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +0 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +0 -1
- package/dist/types/src/components/fragments.d.ts +0 -4
- package/dist/types/src/components/fragments.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts +0 -3
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +0 -1
- package/dist/types/src/util/overscroll.d.ts +0 -47
- package/dist/types/src/util/overscroll.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/intent-resolver.ts +0 -471
- package/src/capabilities/toolkit.ts +0 -66
- package/src/components/DeckLayout/Banner.tsx +0 -39
- package/src/components/DeckLayout/ContentEmpty.tsx +0 -31
- package/src/components/DeckLayout/DeckLayout.stories.tsx +0 -63
- package/src/components/DeckLayout/DeckLayout.tsx +0 -32
- package/src/components/DeckLayout/DeckMain.tsx +0 -281
- package/src/components/DeckLayout/Dialog.tsx +0 -36
- package/src/components/DeckLayout/Fallback.tsx +0 -28
- package/src/components/DeckLayout/Popover.tsx +0 -95
- package/src/components/DeckLayout/Toast.tsx +0 -86
- package/src/components/DeckLayout/Topbar.tsx +0 -11
- package/src/components/Plank/Plank.stories.tsx +0 -54
- package/src/components/Plank/Plank.tsx +0 -299
- package/src/components/Plank/PlankError.tsx +0 -49
- package/src/components/Sidebar/ComplementarySidebar.tsx +0 -214
- package/src/components/Sidebar/Sidebar.tsx +0 -42
- package/src/components/Sidebar/SidebarButton.tsx +0 -88
- package/src/components/fragments.ts +0 -14
- package/src/events.ts +0 -11
- package/src/hooks/useHoistStatusbar.ts +0 -27
- package/src/util/overscroll.ts +0 -69
- /package/dist/lib/{browser/state-7IFAGZQO.mjs.map → neutral/check-app-scheme-INSOF72J.mjs.map} +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/types/src/{components/DeckLayout → containers/Deck}/StatusBar.d.ts +0 -0
- /package/dist/types/src/{components → containers}/DeckLayout/ActiveNode.d.ts +0 -0
- /package/dist/types/src/{components → containers}/DeckLayout/DeckLayout.d.ts +0 -0
- /package/dist/types/src/{components → containers}/DeckLayout/Dialog.d.ts +0 -0
- /package/dist/types/src/{components → containers}/DeckLayout/constants.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Sidebar/ComplementarySidebar.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Sidebar/Sidebar.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Sidebar/index.d.ts +0 -0
- /package/src/{components → containers}/Sidebar/index.ts +0 -0
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/PLUGIN.mdl
ADDED
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: org.dxos.plugin.deck
|
|
3
|
+
name: DeckPlugin
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The Deck plugin is the core layout engine for DXOS Composer. It manages the multi-plank workspace
|
|
8
|
+
("deck"), the sidebar, the complementary sidebar, dialogs, popovers, and toast notifications.
|
|
9
|
+
It owns the persisted and ephemeral layout state, handles URL routing, and implements every
|
|
10
|
+
`LayoutOperation` that changes what is visible on screen.
|
|
11
|
+
|
|
12
|
+
## Extensions
|
|
13
|
+
|
|
14
|
+
The following extension dialects are used in this document.
|
|
15
|
+
Each extension is defined in the Appendix or resolved via its URI.
|
|
16
|
+
|
|
17
|
+
| Term | URI |
|
|
18
|
+
|-------------|--------------------------------|
|
|
19
|
+
| `type` | `org.dxos.mdl.type@1.0` |
|
|
20
|
+
| `feat` | `org.dxos.mdl.feat@1.0` |
|
|
21
|
+
| `test` | `org.dxos.mdl.test@1.0` |
|
|
22
|
+
| `component` | `org.dxos.mdl.component@1.0` |
|
|
23
|
+
| `op` | `org.dxos.mdl.op@1.0` |
|
|
24
|
+
|
|
25
|
+
## Types
|
|
26
|
+
|
|
27
|
+
```mdl
|
|
28
|
+
type LayoutMode
|
|
29
|
+
literals: multi | solo | solo--fullscreen
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```mdl
|
|
33
|
+
type PartAdjustment
|
|
34
|
+
literals: close | companion | solo | solo--fullscreen | increment-start | increment-end
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```mdl
|
|
38
|
+
type DeckState
|
|
39
|
+
fields:
|
|
40
|
+
initialized: boolean # false until the deck has left solo mode for the first time
|
|
41
|
+
active: string[] # item IDs of planks displayed in multi mode
|
|
42
|
+
inactive: string[] # item IDs that have been closed; persisted for reopening
|
|
43
|
+
solo?: string # item ID of the single plank in solo or fullscreen mode
|
|
44
|
+
fullscreen: boolean # true when the solo plank is displayed without any chrome
|
|
45
|
+
plankSizing: Record<string, number> # persisted plank widths in rem, keyed by item ID
|
|
46
|
+
companionOpen: boolean # whether the companion pane is visible
|
|
47
|
+
companionVariant?: string # which companion variant to display
|
|
48
|
+
companionFrameSizing: Record<string, number> # companion frame widths in rem
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```mdl
|
|
52
|
+
type StoredDeckState
|
|
53
|
+
desc: Persisted plugin state stored in KVS/localStorage.
|
|
54
|
+
fields:
|
|
55
|
+
sidebarState: closed | collapsed | expanded
|
|
56
|
+
complementarySidebarState: closed | collapsed | expanded
|
|
57
|
+
complementarySidebarPanel?: string
|
|
58
|
+
activeDeck: string
|
|
59
|
+
previousDeck: string
|
|
60
|
+
decks: Record<string, DeckState>
|
|
61
|
+
previousMode: Record<string, LayoutMode>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```mdl
|
|
65
|
+
type EphemeralDeckState
|
|
66
|
+
desc: Transient plugin state that is NOT persisted across sessions.
|
|
67
|
+
fields:
|
|
68
|
+
dialogOpen: boolean
|
|
69
|
+
dialogType?: default | alert
|
|
70
|
+
dialogBlockAlign?: start | center | end
|
|
71
|
+
dialogContent?: { component: string; props?: any }
|
|
72
|
+
popoverOpen: boolean
|
|
73
|
+
popoverSide?: top | right | bottom | left
|
|
74
|
+
popoverKind?: base | card
|
|
75
|
+
popoverTitle?: string
|
|
76
|
+
popoverContentRef?: string
|
|
77
|
+
popoverContent?: { component: string } | { subject: any }
|
|
78
|
+
toasts: Toast[]
|
|
79
|
+
currentUndoId?: string
|
|
80
|
+
scrollIntoView?: string
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```mdl
|
|
84
|
+
type DeckSettings
|
|
85
|
+
fields:
|
|
86
|
+
enableDeck?: boolean # display multiple panels side by side
|
|
87
|
+
encapsulatedPlanks?: boolean # render each plank in an isolated container
|
|
88
|
+
showHints?: boolean # show keyboard shortcut hints in the UI
|
|
89
|
+
enableNativeRedirect?: boolean # redirect supported URLs to the native desktop app
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Components
|
|
93
|
+
|
|
94
|
+
```mdl
|
|
95
|
+
component Matrix
|
|
96
|
+
desc: |
|
|
97
|
+
The primary workspace canvas. Renders the active planks side by side in multi mode,
|
|
98
|
+
or a single plank in solo/fullscreen mode. Manages plank-resize handles and the
|
|
99
|
+
companion pane alongside each plank.
|
|
100
|
+
props:
|
|
101
|
+
state: StoredDeckState # persisted layout state atom
|
|
102
|
+
ephemeral: EphemeralDeckState # transient state atom
|
|
103
|
+
state:
|
|
104
|
+
mode: LayoutMode # current layout mode derived from state
|
|
105
|
+
actions:
|
|
106
|
+
openPlank(id: string)
|
|
107
|
+
closePlank(id: string)
|
|
108
|
+
adjustPlank(id: string, type: PartAdjustment)
|
|
109
|
+
resizePlank(id: string, size: number)
|
|
110
|
+
layout: |
|
|
111
|
+
┌────────────┬────────────┬────────────┐
|
|
112
|
+
│ sidebar │ plank A │ plank B │
|
|
113
|
+
│ │ │ │
|
|
114
|
+
│ │ [content] │ [content] │
|
|
115
|
+
│ │ │ │
|
|
116
|
+
│ ├────────────┤ │
|
|
117
|
+
│ │ companion │ │
|
|
118
|
+
└────────────┴────────────┴────────────┘
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
```mdl
|
|
122
|
+
component DeckSettings
|
|
123
|
+
desc: Settings panel rendered in the Composer settings surface.
|
|
124
|
+
props:
|
|
125
|
+
settings: DeckSettings
|
|
126
|
+
actions:
|
|
127
|
+
updateSetting(key: string, value: any)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Operations
|
|
131
|
+
|
|
132
|
+
```mdl
|
|
133
|
+
op Open
|
|
134
|
+
desc: |
|
|
135
|
+
Opens one or more subjects (item IDs or navigation paths) in the deck.
|
|
136
|
+
In multi mode uses stack semantics: truncates after the pivot then appends.
|
|
137
|
+
In solo or uninitialised mode, replaces the current subject entirely.
|
|
138
|
+
Validates each target against the app graph and redirects to a 404 node if not found.
|
|
139
|
+
Fires ScrollIntoView, Expose, and an observability event for each newly opened item.
|
|
140
|
+
input:
|
|
141
|
+
subject: string[] # item IDs or navigation paths to open
|
|
142
|
+
pivotId?: string # truncate deck after this item before appending
|
|
143
|
+
key?: string # replace an existing plank whose ID shares this key prefix
|
|
144
|
+
workspace?: string # switch to this workspace before opening
|
|
145
|
+
navigation?: immediate # skip validation; expand path only
|
|
146
|
+
scrollIntoView?: boolean # default true; set false to suppress auto-scroll
|
|
147
|
+
state?: any
|
|
148
|
+
variant?: string
|
|
149
|
+
output: string[]
|
|
150
|
+
effects: [echo:read, layout:state]
|
|
151
|
+
requires: [AppGraph, AttentionCapabilities, ClientCapabilities, DeckCapabilities]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```mdl
|
|
155
|
+
op Close
|
|
156
|
+
desc: |
|
|
157
|
+
Removes one or more subjects from the active deck.
|
|
158
|
+
Computes which plank (if any) should receive attention after removal and
|
|
159
|
+
schedules ScrollIntoView for it.
|
|
160
|
+
input:
|
|
161
|
+
subject: string[]
|
|
162
|
+
output: void
|
|
163
|
+
effects: [layout:state]
|
|
164
|
+
requires: [DeckCapabilities, AttentionCapabilities]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
```mdl
|
|
168
|
+
op SetLayoutMode
|
|
169
|
+
desc: |
|
|
170
|
+
Transitions to a new layout mode (multi, solo, solo--fullscreen) or reverts
|
|
171
|
+
to the previously recorded mode. Persists the previous mode so it can be
|
|
172
|
+
restored later. Toggling solo--fullscreen flips the fullscreen flag rather
|
|
173
|
+
than unconditionally setting it.
|
|
174
|
+
input:
|
|
175
|
+
mode?: LayoutMode # target mode; omit if reverting
|
|
176
|
+
subject?: string # item to solo; used only for solo / solo--fullscreen
|
|
177
|
+
revert?: boolean # revert to the previously persisted mode
|
|
178
|
+
output: void
|
|
179
|
+
effects: [layout:state]
|
|
180
|
+
requires: [DeckCapabilities]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
```mdl
|
|
184
|
+
op UpdateSidebar
|
|
185
|
+
desc: Update the sidebar visibility state (closed / collapsed / expanded).
|
|
186
|
+
input:
|
|
187
|
+
state?: closed | collapsed | expanded
|
|
188
|
+
output: void
|
|
189
|
+
effects: [layout:state]
|
|
190
|
+
requires: [DeckCapabilities]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
```mdl
|
|
194
|
+
op UpdateComplementary
|
|
195
|
+
desc: Update the complementary-sidebar visibility state and optional panel selection.
|
|
196
|
+
input:
|
|
197
|
+
state?: closed | collapsed | expanded
|
|
198
|
+
panel?: string
|
|
199
|
+
output: void
|
|
200
|
+
effects: [layout:state]
|
|
201
|
+
requires: [DeckCapabilities]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```mdl
|
|
205
|
+
op UpdateDialog
|
|
206
|
+
desc: |
|
|
207
|
+
Show or hide the global dialog overlay. Accepts a surface component identifier
|
|
208
|
+
or a boolean state flag. Propagates to EphemeralDeckState.
|
|
209
|
+
input:
|
|
210
|
+
subject?: string # surface component identifier to display
|
|
211
|
+
props?: any # props forwarded to the dialog surface
|
|
212
|
+
state?: boolean # false to close the dialog
|
|
213
|
+
type?: default | alert
|
|
214
|
+
blockAlign?: start | center | end
|
|
215
|
+
overlayClasses?: string
|
|
216
|
+
output: void
|
|
217
|
+
effects: [layout:state]
|
|
218
|
+
requires: [DeckCapabilities]
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
```mdl
|
|
222
|
+
op UpdatePopover
|
|
223
|
+
desc: |
|
|
224
|
+
Show or hide the global popover. Accepts anchor, content reference, or
|
|
225
|
+
an explicit subject reference.
|
|
226
|
+
input:
|
|
227
|
+
subject?: any # subject reference to pass to the popover surface
|
|
228
|
+
contentRef?: string # surface component identifier for popover content
|
|
229
|
+
anchorId?: string # DOM element ID for positioning the popover anchor
|
|
230
|
+
side?: top | right | bottom | left
|
|
231
|
+
kind?: base | card
|
|
232
|
+
title?: string
|
|
233
|
+
output: void
|
|
234
|
+
effects: [layout:state]
|
|
235
|
+
requires: [DeckCapabilities]
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
```mdl
|
|
239
|
+
op UpdateCompanion
|
|
240
|
+
desc: Update the companion-pane open state and active variant.
|
|
241
|
+
input:
|
|
242
|
+
open?: boolean
|
|
243
|
+
variant?: string
|
|
244
|
+
output: void
|
|
245
|
+
effects: [layout:state]
|
|
246
|
+
requires: [DeckCapabilities]
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
```mdl
|
|
250
|
+
op AdjustPlank
|
|
251
|
+
desc: Apply a PartAdjustment to a specific plank (close, solo, move, companion).
|
|
252
|
+
input:
|
|
253
|
+
id: string
|
|
254
|
+
type: PartAdjustment
|
|
255
|
+
output: void
|
|
256
|
+
effects: [layout:state]
|
|
257
|
+
requires: [DeckCapabilities]
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
```mdl
|
|
261
|
+
op UpdatePlankSize
|
|
262
|
+
desc: Persist the width of a plank in rem.
|
|
263
|
+
input:
|
|
264
|
+
id: string
|
|
265
|
+
size: number
|
|
266
|
+
output: void
|
|
267
|
+
effects: [layout:state]
|
|
268
|
+
requires: [DeckCapabilities]
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
```mdl
|
|
272
|
+
op AddToast
|
|
273
|
+
desc: Push a toast notification into the ephemeral queue.
|
|
274
|
+
input:
|
|
275
|
+
title?: string
|
|
276
|
+
body?: string
|
|
277
|
+
duration?: number
|
|
278
|
+
output: void
|
|
279
|
+
effects: [layout:state]
|
|
280
|
+
requires: [DeckCapabilities]
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
```mdl
|
|
284
|
+
op ScrollIntoView
|
|
285
|
+
desc: Schedule a subject to be scrolled into view when its plank mounts.
|
|
286
|
+
input:
|
|
287
|
+
subject: string
|
|
288
|
+
output: void
|
|
289
|
+
effects: [layout:state]
|
|
290
|
+
requires: [DeckCapabilities]
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
```mdl
|
|
294
|
+
op SwitchWorkspace
|
|
295
|
+
desc: Switch the active workspace deck, persisting the previous workspace ID.
|
|
296
|
+
input:
|
|
297
|
+
subject: string # workspace ID to switch to
|
|
298
|
+
output: void
|
|
299
|
+
effects: [layout:state]
|
|
300
|
+
requires: [DeckCapabilities]
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
```mdl
|
|
304
|
+
op RevertWorkspace
|
|
305
|
+
desc: Revert to the previously active workspace.
|
|
306
|
+
input: void
|
|
307
|
+
output: void
|
|
308
|
+
effects: [layout:state]
|
|
309
|
+
requires: [DeckCapabilities]
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Features
|
|
313
|
+
|
|
314
|
+
```mdl
|
|
315
|
+
feat F-1: Multi-Plank Layout (Deck)
|
|
316
|
+
|
|
317
|
+
req F-1.1:
|
|
318
|
+
when: enableDeck setting is true
|
|
319
|
+
then: deck renders active planks side by side in a scrollable row
|
|
320
|
+
|
|
321
|
+
req F-1.2:
|
|
322
|
+
when: user opens a new subject with a pivot
|
|
323
|
+
then: deck is truncated after the pivot and the new subject is appended
|
|
324
|
+
|
|
325
|
+
req F-1.3:
|
|
326
|
+
when: subject is already present in the active deck
|
|
327
|
+
then: deck is unchanged and the existing plank scrolls into view
|
|
328
|
+
|
|
329
|
+
req F-1.4:
|
|
330
|
+
when: user resizes a plank
|
|
331
|
+
then: new width is persisted in plankSizing and restored on next load
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
```mdl
|
|
335
|
+
feat F-2: Solo / Fullscreen Mode
|
|
336
|
+
|
|
337
|
+
req F-2.1:
|
|
338
|
+
when: user triggers SetLayoutMode with mode=solo
|
|
339
|
+
then: only the targeted plank is visible; other planks move to inactive
|
|
340
|
+
|
|
341
|
+
req F-2.2:
|
|
342
|
+
when: user triggers SetLayoutMode with mode=solo--fullscreen
|
|
343
|
+
then: plank fills the viewport; sidebar and heading chrome are hidden
|
|
344
|
+
|
|
345
|
+
req F-2.3:
|
|
346
|
+
when: user triggers SetLayoutMode with revert=true
|
|
347
|
+
then: layout returns to the previously persisted mode
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
```mdl
|
|
351
|
+
feat F-3: Sidebar & Complementary Sidebar
|
|
352
|
+
|
|
353
|
+
req F-3.1:
|
|
354
|
+
when: UpdateSidebar is dispatched with a new state
|
|
355
|
+
then: sidebar transitions between closed / collapsed / expanded and state is persisted
|
|
356
|
+
|
|
357
|
+
req F-3.2:
|
|
358
|
+
when: UpdateComplementary is dispatched with a panel
|
|
359
|
+
then: complementary sidebar opens to the specified panel
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
```mdl
|
|
363
|
+
feat F-4: Dialog & Popover Overlay
|
|
364
|
+
|
|
365
|
+
req F-4.1:
|
|
366
|
+
when: UpdateDialog is dispatched with a subject component
|
|
367
|
+
then: the matching surface is rendered inside the global dialog overlay
|
|
368
|
+
|
|
369
|
+
req F-4.2:
|
|
370
|
+
when: UpdatePopover is dispatched with an anchorId
|
|
371
|
+
then: popover is positioned relative to that DOM element
|
|
372
|
+
|
|
373
|
+
req F-4.3:
|
|
374
|
+
when: dialog or popover state is set to false
|
|
375
|
+
then: overlay is closed and content is unmounted
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
```mdl
|
|
379
|
+
feat F-5: URL Navigation & Deep Linking
|
|
380
|
+
|
|
381
|
+
req F-5.1:
|
|
382
|
+
when: app loads with a URL referencing an item
|
|
383
|
+
then: DeckPlugin resolves the path and opens the item in the deck
|
|
384
|
+
|
|
385
|
+
req F-5.2:
|
|
386
|
+
when: active deck changes
|
|
387
|
+
then: browser URL is updated to reflect the current plank state
|
|
388
|
+
|
|
389
|
+
req F-5.3:
|
|
390
|
+
when: a navigation target is not found in the app graph
|
|
391
|
+
then: Open operation redirects to a 404 node
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
```mdl
|
|
395
|
+
feat F-6: Toast Notifications
|
|
396
|
+
|
|
397
|
+
req F-6.1:
|
|
398
|
+
when: AddToast is dispatched
|
|
399
|
+
then: a toast is appended to the queue and displayed for its configured duration
|
|
400
|
+
|
|
401
|
+
req F-6.2:
|
|
402
|
+
when: ShowUndo is dispatched
|
|
403
|
+
then: a toast with an undo action is shown; invoking it executes the linked undo operation
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
## Acceptance
|
|
407
|
+
|
|
408
|
+
```mdl
|
|
409
|
+
test T-1: Open subject in multi mode
|
|
410
|
+
given: deck is in multi mode with planks A and B active
|
|
411
|
+
when: Open({ subject: ['C'] }) is dispatched
|
|
412
|
+
then:
|
|
413
|
+
- plank C is appended to the right of plank B
|
|
414
|
+
- browser URL reflects the new deck state
|
|
415
|
+
- plank C is scrolled into view
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
```mdl
|
|
419
|
+
test T-2: Open with pivot truncation
|
|
420
|
+
given: deck has planks [A, B, C] active
|
|
421
|
+
when: Open({ subject: ['D'], pivotId: 'A' }) is dispatched
|
|
422
|
+
then:
|
|
423
|
+
- active deck becomes [A, D]
|
|
424
|
+
- planks B and C are moved to inactive
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
```mdl
|
|
428
|
+
test T-3: Open already-visible subject
|
|
429
|
+
given: deck has plank A active
|
|
430
|
+
when: Open({ subject: ['A'] }) is dispatched
|
|
431
|
+
then:
|
|
432
|
+
- active deck is unchanged
|
|
433
|
+
- plank A scrolls into view
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
```mdl
|
|
437
|
+
test T-4: Solo mode
|
|
438
|
+
given: deck is in multi mode
|
|
439
|
+
when: SetLayoutMode({ mode: 'solo', subject: 'A' }) is dispatched
|
|
440
|
+
then:
|
|
441
|
+
- only plank A is visible
|
|
442
|
+
- mode is stored as solo in StoredDeckState
|
|
443
|
+
- previousMode records 'multi' for the active deck
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
```mdl
|
|
447
|
+
test T-5: Revert from solo to multi
|
|
448
|
+
given: layout mode is solo, previousMode is multi
|
|
449
|
+
when: SetLayoutMode({ revert: true }) is dispatched
|
|
450
|
+
then:
|
|
451
|
+
- deck returns to multi mode
|
|
452
|
+
- previously inactive planks are restored
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
```mdl
|
|
456
|
+
test T-6: Close plank
|
|
457
|
+
given: deck has planks [A, B, C] active; B has attention
|
|
458
|
+
when: Close({ subject: ['B'] }) is dispatched
|
|
459
|
+
then:
|
|
460
|
+
- active deck becomes [A, C]
|
|
461
|
+
- attention moves to an adjacent plank
|
|
462
|
+
- ScrollIntoView is scheduled for the newly attended plank
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
```mdl
|
|
466
|
+
test T-7: Toast is shown and dismissed
|
|
467
|
+
given: no toasts are in the queue
|
|
468
|
+
when: AddToast({ title: 'Saved', duration: 3000 }) is dispatched
|
|
469
|
+
then:
|
|
470
|
+
- toast appears in the UI
|
|
471
|
+
- toast is removed after 3 seconds
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## Appendix: Extension Definitions
|
|
477
|
+
|
|
478
|
+
Extension block types used in this document are defined below using
|
|
479
|
+
the core `ext` primitive — the only construct the base language provides.
|
|
480
|
+
|
|
481
|
+
```mdl
|
|
482
|
+
ext type
|
|
483
|
+
uri: org.dxos.mdl.type@1.0
|
|
484
|
+
desc: A named data structure with typed fields and optional literals.
|
|
485
|
+
fields:
|
|
486
|
+
desc?: Prose
|
|
487
|
+
fields?: FieldMap # name[?]: TypeExpr (# inline comment)
|
|
488
|
+
literals?: UnionList # a | b | c
|
|
489
|
+
extends?: TypeRef[]
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
```mdl
|
|
493
|
+
ext feat
|
|
494
|
+
uri: org.dxos.mdl.feat@1.0
|
|
495
|
+
desc: A named feature grouping one or more requirements.
|
|
496
|
+
fields:
|
|
497
|
+
desc?: Prose
|
|
498
|
+
req: RequirementList
|
|
499
|
+
nesting: self # feat blocks may contain feat blocks
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
```mdl
|
|
503
|
+
ext test
|
|
504
|
+
uri: org.dxos.mdl.test@1.0
|
|
505
|
+
desc: An acceptance scenario expressed as given / when / then steps.
|
|
506
|
+
fields:
|
|
507
|
+
given?: Step | Step[]
|
|
508
|
+
when?: Step | Step[]
|
|
509
|
+
then: Step | Step[]
|
|
510
|
+
tags?: TagList
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
```mdl
|
|
514
|
+
ext component
|
|
515
|
+
uri: org.dxos.mdl.component@1.0
|
|
516
|
+
desc: A UI component with props, internal state, slots, actions, and events.
|
|
517
|
+
fields:
|
|
518
|
+
desc?: Prose
|
|
519
|
+
props?: FieldMap # external inputs (immutable inside component)
|
|
520
|
+
state?: FieldMap # internal reactive state
|
|
521
|
+
slots?: FieldMap # named ReactNode injection points
|
|
522
|
+
actions?: ActionMap # methods the component exposes or handles
|
|
523
|
+
emits?: EventMap # events the component raises to its parent
|
|
524
|
+
layout?: CodeBlock # ASCII sketch of visual structure (non-normative)
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
```mdl
|
|
528
|
+
ext op
|
|
529
|
+
uri: org.dxos.mdl.op@1.0
|
|
530
|
+
desc: |
|
|
531
|
+
A named operation with typed inputs, outputs, and declared errors.
|
|
532
|
+
Pure ops have no effects or requires. Effectful ops declare both.
|
|
533
|
+
fields:
|
|
534
|
+
desc?: Prose
|
|
535
|
+
input?: FieldMap # named input parameters
|
|
536
|
+
output?: TypeExpr # return type
|
|
537
|
+
errors?: ErrorMap # name: Prose (when this error occurs)
|
|
538
|
+
effects?: EffectList # echo:read | echo:write | http | fs | ...
|
|
539
|
+
requires?: ServiceList # injected service dependencies
|
|
540
|
+
note?: Prose # implementation guidance (non-normative)
|
|
541
|
+
```
|
package/README.md
CHANGED
|
@@ -12,4 +12,4 @@ DXOS Surface plugin for the main application layout.
|
|
|
12
12
|
|
|
13
13
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
14
14
|
|
|
15
|
-
License: [
|
|
15
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
|