@dxos/plugin-deck 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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/add-toast-3V7TYC2M.mjs +24 -0
- package/dist/lib/browser/add-toast-3V7TYC2M.mjs.map +7 -0
- package/dist/lib/browser/adjust-ZMPN7P7J.mjs +96 -0
- package/dist/lib/browser/adjust-ZMPN7P7J.mjs.map +7 -0
- package/dist/lib/browser/change-companion-F7GCREGM.mjs +34 -0
- package/dist/lib/browser/change-companion-F7GCREGM.mjs.map +7 -0
- package/dist/lib/browser/chunk-BRZAVPMC.mjs +48 -0
- package/dist/lib/browser/chunk-BRZAVPMC.mjs.map +7 -0
- package/dist/lib/browser/chunk-DF2VZ6W3.mjs +69 -0
- package/dist/lib/browser/chunk-DF2VZ6W3.mjs.map +7 -0
- package/dist/lib/browser/chunk-FUWSZ6IC.mjs +88 -0
- package/dist/lib/browser/chunk-FUWSZ6IC.mjs.map +7 -0
- package/dist/lib/browser/chunk-GN52IRQ7.mjs +216 -0
- package/dist/lib/browser/chunk-GN52IRQ7.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-KUTDCWZF.mjs +30 -0
- package/dist/lib/browser/chunk-KUTDCWZF.mjs.map +7 -0
- package/dist/lib/browser/close-N2F26CVG.mjs +44 -0
- package/dist/lib/browser/close-N2F26CVG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +164 -131
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-VWO7VOOU.mjs +150 -0
- package/dist/lib/browser/open-VWO7VOOU.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/revert-workspace-LGKZZKCI.mjs +21 -0
- package/dist/lib/browser/revert-workspace-LGKZZKCI.mjs.map +7 -0
- package/dist/lib/browser/scroll-into-view-TSVSNKIH.mjs +21 -0
- package/dist/lib/browser/scroll-into-view-TSVSNKIH.mjs.map +7 -0
- package/dist/lib/browser/set-N2LGA2BY.mjs +37 -0
- package/dist/lib/browser/set-N2LGA2BY.mjs.map +7 -0
- package/dist/lib/browser/set-layout-mode-TONTQO6G.mjs +90 -0
- package/dist/lib/browser/set-layout-mode-TONTQO6G.mjs.map +7 -0
- package/dist/lib/browser/show-undo-IFXNEIQY.mjs +59 -0
- package/dist/lib/browser/show-undo-IFXNEIQY.mjs.map +7 -0
- package/dist/lib/browser/switch-workspace-ZJDC5SSR.mjs +68 -0
- package/dist/lib/browser/switch-workspace-ZJDC5SSR.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +32 -0
- package/dist/lib/browser/update-complementary-ELUOK3GD.mjs +28 -0
- package/dist/lib/browser/update-complementary-ELUOK3GD.mjs.map +7 -0
- package/dist/lib/browser/update-dialog-LMGLOTWX.mjs +29 -0
- package/dist/lib/browser/update-dialog-LMGLOTWX.mjs.map +7 -0
- package/dist/lib/browser/update-plank-size-WQAPELII.mjs +28 -0
- package/dist/lib/browser/update-plank-size-WQAPELII.mjs.map +7 -0
- package/dist/lib/browser/update-popover-P6YO6FWJ.mjs +33 -0
- package/dist/lib/browser/update-popover-P6YO6FWJ.mjs.map +7 -0
- package/dist/lib/browser/update-sidebar-NGWS6IDJ.mjs +25 -0
- package/dist/lib/browser/update-sidebar-NGWS6IDJ.mjs.map +7 -0
- package/dist/lib/node-esm/add-toast-G4OQEGOS.mjs +25 -0
- package/dist/lib/node-esm/add-toast-G4OQEGOS.mjs.map +7 -0
- package/dist/lib/node-esm/adjust-KSNI7C3B.mjs +97 -0
- package/dist/lib/node-esm/adjust-KSNI7C3B.mjs.map +7 -0
- package/dist/lib/node-esm/change-companion-LCJPT6AX.mjs +35 -0
- package/dist/lib/node-esm/change-companion-LCJPT6AX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4ED7B7OZ.mjs +217 -0
- package/dist/lib/node-esm/chunk-4ED7B7OZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7KL65RLL.mjs +89 -0
- package/dist/lib/node-esm/chunk-7KL65RLL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-IRWCUYJY.mjs +71 -0
- package/dist/lib/node-esm/chunk-IRWCUYJY.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MB4SDDVY.mjs +50 -0
- package/dist/lib/node-esm/chunk-MB4SDDVY.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MLVJ2ODW.mjs +32 -0
- package/dist/lib/node-esm/chunk-MLVJ2ODW.mjs.map +7 -0
- package/dist/lib/node-esm/close-YHIBVE2S.mjs +45 -0
- package/dist/lib/node-esm/close-YHIBVE2S.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +164 -131
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/open-353DYMMN.mjs +151 -0
- package/dist/lib/node-esm/open-353DYMMN.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/revert-workspace-OS5R3PFJ.mjs +22 -0
- package/dist/lib/node-esm/revert-workspace-OS5R3PFJ.mjs.map +7 -0
- package/dist/lib/node-esm/scroll-into-view-LC2SVKCW.mjs +22 -0
- package/dist/lib/node-esm/scroll-into-view-LC2SVKCW.mjs.map +7 -0
- package/dist/lib/node-esm/set-3EZ7LJFU.mjs +38 -0
- package/dist/lib/node-esm/set-3EZ7LJFU.mjs.map +7 -0
- package/dist/lib/node-esm/set-layout-mode-3YBHGEK6.mjs +91 -0
- package/dist/lib/node-esm/set-layout-mode-3YBHGEK6.mjs.map +7 -0
- package/dist/lib/node-esm/show-undo-RAHLRPUU.mjs +60 -0
- package/dist/lib/node-esm/show-undo-RAHLRPUU.mjs.map +7 -0
- package/dist/lib/node-esm/switch-workspace-S6CXDPXZ.mjs +69 -0
- package/dist/lib/node-esm/switch-workspace-S6CXDPXZ.mjs.map +7 -0
- package/dist/lib/node-esm/{types.mjs → types/index.mjs} +13 -15
- package/dist/lib/node-esm/update-complementary-V5Y2RMYL.mjs +29 -0
- package/dist/lib/node-esm/update-complementary-V5Y2RMYL.mjs.map +7 -0
- package/dist/lib/node-esm/update-dialog-IMTCLAWR.mjs +30 -0
- package/dist/lib/node-esm/update-dialog-IMTCLAWR.mjs.map +7 -0
- package/dist/lib/node-esm/update-plank-size-I3DKCPHZ.mjs +29 -0
- package/dist/lib/node-esm/update-plank-size-I3DKCPHZ.mjs.map +7 -0
- package/dist/lib/node-esm/update-popover-7JX3KWYL.mjs +34 -0
- package/dist/lib/node-esm/update-popover-7JX3KWYL.mjs.map +7 -0
- package/dist/lib/node-esm/update-sidebar-B5DCSREP.mjs +26 -0
- package/dist/lib/node-esm/update-sidebar-B5DCSREP.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.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +17 -2
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +196 -12
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root.d.ts +4 -2
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +134 -44
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts +4 -3
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts +3 -2
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +4 -4
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts +71 -0
- package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DeckSettings/index.d.ts +1 -1
- package/dist/types/src/components/DeckSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/Matrix/Matrix.d.ts +41 -0
- package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -0
- package/dist/types/src/components/Matrix/Matrix.stories.d.ts +17 -0
- package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -0
- package/dist/types/src/components/Matrix/index.d.ts +3 -0
- package/dist/types/src/components/Matrix/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/Deck.d.ts +25 -0
- package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/Deck.stories.d.ts +71 -0
- package/dist/types/src/containers/Deck/Deck.stories.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/DeckContent.d.ts +7 -0
- package/dist/types/src/containers/Deck/DeckContent.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/DeckRoot.d.ts +42 -0
- package/dist/types/src/containers/Deck/DeckRoot.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/DeckViewport.d.ts +19 -0
- package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/index.d.ts +2 -0
- package/dist/types/src/containers/Deck/index.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/ActiveNode.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts +5 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +73 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/Dialog.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/Fallback.d.ts +2 -0
- package/dist/types/src/containers/DeckLayout/Fallback.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/Popover.d.ts +5 -0
- package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/Toast.d.ts +10 -0
- package/dist/types/src/containers/DeckLayout/Toast.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/constants.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/index.d.ts +4 -0
- package/dist/types/src/containers/DeckLayout/index.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/Plank.d.ts +17 -0
- package/dist/types/src/containers/Plank/Plank.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/Plank.stories.d.ts +71 -0
- package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/PlankComponent.d.ts +17 -0
- package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/PlankContent.d.ts +10 -0
- package/dist/types/src/containers/Plank/PlankContent.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Plank/PlankControls.d.ts +5 -6
- package/dist/types/src/containers/Plank/PlankControls.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/PlankError.d.ts +15 -0
- package/dist/types/src/containers/Plank/PlankError.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Plank/PlankHeading.d.ts +5 -4
- package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankRoot.d.ts +37 -0
- package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +1 -0
- package/dist/types/src/containers/Plank/index.d.ts +4 -0
- package/dist/types/src/containers/Plank/index.d.ts.map +1 -0
- package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -0
- package/dist/types/src/containers/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/types/src/containers/Sidebar/SidebarButton.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/Sidebar/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +6 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -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 +20 -9
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/layout.test.d.ts +2 -0
- package/dist/types/src/layout.test.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-toast.d.ts +5 -0
- package/dist/types/src/operations/add-toast.d.ts.map +1 -0
- package/dist/types/src/operations/adjust.d.ts +5 -0
- package/dist/types/src/operations/adjust.d.ts.map +1 -0
- package/dist/types/src/operations/change-companion.d.ts +5 -0
- package/dist/types/src/operations/change-companion.d.ts.map +1 -0
- package/dist/types/src/operations/close.d.ts +5 -0
- package/dist/types/src/operations/close.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +18 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/helpers.d.ts +3 -0
- package/dist/types/src/operations/helpers.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/revert-workspace.d.ts +5 -0
- package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
- package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
- package/dist/types/src/operations/set-layout-mode.d.ts +9 -0
- package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
- package/dist/types/src/operations/set.d.ts +5 -0
- package/dist/types/src/operations/set.d.ts.map +1 -0
- package/dist/types/src/operations/show-undo.d.ts +5 -0
- package/dist/types/src/operations/show-undo.d.ts.map +1 -0
- package/dist/types/src/operations/switch-workspace.d.ts +5 -0
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/update-complementary.d.ts +5 -0
- package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
- package/dist/types/src/operations/update-dialog.d.ts +5 -0
- package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
- package/dist/types/src/operations/update-plank-size.d.ts +5 -0
- package/dist/types/src/operations/update-plank-size.d.ts.map +1 -0
- package/dist/types/src/operations/update-popover.d.ts +5 -0
- package/dist/types/src/operations/update-popover.d.ts.map +1 -0
- package/dist/types/src/operations/update-sidebar.d.ts +5 -0
- package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +52 -52
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +11 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/{capabilities → types}/capabilities.d.ts +103 -96
- 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 +5 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +69 -58
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
- package/dist/types/src/util/plank-url-params.d.ts +14 -0
- package/dist/types/src/util/plank-url-params.d.ts.map +1 -0
- package/dist/types/src/util/plank-url-params.test.d.ts +2 -0
- package/dist/types/src/util/plank-url-params.test.d.ts.map +1 -0
- package/dist/types/src/util/sanitize-persisted-state.d.ts +19 -0
- package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -0
- package/dist/types/src/util/sanitize-persisted-state.test.d.ts +2 -0
- package/dist/types/src/util/sanitize-persisted-state.test.d.ts.map +1 -0
- package/dist/types/src/util/set-active.d.ts +19 -4
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/src/util/set-active.test.d.ts +2 -0
- package/dist/types/src/util/set-active.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +91 -49
- package/src/DeckPlugin.ts +43 -63
- package/src/capabilities/app-graph-builder.ts +113 -127
- package/src/capabilities/check-app-scheme.ts +123 -24
- package/src/capabilities/index.ts +13 -13
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-root.tsx +37 -28
- package/src/capabilities/react-surface.tsx +28 -22
- package/src/capabilities/settings.ts +30 -19
- package/src/capabilities/state.ts +74 -87
- package/src/capabilities/tools.ts +64 -54
- package/src/capabilities/url-handler.ts +221 -49
- package/src/components/DeckSettings/DeckSettings.stories.tsx +37 -0
- package/src/components/DeckSettings/DeckSettings.tsx +55 -70
- package/src/components/DeckSettings/index.ts +2 -2
- package/src/components/Matrix/Matrix.stories.tsx +216 -0
- package/src/components/Matrix/Matrix.tsx +205 -0
- package/src/components/Matrix/SPEC.md +219 -0
- package/src/components/Matrix/index.ts +6 -0
- package/src/components/index.ts +6 -3
- package/src/containers/Deck/Banner.tsx +41 -0
- package/src/containers/Deck/Deck.stories.tsx +81 -0
- package/src/containers/Deck/Deck.tsx +21 -0
- package/src/containers/Deck/DeckContent.tsx +105 -0
- package/src/containers/Deck/DeckRoot.tsx +50 -0
- package/src/containers/Deck/DeckViewport.tsx +456 -0
- package/src/{components/DeckLayout → containers/Deck}/StatusBar.tsx +4 -4
- package/src/containers/Deck/index.ts +5 -0
- package/src/{components → containers}/DeckLayout/ActiveNode.tsx +8 -3
- package/src/containers/DeckLayout/DeckLayout.stories.tsx +393 -0
- package/src/containers/DeckLayout/DeckLayout.tsx +62 -0
- package/src/containers/DeckLayout/Dialog.tsx +52 -0
- package/src/containers/DeckLayout/Fallback.tsx +24 -0
- package/src/containers/DeckLayout/Popover.tsx +161 -0
- package/src/{components → containers}/DeckLayout/Toast.tsx +30 -5
- package/src/{components → containers}/DeckLayout/constants.ts +1 -0
- package/src/{components → containers}/DeckLayout/index.ts +3 -2
- package/src/containers/Plank/Plank.stories.tsx +106 -0
- package/src/containers/Plank/Plank.tsx +22 -0
- package/src/containers/Plank/PlankComponent.tsx +217 -0
- package/src/containers/Plank/PlankContent.tsx +45 -0
- package/src/{components → containers}/Plank/PlankControls.tsx +45 -38
- package/src/containers/Plank/PlankError.tsx +79 -0
- package/src/{components → containers}/Plank/PlankHeading.tsx +70 -65
- package/src/{components → containers}/Plank/PlankLoading.tsx +1 -1
- package/src/containers/Plank/PlankRoot.tsx +49 -0
- package/src/{components → containers}/Plank/index.ts +0 -2
- package/src/containers/Sidebar/ComplementarySidebar.tsx +209 -0
- package/src/containers/Sidebar/Sidebar.tsx +44 -0
- package/src/containers/Sidebar/SidebarButton.tsx +94 -0
- package/src/containers/index.ts +11 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useCompanions.ts +3 -3
- package/src/hooks/useDeckCompanions.ts +8 -11
- package/src/hooks/useDeckState.ts +73 -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.test.ts +59 -0
- package/src/layout.ts +38 -40
- package/src/meta.ts +8 -5
- package/src/operations/add-toast.ts +24 -0
- package/src/operations/adjust.ts +83 -0
- package/src/operations/change-companion.ts +35 -0
- package/src/operations/close.ts +35 -0
- package/src/operations/definitions.ts +62 -0
- package/src/operations/helpers.ts +22 -0
- package/src/operations/index.ts +26 -0
- package/src/operations/open.ts +184 -0
- package/src/operations/revert-workspace.ts +22 -0
- package/src/operations/scroll-into-view.ts +24 -0
- package/src/operations/set-layout-mode.ts +84 -0
- package/src/operations/set.ts +36 -0
- package/src/operations/show-undo.ts +47 -0
- package/src/operations/switch-workspace.ts +60 -0
- package/src/operations/update-complementary.ts +33 -0
- package/src/operations/update-dialog.ts +34 -0
- package/src/operations/update-plank-size.ts +29 -0
- package/src/operations/update-popover.ts +36 -0
- package/src/operations/update-sidebar.ts +28 -0
- package/src/translations.ts +52 -52
- package/src/types/Settings.ts +17 -0
- package/src/types/capabilities.ts +35 -0
- package/src/types/events.ts +21 -0
- package/src/types/index.ts +8 -0
- package/src/{types.ts → types/schema.ts} +52 -52
- package/src/util/index.ts +2 -1
- package/src/util/layoutAppliesTopbar.ts +2 -2
- package/src/util/plank-url-params.test.ts +85 -0
- package/src/util/plank-url-params.ts +36 -0
- package/src/util/sanitize-persisted-state.test.ts +79 -0
- package/src/util/sanitize-persisted-state.ts +52 -0
- package/src/util/set-active.test.ts +106 -0
- package/src/util/set-active.ts +50 -30
- package/src/vite-env.d.ts +5 -0
- 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-7LJDT5OH.mjs +0 -127
- package/dist/lib/browser/chunk-7LJDT5OH.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-M57WD3V6.mjs +0 -16
- package/dist/lib/browser/chunk-M57WD3V6.mjs.map +0 -7
- package/dist/lib/browser/chunk-QBKDUEDV.mjs +0 -1494
- package/dist/lib/browser/chunk-QBKDUEDV.mjs.map +0 -7
- package/dist/lib/browser/chunk-QO3VIMKQ.mjs +0 -128
- package/dist/lib/browser/chunk-QO3VIMKQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-XL7EWOGI.mjs +0 -162
- package/dist/lib/browser/chunk-XL7EWOGI.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-6YMAE4SF.mjs +0 -521
- package/dist/lib/browser/intent-resolver-6YMAE4SF.mjs.map +0 -7
- package/dist/lib/browser/react-root-UVN2LMU3.mjs +0 -43
- package/dist/lib/browser/react-root-UVN2LMU3.mjs.map +0 -7
- package/dist/lib/browser/react-surface-WOLHGHMN.mjs +0 -40
- package/dist/lib/browser/react-surface-WOLHGHMN.mjs.map +0 -7
- package/dist/lib/browser/settings-L5CR5GTJ.mjs +0 -29
- package/dist/lib/browser/settings-L5CR5GTJ.mjs.map +0 -7
- package/dist/lib/browser/state-ZTYWMORZ.mjs +0 -10
- package/dist/lib/browser/tools-2YYFHQAS.mjs +0 -88
- package/dist/lib/browser/tools-2YYFHQAS.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -34
- package/dist/lib/browser/url-handler-KZW7GBA2.mjs +0 -70
- package/dist/lib/browser/url-handler-KZW7GBA2.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-YCSX45KJ.mjs +0 -153
- package/dist/lib/node-esm/app-graph-builder-YCSX45KJ.mjs.map +0 -7
- package/dist/lib/node-esm/check-app-scheme-3YZIA73T.mjs +0 -33
- package/dist/lib/node-esm/check-app-scheme-3YZIA73T.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ANLUUC3J.mjs +0 -129
- package/dist/lib/node-esm/chunk-ANLUUC3J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-F4YIQ5GG.mjs +0 -128
- package/dist/lib/node-esm/chunk-F4YIQ5GG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HHG6H2BX.mjs +0 -15
- package/dist/lib/node-esm/chunk-HHG6H2BX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KTPDAVNM.mjs +0 -17
- package/dist/lib/node-esm/chunk-KTPDAVNM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NMSUKHE3.mjs +0 -1495
- package/dist/lib/node-esm/chunk-NMSUKHE3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QFKYT4JK.mjs +0 -163
- package/dist/lib/node-esm/chunk-QFKYT4JK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UJGQAMF7.mjs +0 -147
- package/dist/lib/node-esm/chunk-UJGQAMF7.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-URTWBGD7.mjs +0 -522
- package/dist/lib/node-esm/intent-resolver-URTWBGD7.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-GFX4GOJT.mjs +0 -44
- package/dist/lib/node-esm/react-root-GFX4GOJT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-F6L5PLWK.mjs +0 -41
- package/dist/lib/node-esm/react-surface-F6L5PLWK.mjs.map +0 -7
- package/dist/lib/node-esm/settings-WE3TBMOC.mjs +0 -30
- package/dist/lib/node-esm/settings-WE3TBMOC.mjs.map +0 -7
- package/dist/lib/node-esm/state-DUK6WFDX.mjs +0 -11
- package/dist/lib/node-esm/tools-HH6NN7HB.mjs +0 -89
- package/dist/lib/node-esm/tools-HH6NN7HB.mjs.map +0 -7
- package/dist/lib/node-esm/url-handler-774BWWKI.mjs +0 -71
- package/dist/lib/node-esm/url-handler-774BWWKI.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +0 -3
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +0 -6
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Fallback.d.ts +0 -3
- package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts +0 -5
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +0 -5
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/Topbar.d.ts +0 -3
- package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/constants.d.ts.map +0 -1
- package/dist/types/src/components/DeckLayout/index.d.ts +0 -4
- package/dist/types/src/components/DeckLayout/index.d.ts.map +0 -1
- package/dist/types/src/components/Plank/Plank.d.ts +0 -27
- package/dist/types/src/components/Plank/Plank.d.ts.map +0 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +0 -8
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +0 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts.map +0 -1
- package/dist/types/src/components/Plank/PlankError.d.ts +0 -13
- package/dist/types/src/components/Plank/PlankError.d.ts.map +0 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +0 -1
- package/dist/types/src/components/Plank/index.d.ts +0 -6
- package/dist/types/src/components/Plank/index.d.ts.map +0 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +0 -1
- package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +0 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +0 -1
- package/dist/types/src/components/fragments.d.ts +0 -4
- package/dist/types/src/components/fragments.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/types.d.ts.map +0 -1
- package/dist/types/src/util/overscroll.d.ts +0 -47
- package/dist/types/src/util/overscroll.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/intent-resolver.ts +0 -468
- package/src/components/DeckLayout/Banner.tsx +0 -39
- package/src/components/DeckLayout/ContentEmpty.tsx +0 -31
- package/src/components/DeckLayout/DeckLayout.tsx +0 -301
- package/src/components/DeckLayout/Dialog.tsx +0 -36
- package/src/components/DeckLayout/Fallback.tsx +0 -28
- package/src/components/DeckLayout/Popover.tsx +0 -104
- package/src/components/DeckLayout/Topbar.tsx +0 -11
- package/src/components/Plank/Plank.stories.tsx +0 -55
- package/src/components/Plank/Plank.tsx +0 -266
- package/src/components/Plank/PlankError.tsx +0 -51
- package/src/components/Sidebar/ComplementarySidebar.tsx +0 -193
- package/src/components/Sidebar/Sidebar.tsx +0 -42
- package/src/components/Sidebar/SidebarButton.tsx +0 -87
- package/src/components/fragments.ts +0 -14
- package/src/events.ts +0 -11
- package/src/util/overscroll.ts +0 -69
- /package/dist/lib/browser/{state-ZTYWMORZ.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{state-DUK6WFDX.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/types/src/{components/DeckLayout → containers/Deck}/Banner.d.ts +0 -0
- /package/dist/types/src/{components/DeckLayout → containers/Deck}/StatusBar.d.ts +0 -0
- /package/dist/types/src/{components → containers}/DeckLayout/ActiveNode.d.ts +0 -0
- /package/dist/types/src/{components → containers}/DeckLayout/Dialog.d.ts +0 -0
- /package/dist/types/src/{components → containers}/DeckLayout/constants.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Sidebar/ComplementarySidebar.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Sidebar/Sidebar.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Sidebar/SidebarButton.d.ts +0 -0
- /package/dist/types/src/{components → containers}/Sidebar/index.d.ts +0 -0
- /package/src/{components → containers}/Sidebar/index.ts +0 -0
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React, { useMemo } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
11
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
12
|
+
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
13
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
14
|
+
import { random } from '@dxos/random';
|
|
15
|
+
import { Main } from '@dxos/react-ui';
|
|
16
|
+
import { StackContext } from '@dxos/react-ui-stack';
|
|
17
|
+
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
18
|
+
import { Loading } from '@dxos/react-ui/testing';
|
|
19
|
+
import { Organization } from '@dxos/types';
|
|
20
|
+
|
|
21
|
+
import { DeckSettings, DeckState } from '#capabilities';
|
|
22
|
+
import { meta as pluginMeta } from '#meta';
|
|
23
|
+
|
|
24
|
+
import { translations } from '../../translations';
|
|
25
|
+
import { Plank } from './Plank';
|
|
26
|
+
|
|
27
|
+
const TestPlugin = Plugin.define(pluginMeta).pipe(
|
|
28
|
+
Plugin.addModule({
|
|
29
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
30
|
+
activate: DeckSettings,
|
|
31
|
+
}),
|
|
32
|
+
Plugin.addModule({
|
|
33
|
+
id: Capability.getModuleTag(DeckState),
|
|
34
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
35
|
+
activate: () => DeckState(),
|
|
36
|
+
}),
|
|
37
|
+
Plugin.make,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
random.seed(101);
|
|
41
|
+
|
|
42
|
+
const storySurfaceExtension = Capability.contributes(
|
|
43
|
+
Capabilities.ReactSurface,
|
|
44
|
+
Surface.create({
|
|
45
|
+
id: 'story-article',
|
|
46
|
+
role: 'article',
|
|
47
|
+
component: ({ data }) => {
|
|
48
|
+
const subject = (data as any)?.subject;
|
|
49
|
+
if (!subject) {
|
|
50
|
+
return <Loading />;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<Json.Root data={subject}>
|
|
55
|
+
<Json.Content>
|
|
56
|
+
<Json.Data />
|
|
57
|
+
</Json.Content>
|
|
58
|
+
</Json.Root>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const DefaultStory = () => {
|
|
65
|
+
const { graph } = useAppGraph();
|
|
66
|
+
const item = useMemo(() => Organization.make({ name: random.company.name() }), []);
|
|
67
|
+
const node = useMemo(() => ({ id: item.id, data: item, type: 'test', properties: { label: item.name } }), [item]);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<Main.Root>
|
|
71
|
+
<Main.Content bounce handlesFocus classNames='grid' style={{ '--main-spacing': '0' } as any}>
|
|
72
|
+
<div role='none' className='relative overflow-hidden bg-deck-surface'>
|
|
73
|
+
<StackContext.Provider value={{ orientation: 'horizontal', size: 'contain', rail: true }}>
|
|
74
|
+
<Plank.Root graph={graph} part='solo' layoutMode='solo'>
|
|
75
|
+
<Plank.Content solo companion={false} encapsulate={false}>
|
|
76
|
+
<Plank.Component id={item.id} part='solo-primary' node={node as any} />
|
|
77
|
+
</Plank.Content>
|
|
78
|
+
</Plank.Root>
|
|
79
|
+
</StackContext.Provider>
|
|
80
|
+
</div>
|
|
81
|
+
</Main.Content>
|
|
82
|
+
</Main.Root>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const meta = {
|
|
87
|
+
title: 'plugins/plugin-deck/containers/Plank',
|
|
88
|
+
component: DefaultStory,
|
|
89
|
+
decorators: [
|
|
90
|
+
withPluginManager({
|
|
91
|
+
plugins: [...corePlugins(), TestPlugin()],
|
|
92
|
+
capabilities: [storySurfaceExtension],
|
|
93
|
+
setupEvents: [AppActivationEvents.SetupSettings],
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
parameters: {
|
|
97
|
+
layout: 'fullscreen',
|
|
98
|
+
translations,
|
|
99
|
+
},
|
|
100
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
101
|
+
|
|
102
|
+
export default meta;
|
|
103
|
+
|
|
104
|
+
type Story = StoryObj<typeof meta>;
|
|
105
|
+
|
|
106
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { PlankComponent, PlankComponentProps } from './PlankComponent';
|
|
6
|
+
import { PlankContent, PlankContentProps } from './PlankContent';
|
|
7
|
+
import { PlankControls } from './PlankControls';
|
|
8
|
+
import { PlankHeading } from './PlankHeading';
|
|
9
|
+
import { PlankRoot, PlankRootProps } from './PlankRoot';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Radix-style composite Plank component.
|
|
13
|
+
*/
|
|
14
|
+
export const Plank = {
|
|
15
|
+
Root: PlankRoot,
|
|
16
|
+
Content: PlankContent,
|
|
17
|
+
Component: PlankComponent,
|
|
18
|
+
Heading: PlankHeading,
|
|
19
|
+
Controls: PlankControls,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type { PlankRootProps, PlankComponentProps, PlankContentProps };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useFocusFinders } from '@fluentui/react-tabster';
|
|
6
|
+
import React, { type KeyboardEvent, memo, useCallback, useLayoutEffect, useMemo, useRef } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
9
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
|
+
import { debounce } from '@dxos/async';
|
|
11
|
+
import { type Node } from '@dxos/plugin-graph';
|
|
12
|
+
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
13
|
+
import { useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
14
|
+
import { StackItem, type StackItemSize, railGridHorizontal } from '@dxos/react-ui-stack';
|
|
15
|
+
import { mainIntrinsicSize, mx } from '@dxos/ui-theme';
|
|
16
|
+
|
|
17
|
+
import { useMainSize } from '#hooks';
|
|
18
|
+
import { PLANK_COMPANION_TYPE } from '#types';
|
|
19
|
+
|
|
20
|
+
import { PlankError, PlankErrorFallback } from './PlankError';
|
|
21
|
+
import { PlankHeading } from './PlankHeading';
|
|
22
|
+
import { PlankLoading } from './PlankLoading';
|
|
23
|
+
import { PlankRootProps, usePlankContext } from './PlankRoot';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* JS-based smooth scroll that won't be interrupted by MutationObserver or layout changes.
|
|
27
|
+
*/
|
|
28
|
+
const smoothScrollTo = (element: HTMLElement, target: number, duration: number) => {
|
|
29
|
+
const start = element.scrollLeft;
|
|
30
|
+
const distance = target - start;
|
|
31
|
+
const startTime = performance.now();
|
|
32
|
+
|
|
33
|
+
const step = (currentTime: number) => {
|
|
34
|
+
const elapsed = currentTime - startTime;
|
|
35
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
36
|
+
// Ease-out cubic.
|
|
37
|
+
const eased = 1 - Math.pow(1 - progress, 3);
|
|
38
|
+
element.scrollLeft = start + distance * eased;
|
|
39
|
+
if (progress < 1) {
|
|
40
|
+
requestAnimationFrame(step);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
requestAnimationFrame(step);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// NOTE: Calibrated to show PLANK + COMPANION on MBP 16" screen.
|
|
48
|
+
export const DEFAULT_SIZE = 48 satisfies StackItemSize;
|
|
49
|
+
export const DEFAULT_COMPANION_SIZE = 35 satisfies StackItemSize;
|
|
50
|
+
|
|
51
|
+
export type PlankComponentProps = Pick<PlankRootProps, 'part'> & {
|
|
52
|
+
id: string;
|
|
53
|
+
path?: string[];
|
|
54
|
+
order?: number;
|
|
55
|
+
active?: string[];
|
|
56
|
+
node?: Node.Node;
|
|
57
|
+
primary?: Node.Node;
|
|
58
|
+
companions?: Node.Node[];
|
|
59
|
+
companioned?: 'primary' | 'companion';
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const PlankComponent = memo(
|
|
63
|
+
({ part, id, path, order, active, node, primary, companions, companioned }: PlankComponentProps) => {
|
|
64
|
+
const { layoutMode, settings, popoverAnchorId, scrollIntoView, plankSizing, onResize, onScrollIntoView } =
|
|
65
|
+
usePlankContext('PlankComponent');
|
|
66
|
+
|
|
67
|
+
const canResize = layoutMode === 'multi';
|
|
68
|
+
const { findFirstFocusable } = useFocusFinders();
|
|
69
|
+
const isCompanion = companioned === 'companion';
|
|
70
|
+
const attentionAttrs = useAttentionAttributes(primary?.id ?? id);
|
|
71
|
+
const orderId = isCompanion ? primary?.id : id;
|
|
72
|
+
const index = orderId && active ? active.findIndex((entryId) => entryId === orderId) : -1;
|
|
73
|
+
const length = active?.length ?? 1;
|
|
74
|
+
const isOrdered = !!active && index >= 0;
|
|
75
|
+
const canIncrementStart = isOrdered && index > 0;
|
|
76
|
+
const canIncrementEnd = isOrdered && index < length - 1;
|
|
77
|
+
const rootElement = useRef<HTMLDivElement | null>(null);
|
|
78
|
+
const variant = node?.type === PLANK_COMPANION_TYPE ? getLinkedVariant(id) : undefined;
|
|
79
|
+
|
|
80
|
+
// Sizing.
|
|
81
|
+
const sizeAttrs = useMainSize();
|
|
82
|
+
const sizeKey = id.split('+')[0];
|
|
83
|
+
const size = isCompanion
|
|
84
|
+
? DEFAULT_COMPANION_SIZE
|
|
85
|
+
: ((plankSizing?.[sizeKey] as number | undefined) ?? DEFAULT_SIZE);
|
|
86
|
+
const handleSizeChange = useCallback(
|
|
87
|
+
debounce((nextSize: number) => {
|
|
88
|
+
const size = Math.round(nextSize);
|
|
89
|
+
onResize?.(sizeKey, size);
|
|
90
|
+
}, 200),
|
|
91
|
+
[sizeKey, onResize],
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
// TODO(thure): Tabster's focus group should handle moving focus to Main, but something is blocking it.
|
|
95
|
+
const handleKeyDown = useCallback((event: KeyboardEvent) => {
|
|
96
|
+
if (event.target === event.currentTarget) {
|
|
97
|
+
switch (event.key) {
|
|
98
|
+
case 'Escape':
|
|
99
|
+
rootElement.current?.closest('main')?.focus();
|
|
100
|
+
break;
|
|
101
|
+
case 'Enter':
|
|
102
|
+
rootElement.current && findFirstFocusable(rootElement.current)?.focus();
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, []);
|
|
107
|
+
|
|
108
|
+
useLayoutEffect(() => {
|
|
109
|
+
if (scrollIntoView === id && layoutMode === 'multi' && rootElement.current) {
|
|
110
|
+
const element = rootElement.current;
|
|
111
|
+
const scrollParent = element.closest('[style*="overflow"], .overflow-x-auto') as HTMLElement | null;
|
|
112
|
+
if (scrollParent) {
|
|
113
|
+
const elementRect = element.getBoundingClientRect();
|
|
114
|
+
const parentRect = scrollParent.getBoundingClientRect();
|
|
115
|
+
const targetScrollLeft = scrollParent.scrollLeft + (elementRect.left - parentRect.left);
|
|
116
|
+
|
|
117
|
+
smoothScrollTo(scrollParent, targetScrollLeft, 300);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
onScrollIntoView?.(undefined);
|
|
121
|
+
}
|
|
122
|
+
}, [id, scrollIntoView, layoutMode, onScrollIntoView]);
|
|
123
|
+
|
|
124
|
+
const isSolo = layoutMode.startsWith('solo') && part === 'solo';
|
|
125
|
+
const isAttendable =
|
|
126
|
+
(layoutMode.startsWith('solo') && part.startsWith('solo')) || (layoutMode === 'multi' && part === 'multi');
|
|
127
|
+
|
|
128
|
+
const data = useMemo<AppSurface.ArticleData | undefined>(
|
|
129
|
+
() =>
|
|
130
|
+
node && {
|
|
131
|
+
attendableId: id,
|
|
132
|
+
subject: node.data,
|
|
133
|
+
companionTo: primary?.data,
|
|
134
|
+
properties: node.properties,
|
|
135
|
+
variant,
|
|
136
|
+
path,
|
|
137
|
+
popoverAnchorId,
|
|
138
|
+
},
|
|
139
|
+
[node, node?.data, node?.properties, path, popoverAnchorId, primary?.data, variant],
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
// TODO(wittjosiah): Change prop to accept a component.
|
|
143
|
+
const placeholder = useMemo(() => <PlankLoading />, []);
|
|
144
|
+
|
|
145
|
+
const Root = part.startsWith('solo') ? 'article' : StackItem.Root;
|
|
146
|
+
const fullscreen = layoutMode === 'solo--fullscreen';
|
|
147
|
+
const classNames = [
|
|
148
|
+
'dx-attention-surface relative dx-focus-ring-inset-over-all dx-density-coarse',
|
|
149
|
+
isSolo && 'absolute inset-0',
|
|
150
|
+
isSolo && mainIntrinsicSize,
|
|
151
|
+
railGridHorizontal,
|
|
152
|
+
part.startsWith('solo') && 'grid',
|
|
153
|
+
part.startsWith('solo-') && 'grid-rows-subgrid row-span-2 min-w-0',
|
|
154
|
+
fullscreen && 'grid-rows-1',
|
|
155
|
+
part === 'multi' && (isCompanion ? 'border-separator! border-e' : 'border-separator! border-x'),
|
|
156
|
+
part === 'solo-companion' && 'border-separator! border-s',
|
|
157
|
+
settings?.encapsulatedPlanks &&
|
|
158
|
+
!part.startsWith('solo') &&
|
|
159
|
+
'mx-(--main-spacing) border-separator! border rounded-sm overflow-hidden',
|
|
160
|
+
];
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
<Root
|
|
164
|
+
ref={rootElement}
|
|
165
|
+
data-testid='deck.plank'
|
|
166
|
+
data-popover-collision-boundary={true}
|
|
167
|
+
tabIndex={0}
|
|
168
|
+
{...(part.startsWith('solo')
|
|
169
|
+
? ({
|
|
170
|
+
className: mx(classNames),
|
|
171
|
+
...sizeAttrs,
|
|
172
|
+
} as any)
|
|
173
|
+
: {
|
|
174
|
+
role: 'article',
|
|
175
|
+
item: { id },
|
|
176
|
+
classNames,
|
|
177
|
+
order,
|
|
178
|
+
size,
|
|
179
|
+
onSizeChange: handleSizeChange,
|
|
180
|
+
})}
|
|
181
|
+
{...(isAttendable ? attentionAttrs : {})}
|
|
182
|
+
onKeyDown={handleKeyDown}
|
|
183
|
+
>
|
|
184
|
+
{node ? (
|
|
185
|
+
<>
|
|
186
|
+
{!fullscreen && (
|
|
187
|
+
<PlankHeading
|
|
188
|
+
id={id}
|
|
189
|
+
part={part.startsWith('solo-') ? 'solo' : part}
|
|
190
|
+
node={node}
|
|
191
|
+
layoutMode={layoutMode}
|
|
192
|
+
deckEnabled={settings?.enableDeck}
|
|
193
|
+
canIncrementStart={canIncrementStart}
|
|
194
|
+
canIncrementEnd={canIncrementEnd}
|
|
195
|
+
popoverAnchorId={popoverAnchorId}
|
|
196
|
+
primaryId={primary?.id}
|
|
197
|
+
companioned={companioned}
|
|
198
|
+
companions={companions}
|
|
199
|
+
/>
|
|
200
|
+
)}
|
|
201
|
+
<Surface.Surface
|
|
202
|
+
key={node.id}
|
|
203
|
+
type={AppSurface.Article}
|
|
204
|
+
data={data}
|
|
205
|
+
limit={1}
|
|
206
|
+
fallback={PlankErrorFallback}
|
|
207
|
+
placeholder={placeholder}
|
|
208
|
+
/>
|
|
209
|
+
</>
|
|
210
|
+
) : (
|
|
211
|
+
<PlankError id={id} part={part} />
|
|
212
|
+
)}
|
|
213
|
+
{canResize && <StackItem.ResizeHandle />}
|
|
214
|
+
</Root>
|
|
215
|
+
);
|
|
216
|
+
},
|
|
217
|
+
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { type PropsWithChildren } from 'react';
|
|
6
|
+
|
|
7
|
+
import { railGridHorizontal } from '@dxos/react-ui-stack';
|
|
8
|
+
import { composable, composableProps, mainIntrinsicSize } from '@dxos/ui-theme';
|
|
9
|
+
|
|
10
|
+
import { useMainSize } from '#hooks';
|
|
11
|
+
|
|
12
|
+
export type PlankContentProps = PropsWithChildren<{
|
|
13
|
+
solo: boolean;
|
|
14
|
+
companion: boolean;
|
|
15
|
+
encapsulate: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
|
|
18
|
+
export const PlankContent = composable<HTMLDivElement, PlankContentProps>(
|
|
19
|
+
({ children, solo, companion, encapsulate, ...props }, forwardedRef) => {
|
|
20
|
+
const sizeAttrs = useMainSize();
|
|
21
|
+
if (!solo) {
|
|
22
|
+
return children;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
{...sizeAttrs}
|
|
28
|
+
{...composableProps(props, {
|
|
29
|
+
role: 'none',
|
|
30
|
+
classNames: [
|
|
31
|
+
'absolute inset-(--main-spacing) grid',
|
|
32
|
+
railGridHorizontal,
|
|
33
|
+
mainIntrinsicSize,
|
|
34
|
+
companion && 'grid-cols-[6fr_4fr]', // Ration of primary to companion.
|
|
35
|
+
encapsulate && 'border border-separator rounded-sm overflow-hidden',
|
|
36
|
+
],
|
|
37
|
+
})}
|
|
38
|
+
data-popover-collision-boundary={true}
|
|
39
|
+
ref={forwardedRef}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
);
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { forwardRef, useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { invariant } from '@dxos/invariant';
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
8
|
import { ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
9
|
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
import { DeckOperation } from '#operations';
|
|
12
|
+
import { type DeckAction, type LayoutMode } from '#types';
|
|
13
13
|
|
|
14
14
|
export type PlankControlHandler = (event: DeckAction.PartAdjustment) => void;
|
|
15
15
|
|
|
@@ -22,37 +22,27 @@ export type PlankCapabilities = {
|
|
|
22
22
|
companion?: boolean;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
close?: boolean | 'minify-start' | 'minify-end';
|
|
29
|
-
capabilities: PlankCapabilities;
|
|
30
|
-
layoutMode?: LayoutMode;
|
|
31
|
-
pin?: 'start' | 'end' | 'both';
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const PlankControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {
|
|
35
|
-
return <IconButton iconOnly label={label} icon={icon} size={5} variant='ghost' tooltipSide='bottom' {...props} />;
|
|
36
|
-
};
|
|
25
|
+
//
|
|
26
|
+
// Controls
|
|
27
|
+
//
|
|
37
28
|
|
|
38
|
-
const plankControlSpacing = '
|
|
29
|
+
const plankControlSpacing = 'px-2';
|
|
39
30
|
|
|
40
|
-
type
|
|
31
|
+
export type PlankCompanionControlsProps = {
|
|
41
32
|
primary?: string;
|
|
42
33
|
};
|
|
43
34
|
|
|
44
|
-
export const PlankCompanionControls = forwardRef<HTMLDivElement,
|
|
35
|
+
export const PlankCompanionControls = forwardRef<HTMLDivElement, PlankCompanionControlsProps>(
|
|
45
36
|
({ primary }, forwardedRef) => {
|
|
46
|
-
const { t } = useTranslation(
|
|
47
|
-
const {
|
|
37
|
+
const { t } = useTranslation(meta.id);
|
|
38
|
+
const { invokePromise } = useOperationInvoker();
|
|
48
39
|
const handleCloseCompanion = useCallback(() => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, []);
|
|
40
|
+
return invokePromise(DeckOperation.ChangeCompanion, { companion: null });
|
|
41
|
+
}, [invokePromise]);
|
|
52
42
|
return (
|
|
53
|
-
<div ref={forwardedRef} className='contents app-no-drag'>
|
|
43
|
+
<div ref={forwardedRef} className='contents dx-app-no-drag'>
|
|
54
44
|
<PlankControl
|
|
55
|
-
label={t('close
|
|
45
|
+
label={t('close-companion.label')}
|
|
56
46
|
variant='ghost'
|
|
57
47
|
icon='ph--x--regular'
|
|
58
48
|
onClick={handleCloseCompanion}
|
|
@@ -63,6 +53,23 @@ export const PlankCompanionControls = forwardRef<HTMLDivElement, PlankCompliment
|
|
|
63
53
|
},
|
|
64
54
|
);
|
|
65
55
|
|
|
56
|
+
const PlankControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {
|
|
57
|
+
return <IconButton label={label} icon={icon} iconOnly variant='ghost' tooltipSide='bottom' {...props} />;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
//
|
|
61
|
+
// PlankControls
|
|
62
|
+
//
|
|
63
|
+
|
|
64
|
+
export type PlankControlsProps = Omit<ButtonGroupProps, 'onClick'> & {
|
|
65
|
+
onClick?: PlankControlHandler;
|
|
66
|
+
variant?: 'hide-disabled' | 'default';
|
|
67
|
+
close?: boolean | 'minify-start' | 'minify-end';
|
|
68
|
+
capabilities: PlankCapabilities;
|
|
69
|
+
layoutMode?: LayoutMode;
|
|
70
|
+
pin?: 'start' | 'end' | 'both';
|
|
71
|
+
};
|
|
72
|
+
|
|
66
73
|
// TODO(wittjosiah): Duplicate of stack LayoutControls?
|
|
67
74
|
// Translations were to be duplicated between packages.
|
|
68
75
|
// NOTE(thure): Pinning & unpinning are disabled indefinitely.
|
|
@@ -71,21 +78,21 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
71
78
|
{ children, classNames, variant = 'default', capabilities, layoutMode, pin, close = false, onClick, ...props },
|
|
72
79
|
forwardedRef,
|
|
73
80
|
) => {
|
|
74
|
-
const { t } = useTranslation(
|
|
81
|
+
const { t } = useTranslation(meta.id);
|
|
75
82
|
const buttonClassNames =
|
|
76
83
|
variant === 'hide-disabled' ? `disabled:hidden ${plankControlSpacing}` : plankControlSpacing;
|
|
77
84
|
|
|
78
85
|
const layoutIsAnySolo = !!layoutMode?.startsWith('solo');
|
|
79
86
|
|
|
80
87
|
return (
|
|
81
|
-
<ButtonGroup {...props} classNames={['app-no-drag
|
|
88
|
+
<ButtonGroup {...props} classNames={['dx-app-no-drag opacity-100!', classNames]} ref={forwardedRef}>
|
|
82
89
|
{capabilities.deck ? (
|
|
83
90
|
<>
|
|
84
91
|
{capabilities.solo && (
|
|
85
92
|
<>
|
|
86
93
|
{layoutMode === 'solo' && (
|
|
87
94
|
<PlankControl
|
|
88
|
-
label={t('show
|
|
95
|
+
label={t('show-fullscreen-plank.label')}
|
|
89
96
|
classNames={buttonClassNames}
|
|
90
97
|
icon='ph--corners-out--regular'
|
|
91
98
|
onClick={() => onClick?.('solo--fullscreen')}
|
|
@@ -94,10 +101,10 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
94
101
|
<PlankControl
|
|
95
102
|
label={t(
|
|
96
103
|
layoutMode === 'solo--fullscreen'
|
|
97
|
-
? 'exit
|
|
104
|
+
? 'exit-fullscreen.label'
|
|
98
105
|
: layoutIsAnySolo
|
|
99
|
-
? 'show
|
|
100
|
-
: 'show
|
|
106
|
+
? 'show-deck-plank.label'
|
|
107
|
+
: 'show-solo-plank.label',
|
|
101
108
|
)}
|
|
102
109
|
classNames={buttonClassNames}
|
|
103
110
|
icon={
|
|
@@ -112,17 +119,17 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
112
119
|
</>
|
|
113
120
|
)}
|
|
114
121
|
|
|
115
|
-
{!layoutIsAnySolo && (
|
|
122
|
+
{!layoutIsAnySolo && layoutMode !== 'multi' && (
|
|
116
123
|
<>
|
|
117
124
|
<PlankControl
|
|
118
|
-
label={t('increment
|
|
125
|
+
label={t('increment-start.label')}
|
|
119
126
|
disabled={!capabilities.incrementStart}
|
|
120
127
|
classNames={buttonClassNames}
|
|
121
128
|
icon='ph--caret-left--regular'
|
|
122
129
|
onClick={() => onClick?.('increment-start')}
|
|
123
130
|
/>
|
|
124
131
|
<PlankControl
|
|
125
|
-
label={t('increment
|
|
132
|
+
label={t('increment-end.label')}
|
|
126
133
|
disabled={!capabilities.incrementEnd}
|
|
127
134
|
classNames={buttonClassNames}
|
|
128
135
|
icon='ph--caret-right--regular'
|
|
@@ -134,7 +141,7 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
134
141
|
) : (
|
|
135
142
|
capabilities.fullscreen && (
|
|
136
143
|
<PlankControl
|
|
137
|
-
label={t(layoutMode === 'solo--fullscreen' ? 'exit
|
|
144
|
+
label={t(layoutMode === 'solo--fullscreen' ? 'exit-fullscreen.label' : 'show-fullscreen-plank.label')}
|
|
138
145
|
classNames={buttonClassNames}
|
|
139
146
|
icon={layoutMode === 'solo--fullscreen' ? 'ph--corners-in--regular' : 'ph--corners-out--regular'}
|
|
140
147
|
onClick={() => onClick?.('solo--fullscreen')}
|
|
@@ -144,7 +151,7 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
144
151
|
|
|
145
152
|
{close && !layoutIsAnySolo && (
|
|
146
153
|
<PlankControl
|
|
147
|
-
label={t(`${typeof close === 'string' ? 'minify' : 'close'}
|
|
154
|
+
label={t(`${typeof close === 'string' ? 'minify' : 'close'}.label`)}
|
|
148
155
|
classNames={buttonClassNames}
|
|
149
156
|
data-testid='plankHeading.close'
|
|
150
157
|
icon={
|
|
@@ -160,7 +167,7 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
160
167
|
|
|
161
168
|
{capabilities.companion && (
|
|
162
169
|
<PlankControl
|
|
163
|
-
label={t('open
|
|
170
|
+
label={t('open-companion.label')}
|
|
164
171
|
classNames={buttonClassNames}
|
|
165
172
|
data-testid='plankHeading.companion'
|
|
166
173
|
icon='ph--square-split-horizontal--regular'
|