@dxos/plugin-deck 0.8.3 → 0.8.4-main.28f8d3d

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.
Files changed (107) hide show
  1. package/dist/lib/browser/{app-graph-builder-YCO7Y54J.mjs → app-graph-builder-DVEKLXB4.mjs} +6 -6
  2. package/dist/lib/browser/app-graph-builder-DVEKLXB4.mjs.map +7 -0
  3. package/dist/lib/browser/{check-app-scheme-7AXGR6UT.mjs → check-app-scheme-3BQJXWEY.mjs} +3 -3
  4. package/dist/lib/browser/{check-app-scheme-7AXGR6UT.mjs.map → check-app-scheme-3BQJXWEY.mjs.map} +2 -2
  5. package/dist/lib/browser/{chunk-RMCRP7HV.mjs → chunk-6MQIYIPY.mjs} +213 -213
  6. package/dist/lib/browser/chunk-6MQIYIPY.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-TRFYUEBA.mjs → chunk-CNTGBCMK.mjs} +5 -5
  8. package/dist/lib/browser/{chunk-YN5OZEGS.mjs → chunk-F5BQOOEG.mjs} +7 -9
  9. package/dist/lib/browser/chunk-F5BQOOEG.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-KLN73CM3.mjs → chunk-M57WD3V6.mjs} +3 -3
  11. package/dist/lib/browser/{chunk-RAZK4XT5.mjs → chunk-MX7WRVX3.mjs} +20 -20
  12. package/dist/lib/browser/{chunk-RAZK4XT5.mjs.map → chunk-MX7WRVX3.mjs.map} +3 -3
  13. package/dist/lib/browser/{chunk-FX44YX3G.mjs → chunk-NRCPV6AV.mjs} +8 -7
  14. package/dist/lib/browser/{chunk-FX44YX3G.mjs.map → chunk-NRCPV6AV.mjs.map} +2 -2
  15. package/dist/lib/browser/{chunk-NSATFAEE.mjs → chunk-Z5KITAZW.mjs} +2 -2
  16. package/dist/lib/browser/index.mjs +23 -17
  17. package/dist/lib/browser/index.mjs.map +3 -3
  18. package/dist/lib/browser/{intent-resolver-EGLWTKJG.mjs → intent-resolver-2SUIIV6N.mjs} +11 -11
  19. package/dist/lib/browser/intent-resolver-2SUIIV6N.mjs.map +7 -0
  20. package/dist/lib/browser/meta.json +1 -1
  21. package/dist/lib/browser/{react-root-C4HIM5CI.mjs → react-root-GVZANZX7.mjs} +9 -9
  22. package/dist/lib/browser/{react-root-C4HIM5CI.mjs.map → react-root-GVZANZX7.mjs.map} +2 -2
  23. package/dist/lib/browser/{react-surface-RV2AZ6WZ.mjs → react-surface-NXSSD2GW.mjs} +9 -9
  24. package/dist/lib/browser/{react-surface-RV2AZ6WZ.mjs.map → react-surface-NXSSD2GW.mjs.map} +1 -1
  25. package/dist/lib/browser/{settings-7VUU3ZJ4.mjs → settings-LUPQPZ27.mjs} +4 -4
  26. package/dist/lib/browser/{settings-7VUU3ZJ4.mjs.map → settings-LUPQPZ27.mjs.map} +1 -1
  27. package/dist/lib/browser/state-CRXR7X63.mjs +12 -0
  28. package/dist/lib/browser/toolkit-OBKFXX23.mjs +47 -0
  29. package/dist/lib/browser/toolkit-OBKFXX23.mjs.map +7 -0
  30. package/dist/lib/browser/{types.mjs → types/index.mjs} +3 -5
  31. package/dist/lib/browser/{url-handler-BUGI6XRE.mjs → url-handler-LROZYQ26.mjs} +6 -6
  32. package/dist/lib/browser/url-handler-LROZYQ26.mjs.map +7 -0
  33. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  34. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/index.d.ts +1 -1
  37. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  40. package/dist/types/src/capabilities/state.d.ts +1 -1
  41. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  42. package/dist/types/src/capabilities/toolkit.d.ts +5 -0
  43. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  44. package/dist/types/src/capabilities/tools.d.ts +1 -1
  45. package/dist/types/src/capabilities/tools.d.ts.map +1 -1
  46. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  47. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
  48. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  49. package/dist/types/src/components/Plank/Plank.d.ts +1 -1
  50. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  51. package/dist/types/src/components/Plank/Plank.stories.d.ts +1 -1
  52. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  53. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  54. package/dist/types/src/components/Plank/PlankHeading.d.ts +1 -1
  55. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  56. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  57. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  58. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  59. package/dist/types/src/translations.d.ts +56 -56
  60. package/dist/types/src/translations.d.ts.map +1 -1
  61. package/dist/types/src/types/index.d.ts +2 -0
  62. package/dist/types/src/types/index.d.ts.map +1 -0
  63. package/dist/types/src/{types.d.ts → types/schema.d.ts} +7 -8
  64. package/dist/types/src/types/schema.d.ts.map +1 -0
  65. package/dist/types/tsconfig.tsbuildinfo +1 -1
  66. package/package.json +41 -39
  67. package/src/DeckPlugin.ts +12 -6
  68. package/src/capabilities/app-graph-builder.ts +4 -3
  69. package/src/capabilities/check-app-scheme.ts +1 -1
  70. package/src/capabilities/index.ts +2 -1
  71. package/src/capabilities/intent-resolver.ts +11 -10
  72. package/src/capabilities/react-root.tsx +2 -1
  73. package/src/capabilities/react-surface.tsx +1 -1
  74. package/src/capabilities/settings.ts +1 -1
  75. package/src/capabilities/state.ts +4 -3
  76. package/src/capabilities/toolkit.ts +55 -0
  77. package/src/capabilities/tools.ts +9 -6
  78. package/src/capabilities/url-handler.ts +3 -2
  79. package/src/components/DeckLayout/Banner.tsx +1 -1
  80. package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
  81. package/src/components/DeckLayout/DeckLayout.tsx +11 -10
  82. package/src/components/DeckLayout/Popover.tsx +1 -1
  83. package/src/components/Plank/Plank.stories.tsx +5 -4
  84. package/src/components/Plank/Plank.tsx +7 -6
  85. package/src/components/Plank/PlankError.tsx +4 -6
  86. package/src/components/Plank/PlankHeading.tsx +7 -6
  87. package/src/components/Sidebar/ComplementarySidebar.tsx +4 -3
  88. package/src/components/Sidebar/SidebarButton.tsx +2 -2
  89. package/src/hooks/useDeckCompanions.ts +2 -2
  90. package/src/hooks/useNodeActionExpander.ts +1 -1
  91. package/src/translations.ts +6 -4
  92. package/src/types/index.ts +5 -0
  93. package/src/{types.ts → types/schema.ts} +4 -6
  94. package/dist/lib/browser/app-graph-builder-YCO7Y54J.mjs.map +0 -7
  95. package/dist/lib/browser/chunk-RMCRP7HV.mjs.map +0 -7
  96. package/dist/lib/browser/chunk-YN5OZEGS.mjs.map +0 -7
  97. package/dist/lib/browser/intent-resolver-EGLWTKJG.mjs.map +0 -7
  98. package/dist/lib/browser/state-VJ6E3ADY.mjs +0 -10
  99. package/dist/lib/browser/tools-N57NQ2LH.mjs +0 -88
  100. package/dist/lib/browser/tools-N57NQ2LH.mjs.map +0 -7
  101. package/dist/lib/browser/url-handler-BUGI6XRE.mjs.map +0 -7
  102. package/dist/types/src/types.d.ts.map +0 -1
  103. /package/dist/lib/browser/{chunk-TRFYUEBA.mjs.map → chunk-CNTGBCMK.mjs.map} +0 -0
  104. /package/dist/lib/browser/{chunk-KLN73CM3.mjs.map → chunk-M57WD3V6.mjs.map} +0 -0
  105. /package/dist/lib/browser/{chunk-NSATFAEE.mjs.map → chunk-Z5KITAZW.mjs.map} +0 -0
  106. /package/dist/lib/browser/{state-VJ6E3ADY.mjs.map → state-CRXR7X63.mjs.map} +0 -0
  107. /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.3",
