@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
package/src/types/schema.ts
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Label, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
8
10
|
import { type DeepReadonly } from '@dxos/util';
|
|
9
11
|
|
|
10
12
|
import { meta } from '../meta';
|
|
11
13
|
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
export const PLANK_COMPANION_TYPE = 'dxos.org/plugin/deck/plank-companion';
|
|
15
|
-
export const DECK_COMPANION_TYPE = 'dxos.org/plugin/deck/deck-companion';
|
|
14
|
+
export const PLANK_COMPANION_TYPE = `${meta.id}.plank-companion`;
|
|
15
|
+
export const DECK_COMPANION_TYPE = `${meta.id}.deck-companion`;
|
|
16
16
|
|
|
17
17
|
// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.
|
|
18
18
|
export const NewPlankPositions = ['start', 'end'] as const;
|
|
19
19
|
export type NewPlankPositioning = (typeof NewPlankPositions)[number];
|
|
20
20
|
|
|
21
|
-
export const
|
|
22
|
-
export type Overscroll = (typeof
|
|
21
|
+
export const OverScrollToProps = ['none', 'centering'] as const;
|
|
22
|
+
export type Overscroll = (typeof OverScrollToProps)[number];
|
|
23
23
|
|
|
24
24
|
export type Part = 'solo' | 'deck' | 'complementary';
|
|
25
25
|
export type ResolvedPart = Part | 'solo-primary' | 'solo-companion';
|
|
@@ -30,7 +30,9 @@ export const DeckSettingsSchema = Schema.Struct({
|
|
|
30
30
|
enableStatusbar: Schema.optional(Schema.Boolean),
|
|
31
31
|
enableNativeRedirect: Schema.optional(Schema.Boolean),
|
|
32
32
|
newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),
|
|
33
|
-
overscroll: Schema.optional(Schema.Literal(...
|
|
33
|
+
overscroll: Schema.optional(Schema.Literal(...OverScrollToProps)),
|
|
34
|
+
// TODO(burdon): Rename layoutMode? (e.g., bento | encapsulated?)
|
|
35
|
+
encapsulatedPlanks: Schema.optional(Schema.Boolean),
|
|
34
36
|
}).pipe(Schema.mutable);
|
|
35
37
|
export type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;
|
|
36
38
|
|
|
@@ -42,8 +44,8 @@ export const DeckState = Schema.Struct({
|
|
|
42
44
|
/** If false, the deck has not yet left solo mode and new planks should be soloed. */
|
|
43
45
|
initialized: Schema.Boolean,
|
|
44
46
|
active: Schema.mutable(Schema.Array(Schema.String)),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
companionOpen: Schema.Boolean,
|
|
48
|
+
companionVariant: Schema.optional(Schema.String),
|
|
47
49
|
inactive: Schema.mutable(Schema.Array(Schema.String)),
|
|
48
50
|
solo: Schema.optional(Schema.String),
|
|
49
51
|
fullscreen: Schema.Boolean,
|
|
@@ -55,7 +57,8 @@ export type DeckState = Schema.Schema.Type<typeof DeckState>;
|
|
|
55
57
|
export const defaultDeck: DeckState = {
|
|
56
58
|
initialized: false,
|
|
57
59
|
active: [],
|
|
58
|
-
|
|
60
|
+
companionOpen: false,
|
|
61
|
+
companionVariant: undefined,
|
|
59
62
|
inactive: [],
|
|
60
63
|
solo: undefined,
|
|
61
64
|
fullscreen: false,
|
|
@@ -75,12 +78,21 @@ export const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode =
|
|
|
75
78
|
return 'deck';
|
|
76
79
|
};
|
|
77
80
|
|
|
78
|
-
//
|
|
79
|
-
export const
|
|
81
|
+
// Persisted plugin state (stored in KVS/localStorage).
|
|
82
|
+
export const DeckStateSchema = Schema.Struct({
|
|
80
83
|
sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),
|
|
81
84
|
complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),
|
|
82
85
|
complementarySidebarPanel: Schema.optional(Schema.String),
|
|
86
|
+
activeDeck: Schema.String,
|
|
87
|
+
previousDeck: Schema.String,
|
|
88
|
+
decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),
|
|
89
|
+
previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),
|
|
90
|
+
}).pipe(Schema.mutable);
|
|
91
|
+
export type DeckStateProps = Schema.Schema.Type<typeof DeckStateSchema>;
|
|
83
92
|
|
|
93
|
+
// TODO(burdon): Factor out state (in common with other layouts?)
|
|
94
|
+
// Transient/ephemeral plugin state (not persisted).
|
|
95
|
+
export const DeckEphemeralStateSchema = Schema.Struct({
|
|
84
96
|
dialogOpen: Schema.Boolean,
|
|
85
97
|
dialogType: Schema.optional(Schema.Literal('default', 'alert')),
|
|
86
98
|
dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),
|
|
@@ -93,23 +105,23 @@ export const DeckPluginState = Schema.Struct({
|
|
|
93
105
|
popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),
|
|
94
106
|
popoverAnchor: Schema.optional(Schema.Any),
|
|
95
107
|
popoverAnchorId: Schema.optional(Schema.String),
|
|
108
|
+
popoverKind: Schema.optional(Schema.Literal('base', 'card')),
|
|
109
|
+
popoverTitle: Schema.optional(Label.annotations({ description: 'The title of the popover.' })),
|
|
110
|
+
/** Ref of the subject to be passed to the popover Surface. */
|
|
111
|
+
popoverContentRef: Schema.optional(Schema.String),
|
|
96
112
|
/** Data to be passed to the popover Surface. */
|
|
97
113
|
popoverContent: Schema.optional(Schema.Any),
|
|
98
114
|
|
|
99
|
-
toasts: Schema.mutable(Schema.Array(
|
|
115
|
+
toasts: Schema.mutable(Schema.Array(LayoutOperation.Toast)),
|
|
100
116
|
currentUndoId: Schema.optional(Schema.String),
|
|
101
117
|
|
|
102
|
-
activeDeck: Schema.String,
|
|
103
|
-
previousDeck: Schema.String,
|
|
104
|
-
decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),
|
|
105
|
-
previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),
|
|
106
|
-
deck: Schema.mutable(DeckState),
|
|
107
|
-
|
|
108
118
|
/** The identifier of a component to scroll into view when it is mounted. */
|
|
109
119
|
scrollIntoView: Schema.optional(Schema.String),
|
|
110
120
|
}).pipe(Schema.mutable);
|
|
121
|
+
export type DeckEphemeralStateProps = Schema.Schema.Type<typeof DeckEphemeralStateSchema>;
|
|
111
122
|
|
|
112
|
-
|
|
123
|
+
// Combined state type (for convenience in components that need both).
|
|
124
|
+
export type DeckPluginState = DeckStateProps & DeckEphemeralStateProps;
|
|
113
125
|
|
|
114
126
|
export namespace DeckAction {
|
|
115
127
|
const PartAdjustmentSchema = Schema.Union(
|
|
@@ -125,12 +137,12 @@ export namespace DeckAction {
|
|
|
125
137
|
export type Adjustment = Schema.Schema.Type<typeof Adjustment>;
|
|
126
138
|
|
|
127
139
|
// An atomic transaction to apply to the deck, describing which element to move to which location.
|
|
128
|
-
export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}
|
|
140
|
+
export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}.action.adjust`, {
|
|
129
141
|
input: Adjustment,
|
|
130
142
|
output: Schema.Void,
|
|
131
143
|
}) {}
|
|
132
144
|
|
|
133
|
-
export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}
|
|
145
|
+
export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}.action.update-plank-size`, {
|
|
134
146
|
input: Schema.Struct({
|
|
135
147
|
id: Schema.String,
|
|
136
148
|
size: Schema.Number,
|
|
@@ -138,11 +150,72 @@ export namespace DeckAction {
|
|
|
138
150
|
output: Schema.Void,
|
|
139
151
|
}) {}
|
|
140
152
|
|
|
141
|
-
export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}
|
|
153
|
+
export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}.action.change-companion`, {
|
|
142
154
|
input: Schema.Struct({
|
|
143
|
-
primary: Schema.String,
|
|
144
155
|
companion: Schema.Union(Schema.String, Schema.Null),
|
|
145
156
|
}),
|
|
146
157
|
output: Schema.Void,
|
|
147
158
|
}) {}
|
|
148
159
|
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Operations for the Deck plugin.
|
|
163
|
+
*/
|
|
164
|
+
export namespace DeckOperation {
|
|
165
|
+
const PartAdjustmentSchema = Schema.Union(
|
|
166
|
+
Schema.Literal('close').annotations({ description: 'Close the plank.' }),
|
|
167
|
+
Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),
|
|
168
|
+
Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),
|
|
169
|
+
Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),
|
|
170
|
+
Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),
|
|
171
|
+
Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),
|
|
172
|
+
);
|
|
173
|
+
export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;
|
|
174
|
+
|
|
175
|
+
export const Adjust = Operation.make({
|
|
176
|
+
meta: {
|
|
177
|
+
key: `${meta.id}.operation.adjust`,
|
|
178
|
+
name: 'Adjust',
|
|
179
|
+
description: 'Adjust the layout of a plank.',
|
|
180
|
+
},
|
|
181
|
+
services: [Capability.Service],
|
|
182
|
+
schema: {
|
|
183
|
+
input: Schema.Struct({
|
|
184
|
+
id: Schema.String.annotations({ description: 'The id of the plank to adjust.' }),
|
|
185
|
+
type: PartAdjustmentSchema.annotations({ description: 'The type of adjustment to make.' }),
|
|
186
|
+
}),
|
|
187
|
+
output: Schema.Void,
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
export const UpdatePlankSize = Operation.make({
|
|
192
|
+
meta: {
|
|
193
|
+
key: `${meta.id}.operation.update-plank-size`,
|
|
194
|
+
name: 'Update Plank Size',
|
|
195
|
+
description: 'Update the size of a plank.',
|
|
196
|
+
},
|
|
197
|
+
services: [Capability.Service],
|
|
198
|
+
schema: {
|
|
199
|
+
input: Schema.Struct({
|
|
200
|
+
id: Schema.String.annotations({ description: 'The id of the plank to resize.' }),
|
|
201
|
+
size: Schema.Number.annotations({ description: 'The new size of the plank.' }),
|
|
202
|
+
}),
|
|
203
|
+
output: Schema.Void,
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
export const ChangeCompanion = Operation.make({
|
|
208
|
+
meta: {
|
|
209
|
+
key: `${meta.id}.operation.change-companion`,
|
|
210
|
+
name: 'Change Companion',
|
|
211
|
+
description: 'Change the companion plank for a primary plank.',
|
|
212
|
+
},
|
|
213
|
+
services: [Capability.Service],
|
|
214
|
+
schema: {
|
|
215
|
+
input: Schema.Struct({
|
|
216
|
+
companion: Schema.Union(Schema.String, Schema.Null),
|
|
217
|
+
}),
|
|
218
|
+
output: Schema.Void,
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
}
|
|
@@ -6,7 +6,7 @@ import { type LayoutMode } from '../types';
|
|
|
6
6
|
|
|
7
7
|
export const layoutAppliesTopbar = (breakpoint: string, layoutMode?: LayoutMode) => {
|
|
8
8
|
return (
|
|
9
|
-
document.body.getAttribute('data-platform') === '
|
|
9
|
+
document.body.getAttribute('data-platform') === 'windows' &&
|
|
10
10
|
breakpoint === 'desktop' &&
|
|
11
11
|
layoutMode !== 'solo--fullscreen'
|
|
12
12
|
);
|
package/src/util/overscroll.ts
CHANGED
|
@@ -56,14 +56,14 @@ export const calculateOverscroll = (
|
|
|
56
56
|
}
|
|
57
57
|
if (planksCount === 1) {
|
|
58
58
|
const overscrollPadding =
|
|
59
|
-
'max(0px, calc(((100dvw - var(--dx-main-
|
|
59
|
+
'max(0px, calc(((100dvw - var(--dx-main-sidebar-width) - var(--dx-main-complementary-width) - (var(--dx-main-content-first-width) + 1px)) / 2)))';
|
|
60
60
|
return { paddingInlineStart: overscrollPadding, paddingInlineEnd: overscrollPadding };
|
|
61
61
|
} else {
|
|
62
62
|
return {
|
|
63
63
|
paddingInlineStart:
|
|
64
|
-
'max(0px, calc(((100dvw - (var(--dx-main-
|
|
64
|
+
'max(0px, calc(((100dvw - (var(--dx-main-content-first-width) + 1px)) / 2) - var(--dx-main-sidebar-width)))',
|
|
65
65
|
paddingInlineEnd:
|
|
66
|
-
'max(0px, calc(((100dvw - (var(--dx-main-
|
|
66
|
+
'max(0px, calc(((100dvw - (var(--dx-main-content-last-width) + 1px)) / 2) - var(--dx-main-complementary-width)))',
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
};
|
package/src/util/set-active.ts
CHANGED
|
@@ -2,46 +2,66 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { batch } from '@preact/signals-core';
|
|
6
|
-
|
|
7
5
|
import { type AttentionManager } from '@dxos/plugin-attention';
|
|
8
6
|
|
|
9
|
-
import { type
|
|
7
|
+
import { type DeckState } from '../types';
|
|
10
8
|
|
|
11
9
|
export type SetActiveOptions = {
|
|
12
10
|
next: string[];
|
|
13
|
-
|
|
11
|
+
deck: DeckState;
|
|
14
12
|
attention?: AttentionManager;
|
|
15
13
|
};
|
|
16
14
|
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
export type SetActiveResult = {
|
|
16
|
+
/** Updates to apply to the deck. */
|
|
17
|
+
deckUpdates: {
|
|
18
|
+
inactive: string[];
|
|
19
|
+
solo: string | undefined;
|
|
20
|
+
active: string[];
|
|
21
|
+
fullscreen: boolean;
|
|
22
|
+
};
|
|
23
|
+
/** ID of the item to attend (scroll into view) if attention changed. */
|
|
24
|
+
toAttend?: string;
|
|
25
|
+
};
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Computes the new active state for the deck without mutating.
|
|
29
|
+
* Returns the updates to apply and optionally an item to attend.
|
|
30
|
+
*/
|
|
31
|
+
export const computeActiveUpdates = ({ next, deck, attention }: SetActiveOptions): SetActiveResult => {
|
|
32
|
+
const active = deck.solo ? [deck.solo] : deck.active;
|
|
33
|
+
const removed = active.filter((id) => !next.includes(id));
|
|
34
|
+
const closed = Array.from(new Set([...deck.inactive.filter((id) => !next.includes(id)), ...removed]));
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
const updates = {
|
|
37
|
+
inactive: closed,
|
|
38
|
+
solo: deck.solo,
|
|
39
|
+
active: deck.active,
|
|
40
|
+
fullscreen: deck.fullscreen,
|
|
41
|
+
};
|
|
30
42
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
43
|
+
if (deck.solo || !deck.initialized) {
|
|
44
|
+
updates.solo = next[0];
|
|
45
|
+
} else {
|
|
46
|
+
updates.active = next;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (deck.fullscreen && !updates.solo) {
|
|
50
|
+
updates.fullscreen = false;
|
|
51
|
+
}
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
53
|
+
let toAttend: string | undefined;
|
|
54
|
+
if (attention) {
|
|
55
|
+
const attended = attention.getCurrent();
|
|
56
|
+
const [attendedId] = Array.from(attended);
|
|
57
|
+
const isAttendedAvailable = !!attendedId && next.includes(attendedId);
|
|
58
|
+
if (!isAttendedAvailable) {
|
|
59
|
+
const attendedIndex = active.indexOf(attendedId);
|
|
60
|
+
// If outside of bounds, focus on the first/last plank, otherwise focus on the new plank in the same position.
|
|
61
|
+
const index = attendedIndex === -1 ? 0 : attendedIndex >= next.length ? next.length - 1 : attendedIndex;
|
|
62
|
+
toAttend = next[index];
|
|
45
63
|
}
|
|
46
|
-
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return { deckUpdates: updates, toAttend };
|
|
47
67
|
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DeckCapabilities
|
|
3
|
-
} from "./chunk-M57WD3V6.mjs";
|
|
4
|
-
import {
|
|
5
|
-
DECK_PLUGIN
|
|
6
|
-
} from "./chunk-Z5KITAZW.mjs";
|
|
7
|
-
|
|
8
|
-
// src/capabilities/app-graph-builder.ts
|
|
9
|
-
import { Rx } from "@effect-rx/rx-react";
|
|
10
|
-
import { Option, pipe } from "effect";
|
|
11
|
-
import { Capabilities, contributes, createIntent, LayoutAction } from "@dxos/app-framework";
|
|
12
|
-
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
13
|
-
import { createExtension, ROOT_ID, rxFromSignal } from "@dxos/plugin-graph";
|
|
14
|
-
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
15
|
-
id: DECK_PLUGIN,
|
|
16
|
-
actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map(() => {
|
|
17
|
-
const state = context.getCapability(DeckCapabilities.MutableDeckState);
|
|
18
|
-
const _fullscreen = {
|
|
19
|
-
id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,
|
|
20
|
-
data: async () => {
|
|
21
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
22
|
-
await dispatch(createIntent(LayoutAction.SetLayoutMode, {
|
|
23
|
-
part: "mode",
|
|
24
|
-
options: {
|
|
25
|
-
mode: "fullscreen"
|
|
26
|
-
}
|
|
27
|
-
}));
|
|
28
|
-
},
|
|
29
|
-
properties: {
|
|
30
|
-
label: [
|
|
31
|
-
"toggle fullscreen label",
|
|
32
|
-
{
|
|
33
|
-
ns: DECK_PLUGIN
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
icon: "ph--arrows-out--regular",
|
|
37
|
-
keyBinding: {
|
|
38
|
-
macos: "ctrl+meta+f",
|
|
39
|
-
windows: "shift+ctrl+f"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const closeCurrent = {
|
|
44
|
-
id: `${LayoutAction.Close._tag}/current`,
|
|
45
|
-
data: async () => {
|
|
46
|
-
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
47
|
-
const attended = attention.current.at(-1);
|
|
48
|
-
if (attended) {
|
|
49
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
50
|
-
await dispatch(createIntent(LayoutAction.Close, {
|
|
51
|
-
part: "main",
|
|
52
|
-
subject: [
|
|
53
|
-
attended
|
|
54
|
-
],
|
|
55
|
-
options: {
|
|
56
|
-
state: false
|
|
57
|
-
}
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
properties: {
|
|
62
|
-
label: [
|
|
63
|
-
"close current label",
|
|
64
|
-
{
|
|
65
|
-
ns: DECK_PLUGIN
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
icon: "ph--x--regular"
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
const closeOthers = {
|
|
72
|
-
id: `${LayoutAction.Close._tag}/others`,
|
|
73
|
-
data: async () => {
|
|
74
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
75
|
-
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
76
|
-
const attended = attention.current.at(-1);
|
|
77
|
-
const ids = state.deck.active.filter((id) => id !== attended) ?? [];
|
|
78
|
-
await dispatch(createIntent(LayoutAction.Close, {
|
|
79
|
-
part: "main",
|
|
80
|
-
subject: ids,
|
|
81
|
-
options: {
|
|
82
|
-
state: false
|
|
83
|
-
}
|
|
84
|
-
}));
|
|
85
|
-
},
|
|
86
|
-
properties: {
|
|
87
|
-
label: [
|
|
88
|
-
"close others label",
|
|
89
|
-
{
|
|
90
|
-
ns: DECK_PLUGIN
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
icon: "ph--x-square--regular"
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
const closeAll = {
|
|
97
|
-
id: `${LayoutAction.Close._tag}/all`,
|
|
98
|
-
data: async () => {
|
|
99
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
100
|
-
await dispatch(createIntent(LayoutAction.Close, {
|
|
101
|
-
part: "main",
|
|
102
|
-
subject: state.deck.active,
|
|
103
|
-
options: {
|
|
104
|
-
state: false
|
|
105
|
-
}
|
|
106
|
-
}));
|
|
107
|
-
},
|
|
108
|
-
properties: {
|
|
109
|
-
label: [
|
|
110
|
-
"close all label",
|
|
111
|
-
{
|
|
112
|
-
ns: DECK_PLUGIN
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
icon: "ph--x-circle--regular"
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const toggleSidebar = {
|
|
119
|
-
id: `${LayoutAction.UpdateSidebar._tag}/nav`,
|
|
120
|
-
data: async () => {
|
|
121
|
-
state.sidebarState = state.sidebarState === "expanded" ? "collapsed" : "expanded";
|
|
122
|
-
},
|
|
123
|
-
properties: {
|
|
124
|
-
label: [
|
|
125
|
-
get(rxFromSignal(() => state.sidebarState === "expanded" ? "collapse navigation sidebar label" : "open navigation sidebar label")),
|
|
126
|
-
{
|
|
127
|
-
ns: DECK_PLUGIN
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
icon: "ph--sidebar--regular",
|
|
131
|
-
keyBinding: {
|
|
132
|
-
macos: "meta+'"
|
|
133
|
-
},
|
|
134
|
-
disposition: "pin-end",
|
|
135
|
-
position: "hoist",
|
|
136
|
-
l0Breakpoint: "lg"
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
return get(rxFromSignal(() => !state.deck.solo ? [
|
|
140
|
-
closeCurrent,
|
|
141
|
-
closeOthers,
|
|
142
|
-
closeAll,
|
|
143
|
-
toggleSidebar
|
|
144
|
-
] : [
|
|
145
|
-
toggleSidebar
|
|
146
|
-
]));
|
|
147
|
-
}), Option.getOrElse(() => [])))
|
|
148
|
-
}));
|
|
149
|
-
export {
|
|
150
|
-
app_graph_builder_default as default
|
|
151
|
-
};
|
|
152
|
-
//# sourceMappingURL=app-graph-builder-JTFSDT2I.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, contributes, createIntent, LayoutAction, type PluginContext } from '@dxos/app-framework';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { createExtension, ROOT_ID, rxFromSignal } from '@dxos/plugin-graph';\n\nimport { DeckCapabilities } from './capabilities';\nimport { DECK_PLUGIN } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: DECK_PLUGIN,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const state = context.getCapability(DeckCapabilities.MutableDeckState);\n\n // NOTE(Zan): This is currently disabled.\n // TODO(Zan): Fullscreen needs to know the active node and provide that to the layout part.\n const _fullscreen = {\n id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }),\n );\n },\n properties: {\n label: ['toggle fullscreen label', { ns: DECK_PLUGIN }],\n icon: 'ph--arrows-out--regular',\n keyBinding: {\n macos: 'ctrl+meta+f',\n windows: 'shift+ctrl+f',\n },\n },\n };\n\n const closeCurrent = {\n id: `${LayoutAction.Close._tag}/current`,\n data: async () => {\n const attention = context.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n if (attended) {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: [attended],\n options: { state: false },\n }),\n );\n }\n },\n properties: {\n label: ['close current label', { ns: DECK_PLUGIN }],\n icon: 'ph--x--regular',\n },\n };\n\n const closeOthers = {\n id: `${LayoutAction.Close._tag}/others`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const attention = context.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n const ids = state.deck.active.filter((id) => id !== attended) ?? [];\n await dispatch(\n createIntent(LayoutAction.Close, { part: 'main', subject: ids, options: { state: false } }),\n );\n },\n properties: {\n label: ['close others label', { ns: DECK_PLUGIN }],\n icon: 'ph--x-square--regular',\n },\n };\n\n const closeAll = {\n id: `${LayoutAction.Close._tag}/all`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: state.deck.active,\n options: { state: false },\n }),\n );\n },\n properties: {\n label: ['close all label', { ns: DECK_PLUGIN }],\n icon: 'ph--x-circle--regular',\n },\n };\n\n const toggleSidebar = {\n id: `${LayoutAction.UpdateSidebar._tag}/nav`,\n data: async () => {\n state.sidebarState = state.sidebarState === 'expanded' ? 'collapsed' : 'expanded';\n },\n properties: {\n label: [\n get(\n rxFromSignal(() =>\n state.sidebarState === 'expanded'\n ? 'collapse navigation sidebar label'\n : 'open navigation sidebar label',\n ),\n ),\n { ns: DECK_PLUGIN },\n ],\n icon: 'ph--sidebar--regular',\n keyBinding: {\n macos: \"meta+'\",\n },\n disposition: 'pin-end',\n position: 'hoist',\n l0Breakpoint: 'lg',\n },\n };\n\n return get(\n rxFromSignal(() =>\n !state.deck.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar],\n ),\n );\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAcC,aAAaC,cAAcC,oBAAwC;AAC1F,SAASC,6BAA6B;AACtC,SAASC,iBAAiBC,SAASC,oBAAoB;AAKvD,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,SAAS,CAACC,SACRC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAOU,UAAUF,OAAOG,KAAKR,KAAAA,IAAQK,OAAOI,KAAI,CAAA,GAC/EJ,OAAOK,IAAI,MAAA;AACT,UAAMC,QAAQnB,QAAQoB,cAAcC,iBAAiBC,gBAAgB;AAIrE,UAAMC,cAAc;MAClBlB,IAAI,GAAGmB,aAAaC,aAAaC,IAAI;MACrCC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAK7B,QAAQoB,cAAclB,aAAa4B,gBAAgB;AACzF,cAAMD,SACJE,aAAaP,aAAaQ,eAAe;UAAEC,MAAM;UAAQC,SAAS;YAAEC,MAAM;UAAa;QAAE,CAAA,CAAA;MAE7F;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B;YAAEC,IAAIhC;UAAY;;QACrDiC,MAAM;QACNC,YAAY;UACVC,OAAO;UACPC,SAAS;QACX;MACF;IACF;AAEA,UAAMC,eAAe;MACnBtC,IAAI,GAAGmB,aAAaoB,MAAMlB,IAAI;MAC9BC,MAAM,YAAA;AACJ,cAAMkB,YAAY7C,QAAQoB,cAAc0B,sBAAsBC,SAAS;AACvE,cAAMC,WAAWH,UAAUI,QAAQC,GAAG,EAAC;AACvC,YAAIF,UAAU;AACZ,gBAAM,EAAEpB,iBAAiBC,SAAQ,IAAK7B,QAAQoB,cAAclB,aAAa4B,gBAAgB;AACzF,gBAAMD,SACJE,aAAaP,aAAaoB,OAAO;YAC/BX,MAAM;YACNkB,SAAS;cAACH;;YACVd,SAAS;cAAEf,OAAO;YAAM;UAC1B,CAAA,CAAA;QAEJ;MACF;MACAiB,YAAY;QACVC,OAAO;UAAC;UAAuB;YAAEC,IAAIhC;UAAY;;QACjDiC,MAAM;MACR;IACF;AAEA,UAAMa,cAAc;MAClB/C,IAAI,GAAGmB,aAAaoB,MAAMlB,IAAI;MAC9BC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAK7B,QAAQoB,cAAclB,aAAa4B,gBAAgB;AACzF,cAAMe,YAAY7C,QAAQoB,cAAc0B,sBAAsBC,SAAS;AACvE,cAAMC,WAAWH,UAAUI,QAAQC,GAAG,EAAC;AACvC,cAAMG,MAAMlC,MAAMmC,KAAKC,OAAOC,OAAO,CAACnD,OAAOA,OAAO2C,QAAAA,KAAa,CAAA;AACjE,cAAMnB,SACJE,aAAaP,aAAaoB,OAAO;UAAEX,MAAM;UAAQkB,SAASE;UAAKnB,SAAS;YAAEf,OAAO;UAAM;QAAE,CAAA,CAAA;MAE7F;MACAiB,YAAY;QACVC,OAAO;UAAC;UAAsB;YAAEC,IAAIhC;UAAY;;QAChDiC,MAAM;MACR;IACF;AAEA,UAAMkB,WAAW;MACfpD,IAAI,GAAGmB,aAAaoB,MAAMlB,IAAI;MAC9BC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAK7B,QAAQoB,cAAclB,aAAa4B,gBAAgB;AACzF,cAAMD,SACJE,aAAaP,aAAaoB,OAAO;UAC/BX,MAAM;UACNkB,SAAShC,MAAMmC,KAAKC;UACpBrB,SAAS;YAAEf,OAAO;UAAM;QAC1B,CAAA,CAAA;MAEJ;MACAiB,YAAY;QACVC,OAAO;UAAC;UAAmB;YAAEC,IAAIhC;UAAY;;QAC7CiC,MAAM;MACR;IACF;AAEA,UAAMmB,gBAAgB;MACpBrD,IAAI,GAAGmB,aAAamC,cAAcjC,IAAI;MACtCC,MAAM,YAAA;AACJR,cAAMyC,eAAezC,MAAMyC,iBAAiB,aAAa,cAAc;MACzE;MACAxB,YAAY;QACVC,OAAO;UACL1B,IACEkD,aAAa,MACX1C,MAAMyC,iBAAiB,aACnB,sCACA,+BAAA,CAAA;UAGR;YAAEtB,IAAIhC;UAAY;;QAEpBiC,MAAM;QACNC,YAAY;UACVC,OAAO;QACT;QACAqB,aAAa;QACbC,UAAU;QACVC,cAAc;MAChB;IACF;AAEA,WAAOrD,IACLkD,aAAa,MACX,CAAC1C,MAAMmC,KAAKW,OAAO;MAACtB;MAAcS;MAAaK;MAAUC;QAAiB;MAACA;KAAc,CAAA;EAG/F,CAAA,GACA7C,OAAOqD,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;AAGjC,CAAA,CAAA;",
|
|
6
|
-
"names": ["Rx", "Option", "pipe", "Capabilities", "contributes", "createIntent", "LayoutAction", "AttentionCapabilities", "createExtension", "ROOT_ID", "rxFromSignal", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "DECK_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "ROOT_ID", "some", "none", "map", "state", "getCapability", "DeckCapabilities", "MutableDeckState", "_fullscreen", "LayoutAction", "UpdateLayout", "_tag", "data", "dispatchPromise", "dispatch", "IntentDispatcher", "createIntent", "SetLayoutMode", "part", "options", "mode", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "closeCurrent", "Close", "attention", "AttentionCapabilities", "Attention", "attended", "current", "at", "subject", "closeOthers", "ids", "deck", "active", "filter", "closeAll", "toggleSidebar", "UpdateSidebar", "sidebarState", "rxFromSignal", "disposition", "position", "l0Breakpoint", "solo", "getOrElse"]
|
|
7
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DECK_PLUGIN
|
|
3
|
-
} from "./chunk-Z5KITAZW.mjs";
|
|
4
|
-
|
|
5
|
-
// src/capabilities/check-app-scheme.ts
|
|
6
|
-
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
7
|
-
var isSocket = !!globalThis.__args;
|
|
8
|
-
var appScheme = "composer://";
|
|
9
|
-
var checkAppScheme = (url) => {
|
|
10
|
-
const iframe = document.createElement("iframe");
|
|
11
|
-
iframe.style.display = "none";
|
|
12
|
-
document.body.appendChild(iframe);
|
|
13
|
-
iframe.src = url + window.location.pathname.replace(/^\/+/, "") + window.location.search;
|
|
14
|
-
const timer = setTimeout(() => {
|
|
15
|
-
document.body.removeChild(iframe);
|
|
16
|
-
}, 3e3);
|
|
17
|
-
window.addEventListener("pagehide", (event) => {
|
|
18
|
-
clearTimeout(timer);
|
|
19
|
-
document.body.removeChild(iframe);
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var check_app_scheme_default = async (context) => {
|
|
23
|
-
const settings = context.getCapability(Capabilities.SettingsStore).getStore(DECK_PLUGIN)?.value;
|
|
24
|
-
if (!isSocket && settings?.enableNativeRedirect) {
|
|
25
|
-
checkAppScheme(appScheme);
|
|
26
|
-
}
|
|
27
|
-
return contributes(Capabilities.Null, null);
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
check_app_scheme_default as default
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=check-app-scheme-57U62A3A.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/check-app-scheme.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';\n\nimport { DECK_PLUGIN } from '../meta';\nimport { type DeckSettingsProps } from '../types';\n\nconst isSocket = !!(globalThis as any).__args;\n\n// TODO(mjamesderocher): Can we get this directly from Socket?\nconst appScheme = 'composer://';\n\n// TODO(mjamesderocher): Factor out as part of NavigationPlugin.\nconst checkAppScheme = (url: string) => {\n const iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n iframe.src = url + window.location.pathname.replace(/^\\/+/, '') + window.location.search;\n\n const timer = setTimeout(() => {\n document.body.removeChild(iframe);\n }, 3000);\n\n window.addEventListener('pagehide', (event) => {\n clearTimeout(timer);\n document.body.removeChild(iframe);\n });\n};\n\nexport default async (context: PluginContext) => {\n const settings = context.getCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(DECK_PLUGIN)?.value;\n if (!isSocket && settings?.enableNativeRedirect) {\n checkAppScheme(appScheme);\n }\n\n return contributes(Capabilities.Null, null);\n};\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAcC,mBAAuC;AAK9D,IAAMC,WAAW,CAAC,CAAEC,WAAmBC;AAGvC,IAAMC,YAAY;AAGlB,IAAMC,iBAAiB,CAACC,QAAAA;AACtB,QAAMC,SAASC,SAASC,cAAc,QAAA;AACtCF,SAAOG,MAAMC,UAAU;AACvBH,WAASI,KAAKC,YAAYN,MAAAA;AAE1BA,SAAOO,MAAMR,MAAMS,OAAOC,SAASC,SAASC,QAAQ,QAAQ,EAAA,IAAMH,OAAOC,SAASG;AAElF,QAAMC,QAAQC,WAAW,MAAA;AACvBb,aAASI,KAAKU,YAAYf,MAAAA;EAC5B,GAAG,GAAA;AAEHQ,SAAOQ,iBAAiB,YAAY,CAACC,UAAAA;AACnCC,iBAAaL,KAAAA;AACbZ,aAASI,KAAKU,YAAYf,MAAAA;EAC5B,CAAA;AACF;AAEA,IAAA,2BAAe,OAAOmB,YAAAA;AACpB,QAAMC,WAAWD,QAAQE,cAAcC,aAAaC,aAAa,EAAEC,SAA4BC,WAAAA,GAAcC;AAC7G,MAAI,CAAChC,YAAY0B,UAAUO,sBAAsB;AAC/C7B,mBAAeD,SAAAA;EACjB;AAEA,SAAO+B,YAAYN,aAAaO,MAAM,IAAA;AACxC;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "isSocket", "globalThis", "__args", "appScheme", "checkAppScheme", "url", "iframe", "document", "createElement", "style", "display", "body", "appendChild", "src", "window", "location", "pathname", "replace", "search", "timer", "setTimeout", "removeChild", "addEventListener", "event", "clearTimeout", "context", "settings", "getCapability", "Capabilities", "SettingsStore", "getStore", "DECK_PLUGIN", "value", "enableNativeRedirect", "contributes", "Null"]
|
|
7
|
-
}
|