@dxos/plugin-deck 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae
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/dist/lib/browser/Banner-DR6B7XTO.mjs +15 -0
- package/dist/lib/browser/Banner-DR6B7XTO.mjs.map +7 -0
- package/dist/lib/browser/DeckSettings-HB5TKG2F.mjs +96 -0
- package/dist/lib/browser/DeckSettings-HB5TKG2F.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-22XAL7YE.mjs +123 -0
- package/dist/lib/browser/app-graph-builder-22XAL7YE.mjs.map +7 -0
- package/dist/lib/browser/check-app-scheme-ZV3QWNNZ.mjs +33 -0
- package/dist/lib/browser/check-app-scheme-ZV3QWNNZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-BJDEG7YZ.mjs +74 -0
- package/dist/lib/browser/chunk-BJDEG7YZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-FBL4WVYZ.mjs +16 -0
- package/dist/lib/browser/chunk-FBL4WVYZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-OAPMV5ZR.mjs +280 -0
- package/dist/lib/browser/chunk-OAPMV5ZR.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q4GUCIRE.mjs +200 -0
- package/dist/lib/browser/chunk-Q4GUCIRE.mjs.map +7 -0
- package/dist/lib/browser/chunk-SKBPLX5T.mjs +81 -0
- package/dist/lib/browser/chunk-SKBPLX5T.mjs.map +7 -0
- package/dist/lib/browser/chunk-YGOOWRJE.mjs +1390 -0
- package/dist/lib/browser/chunk-YGOOWRJE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +85 -73
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-BLZGJWLO.mjs +580 -0
- package/dist/lib/browser/operation-resolver-BLZGJWLO.mjs.map +7 -0
- package/dist/lib/browser/react-root-4ESZAM6D.mjs +49 -0
- package/dist/lib/browser/react-root-4ESZAM6D.mjs.map +7 -0
- package/dist/lib/browser/react-surface-KYQGCALN.mjs +44 -0
- package/dist/lib/browser/react-surface-KYQGCALN.mjs.map +7 -0
- package/dist/lib/browser/settings-RY2TBSGP.mjs +40 -0
- package/dist/lib/browser/settings-RY2TBSGP.mjs.map +7 -0
- package/dist/lib/browser/state-CSTTMJ43.mjs +106 -0
- package/dist/lib/browser/state-CSTTMJ43.mjs.map +7 -0
- package/dist/lib/browser/toolkit-EONRPYA5.mjs +55 -0
- package/dist/lib/browser/toolkit-EONRPYA5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +14 -6
- package/dist/lib/browser/url-handler-EM3SYHHX.mjs +95 -0
- package/dist/lib/browser/url-handler-EM3SYHHX.mjs.map +7 -0
- package/dist/lib/node-esm/Banner-HR7DPUZU.mjs +16 -0
- package/dist/lib/node-esm/Banner-HR7DPUZU.mjs.map +7 -0
- package/dist/lib/node-esm/DeckSettings-MWTR7HU2.mjs +97 -0
- package/dist/lib/node-esm/DeckSettings-MWTR7HU2.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-GNNNCWGN.mjs +124 -0
- package/dist/lib/node-esm/app-graph-builder-GNNNCWGN.mjs.map +7 -0
- package/dist/lib/node-esm/check-app-scheme-ZNISVRFH.mjs +34 -0
- package/dist/lib/node-esm/check-app-scheme-ZNISVRFH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DGTRKKWZ.mjs +76 -0
- package/dist/lib/node-esm/chunk-DGTRKKWZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-EGFOT3DE.mjs +18 -0
- package/dist/lib/node-esm/chunk-EGFOT3DE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IR6ODCNC.mjs +83 -0
- package/dist/lib/node-esm/chunk-IR6ODCNC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-L2NPJPGL.mjs +281 -0
- package/dist/lib/node-esm/chunk-L2NPJPGL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-O4IOJICP.mjs +201 -0
- package/dist/lib/node-esm/chunk-O4IOJICP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Z43MBISY.mjs +1391 -0
- package/dist/lib/node-esm/chunk-Z43MBISY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +186 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/operation-resolver-5BYDNQND.mjs +581 -0
- package/dist/lib/node-esm/operation-resolver-5BYDNQND.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-YO7IIC75.mjs +50 -0
- package/dist/lib/node-esm/react-root-YO7IIC75.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-G7VRKT4U.mjs +45 -0
- package/dist/lib/node-esm/react-surface-G7VRKT4U.mjs.map +7 -0
- package/dist/lib/node-esm/settings-GYLWWOBK.mjs +41 -0
- package/dist/lib/node-esm/settings-GYLWWOBK.mjs.map +7 -0
- package/dist/lib/node-esm/state-RQXTBWUX.mjs +107 -0
- package/dist/lib/node-esm/state-RQXTBWUX.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-EU3Z2R4H.mjs +56 -0
- package/dist/lib/node-esm/toolkit-EU3Z2R4H.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +41 -0
- package/dist/lib/node-esm/url-handler-VUK2LBJV.mjs +96 -0
- package/dist/lib/node-esm/url-handler-VUK2LBJV.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts +2 -1
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts +5 -0
- package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts.map +1 -0
- package/dist/types/src/capabilities/check-app-scheme/index.d.ts +3 -0
- package/dist/types/src/capabilities/check-app-scheme/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -13
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +19 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +22 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +172 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +175 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +27 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools/index.d.ts +3 -0
- package/dist/types/src/capabilities/tools/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools/tools.d.ts +12 -0
- package/dist/types/src/capabilities/tools/tools.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler/index.d.ts +3 -0
- package/dist/types/src/capabilities/url-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -0
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -3
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +75 -0
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts +3 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +7 -2
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts +5 -5
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +27 -7
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts +6 -4
- package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts +2 -2
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/components/fragments.d.ts +4 -1
- package/dist/types/src/components/fragments.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/Banner/Banner.d.ts +2 -0
- package/dist/types/src/containers/Banner/Banner.d.ts.map +1 -0
- package/dist/types/src/containers/Banner/index.d.ts +3 -0
- package/dist/types/src/containers/Banner/index.d.ts.map +1 -0
- package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts +8 -0
- package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
- package/dist/types/src/containers/DeckSettings/index.d.ts +3 -0
- package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -3
- 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/useHoistStatusbar.d.ts +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/hooks/useMainSize.d.ts +2 -2
- 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 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +7 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +93 -31
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts +18 -3
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +56 -48
- package/src/DeckPlugin.ts +28 -48
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +119 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/check-app-scheme/check-app-scheme.ts +45 -0
- package/src/capabilities/check-app-scheme/index.ts +7 -0
- package/src/capabilities/index.ts +9 -14
- package/src/capabilities/operation-resolver/index.ts +10 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +560 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +47 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +38 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +39 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +105 -0
- package/src/capabilities/toolkit/index.ts +7 -0
- package/src/capabilities/toolkit/toolkit.ts +64 -0
- package/src/capabilities/tools/index.ts +7 -0
- package/src/capabilities/tools/tools.ts +91 -0
- package/src/capabilities/url-handler/index.ts +7 -0
- package/src/capabilities/url-handler/url-handler.ts +96 -0
- package/src/components/DeckLayout/ActiveNode.tsx +3 -2
- package/src/components/DeckLayout/Banner.tsx +9 -9
- package/src/components/DeckLayout/ContentEmpty.tsx +5 -6
- package/src/components/DeckLayout/DeckLayout.stories.tsx +53 -0
- package/src/components/DeckLayout/DeckLayout.tsx +17 -285
- package/src/components/DeckLayout/DeckMain.tsx +287 -0
- package/src/components/DeckLayout/Dialog.tsx +22 -13
- package/src/components/DeckLayout/Fallback.tsx +2 -6
- package/src/components/DeckLayout/Popover.tsx +70 -32
- package/src/components/DeckLayout/StatusBar.tsx +4 -4
- package/src/components/DeckLayout/Toast.tsx +28 -3
- package/src/components/Plank/Plank.stories.tsx +19 -9
- package/src/components/Plank/Plank.tsx +96 -59
- package/src/components/Plank/PlankControls.tsx +9 -11
- package/src/components/Plank/PlankError.tsx +31 -17
- package/src/components/Plank/PlankHeading.tsx +35 -42
- package/src/components/Plank/PlankLoading.tsx +1 -1
- package/src/components/Sidebar/ComplementarySidebar.tsx +71 -40
- package/src/components/Sidebar/Sidebar.tsx +7 -7
- package/src/components/Sidebar/SidebarButton.tsx +36 -29
- package/src/components/fragments.ts +10 -5
- package/src/components/index.ts +0 -1
- package/src/containers/Banner/Banner.tsx +5 -0
- package/src/containers/Banner/index.ts +7 -0
- package/src/containers/DeckSettings/DeckSettings.tsx +113 -0
- package/src/containers/DeckSettings/index.ts +7 -0
- package/src/containers/index.ts +8 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useCompanions.ts +2 -2
- package/src/hooks/useDeckCompanions.ts +6 -4
- package/src/hooks/useDeckState.ts +82 -0
- package/src/hooks/useHoistStatusbar.ts +4 -5
- package/src/hooks/useMainSize.ts +2 -2
- package/src/hooks/useNodeActionExpander.ts +4 -4
- package/src/hooks/useSelectedCompanion.ts +38 -0
- package/src/index.ts +1 -2
- package/src/meta.ts +7 -2
- package/src/translations.ts +3 -1
- package/src/types/capabilities.ts +33 -0
- package/src/types/events.ts +21 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +93 -18
- package/src/util/layoutAppliesTopbar.ts +1 -1
- package/src/util/overscroll.ts +3 -3
- package/src/util/set-active.ts +49 -29
- package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs +0 -153
- package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs +0 -32
- package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs.map +0 -7
- package/dist/lib/browser/chunk-3SV2V3AN.mjs +0 -1495
- package/dist/lib/browser/chunk-3SV2V3AN.mjs.map +0 -7
- package/dist/lib/browser/chunk-A4SRCSJX.mjs +0 -160
- package/dist/lib/browser/chunk-A4SRCSJX.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-HUWUYTOI.mjs +0 -16
- package/dist/lib/browser/chunk-HUWUYTOI.mjs.map +0 -7
- package/dist/lib/browser/chunk-JH4ZCG5I.mjs +0 -129
- package/dist/lib/browser/chunk-JH4ZCG5I.mjs.map +0 -7
- package/dist/lib/browser/chunk-MHP4GPX5.mjs +0 -11
- package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +0 -7
- package/dist/lib/browser/chunk-YRDCQS7E.mjs +0 -127
- package/dist/lib/browser/chunk-YRDCQS7E.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-2NFDKRFG.mjs +0 -524
- package/dist/lib/browser/intent-resolver-2NFDKRFG.mjs.map +0 -7
- package/dist/lib/browser/react-root-JTWYCDJT.mjs +0 -43
- package/dist/lib/browser/react-root-JTWYCDJT.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PZKJ73JS.mjs +0 -40
- package/dist/lib/browser/react-surface-PZKJ73JS.mjs.map +0 -7
- package/dist/lib/browser/settings-JK7UIZSB.mjs +0 -29
- package/dist/lib/browser/settings-JK7UIZSB.mjs.map +0 -7
- package/dist/lib/browser/state-IFKFOBBX.mjs +0 -12
- package/dist/lib/browser/toolkit-L7C3UAEU.mjs +0 -63
- package/dist/lib/browser/toolkit-L7C3UAEU.mjs.map +0 -7
- package/dist/lib/browser/url-handler-MRYBE3HF.mjs +0 -70
- package/dist/lib/browser/url-handler-MRYBE3HF.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
- package/dist/types/src/capabilities/check-app-scheme.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/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -101
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit.d.ts +0 -6
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/capabilities/tools.d.ts +0 -11
- package/dist/types/src/capabilities/tools.d.ts.map +0 -1
- package/dist/types/src/capabilities/url-handler.d.ts +0 -4
- package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +0 -6
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
- package/dist/types/src/components/DeckSettings/index.d.ts +0 -2
- package/dist/types/src/components/DeckSettings/index.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/src/capabilities/app-graph-builder.ts +0 -143
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/check-app-scheme.ts +0 -40
- package/src/capabilities/intent-resolver.ts +0 -472
- package/src/capabilities/react-root.tsx +0 -39
- package/src/capabilities/react-surface.tsx +0 -30
- package/src/capabilities/settings.ts +0 -26
- package/src/capabilities/state.ts +0 -105
- package/src/capabilities/toolkit.ts +0 -57
- package/src/capabilities/tools.ts +0 -84
- package/src/capabilities/url-handler.ts +0 -60
- package/src/components/DeckSettings/DeckSettings.tsx +0 -97
- package/src/components/DeckSettings/index.ts +0 -5
- package/src/events.ts +0 -11
- /package/dist/lib/{browser/state-IFKFOBBX.mjs.map → node-esm/types/index.mjs.map} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { createKvsStore } from '@dxos/effect';
|
|
10
|
+
|
|
11
|
+
import { meta } from '../../meta';
|
|
12
|
+
import { DeckCapabilities, DeckSettingsSchema } from '../../types';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(() =>
|
|
15
|
+
Effect.sync(() => {
|
|
16
|
+
const settingsAtom = createKvsStore({
|
|
17
|
+
key: meta.id,
|
|
18
|
+
schema: DeckSettingsSchema,
|
|
19
|
+
defaultValue: () => ({
|
|
20
|
+
showHints: false,
|
|
21
|
+
enableDeck: false,
|
|
22
|
+
enableStatusbar: false,
|
|
23
|
+
enableNativeRedirect: false,
|
|
24
|
+
newPlankPositioning: 'start' as const,
|
|
25
|
+
overscroll: 'none' as const,
|
|
26
|
+
encapsulatedPlanks: false,
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return [
|
|
31
|
+
Capability.contributes(DeckCapabilities.Settings, settingsAtom),
|
|
32
|
+
Capability.contributes(AppCapabilities.Settings, {
|
|
33
|
+
prefix: meta.id,
|
|
34
|
+
schema: DeckSettingsSchema,
|
|
35
|
+
atom: settingsAtom,
|
|
36
|
+
}),
|
|
37
|
+
];
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
10
|
+
import { createKvsStore } from '@dxos/effect';
|
|
11
|
+
import { invariant } from '@dxos/invariant';
|
|
12
|
+
|
|
13
|
+
import { meta } from '../../meta';
|
|
14
|
+
import {
|
|
15
|
+
DeckCapabilities,
|
|
16
|
+
type DeckEphemeralStateProps,
|
|
17
|
+
type DeckStateProps,
|
|
18
|
+
DeckStateSchema,
|
|
19
|
+
defaultDeck,
|
|
20
|
+
getMode,
|
|
21
|
+
} from '../../types';
|
|
22
|
+
|
|
23
|
+
/** Default persisted state. */
|
|
24
|
+
const defaultDeckState: DeckStateProps = {
|
|
25
|
+
sidebarState: 'expanded',
|
|
26
|
+
complementarySidebarState: 'collapsed',
|
|
27
|
+
complementarySidebarPanel: undefined,
|
|
28
|
+
activeDeck: 'default',
|
|
29
|
+
previousDeck: 'default',
|
|
30
|
+
decks: {
|
|
31
|
+
default: { ...defaultDeck },
|
|
32
|
+
},
|
|
33
|
+
previousMode: {},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** Default ephemeral state. */
|
|
37
|
+
const defaultDeckEphemeralState: DeckEphemeralStateProps = {
|
|
38
|
+
dialogContent: null,
|
|
39
|
+
dialogOpen: false,
|
|
40
|
+
dialogBlockAlign: undefined,
|
|
41
|
+
dialogType: undefined,
|
|
42
|
+
popoverContent: null,
|
|
43
|
+
popoverAnchor: undefined,
|
|
44
|
+
popoverAnchorId: undefined,
|
|
45
|
+
popoverOpen: false,
|
|
46
|
+
toasts: [],
|
|
47
|
+
currentUndoId: undefined,
|
|
48
|
+
scrollIntoView: undefined,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default Capability.makeModule(
|
|
52
|
+
Effect.fnUntraced(function* () {
|
|
53
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
54
|
+
|
|
55
|
+
// Persisted state using KVS store.
|
|
56
|
+
const stateAtom = createKvsStore({
|
|
57
|
+
key: `${meta.id}/state`,
|
|
58
|
+
schema: DeckStateSchema,
|
|
59
|
+
defaultValue: () => ({ ...defaultDeckState }),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Ephemeral state (not persisted, but kept alive to prevent GC resets).
|
|
63
|
+
const ephemeralAtom = Atom.make<DeckEphemeralStateProps>({ ...defaultDeckEphemeralState }).pipe(Atom.keepAlive);
|
|
64
|
+
|
|
65
|
+
// Don't allow fullscreen mode to be persisted to prevent getting stuck in it.
|
|
66
|
+
const currentState = registry.get(stateAtom);
|
|
67
|
+
const currentDeck = currentState.decks[currentState.activeDeck];
|
|
68
|
+
if (currentDeck?.fullscreen) {
|
|
69
|
+
registry.set(stateAtom, {
|
|
70
|
+
...currentState,
|
|
71
|
+
decks: {
|
|
72
|
+
...currentState.decks,
|
|
73
|
+
[currentState.activeDeck]: {
|
|
74
|
+
...currentDeck,
|
|
75
|
+
fullscreen: false,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Create derived layout atom (read-only) from both state atoms.
|
|
82
|
+
const layoutAtom = Atom.make((get) => {
|
|
83
|
+
const state = get(stateAtom);
|
|
84
|
+
const ephemeral = get(ephemeralAtom);
|
|
85
|
+
const deck = state.decks[state.activeDeck];
|
|
86
|
+
invariant(deck, `Deck not found: ${state.activeDeck}`);
|
|
87
|
+
return {
|
|
88
|
+
mode: getMode(deck),
|
|
89
|
+
dialogOpen: ephemeral.dialogOpen,
|
|
90
|
+
sidebarOpen: state.sidebarState === 'expanded',
|
|
91
|
+
complementarySidebarOpen: state.complementarySidebarState === 'expanded',
|
|
92
|
+
workspace: state.activeDeck,
|
|
93
|
+
active: deck.solo ? [deck.solo] : deck.active,
|
|
94
|
+
inactive: deck.inactive,
|
|
95
|
+
scrollIntoView: ephemeral.scrollIntoView,
|
|
96
|
+
} satisfies AppCapabilities.Layout;
|
|
97
|
+
}).pipe(Atom.keepAlive);
|
|
98
|
+
|
|
99
|
+
return [
|
|
100
|
+
Capability.contributes(DeckCapabilities.State, stateAtom),
|
|
101
|
+
Capability.contributes(DeckCapabilities.EphemeralState, ephemeralAtom),
|
|
102
|
+
Capability.contributes(AppCapabilities.Layout, layoutAtom),
|
|
103
|
+
];
|
|
104
|
+
}),
|
|
105
|
+
);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Tool from '@effect/ai/Tool';
|
|
6
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import * as Schema from 'effect/Schema';
|
|
9
|
+
|
|
10
|
+
import { GenericToolkit } from '@dxos/ai';
|
|
11
|
+
import { Capabilities, Capability, type CapabilityManager } from '@dxos/app-framework';
|
|
12
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
13
|
+
import { ArtifactId } from '@dxos/assistant';
|
|
14
|
+
import { type SpaceId } from '@dxos/keys';
|
|
15
|
+
import { trim } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
import { DeckCapabilities } from '../../types';
|
|
18
|
+
|
|
19
|
+
const Toolkit$ = Toolkit.make(
|
|
20
|
+
Tool.make('open-item', {
|
|
21
|
+
description: trim`
|
|
22
|
+
Opens an item in the application.
|
|
23
|
+
`,
|
|
24
|
+
parameters: {
|
|
25
|
+
id: ArtifactId,
|
|
26
|
+
},
|
|
27
|
+
success: Schema.Any,
|
|
28
|
+
failure: Schema.Never,
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export namespace DeckToolkit {
|
|
33
|
+
export const Toolkit = Toolkit$;
|
|
34
|
+
|
|
35
|
+
export const createLayer = (capabilityManager: CapabilityManager.CapabilityManager) =>
|
|
36
|
+
Toolkit$.toLayer({
|
|
37
|
+
'open-item': ({ id }) =>
|
|
38
|
+
Effect.gen(function* () {
|
|
39
|
+
const registry = capabilityManager.get(Capabilities.AtomRegistry);
|
|
40
|
+
const stateAtom = capabilityManager.get(DeckCapabilities.State);
|
|
41
|
+
const state = registry.get(stateAtom);
|
|
42
|
+
const dxn = ArtifactId.toDXN(id, state.activeDeck as SpaceId).asEchoDXN();
|
|
43
|
+
if (!dxn) {
|
|
44
|
+
// TODO(wittjosiah): Support other variants.
|
|
45
|
+
throw new Error(`Invalid object ID: ${id}`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// TODO(wittjosiah): Get capabilities via layers.
|
|
49
|
+
const { invoke } = capabilityManager.get(Capabilities.OperationInvoker);
|
|
50
|
+
yield* invoke(LayoutOperation.Open, { subject: [`${dxn.spaceId!}:${dxn.echoId}`] });
|
|
51
|
+
}).pipe(Effect.orDie),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default Capability.makeModule(
|
|
56
|
+
Effect.fnUntraced(function* () {
|
|
57
|
+
const capabilityManager = yield* Capability.Service;
|
|
58
|
+
|
|
59
|
+
return Capability.contributes(
|
|
60
|
+
AppCapabilities.Toolkit,
|
|
61
|
+
GenericToolkit.make(DeckToolkit.Toolkit, DeckToolkit.createLayer(capabilityManager)),
|
|
62
|
+
);
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// ISSUE(burdon): tools
|
|
6
|
+
// @ts-nocheck
|
|
7
|
+
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Schema from 'effect/Schema';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
Capabilities,
|
|
13
|
+
Capability,
|
|
14
|
+
LayoutAction,
|
|
15
|
+
type PromiseIntentDispatcher,
|
|
16
|
+
createIntent,
|
|
17
|
+
} from '@dxos/app-framework';
|
|
18
|
+
import { type OperationInvoker } from '@dxos/app-framework/plugin-operation/invoker';
|
|
19
|
+
import { invariant } from '@dxos/invariant';
|
|
20
|
+
import { trim } from '@dxos/util';
|
|
21
|
+
|
|
22
|
+
import { meta } from '../../meta';
|
|
23
|
+
import { DeckOperation } from '../../types';
|
|
24
|
+
|
|
25
|
+
// TODO(burdon): Factor out.
|
|
26
|
+
declare global {
|
|
27
|
+
interface ToolContextExtensions {
|
|
28
|
+
dispatch?: PromiseIntentDispatcher;
|
|
29
|
+
pivotId?: string;
|
|
30
|
+
part?: 'deck' | 'dialog';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default Capability.makeModule(() =>
|
|
35
|
+
Effect.succeed(
|
|
36
|
+
Capability.contributes(Capabilities.Tools, [
|
|
37
|
+
createTool(meta.id, {
|
|
38
|
+
name: 'show',
|
|
39
|
+
description: trim`
|
|
40
|
+
Show an item as a companion to an existing plank.
|
|
41
|
+
When supplying IDs, they must be fully qualified like this: space-key:object-id
|
|
42
|
+
`,
|
|
43
|
+
caption: 'Showing item...',
|
|
44
|
+
// TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.
|
|
45
|
+
schema: Schema.Struct({
|
|
46
|
+
id: Schema.String.annotations({
|
|
47
|
+
description: 'The ID of the item to show.',
|
|
48
|
+
}),
|
|
49
|
+
}),
|
|
50
|
+
execute: async ({ id }, { extensions }) => {
|
|
51
|
+
invariant(extensions);
|
|
52
|
+
const { pivotId, dispatch, invokePromise, part } = extensions as {
|
|
53
|
+
pivotId: string;
|
|
54
|
+
dispatch: PromiseIntentDispatcher;
|
|
55
|
+
invokePromise: OperationInvoker['invokePromise'];
|
|
56
|
+
part: string;
|
|
57
|
+
};
|
|
58
|
+
invariant(pivotId, 'No pivot ID');
|
|
59
|
+
invariant(invokePromise, 'No operation invoker');
|
|
60
|
+
|
|
61
|
+
if (part === 'deck') {
|
|
62
|
+
const { error } = await invokePromise(DeckOperation.ChangeCompanion, {
|
|
63
|
+
companion: id,
|
|
64
|
+
});
|
|
65
|
+
if (error) {
|
|
66
|
+
return ToolResult.Error(error.message);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return ToolResult.Success({});
|
|
70
|
+
} else {
|
|
71
|
+
const { data, error } = await dispatch(
|
|
72
|
+
createIntent(LayoutAction.Open, {
|
|
73
|
+
subject: [id],
|
|
74
|
+
part: 'main',
|
|
75
|
+
options: {
|
|
76
|
+
pivotId,
|
|
77
|
+
positioning: 'end',
|
|
78
|
+
},
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
81
|
+
if (error) {
|
|
82
|
+
return ToolResult.Error(error.message);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return ToolResult.Success(data);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
}),
|
|
89
|
+
]),
|
|
90
|
+
),
|
|
91
|
+
);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
|
|
11
|
+
import { DeckCapabilities, type DeckStateProps, defaultDeck } from '../../types';
|
|
12
|
+
|
|
13
|
+
// TODO(wittjosiah): Cleanup the url handling. May justify introducing routing capabilities.
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const { invokeSync } = yield* Capability.get(Capabilities.OperationInvoker);
|
|
17
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
18
|
+
const stateAtom = yield* Capability.get(DeckCapabilities.State);
|
|
19
|
+
|
|
20
|
+
// Helper to get state.
|
|
21
|
+
const getState = () => registry.get(stateAtom);
|
|
22
|
+
|
|
23
|
+
// Helper to get computed deck from state.
|
|
24
|
+
const getDeck = () => {
|
|
25
|
+
const state = getState();
|
|
26
|
+
const deck = state.decks[state.activeDeck];
|
|
27
|
+
invariant(deck, `Deck not found: ${state.activeDeck}`);
|
|
28
|
+
return deck;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Helper to update state.
|
|
32
|
+
const updateState = (fn: (current: DeckStateProps) => DeckStateProps) => {
|
|
33
|
+
registry.set(stateAtom, fn(getState()));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleNavigation = () => {
|
|
37
|
+
const pathname = window.location.pathname;
|
|
38
|
+
const state = getState();
|
|
39
|
+
if (pathname === '/reset') {
|
|
40
|
+
updateState((s) => ({
|
|
41
|
+
...s,
|
|
42
|
+
activeDeck: 'default',
|
|
43
|
+
decks: {
|
|
44
|
+
default: { ...defaultDeck },
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
window.location.pathname = '/';
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const [_, nextDeck, nextSolo] = pathname.split('/');
|
|
52
|
+
if (nextDeck && nextDeck !== state.activeDeck) {
|
|
53
|
+
invokeSync(LayoutOperation.SwitchWorkspace, { subject: nextDeck });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const deck = getDeck();
|
|
57
|
+
if (nextSolo && nextSolo !== deck.solo) {
|
|
58
|
+
invokeSync(LayoutOperation.SetLayoutMode, { subject: nextSolo, mode: 'solo' });
|
|
59
|
+
} else if (!nextSolo && deck.solo) {
|
|
60
|
+
invokeSync(LayoutOperation.SetLayoutMode, { mode: 'deck' });
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
yield* Effect.sync(() => handleNavigation());
|
|
65
|
+
window.addEventListener('popstate', handleNavigation);
|
|
66
|
+
|
|
67
|
+
// Subscribe to state changes to update the URL.
|
|
68
|
+
let lastSolo: string | undefined;
|
|
69
|
+
let lastActiveDeck: string | undefined;
|
|
70
|
+
const unsubscribe = registry.subscribe(stateAtom, () => {
|
|
71
|
+
const state = getState();
|
|
72
|
+
const deck = getDeck();
|
|
73
|
+
const solo = deck.solo;
|
|
74
|
+
const activeDeck = state.activeDeck;
|
|
75
|
+
|
|
76
|
+
// Only update URL if relevant state changed.
|
|
77
|
+
if (solo !== lastSolo || activeDeck !== lastActiveDeck) {
|
|
78
|
+
lastSolo = solo;
|
|
79
|
+
lastActiveDeck = activeDeck;
|
|
80
|
+
|
|
81
|
+
const path = solo ? `/${activeDeck}/${solo}` : `/${activeDeck}`;
|
|
82
|
+
if (window.location.pathname !== path) {
|
|
83
|
+
// TODO(thure): In some browsers, this only preserves the most recent state change, even though this is not `history.replace`…
|
|
84
|
+
history.pushState(null, '', `${path}${window.location.search}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return Capability.contributes(Capabilities.Null, null, () =>
|
|
90
|
+
Effect.sync(() => {
|
|
91
|
+
window.removeEventListener('popstate', handleNavigation);
|
|
92
|
+
unsubscribe();
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
8
9
|
import { useNode } from '@dxos/plugin-graph';
|
|
9
10
|
import { useAttended } from '@dxos/react-ui-attention';
|
|
10
11
|
|
|
@@ -21,7 +22,7 @@ export const ActiveNode = () => {
|
|
|
21
22
|
<div role='none' className='sr-only'>
|
|
22
23
|
{/* TODO(wittjosiah): Weird that this is a surface, feel like it's not really render logic.
|
|
23
24
|
Probably this lives in React-land currently in order to access translations? */}
|
|
24
|
-
<Surface role='document-title' data={{ subject: activeNode }} limit={1} />
|
|
25
|
+
<Surface.Surface role='document-title' data={{ subject: activeNode }} limit={1} />
|
|
25
26
|
</div>
|
|
26
27
|
);
|
|
27
28
|
};
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface } from '@dxos/app-framework';
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
|
-
import { mx } from '@dxos/
|
|
9
|
+
import { mx, osTranslations } from '@dxos/ui-theme';
|
|
10
10
|
|
|
11
11
|
import { meta } from '../../meta';
|
|
12
12
|
import { CloseSidebarButton, ToggleSidebarButton } from '../Sidebar';
|
|
@@ -16,24 +16,24 @@ export const Banner = ({ variant, classNames }: ThemedClassName<{ variant?: 'top
|
|
|
16
16
|
return (
|
|
17
17
|
<header
|
|
18
18
|
className={mx(
|
|
19
|
-
'flex items-stretch relative
|
|
19
|
+
'flex items-stretch relative py-1 ps-1 pe-2',
|
|
20
20
|
variant === 'topbar' &&
|
|
21
|
-
'fixed inset-
|
|
21
|
+
'fixed inset-x-0 top-[env(safe-area-inset-top)] h-(--dx-rail-size) border-b border-separator',
|
|
22
22
|
classNames,
|
|
23
23
|
)}
|
|
24
24
|
>
|
|
25
25
|
{variant === 'sidebar' ? <CloseSidebarButton /> : <ToggleSidebarButton />}
|
|
26
|
-
<span className='self-center grow
|
|
26
|
+
<span className='self-center grow ms-1'>{t('current app name', { ns: osTranslations })}</span>
|
|
27
27
|
{variant === 'topbar' && (
|
|
28
28
|
<div role='none' className='absolute inset-0 pointer-events-none'>
|
|
29
|
-
<div role='none' className='grid
|
|
30
|
-
<Surface role='search-input' limit={1} />
|
|
29
|
+
<div role='none' className='grid h-full pointer-fine:p-1 max-w-md mx-auto pointer-events-auto'>
|
|
30
|
+
<Surface.Surface role='search-input' limit={1} />
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
)}
|
|
34
34
|
<span role='none' className='grow' />
|
|
35
|
-
<Surface role='header-end' limit={1} />
|
|
36
|
-
<Surface role='notch-start' limit={1} />
|
|
35
|
+
<Surface.Surface role='header-end' limit={1} />
|
|
36
|
+
<Surface.Surface role='notch-start' limit={1} />
|
|
37
37
|
</header>
|
|
38
38
|
);
|
|
39
39
|
};
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import { useBreakpoints } from '../../hooks';
|
|
9
|
+
import { useBreakpoints, useDeckState } from '../../hooks';
|
|
11
10
|
import { getMode } from '../../types';
|
|
12
11
|
import { layoutAppliesTopbar } from '../../util';
|
|
13
12
|
import { fixedSidebarToggleStyles } from '../fragments';
|
|
@@ -15,16 +14,16 @@ import { ToggleSidebarButton } from '../Sidebar';
|
|
|
15
14
|
|
|
16
15
|
export const ContentEmpty = () => {
|
|
17
16
|
const breakpoint = useBreakpoints();
|
|
18
|
-
const { deck } =
|
|
17
|
+
const { deck } = useDeckState();
|
|
19
18
|
const layoutMode = getMode(deck);
|
|
20
19
|
const topbar = layoutAppliesTopbar(breakpoint, layoutMode);
|
|
21
20
|
return (
|
|
22
21
|
<div
|
|
23
22
|
role='none'
|
|
24
|
-
className='grid place-items-center p-8 relative bg-
|
|
23
|
+
className='grid place-items-center p-8 relative bg-deck-surface'
|
|
25
24
|
data-testid='layoutPlugin.firstRunMessage'
|
|
26
25
|
>
|
|
27
|
-
<Surface role='keyshortcuts' />
|
|
26
|
+
<Surface.Surface role='keyshortcuts' />
|
|
28
27
|
{!topbar && <ToggleSidebarButton variant='default' classNames={fixedSidebarToggleStyles} />}
|
|
29
28
|
</div>
|
|
30
29
|
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capability, Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
11
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
13
|
+
|
|
14
|
+
import { DeckState, LayoutOperationResolver } from '../../capabilities';
|
|
15
|
+
import { meta as pluginMeta } from '../../meta';
|
|
16
|
+
import { translations } from '../../translations';
|
|
17
|
+
|
|
18
|
+
import { DeckLayout } from './DeckLayout';
|
|
19
|
+
|
|
20
|
+
const TestPlugin = Plugin.define(pluginMeta).pipe(
|
|
21
|
+
Plugin.addModule({
|
|
22
|
+
id: Capability.getModuleTag(DeckState),
|
|
23
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
24
|
+
activate: () => DeckState(),
|
|
25
|
+
}),
|
|
26
|
+
AppPlugin.addOperationResolverModule({
|
|
27
|
+
activate: LayoutOperationResolver,
|
|
28
|
+
}),
|
|
29
|
+
Plugin.make,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const meta = {
|
|
33
|
+
title: 'plugins/plugin-deck/components/DeckLayout',
|
|
34
|
+
component: DeckLayout,
|
|
35
|
+
render: (args) => <DeckLayout {...args} />,
|
|
36
|
+
decorators: [
|
|
37
|
+
withTheme(),
|
|
38
|
+
withLayout({ layout: 'fullscreen' }),
|
|
39
|
+
withPluginManager({
|
|
40
|
+
plugins: [...corePlugins(), TestPlugin()],
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
parameters: {
|
|
44
|
+
layout: 'fullscreen',
|
|
45
|
+
translations,
|
|
46
|
+
},
|
|
47
|
+
} satisfies Meta<typeof DeckLayout>;
|
|
48
|
+
|
|
49
|
+
export default meta;
|
|
50
|
+
|
|
51
|
+
type Story = StoryObj<typeof meta>;
|
|
52
|
+
|
|
53
|
+
export const Default: Story = {};
|