3
+ "version": "0.8.4-main.28f8d3d",
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
- "types": "./dist/types/src/types.d.ts",
18
- "browser": "./dist/lib/browser/types.mjs"
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,59 +33,59 @@
31
33
  "src"
32
34
  ],
33
35
  "dependencies": {
36
+ "@effect/ai": "0.25.2",
34
37
  "@fluentui/react-tabster": "^9.24.2",
35
38
  "@preact-signals/safe-react": "^0.9.0",
36
39
  "@preact/signals-core": "^1.9.0",
37
40
  "@radix-ui/react-context": "1.1.1",
38
- "effect": "3.14.21",
41
+ "effect": "3.17.7",
39
42
  "immer": "^10.1.1",
40
- "@dxos/ai": "0.8.3",
41
- "@dxos/app-framework": "0.8.3",
42
- "@dxos/artifact": "0.8.3",
43
- "@dxos/echo": "0.8.3",
44
- "@dxos/async": "0.8.3",
45
- "@dxos/debug": "0.8.3",
46
- "@dxos/echo-schema": "0.8.3",
47
- "@dxos/echo-signals": "0.8.3",
48
- "@dxos/invariant": "0.8.3",
49
- "@dxos/keyboard": "0.8.3",
50
- "@dxos/live-object": "0.8.3",
51
- "@dxos/local-storage": "0.8.3",
52
- "@dxos/log": "0.8.3",
53
- "@dxos/plugin-attention": "0.8.3",
54
- "@dxos/plugin-graph": "0.8.3",
55
- "@dxos/plugin-observability": "0.8.3",
56
- "@dxos/plugin-theme": "0.8.3",
57
- "@dxos/react-ui-attention": "0.8.3",
58
- "@dxos/react-client": "0.8.3",
59
- "@dxos/react-ui-form": "0.8.3",
60
- "@dxos/react-ui-stack": "0.8.3",
61
- "@dxos/react-ui-tabs": "0.8.3",
62
- "@dxos/react-ui-text-tooltip": "0.8.3",
63
- "@dxos/util": "0.8.3"
43
+ "@dxos/ai": "0.8.4-main.28f8d3d",
44
+ "@dxos/assistant": "0.8.4-main.28f8d3d",
45
+ "@dxos/app-framework": "0.8.4-main.28f8d3d",
46
+ "@dxos/async": "0.8.4-main.28f8d3d",
47
+ "@dxos/blueprints": "0.8.4-main.28f8d3d",
48
+ "@dxos/echo": "0.8.4-main.28f8d3d",
49
+ "@dxos/echo-schema": "0.8.4-main.28f8d3d",
50
+ "@dxos/echo-signals": "0.8.4-main.28f8d3d",
51
+ "@dxos/invariant": "0.8.4-main.28f8d3d",
52
+ "@dxos/debug": "0.8.4-main.28f8d3d",
53
+ "@dxos/keyboard": "0.8.4-main.28f8d3d",
54
+ "@dxos/live-object": "0.8.4-main.28f8d3d",
55
+ "@dxos/local-storage": "0.8.4-main.28f8d3d",
56
+ "@dxos/log": "0.8.4-main.28f8d3d",
57
+ "@dxos/plugin-attention": "0.8.4-main.28f8d3d",
58
+ "@dxos/plugin-graph": "0.8.4-main.28f8d3d",
59
+ "@dxos/plugin-observability": "0.8.4-main.28f8d3d",
60
+ "@dxos/plugin-theme": "0.8.4-main.28f8d3d",
61
+ "@dxos/react-client": "0.8.4-main.28f8d3d",
62
+ "@dxos/react-ui-attention": "0.8.4-main.28f8d3d",
63
+ "@dxos/react-ui-stack": "0.8.4-main.28f8d3d",
64
+ "@dxos/react-ui-tabs": "0.8.4-main.28f8d3d",
65
+ "@dxos/react-ui-text-tooltip": "0.8.4-main.28f8d3d",
66
+ "@dxos/util": "0.8.4-main.28f8d3d",
67
+ "@dxos/react-ui-form": "0.8.4-main.28f8d3d"
64
68
  },
