@dxos/plugin-deck 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
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/PLUGIN.mdl +3 -1
- package/dist/lib/neutral/{DeckLayout-VX2BP4Q2.mjs → DeckLayout-B3RUUV5P.mjs} +4 -3
- package/dist/lib/neutral/DeckLayout-B3RUUV5P.mjs.map +7 -0
- package/dist/lib/neutral/DeckPlugin.mjs +2 -6
- package/dist/lib/neutral/DeckPlugin.mjs.map +3 -3
- package/dist/lib/neutral/DeckSettings-Z7GMB7XJ.mjs +32 -0
- package/dist/lib/neutral/DeckSettings-Z7GMB7XJ.mjs.map +7 -0
- package/dist/lib/neutral/{add-toast-APKTCLIA.mjs → add-toast-BHNEH5UY.mjs} +2 -2
- package/dist/lib/neutral/{adjust-7CZI4GK3.mjs → adjust-MJB6UMRQ.mjs} +16 -10
- package/dist/lib/neutral/adjust-MJB6UMRQ.mjs.map +7 -0
- package/dist/lib/neutral/{app-graph-builder-6HTXRTU2.mjs → app-graph-builder-2F7P4IFQ.mjs} +4 -3
- package/dist/lib/neutral/app-graph-builder-2F7P4IFQ.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +5 -5
- package/dist/lib/neutral/chunk-FKGYHBUB.mjs +8 -0
- package/dist/lib/neutral/{chunk-CL7JIOI5.mjs → chunk-ICOJ4GMB.mjs} +10 -6
- package/dist/lib/neutral/chunk-ICOJ4GMB.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-NGX6RXNV.mjs → chunk-PP32NEVY.mjs} +2 -2
- package/dist/lib/neutral/chunk-PP32NEVY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SONATB35.mjs +20 -0
- package/dist/lib/neutral/chunk-SONATB35.mjs.map +7 -0
- package/dist/lib/neutral/chunk-Z2B5RSVI.mjs +1096 -0
- package/dist/lib/neutral/chunk-Z2B5RSVI.mjs.map +7 -0
- package/dist/lib/neutral/{close-KJUCFIJ5.mjs → close-2YGB5IIP.mjs} +4 -3
- package/dist/lib/neutral/{close-KJUCFIJ5.mjs.map → close-2YGB5IIP.mjs.map} +1 -1
- package/dist/lib/neutral/components/index.mjs +201 -16
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +6 -11
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/hooks/index.mjs +101 -17
- package/dist/lib/neutral/hooks/index.mjs.map +4 -4
- package/dist/lib/neutral/index.mjs +7 -1
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{notification-tracker-CUDFRDCF.mjs → notification-tracker-Y5CRTWJM.mjs} +4 -2
- package/dist/lib/neutral/notification-tracker-Y5CRTWJM.mjs.map +7 -0
- package/dist/lib/neutral/{open-VU7YS3HB.mjs → open-P6XQ56M7.mjs} +4 -3
- package/dist/lib/neutral/{open-VU7YS3HB.mjs.map → open-P6XQ56M7.mjs.map} +1 -1
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +1 -1
- package/dist/lib/neutral/{react-surface-O4POQWYL.mjs → react-surface-H63FXUK3.mjs} +2 -2
- package/dist/lib/neutral/{react-surface-O4POQWYL.mjs.map → react-surface-H63FXUK3.mjs.map} +1 -1
- package/dist/lib/neutral/{revert-workspace-24TKG3I7.mjs → revert-workspace-RXWP2TEE.mjs} +2 -2
- package/dist/lib/neutral/{scroll-into-view-3VXT6TWC.mjs → scroll-into-view-HFV5EGYZ.mjs} +2 -2
- package/dist/lib/neutral/{set-RFOLTI57.mjs → set-HOOVB7E4.mjs} +4 -3
- package/dist/lib/neutral/{set-RFOLTI57.mjs.map → set-HOOVB7E4.mjs.map} +1 -1
- package/dist/lib/neutral/{set-layout-mode-AZ73W52Z.mjs → set-layout-mode-XAGSZZGB.mjs} +2 -2
- package/dist/lib/neutral/{state-D3YXB5NP.mjs → state-F4X5GPGZ.mjs} +3 -2
- package/dist/lib/neutral/{state-D3YXB5NP.mjs.map → state-F4X5GPGZ.mjs.map} +1 -1
- package/dist/lib/neutral/{switch-workspace-TBPT23CZ.mjs → switch-workspace-PA7N6EUX.mjs} +2 -2
- package/dist/lib/neutral/translations.mjs +2 -2
- package/dist/lib/neutral/translations.mjs.map +2 -2
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/lib/neutral/{update-companion-5LCY6QME.mjs → update-companion-6A2SKQAI.mjs} +14 -6
- package/dist/lib/neutral/update-companion-6A2SKQAI.mjs.map +7 -0
- package/dist/lib/neutral/{update-complementary-HZ7QXZYE.mjs → update-complementary-K55I5EV5.mjs} +2 -2
- package/dist/lib/neutral/{update-dialog-A7W3R5EI.mjs → update-dialog-Z3GEXMVV.mjs} +2 -2
- package/dist/lib/neutral/{update-plank-size-XHTYBLSD.mjs → update-plank-size-BTESVV7N.mjs} +2 -2
- package/dist/lib/neutral/{update-popover-RDIHG73B.mjs → update-popover-QEVDSZSH.mjs} +2 -2
- package/dist/lib/neutral/{update-sidebar-GEI7USA5.mjs → update-sidebar-VSRCN47U.mjs} +2 -2
- package/dist/lib/neutral/{url-handler-PUS4X33T.mjs → url-handler-ERZXXEYR.mjs} +3 -2
- package/dist/lib/neutral/{url-handler-PUS4X33T.mjs.map → url-handler-ERZXXEYR.mjs.map} +1 -1
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/notification-tracker.d.ts +1 -1
- package/dist/types/src/capabilities/notification-tracker.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +1 -5
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -3
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -187
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts +1 -1
- package/dist/types/src/components/Companion/Companion.d.ts +17 -0
- package/dist/types/src/components/Companion/Companion.d.ts.map +1 -0
- package/dist/types/src/components/Companion/index.d.ts +2 -0
- package/dist/types/src/components/Companion/index.d.ts.map +1 -0
- package/dist/types/src/components/Matrix/Matrix.d.ts +1 -1
- package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -1
- package/dist/types/src/components/Matrix/Matrix.stories.d.ts +2 -2
- package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -1
- package/dist/types/src/components/Matrix/index.d.ts +1 -1
- package/dist/types/src/components/Matrix/index.d.ts.map +1 -1
- package/dist/types/src/components/Pane/Pane.d.ts +45 -0
- package/dist/types/src/components/Pane/Pane.d.ts.map +1 -0
- package/dist/types/src/components/Pane/Pane.stories.d.ts +7 -0
- package/dist/types/src/components/Pane/Pane.stories.d.ts.map +1 -0
- package/dist/types/src/components/Pane/index.d.ts +2 -0
- package/dist/types/src/components/Pane/index.d.ts.map +1 -0
- package/dist/types/src/components/Plank/Plank.d.ts +74 -0
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -0
- package/dist/types/src/components/Plank/Plank.stories.d.ts +6 -0
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -0
- package/dist/types/src/components/Plank/index.d.ts +2 -0
- package/dist/types/src/components/Plank/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/Deck.d.ts +1 -1
- package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/Deck.stories.d.ts +2 -2
- package/dist/types/src/containers/Deck/DeckPlank.d.ts +21 -0
- package/dist/types/src/containers/Deck/DeckPlank.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/DeckViewport.d.ts +3 -1
- package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -1
- package/dist/types/src/containers/{Plank → Deck}/PlankControls.d.ts +3 -10
- package/dist/types/src/containers/Deck/PlankControls.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/PlankFallback.d.ts +6 -0
- package/dist/types/src/containers/Deck/PlankFallback.d.ts.map +1 -0
- package/dist/types/src/containers/Deck/useDeckPlank.d.ts +49 -0
- package/dist/types/src/containers/Deck/useDeckPlank.d.ts.map +1 -0
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +2 -2
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.d.ts +1 -1
- package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.stories.d.ts +2 -2
- package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- 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/useCompanionSplit.d.ts +28 -0
- package/dist/types/src/hooks/useCompanionSplit.d.ts.map +1 -0
- package/dist/types/src/hooks/useCompanions.d.ts +11 -7
- package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts +2 -2
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckState.d.ts +1 -1
- package/dist/types/src/hooks/useDeckState.d.ts.map +1 -1
- package/dist/types/src/hooks/useSelectedCompanionVariant.d.ts +6 -0
- package/dist/types/src/hooks/useSelectedCompanionVariant.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/adjust.d.ts.map +1 -1
- package/dist/types/src/operations/update-companion.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/DeckCapabilities.d.ts +2 -2
- package/dist/types/src/types/DeckCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/DeckOperation.d.ts +2 -2
- package/dist/types/src/types/DeckOperation.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +7 -7
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util/companion-view-state.d.ts +16 -0
- package/dist/types/src/util/companion-view-state.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/plank-url-params.d.ts +2 -0
- package/dist/types/src/util/plank-url-params.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +49 -47
- package/src/DeckPlugin.ts +1 -2
- package/src/capabilities/app-graph-builder.ts +3 -2
- package/src/capabilities/notification-tracker.ts +3 -1
- package/src/capabilities/react-surface.tsx +1 -1
- package/src/components/Companion/Companion.tsx +91 -0
- package/src/components/Companion/index.ts +5 -0
- package/src/components/Matrix/Matrix.stories.tsx +13 -26
- package/src/components/Matrix/Matrix.tsx +3 -3
- package/src/components/Matrix/SPEC.md +1 -1
- package/src/components/Matrix/index.ts +1 -1
- package/src/components/Pane/Pane.stories.tsx +92 -0
- package/src/components/Pane/Pane.tsx +178 -0
- package/src/components/Pane/index.ts +5 -0
- package/src/components/Plank/Plank.stories.tsx +103 -0
- package/src/components/Plank/Plank.tsx +149 -0
- package/src/components/Plank/index.ts +5 -0
- package/src/components/index.ts +3 -4
- package/src/containers/Deck/Deck.tsx +3 -3
- package/src/containers/Deck/DeckPlank.tsx +187 -0
- package/src/containers/Deck/DeckViewport.tsx +116 -243
- package/src/containers/{Plank → Deck}/PlankControls.tsx +19 -17
- package/src/containers/Deck/PlankFallback.tsx +42 -0
- package/src/containers/Deck/useDeckPlank.ts +219 -0
- package/src/containers/DeckLayout/DeckLayout.stories.tsx +38 -51
- package/src/containers/DeckLayout/Dialog.tsx +1 -1
- package/src/{components → containers}/DeckSettings/DeckSettings.stories.tsx +1 -1
- package/src/containers/DeckSettings/DeckSettings.tsx +42 -0
- package/src/containers/Sidebar/ComplementarySidebar.tsx +2 -2
- package/src/containers/index.ts +1 -1
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useCompanionSplit.ts +78 -0
- package/src/hooks/useCompanions.ts +39 -7
- package/src/hooks/useDeckCompanions.ts +3 -3
- package/src/hooks/useDeckState.ts +1 -1
- package/src/hooks/useSelectedCompanionVariant.ts +14 -0
- package/src/index.ts +7 -0
- package/src/operations/adjust.ts +23 -12
- package/src/operations/update-companion.ts +10 -6
- package/src/translations.ts +2 -2
- package/src/types/DeckCapabilities.ts +1 -1
- package/src/types/DeckOperation.ts +2 -1
- package/src/types/schema.ts +5 -4
- package/src/util/companion-view-state.ts +28 -0
- package/src/util/index.ts +1 -0
- package/src/util/plank-url-params.test.ts +5 -0
- package/src/util/plank-url-params.ts +3 -1
- package/src/util/sanitize-persisted-state.test.ts +1 -1
- package/src/util/set-active.test.ts +1 -1
- package/dist/lib/neutral/DeckLayout-VX2BP4Q2.mjs.map +0 -7
- package/dist/lib/neutral/DeckSettings-CQQZJ2YS.mjs +0 -27
- package/dist/lib/neutral/DeckSettings-CQQZJ2YS.mjs.map +0 -7
- package/dist/lib/neutral/adjust-7CZI4GK3.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-6HTXRTU2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-CL7JIOI5.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DNG3L5QN.mjs +0 -1304
- package/dist/lib/neutral/chunk-DNG3L5QN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-NGX6RXNV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-UZLAR4DR.mjs +0 -8
- package/dist/lib/neutral/notification-tracker-CUDFRDCF.mjs.map +0 -7
- package/dist/lib/neutral/update-companion-5LCY6QME.mjs.map +0 -7
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
- package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/Plank.d.ts +0 -17
- package/dist/types/src/containers/Plank/Plank.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/Plank.stories.d.ts +0 -67
- package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/PlankComponent.d.ts +0 -17
- package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/PlankContent.d.ts +0 -10
- package/dist/types/src/containers/Plank/PlankContent.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/PlankControls.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/PlankError.d.ts +0 -15
- package/dist/types/src/containers/Plank/PlankError.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/PlankHeading.d.ts +0 -22
- package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/PlankLoading.d.ts +0 -3
- package/dist/types/src/containers/Plank/PlankLoading.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/PlankRoot.d.ts +0 -37
- package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +0 -1
- package/dist/types/src/containers/Plank/index.d.ts +0 -4
- package/dist/types/src/containers/Plank/index.d.ts.map +0 -1
- package/src/components/DeckSettings/DeckSettings.tsx +0 -34
- package/src/containers/Plank/Plank.stories.tsx +0 -108
- package/src/containers/Plank/Plank.tsx +0 -22
- package/src/containers/Plank/PlankComponent.tsx +0 -223
- package/src/containers/Plank/PlankContent.tsx +0 -45
- package/src/containers/Plank/PlankError.tsx +0 -82
- package/src/containers/Plank/PlankHeading.tsx +0 -236
- package/src/containers/Plank/PlankLoading.tsx +0 -10
- package/src/containers/Plank/PlankRoot.tsx +0 -49
- package/src/containers/Plank/index.ts +0 -7
- /package/dist/lib/neutral/{add-toast-APKTCLIA.mjs.map → add-toast-BHNEH5UY.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-UZLAR4DR.mjs.map → chunk-FKGYHBUB.mjs.map} +0 -0
- /package/dist/lib/neutral/{revert-workspace-24TKG3I7.mjs.map → revert-workspace-RXWP2TEE.mjs.map} +0 -0
- /package/dist/lib/neutral/{scroll-into-view-3VXT6TWC.mjs.map → scroll-into-view-HFV5EGYZ.mjs.map} +0 -0
- /package/dist/lib/neutral/{set-layout-mode-AZ73W52Z.mjs.map → set-layout-mode-XAGSZZGB.mjs.map} +0 -0
- /package/dist/lib/neutral/{switch-workspace-TBPT23CZ.mjs.map → switch-workspace-PA7N6EUX.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-complementary-HZ7QXZYE.mjs.map → update-complementary-K55I5EV5.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-dialog-A7W3R5EI.mjs.map → update-dialog-Z3GEXMVV.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-plank-size-XHTYBLSD.mjs.map → update-plank-size-BTESVV7N.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-popover-RDIHG73B.mjs.map → update-popover-QEVDSZSH.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-sidebar-GEI7USA5.mjs.map → update-sidebar-VSRCN47U.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/DeckSettings/index.d.ts +0 -0
- /package/src/{components → containers}/DeckSettings/index.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-deck",
|
|
3
|
-
"version": "0.9.1-
|
|
3
|
+
"version": "0.9.1-staging.ee54ba693a",
|
|
4
4
|
"description": "DXOS Surface plugin for the main application layout.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -94,62 +94,64 @@
|
|
|
94
94
|
"@effect-atom/atom-react": "^0.5.0",
|
|
95
95
|
"@fluentui/react-tabster": "9.26.11",
|
|
96
96
|
"@radix-ui/react-context": "1.1.1",
|
|
97
|
+
"@radix-ui/react-slot": "1.1.2",
|
|
97
98
|
"@tauri-apps/plugin-deep-link": "^2.4.9",
|
|
98
99
|
"immer": "^10.1.1",
|
|
99
|
-
"@dxos/app-
|
|
100
|
-
"@dxos/app-
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/plugin-
|
|
114
|
-
"@dxos/plugin-client": "0.9.1-
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/react-ui-
|
|
119
|
-
"@dxos/react-ui-
|
|
120
|
-
"@dxos/react-ui-
|
|
121
|
-
"@dxos/react-ui-
|
|
122
|
-
"@dxos/ui-
|
|
123
|
-
"@dxos/
|
|
124
|
-
"@dxos/
|
|
100
|
+
"@dxos/app-toolkit": "0.9.1-staging.ee54ba693a",
|
|
101
|
+
"@dxos/app-framework": "0.9.1-staging.ee54ba693a",
|
|
102
|
+
"@dxos/app-graph": "0.9.1-staging.ee54ba693a",
|
|
103
|
+
"@dxos/context": "0.9.1-staging.ee54ba693a",
|
|
104
|
+
"@dxos/async": "0.9.1-staging.ee54ba693a",
|
|
105
|
+
"@dxos/echo": "0.9.1-staging.ee54ba693a",
|
|
106
|
+
"@dxos/compute": "0.9.1-staging.ee54ba693a",
|
|
107
|
+
"@dxos/invariant": "0.9.1-staging.ee54ba693a",
|
|
108
|
+
"@dxos/errors": "0.9.1-staging.ee54ba693a",
|
|
109
|
+
"@dxos/effect": "0.9.1-staging.ee54ba693a",
|
|
110
|
+
"@dxos/keyboard": "0.9.1-staging.ee54ba693a",
|
|
111
|
+
"@dxos/operation": "0.9.1-staging.ee54ba693a",
|
|
112
|
+
"@dxos/log": "0.9.1-staging.ee54ba693a",
|
|
113
|
+
"@dxos/plugin-attention": "0.9.1-staging.ee54ba693a",
|
|
114
|
+
"@dxos/plugin-graph": "0.9.1-staging.ee54ba693a",
|
|
115
|
+
"@dxos/plugin-client": "0.9.1-staging.ee54ba693a",
|
|
116
|
+
"@dxos/keys": "0.9.1-staging.ee54ba693a",
|
|
117
|
+
"@dxos/plugin-observability": "0.9.1-staging.ee54ba693a",
|
|
118
|
+
"@dxos/react-ui-attention": "0.9.1-staging.ee54ba693a",
|
|
119
|
+
"@dxos/react-ui-dnd": "0.9.1-staging.ee54ba693a",
|
|
120
|
+
"@dxos/react-ui-form": "0.9.1-staging.ee54ba693a",
|
|
121
|
+
"@dxos/react-ui-list": "0.9.1-staging.ee54ba693a",
|
|
122
|
+
"@dxos/react-ui-mosaic": "0.9.1-staging.ee54ba693a",
|
|
123
|
+
"@dxos/react-ui-menu": "0.9.1-staging.ee54ba693a",
|
|
124
|
+
"@dxos/react-ui-tabs": "0.9.1-staging.ee54ba693a",
|
|
125
|
+
"@dxos/util": "0.9.1-staging.ee54ba693a",
|
|
126
|
+
"@dxos/ui-types": "0.9.1-staging.ee54ba693a"
|
|
125
127
|
},
|
|
126
128
|
"devDependencies": {
|
|
127
129
|
"@effect-atom/atom-react": "^0.5.0",
|
|
128
|
-
"@effect/platform": "0.96.
|
|
129
|
-
"@types/react": "~19.2.
|
|
130
|
+
"@effect/platform": "0.96.2",
|
|
131
|
+
"@types/react": "~19.2.17",
|
|
130
132
|
"@types/react-dom": "~19.2.3",
|
|
131
|
-
"effect": "3.21.
|
|
132
|
-
"react": "~19.2.
|
|
133
|
-
"react-dom": "~19.2.
|
|
133
|
+
"effect": "3.21.4",
|
|
134
|
+
"react": "~19.2.7",
|
|
135
|
+
"react-dom": "~19.2.7",
|
|
134
136
|
"vite": "^8.0.16",
|
|
135
|
-
"@dxos/plugin-testing": "0.9.1-
|
|
136
|
-
"@dxos/react-hooks": "0.9.1-
|
|
137
|
-
"@dxos/
|
|
138
|
-
"@dxos/
|
|
139
|
-
"@dxos/
|
|
140
|
-
"@dxos/
|
|
141
|
-
"@dxos/
|
|
142
|
-
"@dxos/
|
|
143
|
-
"@dxos/
|
|
137
|
+
"@dxos/plugin-testing": "0.9.1-staging.ee54ba693a",
|
|
138
|
+
"@dxos/react-hooks": "0.9.1-staging.ee54ba693a",
|
|
139
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a",
|
|
140
|
+
"@dxos/random": "0.9.1-staging.ee54ba693a",
|
|
141
|
+
"@dxos/react-ui-syntax-highlighter": "0.9.1-staging.ee54ba693a",
|
|
142
|
+
"@dxos/schema": "0.9.1-staging.ee54ba693a",
|
|
143
|
+
"@dxos/storybook-utils": "0.9.1-staging.ee54ba693a",
|
|
144
|
+
"@dxos/types": "0.9.1-staging.ee54ba693a",
|
|
145
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
|
|
144
146
|
},
|
|
145
147
|
"peerDependencies": {
|
|
146
148
|
"@effect-atom/atom-react": "^0.5.0",
|
|
147
|
-
"@effect/platform": "0.96.
|
|
148
|
-
"effect": "3.21.
|
|
149
|
-
"react": "~19.2.
|
|
150
|
-
"react-dom": "~19.2.
|
|
151
|
-
"@dxos/react-ui": "0.9.1-
|
|
152
|
-
"@dxos/ui-theme": "0.9.1-
|
|
149
|
+
"@effect/platform": "0.96.2",
|
|
150
|
+
"effect": "3.21.4",
|
|
151
|
+
"react": "~19.2.7",
|
|
152
|
+
"react-dom": "~19.2.7",
|
|
153
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a",
|
|
154
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
|
|
153
155
|
},
|
|
154
156
|
"publishConfig": {
|
|
155
157
|
"access": "public"
|
package/src/DeckPlugin.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { setAutoFreeze } from 'immer';
|
|
|
6
6
|
|
|
7
7
|
import { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
8
8
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import { translations as stackTranslations } from '@dxos/react-ui-stack/translations';
|
|
10
9
|
|
|
11
10
|
import {
|
|
12
11
|
AppGraphBuilder,
|
|
@@ -35,7 +34,7 @@ export const DeckPlugin = Plugin.define(meta).pipe(
|
|
|
35
34
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
36
35
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
37
36
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
38
|
-
AppPlugin.addTranslationsModule({ translations
|
|
37
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
39
38
|
Plugin.addModule({
|
|
40
39
|
activatesOn: AppActivationEvents.SetupSettings,
|
|
41
40
|
firesAfterActivation: [DeckEvents.SettingsReady],
|
|
@@ -9,6 +9,7 @@ import { AppCapabilities, AppNode, LayoutOperation } from '@dxos/app-toolkit';
|
|
|
9
9
|
import { Operation } from '@dxos/compute';
|
|
10
10
|
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
11
11
|
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
12
|
+
import { Position } from '@dxos/util';
|
|
12
13
|
|
|
13
14
|
import { meta } from '#meta';
|
|
14
15
|
import { DeckCapabilities } from '#types';
|
|
@@ -112,13 +113,13 @@ export default Capability.makeModule(
|
|
|
112
113
|
macos: "meta+'",
|
|
113
114
|
},
|
|
114
115
|
disposition: 'pin-end',
|
|
115
|
-
position:
|
|
116
|
+
position: Position.last,
|
|
116
117
|
l0Breakpoint: 'lg',
|
|
117
118
|
},
|
|
118
119
|
};
|
|
119
120
|
|
|
120
121
|
return !deck?.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar];
|
|
121
|
-
}),
|
|
122
|
+
}).pipe(Effect.orDie),
|
|
122
123
|
}),
|
|
123
124
|
]);
|
|
124
125
|
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import * as Fiber from 'effect/Fiber';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
7
8
|
import * as Stream from 'effect/Stream';
|
|
8
9
|
|
|
9
10
|
import { Capabilities, Capability, type PluginManager } from '@dxos/app-framework';
|
|
10
11
|
import { type LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';
|
|
11
12
|
import { Process } from '@dxos/compute';
|
|
13
|
+
import { Annotation } from '@dxos/echo';
|
|
12
14
|
|
|
13
15
|
import { meta } from '#meta';
|
|
14
16
|
import { DeckCapabilities } from '#types';
|
|
@@ -56,7 +58,7 @@ export default Capability.makeModule(
|
|
|
56
58
|
continue;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
const notify = process.params.
|
|
61
|
+
const notify = Option.getOrNull(Annotation.getDictionary(process.params.annotations, Process.NotifyAnnotation));
|
|
60
62
|
if (!notify) {
|
|
61
63
|
continue;
|
|
62
64
|
}
|
|
@@ -10,7 +10,7 @@ import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
|
10
10
|
import { NotFound } from '@dxos/app-toolkit';
|
|
11
11
|
import { AppSurface, NotFoundArticle } from '@dxos/app-toolkit/ui';
|
|
12
12
|
|
|
13
|
-
import { DeckSettings } from '#
|
|
13
|
+
import { DeckSettings } from '#containers';
|
|
14
14
|
import { meta } from '#meta';
|
|
15
15
|
import { type Settings } from '#types';
|
|
16
16
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { type ReactNode, useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
|
+
import { type Node } from '@dxos/plugin-graph';
|
|
10
|
+
import { type ThemedClassName, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
|
+
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
12
|
+
import { mx } from '@dxos/ui-theme';
|
|
13
|
+
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
|
|
16
|
+
import { Pane, type PaneTab } from '../Pane';
|
|
17
|
+
|
|
18
|
+
//
|
|
19
|
+
// Companion
|
|
20
|
+
//
|
|
21
|
+
// A higher-level companion pane bound to a set of companion {@link Node}s: a {@link Pane} whose toolbar
|
|
22
|
+
// holds the companion tab strip and whose body renders the companions' content Surfaces. All panels stay
|
|
23
|
+
// mounted (inactive hidden) so switching tabs preserves each companion's state. Shares attention with the
|
|
24
|
+
// primary plank via `attendableId`. Controls (e.g. close) are supplied by the container.
|
|
25
|
+
//
|
|
26
|
+
|
|
27
|
+
export type CompanionProps = ThemedClassName<{
|
|
28
|
+
companions: Node.Node[];
|
|
29
|
+
/** Selected companion id. */
|
|
30
|
+
value?: string;
|
|
31
|
+
onValueChange?: (id: string) => void;
|
|
32
|
+
/** Primary plank attendable id; the companion shares its attention. */
|
|
33
|
+
attendableId?: string;
|
|
34
|
+
/** Primary plank subject; companion Article surfaces filter on (and operate against) `companionTo`. */
|
|
35
|
+
companionTo?: unknown;
|
|
36
|
+
/** Toolbar controls rendered after the tabs (e.g. close). */
|
|
37
|
+
controls?: ReactNode;
|
|
38
|
+
}>;
|
|
39
|
+
|
|
40
|
+
export const Companion = ({
|
|
41
|
+
classNames,
|
|
42
|
+
companions,
|
|
43
|
+
value,
|
|
44
|
+
onValueChange,
|
|
45
|
+
attendableId,
|
|
46
|
+
companionTo,
|
|
47
|
+
controls,
|
|
48
|
+
}: CompanionProps) => {
|
|
49
|
+
const { t } = useTranslation(meta.profile.key);
|
|
50
|
+
|
|
51
|
+
// Fall back to the first companion when uncontrolled so a panel is always visible.
|
|
52
|
+
const selected = value ?? companions[0]?.id;
|
|
53
|
+
const tabs = useMemo<PaneTab[]>(
|
|
54
|
+
() =>
|
|
55
|
+
companions.map((node) => ({
|
|
56
|
+
id: node.id,
|
|
57
|
+
icon: node.properties?.icon ?? 'ph--circle-dashed--regular',
|
|
58
|
+
label: toLocalizedString(node.properties?.label ?? '', t),
|
|
59
|
+
})),
|
|
60
|
+
[companions, t],
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
// Stable per-companion data objects so companion article surfaces don't receive a new prop reference on
|
|
64
|
+
// every parent re-render (the same pattern as the inline data fix in Plank).
|
|
65
|
+
const companionDataList = useMemo(
|
|
66
|
+
() =>
|
|
67
|
+
companions.map((node) => ({
|
|
68
|
+
attendableId,
|
|
69
|
+
subject: node.data,
|
|
70
|
+
companionTo,
|
|
71
|
+
variant: getLinkedVariant(node.id),
|
|
72
|
+
properties: node.properties,
|
|
73
|
+
})),
|
|
74
|
+
[companions, attendableId, companionTo],
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Pane.Root classNames={classNames}>
|
|
79
|
+
<Pane.Toolbar>
|
|
80
|
+
<Pane.Tabs tabs={tabs} value={selected} onValueChange={onValueChange} attendableId={attendableId} related />
|
|
81
|
+
{controls}
|
|
82
|
+
</Pane.Toolbar>
|
|
83
|
+
{/* Panels stay mounted; the inactive ones are hidden so switching companions preserves their state. */}
|
|
84
|
+
{companions.map((node, index) => (
|
|
85
|
+
<Pane.Content key={node.id} classNames={mx(node.id !== selected && 'hidden')}>
|
|
86
|
+
<Surface.Surface type={AppSurface.Article} data={companionDataList[index]} limit={1} />
|
|
87
|
+
</Pane.Content>
|
|
88
|
+
))}
|
|
89
|
+
</Pane.Root>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
@@ -8,17 +8,16 @@ import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
|
8
8
|
import { Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { Surface } from '@dxos/app-framework/ui';
|
|
11
|
-
import { Graph } from '@dxos/app-graph';
|
|
12
11
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
13
12
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
14
13
|
import { Obj } from '@dxos/echo';
|
|
14
|
+
import { type Node } from '@dxos/plugin-graph';
|
|
15
15
|
import { corePlugins } from '@dxos/plugin-testing';
|
|
16
16
|
import { random } from '@dxos/random';
|
|
17
17
|
import { Focus, Panel, Toolbar } from '@dxos/react-ui';
|
|
18
18
|
import { useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
19
19
|
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
20
|
-
import { type MosaicTileProps
|
|
21
|
-
import { StackContext } from '@dxos/react-ui-stack';
|
|
20
|
+
import { Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';
|
|
22
21
|
import { Syntax } from '@dxos/react-ui-syntax-highlighter';
|
|
23
22
|
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
24
23
|
import { Text } from '@dxos/schema';
|
|
@@ -28,7 +27,7 @@ import { DeckState, OperationHandler } from '#capabilities';
|
|
|
28
27
|
import { meta as pluginMeta } from '#meta';
|
|
29
28
|
import { translations } from '#translations';
|
|
30
29
|
|
|
31
|
-
import { Plank } from '
|
|
30
|
+
import { Plank } from '../Plank';
|
|
32
31
|
import { Matrix, type MatrixController, type MatrixRootProps } from './Matrix';
|
|
33
32
|
|
|
34
33
|
random.seed(123);
|
|
@@ -75,29 +74,17 @@ const StoryTile = (props: MosaicTileProps<Obj.Any>) => {
|
|
|
75
74
|
};
|
|
76
75
|
|
|
77
76
|
/**
|
|
78
|
-
* Tile that
|
|
77
|
+
* Tile that renders a node-bound Plank (sigil/title + content Surface).
|
|
79
78
|
*/
|
|
80
79
|
const PlankTile = (props: MosaicTileProps<Obj.Any>) => {
|
|
81
|
-
const
|
|
80
|
+
const node = useMemo<Node.Node>(
|
|
81
|
+
() => ({ id: props.data.id, type: 'test', data: props.data, properties: { label: Obj.getLabel(props.data) } }),
|
|
82
|
+
[props.data],
|
|
83
|
+
);
|
|
82
84
|
return (
|
|
83
|
-
<
|
|
84
|
-
<Plank
|
|
85
|
-
|
|
86
|
-
<Plank.Content solo={false} companion={false} encapsulate={false}>
|
|
87
|
-
<Plank.Component
|
|
88
|
-
id={props.data.id}
|
|
89
|
-
part='multi'
|
|
90
|
-
node={{
|
|
91
|
-
id: props.data.id,
|
|
92
|
-
data: props.data,
|
|
93
|
-
type: 'test',
|
|
94
|
-
properties: {},
|
|
95
|
-
}}
|
|
96
|
-
/>
|
|
97
|
-
</Plank.Content>
|
|
98
|
-
</Mosaic.Tile>
|
|
99
|
-
</Plank.Root>
|
|
100
|
-
</StackContext.Provider>
|
|
85
|
+
<Mosaic.Tile {...props} classNames='w-full md:w-[50rem] shrink-0'>
|
|
86
|
+
<Plank node={node} />
|
|
87
|
+
</Mosaic.Tile>
|
|
101
88
|
);
|
|
102
89
|
};
|
|
103
90
|
|
|
@@ -124,9 +111,9 @@ const TestExtension = Capability.contributes(
|
|
|
124
111
|
}),
|
|
125
112
|
);
|
|
126
113
|
|
|
127
|
-
type
|
|
114
|
+
type StoryArgs = Pick<MatrixRootProps, 'Tile'>;
|
|
128
115
|
|
|
129
|
-
const DefaultStory = ({ Tile }:
|
|
116
|
+
const DefaultStory = ({ Tile }: StoryArgs) => {
|
|
130
117
|
const items = useMemo(
|
|
131
118
|
() => [
|
|
132
119
|
Organization.make({ name: random.company.name() }),
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import { useFocusFinders } from '@fluentui/react-tabster';
|
|
6
6
|
import { createContext } from '@radix-ui/react-context';
|
|
7
|
-
import React, {
|
|
7
|
+
import React, { type PropsWithChildren, forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
|
|
8
8
|
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { ScrollArea } from '@dxos/react-ui';
|
|
11
11
|
import { composable, composableProps } from '@dxos/react-ui';
|
|
12
12
|
import { useAttended } from '@dxos/react-ui-attention';
|
|
13
|
-
import { type MosaicStackTileComponent
|
|
13
|
+
import { Mosaic, type MosaicStackTileComponent } from '@dxos/react-ui-mosaic';
|
|
14
14
|
import { type ComposableProps } from '@dxos/ui-types';
|
|
15
15
|
|
|
16
16
|
//
|
|
@@ -202,4 +202,4 @@ export const Matrix = {
|
|
|
202
202
|
Viewport: MatrixViewport,
|
|
203
203
|
};
|
|
204
204
|
|
|
205
|
-
export type { MatrixController, MatrixRootProps,
|
|
205
|
+
export type { MatrixContentProps, MatrixController, MatrixRootProps, MatrixViewportProps };
|
|
@@ -98,7 +98,7 @@ IDs with a `~` prefix on the last segment (e.g., `root/obj/~settings`) mark the
|
|
|
98
98
|
- **DeckMain** ensures attention is initialized:
|
|
99
99
|
- On first render, focuses the first plank's button if nothing is attended.
|
|
100
100
|
- On mobile breakpoint: reads the currently attended ID to determine which plank to show in solo mode.
|
|
101
|
-
- **Keyboard** — `plugin-attention` syncs `Keyboard.singleton.setCurrentContext(id)` with the attended ID, so keyboard shortcuts apply to the attended plank.
|
|
101
|
+
- **Keyboard** — `plugin-attention` syncs `Keyboard.singleton.setCurrentContext(\`root/${id}\`)` with the attended ID, so keyboard shortcuts apply to the attended plank while inheriting root-level bindings.
|
|
102
102
|
|
|
103
103
|
### Attention vs Focus vs Matrix.current
|
|
104
104
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React, { useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Icon, IconButton } from '@dxos/react-ui';
|
|
9
|
+
import { useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
10
|
+
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
11
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
12
|
+
|
|
13
|
+
import { Pane, type PaneTab } from './Pane';
|
|
14
|
+
|
|
15
|
+
const TABS: PaneTab[] = [
|
|
16
|
+
{ id: 'notes', icon: 'ph--note--regular', label: 'Notes' },
|
|
17
|
+
{ id: 'chat', icon: 'ph--chat--regular', label: 'Chat' },
|
|
18
|
+
{ id: 'links', icon: 'ph--link--regular', label: 'Links' },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
// A self-contained main Pane that is its own attendable region (focusing it sets attention, which the
|
|
22
|
+
// sigil and title reflect via the accent color).
|
|
23
|
+
const MainPane = ({ id, label }: { id: string; label: string }) => {
|
|
24
|
+
const attentionAttrs = useAttentionAttributes(id);
|
|
25
|
+
return (
|
|
26
|
+
<Pane.Root tabIndex={0} classNames='flex-1' {...attentionAttrs}>
|
|
27
|
+
<Pane.Toolbar>
|
|
28
|
+
<Pane.Sigil attendableId={id}>
|
|
29
|
+
<Icon icon='ph--circle-dashed--regular' />
|
|
30
|
+
</Pane.Sigil>
|
|
31
|
+
<Pane.Title attendableId={id}>{label}</Pane.Title>
|
|
32
|
+
<IconButton iconOnly variant='ghost' icon='ph--arrows-out--regular' label='Fullscreen' />
|
|
33
|
+
<IconButton iconOnly variant='ghost' icon='ph--x--regular' label='Close' />
|
|
34
|
+
</Pane.Toolbar>
|
|
35
|
+
<Pane.Content classNames='grid place-items-center text-description'>
|
|
36
|
+
<span>{label} content</span>
|
|
37
|
+
</Pane.Content>
|
|
38
|
+
</Pane.Root>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// A presentational preview of the solo split: a main Pane beside a companion Pane (tabs + close).
|
|
43
|
+
const SplitStory = () => {
|
|
44
|
+
const [tab, setTab] = useState('notes');
|
|
45
|
+
const activeTab = TABS.find((entry) => entry.id === tab);
|
|
46
|
+
return (
|
|
47
|
+
<div className='w-full grid grid-cols-2 px-3 gap-3 bg-deck-surface'>
|
|
48
|
+
<MainPane id='plank-main' label='Main plank' />
|
|
49
|
+
<Pane.Root>
|
|
50
|
+
<Pane.Toolbar>
|
|
51
|
+
<Pane.Tabs tabs={TABS} value={tab} onValueChange={setTab} attendableId='plank-main' related />
|
|
52
|
+
<IconButton iconOnly variant='ghost' icon='ph--x--regular' label='Close companion' />
|
|
53
|
+
</Pane.Toolbar>
|
|
54
|
+
<Pane.Content classNames='grid place-items-center text-description'>
|
|
55
|
+
<span className='flex items-center gap-1'>
|
|
56
|
+
{activeTab && <Icon icon={activeTab.icon} />}
|
|
57
|
+
{tab}
|
|
58
|
+
</span>
|
|
59
|
+
</Pane.Content>
|
|
60
|
+
</Pane.Root>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Two main planks side by side; click either to move attention — only the attended plank's sigil and
|
|
66
|
+
// title take the accent color.
|
|
67
|
+
const TwoPanesStory = () => (
|
|
68
|
+
<div className='w-full flex h-full px-3 gap-3 bg-deck-surface'>
|
|
69
|
+
<MainPane id='plank-a' label='Pane A' />
|
|
70
|
+
<MainPane id='plank-b' label='Pane B' />
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const meta: Meta = {
|
|
75
|
+
title: 'plugins/plugin-deck/components/Pane',
|
|
76
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
77
|
+
parameters: { layout: 'fullscreen' },
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default meta;
|
|
81
|
+
|
|
82
|
+
type Story = StoryObj;
|
|
83
|
+
|
|
84
|
+
export const Default: Story = {
|
|
85
|
+
render: () => <SplitStory />,
|
|
86
|
+
decorators: [withAttention('plank-main')],
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const Attention: Story = {
|
|
90
|
+
render: () => <TwoPanesStory />,
|
|
91
|
+
decorators: [withAttention('plank-a')],
|
|
92
|
+
};
|