@dxos/plugin-sheet 0.8.4-main.dedc0f3 → 0.8.4-main.ead640a

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 (117) hide show
  1. package/dist/lib/browser/{SheetContainer-OUN6AARA.mjs → SheetContainer-VL34UND4.mjs} +12 -11
  2. package/dist/lib/browser/SheetContainer-VL34UND4.mjs.map +7 -0
  3. package/dist/lib/browser/{anchor-sort-7WD2VGXW.mjs → anchor-sort-3N44DS5F.mjs} +5 -5
  4. package/dist/lib/browser/{anchor-sort-7WD2VGXW.mjs.map → anchor-sort-3N44DS5F.mjs.map} +1 -1
  5. package/dist/lib/browser/{chunk-XSXUU6FO.mjs → chunk-ADK2HW4A.mjs} +7 -7
  6. package/dist/lib/browser/chunk-ADK2HW4A.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-6AKBCBL4.mjs → chunk-CSBSADPQ.mjs} +2 -4
  8. package/dist/lib/browser/chunk-CSBSADPQ.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-X4EWLDT3.mjs → chunk-ZJWJMX4E.mjs} +14 -13
  10. package/dist/lib/browser/chunk-ZJWJMX4E.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-KJWZUQVA.mjs → chunk-ZMPNHFIP.mjs} +4 -4
  12. package/dist/lib/browser/chunk-ZMPNHFIP.mjs.map +7 -0
  13. package/dist/lib/browser/compute-graph-registry-MF65HGGM.mjs +21 -0
  14. package/dist/lib/browser/compute-graph-registry-MF65HGGM.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +13 -13
  16. package/dist/lib/browser/index.mjs.map +3 -3
  17. package/dist/lib/browser/{intent-resolver-ROEY4LHM.mjs → intent-resolver-BQLV6IAA.mjs} +7 -7
  18. package/dist/lib/browser/intent-resolver-BQLV6IAA.mjs.map +7 -0
  19. package/dist/lib/browser/{markdown-VOY636TS.mjs → markdown-RMTMI237.mjs} +5 -5
  20. package/dist/lib/browser/{markdown-VOY636TS.mjs.map → markdown-RMTMI237.mjs.map} +1 -1
  21. package/dist/lib/browser/meta.json +1 -1
  22. package/dist/lib/browser/{react-surface-XCNAVF2M.mjs → react-surface-7ZDMQDCT.mjs} +10 -10
  23. package/dist/lib/browser/react-surface-7ZDMQDCT.mjs.map +7 -0
  24. package/dist/lib/browser/types/index.mjs +2 -2
  25. package/dist/lib/node-esm/{SheetContainer-NFLLTGNV.mjs → SheetContainer-NWJ7L6FC.mjs} +12 -11
  26. package/dist/lib/node-esm/SheetContainer-NWJ7L6FC.mjs.map +7 -0
  27. package/dist/lib/node-esm/{anchor-sort-ACQDUIPU.mjs → anchor-sort-YL2OZHYM.mjs} +5 -5
  28. package/dist/lib/node-esm/{anchor-sort-ACQDUIPU.mjs.map → anchor-sort-YL2OZHYM.mjs.map} +1 -1
  29. package/dist/lib/node-esm/{chunk-ODP4L4OV.mjs → chunk-BZAPYBSH.mjs} +7 -7
  30. package/dist/lib/node-esm/chunk-BZAPYBSH.mjs.map +7 -0
  31. package/dist/lib/node-esm/{chunk-3K5VNYOF.mjs → chunk-H3GSD33H.mjs} +2 -4
  32. package/dist/lib/node-esm/chunk-H3GSD33H.mjs.map +7 -0
  33. package/dist/lib/node-esm/{chunk-6SK5LJ5S.mjs → chunk-LN6ZSAII.mjs} +4 -4
  34. package/dist/lib/node-esm/chunk-LN6ZSAII.mjs.map +7 -0
  35. package/dist/lib/node-esm/{chunk-PYF4ZJXN.mjs → chunk-YL7BVJPC.mjs} +14 -13
  36. package/dist/lib/node-esm/chunk-YL7BVJPC.mjs.map +7 -0
  37. package/dist/lib/node-esm/compute-graph-registry-P2O5LDFZ.mjs +22 -0
  38. package/dist/lib/node-esm/compute-graph-registry-P2O5LDFZ.mjs.map +7 -0
  39. package/dist/lib/node-esm/index.mjs +13 -13
  40. package/dist/lib/node-esm/index.mjs.map +3 -3
  41. package/dist/lib/node-esm/{intent-resolver-HESRI2ML.mjs → intent-resolver-MV5ZFXAQ.mjs} +7 -7
  42. package/dist/lib/node-esm/intent-resolver-MV5ZFXAQ.mjs.map +7 -0
  43. package/dist/lib/node-esm/{markdown-P4CLZ24C.mjs → markdown-EDIWHA3P.mjs} +5 -5
  44. package/dist/lib/node-esm/{markdown-P4CLZ24C.mjs.map → markdown-EDIWHA3P.mjs.map} +1 -1
  45. package/dist/lib/node-esm/meta.json +1 -1
  46. package/dist/lib/node-esm/{react-surface-KE3EEVF4.mjs → react-surface-TUME5MM2.mjs} +10 -10
  47. package/dist/lib/node-esm/react-surface-TUME5MM2.mjs.map +7 -0
  48. package/dist/lib/node-esm/types/index.mjs +2 -2
  49. package/dist/types/src/SheetPlugin.d.ts +1 -1
  50. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -1
  52. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts +0 -1
  53. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
  54. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +1 -1
  55. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
  56. package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts +1 -2
  57. package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
  59. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +3 -3
  60. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
  61. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +1 -2
  62. package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
  63. package/dist/types/src/extensions/compute.stories.d.ts +2 -3
  64. package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
  65. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  66. package/dist/types/src/meta.d.ts +0 -1
  67. package/dist/types/src/meta.d.ts.map +1 -1
  68. package/dist/types/src/model/sheet-model.d.ts +1 -1
  69. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  70. package/dist/types/src/testing/testing.d.ts +1 -1
  71. package/dist/types/src/testing/testing.d.ts.map +1 -1
  72. package/dist/types/src/types/schema.d.ts +1 -1
  73. package/dist/types/src/types/schema.d.ts.map +1 -1
  74. package/dist/types/src/types/types.d.ts +7 -7
  75. package/dist/types/src/types/types.d.ts.map +1 -1
  76. package/dist/types/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +61 -61
  78. package/src/SheetPlugin.tsx +69 -60
  79. package/src/capabilities/capabilities.ts +2 -2
  80. package/src/capabilities/compute-graph-registry.ts +8 -13
  81. package/src/capabilities/intent-resolver.ts +2 -2
  82. package/src/capabilities/react-surface.tsx +3 -3
  83. package/src/components/ComputeGraph/compute-graph.stories.tsx +2 -4
  84. package/src/components/GridSheet/GridSheet.stories.tsx +11 -8
  85. package/src/components/GridSheet/GridSheet.tsx +4 -4
  86. package/src/components/GridSheet/SheetCellEditor.stories.tsx +3 -4
  87. package/src/components/RangeList/RangeList.tsx +3 -3
  88. package/src/components/SheetContainer/SheetContainer.stories.tsx +38 -40
  89. package/src/components/SheetContainer/SheetContainer.tsx +5 -1
  90. package/src/components/SheetToolbar/SheetToolbar.stories.tsx +9 -6
  91. package/src/components/SheetToolbar/align.ts +3 -3
  92. package/src/components/SheetToolbar/style.ts +2 -2
  93. package/src/extensions/compute.stories.tsx +13 -10
  94. package/src/integrations/thread-ranges.ts +5 -4
  95. package/src/meta.ts +1 -3
  96. package/src/model/sheet-model.ts +1 -1
  97. package/src/testing/testing.tsx +8 -2
  98. package/src/types/schema.ts +1 -1
  99. package/src/types/types.ts +3 -3
  100. package/dist/lib/browser/SheetContainer-OUN6AARA.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-6AKBCBL4.mjs.map +0 -7
  102. package/dist/lib/browser/chunk-KJWZUQVA.mjs.map +0 -7
  103. package/dist/lib/browser/chunk-X4EWLDT3.mjs.map +0 -7
  104. package/dist/lib/browser/chunk-XSXUU6FO.mjs.map +0 -7
  105. package/dist/lib/browser/compute-graph-registry-6YJHXORG.mjs +0 -30
  106. package/dist/lib/browser/compute-graph-registry-6YJHXORG.mjs.map +0 -7
  107. package/dist/lib/browser/intent-resolver-ROEY4LHM.mjs.map +0 -7
  108. package/dist/lib/browser/react-surface-XCNAVF2M.mjs.map +0 -7
  109. package/dist/lib/node-esm/SheetContainer-NFLLTGNV.mjs.map +0 -7
  110. package/dist/lib/node-esm/chunk-3K5VNYOF.mjs.map +0 -7
  111. package/dist/lib/node-esm/chunk-6SK5LJ5S.mjs.map +0 -7
  112. package/dist/lib/node-esm/chunk-ODP4L4OV.mjs.map +0 -7
  113. package/dist/lib/node-esm/chunk-PYF4ZJXN.mjs.map +0 -7
  114. package/dist/lib/node-esm/compute-graph-registry-ET5KJNLV.mjs +0 -31
  115. package/dist/lib/node-esm/compute-graph-registry-ET5KJNLV.mjs.map +0 -7
  116. package/dist/lib/node-esm/intent-resolver-HESRI2ML.mjs.map +0 -7
  117. package/dist/lib/node-esm/react-surface-KE3EEVF4.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-sheet",