65
69
  "devDependencies": {
66
- "@effect-rx/rx-react": "^0.34.1",
67
- "@effect/platform": "0.80.12",
68
- "@phosphor-icons/react": "^2.1.5",
70
+ "@effect-rx/rx-react": "0.38.0",
71
+ "@effect/platform": "0.90.2",
69
72
  "@types/react": "~18.2.0",
70
73
  "@types/react-dom": "~18.2.0",
71
74
  "react": "~18.2.0",
72
75
  "react-dom": "~18.2.0",
73
76
  "vite": "5.4.7",
74
- "@dxos/react-ui-theme": "0.8.3",
75
- "@dxos/react-ui": "0.8.3",
76
- "@dxos/storybook-utils": "0.8.3"
77
+ "@dxos/react-ui-theme": "0.8.4-main.28f8d3d",
78
+ "@dxos/react-ui": "0.8.4-main.28f8d3d",
79
+ "@dxos/storybook-utils": "0.8.4-main.28f8d3d"
77
80
  },
78
81
  "peerDependencies": {
79
82
  "@effect-rx/rx-react": "^0.34.1",
80
- "@effect/platform": "0.80.12",
81
- "@phosphor-icons/react": "^2.0.5",
83
+ "@effect/platform": "^0.80.12",
82
84
  "effect": "^3.13.3",
83
85
  "react": "~18.2.0",
84
86
  "react-dom": "~18.2.0",
85
- "@dxos/react-ui-theme": "0.8.3",
86
- "@dxos/react-ui": "0.8.3"
87
+ "@dxos/react-ui": "0.8.4-main.28f8d3d",
88
+ "@dxos/react-ui-theme": "0.8.4-main.28f8d3d"
87
89
  },
