@dxos/plugin-sheet 0.8.4-main.21d9917 → 0.8.4-main.2244d791bb

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 (98) hide show
  1. package/dist/lib/browser/{SheetContainer-ESCXPI7Y.mjs → SheetContainer-6DNFC4TY.mjs} +16 -16
  2. package/dist/lib/browser/SheetContainer-6DNFC4TY.mjs.map +7 -0
  3. package/dist/lib/browser/{anchor-sort-JBRMW6OY.mjs → anchor-sort-AMMLA66W.mjs} +5 -4
  4. package/dist/lib/browser/anchor-sort-AMMLA66W.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-W6N44ONZ.mjs → chunk-EDWHV64N.mjs} +69 -66
  6. package/dist/lib/browser/chunk-EDWHV64N.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-2SAGT3BB.mjs → chunk-KE3AKN5W.mjs} +17 -17
  8. package/dist/lib/browser/chunk-KE3AKN5W.mjs.map +7 -0
  9. package/dist/lib/browser/{compute-graph-registry-DL2PX7TF.mjs → compute-graph-registry-RC5L7RE4.mjs} +2 -2
  10. package/dist/lib/browser/index.mjs +20 -19
  11. package/dist/lib/browser/index.mjs.map +3 -3
  12. package/dist/lib/browser/{markdown-BC4KBDUO.mjs → markdown-D2T2DOVX.mjs} +2 -2
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{operation-resolver-FJ4UWZUM.mjs → operation-resolver-P2RX75DA.mjs} +5 -5
  15. package/dist/lib/browser/operation-resolver-P2RX75DA.mjs.map +7 -0
  16. package/dist/lib/browser/{react-surface-5BXM6TJ3.mjs → react-surface-45CRAB5G.mjs} +8 -8
  17. package/dist/lib/browser/react-surface-45CRAB5G.mjs.map +7 -0
  18. package/dist/lib/browser/types/index.mjs +1 -1
  19. package/dist/lib/node-esm/{SheetContainer-YVIDJKP4.mjs → SheetContainer-7H5R7M54.mjs} +16 -16
  20. package/dist/lib/node-esm/SheetContainer-7H5R7M54.mjs.map +7 -0
  21. package/dist/lib/node-esm/{anchor-sort-C3XFPI6S.mjs → anchor-sort-VHMBRX2E.mjs} +5 -4
  22. package/dist/lib/node-esm/anchor-sort-VHMBRX2E.mjs.map +7 -0
  23. package/dist/lib/node-esm/{chunk-IMWGSIDG.mjs → chunk-6J5L47IB.mjs} +17 -17
  24. package/dist/lib/node-esm/chunk-6J5L47IB.mjs.map +7 -0
  25. package/dist/lib/node-esm/{chunk-S7RYX7DG.mjs → chunk-AYSEWH7N.mjs} +69 -66
  26. package/dist/lib/node-esm/chunk-AYSEWH7N.mjs.map +7 -0
  27. package/dist/lib/node-esm/{compute-graph-registry-VXH55GDI.mjs → compute-graph-registry-ZGXVLVGD.mjs} +2 -2
  28. package/dist/lib/node-esm/index.mjs +20 -19
  29. package/dist/lib/node-esm/index.mjs.map +3 -3
  30. package/dist/lib/node-esm/{markdown-6DGZCJRM.mjs → markdown-PTV72DLO.mjs} +2 -2
  31. package/dist/lib/node-esm/meta.json +1 -1
  32. package/dist/lib/node-esm/{operation-resolver-OGXEUWHA.mjs → operation-resolver-WPIWQ5IO.mjs} +5 -5
  33. package/dist/lib/node-esm/operation-resolver-WPIWQ5IO.mjs.map +7 -0
  34. package/dist/lib/node-esm/{react-surface-RLHC6B77.mjs → react-surface-ITV2L6HK.mjs} +8 -8
  35. package/dist/lib/node-esm/react-surface-ITV2L6HK.mjs.map +7 -0
  36. package/dist/lib/node-esm/types/index.mjs +1 -1
  37. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +3 -2
  39. package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +1 -1
  40. package/dist/types/src/capabilities/anchor-sort/index.d.ts +1 -1
  41. package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +1 -1
  42. package/dist/types/src/capabilities/operation-resolver/index.d.ts +1 -1
  43. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -1
  44. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
  45. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
  46. package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
  47. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
  48. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
  49. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
  50. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
  51. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +1 -1
  52. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
  53. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
  54. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  55. package/dist/types/src/testing/testing.d.ts +9 -9
  56. package/dist/types/src/types/Sheet.d.ts +18 -18
  57. package/dist/types/src/types/Sheet.d.ts.map +1 -1
  58. package/dist/types/src/types/types.d.ts +1 -1
  59. package/dist/types/src/types/util.d.ts +2 -1
  60. package/dist/types/src/types/util.d.ts.map +1 -1
  61. package/dist/types/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +59 -58
  63. package/src/SheetPlugin.tsx +12 -11
  64. package/src/capabilities/anchor-sort/anchor-sort.ts +3 -2
  65. package/src/capabilities/operation-resolver/operation-resolver.ts +3 -3
  66. package/src/capabilities/react-surface/react-surface.tsx +5 -5
  67. package/src/components/ComputeGraph/compute-graph.stories.tsx +1 -1
  68. package/src/components/GridSheet/GridSheet.stories.tsx +1 -1
  69. package/src/components/GridSheet/GridSheet.tsx +13 -10
  70. package/src/components/GridSheet/SheetCellEditor.stories.tsx +4 -4
  71. package/src/components/RangeList/RangeList.tsx +2 -2
  72. package/src/components/SheetContainer/SheetContainer.stories.tsx +3 -3
  73. package/src/components/SheetContainer/SheetContainer.tsx +3 -3
  74. package/src/components/SheetToolbar/SheetToolbar.stories.tsx +1 -1
  75. package/src/components/SheetToolbar/SheetToolbar.tsx +1 -1
  76. package/src/components/SheetToolbar/align.ts +6 -6
  77. package/src/components/SheetToolbar/style.ts +4 -4
  78. package/src/extensions/compute.stories.tsx +1 -1
  79. package/src/integrations/thread-ranges.ts +3 -3
  80. package/src/model/sheet-model.ts +36 -34
  81. package/src/types/Sheet.ts +11 -20
  82. package/src/types/util.ts +2 -1
  83. package/dist/lib/browser/SheetContainer-ESCXPI7Y.mjs.map +0 -7
  84. package/dist/lib/browser/anchor-sort-JBRMW6OY.mjs.map +0 -7
  85. package/dist/lib/browser/chunk-2SAGT3BB.mjs.map +0 -7
  86. package/dist/lib/browser/chunk-W6N44ONZ.mjs.map +0 -7
  87. package/dist/lib/browser/operation-resolver-FJ4UWZUM.mjs.map +0 -7
  88. package/dist/lib/browser/react-surface-5BXM6TJ3.mjs.map +0 -7
  89. package/dist/lib/node-esm/SheetContainer-YVIDJKP4.mjs.map +0 -7
  90. package/dist/lib/node-esm/anchor-sort-C3XFPI6S.mjs.map +0 -7
  91. package/dist/lib/node-esm/chunk-IMWGSIDG.mjs.map +0 -7
  92. package/dist/lib/node-esm/chunk-S7RYX7DG.mjs.map +0 -7
  93. package/dist/lib/node-esm/operation-resolver-OGXEUWHA.mjs.map +0 -7
  94. package/dist/lib/node-esm/react-surface-RLHC6B77.mjs.map +0 -7
  95. /package/dist/lib/browser/{compute-graph-registry-DL2PX7TF.mjs.map → compute-graph-registry-RC5L7RE4.mjs.map} +0 -0
  96. /package/dist/lib/browser/{markdown-BC4KBDUO.mjs.map → markdown-D2T2DOVX.mjs.map} +0 -0
  97. /package/dist/lib/node-esm/{compute-graph-registry-VXH55GDI.mjs.map → compute-graph-registry-ZGXVLVGD.mjs.map} +0 -0
  98. /package/dist/lib/node-esm/{markdown-6DGZCJRM.mjs.map → markdown-PTV72DLO.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-sheet",
3
- "version": "0.8.4-main.21d9917",
3
+ "version": "0.8.4-main.2244d791bb",
4
4
  "description": "Braneframe sketch plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -58,78 +58,79 @@
58
58
  "re-resizable": "^6.9.17",
59
59
  "react-markdown": "^10.1.0",
60
60
  "react-resize-detector": "^11.0.1",
61
- "@dxos/async": "0.8.4-main.21d9917",
62
- "@dxos/compute": "0.8.4-main.21d9917",
63
- "@dxos/app-framework": "0.8.4-main.21d9917",
64
- "@dxos/client": "0.8.4-main.21d9917",
65
- "@dxos/context": "0.8.4-main.21d9917",
66
- "@dxos/crypto": "0.8.4-main.21d9917",
67
- "@dxos/debug": "0.8.4-main.21d9917",
68
- "@dxos/echo": "0.8.4-main.21d9917",
69
- "@dxos/functions": "0.8.4-main.21d9917",
70
- "@dxos/echo-db": "0.8.4-main.21d9917",
71
- "@dxos/invariant": "0.8.4-main.21d9917",
72
- "@dxos/keys": "0.8.4-main.21d9917",
73
- "@dxos/log": "0.8.4-main.21d9917",
74
- "@dxos/lit-grid": "0.8.4-main.21d9917",
75
- "@dxos/operation": "0.8.4-main.21d9917",
76
- "@dxos/plugin-attention": "0.8.4-main.21d9917",
77
- "@dxos/plugin-automation": "0.8.4-main.21d9917",
78
- "@dxos/plugin-deck": "0.8.4-main.21d9917",
79
- "@dxos/plugin-graph": "0.8.4-main.21d9917",
80
- "@dxos/plugin-client": "0.8.4-main.21d9917",
81
- "@dxos/plugin-script": "0.8.4-main.21d9917",
82
- "@dxos/plugin-stack": "0.8.4-main.21d9917",
83
- "@dxos/plugin-space": "0.8.4-main.21d9917",
84
- "@dxos/plugin-thread": "0.8.4-main.21d9917",
85
- "@dxos/react-client": "0.8.4-main.21d9917",
86
- "@dxos/plugin-markdown": "0.8.4-main.21d9917",
87
- "@dxos/react-hooks": "0.8.4-main.21d9917",
88
- "@dxos/react-ui-attention": "0.8.4-main.21d9917",
89
- "@dxos/react-ui-form": "0.8.4-main.21d9917",
90
- "@dxos/react-ui-editor": "0.8.4-main.21d9917",
91
- "@dxos/react-ui-grid": "0.8.4-main.21d9917",
92
- "@dxos/react-ui-list": "0.8.4-main.21d9917",
93
- "@dxos/react-ui-mosaic": "0.8.4-main.21d9917",
94
- "@dxos/react-ui-menu": "0.8.4-main.21d9917",
95
- "@dxos/react-ui-stack": "0.8.4-main.21d9917",
96
- "@dxos/schema": "0.8.4-main.21d9917",
97
- "@dxos/types": "0.8.4-main.21d9917",
98
- "@dxos/ui-editor": "0.8.4-main.21d9917",
99
- "@dxos/util": "0.8.4-main.21d9917"
61
+ "@dxos/app-framework": "0.8.4-main.2244d791bb",
62
+ "@dxos/app-toolkit": "0.8.4-main.2244d791bb",
63
+ "@dxos/client": "0.8.4-main.2244d791bb",
64
+ "@dxos/async": "0.8.4-main.2244d791bb",
65
+ "@dxos/compute": "0.8.4-main.2244d791bb",
66
+ "@dxos/debug": "0.8.4-main.2244d791bb",
67
+ "@dxos/crypto": "0.8.4-main.2244d791bb",
68
+ "@dxos/context": "0.8.4-main.2244d791bb",
69
+ "@dxos/echo-db": "0.8.4-main.2244d791bb",
70
+ "@dxos/invariant": "0.8.4-main.2244d791bb",
71
+ "@dxos/keys": "0.8.4-main.2244d791bb",
72
+ "@dxos/echo": "0.8.4-main.2244d791bb",
73
+ "@dxos/functions": "0.8.4-main.2244d791bb",
74
+ "@dxos/lit-grid": "0.8.4-main.2244d791bb",
75
+ "@dxos/log": "0.8.4-main.2244d791bb",
76
+ "@dxos/operation": "0.8.4-main.2244d791bb",
77
+ "@dxos/plugin-attention": "0.8.4-main.2244d791bb",
78
+ "@dxos/plugin-automation": "0.8.4-main.2244d791bb",
79
+ "@dxos/plugin-client": "0.8.4-main.2244d791bb",
80
+ "@dxos/plugin-deck": "0.8.4-main.2244d791bb",
81
+ "@dxos/plugin-graph": "0.8.4-main.2244d791bb",
82
+ "@dxos/plugin-markdown": "0.8.4-main.2244d791bb",
83
+ "@dxos/plugin-script": "0.8.4-main.2244d791bb",
84
+ "@dxos/plugin-space": "0.8.4-main.2244d791bb",
85
+ "@dxos/plugin-stack": "0.8.4-main.2244d791bb",
86
+ "@dxos/plugin-thread": "0.8.4-main.2244d791bb",
87
+ "@dxos/react-client": "0.8.4-main.2244d791bb",
88
+ "@dxos/react-hooks": "0.8.4-main.2244d791bb",
89
+ "@dxos/react-ui-attention": "0.8.4-main.2244d791bb",
90
+ "@dxos/react-ui-grid": "0.8.4-main.2244d791bb",
91
+ "@dxos/react-ui-list": "0.8.4-main.2244d791bb",
92
+ "@dxos/react-ui-form": "0.8.4-main.2244d791bb",
93
+ "@dxos/react-ui-mosaic": "0.8.4-main.2244d791bb",
94
+ "@dxos/react-ui-stack": "0.8.4-main.2244d791bb",
95
+ "@dxos/react-ui-menu": "0.8.4-main.2244d791bb",
96
+ "@dxos/schema": "0.8.4-main.2244d791bb",
97
+ "@dxos/types": "0.8.4-main.2244d791bb",
98
+ "@dxos/ui-editor": "0.8.4-main.2244d791bb",
99
+ "@dxos/util": "0.8.4-main.2244d791bb",
100
+ "@dxos/react-ui-editor": "0.8.4-main.2244d791bb"
100
101
  },
