@dxos/plugin-sheet 0.8.4-main.406dc2a → 0.8.4-main.548089c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{SheetContainer-VL34UND4.mjs → SheetContainer-BDLFSILO.mjs} +14 -16
- package/dist/lib/browser/SheetContainer-BDLFSILO.mjs.map +7 -0
- package/dist/lib/browser/{anchor-sort-3N44DS5F.mjs → anchor-sort-FCQ5OZZK.mjs} +8 -9
- package/dist/lib/browser/anchor-sort-FCQ5OZZK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZMPNHFIP.mjs → chunk-73AV3NH6.mjs} +2 -2
- package/dist/lib/browser/{chunk-ZJWJMX4E.mjs → chunk-7KRJ2IT5.mjs} +23 -23
- package/dist/lib/browser/chunk-7KRJ2IT5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SSN4HYJL.mjs → chunk-7VEWYJJN.mjs} +5 -5
- package/dist/lib/browser/{chunk-SSN4HYJL.mjs.map → chunk-7VEWYJJN.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-ADK2HW4A.mjs → chunk-DVJ3QW3F.mjs} +217 -216
- package/dist/lib/browser/chunk-DVJ3QW3F.mjs.map +7 -0
- package/dist/lib/browser/chunk-FWFAAGXL.mjs +28 -0
- package/dist/lib/browser/chunk-FWFAAGXL.mjs.map +7 -0
- package/dist/lib/browser/{compute-graph-registry-MF65HGGM.mjs → compute-graph-registry-AP5RA7W3.mjs} +3 -3
- package/dist/lib/browser/{compute-graph-registry-MF65HGGM.mjs.map → compute-graph-registry-AP5RA7W3.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +16 -16
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-BQLV6IAA.mjs → intent-resolver-66OAYVQF.mjs} +5 -5
- package/dist/lib/browser/intent-resolver-66OAYVQF.mjs.map +7 -0
- package/dist/lib/browser/{markdown-RMTMI237.mjs → markdown-B6VKYY2S.mjs} +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-7ZDMQDCT.mjs → react-surface-GXHVZHKU.mjs} +11 -10
- package/dist/lib/browser/react-surface-GXHVZHKU.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -12
- package/dist/lib/node-esm/{SheetContainer-NWJ7L6FC.mjs → SheetContainer-CK5HSJPL.mjs} +14 -16
- package/dist/lib/node-esm/SheetContainer-CK5HSJPL.mjs.map +7 -0
- package/dist/lib/node-esm/{anchor-sort-YL2OZHYM.mjs → anchor-sort-ZE7IS7SH.mjs} +8 -9
- package/dist/lib/node-esm/anchor-sort-ZE7IS7SH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-LN6ZSAII.mjs → chunk-44YTKTMP.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-BZAPYBSH.mjs → chunk-4H2EHVWE.mjs} +217 -216
- package/dist/lib/node-esm/chunk-4H2EHVWE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IK4O7FUJ.mjs → chunk-4QV4AGWK.mjs} +5 -5
- package/dist/lib/node-esm/{chunk-IK4O7FUJ.mjs.map → chunk-4QV4AGWK.mjs.map} +2 -2
- package/dist/lib/node-esm/chunk-HILDMVPL.mjs +29 -0
- package/dist/lib/node-esm/chunk-HILDMVPL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YL7BVJPC.mjs → chunk-SMYD6H7Q.mjs} +23 -23
- package/dist/lib/node-esm/chunk-SMYD6H7Q.mjs.map +7 -0
- package/dist/lib/node-esm/{compute-graph-registry-P2O5LDFZ.mjs → compute-graph-registry-UMQ5UYCL.mjs} +3 -3
- package/dist/lib/node-esm/{compute-graph-registry-P2O5LDFZ.mjs.map → compute-graph-registry-UMQ5UYCL.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +16 -16
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MV5ZFXAQ.mjs → intent-resolver-VNKIMQQT.mjs} +5 -5
- package/dist/lib/node-esm/intent-resolver-VNKIMQQT.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-EDIWHA3P.mjs → markdown-VKY7HXU2.mjs} +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-TUME5MM2.mjs → react-surface-45L45WN6.mjs} +11 -10
- package/dist/lib/node-esm/react-surface-45L45WN6.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -12
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/anchor-sort.d.ts +2 -4
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +2 -2
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
- package/dist/types/src/components/RangeList/RangeList.d.ts +2 -2
- package/dist/types/src/components/RangeList/RangeList.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +2 -2
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +2 -2
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +2 -2
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts +3 -4
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +4 -4
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/model/testing.d.ts +2 -2
- package/dist/types/src/model/testing.d.ts.map +1 -1
- package/dist/types/src/model/useSheetModel.d.ts +2 -2
- package/dist/types/src/model/useSheetModel.d.ts.map +1 -1
- package/dist/types/src/serializer.d.ts +2 -2
- package/dist/types/src/serializer.d.ts.map +1 -1
- package/dist/types/src/testing/data.d.ts +2 -2
- package/dist/types/src/testing/data.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +26 -2
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/{schema.d.ts → Sheet.d.ts} +36 -3
- package/dist/types/src/types/Sheet.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/sheet-range-types.d.ts +2 -2
- package/dist/types/src/types/sheet-range-types.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +0 -9
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts +9 -10
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +51 -50
- package/src/SheetPlugin.tsx +6 -5
- package/src/capabilities/anchor-sort.ts +7 -8
- package/src/capabilities/compute-graph-registry.ts +1 -1
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/capabilities/react-surface.tsx +6 -5
- package/src/components/ComputeGraph/compute-graph.stories.tsx +8 -8
- package/src/components/FunctionEditor/FunctionEditor.tsx +1 -1
- package/src/components/GridSheet/GridSheet.stories.tsx +2 -2
- package/src/components/GridSheet/GridSheet.tsx +16 -4
- package/src/components/GridSheet/SheetCellEditor.stories.tsx +4 -4
- package/src/components/GridSheet/util.ts +9 -3
- package/src/components/RangeList/RangeList.tsx +5 -5
- package/src/components/SheetContainer/SheetContainer.stories.tsx +9 -6
- package/src/components/SheetContainer/SheetContainer.tsx +5 -4
- package/src/components/SheetContext/SheetContext.tsx +4 -4
- package/src/components/SheetToolbar/SheetToolbar.tsx +14 -16
- package/src/extensions/compute.stories.tsx +2 -2
- package/src/integrations/thread-ranges.ts +10 -16
- package/src/meta.ts +6 -2
- package/src/model/sheet-model.test.ts +4 -4
- package/src/model/sheet-model.ts +3 -3
- package/src/model/testing.ts +4 -4
- package/src/model/useSheetModel.ts +2 -2
- package/src/sanity.test.ts +3 -4
- package/src/serializer.ts +3 -3
- package/src/testing/data.ts +2 -2
- package/src/testing/testing.tsx +3 -3
- package/src/translations.ts +2 -2
- package/src/types/Sheet.ts +103 -0
- package/src/types/index.ts +1 -1
- package/src/types/sheet-range-types.ts +2 -2
- package/src/types/types.ts +3 -13
- package/src/types/util.ts +10 -38
- package/dist/lib/browser/SheetContainer-VL34UND4.mjs.map +0 -7
- package/dist/lib/browser/anchor-sort-3N44DS5F.mjs.map +0 -7
- package/dist/lib/browser/chunk-ADK2HW4A.mjs.map +0 -7
- package/dist/lib/browser/chunk-CSBSADPQ.mjs +0 -16
- package/dist/lib/browser/chunk-CSBSADPQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZJWJMX4E.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-BQLV6IAA.mjs.map +0 -7
- package/dist/lib/browser/react-surface-7ZDMQDCT.mjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-NWJ7L6FC.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-YL2OZHYM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BZAPYBSH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H3GSD33H.mjs +0 -18
- package/dist/lib/node-esm/chunk-H3GSD33H.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YL7BVJPC.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-MV5ZFXAQ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-TUME5MM2.mjs.map +0 -7
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/types/schema.ts +0 -61
- /package/dist/lib/browser/{chunk-ZMPNHFIP.mjs.map → chunk-73AV3NH6.mjs.map} +0 -0
- /package/dist/lib/browser/{markdown-RMTMI237.mjs.map → markdown-B6VKYY2S.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-LN6ZSAII.mjs.map → chunk-44YTKTMP.mjs.map} +0 -0
- /package/dist/lib/node-esm/{markdown-EDIWHA3P.mjs.map → markdown-VKY7HXU2.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.
|
|
3
|
+
"version": "0.8.4-main.548089c",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -56,73 +56,74 @@
|
|
|
56
56
|
"re-resizable": "^6.9.17",
|
|
57
57
|
"react-markdown": "^10.1.0",
|
|
58
58
|
"react-resize-detector": "^11.0.1",
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/echo": "0.8.4-main.
|
|
67
|
-
"@dxos/functions": "0.8.4-main.
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/lit-grid": "0.8.4-main.
|
|
71
|
-
"@dxos/live-object": "0.8.4-main.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/plugin-automation": "0.8.4-main.
|
|
74
|
-
"@dxos/plugin-client": "0.8.4-main.
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/plugin-deck": "0.8.4-main.
|
|
77
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
78
|
-
"@dxos/plugin-markdown": "0.8.4-main.
|
|
79
|
-
"@dxos/plugin-script": "0.8.4-main.
|
|
80
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/react-ui-attention": "0.8.4-main.
|
|
86
|
-
"@dxos/react-ui-
|
|
87
|
-
"@dxos/react-ui-
|
|
88
|
-
"@dxos/react-ui-grid": "0.8.4-main.
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-menu": "0.8.4-main.
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
59
|
+
"@dxos/app-framework": "0.8.4-main.548089c",
|
|
60
|
+
"@dxos/compute": "0.8.4-main.548089c",
|
|
61
|
+
"@dxos/async": "0.8.4-main.548089c",
|
|
62
|
+
"@dxos/client": "0.8.4-main.548089c",
|
|
63
|
+
"@dxos/crypto": "0.8.4-main.548089c",
|
|
64
|
+
"@dxos/debug": "0.8.4-main.548089c",
|
|
65
|
+
"@dxos/context": "0.8.4-main.548089c",
|
|
66
|
+
"@dxos/echo": "0.8.4-main.548089c",
|
|
67
|
+
"@dxos/functions": "0.8.4-main.548089c",
|
|
68
|
+
"@dxos/keys": "0.8.4-main.548089c",
|
|
69
|
+
"@dxos/invariant": "0.8.4-main.548089c",
|
|
70
|
+
"@dxos/lit-grid": "0.8.4-main.548089c",
|
|
71
|
+
"@dxos/live-object": "0.8.4-main.548089c",
|
|
72
|
+
"@dxos/log": "0.8.4-main.548089c",
|
|
73
|
+
"@dxos/plugin-automation": "0.8.4-main.548089c",
|
|
74
|
+
"@dxos/plugin-client": "0.8.4-main.548089c",
|
|
75
|
+
"@dxos/plugin-attention": "0.8.4-main.548089c",
|
|
76
|
+
"@dxos/plugin-deck": "0.8.4-main.548089c",
|
|
77
|
+
"@dxos/plugin-graph": "0.8.4-main.548089c",
|
|
78
|
+
"@dxos/plugin-markdown": "0.8.4-main.548089c",
|
|
79
|
+
"@dxos/plugin-script": "0.8.4-main.548089c",
|
|
80
|
+
"@dxos/plugin-space": "0.8.4-main.548089c",
|
|
81
|
+
"@dxos/plugin-stack": "0.8.4-main.548089c",
|
|
82
|
+
"@dxos/plugin-thread": "0.8.4-main.548089c",
|
|
83
|
+
"@dxos/react-client": "0.8.4-main.548089c",
|
|
84
|
+
"@dxos/react-hooks": "0.8.4-main.548089c",
|
|
85
|
+
"@dxos/react-ui-attention": "0.8.4-main.548089c",
|
|
86
|
+
"@dxos/react-ui-form": "0.8.4-main.548089c",
|
|
87
|
+
"@dxos/react-ui-list": "0.8.4-main.548089c",
|
|
88
|
+
"@dxos/react-ui-grid": "0.8.4-main.548089c",
|
|
89
|
+
"@dxos/react-ui-editor": "0.8.4-main.548089c",
|
|
90
|
+
"@dxos/react-ui-menu": "0.8.4-main.548089c",
|
|
91
|
+
"@dxos/schema": "0.8.4-main.548089c",
|
|
92
|
+
"@dxos/react-ui-stack": "0.8.4-main.548089c",
|
|
93
|
+
"@dxos/types": "0.8.4-main.548089c",
|
|
94
|
+
"@dxos/util": "0.8.4-main.548089c"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
|
-
"@effect-
|
|
97
|
+
"@effect-atom/atom-react": "^0.3.4",
|
|
97
98
|
"@effect/platform": "0.92.1",
|
|
98
99
|
"@lezer/generator": "^1.7.1",
|
|
99
100
|
"@tldraw/indices": "^2.0.0-alpha.14",
|
|
100
101
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
101
102
|
"@types/react": "~19.2.2",
|
|
102
|
-
"@types/react-dom": "~19.2.
|
|
103
|
+
"@types/react-dom": "~19.2.2",
|
|
103
104
|
"@types/react-window": "^1.8.8",
|
|
104
105
|
"effect": "3.18.3",
|
|
105
106
|
"react": "~19.2.0",
|
|
106
107
|
"react-dom": "~19.2.0",
|
|
107
108
|
"vite": "7.1.9",
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/react-ui
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/react-ui-
|
|
113
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/test-utils": "0.8.4-main.
|
|
116
|
-
"@dxos/
|
|
109
|
+
"@dxos/echo-generator": "0.8.4-main.548089c",
|
|
110
|
+
"@dxos/random": "0.8.4-main.548089c",
|
|
111
|
+
"@dxos/react-ui": "0.8.4-main.548089c",
|
|
112
|
+
"@dxos/lit-grid": "0.8.4-main.548089c",
|
|
113
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.548089c",
|
|
114
|
+
"@dxos/react-ui-theme": "0.8.4-main.548089c",
|
|
115
|
+
"@dxos/react-ui-types": "0.8.4-main.548089c",
|
|
116
|
+
"@dxos/test-utils": "0.8.4-main.548089c",
|
|
117
|
+
"@dxos/storybook-utils": "0.8.4-main.548089c"
|
|
117
118
|
},
|
|
118
119
|
"peerDependencies": {
|
|
119
|
-
"@effect-
|
|
120
|
+
"@effect-atom/atom-react": "^0.3.4",
|
|
120
121
|
"@effect/platform": "^0.80.12",
|
|
121
122
|
"effect": "^3.13.3",
|
|
122
123
|
"react": "^19.0.0",
|
|
123
124
|
"react-dom": "^19.0.0",
|
|
124
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
125
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
125
|
+
"@dxos/react-ui": "0.8.4-main.548089c",
|
|
126
|
+
"@dxos/react-ui-theme": "0.8.4-main.548089c"
|
|
126
127
|
},
|
|
127
128
|
"publishConfig": {
|
|
128
129
|
"access": "public"
|
package/src/SheetPlugin.tsx
CHANGED
|
@@ -21,7 +21,7 @@ import { AnchorSort, ComputeGraphRegistry, IntentResolver, Markdown, ReactSurfac
|
|
|
21
21
|
import { meta } from './meta';
|
|
22
22
|
import { serializer } from './serializer';
|
|
23
23
|
import { translations } from './translations';
|
|
24
|
-
import {
|
|
24
|
+
import { Sheet, SheetAction } from './types';
|
|
25
25
|
|
|
26
26
|
export const SheetPlugin = definePlugin(meta, () => [
|
|
27
27
|
defineModule({
|
|
@@ -39,10 +39,11 @@ export const SheetPlugin = definePlugin(meta, () => [
|
|
|
39
39
|
activatesOn: Events.SetupMetadata,
|
|
40
40
|
activate: () =>
|
|
41
41
|
contributes(Capabilities.Metadata, {
|
|
42
|
-
id:
|
|
42
|
+
id: Sheet.Sheet.typename,
|
|
43
43
|
metadata: {
|
|
44
|
-
label: (object:
|
|
44
|
+
label: (object: Sheet.Sheet) => object.name,
|
|
45
45
|
icon: 'ph--grid-nine--regular',
|
|
46
|
+
iconHue: 'indigo',
|
|
46
47
|
serializer,
|
|
47
48
|
comments: 'anchored',
|
|
48
49
|
},
|
|
@@ -55,8 +56,8 @@ export const SheetPlugin = definePlugin(meta, () => [
|
|
|
55
56
|
contributes(
|
|
56
57
|
SpaceCapabilities.ObjectForm,
|
|
57
58
|
defineObjectForm({
|
|
58
|
-
objectSchema:
|
|
59
|
-
getIntent: (props
|
|
59
|
+
objectSchema: Sheet.Sheet,
|
|
60
|
+
getIntent: (props) => createIntent(SheetAction.Create, { ...props }),
|
|
60
61
|
}),
|
|
61
62
|
),
|
|
62
63
|
}),
|
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
7
|
-
import { getTarget } from '@dxos/react-client/echo';
|
|
5
|
+
import { Capabilities, type Capability, contributes } from '@dxos/app-framework';
|
|
6
|
+
import { Relation } from '@dxos/echo';
|
|
8
7
|
|
|
9
|
-
import {
|
|
8
|
+
import { Sheet, compareIndexPositions } from '../types';
|
|
10
9
|
|
|
11
|
-
export default () =>
|
|
10
|
+
export default (): Capability<typeof Capabilities.AnchorSort> =>
|
|
12
11
|
contributes(Capabilities.AnchorSort, {
|
|
13
|
-
key:
|
|
12
|
+
key: Sheet.Sheet.typename,
|
|
14
13
|
sort: (anchorA, anchorB) => {
|
|
15
|
-
const sheet = getTarget(anchorA) as
|
|
16
|
-
if (sheet !== getTarget(anchorB)) {
|
|
14
|
+
const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;
|
|
15
|
+
if (sheet !== Relation.getTarget(anchorB)) {
|
|
17
16
|
return 0;
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -14,10 +14,10 @@ export default async (context: PluginContext) => {
|
|
|
14
14
|
// Async import removes direct dependency on hyperformula.
|
|
15
15
|
const { defaultPlugins, ComputeGraphRegistry } = await import('@dxos/compute');
|
|
16
16
|
const computeRuntimeResolver = context.getCapability(AutomationCapabilities.ComputeRuntime);
|
|
17
|
-
|
|
18
17
|
const computeGraphRegistry = new ComputeGraphRegistry({
|
|
19
18
|
plugins: defaultPlugins,
|
|
20
19
|
computeRuntime: computeRuntimeResolver,
|
|
21
20
|
});
|
|
21
|
+
|
|
22
22
|
return contributes(SheetCapabilities.ComputeGraphRegistry, computeGraphRegistry);
|
|
23
23
|
};
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
7
|
import { meta } from '../meta';
|
|
8
|
-
import {
|
|
8
|
+
import { Sheet, SheetAction } from '../types';
|
|
9
9
|
|
|
10
10
|
export default () =>
|
|
11
11
|
contributes(Capabilities.IntentResolver, [
|
|
12
12
|
createResolver({
|
|
13
13
|
intent: SheetAction.Create,
|
|
14
|
-
resolve: ({ name }) => ({ data: { object:
|
|
14
|
+
resolve: ({ name }) => ({ data: { object: Sheet.make({ name }) } }),
|
|
15
15
|
}),
|
|
16
16
|
createResolver({
|
|
17
17
|
intent: SheetAction.InsertAxis,
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createSurface
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
import { Obj } from '@dxos/echo';
|
|
9
10
|
import { getSpace } from '@dxos/react-client/echo';
|
|
10
11
|
|
|
11
12
|
import { ComputeGraphContextProvider, RangeList, SheetContainer } from '../components';
|
|
12
13
|
import { meta } from '../meta';
|
|
13
|
-
import {
|
|
14
|
+
import { Sheet } from '../types';
|
|
14
15
|
|
|
15
16
|
import { SheetCapabilities } from './capabilities';
|
|
16
17
|
|
|
@@ -19,8 +20,8 @@ export default () =>
|
|
|
19
20
|
createSurface({
|
|
20
21
|
id: `${meta.id}/sheet`,
|
|
21
22
|
role: ['article', 'section'],
|
|
22
|
-
filter: (data): data is { subject:
|
|
23
|
-
Obj.instanceOf(
|
|
23
|
+
filter: (data): data is { subject: Sheet.Sheet } =>
|
|
24
|
+
Obj.instanceOf(Sheet.Sheet, data.subject) && !!getSpace(data.subject),
|
|
24
25
|
component: ({ data, role }) => {
|
|
25
26
|
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
26
27
|
|
|
@@ -34,7 +35,7 @@ export default () =>
|
|
|
34
35
|
createSurface({
|
|
35
36
|
id: `${meta.id}/object-settings`,
|
|
36
37
|
role: 'object-settings',
|
|
37
|
-
filter: (data): data is { subject:
|
|
38
|
+
filter: (data): data is { subject: Sheet.Sheet } => Obj.instanceOf(Sheet.Sheet, data.subject),
|
|
38
39
|
component: ({ data }) => <RangeList sheet={data.subject} />,
|
|
39
40
|
}),
|
|
40
41
|
]);
|
|
@@ -6,8 +6,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
import React, { useEffect, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { testFunctionPlugins } from '@dxos/compute/testing';
|
|
9
|
-
import { Filter
|
|
10
|
-
import {
|
|
9
|
+
import { Filter } from '@dxos/echo';
|
|
10
|
+
import { Function } from '@dxos/functions';
|
|
11
11
|
import { useSpace } from '@dxos/react-client/echo';
|
|
12
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
13
|
import { Button, Input, Toolbar } from '@dxos/react-ui';
|
|
@@ -16,7 +16,7 @@ import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
|
16
16
|
|
|
17
17
|
import { useSheetModel } from '../../model';
|
|
18
18
|
import { withComputeGraphDecorator } from '../../testing';
|
|
19
|
-
import {
|
|
19
|
+
import { Sheet } from '../../types';
|
|
20
20
|
|
|
21
21
|
import { useComputeGraph } from './ComputeGraphContextProvider';
|
|
22
22
|
|
|
@@ -25,13 +25,13 @@ const FUNCTION_NAME = 'TEST';
|
|
|
25
25
|
const DefaultStory = () => {
|
|
26
26
|
const space = useSpace();
|
|
27
27
|
const graph = useComputeGraph(space);
|
|
28
|
-
const [sheet, setSheet] = useState<
|
|
28
|
+
const [sheet, setSheet] = useState<Sheet.Sheet>();
|
|
29
29
|
const [text, setText] = useState(`${FUNCTION_NAME}(100)`);
|
|
30
30
|
const [result, setResult] = useState<any>();
|
|
31
31
|
const model = useSheetModel(graph, sheet);
|
|
32
32
|
useEffect(() => {
|
|
33
33
|
if (space) {
|
|
34
|
-
const sheet = space.db.add(
|
|
34
|
+
const sheet = space.db.add(Sheet.make());
|
|
35
35
|
setSheet(sheet);
|
|
36
36
|
}
|
|
37
37
|
}, [space]);
|
|
@@ -44,14 +44,14 @@ const DefaultStory = () => {
|
|
|
44
44
|
setResult({ functions: { standard: f1.length, echo: f2.length } });
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
space.db.add(
|
|
47
|
+
space.db.add(Function.make({ name: 'test', version: '0.0.1', binding: FUNCTION_NAME }));
|
|
48
48
|
}
|
|
49
49
|
}, [space, graph]);
|
|
50
50
|
|
|
51
51
|
const inputRef = useRef<HTMLInputElement | null>(null);
|
|
52
52
|
const handleTest = async () => {
|
|
53
53
|
if (space && graph) {
|
|
54
|
-
const { objects } = await space.db.query(Filter.type(
|
|
54
|
+
const { objects } = await space.db.query(Filter.type(Function.Function)).run();
|
|
55
55
|
const mapped = graph.mapFunctionBindingToId(text);
|
|
56
56
|
const unmapped = graph.mapFunctionBindingFromId(mapped);
|
|
57
57
|
const internal = graph.mapFormulaToNative(text);
|
|
@@ -88,7 +88,7 @@ const meta = {
|
|
|
88
88
|
render: DefaultStory,
|
|
89
89
|
decorators: [
|
|
90
90
|
withTheme,
|
|
91
|
-
withClientProvider({ types: [
|
|
91
|
+
withClientProvider({ types: [Function.Function, Sheet.Sheet], createIdentity: true, createSpace: true }),
|
|
92
92
|
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
93
93
|
],
|
|
94
94
|
} satisfies Meta<typeof DefaultStory>;
|
|
@@ -26,7 +26,7 @@ export const FunctionEditor = () => {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<div className='flex shrink-0 justify-between items-center
|
|
29
|
+
<div className='flex shrink-0 justify-between items-center pli-4 plb-1 text-sm bg-toolbarSurface border-bs !border-subduedSeparator'>
|
|
30
30
|
<div className='flex gap-4 items-center'>
|
|
31
31
|
<div className='flex w-16 items-center font-mono'>
|
|
32
32
|
{(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}
|
|
@@ -14,7 +14,7 @@ import { withTheme } from '@dxos/react-ui/testing';
|
|
|
14
14
|
|
|
15
15
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
16
16
|
import { translations } from '../../translations';
|
|
17
|
-
import {
|
|
17
|
+
import { Sheet } from '../../types';
|
|
18
18
|
import { useComputeGraph } from '../ComputeGraph';
|
|
19
19
|
import { SheetProvider } from '../SheetContext';
|
|
20
20
|
|
|
@@ -42,7 +42,7 @@ const meta = {
|
|
|
42
42
|
component: GridSheet,
|
|
43
43
|
decorators: [
|
|
44
44
|
withTheme,
|
|
45
|
-
withClientProvider({ types: [
|
|
45
|
+
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
46
46
|
withComputeGraphDecorator({ plugins: testFunctionPlugins }),
|
|
47
47
|
withPluginManager({
|
|
48
48
|
plugins: [IntentPlugin()],
|
|
@@ -13,7 +13,8 @@ import React, {
|
|
|
13
13
|
useState,
|
|
14
14
|
} from 'react';
|
|
15
15
|
|
|
16
|
-
import { createIntent
|
|
16
|
+
import { createIntent } from '@dxos/app-framework';
|
|
17
|
+
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
17
18
|
import { type CellRange, rangeToA1Notation } from '@dxos/compute';
|
|
18
19
|
import { defaultColSize, defaultRowSize } from '@dxos/lit-grid';
|
|
19
20
|
import { DropdownMenu, Icon, useTranslation } from '@dxos/react-ui';
|
|
@@ -172,12 +173,20 @@ export const GridSheet = () => {
|
|
|
172
173
|
case 'frozenRowsStart':
|
|
173
174
|
return dxGrid?.setSelection({
|
|
174
175
|
start: { col: pos.col, row: 0, plane: 'grid' },
|
|
175
|
-
end: {
|
|
176
|
+
end: {
|
|
177
|
+
col: pos.col,
|
|
178
|
+
row: model.sheet.rows.length - 1,
|
|
179
|
+
plane: 'grid',
|
|
180
|
+
},
|
|
176
181
|
});
|
|
177
182
|
case 'frozenColsStart':
|
|
178
183
|
return dxGrid?.setSelection({
|
|
179
184
|
start: { row: pos.row, col: 0, plane: 'grid' },
|
|
180
|
-
end: {
|
|
185
|
+
end: {
|
|
186
|
+
row: pos.row,
|
|
187
|
+
col: model.sheet.columns.length - 1,
|
|
188
|
+
plane: 'grid',
|
|
189
|
+
},
|
|
181
190
|
});
|
|
182
191
|
}
|
|
183
192
|
},
|
|
@@ -281,7 +290,10 @@ export const GridSheet = () => {
|
|
|
281
290
|
|
|
282
291
|
const extensions = useMemo(
|
|
283
292
|
() => [
|
|
284
|
-
editorKeys({
|
|
293
|
+
editorKeys({
|
|
294
|
+
onClose: handleClose,
|
|
295
|
+
...(editing?.initialContent && { onNav: handleClose }),
|
|
296
|
+
}),
|
|
285
297
|
sheetExtension({ functions: model.graph.getFunctions() }),
|
|
286
298
|
rangeExtension({
|
|
287
299
|
onInit: (fn) => (rangeController.current = fn),
|
|
@@ -15,7 +15,7 @@ import { automerge } from '@dxos/react-ui-editor';
|
|
|
15
15
|
import { CellEditor, type CellEditorProps } from '@dxos/react-ui-grid';
|
|
16
16
|
|
|
17
17
|
import { sheetExtension } from '../../extensions';
|
|
18
|
-
import {
|
|
18
|
+
import { Sheet } from '../../types';
|
|
19
19
|
|
|
20
20
|
const DefaultStory = ({ value, ...props }: CellEditorProps) => {
|
|
21
21
|
const extensions = useMemo(() => {
|
|
@@ -29,14 +29,14 @@ const DefaultStory = ({ value, ...props }: CellEditorProps) => {
|
|
|
29
29
|
|
|
30
30
|
const AutomergeStory = ({ value, ...props }: CellEditorProps) => {
|
|
31
31
|
const cell = 'A1';
|
|
32
|
-
const [object, setObject] = useState<
|
|
32
|
+
const [object, setObject] = useState<Sheet.Sheet>();
|
|
33
33
|
useAsyncEffect(async () => {
|
|
34
|
-
const client = new Client({ types: [
|
|
34
|
+
const client = new Client({ types: [Sheet.Sheet] });
|
|
35
35
|
await client.initialize();
|
|
36
36
|
await client.halo.createIdentity();
|
|
37
37
|
const space = await client.spaces.create();
|
|
38
38
|
|
|
39
|
-
const sheet =
|
|
39
|
+
const sheet = Sheet.make();
|
|
40
40
|
sheet.name = 'Test';
|
|
41
41
|
sheet.cells[cell] = { value };
|
|
42
42
|
space.db.add(sheet);
|
|
@@ -28,7 +28,10 @@ const createDxGridColumns = (model: SheetModel): DxGridAxisMeta => {
|
|
|
28
28
|
return model.sheet.columns.reduce(
|
|
29
29
|
(acc: DxGridAxisMeta, columnId, numericIndex) => {
|
|
30
30
|
if (model.sheet.columnMeta[columnId] && model.sheet.columnMeta[columnId].size) {
|
|
31
|
-
acc.grid[numericIndex] = {
|
|
31
|
+
acc.grid[numericIndex] = {
|
|
32
|
+
size: model.sheet.columnMeta[columnId].size,
|
|
33
|
+
resizeable: true,
|
|
34
|
+
};
|
|
32
35
|
}
|
|
33
36
|
return acc;
|
|
34
37
|
},
|
|
@@ -40,7 +43,10 @@ const createDxGridRows = (model: SheetModel): DxGridAxisMeta => {
|
|
|
40
43
|
return model.sheet.rows.reduce(
|
|
41
44
|
(acc: DxGridAxisMeta, rowId, numericIndex) => {
|
|
42
45
|
if (model.sheet.rowMeta[rowId] && model.sheet.rowMeta[rowId].size) {
|
|
43
|
-
acc.grid[numericIndex] = {
|
|
46
|
+
acc.grid[numericIndex] = {
|
|
47
|
+
size: model.sheet.rowMeta[rowId].size,
|
|
48
|
+
resizeable: true,
|
|
49
|
+
};
|
|
44
50
|
}
|
|
45
51
|
return acc;
|
|
46
52
|
},
|
|
@@ -59,7 +65,7 @@ const projectCellProps = (model: SheetModel, col: number, row: number): DxGridCe
|
|
|
59
65
|
// const range = thread.target?.anchor && parseThreadAnchorAsCellRange(thread.target!.anchor);
|
|
60
66
|
// return thread && range ? inRange(range, address) : false;
|
|
61
67
|
// })
|
|
62
|
-
// .map((thread) =>
|
|
68
|
+
// .map((thread) => Obj.getDXN(thread!).toString())
|
|
63
69
|
// .join(' ');
|
|
64
70
|
|
|
65
71
|
const description = model.getValueDescription(address);
|
|
@@ -12,18 +12,18 @@ import { ghostHover } from '@dxos/react-ui-theme';
|
|
|
12
12
|
|
|
13
13
|
import { meta } from '../../meta';
|
|
14
14
|
import { rangeFromIndex } from '../../types';
|
|
15
|
-
import {
|
|
15
|
+
import { Sheet } from '../../types';
|
|
16
16
|
|
|
17
17
|
export type RangeListProps = {
|
|
18
|
-
sheet:
|
|
18
|
+
sheet: Sheet.Sheet;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export const RangeList = ({ sheet }: RangeListProps) => {
|
|
22
22
|
const { t } = useTranslation(meta.id);
|
|
23
23
|
// TODO(thure): Implement similar to comments, #8121
|
|
24
|
-
const handleSelectRange = (range: Range) => {};
|
|
24
|
+
const handleSelectRange = (range: Sheet.Range) => {};
|
|
25
25
|
const handleDeleteRange = useCallback(
|
|
26
|
-
(range: Range) => {
|
|
26
|
+
(range: Sheet.Range) => {
|
|
27
27
|
const index = sheet.ranges.findIndex((sheetRange) => sheetRange === range);
|
|
28
28
|
sheet.ranges.splice(index, 1);
|
|
29
29
|
},
|
|
@@ -37,7 +37,7 @@ export const RangeList = ({ sheet }: RangeListProps) => {
|
|
|
37
37
|
<Callout.Title>{t('no ranges message')}</Callout.Title>
|
|
38
38
|
</Callout.Root>
|
|
39
39
|
) : (
|
|
40
|
-
<List.Root<Range> items={sheet.ranges} isItem={Schema.is(Range)}>
|
|
40
|
+
<List.Root<Sheet.Range> items={sheet.ranges} isItem={Schema.is(Sheet.Range)}>
|
|
41
41
|
{({ items: ranges }) =>
|
|
42
42
|
ranges.map((range, i) => (
|
|
43
43
|
<List.Item key={i} item={range} classNames={['p-2', ghostHover]}>
|
|
@@ -7,8 +7,9 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, IntentPlugin, contributes, createResolver } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
10
11
|
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
11
|
-
import {
|
|
12
|
+
import { useSpace } from '@dxos/react-client/echo';
|
|
12
13
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
14
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
15
|
import { AttendableContainer } from '@dxos/react-ui-attention';
|
|
@@ -16,7 +17,7 @@ import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
|
16
17
|
|
|
17
18
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
18
19
|
import { translations } from '../../translations';
|
|
19
|
-
import {
|
|
20
|
+
import { Sheet, SheetAction } from '../../types';
|
|
20
21
|
import { useComputeGraph } from '../ComputeGraph';
|
|
21
22
|
import { RangeList } from '../RangeList';
|
|
22
23
|
|
|
@@ -27,7 +28,7 @@ const meta = {
|
|
|
27
28
|
component: SheetContainer,
|
|
28
29
|
decorators: [
|
|
29
30
|
withTheme,
|
|
30
|
-
withClientProvider({ types: [
|
|
31
|
+
withClientProvider({ types: [Sheet.Sheet], createSpace: true }),
|
|
31
32
|
withComputeGraphDecorator(),
|
|
32
33
|
withAttention,
|
|
33
34
|
// TODO(wittjosiah): Consider whether we should refactor component so story doesn't need to depend on intents.
|
|
@@ -63,7 +64,7 @@ export const Default = () => {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
|
-
<AttendableContainer id={
|
|
67
|
+
<AttendableContainer id={Obj.getDXN(sheet).toString()} classNames='contents'>
|
|
67
68
|
<SheetContainer space={space} sheet={sheet} role='story' ignoreAttention />
|
|
68
69
|
</AttendableContainer>
|
|
69
70
|
);
|
|
@@ -72,13 +73,15 @@ export const Default = () => {
|
|
|
72
73
|
export const Spec = () => {
|
|
73
74
|
const space = useSpace();
|
|
74
75
|
const graph = useComputeGraph(space);
|
|
75
|
-
const sheet = useTestSheet(space, graph, {
|
|
76
|
+
const sheet = useTestSheet(space, graph, {
|
|
77
|
+
cells: { A1: { value: 'Ready' } },
|
|
78
|
+
});
|
|
76
79
|
if (!sheet || !space) {
|
|
77
80
|
return null;
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
return (
|
|
81
|
-
<AttendableContainer id={
|
|
84
|
+
<AttendableContainer id={Obj.getDXN(sheet).toString()} classNames='contents'>
|
|
82
85
|
<div role='none' className='grid grid-rows-[66%_33%] bs-full grid-cols-1'>
|
|
83
86
|
<SheetContainer space={space} sheet={sheet} role='story' ignoreAttention />
|
|
84
87
|
<div role='none' data-testid='grid.range-list'>
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
8
9
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
9
10
|
|
|
10
|
-
import { type
|
|
11
|
+
import { type Sheet } from '../../types';
|
|
11
12
|
import { useComputeGraph } from '../ComputeGraph';
|
|
12
13
|
import { FunctionEditor } from '../FunctionEditor';
|
|
13
14
|
import { GridSheet } from '../GridSheet';
|
|
@@ -16,7 +17,7 @@ import { SheetToolbar } from '../SheetToolbar';
|
|
|
16
17
|
|
|
17
18
|
export type SheetContainerProps = {
|
|
18
19
|
space: Space;
|
|
19
|
-
sheet:
|
|
20
|
+
sheet: Sheet.Sheet;
|
|
20
21
|
role?: string;
|
|
21
22
|
ignoreAttention?: boolean;
|
|
22
23
|
};
|
|
@@ -31,7 +32,7 @@ export const SheetContainer = ({ space, sheet, role, ignoreAttention }: SheetCon
|
|
|
31
32
|
statusbar
|
|
32
33
|
classNames={[role === 'section' && 'aspect-video', role === 'story' && 'bs-full']}
|
|
33
34
|
>
|
|
34
|
-
<SheetToolbar id={
|
|
35
|
+
<SheetToolbar id={Obj.getDXN(sheet).toString()} />
|
|
35
36
|
<GridSheet />
|
|
36
37
|
<FunctionEditor />
|
|
37
38
|
</StackItem.Content>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import React, { type PropsWithChildren, createContext, useCallback, useContext, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type CellAddress, type CellRange, type CompleteCellRange, type ComputeGraph } from '@dxos/compute';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
8
9
|
import { invariant } from '@dxos/invariant';
|
|
9
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
10
|
import {
|
|
11
11
|
Grid,
|
|
12
12
|
type GridContentProps,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '@dxos/react-ui-grid';
|
|
17
17
|
|
|
18
18
|
import { type SheetModel, useSheetModel } from '../../model';
|
|
19
|
-
import { type
|
|
19
|
+
import { type Sheet } from '../../types';
|
|
20
20
|
|
|
21
21
|
export type SheetContextValue = {
|
|
22
22
|
id: string;
|
|
@@ -114,7 +114,7 @@ const SheetProviderImpl = ({
|
|
|
114
114
|
|
|
115
115
|
export type SheetProviderProps = {
|
|
116
116
|
graph: ComputeGraph;
|
|
117
|
-
sheet:
|
|
117
|
+
sheet: Sheet.Sheet;
|
|
118
118
|
readonly?: boolean;
|
|
119
119
|
ignoreAttention?: boolean;
|
|
120
120
|
} & Pick<SheetContextValue, 'onInfo'>;
|
|
@@ -130,7 +130,7 @@ export const SheetProvider = ({
|
|
|
130
130
|
const model = useSheetModel(graph, sheet, { readonly });
|
|
131
131
|
|
|
132
132
|
return !model ? null : (
|
|
133
|
-
<Grid.Root id={
|
|
133
|
+
<Grid.Root id={Obj.getDXN(sheet).toString()}>
|
|
134
134
|
<SheetProviderImpl model={model} onInfo={onInfo} ignoreAttention={ignoreAttention}>
|
|
135
135
|
{children}
|
|
136
136
|
</SheetProviderImpl>
|