@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
|
@@ -5,21 +5,17 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { errorText, mx } from '@dxos/react-ui-theme';
|
|
9
8
|
|
|
10
|
-
import {
|
|
9
|
+
import { meta } from '../../meta';
|
|
11
10
|
|
|
12
11
|
export const Fallback = () => {
|
|
13
|
-
const { t } = useTranslation(
|
|
12
|
+
const { t } = useTranslation(meta.id);
|
|
14
13
|
|
|
15
14
|
return (
|
|
16
|
-
<div role='none' className='min-
|
|
15
|
+
<div role='none' className='min-h-screen w-full flex items-center justify-center p-8'>
|
|
17
16
|
<p
|
|
18
17
|
role='alert'
|
|
19
|
-
className=
|
|
20
|
-
errorText,
|
|
21
|
-
'border border-error-400/50 rounded-md flex items-center justify-center p-8 font-normal text-lg',
|
|
22
|
-
)}
|
|
18
|
+
className='flex items-center justify-center p-8 font-normal text-lg text-error-text border border-rose-fill rounded-md'
|
|
23
19
|
>
|
|
24
20
|
{t('plugin error message')}
|
|
25
21
|
</p>
|
|
@@ -3,12 +3,25 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { createContext } from '@radix-ui/react-context';
|
|
6
|
-
import
|
|
6
|
+
import * as Function from 'effect/Function';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
import React, { type PropsWithChildren, useCallback, useEffect, useRef, useState } from 'react';
|
|
7
9
|
|
|
8
|
-
import { Surface
|
|
9
|
-
import {
|
|
10
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
11
|
+
import { useObjectMenuItems } from '@dxos/app-toolkit/ui';
|
|
12
|
+
import { Annotation, Obj } from '@dxos/echo';
|
|
13
|
+
import {
|
|
14
|
+
Card,
|
|
15
|
+
Popover,
|
|
16
|
+
type PopoverContentInteractOutsideEvent,
|
|
17
|
+
toLocalizedString,
|
|
18
|
+
Toolbar,
|
|
19
|
+
useTranslation,
|
|
20
|
+
} from '@dxos/react-ui';
|
|
21
|
+
import { Menu } from '@dxos/react-ui-menu';
|
|
10
22
|
|
|
11
|
-
import {
|
|
23
|
+
import { useDeckState } from '../../hooks';
|
|
24
|
+
import { meta } from '../../meta';
|
|
12
25
|
|
|
13
26
|
export type DeckPopoverRootProps = PropsWithChildren<{}>;
|
|
14
27
|
|
|
@@ -21,32 +34,32 @@ type DeckPopoverContextValue = {
|
|
|
21
34
|
const [DeckPopoverProvider, useDeckPopoverContext] = createContext<DeckPopoverContextValue>('DeckPopover');
|
|
22
35
|
|
|
23
36
|
export const PopoverRoot = ({ children }: DeckPopoverRootProps) => {
|
|
24
|
-
const
|
|
37
|
+
const { state } = useDeckState();
|
|
25
38
|
const virtualRef = useRef<HTMLButtonElement | null>(null);
|
|
26
39
|
const [virtualIter, setVirtualIter] = useState(0);
|
|
27
40
|
const [open, setOpen] = useState(false);
|
|
28
41
|
const debounceRef = useRef<NodeJS.Timeout | null>(null);
|
|
29
42
|
|
|
30
43
|
// TODO(thure): This is a workaround for the race condition between displaying a Popover and either rendering
|
|
31
|
-
// the anchor further down the tree or measuring the virtual trigger
|
|
44
|
+
// the anchor further down the tree or measuring the virtual trigger's client rect.
|
|
32
45
|
useEffect(() => {
|
|
33
46
|
setOpen(false);
|
|
34
|
-
if (
|
|
47
|
+
if (state.popoverOpen) {
|
|
35
48
|
if (debounceRef.current) {
|
|
36
49
|
clearTimeout(debounceRef.current);
|
|
37
50
|
}
|
|
38
|
-
if (
|
|
39
|
-
virtualRef.current =
|
|
51
|
+
if (state.popoverAnchor && virtualRef.current !== state.popoverAnchor) {
|
|
52
|
+
virtualRef.current = state.popoverAnchor ?? null;
|
|
40
53
|
setVirtualIter((iter) => iter + 1);
|
|
41
54
|
}
|
|
42
55
|
debounceRef.current = setTimeout(() => setOpen(true), DEBOUNCE_DELAY);
|
|
43
56
|
}
|
|
44
|
-
}, [
|
|
57
|
+
}, [state.popoverOpen, state.popoverAnchorId, state.popoverAnchor, state.popoverContent]);
|
|
45
58
|
|
|
46
59
|
return (
|
|
47
60
|
<DeckPopoverProvider setOpen={setOpen}>
|
|
48
61
|
<Popover.Root modal={false} open={open}>
|
|
49
|
-
{
|
|
62
|
+
{state.popoverAnchor && <Popover.VirtualTrigger key={virtualIter} virtualRef={virtualRef} />}
|
|
50
63
|
{children}
|
|
51
64
|
</Popover.Root>
|
|
52
65
|
</DeckPopoverProvider>
|
|
@@ -54,10 +67,33 @@ export const PopoverRoot = ({ children }: DeckPopoverRootProps) => {
|
|
|
54
67
|
};
|
|
55
68
|
|
|
56
69
|
export const PopoverContent = () => {
|
|
57
|
-
const
|
|
70
|
+
const { t } = useTranslation(meta.id);
|
|
71
|
+
const { state, updateEphemeral } = useDeckState();
|
|
58
72
|
const { setOpen } = useDeckPopoverContext('PopoverContent');
|
|
73
|
+
const popoverSubject = state.popoverContent?.subject;
|
|
74
|
+
const isObjectPopover = Obj.isObject(popoverSubject);
|
|
75
|
+
const objectMenuItems = useObjectMenuItems(popoverSubject);
|
|
76
|
+
const icon = isObjectPopover
|
|
77
|
+
? Function.pipe(
|
|
78
|
+
Obj.getSchema(popoverSubject),
|
|
79
|
+
Option.fromNullable,
|
|
80
|
+
Option.flatMap(Annotation.IconAnnotation.get),
|
|
81
|
+
Option.map(({ icon }) => icon),
|
|
82
|
+
Option.getOrElse(() => 'ph--placeholder--regular'),
|
|
83
|
+
)
|
|
84
|
+
: undefined;
|
|
85
|
+
const handleClose = useCallback(() => {
|
|
86
|
+
setOpen(false);
|
|
87
|
+
updateEphemeral((state) => ({
|
|
88
|
+
...state,
|
|
89
|
+
popoverOpen: false,
|
|
90
|
+
popoverAnchor: undefined,
|
|
91
|
+
popoverAnchorId: undefined,
|
|
92
|
+
popoverSide: undefined,
|
|
93
|
+
}));
|
|
94
|
+
}, [updateEphemeral]);
|
|
59
95
|
|
|
60
|
-
const
|
|
96
|
+
const handleInteractOutside = useCallback(
|
|
61
97
|
(event: KeyboardEvent | PopoverContentInteractOutsideEvent) => {
|
|
62
98
|
if (
|
|
63
99
|
// TODO(thure): CodeMirror should not focus itself when it updates.
|
|
@@ -66,36 +102,44 @@ export const PopoverContent = () => {
|
|
|
66
102
|
) {
|
|
67
103
|
event.preventDefault();
|
|
68
104
|
} else {
|
|
69
|
-
|
|
70
|
-
layout.popoverOpen = false;
|
|
71
|
-
layout.popoverAnchor = undefined;
|
|
72
|
-
layout.popoverAnchorId = undefined;
|
|
73
|
-
layout.popoverSide = undefined;
|
|
105
|
+
handleClose();
|
|
74
106
|
}
|
|
75
107
|
},
|
|
76
|
-
[
|
|
108
|
+
[handleClose],
|
|
77
109
|
);
|
|
78
110
|
|
|
79
|
-
const collisionBoundaries: HTMLElement[] = useMemo(() => {
|
|
80
|
-
const closest = layout.popoverAnchor?.closest('[data-popover-collision-boundary]') as
|
|
81
|
-
| HTMLElement
|
|
82
|
-
| null
|
|
83
|
-
| undefined;
|
|
84
|
-
return closest ? [closest] : [];
|
|
85
|
-
}, [layout.popoverAnchor]);
|
|
86
|
-
|
|
87
111
|
return (
|
|
88
112
|
<Popover.Portal>
|
|
89
113
|
<Popover.Content
|
|
90
|
-
side={
|
|
91
|
-
onInteractOutside={handleClose}
|
|
92
|
-
onEscapeKeyDown={handleClose}
|
|
93
|
-
collisionBoundary={collisionBoundaries}
|
|
114
|
+
side={state.popoverSide}
|
|
94
115
|
sticky='always'
|
|
95
116
|
hideWhenDetached
|
|
117
|
+
onInteractOutside={handleInteractOutside}
|
|
118
|
+
onEscapeKeyDown={handleInteractOutside}
|
|
96
119
|
>
|
|
97
120
|
<Popover.Viewport>
|
|
98
|
-
|
|
121
|
+
{/* TODO(burdon): Set/disable column context. */}
|
|
122
|
+
{state.popoverKind === 'base' && <Surface.Surface role='popover' data={state.popoverContent} limit={1} />}
|
|
123
|
+
{state.popoverKind === 'card' && (
|
|
124
|
+
<Menu.Root>
|
|
125
|
+
<Card.Root border={false} classNames='dx-card-popover'>
|
|
126
|
+
<Card.Toolbar>
|
|
127
|
+
{icon ? <Card.Icon icon={icon} /> : <Card.IconBlock />}
|
|
128
|
+
{state.popoverTitle ? <Card.Title>{toLocalizedString(state.popoverTitle, t)}</Card.Title> : <span />}
|
|
129
|
+
<Menu.Trigger asChild disabled={!objectMenuItems.length}>
|
|
130
|
+
<Toolbar.IconButton
|
|
131
|
+
iconOnly
|
|
132
|
+
variant='ghost'
|
|
133
|
+
icon='ph--dots-three-vertical--regular'
|
|
134
|
+
label='Actions'
|
|
135
|
+
/>
|
|
136
|
+
</Menu.Trigger>
|
|
137
|
+
<Menu.Content items={objectMenuItems} />
|
|
138
|
+
</Card.Toolbar>
|
|
139
|
+
<Surface.Surface role='card--content' data={state.popoverContent} limit={1} />
|
|
140
|
+
</Card.Root>
|
|
141
|
+
</Menu.Root>
|
|
142
|
+
)}
|
|
99
143
|
</Popover.Viewport>
|
|
100
144
|
<Popover.Arrow />
|
|
101
145
|
</Popover.Content>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface } from '@dxos/app-framework';
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
import { useLandmarkMover } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
10
|
export const StatusBar = ({ showHints }: { showHints?: boolean }) => {
|
|
@@ -12,11 +12,11 @@ export const StatusBar = ({ showHints }: { showHints?: boolean }) => {
|
|
|
12
12
|
return (
|
|
13
13
|
<div
|
|
14
14
|
role='contentinfo'
|
|
15
|
-
className='fixed
|
|
15
|
+
className='fixed bottom-0 inset-x-0 h-(--dx-statusbar-size) border-y border-separator z-[2] flex text-description'
|
|
16
16
|
{...mover}
|
|
17
17
|
>
|
|
18
|
-
{showHints && <Surface role='hints' limit={1} />}
|
|
19
|
-
<Surface role='status-bar' limit={1} />
|
|
18
|
+
{showHints && <Surface.Surface role='hints' limit={1} />}
|
|
19
|
+
<Surface.Surface role='status-bar' limit={1} />
|
|
20
20
|
</div>
|
|
21
21
|
);
|
|
22
22
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type LayoutOperation } from '@dxos/app-toolkit';
|
|
8
8
|
import {
|
|
9
9
|
Button,
|
|
10
10
|
Icon,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useTranslation,
|
|
15
15
|
} from '@dxos/react-ui';
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { meta } from '../../meta';
|
|
18
18
|
|
|
19
19
|
// TODO(wittjosiah): Render remaining duration as a progress bar within the toast.
|
|
20
20
|
export const Toast = ({
|
|
@@ -28,14 +28,14 @@ export const Toast = ({
|
|
|
28
28
|
closeLabel,
|
|
29
29
|
onAction,
|
|
30
30
|
onOpenChange,
|
|
31
|
-
}:
|
|
32
|
-
const { t } = useTranslation(
|
|
31
|
+
}: LayoutOperation.Toast & Pick<ToastRootProps, 'onOpenChange'>) => {
|
|
32
|
+
const { t } = useTranslation(meta.id);
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
35
|
<NaturalToast.Root data-testid={id} defaultOpen duration={duration} onOpenChange={onOpenChange}>
|
|
36
36
|
<NaturalToast.Body>
|
|
37
37
|
<NaturalToast.Title classNames='items-center'>
|
|
38
|
-
{icon && <Icon icon={icon}
|
|
38
|
+
{icon && <Icon icon={icon} classNames='inline mr-1' />}
|
|
39
39
|
{title && <span>{toLocalizedString(title, t)}</span>}
|
|
40
40
|
</NaturalToast.Title>
|
|
41
41
|
{description && (
|
|
@@ -59,3 +59,28 @@ export const Toast = ({
|
|
|
59
59
|
</NaturalToast.Root>
|
|
60
60
|
);
|
|
61
61
|
};
|
|
62
|
+
|
|
63
|
+
export type ToasterProps = {
|
|
64
|
+
toasts?: LayoutOperation.Toast[];
|
|
65
|
+
onDismissToast?: (id: string) => void;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const Toaster = ({ toasts, onDismissToast }: ToasterProps) => {
|
|
69
|
+
return (
|
|
70
|
+
<>
|
|
71
|
+
{toasts?.map((toast) => (
|
|
72
|
+
<Toast
|
|
73
|
+
{...toast}
|
|
74
|
+
key={toast.id}
|
|
75
|
+
onOpenChange={(open: boolean) => {
|
|
76
|
+
if (!open) {
|
|
77
|
+
onDismissToast?.(toast.id);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return open;
|
|
81
|
+
}}
|
|
82
|
+
/>
|
|
83
|
+
))}
|
|
84
|
+
</>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
@@ -2,24 +2,33 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
|
-
import {
|
|
8
|
+
import { Capability, Plugin } from '@dxos/app-framework';
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
11
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
13
|
import { Stack } from '@dxos/react-ui-stack';
|
|
15
|
-
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
16
14
|
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
15
|
+
import { DeckState } from '../../capabilities';
|
|
16
|
+
import { meta as pluginMeta } from '../../meta';
|
|
19
17
|
import { translations } from '../../translations';
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
import { Plank } from './Plank';
|
|
20
|
+
|
|
21
|
+
const TestPlugin = Plugin.define(pluginMeta).pipe(
|
|
22
|
+
Plugin.addModule({
|
|
23
|
+
id: Capability.getModuleTag(DeckState),
|
|
24
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
25
|
+
activate: () => DeckState(),
|
|
26
|
+
}),
|
|
27
|
+
Plugin.make,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const meta = {
|
|
31
|
+
title: 'plugins/plugin-deck/components/Plank',
|
|
23
32
|
component: Plank,
|
|
24
33
|
render: (args) => {
|
|
25
34
|
return (
|
|
@@ -29,21 +38,21 @@ const meta: Meta<PlankProps> = {
|
|
|
29
38
|
);
|
|
30
39
|
},
|
|
31
40
|
decorators: [
|
|
41
|
+
withTheme(),
|
|
42
|
+
withLayout({ layout: 'fullscreen' }),
|
|
32
43
|
withPluginManager({
|
|
33
|
-
plugins: [
|
|
34
|
-
capabilities: () => DeckStateFactory(),
|
|
44
|
+
plugins: [...corePlugins(), TestPlugin()],
|
|
35
45
|
}),
|
|
36
|
-
withTheme,
|
|
37
|
-
withLayout({ fullscreen: true }),
|
|
38
46
|
],
|
|
39
47
|
parameters: {
|
|
48
|
+
layout: 'fullscreen',
|
|
40
49
|
translations,
|
|
41
50
|
},
|
|
42
|
-
}
|
|
51
|
+
} satisfies Meta<typeof Plank>;
|
|
43
52
|
|
|
44
53
|
export default meta;
|
|
45
54
|
|
|
46
|
-
type Story = StoryObj<
|
|
55
|
+
type Story = StoryObj<typeof meta>;
|
|
47
56
|
|
|
48
57
|
// TODO(burdon): Need to define surface provider?
|
|
49
58
|
export const Default: Story = {
|