101
102
  "devDependencies": {
102
- "@effect-atom/atom-react": "^0.4.6",
103
- "@effect/platform": "0.93.6",
103
+ "@effect-atom/atom-react": "^0.5.0",
104
+ "@effect/platform": "0.94.4",
104
105
  "@lezer/generator": "^1.7.1",
105
106
  "@tldraw/indices": "^2.0.0-alpha.14",
106
107
  "@types/lodash.defaultsdeep": "^4.6.6",
107
108
  "@types/react": "~19.2.7",
108
109
  "@types/react-dom": "~19.2.3",
109
110
  "@types/react-window": "^2.0.0",
110
- "effect": "3.19.11",
111
+ "effect": "3.19.16",
111
112
  "react": "~19.2.3",
112
113
  "react-dom": "~19.2.3",
113
114
  "vite": "7.1.9",
114
- "@dxos/lit-grid": "0.8.4-main.21d9917",
115
- "@dxos/random": "0.8.4-main.21d9917",
116
- "@dxos/echo-generator": "0.8.4-main.21d9917",
117
- "@dxos/react-ui": "0.8.4-main.21d9917",
118
- "@dxos/plugin-testing": "0.8.4-main.21d9917",
119
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.21d9917",
120
- "@dxos/storybook-utils": "0.8.4-main.21d9917",
121
- "@dxos/test-utils": "0.8.4-main.21d9917",
122
- "@dxos/ui-types": "0.8.4-main.21d9917",
123
- "@dxos/ui-theme": "0.8.4-main.21d9917"
115
+ "@dxos/echo-generator": "0.8.4-main.2244d791bb",
116
+ "@dxos/lit-grid": "0.8.4-main.2244d791bb",
117
+ "@dxos/random": "0.8.4-main.2244d791bb",
118
+ "@dxos/plugin-testing": "0.8.4-main.2244d791bb",
119
+ "@dxos/react-ui": "0.8.4-main.2244d791bb",
120
+ "@dxos/storybook-utils": "0.8.4-main.2244d791bb",
121
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.2244d791bb",
122
+ "@dxos/test-utils": "0.8.4-main.2244d791bb",
123
+ "@dxos/ui-theme": "0.8.4-main.2244d791bb",
124
+ "@dxos/ui-types": "0.8.4-main.2244d791bb"
124
125
  },
