@dxos/plugin-deck 0.8.4-main.c1de068 → 0.8.4-main.c351d160a8
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-AJW6225V.mjs +14 -0
- package/dist/lib/browser/Banner-AJW6225V.mjs.map +7 -0
- package/dist/lib/browser/DeckSettings-HSSQKFNE.mjs +96 -0
- package/dist/lib/browser/DeckSettings-HSSQKFNE.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-MP6INIM2.mjs +123 -0
- package/dist/lib/browser/app-graph-builder-MP6INIM2.mjs.map +7 -0
- package/dist/lib/browser/check-app-scheme-AUNCD2Y6.mjs +33 -0
- package/dist/lib/browser/check-app-scheme-AUNCD2Y6.mjs.map +7 -0
- package/dist/lib/browser/chunk-3P2FJVXC.mjs +278 -0
- package/dist/lib/browser/chunk-3P2FJVXC.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-L3RYMAV7.mjs +16 -0
- package/dist/lib/browser/chunk-L3RYMAV7.mjs.map +7 -0
- package/dist/lib/browser/chunk-TAHLKBDO.mjs +187 -0
- package/dist/lib/browser/chunk-TAHLKBDO.mjs.map +7 -0
- package/dist/lib/browser/chunk-WTNYSXY5.mjs +1388 -0
- package/dist/lib/browser/chunk-WTNYSXY5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +90 -74
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-2TEGT4PG.mjs +639 -0
- package/dist/lib/browser/operation-resolver-2TEGT4PG.mjs.map +7 -0
- package/dist/lib/browser/react-root-XBFHPSCP.mjs +48 -0
- package/dist/lib/browser/react-root-XBFHPSCP.mjs.map +7 -0
- package/dist/lib/browser/react-surface-4J3BZNT2.mjs +44 -0
- package/dist/lib/browser/react-surface-4J3BZNT2.mjs.map +7 -0
- package/dist/lib/browser/settings-PTMGCSJH.mjs +40 -0
- package/dist/lib/browser/settings-PTMGCSJH.mjs.map +7 -0
- package/dist/lib/browser/state-MA4SQ7BE.mjs +106 -0
- package/dist/lib/browser/state-MA4SQ7BE.mjs.map +7 -0
- package/dist/lib/browser/toolkit-6B34QFU3.mjs +55 -0
- package/dist/lib/browser/toolkit-6B34QFU3.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +14 -8
- package/dist/lib/browser/url-handler-FEUFPQIP.mjs +98 -0
- package/dist/lib/browser/url-handler-FEUFPQIP.mjs.map +7 -0
- package/dist/lib/node-esm/Banner-XBH2IIDR.mjs +15 -0
- package/dist/lib/node-esm/Banner-XBH2IIDR.mjs.map +7 -0
- package/dist/lib/node-esm/DeckSettings-DJRFLKQS.mjs +97 -0
- package/dist/lib/node-esm/DeckSettings-DJRFLKQS.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-ACHG5HY7.mjs +124 -0
- package/dist/lib/node-esm/app-graph-builder-ACHG5HY7.mjs.map +7 -0
- package/dist/lib/node-esm/check-app-scheme-WN76GWVC.mjs +34 -0
- package/dist/lib/node-esm/check-app-scheme-WN76GWVC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CQ3XYTNJ.mjs +1389 -0
- package/dist/lib/node-esm/chunk-CQ3XYTNJ.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-EMU4VIPH.mjs +188 -0
- package/dist/lib/node-esm/chunk-EMU4VIPH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GZJAQ5IP.mjs +279 -0
- package/dist/lib/node-esm/chunk-GZJAQ5IP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XCNF4COU.mjs +18 -0
- package/dist/lib/node-esm/chunk-XCNF4COU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +185 -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-GCMCCI7A.mjs +640 -0
- package/dist/lib/node-esm/operation-resolver-GCMCCI7A.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-32LZ6APH.mjs +49 -0
- package/dist/lib/node-esm/react-root-32LZ6APH.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-CO4ZDZKM.mjs +45 -0
- package/dist/lib/node-esm/react-surface-CO4ZDZKM.mjs.map +7 -0
- package/dist/lib/node-esm/settings-LPPFLXNJ.mjs +41 -0
- package/dist/lib/node-esm/settings-LPPFLXNJ.mjs.map +7 -0
- package/dist/lib/node-esm/state-KNRU3GDC.mjs +107 -0
- package/dist/lib/node-esm/state-KNRU3GDC.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-SOWYKJY3.mjs +56 -0
- package/dist/lib/node-esm/toolkit-SOWYKJY3.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +39 -0
- package/dist/lib/node-esm/url-handler-4LEB7UWF.mjs +99 -0
- package/dist/lib/node-esm/url-handler-4LEB7UWF.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/Banner.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 +6 -6
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +105 -5
- 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 +3 -3
- 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 -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/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/layout.d.ts +1 -7
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -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 +103 -41
- 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 +61 -47
- package/src/DeckPlugin.ts +46 -61
- 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 -13
- package/src/capabilities/operation-resolver/index.ts +10 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +558 -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 +98 -0
- package/src/components/DeckLayout/ActiveNode.tsx +3 -2
- package/src/components/DeckLayout/Banner.tsx +12 -12
- package/src/components/DeckLayout/ContentEmpty.tsx +6 -7
- package/src/components/DeckLayout/DeckLayout.stories.tsx +53 -0
- package/src/components/DeckLayout/DeckLayout.tsx +18 -285
- package/src/components/DeckLayout/DeckMain.tsx +287 -0
- package/src/components/DeckLayout/Dialog.tsx +22 -13
- package/src/components/DeckLayout/Fallback.tsx +4 -8
- package/src/components/DeckLayout/Popover.tsx +76 -32
- package/src/components/DeckLayout/StatusBar.tsx +4 -4
- package/src/components/DeckLayout/Toast.tsx +30 -5
- package/src/components/Plank/Plank.stories.tsx +26 -17
- package/src/components/Plank/Plank.tsx +111 -70
- package/src/components/Plank/PlankControls.tsx +12 -14
- package/src/components/Plank/PlankError.tsx +33 -18
- package/src/components/Plank/PlankHeading.tsx +45 -51
- package/src/components/Plank/PlankLoading.tsx +1 -1
- package/src/components/Sidebar/ComplementarySidebar.tsx +80 -53
- package/src/components/Sidebar/Sidebar.tsx +9 -9
- package/src/components/Sidebar/SidebarButton.tsx +40 -33
- 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 +8 -11
- 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 +32 -0
- package/src/index.ts +1 -2
- package/src/layout.ts +1 -14
- package/src/meta.ts +8 -5
- package/src/translations.ts +4 -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 +99 -26
- 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-JTFSDT2I.mjs +0 -152
- package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-57U62A3A.mjs +0 -32
- package/dist/lib/browser/check-app-scheme-57U62A3A.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-D7KTFCUV.mjs +0 -1494
- package/dist/lib/browser/chunk-D7KTFCUV.mjs.map +0 -7
- package/dist/lib/browser/chunk-F5BQOOEG.mjs +0 -160
- package/dist/lib/browser/chunk-F5BQOOEG.mjs.map +0 -7
- package/dist/lib/browser/chunk-JFTXENFN.mjs +0 -129
- package/dist/lib/browser/chunk-JFTXENFN.mjs.map +0 -7
- package/dist/lib/browser/chunk-M57WD3V6.mjs +0 -16
- package/dist/lib/browser/chunk-M57WD3V6.mjs.map +0 -7
- package/dist/lib/browser/chunk-QDZO4AJ4.mjs +0 -127
- package/dist/lib/browser/chunk-QDZO4AJ4.mjs.map +0 -7
- package/dist/lib/browser/chunk-Z5KITAZW.mjs +0 -13
- package/dist/lib/browser/chunk-Z5KITAZW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs +0 -521
- package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs.map +0 -7
- package/dist/lib/browser/react-root-PO64J7ML.mjs +0 -43
- package/dist/lib/browser/react-root-PO64J7ML.mjs.map +0 -7
- package/dist/lib/browser/react-surface-E45YOVF5.mjs +0 -40
- package/dist/lib/browser/react-surface-E45YOVF5.mjs.map +0 -7
- package/dist/lib/browser/settings-6AJZPZPM.mjs +0 -29
- package/dist/lib/browser/settings-6AJZPZPM.mjs.map +0 -7
- package/dist/lib/browser/state-MVDYX77Y.mjs +0 -12
- package/dist/lib/browser/tools-TKQDPCHJ.mjs +0 -88
- package/dist/lib/browser/tools-TKQDPCHJ.mjs.map +0 -7
- package/dist/lib/browser/url-handler-7L7M6IKH.mjs +0 -70
- package/dist/lib/browser/url-handler-7L7M6IKH.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/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 -141
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/check-app-scheme.ts +0 -40
- package/src/capabilities/intent-resolver.ts +0 -468
- package/src/capabilities/react-root.tsx +0 -38
- package/src/capabilities/react-surface.tsx +0 -30
- package/src/capabilities/settings.ts +0 -26
- package/src/capabilities/state.ts +0 -104
- package/src/capabilities/tools.ts +0 -81
- package/src/capabilities/url-handler.ts +0 -59
- package/src/components/DeckSettings/DeckSettings.tsx +0 -88
- package/src/components/DeckSettings/index.ts +0 -5
- package/src/events.ts +0 -11
- /package/dist/lib/{browser/state-MVDYX77Y.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,98 @@
|
|
|
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, fromUrlPath, getWorkspaceFromPath, toUrlPath } from '@dxos/app-toolkit';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
import { Node } from '@dxos/plugin-graph';
|
|
11
|
+
|
|
12
|
+
import { DeckCapabilities, type DeckStateProps, defaultDeck } from '../../types';
|
|
13
|
+
|
|
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 qualifiedId = fromUrlPath(pathname);
|
|
52
|
+
const workspace = getWorkspaceFromPath(qualifiedId);
|
|
53
|
+
if (workspace !== Node.RootId && workspace !== state.activeDeck) {
|
|
54
|
+
invokeSync(LayoutOperation.SwitchWorkspace, { subject: workspace });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const deck = getDeck();
|
|
58
|
+
const activeId = qualifiedId !== workspace ? qualifiedId : undefined;
|
|
59
|
+
if (activeId && activeId !== deck.solo) {
|
|
60
|
+
invokeSync(LayoutOperation.SetLayoutMode, { subject: activeId, mode: 'solo' });
|
|
61
|
+
} else if (!activeId && deck.solo) {
|
|
62
|
+
invokeSync(LayoutOperation.SetLayoutMode, { mode: 'deck' });
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
yield* Effect.sync(() => handleNavigation());
|
|
67
|
+
window.addEventListener('popstate', handleNavigation);
|
|
68
|
+
|
|
69
|
+
// Subscribe to state changes to update the URL.
|
|
70
|
+
let lastSolo: string | undefined;
|
|
71
|
+
let lastActiveDeck: string | undefined;
|
|
72
|
+
const unsubscribe = registry.subscribe(stateAtom, () => {
|
|
73
|
+
const state = getState();
|
|
74
|
+
const deck = getDeck();
|
|
75
|
+
const solo = deck.solo;
|
|
76
|
+
const activeDeck = state.activeDeck;
|
|
77
|
+
|
|
78
|
+
// Only update URL if relevant state changed.
|
|
79
|
+
if (solo !== lastSolo || activeDeck !== lastActiveDeck) {
|
|
80
|
+
lastSolo = solo;
|
|
81
|
+
lastActiveDeck = activeDeck;
|
|
82
|
+
|
|
83
|
+
const path = solo ? toUrlPath(solo) : toUrlPath(activeDeck);
|
|
84
|
+
if (window.location.pathname !== path) {
|
|
85
|
+
// TODO(thure): In some browsers, this only preserves the most recent state change, even though this is not `history.replace`…
|
|
86
|
+
history.pushState(null, '', `${path}${window.location.search}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
return Capability.contributes(Capabilities.Null, null, () =>
|
|
92
|
+
Effect.sync(() => {
|
|
93
|
+
window.removeEventListener('popstate', handleNavigation);
|
|
94
|
+
unsubscribe();
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
}),
|
|
98
|
+
);
|
|
@@ -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,36 +4,36 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
9
|
-
import { mx } from '@dxos/
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { mx, osTranslations } from '@dxos/ui-theme';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { meta } from '../../meta';
|
|
12
12
|
import { CloseSidebarButton, ToggleSidebarButton } from '../Sidebar';
|
|
13
13
|
|
|
14
14
|
export const Banner = ({ variant, classNames }: ThemedClassName<{ variant?: 'topbar' | 'sidebar' }>) => {
|
|
15
|
-
const { t } = useTranslation(
|
|
15
|
+
const { t } = useTranslation(meta.id);
|
|
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,27 +4,26 @@
|
|
|
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
|
-
import { ToggleSidebarButton } from '../Sidebar';
|
|
14
12
|
import { fixedSidebarToggleStyles } from '../fragments';
|
|
13
|
+
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 = {};
|