@dxos/plugin-deck 0.8.4-main.67995b8 → 0.8.4-main.a4bbb77
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-7SR53CCK.mjs} +14 -14
- package/dist/lib/browser/app-graph-builder-7SR53CCK.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs → check-app-scheme-GCOL6YDT.mjs} +6 -6
- package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QDZO4AJ4.mjs → chunk-7CL25AYA.mjs} +15 -15
- package/dist/lib/browser/chunk-7CL25AYA.mjs.map +7 -0
- package/dist/lib/browser/chunk-HUWUYTOI.mjs +16 -0
- package/dist/lib/browser/chunk-HUWUYTOI.mjs.map +7 -0
- package/dist/lib/browser/chunk-MHP4GPX5.mjs +11 -0
- package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-D7KTFCUV.mjs → chunk-QHJ7N7BF.mjs} +217 -213
- package/dist/lib/browser/chunk-QHJ7N7BF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F5BQOOEG.mjs → chunk-VSJ7FFQS.mjs} +4 -4
- package/dist/lib/browser/chunk-VSJ7FFQS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JFTXENFN.mjs → chunk-WOCUNO27.mjs} +9 -9
- package/dist/lib/browser/chunk-WOCUNO27.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +19 -14
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-P2OBK5HK.mjs → intent-resolver-Y5YOA4NR.mjs} +16 -16
- package/dist/lib/browser/intent-resolver-Y5YOA4NR.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-PO64J7ML.mjs → react-root-A537NMT6.mjs} +11 -11
- package/dist/lib/browser/react-root-A537NMT6.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-E45YOVF5.mjs → react-surface-DAS4HS3Y.mjs} +13 -13
- package/dist/lib/browser/react-surface-DAS4HS3Y.mjs.map +7 -0
- package/dist/lib/browser/{settings-6AJZPZPM.mjs → settings-3642GPOR.mjs} +5 -5
- package/dist/lib/browser/{settings-6AJZPZPM.mjs.map → settings-3642GPOR.mjs.map} +2 -2
- package/dist/lib/browser/state-MKKK3WGD.mjs +12 -0
- package/dist/lib/browser/toolkit-UPUBQIYU.mjs +61 -0
- package/dist/lib/browser/toolkit-UPUBQIYU.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/browser/{url-handler-7L7M6IKH.mjs → url-handler-354LL74P.mjs} +7 -7
- package/dist/lib/browser/url-handler-354LL74P.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/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +5 -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.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 +85 -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/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 +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +2 -2
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -45
- package/src/DeckPlugin.ts +64 -59
- package/src/capabilities/app-graph-builder.ts +10 -9
- 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 +16 -15
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +5 -5
- package/src/capabilities/settings.ts +1 -1
- package/src/capabilities/state.ts +6 -5
- package/src/capabilities/toolkit.ts +55 -0
- package/src/capabilities/tools.ts +9 -6
- 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.tsx +15 -14
- package/src/components/DeckLayout/Fallback.tsx +2 -2
- package/src/components/DeckLayout/Toast.tsx +2 -2
- package/src/components/DeckSettings/DeckSettings.tsx +74 -65
- package/src/components/Plank/Plank.stories.tsx +9 -10
- package/src/components/Plank/Plank.tsx +7 -6
- package/src/components/Plank/PlankControls.tsx +3 -3
- package/src/components/Plank/PlankError.tsx +3 -2
- package/src/components/Plank/PlankHeading.tsx +10 -9
- 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 +2 -2
- package/src/hooks/useNodeActionExpander.ts +1 -1
- package/src/meta.ts +1 -3
- package/src/translations.ts +1 -0
- package/src/types/schema.ts +2 -2
- 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-D7KTFCUV.mjs.map +0 -7
- package/dist/lib/browser/chunk-F5BQOOEG.mjs.map +0 -7
- package/dist/lib/browser/chunk-JFTXENFN.mjs.map +0 -7
- package/dist/lib/browser/chunk-M57WD3V6.mjs +0 -16
- package/dist/lib/browser/chunk-M57WD3V6.mjs.map +0 -7
- package/dist/lib/browser/chunk-QDZO4AJ4.mjs.map +0 -7
- package/dist/lib/browser/chunk-Z5KITAZW.mjs +0 -13
- package/dist/lib/browser/chunk-Z5KITAZW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs.map +0 -7
- package/dist/lib/browser/react-root-PO64J7ML.mjs.map +0 -7
- package/dist/lib/browser/react-surface-E45YOVF5.mjs.map +0 -7
- package/dist/lib/browser/state-MVDYX77Y.mjs +0 -12
- package/dist/lib/browser/tools-TKQDPCHJ.mjs +0 -88
- package/dist/lib/browser/tools-TKQDPCHJ.mjs.map +0 -7
- package/dist/lib/browser/url-handler-7L7M6IKH.mjs.map +0 -7
- /package/dist/lib/browser/{state-MVDYX77Y.mjs.map → state-MKKK3WGD.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.a4bbb77",
|
|
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,14 +10,14 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
|
-
"browser": "./dist/lib/browser/index.mjs"
|
|
15
|
-
"source": "./src/index.ts"
|
|
15
|
+
"browser": "./dist/lib/browser/index.mjs"
|
|
16
16
|
},
|
|
17
17
|
"./types": {
|
|
18
|
+
"source": "./src/types/index.ts",
|
|
18
19
|
"types": "./dist/types/src/types/index.d.ts",
|
|
19
|
-
"browser": "./dist/lib/browser/types/index.mjs"
|
|
20
|
-
"source": "./src/types/index.ts"
|
|
20
|
+
"browser": "./dist/lib/browser/types/index.mjs"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -33,57 +33,60 @@
|
|
|
33
33
|
"src"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"@effect/ai": "0.29.1",
|
|
37
|
+
"@effect/experimental": "0.56.0",
|
|
36
38
|
"@fluentui/react-tabster": "^9.24.2",
|
|
37
39
|
"@preact-signals/safe-react": "^0.9.0",
|
|
38
|
-
"@preact/signals-core": "^1.
|
|
40
|
+
"@preact/signals-core": "^1.12.1",
|
|
39
41
|
"@radix-ui/react-context": "1.1.1",
|
|
40
|
-
"effect": "3.17.0",
|
|
41
42
|
"immer": "^10.1.1",
|
|
42
|
-
"@dxos/ai": "0.8.4-main.
|
|
43
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/echo
|
|
49
|
-
"@dxos/echo": "0.8.4-main.
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/plugin-
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/react-ui-
|
|
62
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
63
|
-
"@dxos/react-ui-tabs": "0.8.4-main.
|
|
64
|
-
"@dxos/react-ui-text-tooltip": "0.8.4-main.
|
|
65
|
-
"@dxos/
|
|
43
|
+
"@dxos/ai": "0.8.4-main.a4bbb77",
|
|
44
|
+
"@dxos/app-framework": "0.8.4-main.a4bbb77",
|
|
45
|
+
"@dxos/assistant": "0.8.4-main.a4bbb77",
|
|
46
|
+
"@dxos/async": "0.8.4-main.a4bbb77",
|
|
47
|
+
"@dxos/blueprints": "0.8.4-main.a4bbb77",
|
|
48
|
+
"@dxos/debug": "0.8.4-main.a4bbb77",
|
|
49
|
+
"@dxos/echo": "0.8.4-main.a4bbb77",
|
|
50
|
+
"@dxos/echo-schema": "0.8.4-main.a4bbb77",
|
|
51
|
+
"@dxos/echo-signals": "0.8.4-main.a4bbb77",
|
|
52
|
+
"@dxos/invariant": "0.8.4-main.a4bbb77",
|
|
53
|
+
"@dxos/keyboard": "0.8.4-main.a4bbb77",
|
|
54
|
+
"@dxos/live-object": "0.8.4-main.a4bbb77",
|
|
55
|
+
"@dxos/local-storage": "0.8.4-main.a4bbb77",
|
|
56
|
+
"@dxos/plugin-attention": "0.8.4-main.a4bbb77",
|
|
57
|
+
"@dxos/log": "0.8.4-main.a4bbb77",
|
|
58
|
+
"@dxos/plugin-graph": "0.8.4-main.a4bbb77",
|
|
59
|
+
"@dxos/plugin-observability": "0.8.4-main.a4bbb77",
|
|
60
|
+
"@dxos/react-client": "0.8.4-main.a4bbb77",
|
|
61
|
+
"@dxos/plugin-theme": "0.8.4-main.a4bbb77",
|
|
62
|
+
"@dxos/react-ui-attention": "0.8.4-main.a4bbb77",
|
|
63
|
+
"@dxos/react-ui-stack": "0.8.4-main.a4bbb77",
|
|
64
|
+
"@dxos/react-ui-tabs": "0.8.4-main.a4bbb77",
|
|
65
|
+
"@dxos/react-ui-text-tooltip": "0.8.4-main.a4bbb77",
|
|
66
|
+
"@dxos/react-ui-form": "0.8.4-main.a4bbb77",
|
|
67
|
+
"@dxos/util": "0.8.4-main.a4bbb77"
|
|
66
68
|
},
|
|
67
69
|
"devDependencies": {
|
|
68
|
-
"@effect-rx/rx-react": "0.
|
|
69
|
-
"@effect/platform": "0.
|
|
70
|
-
"@types/react": "~
|
|
71
|
-
"@types/react-dom": "~
|
|
72
|
-
"
|
|
73
|
-
"react
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
77
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
70
|
+
"@effect-rx/rx-react": "0.42.4",
|
|
71
|
+
"@effect/platform": "0.92.1",
|
|
72
|
+
"@types/react": "~19.2.0",
|
|
73
|
+
"@types/react-dom": "~19.2.0",
|
|
74
|
+
"effect": "3.18.3",
|
|
75
|
+
"react": "~19.2.0",
|
|
76
|
+
"react-dom": "~19.2.0",
|
|
77
|
+
"vite": "7.1.9",
|
|
78
|
+
"@dxos/react-ui-theme": "0.8.4-main.a4bbb77",
|
|
79
|
+
"@dxos/storybook-utils": "0.8.4-main.a4bbb77",
|
|
80
|
+
"@dxos/react-ui": "0.8.4-main.a4bbb77"
|
|
78
81
|
},
|
|
79
82
|
"peerDependencies": {
|
|
80
83
|
"@effect-rx/rx-react": "^0.34.1",
|
|
81
84
|
"@effect/platform": "^0.80.12",
|
|
82
85
|
"effect": "^3.13.3",
|
|
83
|
-
"react": "
|
|
84
|
-
"react-dom": "
|
|
85
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
86
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
86
|
+
"react": "^19.0.0",
|
|
87
|
+
"react-dom": "^19.0.0",
|
|
88
|
+
"@dxos/react-ui": "0.8.4-main.a4bbb77",
|
|
89
|
+
"@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
|
|
87
90
|
},
|
|
88
91
|
"publishConfig": {
|
|
89
92
|
"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
|
+
]);
|
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
6
|
import { Option, pipe } from 'effect';
|
|
7
7
|
|
|
8
|
-
import { Capabilities,
|
|
8
|
+
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
9
9
|
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
10
|
-
import {
|
|
10
|
+
import { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';
|
|
11
|
+
|
|
12
|
+
import { meta } from '../meta';
|
|
11
13
|
|
|
12
14
|
import { DeckCapabilities } from './capabilities';
|
|
13
|
-
import { DECK_PLUGIN } from '../meta';
|
|
14
15
|
|
|
15
16
|
export default (context: PluginContext) =>
|
|
16
17
|
contributes(
|
|
17
18
|
Capabilities.AppGraphBuilder,
|
|
18
19
|
createExtension({
|
|
19
|
-
id:
|
|
20
|
+
id: meta.id,
|
|
20
21
|
actions: (node) =>
|
|
21
22
|
Rx.make((get) =>
|
|
22
23
|
pipe(
|
|
@@ -36,7 +37,7 @@ export default (context: PluginContext) =>
|
|
|
36
37
|
);
|
|
37
38
|
},
|
|
38
39
|
properties: {
|
|
39
|
-
label: ['toggle fullscreen label', { ns:
|
|
40
|
+
label: ['toggle fullscreen label', { ns: meta.id }],
|
|
40
41
|
icon: 'ph--arrows-out--regular',
|
|
41
42
|
keyBinding: {
|
|
42
43
|
macos: 'ctrl+meta+f',
|
|
@@ -62,7 +63,7 @@ export default (context: PluginContext) =>
|
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
properties: {
|
|
65
|
-
label: ['close current label', { ns:
|
|
66
|
+
label: ['close current label', { ns: meta.id }],
|
|
66
67
|
icon: 'ph--x--regular',
|
|
67
68
|
},
|
|
68
69
|
};
|
|
@@ -79,7 +80,7 @@ export default (context: PluginContext) =>
|
|
|
79
80
|
);
|
|
80
81
|
},
|
|
81
82
|
properties: {
|
|
82
|
-
label: ['close others label', { ns:
|
|
83
|
+
label: ['close others label', { ns: meta.id }],
|
|
83
84
|
icon: 'ph--x-square--regular',
|
|
84
85
|
},
|
|
85
86
|
};
|
|
@@ -97,7 +98,7 @@ export default (context: PluginContext) =>
|
|
|
97
98
|
);
|
|
98
99
|
},
|
|
99
100
|
properties: {
|
|
100
|
-
label: ['close all label', { ns:
|
|
101
|
+
label: ['close all label', { ns: meta.id }],
|
|
101
102
|
icon: 'ph--x-circle--regular',
|
|
102
103
|
},
|
|
103
104
|
};
|
|
@@ -116,7 +117,7 @@ export default (context: PluginContext) =>
|
|
|
116
117
|
: 'open navigation sidebar label',
|
|
117
118
|
),
|
|
118
119
|
),
|
|
119
|
-
{ ns:
|
|
120
|
+
{ ns: meta.id },
|
|
120
121
|
],
|
|
121
122
|
icon: 'ph--sidebar--regular',
|
|
122
123
|
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,17 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { batch } from '@preact/signals-core';
|
|
6
|
-
import {
|
|
6
|
+
import { Effect, Option, Schema, pipe } from 'effect';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Capabilities,
|
|
10
|
-
createResolver,
|
|
11
|
-
contributes,
|
|
12
10
|
IntentAction,
|
|
13
11
|
LayoutAction,
|
|
14
12
|
type PluginContext,
|
|
15
|
-
createIntent,
|
|
16
13
|
chain,
|
|
14
|
+
contributes,
|
|
15
|
+
createIntent,
|
|
16
|
+
createResolver,
|
|
17
17
|
} from '@dxos/app-framework';
|
|
18
18
|
import { Obj } from '@dxos/echo';
|
|
19
19
|
import { invariant } from '@dxos/invariant';
|
|
@@ -24,20 +24,21 @@ import { isActionLike } from '@dxos/plugin-graph';
|
|
|
24
24
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
25
25
|
import { byPosition, isNonNullable } from '@dxos/util';
|
|
26
26
|
|
|
27
|
-
import { DeckCapabilities } from './capabilities';
|
|
28
27
|
import { closeEntry, createEntryId, incrementPlank, openEntry } from '../layout';
|
|
29
|
-
import {
|
|
28
|
+
import { meta } from '../meta';
|
|
30
29
|
import {
|
|
31
30
|
DeckAction,
|
|
32
|
-
type LayoutMode,
|
|
33
31
|
type DeckSettingsProps,
|
|
34
|
-
|
|
35
|
-
getMode,
|
|
36
|
-
defaultDeck,
|
|
32
|
+
type LayoutMode,
|
|
37
33
|
PLANK_COMPANION_TYPE,
|
|
34
|
+
defaultDeck,
|
|
35
|
+
getMode,
|
|
36
|
+
isLayoutMode,
|
|
38
37
|
} from '../types';
|
|
39
38
|
import { setActive } from '../util';
|
|
40
39
|
|
|
40
|
+
import { DeckCapabilities } from './capabilities';
|
|
41
|
+
|
|
41
42
|
export default (context: PluginContext) =>
|
|
42
43
|
contributes(Capabilities.IntentResolver, [
|
|
43
44
|
createResolver({
|
|
@@ -55,11 +56,11 @@ export default (context: PluginContext) =>
|
|
|
55
56
|
...layout.toasts,
|
|
56
57
|
{
|
|
57
58
|
id: layout.currentUndoId,
|
|
58
|
-
title: data.message ?? ['undo available label', { ns:
|
|
59
|
+
title: data.message ?? ['undo available label', { ns: meta.id }],
|
|
59
60
|
duration: 10_000,
|
|
60
|
-
actionLabel: ['undo action label', { ns:
|
|
61
|
-
actionAlt: ['undo action alt', { ns:
|
|
62
|
-
closeLabel: ['undo close label', { ns:
|
|
61
|
+
actionLabel: ['undo action label', { ns: meta.id }],
|
|
62
|
+
actionAlt: ['undo action alt', { ns: meta.id }],
|
|
63
|
+
closeLabel: ['undo close label', { ns: meta.id }],
|
|
63
64
|
onAction: () => undo(),
|
|
64
65
|
},
|
|
65
66
|
];
|
|
@@ -260,7 +261,7 @@ export default (context: PluginContext) =>
|
|
|
260
261
|
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
261
262
|
const settings = context
|
|
262
263
|
.getCapabilities(Capabilities.SettingsStore)[0]
|
|
263
|
-
?.getStore<DeckSettingsProps>(
|
|
264
|
+
?.getStore<DeckSettingsProps>(meta.id)?.value;
|
|
264
265
|
|
|
265
266
|
if (options?.workspace && state.activeDeck !== options?.workspace) {
|
|
266
267
|
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
@@ -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>({
|
|
@@ -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 = () => {
|
|
@@ -32,7 +33,7 @@ const migrateSidebarState = () => {
|
|
|
32
33
|
export const DeckStateFactory = () => {
|
|
33
34
|
migrateSidebarState();
|
|
34
35
|
|
|
35
|
-
const state = new LocalStorageStore<DeckPluginState>(
|
|
36
|
+
const state = new LocalStorageStore<DeckPluginState>(meta.id, {
|
|
36
37
|
sidebarState: 'expanded',
|
|
37
38
|
complementarySidebarState: 'collapsed',
|
|
38
39
|
complementarySidebarPanel: undefined,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Tool, Toolkit } from '@effect/ai';
|
|
6
|
+
import { Effect, Schema } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
9
|
+
import { ArtifactId } from '@dxos/assistant';
|
|
10
|
+
import { type SpaceId } from '@dxos/keys';
|
|
11
|
+
import { trim } from '@dxos/util';
|
|
12
|
+
|
|
13
|
+
import { DeckCapabilities } from './capabilities';
|
|
14
|
+
|
|
15
|
+
class DeckToolkit extends Toolkit.make(
|
|
16
|
+
Tool.make('open-item', {
|
|
17
|
+
description: trim`
|
|
18
|
+
Opens an item in the application.
|
|
19
|
+
`,
|
|
20
|
+
parameters: {
|
|
21
|
+
id: ArtifactId,
|
|
22
|
+
},
|
|
23
|
+
success: Schema.Any,
|
|
24
|
+
failure: Schema.Never,
|
|
25
|
+
}),
|
|
26
|
+
) {
|
|
27
|
+
static layer = (context: PluginContext) =>
|
|
28
|
+
DeckToolkit.toLayer({
|
|
29
|
+
'open-item': ({ id }) =>
|
|
30
|
+
Effect.gen(function* () {
|
|
31
|
+
const state = context.getCapability(DeckCapabilities.DeckState);
|
|
32
|
+
const dxn = ArtifactId.toDXN(id, state.activeDeck as SpaceId);
|
|
33
|
+
|
|
34
|
+
// TODO(wittjosiah): Support other variants.
|
|
35
|
+
const echoDxn = dxn.asEchoDXN();
|
|
36
|
+
if (!echoDxn) {
|
|
37
|
+
throw new Error(`Invalid object ID: ${id}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// TODO(wittjosiah): Get capabilities via layers.
|
|
41
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
42
|
+
yield* dispatch(
|
|
43
|
+
createIntent(LayoutAction.Open, {
|
|
44
|
+
subject: [`${echoDxn.spaceId!}:${echoDxn.echoId}`],
|
|
45
|
+
part: 'main',
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
}).pipe(Effect.orDie),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default (context: PluginContext) => [
|
|
53
|
+
contributes(Capabilities.Toolkit, DeckToolkit),
|
|
54
|
+
contributes(Capabilities.ToolkitHandler, DeckToolkit.layer(context)),
|
|
55
|
+
];
|
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
// ISSUE(burdon): tools
|
|
6
|
+
// @ts-nocheck
|
|
7
|
+
|
|
5
8
|
import { Schema } from 'effect';
|
|
6
9
|
|
|
7
|
-
import { createTool, ToolResult } from '@dxos/ai';
|
|
8
10
|
import {
|
|
9
|
-
contributes,
|
|
10
|
-
createIntent,
|
|
11
11
|
Capabilities,
|
|
12
12
|
LayoutAction,
|
|
13
13
|
type PromiseIntentDispatcher,
|
|
14
|
+
contributes,
|
|
15
|
+
createIntent,
|
|
14
16
|
} from '@dxos/app-framework';
|
|
15
17
|
import { invariant } from '@dxos/invariant';
|
|
18
|
+
import { trim } from '@dxos/util';
|
|
16
19
|
|
|
17
20
|
import { meta } from '../meta';
|
|
18
21
|
import { DeckAction } from '../types';
|
|
@@ -30,9 +33,9 @@ export default () =>
|
|
|
30
33
|
contributes(Capabilities.Tools, [
|
|
31
34
|
createTool(meta.id, {
|
|
32
35
|
name: 'show',
|
|
33
|
-
description: `
|
|
34
|
-
Show an item as a companion to an existing plank.
|
|
35
|
-
When supplying IDs, they must be fully qualified like space:object
|
|
36
|
+
description: trim`
|
|
37
|
+
Show an item as a companion to an existing plank.
|
|
38
|
+
When supplying IDs, they must be fully qualified like this: space-key:object-id
|
|
36
39
|
`,
|
|
37
40
|
caption: 'Showing item...',
|
|
38
41
|
// TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.
|