3
- "version": "0.8.4-main.dedc0f3",
3
+ "version": "0.8.4-main.ead640a",
4
4
  "description": "Braneframe sketch plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -35,10 +35,10 @@
35
35
  "src"
36
36
  ],
37
37
  "dependencies": {
38
- "@codemirror/autocomplete": "^6.18.7",
38
+ "@codemirror/autocomplete": "^6.19.0",
39
39
  "@codemirror/language": "^6.11.3",
40
40
  "@codemirror/state": "^6.5.2",
41
- "@codemirror/view": "^6.38.2",
41
+ "@codemirror/view": "^6.38.4",
42
42
  "@dnd-kit/core": "^6.0.5",
43
43
  "@dnd-kit/modifiers": "^6.0.0",
44
44
  "@dnd-kit/sortable": "^7.0.1",
@@ -48,81 +48,81 @@
48
48
  "@lezer/lezer": "^1.1.2",
49
49
  "@lezer/lr": "^1.4.2",
50
50
  "@preact-signals/safe-react": "^0.9.0",
51
- "@preact/signals-core": "^1.9.0",
51
+ "@preact/signals-core": "^1.12.1",
52
52
  "@radix-ui/react-context": "1.1.1",
53
53
  "codemirror-lang-spreadsheet": "^1.3.0",
54
54
  "date-fns": "^3.3.1",
55
55
  "lodash.defaultsdeep": "^4.6.1",
56
56
  "re-resizable": "^6.9.17",
57
- "react-markdown": "^8.0.5",
57
+ "react-markdown": "^10.1.0",
58
58
  "react-resize-detector": "^11.0.1",
59
- "@dxos/app-framework": "0.8.4-main.dedc0f3",
60
- "@dxos/async": "0.8.4-main.dedc0f3",
61
- "@dxos/client": "0.8.4-main.dedc0f3",
62
- "@dxos/compute": "0.8.4-main.dedc0f3",
63
- "@dxos/context": "0.8.4-main.dedc0f3",
64
- "@dxos/crypto": "0.8.4-main.dedc0f3",
65
- "@dxos/debug": "0.8.4-main.dedc0f3",
66
- "@dxos/echo": "0.8.4-main.dedc0f3",
67
- "@dxos/echo-schema": "0.8.4-main.dedc0f3",
68
- "@dxos/invariant": "0.8.4-main.dedc0f3",
69
- "@dxos/functions": "0.8.4-main.dedc0f3",
70
- "@dxos/lit-grid": "0.8.4-main.dedc0f3",
71
- "@dxos/live-object": "0.8.4-main.dedc0f3",
72
- "@dxos/keys": "0.8.4-main.dedc0f3",
73
- "@dxos/log": "0.8.4-main.dedc0f3",
74
- "@dxos/plugin-attention": "0.8.4-main.dedc0f3",
75
- "@dxos/plugin-client": "0.8.4-main.dedc0f3",
76
- "@dxos/plugin-graph": "0.8.4-main.dedc0f3",
77
- "@dxos/plugin-markdown": "0.8.4-main.dedc0f3",
78
- "@dxos/plugin-deck": "0.8.4-main.dedc0f3",
79
- "@dxos/plugin-space": "0.8.4-main.dedc0f3",
80
- "@dxos/plugin-script": "0.8.4-main.dedc0f3",
81
- "@dxos/plugin-thread": "0.8.4-main.dedc0f3",
82
- "@dxos/plugin-stack": "0.8.4-main.dedc0f3",
83
- "@dxos/react-client": "0.8.4-main.dedc0f3",
84
- "@dxos/react-hooks": "0.8.4-main.dedc0f3",
85
- "@dxos/react-ui-attention": "0.8.4-main.dedc0f3",
86
- "@dxos/react-ui-editor": "0.8.4-main.dedc0f3",
87
- "@dxos/react-ui-form": "0.8.4-main.dedc0f3",
88
- "@dxos/react-ui-grid": "0.8.4-main.dedc0f3",
89
- "@dxos/react-ui-list": "0.8.4-main.dedc0f3",
90
- "@dxos/react-ui-menu": "0.8.4-main.dedc0f3",
91
- "@dxos/schema": "0.8.4-main.dedc0f3",
92
- "@dxos/util": "0.8.4-main.dedc0f3",
93
- "@dxos/react-ui-stack": "0.8.4-main.dedc0f3"
59
+ "@dxos/app-framework": "0.8.4-main.ead640a",
60
+ "@dxos/async": "0.8.4-main.ead640a",
61
+ "@dxos/client": "0.8.4-main.ead640a",
62
+ "@dxos/context": "0.8.4-main.ead640a",
63
+ "@dxos/crypto": "0.8.4-main.ead640a",
64
+ "@dxos/compute": "0.8.4-main.ead640a",
65
+ "@dxos/echo": "0.8.4-main.ead640a",
66
+ "@dxos/invariant": "0.8.4-main.ead640a",
67
+ "@dxos/keys": "0.8.4-main.ead640a",
68
+ "@dxos/lit-grid": "0.8.4-main.ead640a",
69
+ "@dxos/functions": "0.8.4-main.ead640a",
70
+ "@dxos/live-object": "0.8.4-main.ead640a",
71
+ "@dxos/log": "0.8.4-main.ead640a",
72
+ "@dxos/plugin-attention": "0.8.4-main.ead640a",
73
+ "@dxos/plugin-automation": "0.8.4-main.ead640a",
74
+ "@dxos/plugin-client": "0.8.4-main.ead640a",
75
+ "@dxos/plugin-deck": "0.8.4-main.ead640a",
76
+ "@dxos/debug": "0.8.4-main.ead640a",
77
+ "@dxos/plugin-graph": "0.8.4-main.ead640a",
78
+ "@dxos/plugin-markdown": "0.8.4-main.ead640a",
79
+ "@dxos/plugin-script": "0.8.4-main.ead640a",
80
+ "@dxos/plugin-space": "0.8.4-main.ead640a",
81
+ "@dxos/plugin-stack": "0.8.4-main.ead640a",
82
+ "@dxos/plugin-thread": "0.8.4-main.ead640a",
83
+ "@dxos/react-client": "0.8.4-main.ead640a",
84
+ "@dxos/react-hooks": "0.8.4-main.ead640a",
85
+ "@dxos/react-ui-attention": "0.8.4-main.ead640a",
86
+ "@dxos/react-ui-editor": "0.8.4-main.ead640a",
87
+ "@dxos/react-ui-grid": "0.8.4-main.ead640a",
88
+ "@dxos/react-ui-list": "0.8.4-main.ead640a",
89
+ "@dxos/react-ui-form": "0.8.4-main.ead640a",
90
+ "@dxos/react-ui-menu": "0.8.4-main.ead640a",
91
+ "@dxos/react-ui-stack": "0.8.4-main.ead640a",
92
+ "@dxos/schema": "0.8.4-main.ead640a",
93
+ "@dxos/util": "0.8.4-main.ead640a"
94
94
  },