88
90
  "publishConfig": {
89
91
  "access": "public"
package/src/DeckPlugin.ts CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { setAutoFreeze } from 'immer';
6
6
 
7
- import { allOf, Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';
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,12 +15,12 @@ import {
15
15
  LayoutIntentResolver,
16
16
  ReactRoot,
17
17
  ReactSurface,
18
- Tools,
18
+ Toolkit,
19
19
  UrlHandler,
20
20
  } from './capabilities';
21
21
  import { DeckEvents } from './events';
22
22
  import { meta } from './meta';
23
- import translations from './translations';
23
+ import { translations } from './translations';
24
24
 
25
25
  // NOTE(Zan): When producing values with immer, we shouldn't auto-freeze them because
26
26
  // our signal implementation needs to add some hidden properties to the produced values.
@@ -73,10 +73,16 @@ export const DeckPlugin = () =>
73
73
  activatesOn: Events.SetupAppGraph,
74
74
  activate: AppGraphBuilder,
75
75
  }),
76
+ // defineModule({
77
+ // id: `${meta.id}/module/tools`,
78
+ // activatesOn: Events.SetupArtifactDefinition,
79
+ // activate: Tools,
80
+ // }),
76
81
  defineModule({
77
- id: `${meta.id}/module/tools`,
78
- activatesOn: Events.SetupArtifactDefinition,
79
- activate: Tools,
82
+ id: `${meta.id}/module/toolkit`,
83
+ // TODO(wittjosiah): Shouldn't use the startup event.
84
+ activatesOn: Events.Startup,
85
+ activate: Toolkit,
80
86
  }),