125
126
  "peerDependencies": {
126
- "@effect-atom/atom-react": "^0.4.6",
127
- "@effect/platform": "0.93.6",
128
- "effect": "3.19.11",
127
+ "@effect-atom/atom-react": "^0.5.0",
128
+ "@effect/platform": "0.94.4",
129
+ "effect": "3.19.16",
129
130
  "react": "~19.2.3",
130
131
  "react-dom": "~19.2.3",
131
- "@dxos/react-ui": "0.8.4-main.21d9917",
132
- "@dxos/ui-theme": "0.8.4-main.21d9917"
132
+ "@dxos/react-ui": "0.8.4-main.2244d791bb",
133
+ "@dxos/ui-theme": "0.8.4-main.2244d791bb"
133
134
  },
134
135
  "publishConfig": {
135
136
  "access": "public"
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
- import { ActivationEvent, Capability, Common, Plugin } from '@dxos/app-framework';
7
+ import { ActivationEvent, Capability, Plugin } from '@dxos/app-framework';
8
+ import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
8
9
  import { Operation } from '@dxos/operation';
9
10
  import { AutomationEvents } from '@dxos/plugin-automation';
10
11
  import { ClientEvents } from '@dxos/plugin-client';
@@ -19,12 +20,7 @@ import { translations } from './translations';
19
20
  import { Sheet, SheetOperation } from './types';
20
21
 
21
22
  export const SheetPlugin = Plugin.define(meta).pipe(
22
- Plugin.addModule({
23
- activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
24
- activate: ComputeGraphRegistry,
25
- }),
26
- Common.Plugin.addTranslationsModule({ translations }),
27
- Common.Plugin.addMetadataModule({
23
+ AppPlugin.addMetadataModule({
28
24
  metadata: {
29
25
  id: Sheet.Sheet.typename,
30
26
  metadata: {
@@ -37,7 +33,14 @@ export const SheetPlugin = Plugin.define(meta).pipe(
37
33
  },
38
34
  },
39
35
  }),
40
- Common.Plugin.addSchemaModule({ schema: [Sheet.Sheet] }),
36
+ AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
37
+ AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),
38
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
39
+ AppPlugin.addTranslationsModule({ translations }),
40
+ Plugin.addModule({
41
+ activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
42
+ activate: ComputeGraphRegistry,
43
+ }),
41
44
  Plugin.addModule({
42
45
  id: 'on-space-created',
43
46
  activatesOn: SpaceEvents.SpaceCreated,
@@ -54,10 +57,8 @@ export const SheetPlugin = Plugin.define(meta).pipe(
54
57
  }),
55
58
  Plugin.addModule({
56
59
  // TODO(wittjosiah): More relevant event?
57
- activatesOn: Common.ActivationEvent.AppGraphReady,
60
+ activatesOn: AppActivationEvents.AppGraphReady,
58
61
  activate: AnchorSort,
59
62
  }),
60
- Common.Plugin.addSurfaceModule({ activate: ReactSurface }),
61
- Common.Plugin.addOperationResolverModule({ activate: OperationResolver }),
62
63
  Plugin.make,
63
64
  );
@@ -4,14 +4,15 @@
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
- import { Capability, Common } from '@dxos/app-framework';
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
8
9
  import { Relation } from '@dxos/echo';
9
10
 
10
11
  import { Sheet, compareIndexPositions } from '../../types';
11
12
 
12
13
  export default Capability.makeModule(() =>
13
14
  Effect.succeed(
14
- Capability.contributes(Common.Capability.AnchorSort, {
15
+ Capability.contributes(AppCapabilities.AnchorSort, {
15
16
  key: Sheet.Sheet.typename,
16
17
  sort: (anchorA, anchorB) => {
17
18
  const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;
@@ -4,7 +4,7 @@
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
- import { Capability, Common, UndoMapping } from '@dxos/app-framework';
7
+ import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
8
8
  import { Obj, Ref, Type } from '@dxos/echo';
9
9
  import { OperationResolver } from '@dxos/operation';
10
10
  import { Collection } from '@dxos/schema';
@@ -14,7 +14,7 @@ import { Sheet, SheetOperation } from '../../types';
14
14
 
15
15
  export default Capability.makeModule(() =>
16
16
  Effect.succeed([
17
- Capability.contributes(Common.Capability.UndoMapping, [
17
+ Capability.contributes(Capabilities.UndoMapping, [
18
18
  UndoMapping.make({
19
19
  operation: SheetOperation.DropAxis,
20
20
  inverse: SheetOperation.RestoreAxis,
@@ -29,7 +29,7 @@ export default Capability.makeModule(() =>
29
29
  message: ['axis dropped label', { ns: meta.id }],
30
30
  }),
31
31
  ]),
32
- Capability.contributes(Common.Capability.OperationResolver, [
32
+ Capability.contributes(Capabilities.OperationResolver, [
33
33
  OperationResolver.make({
34
34
  operation: SheetOperation.OnCreateSpace,
35
35
  handler: Effect.fnUntraced(function* ({ rootCollection }) {
@@ -5,8 +5,8 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
  import React from 'react';
7
7
 
8
- import { Capability, Common } from '@dxos/app-framework';
9
- import { useCapability } from '@dxos/app-framework/react';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface, useCapability } from '@dxos/app-framework/ui';
10
10
  import { Obj } from '@dxos/echo';
11
11
  import { getSpace } from '@dxos/react-client/echo';
12
12
 
@@ -16,8 +16,8 @@ import { Sheet, SheetCapabilities } from '../../types';
16
16
 
17
17
  export default Capability.makeModule(() =>
18
18
  Effect.succeed(
19
- Capability.contributes(Common.Capability.ReactSurface, [
20
- Common.createSurface({
19
+ Capability.contributes(Capabilities.ReactSurface, [
20
+ Surface.create({
21
21
  id: `${meta.id}/sheet`,
22
22
  role: ['article', 'section'],
23
23
  filter: (data): data is { subject: Sheet.Sheet } =>
@@ -32,7 +32,7 @@ export default Capability.makeModule(() =>
32
32
  );
33
33
  },
34
34
  }),
35
- Common.createSurface({
35
+ Surface.create({
36
36
  id: `${meta.id}/object-settings`,
37
37
  role: 'object-settings',
38
38
  filter: (data): data is { subject: Sheet.Sheet } => Obj.instanceOf(Sheet.Sheet, data.subject),
@@ -87,7 +87,7 @@ const meta = {
87
87
  title: 'plugins/plugin-sheet/functions',
88
88
  render: DefaultStory,
89
89
  decorators: [
90
- withTheme,
90
+ withTheme(),
91
91
  withClientProvider({ types: [Function.Function, Sheet.Sheet], createIdentity: true, createSpace: true }),
92
92
  withComputeGraphDecorator({ plugins: testFunctionPlugins }),
93
93
  ],
@@ -41,7 +41,7 @@ const meta = {
41
41
  title: 'plugins/plugin-sheet/GridSheet',
42
42
  component: GridSheet,
43
43
  decorators: [
44
- withTheme,
44
+ withTheme(),
45
45
  withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
46
46
  withComputeGraphDecorator({ plugins: testFunctionPlugins }),
47
47
  withPluginManager({
@@ -13,8 +13,9 @@ import React, {
13
13
  useState,
14
14
  } from 'react';
15
15
 
16
- import { useOperationInvoker } from '@dxos/app-framework/react';
16
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
17
17
  import { type CellRange, rangeToA1Notation } from '@dxos/compute';
18
+ import { Obj } from '@dxos/echo';
18
19
  import { defaultColSize, defaultRowSize } from '@dxos/lit-grid';
19
20
  import { DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
20
21
  import { useAttention } from '@dxos/react-ui-attention';
@@ -127,15 +128,17 @@ export const GridSheet = () => {
127
128
 
128
129
  const handleAxisResize = useCallback<NonNullable<GridContentProps['onAxisResize']>>(
129
130
  ({ axis, size, index: numericIndex }) => {
130
- if (axis === 'row') {
131
- const rowId = model.sheet.rows[parseInt(numericIndex)];
132
- model.sheet.rowMeta[rowId] ??= {};
133
- model.sheet.rowMeta[rowId].size = size;
134
- } else {
135
- const columnId = model.sheet.columns[parseInt(numericIndex)];
136
- model.sheet.columnMeta[columnId] ??= {};
137
- model.sheet.columnMeta[columnId].size = size;
138
- }
131
+ Obj.change(model.sheet, (sheet) => {
132
+ if (axis === 'row') {
133
+ const rowId = sheet.rows[parseInt(numericIndex)];
134
+ sheet.rowMeta[rowId] ??= {};
135
+ sheet.rowMeta[rowId].size = size;
136
+ } else {
137
+ const columnId = sheet.columns[parseInt(numericIndex)];
138
+ sheet.columnMeta[columnId] ??= {};
139
+ sheet.columnMeta[columnId].size = size;
140
+ }
141
+ });
139
142
  },
140
143
  [model],
141
144
  );
@@ -38,9 +38,9 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
38
38
  const space = await client.spaces.create();
39
39
 
40
40
  const sheet = Sheet.make();
41
- Obj.change(sheet, (s) => {
42
- s.name = 'Test';
43
- s.cells[cell] = { value };
41
+ Obj.change(sheet, (obj) => {
42
+ obj.name = 'Test';
43
+ obj.cells[cell] = { value };
44
44
  });
45
45
  space.db.add(sheet);
46
46
  setObject(sheet);
@@ -63,7 +63,7 @@ const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
63
63
  const meta = {
64
64
  title: 'plugins/plugin-sheet/CellEditor',
65
65
 
66
- decorators: [withTheme],
66
+ decorators: [withTheme()],
67
67
  component: CellEditor,
68
68
  render: DefaultStory,
69
69
  } satisfies Meta<typeof DefaultStory>;
@@ -26,8 +26,8 @@ export const RangeList = ({ sheet }: RangeListProps) => {
26
26
  const handleDeleteRange = useCallback(
27
27
  (range: Sheet.Range) => {
28
28
  const index = sheet.ranges.findIndex((sheetRange) => sheetRange === range);
29
- Obj.change(sheet, (s) => {
30
- s.ranges.splice(index, 1);
29
+ Obj.change(sheet, (obj) => {
30
+ obj.ranges.splice(index, 1);
31
31
  });
32
32
  },
33
33
  [sheet],
@@ -6,7 +6,7 @@ import { type Meta } from '@storybook/react-vite';
6
6
  import * as Effect from 'effect/Effect';
7
7
  import React from 'react';
8
8
 
9
- import { Capability, Common } from '@dxos/app-framework';
9
+ import { Capabilities, Capability } from '@dxos/app-framework';
10
10
  import { withPluginManager } from '@dxos/app-framework/testing';
11
11
  import { Obj } from '@dxos/echo';
12
12
  import { OperationResolver } from '@dxos/operation';
@@ -28,7 +28,7 @@ const meta = {
28
28
  title: 'plugins/plugin-sheet/SheetContainer',
29
29
  component: SheetContainer,
30
30
  decorators: [
31
- withTheme,
31
+ withTheme(),
32
32
  withLayout({ layout: 'fullscreen' }),
33
33
  withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
34
34
  withComputeGraphDecorator(),
@@ -36,7 +36,7 @@ const meta = {
36
36
  withPluginManager({
37
37
  plugins: [...corePlugins()],
38
38
  capabilities: [
39
- Capability.contributes(Common.Capability.OperationResolver, [
39
+ Capability.contributes(Capabilities.OperationResolver, [
40
40
  OperationResolver.make({
41
41
  operation: SheetOperation.DropAxis,
42
42
  handler: ({ model, axis, axisIndex }) =>
@@ -4,10 +4,10 @@
4
4
 
5
5
  import React, { Fragment } from 'react';
6
6
 
7
- import { type SurfaceComponentProps } from '@dxos/app-framework/react';
7
+ import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
8
8
  import { Obj } from '@dxos/echo';
9
9
  import { type Space } from '@dxos/react-client/echo';
10
- import { Layout, type LayoutFlexProps } from '@dxos/react-ui-mosaic';
10
+ import { Flex, type FlexProps, Layout } from '@dxos/react-ui';
11
11
 
12
12
  import { type Sheet } from '../../types';
13
13
  import { useComputeGraph } from '../ComputeGraph';
@@ -45,4 +45,4 @@ export const SheetContainer = ({ role, subject: sheet, space, ignoreAttention }:
45
45
  );
46
46
  };
47
47
 
48
- const Container = (props: LayoutFlexProps) => <Layout.Flex {...props} classNames='aspect-square' />;
48
+ const Container = (props: FlexProps) => <Flex {...props} classNames='aspect-square' />;
@@ -21,7 +21,7 @@ const meta = {
21
21
  title: 'plugins/plugin-sheet/Toolbar',
22
22
  component: SheetToolbar as any,
23
23
  render: DefaultStory,
24
- decorators: [withTheme],
24
+ decorators: [withTheme()],
25
25
  parameters: {
26
26
  layout: 'fullscreen',
27
27
  translations,
@@ -5,7 +5,7 @@
5
5
  import { Atom, type Registry, RegistryContext } from '@effect-atom/atom-react';
6
6
  import React, { type PropsWithChildren, useContext, useMemo } from 'react';
7
7
 
8
- import { useAppGraph } from '@dxos/app-framework/react';
8
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
9
9
  import { type CompleteCellRange } from '@dxos/compute';
10
10
  import {
11
11
  type ActionGraphProps,
@@ -84,18 +84,18 @@ const createAlignActions = ({ model, state, stateAtom, registry, cursorFallbackR
84
84
  };
85
85
  const currentState = registry.get(stateAtom);
86
86
  if (index < 0) {
87
- Obj.change(model.sheet, (s) => {
88
- s.ranges?.push(nextRangeEntity);
87
+ Obj.change(model.sheet, (obj) => {
88
+ obj.ranges?.push(nextRangeEntity);
89
89
  });
90
90
  registry.set(stateAtom, { ...currentState, [alignKey]: nextRangeEntity.value });
91
91
  } else if (model.sheet.ranges![index].value === nextRangeEntity.value) {
92
- Obj.change(model.sheet, (s) => {
93
- s.ranges?.splice(index, 1);
92
+ Obj.change(model.sheet, (obj) => {
93
+ obj.ranges?.splice(index, 1);
94
94
  });
95
95
  registry.set(stateAtom, { ...currentState, [alignKey]: undefined });
96
96
  } else {
97
- Obj.change(model.sheet, (s) => {
98
- s.ranges?.splice(index, 1, nextRangeEntity);
97
+ Obj.change(model.sheet, (obj) => {
98
+ obj.ranges?.splice(index, 1, nextRangeEntity);
99
99
  });
100
100
  registry.set(stateAtom, { ...currentState, [alignKey]: nextRangeEntity.value });
101
101
  }
@@ -103,14 +103,14 @@ const createStyleActions = ({ model, state, stateAtom, registry, cursorFallbackR
103
103
  ) {
104
104
  // this value should be unset
105
105
  if (index >= 0) {
106
- Obj.change(model.sheet, (s) => {
107
- s.ranges?.splice(index, 1);
106
+ Obj.change(model.sheet, (obj) => {
107
+ obj.ranges?.splice(index, 1);
108
108
  });
109
109
  }
110
110
  registry.set(stateAtom, { ...currentState, [nextRangeEntity.value]: false });
111
111
  } else {
112
- Obj.change(model.sheet, (s) => {
113
- s.ranges?.push(nextRangeEntity);
112
+ Obj.change(model.sheet, (obj) => {
113
+ obj.ranges?.push(nextRangeEntity);
114
114
  });
115
115
  registry.set(stateAtom, { ...currentState, [nextRangeEntity.value]: true });
116
116
  }
@@ -107,7 +107,7 @@ const GraphStory = (props: EditorProps) => {
107
107
  const meta = {
108
108
  title: 'plugins/plugin-sheet/extensions',
109
109
  decorators: [
110
- withTheme,
110
+ withTheme(),
111
111
  withClientProvider({
112
112
  types: [Sheet.Sheet],
113
113
  createIdentity: true,
@@ -5,8 +5,8 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
  import { useCallback, useEffect, useMemo } from 'react';
7
7
 
8
- import { Common } from '@dxos/app-framework';
9
- import { useOperationInvoker, useOperationResolver } from '@dxos/app-framework/react';
8
+ import { useOperationInvoker, useOperationResolver } from '@dxos/app-framework/ui';
9
+ import { LayoutOperation } from '@dxos/app-toolkit';
10
10
  import { debounce } from '@dxos/async';
11
11
  import { type CellAddress, type CompleteCellRange, inRange } from '@dxos/compute';
12
12
  import { Obj, Relation } from '@dxos/echo';
@@ -44,7 +44,7 @@ export const useUpdateFocusedCellOnThreadSelection = (grid: DxGridElement | null
44
44
  const scrollIntoViewHandler = useMemo(
45
45
  () =>
46
46
  OperationResolver.make({
47
- operation: Common.LayoutOperation.ScrollIntoView,
47
+ operation: LayoutOperation.ScrollIntoView,
48
48
  position: 'hoist',
49
49
  filter: (input) => input.subject === sheetId && !!input.cursor,
50
50
  handler: (input) =>