95
95
  "devDependencies": {
96
- "@effect-rx/rx-react": "0.38.0",
97
- "@effect/platform": "0.90.2",
96
+ "@effect-rx/rx-react": "0.42.4",
97
+ "@effect/platform": "0.92.1",
98
98
  "@lezer/generator": "^1.7.1",
99
99
  "@tldraw/indices": "^2.0.0-alpha.14",
100
100
  "@types/lodash.defaultsdeep": "^4.6.6",
101
- "@types/react": "~18.2.0",
102
- "@types/react-dom": "~18.2.0",
101
+ "@types/react": "~19.2.2",
102
+ "@types/react-dom": "~19.2.1",
103
103
  "@types/react-window": "^1.8.8",
104
- "effect": "3.17.7",
105
- "react": "~18.2.0",
106
- "react-dom": "~18.2.0",
107
- "vite": "7.1.1",
108
- "@dxos/echo-generator": "0.8.4-main.dedc0f3",
109
- "@dxos/lit-grid": "0.8.4-main.dedc0f3",
110
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
111
- "@dxos/random": "0.8.4-main.dedc0f3",
112
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.dedc0f3",
113
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3",
114
- "@dxos/react-ui-types": "0.8.4-main.dedc0f3",
115
- "@dxos/storybook-utils": "0.8.4-main.dedc0f3",
116
- "@dxos/test-utils": "0.8.4-main.dedc0f3"
104
+ "effect": "3.18.3",
105
+ "react": "~19.2.0",
106
+ "react-dom": "~19.2.0",
107
+ "vite": "7.1.9",
108
+ "@dxos/echo-generator": "0.8.4-main.ead640a",
109
+ "@dxos/lit-grid": "0.8.4-main.ead640a",
110
+ "@dxos/react-ui": "0.8.4-main.ead640a",
111
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a",
112
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.ead640a",
113
+ "@dxos/react-ui-types": "0.8.4-main.ead640a",
114
+ "@dxos/random": "0.8.4-main.ead640a",
115
+ "@dxos/storybook-utils": "0.8.4-main.ead640a",
116
+ "@dxos/test-utils": "0.8.4-main.ead640a"
117
117
  },
