@dxos/plugin-deck 0.8.4-main.84f28bd → 0.8.4-main.ae835ea
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/{app-graph-builder-JTFSDT2I.mjs → app-graph-builder-PCMSER2O.mjs} +17 -16
- package/dist/lib/browser/app-graph-builder-PCMSER2O.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs → check-app-scheme-HIEVFAAX.mjs} +6 -6
- package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QO3VIMKQ.mjs → chunk-27I7DJUG.mjs} +10 -9
- package/dist/lib/browser/chunk-27I7DJUG.mjs.map +7 -0
- package/dist/lib/browser/chunk-5KMJPIQC.mjs +16 -0
- package/dist/lib/browser/chunk-5KMJPIQC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XL7EWOGI.mjs → chunk-F3VCCHVL.mjs} +13 -13
- package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7LJDT5OH.mjs → chunk-MFFZK4LT.mjs} +15 -15
- package/dist/lib/browser/chunk-MFFZK4LT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QBKDUEDV.mjs → chunk-SBJLGRJV.mjs} +535 -497
- package/dist/lib/browser/chunk-SBJLGRJV.mjs.map +7 -0
- package/dist/lib/browser/chunk-UXLU6CMW.mjs +16 -0
- package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +20 -14
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-6YMAE4SF.mjs → intent-resolver-Q3KETDSS.mjs} +21 -18
- package/dist/lib/browser/intent-resolver-Q3KETDSS.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-UVN2LMU3.mjs → react-root-LU3662ME.mjs} +11 -11
- package/dist/lib/browser/react-root-LU3662ME.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-WOLHGHMN.mjs → react-surface-TDBFPN5T.mjs} +13 -13
- package/dist/lib/browser/react-surface-TDBFPN5T.mjs.map +7 -0
- package/dist/lib/browser/{settings-L5CR5GTJ.mjs → settings-SDPTOCCM.mjs} +7 -6
- package/dist/lib/browser/{settings-L5CR5GTJ.mjs.map → settings-SDPTOCCM.mjs.map} +3 -3
- package/dist/lib/browser/state-QTVNH7N6.mjs +12 -0
- package/dist/lib/browser/toolkit-TM2Y6YL2.mjs +53 -0
- package/dist/lib/browser/toolkit-TM2Y6YL2.mjs.map +7 -0
- package/dist/lib/browser/{types.mjs → types/index.mjs} +3 -5
- package/dist/lib/browser/{url-handler-KZW7GBA2.mjs → url-handler-QEYGYE2H.mjs} +7 -7
- package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts +1 -1
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +9 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +2 -2
- 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 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +5 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +23 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools.d.ts +1 -1
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -3
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +74 -0
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts +3 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/Toast.d.ts +5 -0
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +86 -5
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +11 -11
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -44
- package/src/DeckPlugin.ts +64 -59
- package/src/capabilities/app-graph-builder.ts +13 -11
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/check-app-scheme.ts +3 -3
- package/src/capabilities/index.ts +2 -1
- package/src/capabilities/intent-resolver.ts +22 -18
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +5 -5
- package/src/capabilities/settings.ts +2 -1
- package/src/capabilities/state.ts +10 -6
- package/src/capabilities/toolkit.ts +68 -0
- package/src/capabilities/tools.ts +10 -7
- package/src/capabilities/url-handler.ts +3 -2
- package/src/components/DeckLayout/Banner.tsx +3 -3
- package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
- package/src/components/DeckLayout/DeckLayout.stories.tsx +64 -0
- package/src/components/DeckLayout/DeckLayout.tsx +10 -279
- package/src/components/DeckLayout/DeckMain.tsx +285 -0
- package/src/components/DeckLayout/Fallback.tsx +2 -2
- package/src/components/DeckLayout/Popover.tsx +1 -1
- package/src/components/DeckLayout/Toast.tsx +27 -2
- package/src/components/DeckSettings/DeckSettings.tsx +80 -65
- package/src/components/Plank/Plank.stories.tsx +10 -11
- package/src/components/Plank/Plank.tsx +34 -18
- package/src/components/Plank/PlankControls.tsx +3 -3
- package/src/components/Plank/PlankError.tsx +5 -7
- package/src/components/Plank/PlankHeading.tsx +12 -10
- package/src/components/Sidebar/ComplementarySidebar.tsx +9 -8
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/Sidebar/SidebarButton.tsx +6 -6
- package/src/events.ts +2 -2
- package/src/hooks/useDeckCompanions.ts +2 -2
- package/src/hooks/useHoistStatusbar.ts +4 -3
- package/src/hooks/useNodeActionExpander.ts +1 -1
- package/src/meta.ts +6 -3
- package/src/translations.ts +2 -0
- package/src/types/index.ts +5 -0
- package/src/{types.ts → types/schema.ts} +9 -9
- package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-57U62A3A.mjs.map +0 -7
- package/dist/lib/browser/chunk-7LJDT5OH.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.map +0 -7
- package/dist/lib/browser/chunk-QO3VIMKQ.mjs.map +0 -7
- 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.map +0 -7
- package/dist/lib/browser/react-root-UVN2LMU3.mjs.map +0 -7
- package/dist/lib/browser/react-surface-WOLHGHMN.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/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/index.mjs +0 -169
- package/dist/lib/node-esm/index.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/meta.json +0 -1
- 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/state-DUK6WFDX.mjs.map +0 -7
- 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/types.mjs +0 -35
- package/dist/lib/node-esm/types.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/types.d.ts.map +0 -1
- /package/dist/lib/browser/{state-ZTYWMORZ.mjs.map → state-QTVNH7N6.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-deck",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.ae835ea",
|
|
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",
|
|
@@ -10,19 +10,21 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs"
|
|
15
16
|
},
|
|
16
17
|
"./types": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
18
|
+
"source": "./src/types/index.ts",
|
|
19
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
20
|
+
"browser": "./dist/lib/browser/types/index.mjs"
|
|
19
21
|
}
|
|
20
22
|
},
|
|
21
23
|
"types": "dist/types/src/index.d.ts",
|
|
22
24
|
"typesVersions": {
|
|
23
25
|
"*": {
|
|
24
26
|
"types": [
|
|
25
|
-
"dist/types/src/types.d.ts"
|
|
27
|
+
"dist/types/src/types/index.d.ts"
|
|
26
28
|
]
|
|
27
29
|
}
|
|
28
30
|
},
|
|
@@ -31,57 +33,59 @@
|
|
|
31
33
|
"src"
|
|
32
34
|
],
|
|
33
35
|
"dependencies": {
|
|
36
|
+
"@effect/ai": "0.29.1",
|
|
37
|
+
"@effect/experimental": "0.56.0",
|
|
34
38
|
"@fluentui/react-tabster": "^9.24.2",
|
|
35
39
|
"@preact-signals/safe-react": "^0.9.0",
|
|
36
|
-
"@preact/signals-core": "^1.
|
|
40
|
+
"@preact/signals-core": "^1.12.1",
|
|
37
41
|
"@radix-ui/react-context": "1.1.1",
|
|
38
|
-
"effect": "3.16.13",
|
|
39
42
|
"immer": "^10.1.1",
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/echo-signals": "0.8.4-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/local-storage": "0.8.4-main.
|
|
52
|
-
"@dxos/log": "0.8.4-main.
|
|
53
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/plugin-
|
|
57
|
-
"@dxos/react-client": "0.8.4-main.
|
|
58
|
-
"@dxos/react-ui-attention": "0.8.4-main.
|
|
59
|
-
"@dxos/react-ui-
|
|
60
|
-
"@dxos/react-ui-
|
|
61
|
-
"@dxos/react-ui-tabs": "0.8.4-main.
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
43
|
+
"@dxos/ai": "0.8.4-main.ae835ea",
|
|
44
|
+
"@dxos/app-framework": "0.8.4-main.ae835ea",
|
|
45
|
+
"@dxos/async": "0.8.4-main.ae835ea",
|
|
46
|
+
"@dxos/debug": "0.8.4-main.ae835ea",
|
|
47
|
+
"@dxos/assistant": "0.8.4-main.ae835ea",
|
|
48
|
+
"@dxos/blueprints": "0.8.4-main.ae835ea",
|
|
49
|
+
"@dxos/echo": "0.8.4-main.ae835ea",
|
|
50
|
+
"@dxos/echo-signals": "0.8.4-main.ae835ea",
|
|
51
|
+
"@dxos/invariant": "0.8.4-main.ae835ea",
|
|
52
|
+
"@dxos/keyboard": "0.8.4-main.ae835ea",
|
|
53
|
+
"@dxos/live-object": "0.8.4-main.ae835ea",
|
|
54
|
+
"@dxos/local-storage": "0.8.4-main.ae835ea",
|
|
55
|
+
"@dxos/log": "0.8.4-main.ae835ea",
|
|
56
|
+
"@dxos/plugin-attention": "0.8.4-main.ae835ea",
|
|
57
|
+
"@dxos/plugin-observability": "0.8.4-main.ae835ea",
|
|
58
|
+
"@dxos/plugin-graph": "0.8.4-main.ae835ea",
|
|
59
|
+
"@dxos/plugin-theme": "0.8.4-main.ae835ea",
|
|
60
|
+
"@dxos/react-client": "0.8.4-main.ae835ea",
|
|
61
|
+
"@dxos/react-ui-attention": "0.8.4-main.ae835ea",
|
|
62
|
+
"@dxos/react-ui-form": "0.8.4-main.ae835ea",
|
|
63
|
+
"@dxos/react-ui-stack": "0.8.4-main.ae835ea",
|
|
64
|
+
"@dxos/react-ui-tabs": "0.8.4-main.ae835ea",
|
|
65
|
+
"@dxos/util": "0.8.4-main.ae835ea",
|
|
66
|
+
"@dxos/react-ui-text-tooltip": "0.8.4-main.ae835ea"
|
|
64
67
|
},
|
|
65
68
|
"devDependencies": {
|
|
66
|
-
"@effect-rx/rx-react": "0.
|
|
67
|
-
"@effect/platform": "0.
|
|
68
|
-
"@types/react": "~
|
|
69
|
-
"@types/react-dom": "~
|
|
70
|
-
"
|
|
71
|
-
"react
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
69
|
+
"@effect-rx/rx-react": "0.42.4",
|
|
70
|
+
"@effect/platform": "0.92.1",
|
|
71
|
+
"@types/react": "~19.2.2",
|
|
72
|
+
"@types/react-dom": "~19.2.2",
|
|
73
|
+
"effect": "3.18.3",
|
|
74
|
+
"react": "~19.2.0",
|
|
75
|
+
"react-dom": "~19.2.0",
|
|
76
|
+
"vite": "7.1.9",
|
|
77
|
+
"@dxos/react-ui": "0.8.4-main.ae835ea",
|
|
78
|
+
"@dxos/react-ui-theme": "0.8.4-main.ae835ea",
|
|
79
|
+
"@dxos/storybook-utils": "0.8.4-main.ae835ea"
|
|
76
80
|
},
|
|
77
81
|
"peerDependencies": {
|
|
78
82
|
"@effect-rx/rx-react": "^0.34.1",
|
|
79
83
|
"@effect/platform": "^0.80.12",
|
|
80
84
|
"effect": "^3.13.3",
|
|
81
|
-
"react": "
|
|
82
|
-
"react-dom": "
|
|
83
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
84
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
85
|
+
"react": "^19.0.0",
|
|
86
|
+
"react-dom": "^19.0.0",
|
|
87
|
+
"@dxos/react-ui": "0.8.4-main.ae835ea",
|
|
88
|
+
"@dxos/react-ui-theme": "0.8.4-main.ae835ea"
|
|
85
89
|
},
|
|
86
90
|
"publishConfig": {
|
|
87
91
|
"access": "public"
|
package/src/DeckPlugin.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { setAutoFreeze } from 'immer';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, Events, allOf, contributes, defineModule, definePlugin, oneOf } from '@dxos/app-framework';
|
|
8
8
|
import { translations as stackTranslations } from '@dxos/react-ui-stack';
|
|
9
9
|
|
|
10
10
|
import {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
LayoutIntentResolver,
|
|
16
16
|
ReactRoot,
|
|
17
17
|
ReactSurface,
|
|
18
|
-
|
|
18
|
+
Toolkit,
|
|
19
19
|
UrlHandler,
|
|
20
20
|
} from './capabilities';
|
|
21
21
|
import { DeckEvents } from './events';
|
|
@@ -27,60 +27,65 @@ import { translations } from './translations';
|
|
|
27
27
|
// TODO(Zan): Move this to a more global location if we use immer more broadly.
|
|
28
28
|
setAutoFreeze(false);
|
|
29
29
|
|
|
30
|
-
export const DeckPlugin = () =>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
30
|
+
export const DeckPlugin = definePlugin(meta, () => [
|
|
31
|
+
defineModule({
|
|
32
|
+
id: `${meta.id}/module/check-app-scheme`,
|
|
33
|
+
activatesOn: Events.SettingsReady,
|
|
34
|
+
activate: CheckAppScheme,
|
|
35
|
+
}),
|
|
36
|
+
defineModule({
|
|
37
|
+
id: `${meta.id}/module/settings`,
|
|
38
|
+
activatesOn: Events.SetupSettings,
|
|
39
|
+
activate: DeckSettings,
|
|
40
|
+
}),
|
|
41
|
+
defineModule({
|
|
42
|
+
id: `${meta.id}/module/layout`,
|
|
43
|
+
// TODO(wittjosiah): Does not integrate with settings store.
|
|
44
|
+
// Should this be a different event?
|
|
45
|
+
// Should settings store be renamed to be more generic?
|
|
46
|
+
activatesOn: oneOf(Events.SetupSettings, Events.SetupAppGraph),
|
|
47
|
+
activatesAfter: [Events.LayoutReady, DeckEvents.StateReady],
|
|
48
|
+
activate: DeckState,
|
|
49
|
+
}),
|
|
50
|
+
defineModule({
|
|
51
|
+
id: `${meta.id}/module/translations`,
|
|
52
|
+
activatesOn: Events.SetupTranslations,
|
|
53
|
+
activate: () => contributes(Capabilities.Translations, [...translations, ...stackTranslations]),
|
|
54
|
+
}),
|
|
55
|
+
defineModule({
|
|
56
|
+
id: `${meta.id}/module/react-root`,
|
|
57
|
+
activatesOn: Events.Startup,
|
|
58
|
+
activate: ReactRoot,
|
|
59
|
+
}),
|
|
60
|
+
defineModule({
|
|
61
|
+
id: `${meta.id}/module/react-surface`,
|
|
62
|
+
activatesOn: Events.SetupReactSurface,
|
|
63
|
+
activate: ReactSurface,
|
|
64
|
+
}),
|
|
65
|
+
defineModule({
|
|
66
|
+
id: `${meta.id}/module/layout-intent-resolver`,
|
|
67
|
+
activatesOn: Events.SetupIntentResolver,
|
|
68
|
+
activate: LayoutIntentResolver,
|
|
69
|
+
}),
|
|
70
|
+
defineModule({
|
|
71
|
+
id: `${meta.id}/module/app-graph-builder`,
|
|
72
|
+
activatesOn: Events.SetupAppGraph,
|
|
73
|
+
activate: AppGraphBuilder,
|
|
74
|
+
}),
|
|
75
|
+
// defineModule({
|
|
76
|
+
// id: `${meta.id}/module/tools`,
|
|
77
|
+
// activatesOn: Events.SetupArtifactDefinition,
|
|
78
|
+
// activate: Tools,
|
|
79
|
+
// }),
|
|
80
|
+
defineModule({
|
|
81
|
+
id: `${meta.id}/module/toolkit`,
|
|
82
|
+
// TODO(wittjosiah): Shouldn't use the startup event.
|
|
83
|
+
activatesOn: Events.Startup,
|
|
84
|
+
activate: Toolkit,
|
|
85
|
+
}),
|
|
86
|
+
defineModule({
|
|
87
|
+
id: `${meta.id}/module/url`,
|
|
88
|
+
activatesOn: allOf(Events.DispatcherReady, DeckEvents.StateReady),
|
|
89
|
+
activate: UrlHandler,
|
|
90
|
+
}),
|
|
91
|
+
]);
|
|
@@ -3,23 +3,25 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import
|
|
6
|
+
import * as Function from 'effect/Function';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
7
8
|
|
|
8
|
-
import { Capabilities,
|
|
9
|
+
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
9
10
|
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
10
|
-
import {
|
|
11
|
+
import { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';
|
|
12
|
+
|
|
13
|
+
import { meta } from '../meta';
|
|
11
14
|
|
|
12
15
|
import { DeckCapabilities } from './capabilities';
|
|
13
|
-
import { DECK_PLUGIN } from '../meta';
|
|
14
16
|
|
|
15
17
|
export default (context: PluginContext) =>
|
|
16
18
|
contributes(
|
|
17
19
|
Capabilities.AppGraphBuilder,
|
|
18
20
|
createExtension({
|
|
19
|
-
id:
|
|
21
|
+
id: meta.id,
|
|
20
22
|
actions: (node) =>
|
|
21
23
|
Rx.make((get) =>
|
|
22
|
-
pipe(
|
|
24
|
+
Function.pipe(
|
|
23
25
|
get(node),
|
|
24
26
|
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
25
27
|
Option.map(() => {
|
|
@@ -36,7 +38,7 @@ export default (context: PluginContext) =>
|
|
|
36
38
|
);
|
|
37
39
|
},
|
|
38
40
|
properties: {
|
|
39
|
-
label: ['toggle fullscreen label', { ns:
|
|
41
|
+
label: ['toggle fullscreen label', { ns: meta.id }],
|
|
40
42
|
icon: 'ph--arrows-out--regular',
|
|
41
43
|
keyBinding: {
|
|
42
44
|
macos: 'ctrl+meta+f',
|
|
@@ -62,7 +64,7 @@ export default (context: PluginContext) =>
|
|
|
62
64
|
}
|
|
63
65
|
},
|
|
64
66
|
properties: {
|
|
65
|
-
label: ['close current label', { ns:
|
|
67
|
+
label: ['close current label', { ns: meta.id }],
|
|
66
68
|
icon: 'ph--x--regular',
|
|
67
69
|
},
|
|
68
70
|
};
|
|
@@ -79,7 +81,7 @@ export default (context: PluginContext) =>
|
|
|
79
81
|
);
|
|
80
82
|
},
|
|
81
83
|
properties: {
|
|
82
|
-
label: ['close others label', { ns:
|
|
84
|
+
label: ['close others label', { ns: meta.id }],
|
|
83
85
|
icon: 'ph--x-square--regular',
|
|
84
86
|
},
|
|
85
87
|
};
|
|
@@ -97,7 +99,7 @@ export default (context: PluginContext) =>
|
|
|
97
99
|
);
|
|
98
100
|
},
|
|
99
101
|
properties: {
|
|
100
|
-
label: ['close all label', { ns:
|
|
102
|
+
label: ['close all label', { ns: meta.id }],
|
|
101
103
|
icon: 'ph--x-circle--regular',
|
|
102
104
|
},
|
|
103
105
|
};
|
|
@@ -116,7 +118,7 @@ export default (context: PluginContext) =>
|
|
|
116
118
|
: 'open navigation sidebar label',
|
|
117
119
|
),
|
|
118
120
|
),
|
|
119
|
-
{ ns:
|
|
121
|
+
{ ns: meta.id },
|
|
120
122
|
],
|
|
121
123
|
icon: 'ph--sidebar--regular',
|
|
122
124
|
keyBinding: {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import { defineCapability } from '@dxos/app-framework';
|
|
6
6
|
import { type DeepReadonly } from '@dxos/util';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { meta } from '../meta';
|
|
9
9
|
import { type DeckPluginState } from '../types';
|
|
10
10
|
|
|
11
11
|
export namespace DeckCapabilities {
|
|
12
|
-
export const DeckState = defineCapability<DeepReadonly<DeckPluginState>>(`${
|
|
13
|
-
export const MutableDeckState = defineCapability<DeckPluginState>(`${
|
|
12
|
+
export const DeckState = defineCapability<DeepReadonly<DeckPluginState>>(`${meta.id}/capability/state`);
|
|
13
|
+
export const MutableDeckState = defineCapability<DeckPluginState>(`${meta.id}/capability/state`);
|
|
14
14
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities,
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { meta } from '../meta';
|
|
8
8
|
import { type DeckSettingsProps } from '../types';
|
|
9
9
|
|
|
10
10
|
const isSocket = !!(globalThis as any).__args;
|
|
@@ -31,7 +31,7 @@ const checkAppScheme = (url: string) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export default async (context: PluginContext) => {
|
|
34
|
-
const settings = context.getCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(
|
|
34
|
+
const settings = context.getCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(meta.id)?.value;
|
|
35
35
|
if (!isSocket && settings?.enableNativeRedirect) {
|
|
36
36
|
checkAppScheme(appScheme);
|
|
37
37
|
}
|
|
@@ -11,7 +11,8 @@ export const DeckState = lazy(() => import('./state'));
|
|
|
11
11
|
export const LayoutIntentResolver = lazy(() => import('./intent-resolver'));
|
|
12
12
|
export const ReactRoot = lazy(() => import('./react-root'));
|
|
13
13
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
14
|
-
export const Tools = lazy(() => import('./tools'));
|
|
14
|
+
// export const Tools = lazy(() => import('./tools'));
|
|
15
|
+
export const Toolkit = lazy(() => import('./toolkit'));
|
|
15
16
|
export const UrlHandler = lazy(() => import('./url-handler'));
|
|
16
17
|
|
|
17
18
|
export * from './capabilities';
|
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { batch } from '@preact/signals-core';
|
|
6
|
-
import
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Function from 'effect/Function';
|
|
8
|
+
import * as Option from 'effect/Option';
|
|
9
|
+
import * as Schema from 'effect/Schema';
|
|
7
10
|
|
|
8
11
|
import {
|
|
9
12
|
Capabilities,
|
|
10
|
-
createResolver,
|
|
11
|
-
contributes,
|
|
12
13
|
IntentAction,
|
|
13
14
|
LayoutAction,
|
|
14
15
|
type PluginContext,
|
|
15
|
-
createIntent,
|
|
16
16
|
chain,
|
|
17
|
+
contributes,
|
|
18
|
+
createIntent,
|
|
19
|
+
createResolver,
|
|
17
20
|
} from '@dxos/app-framework';
|
|
18
21
|
import { Obj } from '@dxos/echo';
|
|
19
22
|
import { invariant } from '@dxos/invariant';
|
|
@@ -24,20 +27,21 @@ import { isActionLike } from '@dxos/plugin-graph';
|
|
|
24
27
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
25
28
|
import { byPosition, isNonNullable } from '@dxos/util';
|
|
26
29
|
|
|
27
|
-
import { DeckCapabilities } from './capabilities';
|
|
28
30
|
import { closeEntry, createEntryId, incrementPlank, openEntry } from '../layout';
|
|
29
|
-
import {
|
|
31
|
+
import { meta } from '../meta';
|
|
30
32
|
import {
|
|
31
33
|
DeckAction,
|
|
32
|
-
type LayoutMode,
|
|
33
34
|
type DeckSettingsProps,
|
|
34
|
-
|
|
35
|
-
getMode,
|
|
36
|
-
defaultDeck,
|
|
35
|
+
type LayoutMode,
|
|
37
36
|
PLANK_COMPANION_TYPE,
|
|
37
|
+
defaultDeck,
|
|
38
|
+
getMode,
|
|
39
|
+
isLayoutMode,
|
|
38
40
|
} from '../types';
|
|
39
41
|
import { setActive } from '../util';
|
|
40
42
|
|
|
43
|
+
import { DeckCapabilities } from './capabilities';
|
|
44
|
+
|
|
41
45
|
export default (context: PluginContext) =>
|
|
42
46
|
contributes(Capabilities.IntentResolver, [
|
|
43
47
|
createResolver({
|
|
@@ -55,11 +59,11 @@ export default (context: PluginContext) =>
|
|
|
55
59
|
...layout.toasts,
|
|
56
60
|
{
|
|
57
61
|
id: layout.currentUndoId,
|
|
58
|
-
title: data.message ?? ['undo available label', { ns:
|
|
62
|
+
title: data.message ?? ['undo available label', { ns: meta.id }],
|
|
59
63
|
duration: 10_000,
|
|
60
|
-
actionLabel: ['undo action label', { ns:
|
|
61
|
-
actionAlt: ['undo action alt', { ns:
|
|
62
|
-
closeLabel: ['undo close label', { ns:
|
|
64
|
+
actionLabel: ['undo action label', { ns: meta.id }],
|
|
65
|
+
actionAlt: ['undo action alt', { ns: meta.id }],
|
|
66
|
+
closeLabel: ['undo close label', { ns: meta.id }],
|
|
63
67
|
onAction: () => undo(),
|
|
64
68
|
},
|
|
65
69
|
];
|
|
@@ -92,7 +96,7 @@ export default (context: PluginContext) =>
|
|
|
92
96
|
layout.complementarySidebarPanel = subject;
|
|
93
97
|
}
|
|
94
98
|
|
|
95
|
-
const next = subject ? 'expanded' : options?.state ?? layout.complementarySidebarState;
|
|
99
|
+
const next = subject ? 'expanded' : (options?.state ?? layout.complementarySidebarState);
|
|
96
100
|
if (next !== layout.complementarySidebarState) {
|
|
97
101
|
layout.complementarySidebarState = next;
|
|
98
102
|
}
|
|
@@ -260,7 +264,7 @@ export default (context: PluginContext) =>
|
|
|
260
264
|
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
261
265
|
const settings = context
|
|
262
266
|
.getCapabilities(Capabilities.SettingsStore)[0]
|
|
263
|
-
?.getStore<DeckSettingsProps>(
|
|
267
|
+
?.getStore<DeckSettingsProps>(meta.id)?.value;
|
|
264
268
|
|
|
265
269
|
if (options?.workspace && state.activeDeck !== options?.workspace) {
|
|
266
270
|
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
@@ -402,7 +406,7 @@ export default (context: PluginContext) =>
|
|
|
402
406
|
}
|
|
403
407
|
|
|
404
408
|
if (adjustment.type === 'companion') {
|
|
405
|
-
return pipe(
|
|
409
|
+
return Function.pipe(
|
|
406
410
|
graph.getNode(adjustment.id),
|
|
407
411
|
Option.map((node) =>
|
|
408
412
|
graph
|
|
@@ -453,7 +457,7 @@ export default (context: PluginContext) =>
|
|
|
453
457
|
return {
|
|
454
458
|
intents: [
|
|
455
459
|
// NOTE: The order of these is important.
|
|
456
|
-
pipe(
|
|
460
|
+
Function.pipe(
|
|
457
461
|
createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'deck' } }),
|
|
458
462
|
chain(LayoutAction.Open, { part: 'main', subject: [entryId] }),
|
|
459
463
|
),
|
|
@@ -6,13 +6,14 @@ import React, { useCallback } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import { DeckCapabilities } from './capabilities';
|
|
10
9
|
import { DeckLayout } from '../components';
|
|
11
|
-
import {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
|
+
|
|
12
|
+
import { DeckCapabilities } from './capabilities';
|
|
12
13
|
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactRoot, {
|
|
15
|
-
id:
|
|
16
|
+
id: meta.id,
|
|
16
17
|
root: () => {
|
|
17
18
|
const layout = useCapability(DeckCapabilities.MutableDeckState);
|
|
18
19
|
|
|
@@ -7,21 +7,21 @@ import React from 'react';
|
|
|
7
7
|
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
8
|
import { SettingsStore } from '@dxos/local-storage';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { Banner, DeckSettings } from '../components';
|
|
11
|
+
import { meta } from '../meta';
|
|
12
12
|
import { type DeckSettingsProps } from '../types';
|
|
13
13
|
|
|
14
14
|
export default () =>
|
|
15
15
|
contributes(Capabilities.ReactSurface, [
|
|
16
16
|
createSurface({
|
|
17
|
-
id: `${
|
|
17
|
+
id: `${meta.id}/plugin-settings`,
|
|
18
18
|
role: 'article',
|
|
19
19
|
filter: (data): data is { subject: SettingsStore<DeckSettingsProps> } =>
|
|
20
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
20
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
21
21
|
component: ({ data: { subject } }) => <DeckSettings settings={subject.value} />,
|
|
22
22
|
}),
|
|
23
23
|
createSurface({
|
|
24
|
-
id: `${
|
|
24
|
+
id: `${meta.id}/banner`,
|
|
25
25
|
role: 'banner',
|
|
26
26
|
component: ({ data }) => {
|
|
27
27
|
return <Banner variant={data.variant} />;
|
|
@@ -6,7 +6,7 @@ import { Capabilities, contributes } from '@dxos/app-framework';
|
|
|
6
6
|
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
8
|
import { meta } from '../meta';
|
|
9
|
-
import {
|
|
9
|
+
import { type DeckSettingsProps, DeckSettingsSchema } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () => {
|
|
12
12
|
const settings = live<DeckSettingsProps>({
|
|
@@ -16,6 +16,7 @@ export default () => {
|
|
|
16
16
|
enableNativeRedirect: false,
|
|
17
17
|
newPlankPositioning: 'start',
|
|
18
18
|
overscroll: 'none',
|
|
19
|
+
encapsulatedPlanks: false,
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
return contributes(Capabilities.Settings, {
|
|
@@ -8,17 +8,18 @@ import { live } from '@dxos/live-object';
|
|
|
8
8
|
import { LocalStorageStore } from '@dxos/local-storage';
|
|
9
9
|
import { type SidebarState } from '@dxos/react-ui';
|
|
10
10
|
|
|
11
|
+
import { meta } from '../meta';
|
|
12
|
+
import { type DeckPluginState, type DeckState, defaultDeck, getMode } from '../types';
|
|
13
|
+
|
|
11
14
|
import { DeckCapabilities } from './capabilities';
|
|
12
|
-
import { DECK_PLUGIN } from '../meta';
|
|
13
|
-
import { getMode, type DeckPluginState, defaultDeck, type DeckState } from '../types';
|
|
14
15
|
|
|
15
16
|
const boolean = /true|false/;
|
|
16
17
|
|
|
17
18
|
// TODO(thure, 18 Feb 2025): Remove after the next release.
|
|
18
19
|
|
|
19
20
|
const migrateSidebarStateDefaults = {
|
|
20
|
-
[`${
|
|
21
|
-
[`${
|
|
21
|
+
[`${meta.id}/complementary-sidebar-state`]: 'expanded',
|
|
22
|
+
[`${meta.id}/sidebar-state`]: 'collapsed',
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
const migrateSidebarState = () => {
|
|
@@ -29,10 +30,13 @@ const migrateSidebarState = () => {
|
|
|
29
30
|
});
|
|
30
31
|
};
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated
|
|
35
|
+
*/
|
|
36
|
+
export const DeckStateFactory = () => {
|
|
33
37
|
migrateSidebarState();
|
|
34
38
|
|
|
35
|
-
const state = new LocalStorageStore<DeckPluginState>(
|
|
39
|
+
const state = new LocalStorageStore<DeckPluginState>(meta.id, {
|
|
36
40
|
sidebarState: 'expanded',
|
|
37
41
|
complementarySidebarState: 'collapsed',
|
|
38
42
|
complementarySidebarPanel: undefined,
|