81
87
  defineModule({
82
88
  id: `${meta.id}/module/url`,
@@ -5,13 +5,14 @@
5
5
  import { Rx } from '@effect-rx/rx-react';
6
6
  import { Option, pipe } from 'effect';
7
7
 
8
- import { Capabilities, contributes, createIntent, LayoutAction, type PluginContext } from '@dxos/app-framework';
8
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
9
9
  import { AttentionCapabilities } from '@dxos/plugin-attention';
10
- import { createExtension, ROOT_ID, rxFromSignal } from '@dxos/plugin-graph';
10
+ import { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';
11
11
 
12
- import { DeckCapabilities } from './capabilities';
13
12
  import { DECK_PLUGIN } from '../meta';
14
13
 
14
+ import { DeckCapabilities } from './capabilities';
15
+
15
16
  export default (context: PluginContext) =>
16
17
  contributes(
17
18
  Capabilities.AppGraphBuilder,
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
5
+ import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
6
6
 
7
7
  import { DECK_PLUGIN } from '../meta';
8
8
  import { type DeckSettingsProps } from '../types';
@@ -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 { Schema, Effect, pipe, Option } from 'effect';
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
28
  import { DECK_PLUGIN } from '../meta';
30
29
  import {
31
30
  DeckAction,
32
- type LayoutMode,
33
31
  type DeckSettingsProps,
34
- isLayoutMode,
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({
@@ -92,7 +93,7 @@ export default (context: PluginContext) =>
92
93
  layout.complementarySidebarPanel = subject;
93
94
  }
94
95
 
95
- const next = subject ? 'expanded' : options?.state ?? layout.complementarySidebarState;
96
+ const next = subject ? 'expanded' : (options?.state ?? layout.complementarySidebarState);
96
97
  if (next !== layout.complementarySidebarState) {
97
98
  layout.complementarySidebarState = next;
98
99
  }
@@ -6,10 +6,11 @@ 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
10
  import { DECK_PLUGIN } from '../meta';
12
11
 
12
+ import { DeckCapabilities } from './capabilities';
13
+
13
14
  export default () =>
14
15
  contributes(Capabilities.ReactRoot, {
15
16
  id: DECK_PLUGIN,
@@ -7,7 +7,7 @@ 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 { DeckSettings, Banner } from '../components';
10
+ import { Banner, DeckSettings } from '../components';
11
11
  import { DECK_PLUGIN } from '../meta';
12
12
  import { type DeckSettingsProps } from '../types';
13
13
 
@@ -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 { DeckSettingsSchema, type DeckSettingsProps } from '../types';
9
+ import { type DeckSettingsProps, DeckSettingsSchema } from '../types';
10
10
 
11
11
  export default () => {
12
12
  const settings = live<DeckSettingsProps>({
@@ -8,9 +8,10 @@ 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 { DeckCapabilities } from './capabilities';
12
11
  import { DECK_PLUGIN } from '../meta';
13
- import { getMode, type DeckPluginState, defaultDeck, type DeckState } from '../types';
12
+ import { type DeckPluginState, type DeckState, defaultDeck, getMode } from '../types';
13
+
14
+ import { DeckCapabilities } from './capabilities';
14
15
 
15
16
  const boolean = /true|false/;
16
17
 
@@ -29,7 +30,7 @@ const migrateSidebarState = () => {
29
30
  });
30
31
  };
31
32
 
32
- const DeckStateFactory = () => {
33
+ export const DeckStateFactory = () => {
33
34
  migrateSidebarState();
34
35
 
35
36
  const state = new LocalStorageStore<DeckPluginState>(DECK_PLUGIN, {
@@ -0,0 +1,55 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { AiTool, AiToolkit } 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 AiToolkit.make(
16
+ AiTool.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. This will make the item appear alongside the primary content.
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.
@@ -2,12 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, createIntent, LayoutAction, type PluginContext } from '@dxos/app-framework';
5
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
6
6
  import { scheduledEffect } from '@dxos/echo-signals/core';
7
7
 
8
- import { DeckCapabilities } from './capabilities';
9
8
  import { defaultDeck } from '../types';
10
9
 
10
+ import { DeckCapabilities } from './capabilities';
11
+
11
12
  // TODO(wittjosiah): Cleanup the url handling. May justify introducing routing capabilities.
12
13
  export default async (context: PluginContext) => {
13
14
  const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { Surface } from '@dxos/app-framework';
8
- import { useTranslation, type ThemedClassName } from '@dxos/react-ui';
8
+ import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
9
9
  import { mx } from '@dxos/react-ui-theme';
10
10
 
11
11
  import { DECK_PLUGIN } from '../../meta';
@@ -10,8 +10,8 @@ import { DeckCapabilities } from '../../capabilities';
10
10
  import { useBreakpoints } from '../../hooks';
11
11
  import { getMode } from '../../types';
12
12
  import { layoutAppliesTopbar } from '../../util';
13
- import { ToggleSidebarButton } from '../Sidebar';
14
13
  import { fixedSidebarToggleStyles } from '../fragments';
14
+ import { ToggleSidebarButton } from '../Sidebar';
15
15
 
16
16
  export const ContentEmpty = () => {
17
17
  const breakpoint = useBreakpoints();
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { untracked } from '@preact/signals-core';
6
- import React, { useCallback, useEffect, useMemo, useRef, type UIEvent, Fragment } from 'react';
6
+ import React, { Fragment, type UIEvent, useCallback, useEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  import {
9
9
  Capabilities,
@@ -15,24 +15,25 @@ import {
15
15
  } from '@dxos/app-framework';
16
16
  import { AttentionCapabilities } from '@dxos/plugin-attention';
17
17
  import { Main, type MainProps, useMediaQuery, useOnTransition } from '@dxos/react-ui';
18
- import { Stack, StackContext, DEFAULT_HORIZONTAL_SIZE } from '@dxos/react-ui-stack';
18
+ import { DEFAULT_HORIZONTAL_SIZE, Stack, StackContext } from '@dxos/react-ui-stack';
19
19
  import { mainPaddingTransitions } from '@dxos/react-ui-theme';
20
20
 
21
- import { ActiveNode } from './ActiveNode';
22
- import { ContentEmpty } from './ContentEmpty';
23
- import { Dialog } from './Dialog';
24
- import { PopoverContent, PopoverRoot } from './Popover';
25
- import { StatusBar } from './StatusBar';
26
- import { Toast } from './Toast';
27
- import { Topbar } from './Topbar';
28
21
  import { DeckCapabilities } from '../../capabilities';
29
22
  import { useBreakpoints, useHoistStatusbar } from '../../hooks';
30
23
  import { DECK_PLUGIN } from '../../meta';
31
24
  import { type DeckSettingsProps, getMode } from '../../types';
32
25
  import { calculateOverscroll, layoutAppliesTopbar } from '../../util';
26
+ import { fixedComplementarySidebarToggleStyles, fixedSidebarToggleStyles } from '../fragments';
33
27
  import { Plank } from '../Plank';
34
28
  import { ComplementarySidebar, Sidebar, ToggleComplementarySidebarButton, ToggleSidebarButton } from '../Sidebar';
35
- import { fixedComplementarySidebarToggleStyles, fixedSidebarToggleStyles } from '../fragments';
29
+
30
+ import { ActiveNode } from './ActiveNode';
31
+ import { ContentEmpty } from './ContentEmpty';
32
+ import { Dialog } from './Dialog';
33
+ import { PopoverContent, PopoverRoot } from './Popover';
34
+ import { StatusBar } from './StatusBar';
35
+ import { Toast } from './Toast';
36
+ import { Topbar } from './Topbar';
36
37
 
37
38
  export type DeckLayoutProps = {
38
39
  onDismissToast: (id: string) => void;
@@ -95,7 +95,7 @@ export const PopoverContent = () => {
95
95
  hideWhenDetached
96
96
  >
97
97
  <Popover.Viewport>
98
- <Surface role='popover' data={layout.popoverContent} limit={1} />
98
+ <Surface role='card--popover' data={layout.popoverContent} limit={1} />
99
99
  </Popover.Viewport>
100
100
  <Popover.Arrow />
101
101
  </Popover.Content>
@@ -4,7 +4,7 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type StoryObj, type Meta } from '@storybook/react';
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
8
  import React from 'react';
9
9
 
10
10
  import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
@@ -12,11 +12,12 @@ import { withPluginManager } from '@dxos/app-framework/testing';
12
12
  import { AttentionPlugin } from '@dxos/plugin-attention';
13
13
  import { GraphPlugin } from '@dxos/plugin-graph';
14
14
  import { Stack } from '@dxos/react-ui-stack';
15
- import { withTheme, withLayout } from '@dxos/storybook-utils';
15
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
16
+
17
+ import { DeckStateFactory } from '../../capabilities';
18
+ import { translations } from '../../translations';
16
19
 
17
20
  import { Plank, type PlankProps } from './Plank';
18
- import DeckStateFactory from '../../capabilities/state';
19
- import translations from '../../translations';
20
21
 
21
22
  const meta: Meta<PlankProps> = {
22
23
  title: 'plugins/plugin-deck/Plank',
@@ -16,23 +16,24 @@ import {
16
16
  LayoutAction,
17
17
  Surface,
18
18
  createIntent,
19
- useCapability,
20
19
  useAppGraph,
20
+ useCapability,
21
21
  useIntentDispatcher,
22
22
  } from '@dxos/app-framework';
23
23
  import { debounce } from '@dxos/async';
24
- import { useNode, type Node } from '@dxos/plugin-graph';
24
+ import { type Node, useNode } from '@dxos/plugin-graph';
25
25
  import { ATTENDABLE_PATH_SEPARATOR, useAttentionAttributes } from '@dxos/react-ui-attention';
26
26
  import { StackItem, railGridHorizontal } from '@dxos/react-ui-stack';
27
27
  import { mainIntrinsicSize, mx } from '@dxos/react-ui-theme';
28
28
 
29
+ import { DeckCapabilities } from '../../capabilities';
30
+ import { useCompanions, useMainSize } from '../../hooks';
31
+ import { parseEntryId } from '../../layout';
32
+ import { DeckAction, type DeckSettingsProps, type LayoutMode, type ResolvedPart } from '../../types';
33
+
29
34
  import { PlankContentError, PlankError } from './PlankError';
30
35
  import { PlankHeading } from './PlankHeading';
31
36
  import { PlankLoading } from './PlankLoading';
32
- import { DeckCapabilities } from '../../capabilities';
33
- import { useMainSize, useCompanions } from '../../hooks';
34
- import { parseEntryId } from '../../layout';
35
- import { DeckAction, type LayoutMode, type ResolvedPart, type DeckSettingsProps } from '../../types';
36
37
 
37
38
  const UNKNOWN_ID = 'unknown_id';
38
39
 
@@ -8,19 +8,17 @@ import { type Node } from '@dxos/plugin-graph';
8
8
  import { useTranslation } from '@dxos/react-ui';
9
9
  import { descriptionMessage, mx } from '@dxos/react-ui-theme';
10
10
 
11
+ import { DECK_PLUGIN } from '../../meta';
12
+
11
13
  import { PlankHeading, type PlankHeadingProps } from './PlankHeading';
12
14
  import { PlankLoading } from './PlankLoading';
13
- import { DECK_PLUGIN } from '../../meta';
14
15
 
15
16
  export const PlankContentError = ({ error }: { error?: Error }) => {
16
17
  const { t } = useTranslation(DECK_PLUGIN);
17
18
  const errorString = error?.toString() ?? '';
18
19
  return (
19
- <div role='none' className='overflow-auto p-8 attention-surface grid place-items-center'>
20
- <p
21
- role='alert'
22
- className={mx(descriptionMessage, 'break-words rounded-md p-8', errorString.length < 256 && 'text-lg')}
23
- >
20
+ <div role='none' className='overflow-y-auto p-8 attention-surface grid place-items-center'>
21
+ <p role='alert' className={mx(descriptionMessage, 'break-all rounded-md p-4')}>
24
22
  {error ? errorString : t('error fallback message')}
25
23
  </p>
26
24
  </div>
@@ -2,22 +2,23 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import React, { Fragment, memo, useCallback, useEffect, useMemo, type MouseEvent } from 'react';
5
+ import React, { Fragment, type MouseEvent, memo, useCallback, useEffect, useMemo } from 'react';
6
6
 
7
- import { createIntent, LayoutAction, Surface, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
7
+ import { LayoutAction, Surface, createIntent, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
8
8
  import { type Node } from '@dxos/plugin-graph';
9
9
  import { Icon, IconButton, Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';
10
10
  import { StackItem, type StackItemSigilAction } from '@dxos/react-ui-stack';
11
11
  import { TextTooltip } from '@dxos/react-ui-text-tooltip';
12
12
  import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/react-ui-theme';
13
13
 
14
- import { PlankCompanionControls, PlankControls } from './PlankControls';
15
14
  import { useBreakpoints } from '../../hooks';
16
15
  import { parseEntryId } from '../../layout';
17
16
  import { DECK_PLUGIN } from '../../meta';
18
- import { PLANK_COMPANION_TYPE, DeckAction, type ResolvedPart, type LayoutMode } from '../../types';
17
+ import { DeckAction, type LayoutMode, PLANK_COMPANION_TYPE, type ResolvedPart } from '../../types';
19
18
  import { soloInlinePadding } from '../fragments';
20
19
 
20
+ import { PlankCompanionControls, PlankControls } from './PlankControls';
21
+
21
22
  const MAX_COMPANIONS = 5;
22
23
 
23
24
  export type PlankHeadingProps = {
@@ -105,7 +106,7 @@ export const PlankHeading = memo(
105
106
 
106
107
  const handleAction = useCallback(
107
108
  (action: StackItemSigilAction) => {
108
- typeof action.data === 'function' && action.data?.({ parent: node, caller: DECK_PLUGIN });
109
+ typeof action.data === 'function' && void action.data?.({ parent: node, caller: DECK_PLUGIN });
109
110
  },
110
111
  [node],
111
112
  );
@@ -155,7 +156,7 @@ export const PlankHeading = memo(
155
156
  return (
156
157
  <StackItem.Heading
157
158
  classNames={[
158
- 'plb-1 items-stretch gap-1 sticky inline-start-12 app-drag min-is-0 contain-layout',
159
+ 'plb-1 items-stretch gap-1 sticky inline-start-12 app-drag min-is-0 contain-layout density-coarse',
159
160
  part === 'solo' ? soloInlinePadding : 'pli-1',
160
161
  ...(layoutMode === 'solo--fullscreen'
161
162
  ? [