118
118
  "peerDependencies": {
119
119
  "@effect-rx/rx-react": "^0.34.1",
120
120
  "@effect/platform": "^0.80.12",
121
121
  "effect": "^3.13.3",
122
- "react": "~18.2.0",
123
- "react-dom": "~18.2.0",
124
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
125
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
122
+ "react": "^19.0.0",
123
+ "react-dom": "^19.0.0",
124
+ "@dxos/react-ui": "0.8.4-main.ead640a",
125
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a"
126
126
  },
127
127
  "publishConfig": {
128
128
  "access": "public"
@@ -2,7 +2,16 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import {
6
+ Capabilities,
7
+ Events,
8
+ allOf,
9
+ contributes,
10
+ createIntent,
11
+ defineModule,
12
+ definePlugin,
13
+ } from '@dxos/app-framework';
14
+ import { AutomationEvents } from '@dxos/plugin-automation';
6
15
  import { ClientEvents } from '@dxos/plugin-client';
7
16
  import { MarkdownEvents } from '@dxos/plugin-markdown';
8
17
  import { SpaceCapabilities } from '@dxos/plugin-space';
@@ -14,63 +23,63 @@ import { serializer } from './serializer';
14
23
  import { translations } from './translations';
15
24
  import { SheetAction, SheetType } from './types';
16
25
 
17
- export const SheetPlugin = () =>
18
- definePlugin(meta, [
19
- defineModule({
20
- id: `${meta.id}/module/compute-graph-registry`,
21
- activatesOn: ClientEvents.ClientReady,
22
- activate: ComputeGraphRegistry,
23
- }),
24
- defineModule({
25
- id: `${meta.id}/module/translations`,
26
- activatesOn: Events.SetupTranslations,
27
- activate: () => contributes(Capabilities.Translations, translations),
28
- }),
29
- defineModule({
30
- id: `${meta.id}/module/metadata`,
31
- activatesOn: Events.SetupMetadata,
32
- activate: () =>
33
- contributes(Capabilities.Metadata, {
34
- id: SheetType.typename,
35
- metadata: {
36
- label: (object: SheetType) => object.name,
37
- icon: 'ph--grid-nine--regular',
38
- serializer,
39
- comments: 'anchored',
40
- },
26
+ export const SheetPlugin = definePlugin(meta, () => [
27
+ defineModule({
28
+ id: `${meta.id}/module/compute-graph-registry`,
29
+ activatesOn: allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
30
+ activate: ComputeGraphRegistry,
31
+ }),
32
+ defineModule({
33
+ id: `${meta.id}/module/translations`,
34
+ activatesOn: Events.SetupTranslations,
35
+ activate: () => contributes(Capabilities.Translations, translations),
36
+ }),
37
+ defineModule({
38
+ id: `${meta.id}/module/metadata`,
39
+ activatesOn: Events.SetupMetadata,
40
+ activate: () =>
41
+ contributes(Capabilities.Metadata, {
42
+ id: SheetType.typename,
43
+ metadata: {
44
+ label: (object: SheetType) => object.name,
45
+ icon: 'ph--grid-nine--regular',
46
+ iconClassName: 'text-skySurfaceText',
47
+ serializer,
48
+ comments: 'anchored',
49
+ },
50
+ }),
51
+ }),
52
+ defineModule({
53
+ id: `${meta.id}/module/object-form`,
54
+ activatesOn: ClientEvents.SetupSchema,
55
+ activate: () =>
56
+ contributes(
57
+ SpaceCapabilities.ObjectForm,
58
+ defineObjectForm({
59
+ objectSchema: SheetType,
60
+ getIntent: (props, options) => createIntent(SheetAction.Create, { ...props, space: options.space }),
41
61
  }),
42
- }),
43
- defineModule({
44
- id: `${meta.id}/module/object-form`,
45
- activatesOn: ClientEvents.SetupSchema,
46
- activate: () =>
47
- contributes(
48
- SpaceCapabilities.ObjectForm,
49
- defineObjectForm({
50
- objectSchema: SheetType,
51
- getIntent: (props, options) => createIntent(SheetAction.Create, { ...props, space: options.space }),
52
- }),
53
- ),
54
- }),
55
- defineModule({
56
- id: `${meta.id}/module/markdown`,
57
- activatesOn: MarkdownEvents.SetupExtensions,
58
- activate: Markdown,
59
- }),
60
- defineModule({
61
- id: `${meta.id}/module/anchor-sort`,
62
- // TODO(wittjosiah): More relevant event?
63
- activatesOn: Events.AppGraphReady,
64
- activate: AnchorSort,
65
- }),
66
- defineModule({
67
- id: `${meta.id}/module/react-surface`,
68
- activatesOn: Events.SetupReactSurface,
69
- activate: ReactSurface,
70
- }),
71
- defineModule({
72
- id: `${meta.id}/module/intent-resolver`,
73
- activatesOn: Events.SetupIntentResolver,
74
- activate: IntentResolver,
75
- }),
76
- ]);
62
+ ),
63
+ }),
64
+ defineModule({
65
+ id: `${meta.id}/module/markdown`,
66
+ activatesOn: MarkdownEvents.SetupExtensions,
67
+ activate: Markdown,
68
+ }),
69
+ defineModule({
70
+ id: `${meta.id}/module/anchor-sort`,
71
+ // TODO(wittjosiah): More relevant event?
72
+ activatesOn: Events.AppGraphReady,
73
+ activate: AnchorSort,
74
+ }),
75
+ defineModule({
76
+ id: `${meta.id}/module/react-surface`,
77
+ activatesOn: Events.SetupReactSurface,
78
+ activate: ReactSurface,
79
+ }),
80
+ defineModule({
81
+ id: `${meta.id}/module/intent-resolver`,
82
+ activatesOn: Events.SetupIntentResolver,
83
+ activate: IntentResolver,
84
+ }),
85
+ ]);
@@ -5,10 +5,10 @@
5
5
  import { defineCapability } from '@dxos/app-framework';
6
6
  import { type ComputeGraphRegistry } from '@dxos/compute';
7
7
 
8
- import { SHEET_PLUGIN } from '../meta';
8
+ import { meta } from '../meta';
9
9
 
10
10
  export namespace SheetCapabilities {
11
11
  export const ComputeGraphRegistry = defineCapability<ComputeGraphRegistry>(
12
- `${SHEET_PLUGIN}/capability/compute-graph-registry`,
12
+ `${meta.id}/capability/compute-graph-registry`,
13
13
  );
14
14
  }
@@ -3,26 +3,21 @@
3
3
  //
4
4
 
5
5
  import { type PluginContext, contributes } from '@dxos/app-framework';
6
- import { ClientCapabilities } from '@dxos/plugin-client';
6
+ import { AutomationCapabilities } from '@dxos/plugin-automation';
7
7
 
8
8
  import { SheetCapabilities } from './capabilities';
9
9
 
10
- const isSecure = (protocol: string) => {
11
- return protocol === 'https:' || protocol === 'wss:';
12
- };
10
+ // Locally declare the Automation ComputeRuntime capability by ID to avoid direct import dependency.
13
11
 
14
12
  export default async (context: PluginContext) => {
15
- const client = context.getCapability(ClientCapabilities.Client);
16
- let remoteFunctionUrl: string | undefined;
17
- if (client.config.values.runtime?.services?.edge?.url) {
18
- const url = new URL('/functions', client.config.values.runtime?.services?.edge?.url);
19
- url.protocol = isSecure(url.protocol) ? 'https' : 'http';
20
- remoteFunctionUrl = url.toString();
21
- }
22
-
23
13
  // TODO(wittjosiah): This can probably be a module level import now due to lazy capability loading.
24
14
  // Async import removes direct dependency on hyperformula.
25
15
  const { defaultPlugins, ComputeGraphRegistry } = await import('@dxos/compute');
26
- const computeGraphRegistry = new ComputeGraphRegistry({ plugins: defaultPlugins, remoteFunctionUrl });
16
+ const computeRuntimeResolver = context.getCapability(AutomationCapabilities.ComputeRuntime);
17
+
18
+ const computeGraphRegistry = new ComputeGraphRegistry({
19
+ plugins: defaultPlugins,
20
+ computeRuntime: computeRuntimeResolver,
21
+ });
27
22
  return contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
28
23
  };
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
6
6
 
7
- import { SHEET_PLUGIN } from '../meta';
7
+ import { meta } from '../meta';
8
8
  import { SheetAction, createSheet } from '../types';
9
9
 
10
10
  export default () =>
@@ -26,7 +26,7 @@ export default () =>
26
26
  const undoData = model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);
27
27
  return {
28
28
  undoable: {
29
- message: [`${axis} dropped label`, { ns: SHEET_PLUGIN }],
29
+ message: [`${axis} dropped label`, { ns: meta.id }],
30
30
  data: { ...undoData, model },
31
31
  },
32
32
  };
@@ -9,7 +9,7 @@ import { Obj } from '@dxos/echo';
9
9
  import { getSpace } from '@dxos/react-client/echo';
10
10
 
11
11
  import { ComputeGraphContextProvider, RangeList, SheetContainer } from '../components';
12
- import { SHEET_PLUGIN } from '../meta';
12
+ import { meta } from '../meta';
13
13
  import { SheetType } from '../types';
14
14
 
15
15
  import { SheetCapabilities } from './capabilities';
@@ -17,7 +17,7 @@ import { SheetCapabilities } from './capabilities';
17
17
  export default () =>
18
18
  contributes(Capabilities.ReactSurface, [
19
19
  createSurface({
20
- id: `${SHEET_PLUGIN}/sheet`,
20
+ id: `${meta.id}/sheet`,
21
21
  role: ['article', 'section'],
22
22
  filter: (data): data is { subject: SheetType } =>
23
23
  Obj.instanceOf(SheetType, data.subject) && !!getSpace(data.subject),
@@ -32,7 +32,7 @@ export default () =>
32
32
  },
33
33
  }),
34
34
  createSurface({
35
- id: `${SHEET_PLUGIN}/object-settings`,
35
+ id: `${meta.id}/object-settings`,
36
36
  role: 'object-settings',
37
37
  filter: (data): data is { subject: SheetType } => Obj.instanceOf(SheetType, data.subject),
38
38
  component: ({ data }) => <RangeList sheet={data.subject} />,
@@ -2,8 +2,6 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React, { useEffect, useRef, useState } from 'react';
9
7
 
@@ -13,8 +11,8 @@ import { FunctionType } from '@dxos/functions';
13
11
  import { useSpace } from '@dxos/react-client/echo';
14
12
  import { withClientProvider } from '@dxos/react-client/testing';
15
13
  import { Button, Input, Toolbar } from '@dxos/react-ui';
14
+ import { withTheme } from '@dxos/react-ui/testing';
16
15
  import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
17
- import { withTheme } from '@dxos/storybook-utils';
18
16
 
19
17
  import { useSheetModel } from '../../model';
20
18
  import { withComputeGraphDecorator } from '../../testing';
@@ -89,9 +87,9 @@ const meta = {
89
87
  title: 'plugins/plugin-sheet/functions',
90
88
  render: DefaultStory,
91
89
  decorators: [
90
+ withTheme,
92
91
  withClientProvider({ types: [FunctionType, SheetType], createIdentity: true, createSpace: true }),
93
92
  withComputeGraphDecorator({ plugins: testFunctionPlugins }),
94
- withTheme,
95
93
  ],
96
94
  } satisfies Meta<typeof DefaultStory>;
97
95
 
@@ -2,16 +2,15 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React from 'react';
9
7
 
10
8
  import { IntentPlugin } from '@dxos/app-framework';
11
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
+ import { testFunctionPlugins } from '@dxos/compute/testing';
12
11
  import { useSpace } from '@dxos/react-client/echo';
13
12
  import { withClientProvider } from '@dxos/react-client/testing';
14
- import { withLayout, withTheme } from '@dxos/storybook-utils';
13
+ import { withTheme } from '@dxos/react-ui/testing';
15
14
 
16
15
  import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
17
16
  import { translations } from '../../translations';
@@ -31,7 +30,9 @@ export const Basic = () => {
31
30
 
32
31
  return (
33
32
  <SheetProvider graph={graph} sheet={sheet} ignoreAttention>
34
- <GridSheet />
33
+ <div role='none' className='grid bs-full is-full'>
34
+ <GridSheet />
35
+ </div>
35
36
  </SheetProvider>
36
37
  );
37
38
  };
@@ -40,15 +41,17 @@ const meta = {
40
41
  title: 'plugins/plugin-sheet/GridSheet',
41
42
  component: GridSheet,
42
43
  decorators: [
43
- withClientProvider({ types: [SheetType], createSpace: true }),
44
- withComputeGraphDecorator(),
45
44
  withTheme,
46
- withLayout({ fullscreen: true, classNames: 'grid' }),
45
+ withClientProvider({ types: [SheetType], createSpace: true }),
46
+ withComputeGraphDecorator({ plugins: testFunctionPlugins }),
47
47
  withPluginManager({
48
48
  plugins: [IntentPlugin()],
49
49
  }),
50
50
  ],
51
- parameters: { translations },
51
+ parameters: {
52
+ layout: 'fullscreen',
53
+ translations,
54
+ },
52
55
  } satisfies Meta<typeof GridSheet>;
53
56
 
54
57
  export default meta;
@@ -34,7 +34,7 @@ import {
34
34
 
35
35
  import { type RangeController, rangeExtension, sheetExtension } from '../../extensions';
36
36
  import { useSelectThreadOnCellFocus, useUpdateFocusedCellOnThreadSelection } from '../../integrations';
37
- import { SHEET_PLUGIN } from '../../meta';
37
+ import { meta } from '../../meta';
38
38
  import { DEFAULT_COLS, DEFAULT_ROWS, SheetAction } from '../../types';
39
39
  import { useSheetContext } from '../SheetContext';
40
40
 
@@ -69,7 +69,7 @@ const sheetRowDefault = {
69
69
  };
70
70
 
71
71
  export const GridSheet = () => {
72
- const { t } = useTranslation(SHEET_PLUGIN);
72
+ const { t } = useTranslation(meta.id);
73
73
  const { id, model, editing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs, ignoreAttention } =
74
74
  useSheetContext();
75
75
  // NOTE(thure): using `useState` instead of `useRef` works with refs provided by `@lit/react` and gives us
@@ -77,7 +77,7 @@ export const GridSheet = () => {
77
77
  const [dxGrid, setDxGrid] = useState<DxGridElement | null>(null);
78
78
  const [extraplanarFocus, setExtraplanarFocus] = useState<DxGridPosition | null>(null);
79
79
  const { dispatchPromise: dispatch } = useIntentDispatcher();
80
- const rangeController = useRef<RangeController>();
80
+ const rangeController = useRef<RangeController>(null);
81
81
  const { hasAttention } = useAttention(id);
82
82
 
83
83
  const handleFocus = useCallback(
@@ -308,7 +308,7 @@ export const GridSheet = () => {
308
308
 
309
309
  return (
310
310
  // TODO(thure): Why are Table’s and Sheet’s editor boxes off by 1px?
311
- <div role='none' className='relative min-bs-0 [&_.cm-editor]:!border-lb [&_.cm-editor]:!border-transparent '>
311
+ <div role='none' className='relative min-bs-0 [&_.cm-editor]:!border-lb [&_.cm-editor]:!border-transparent'>
312
312
  <GridCellEditor getCellContent={getCellContent} extensions={extensions} onBlur={handleBlur} />
313
313
  <Grid.Content
314
314
  initialCells={initialCells}
@@ -2,8 +2,6 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React, { useMemo, useState } from 'react';
9
7
 
@@ -12,9 +10,9 @@ import { createDocAccessor } from '@dxos/client/echo';
12
10
  import { defaultFunctions } from '@dxos/compute';
13
11
  import { getRegisteredFunctionNames } from '@dxos/compute/testing';
14
12
  import { useAsyncEffect } from '@dxos/react-hooks';
13
+ import { withTheme } from '@dxos/react-ui/testing';
15
14
  import { automerge } from '@dxos/react-ui-editor';
16
15
  import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
17
- import { withTheme } from '@dxos/storybook-utils';
18
16
 
19
17
  import { sheetExtension } from '../../extensions';
20
18
  import { SheetType, createSheet } from '../../types';
@@ -61,9 +59,10 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
61
59
 
62
60
  const meta = {
63
61
  title: 'plugins/plugin-sheet/CellEditor',
62
+
63
+ decorators: [withTheme],
64
64
  component: CellEditor,
65
65
  render: DefaultStory,
66
- decorators: [withTheme],
67
66
  } satisfies Meta<typeof DefaultStory>;
68
67
 
69
68
  export default meta;
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
  import React, { useCallback } from 'react';
7
7
 
8
8
  import { rangeToA1Notation } from '@dxos/compute';
@@ -10,7 +10,7 @@ import { Callout, useTranslation } from '@dxos/react-ui';
10
10
  import { List } from '@dxos/react-ui-list';
11
11
  import { ghostHover } from '@dxos/react-ui-theme';
12
12
 
13
- import { SHEET_PLUGIN } from '../../meta';
13
+ import { meta } from '../../meta';
14
14
  import { rangeFromIndex } from '../../types';
15
15
  import { Range, type SheetType } from '../../types';
16
16
 
@@ -19,7 +19,7 @@ export type RangeListProps = {
19
19
  };
20
20
 
21
21
  export const RangeList = ({ sheet }: RangeListProps) => {
22
- const { t } = useTranslation(SHEET_PLUGIN);
22
+ const { t } = useTranslation(meta.id);
23
23
  // TODO(thure): Implement similar to comments, #8121
24
24
  const handleSelectRange = (range: Range) => {};
25
25
  const handleDeleteRange = useCallback(