@dxos/plugin-sheet 0.6.12-main.5cc132e → 0.6.12-main.78ddbdf
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-V4GCCZTX.mjs +261 -0
- package/dist/lib/browser/SheetContainer-V4GCCZTX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GNNVBNCX.mjs → chunk-6ZMQVB4Z.mjs} +358 -678
- package/dist/lib/browser/chunk-6ZMQVB4Z.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JRL5LGCE.mjs → chunk-QILRZNE5.mjs} +2 -5
- package/dist/lib/browser/chunk-QILRZNE5.mjs.map +7 -0
- package/dist/lib/{node-esm/chunk-WUPTZUTX.mjs → browser/chunk-T3NJFTD4.mjs} +4 -14
- package/dist/lib/browser/chunk-T3NJFTD4.mjs.map +7 -0
- package/dist/lib/browser/{SheetContainer-Y7ZMFBAP.mjs → chunk-U2JHW3L6.mjs} +819 -498
- package/dist/lib/browser/chunk-U2JHW3L6.mjs.map +7 -0
- package/dist/lib/browser/graph-T27BOBOV.mjs +21 -0
- package/dist/lib/browser/graph-T27BOBOV.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +58 -55
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/types.mjs +4 -6
- package/dist/lib/node/SheetContainer-3ZY7MPWJ.cjs +279 -0
- package/dist/lib/node/SheetContainer-3ZY7MPWJ.cjs.map +7 -0
- package/dist/lib/node/{chunk-BJ6ZD7MN.cjs → chunk-BNARJ5GM.cjs} +5 -18
- package/dist/lib/node/chunk-BNARJ5GM.cjs.map +7 -0
- package/dist/lib/node/{chunk-ZRQZFV5T.cjs → chunk-DD6FIXWC.cjs} +359 -679
- package/dist/lib/node/chunk-DD6FIXWC.cjs.map +7 -0
- package/dist/lib/node/{SheetContainer-KEOKUKAQ.cjs → chunk-OTTD7FBK.cjs} +875 -551
- package/dist/lib/node/chunk-OTTD7FBK.cjs.map +7 -0
- package/dist/lib/node/{chunk-VJU3NPUJ.cjs → chunk-Q3HBHPRL.cjs} +8 -19
- package/dist/lib/node/chunk-Q3HBHPRL.cjs.map +7 -0
- package/dist/lib/node/graph-SPKGX7W4.cjs +43 -0
- package/dist/lib/node/graph-SPKGX7W4.cjs.map +7 -0
- package/dist/lib/node/index.cjs +75 -64
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.cjs +3 -3
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types.cjs +10 -12
- package/dist/lib/node/types.cjs.map +2 -2
- package/dist/lib/node-esm/SheetContainer-PXSJX6XK.mjs +262 -0
- package/dist/lib/node-esm/SheetContainer-PXSJX6XK.mjs.map +7 -0
- package/dist/lib/node-esm/{SheetContainer-Y7ZMFBAP.mjs → chunk-7HVSOTGA.mjs} +820 -498
- package/dist/lib/node-esm/chunk-7HVSOTGA.mjs.map +7 -0
- package/dist/lib/{browser/chunk-WUPTZUTX.mjs → node-esm/chunk-BMNA27EX.mjs} +5 -14
- package/dist/lib/node-esm/chunk-BMNA27EX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GNNVBNCX.mjs → chunk-D6KU5MI7.mjs} +359 -677
- package/dist/lib/node-esm/chunk-D6KU5MI7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JRL5LGCE.mjs → chunk-IU2L277A.mjs} +4 -5
- package/dist/lib/node-esm/chunk-IU2L277A.mjs.map +7 -0
- package/dist/lib/node-esm/graph-U67IO4UC.mjs +22 -0
- package/dist/lib/node-esm/graph-U67IO4UC.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +59 -55
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/meta.mjs +2 -1
- package/dist/lib/node-esm/types.mjs +5 -6
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/components/CellEditor/CellEditor.d.ts +23 -3
- package/dist/types/src/components/CellEditor/CellEditor.d.ts.map +1 -1
- package/dist/types/src/components/CellEditor/CellEditor.stories.d.ts +2 -2
- package/dist/types/src/components/CellEditor/CellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/CellEditor/extension.d.ts +1 -1
- package/dist/types/src/components/CellEditor/extension.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts +11 -0
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -0
- package/dist/types/src/components/ComputeGraph/index.d.ts +1 -3
- package/dist/types/src/components/ComputeGraph/index.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts +10 -0
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +9 -0
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/util.d.ts +7 -0
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -0
- package/dist/types/src/components/Sheet/Sheet.d.ts +1 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/Sheet.stories.d.ts +5 -6
- package/dist/types/src/components/Sheet/Sheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/grid.d.ts +2 -2
- package/dist/types/src/components/Sheet/grid.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/nav.d.ts +3 -3
- package/dist/types/src/components/Sheet/nav.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/sheet-context.d.ts +4 -5
- package/dist/types/src/components/Sheet/sheet-context.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/threads.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer.d.ts +1 -1
- package/dist/types/src/components/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/defs/index.d.ts +3 -0
- package/dist/types/src/defs/index.d.ts.map +1 -0
- package/dist/types/src/{model → defs}/types.d.ts +8 -3
- package/dist/types/src/defs/types.d.ts.map +1 -0
- package/dist/types/src/defs/types.test.d.ts.map +1 -0
- package/dist/types/src/{model → defs}/util.d.ts +8 -4
- package/dist/types/src/defs/util.d.ts.map +1 -0
- package/dist/types/src/extensions/compute.d.ts +5 -0
- package/dist/types/src/extensions/compute.d.ts.map +1 -0
- package/dist/types/src/extensions/compute.stories.d.ts +26 -0
- package/dist/types/src/extensions/compute.stories.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +2 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/{components/ComputeGraph → graph}/async-function.d.ts +1 -1
- package/dist/types/src/graph/async-function.d.ts.map +1 -0
- package/dist/types/src/graph/compute-graph.browser.test.d.ts +2 -0
- package/dist/types/src/graph/compute-graph.browser.test.d.ts.map +1 -0
- package/dist/types/src/graph/compute-graph.d.ts +81 -0
- package/dist/types/src/graph/compute-graph.d.ts.map +1 -0
- package/dist/types/src/graph/compute-graph.stories.d.ts +10 -0
- package/dist/types/src/graph/compute-graph.stories.d.ts.map +1 -0
- package/dist/types/src/graph/compute-node.d.ts +19 -0
- package/dist/types/src/graph/compute-node.d.ts.map +1 -0
- package/dist/types/src/{components/ComputeGraph/custom.d.ts → graph/custom-function.d.ts} +1 -1
- package/dist/types/src/graph/custom-function.d.ts.map +1 -0
- package/dist/types/src/graph/edge-function.d.ts.map +1 -0
- package/dist/types/src/{model/functions.d.ts → graph/function-defs.d.ts} +1 -1
- package/dist/types/src/graph/function-defs.d.ts.map +1 -0
- package/dist/types/src/graph/hyperformula.test.d.ts +2 -0
- package/dist/types/src/graph/hyperformula.test.d.ts.map +1 -0
- package/dist/types/src/graph/index.d.ts +4 -0
- package/dist/types/src/graph/index.d.ts.map +1 -0
- package/dist/types/src/graph/util.d.ts +2 -0
- package/dist/types/src/graph/util.d.ts.map +1 -0
- package/dist/types/src/hooks/hooks.stories.d.ts +11 -0
- package/dist/types/src/hooks/hooks.stories.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +4 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeGraph.d.ts +7 -0
- package/dist/types/src/hooks/useComputeGraph.d.ts.map +1 -0
- package/dist/types/src/hooks/useFormattingModel.d.ts +3 -0
- package/dist/types/src/hooks/useFormattingModel.d.ts.map +1 -0
- package/dist/types/src/hooks/useSheetModel.d.ts +8 -0
- package/dist/types/src/hooks/useSheetModel.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +1 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/model/formatting-model.d.ts +16 -0
- package/dist/types/src/model/formatting-model.d.ts.map +1 -0
- package/dist/types/src/model/index.d.ts +2 -4
- package/dist/types/src/model/index.d.ts.map +1 -1
- package/dist/types/src/model/{model.d.ts → sheet-model.d.ts} +9 -48
- package/dist/types/src/model/sheet-model.d.ts.map +1 -0
- package/dist/types/src/sanity.test.d.ts +2 -0
- package/dist/types/src/sanity.test.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +9 -0
- package/dist/types/src/testing/testing.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +12 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/vendor/hyperformula.mjs +37145 -0
- package/package.json +41 -38
- package/src/SheetPlugin.tsx +39 -59
- package/src/components/CellEditor/CellEditor.stories.tsx +4 -3
- package/src/components/CellEditor/CellEditor.tsx +59 -9
- package/src/components/CellEditor/extension.test.ts +3 -3
- package/src/components/CellEditor/extension.ts +1 -3
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +20 -0
- package/src/components/ComputeGraph/index.ts +1 -3
- package/src/components/GridSheet/GridSheet.stories.tsx +36 -0
- package/src/components/GridSheet/GridSheet.tsx +153 -0
- package/src/components/GridSheet/util.ts +108 -0
- package/src/components/Sheet/Sheet.stories.tsx +41 -82
- package/src/components/Sheet/Sheet.tsx +12 -10
- package/src/components/Sheet/grid.ts +3 -3
- package/src/components/Sheet/nav.ts +19 -19
- package/src/components/Sheet/sheet-context.tsx +10 -80
- package/src/components/Sheet/threads.tsx +10 -6
- package/src/components/SheetContainer.tsx +2 -2
- package/src/components/Toolbar/Toolbar.tsx +1 -2
- package/src/components/index.ts +1 -0
- package/src/defs/index.ts +6 -0
- package/src/{model → defs}/types.test.ts +7 -7
- package/src/{model → defs}/types.ts +23 -14
- package/src/{model → defs}/util.ts +49 -17
- package/src/extensions/compute.stories.tsx +151 -0
- package/src/extensions/compute.ts +98 -0
- package/src/extensions/index.ts +5 -0
- package/src/{components/ComputeGraph → graph}/async-function.ts +3 -1
- package/src/graph/compute-graph.browser.test.ts +104 -0
- package/src/graph/compute-graph.stories.tsx +92 -0
- package/src/graph/compute-graph.ts +290 -0
- package/src/graph/compute-node.ts +51 -0
- package/src/{components/ComputeGraph/custom.ts → graph/custom-function.ts} +2 -6
- package/src/{components/ComputeGraph → graph}/edge-function.ts +2 -1
- package/src/graph/hyperformula.test.ts +15 -0
- package/src/graph/index.ts +7 -0
- package/src/graph/util.ts +8 -0
- package/src/hooks/hooks.stories.tsx +50 -0
- package/src/hooks/index.ts +7 -0
- package/src/hooks/useComputeGraph.ts +20 -0
- package/src/hooks/useFormattingModel.ts +11 -0
- package/src/hooks/useSheetModel.ts +43 -0
- package/src/meta.tsx +1 -5
- package/src/{components/Sheet/formatting.ts → model/formatting-model.ts} +20 -13
- package/src/model/index.ts +2 -4
- package/src/model/{model.ts → sheet-model.ts} +67 -184
- package/src/sanity.test.ts +40 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/testing.tsx +66 -0
- package/src/types.ts +14 -12
- package/dist/lib/browser/SheetContainer-Y7ZMFBAP.mjs.map +0 -7
- package/dist/lib/browser/chunk-GNNVBNCX.mjs.map +0 -7
- package/dist/lib/browser/chunk-JRL5LGCE.mjs.map +0 -7
- package/dist/lib/browser/chunk-PGKZPKUD.mjs +0 -175
- package/dist/lib/browser/chunk-PGKZPKUD.mjs.map +0 -7
- package/dist/lib/browser/chunk-VBF7YENS.mjs +0 -8
- package/dist/lib/browser/chunk-VBF7YENS.mjs.map +0 -7
- package/dist/lib/browser/chunk-WUPTZUTX.mjs.map +0 -7
- package/dist/lib/browser/testing.mjs +0 -92
- package/dist/lib/browser/testing.mjs.map +0 -7
- package/dist/lib/node/SheetContainer-KEOKUKAQ.cjs.map +0 -7
- package/dist/lib/node/chunk-57PB2HPY.cjs +0 -40
- package/dist/lib/node/chunk-57PB2HPY.cjs.map +0 -7
- package/dist/lib/node/chunk-6LWBQAQZ.cjs +0 -202
- package/dist/lib/node/chunk-6LWBQAQZ.cjs.map +0 -7
- package/dist/lib/node/chunk-BJ6ZD7MN.cjs.map +0 -7
- package/dist/lib/node/chunk-VJU3NPUJ.cjs.map +0 -7
- package/dist/lib/node/chunk-ZRQZFV5T.cjs.map +0 -7
- package/dist/lib/node/testing.cjs +0 -111
- package/dist/lib/node/testing.cjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-Y7ZMFBAP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GNNVBNCX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JRL5LGCE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PGKZPKUD.mjs +0 -175
- package/dist/lib/node-esm/chunk-PGKZPKUD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VBF7YENS.mjs +0 -8
- package/dist/lib/node-esm/chunk-VBF7YENS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WUPTZUTX.mjs.map +0 -7
- package/dist/lib/node-esm/testing.mjs +0 -92
- package/dist/lib/node-esm/testing.mjs.map +0 -7
- package/dist/types/src/components/ComputeGraph/async-function.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/custom.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/edge-function.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/graph-context.d.ts +0 -12
- package/dist/types/src/components/ComputeGraph/graph-context.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/graph.browser.test.d.ts +0 -2
- package/dist/types/src/components/ComputeGraph/graph.browser.test.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/graph.d.ts +0 -26
- package/dist/types/src/components/ComputeGraph/graph.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/formatting.d.ts +0 -14
- package/dist/types/src/components/Sheet/formatting.d.ts.map +0 -1
- package/dist/types/src/model/functions.d.ts.map +0 -1
- package/dist/types/src/model/model.browser.test.d.ts +0 -2
- package/dist/types/src/model/model.browser.test.d.ts.map +0 -1
- package/dist/types/src/model/model.d.ts.map +0 -1
- package/dist/types/src/model/types.d.ts.map +0 -1
- package/dist/types/src/model/types.test.d.ts.map +0 -1
- package/dist/types/src/model/util.d.ts.map +0 -1
- package/dist/types/src/testing.d.ts +0 -9
- package/dist/types/src/testing.d.ts.map +0 -1
- package/src/components/ComputeGraph/graph-context.tsx +0 -50
- package/src/components/ComputeGraph/graph.browser.test.ts +0 -49
- package/src/components/ComputeGraph/graph.ts +0 -62
- package/src/model/model.browser.test.ts +0 -99
- package/src/testing.ts +0 -50
- /package/dist/types/src/{model → defs}/types.test.d.ts +0 -0
- /package/dist/types/src/{components/ComputeGraph → graph}/edge-function.d.ts +0 -0
- /package/src/{model/functions.ts → graph/function-defs.ts} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import { type Decorator } from '@storybook/react';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { type SizeMap } from './grid';
|
|
5
4
|
declare const _default: {
|
|
@@ -10,24 +9,24 @@ declare const _default: {
|
|
|
10
9
|
classNames?: import("@dxos/react-ui").ClassNameValue;
|
|
11
10
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
11
|
Rows: React.ForwardRefExoticComponent<{
|
|
13
|
-
rows: import("../../
|
|
12
|
+
rows: import("../../defs").CellIndex[];
|
|
14
13
|
} & {
|
|
15
14
|
selected?: number;
|
|
16
15
|
onSelect?: (selected: number) => void;
|
|
17
16
|
} & {
|
|
18
17
|
sizes?: SizeMap;
|
|
19
|
-
onResize?: (idx: import("../../
|
|
18
|
+
onResize?: (idx: import("../../defs").CellIndex, size: number, save?: boolean) => void;
|
|
20
19
|
} & {
|
|
21
20
|
onMove?: (from: number, to: number) => void;
|
|
22
21
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
22
|
Columns: React.ForwardRefExoticComponent<{
|
|
24
|
-
columns: import("../../
|
|
23
|
+
columns: import("../../defs").CellIndex[];
|
|
25
24
|
} & {
|
|
26
25
|
selected?: number;
|
|
27
26
|
onSelect?: (selected: number) => void;
|
|
28
27
|
} & {
|
|
29
28
|
sizes?: SizeMap;
|
|
30
|
-
onResize?: (idx: import("../../
|
|
29
|
+
onResize?: (idx: import("../../defs").CellIndex, size: number, save?: boolean) => void;
|
|
31
30
|
} & {
|
|
32
31
|
onMove?: (from: number, to: number) => void;
|
|
33
32
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -38,7 +37,7 @@ declare const _default: {
|
|
|
38
37
|
StatusBar: () => React.JSX.Element;
|
|
39
38
|
Debug: () => React.JSX.Element;
|
|
40
39
|
};
|
|
41
|
-
decorators: Decorator[];
|
|
40
|
+
decorators: import("@storybook/react").Decorator[];
|
|
42
41
|
};
|
|
43
42
|
export default _default;
|
|
44
43
|
export declare const Default: () => React.JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/Sheet.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,
|
|
1
|
+
{"version":3,"file":"Sheet.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/Sheet.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;+EA0O0iI,CAAC;;;;;;;;;;;+EAAD,CAAC;;;;;;;;;;;;;AArJjlI,wBASE;AAEF,eAAO,MAAM,OAAO,gCAcnB,CAAC;AAEF,eAAO,MAAM,KAAK,gCAcjB,CAAC;AAEF,eAAO,MAAM,IAAI,gCAkBhB,CAAC;AAEF,eAAO,MAAM,OAAO,gCAkBnB,CAAC;AAEF,eAAO,MAAM,IAAI,gCAsBhB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,yBAkBxB,CAAC;AAEF,eAAO,MAAM,UAAU,yBActB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type MouseEvent } from 'react';
|
|
2
|
-
import { type CellAddress, type CellIndex } from '../../
|
|
2
|
+
import { type CellAddress, type CellIndex } from '../../defs';
|
|
3
3
|
export type SizeMap = Record<string, number>;
|
|
4
4
|
export type RowPosition = {
|
|
5
5
|
row: number;
|
|
6
6
|
} & Pick<DOMRect, 'top' | 'height'>;
|
|
7
7
|
export type ColumnPosition = {
|
|
8
|
-
|
|
8
|
+
col: number;
|
|
9
9
|
} & Pick<DOMRect, 'left' | 'width'>;
|
|
10
10
|
export declare const axisWidth = "calc(var(--rail-size)-2px)";
|
|
11
11
|
export declare const axisHeight = 34;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/grid.ts"],"names":[],"mappings":"AAIA,OAAO,E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K,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,8DAOvB,eAAe,GAAG;IACnB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC,KAAG,UA4GH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,UAAW,UAAU,KAAG,WAAW,GAAG,SASlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,SAAU,WAAW,QAAQ,WAAW,KAAG,WAAW,GAAG,IAGnF,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type KeyboardEvent, type MouseEventHandler } from 'react';
|
|
2
|
-
import { type CellAddress, type CellRange } from '../../
|
|
2
|
+
import { type CellAddress, type CellRange } from '../../defs';
|
|
3
3
|
export type GridSize = {
|
|
4
4
|
numRows: number;
|
|
5
|
-
|
|
5
|
+
numCols: number;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Calculate next range based on arrow keys.
|
|
@@ -14,7 +14,7 @@ export declare const handleNav: (ev: KeyboardEvent<HTMLInputElement>, cursor: Ce
|
|
|
14
14
|
/**
|
|
15
15
|
* Calculate next cell based on arrow keys.
|
|
16
16
|
*/
|
|
17
|
-
export declare const handleArrowNav: (ev: Pick<KeyboardEvent<HTMLInputElement>, "key" | "metaKey">, cursor: CellAddress | undefined, { numRows,
|
|
17
|
+
export declare const handleArrowNav: (ev: Pick<KeyboardEvent<HTMLInputElement>, "key" | "metaKey">, cursor: CellAddress | undefined, { numRows, numCols }: GridSize) => CellAddress | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Hook to manage range drag handlers.
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/nav.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/nav.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAa,MAAM,YAAY,CAAC;AAEzE,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,OAChB,aAAa,CAAC,gBAAgB,CAAC,UAC3B,WAAW,GAAG,SAAS,SACxB,SAAS,GAAG,SAAS,QACtB,QAAQ,KACb;IAAE,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAoC3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,OACrB,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,UACpD,WAAW,GAAG,SAAS,wBACT,QAAQ,KAC7B,WAAW,GAAG,SAmChB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,cAAc,OACrB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,KAC1E;IACD,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE;QACR,WAAW,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;QAC/C,WAAW,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;QAC/C,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;KAC9C,CAAC;CAwCH,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type Space } from '@dxos/react-client/echo';
|
|
3
3
|
import { createDecorations } from './decorations';
|
|
4
|
-
import {
|
|
5
|
-
import { type
|
|
4
|
+
import { type CellAddress, type CellRange } from '../../defs';
|
|
5
|
+
import { type FormattingModel, type SheetModel } from '../../model';
|
|
6
6
|
import { type SheetType } from '../../types';
|
|
7
|
-
import { type FunctionContextOptions } from '../ComputeGraph';
|
|
8
7
|
export type SheetContextType = {
|
|
9
8
|
model: SheetModel;
|
|
10
9
|
formatting: FormattingModel;
|
|
@@ -22,6 +21,6 @@ export type SheetContextProps = {
|
|
|
22
21
|
sheet: SheetType;
|
|
23
22
|
space: Space;
|
|
24
23
|
readonly?: boolean;
|
|
25
|
-
} & Pick<SheetContextType, 'onInfo'
|
|
26
|
-
export declare const SheetContextProvider: ({ children, sheet, space, readonly, onInfo,
|
|
24
|
+
} & Pick<SheetContextType, 'onInfo'>;
|
|
25
|
+
export declare const SheetContextProvider: ({ children, sheet, space, readonly, onInfo, }: PropsWithChildren<SheetContextProps>) => React.JSX.Element | null;
|
|
27
26
|
//# sourceMappingURL=sheet-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet-context.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/sheet-context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"sheet-context.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/sheet-context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAgD,MAAM,OAAO,CAA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ads.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/threads.tsx"],"names":[],"mappings":"AAwMA,eAAO,MAAM,UAAU,YAItB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type SheetRootProps } from './Sheet';
|
|
3
3
|
export declare const sectionToolbarLayout = "bs-[--rail-action] bg-[--sticky-bg] sticky block-start-0 __-block-start-px transition-opacity";
|
|
4
|
-
declare const SheetContainer: ({ sheet, space, role
|
|
4
|
+
declare const SheetContainer: ({ sheet, space, role }: SheetRootProps & {
|
|
5
5
|
role?: string;
|
|
6
6
|
}) => React.JSX.Element;
|
|
7
7
|
export default SheetContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/SheetContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAO3C,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAUrD,eAAO,MAAM,oBAAoB,kGACgE,CAAC;AAElG,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"SheetContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/SheetContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAO3C,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAUrD,eAAO,MAAM,oBAAoB,kGACgE,CAAC;AAElG,QAAA,MAAM,cAAc,2BAA4B,cAAc,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,sBA6DjF,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAgBA,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AE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;AAEnE,MAAM,MAAM,YAAY,GAAG,eAAe,CACxC,iBAAiB,CAAC;IAChB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC,CACH,CAAC;AAEF,QAAA,MAA+B,iBAAiB,wCAA0C,CAAC;AA4K3F,eAAO,MAAM,OAAO;+CA1KqC,YAAY;;;;;;CAiLpE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -10,7 +10,7 @@ declare const _default: {
|
|
|
10
10
|
Styles: () => React.JSX.Element;
|
|
11
11
|
Actions: () => React.JSX.Element;
|
|
12
12
|
};
|
|
13
|
-
decorators: import("@storybook/react
|
|
13
|
+
decorators: import("@storybook/react").Decorator[];
|
|
14
14
|
parameters: {
|
|
15
15
|
translations: readonly [{
|
|
16
16
|
readonly 'en-US': {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export * from './ComputeGraph';
|
|
3
|
-
export
|
|
3
|
+
export * from './Sheet';
|
|
4
|
+
export declare const SheetContainer: React.LazyExoticComponent<({ sheet, space, role }: import("./Sheet").SheetRootProps & {
|
|
4
5
|
role?: string;
|
|
5
6
|
}) => React.JSX.Element>;
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,cAAc,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AAGxB,eAAO,MAAM,cAAc;QACwpB,CAAC;wBAD1mB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/defs/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
export declare const DEFAULT_ROWS = 50;
|
|
2
|
+
export declare const DEFAULT_COLUMNS = 26;
|
|
3
|
+
export declare const MAX_ROWS = 500;
|
|
1
4
|
export declare const MAX_COLUMNS: number;
|
|
2
5
|
export type CellAddress = {
|
|
3
|
-
|
|
6
|
+
col: number;
|
|
4
7
|
row: number;
|
|
5
8
|
};
|
|
6
9
|
export type CellRange = {
|
|
7
10
|
from: CellAddress;
|
|
8
11
|
to?: CellAddress;
|
|
9
12
|
};
|
|
13
|
+
export type CellIndex = string;
|
|
14
|
+
export type CellContentValue = number | string | boolean | null;
|
|
10
15
|
export declare const posEquals: (a: CellAddress | undefined, b: CellAddress | undefined) => boolean;
|
|
11
|
-
export declare const columnLetter: (
|
|
12
|
-
export declare const addressToA1Notation: ({
|
|
16
|
+
export declare const columnLetter: (col: number) => string;
|
|
17
|
+
export declare const addressToA1Notation: ({ col, row }: CellAddress) => string;
|
|
13
18
|
export declare const addressFromA1Notation: (ref: string) => CellAddress;
|
|
14
19
|
export declare const rangeToA1Notation: (range: CellRange) => string;
|
|
15
20
|
export declare const rangeFromA1Notation: (ref: string) => CellRange;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/defs/types.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,QAAQ,MAAM,CAAC;AAC5B,eAAO,MAAM,WAAW,QAAS,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,EAAE,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAEhE,eAAO,MAAM,SAAS,MAAO,WAAW,GAAG,SAAS,KAAK,WAAW,GAAG,SAAS,YAE/E,CAAC;AAEF,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,MAM1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,iBAAkB,WAAW,KAAG,MAE/D,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAS,MAAM,KAAG,WAOnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,SAAS,WAIjD,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAS,MAAM,KAAG,SAGjD,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,SAAS,GAAG,SAAS,QAAQ,WAAW,KAAG,OAuBzE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.test.d.ts","sourceRoot":"","sources":["../../../../src/defs/types.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type SheetType } from '../types';
|
|
1
|
+
import { type CellAddress, type CellRange } from './types';
|
|
2
|
+
import { type CreateSheetOptions, type SheetSize, SheetType } from '../types';
|
|
3
3
|
export declare class ApiError extends Error {
|
|
4
4
|
}
|
|
5
5
|
export declare class ReadonlyException extends ApiError {
|
|
@@ -12,6 +12,9 @@ export declare class RangeException extends ApiError {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const createIndex: (length?: number) => string;
|
|
14
14
|
export declare const createIndices: (length: number) => string[];
|
|
15
|
+
export declare const insertIndices: (indices: string[], i: number, n: number, max: number) => void;
|
|
16
|
+
export declare const initialize: (sheet: SheetType, { rows, columns }?: Partial<SheetSize>) => void;
|
|
17
|
+
export declare const createSheet: ({ title, ...size }?: CreateSheetOptions) => SheetType;
|
|
15
18
|
/**
|
|
16
19
|
* E.g., "A1" => "CA2@CB3".
|
|
17
20
|
*/
|
|
@@ -28,8 +31,9 @@ export declare const rangeToIndex: (sheet: SheetType, range: CellRange) => strin
|
|
|
28
31
|
* E.g., "CA2@CB3:CC4@CD5" => "A1:B2".
|
|
29
32
|
*/
|
|
30
33
|
export declare const rangeFromIndex: (sheet: SheetType, idx: string) => CellRange;
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Find closest cell to cursor.
|
|
36
|
+
*/
|
|
33
37
|
export declare const closest: (cursor: CellAddress, cells: CellAddress[]) => CellAddress | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* Compares the positions of two cell indexes in a sheet.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/defs/util.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAwD,MAAM,SAAS,CAAC;AACjH,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG9E,qBAAa,QAAS,SAAQ,KAAK;CAAG;AAEtC,qBAAa,iBAAkB,SAAQ,QAAQ;CAAG;AAElD,qBAAa,cAAe,SAAQ,QAAQ;gBAC9B,CAAC,EAAE,MAAM;CAGtB;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,uBAAiB,MAKxC,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,MAAM,KAAG,MAAM,EAAqD,CAAC;AAE3G,eAAO,MAAM,aAAa,YAAa,MAAM,EAAE,KAAK,MAAM,KAAK,MAAM,OAAO,MAAM,SAOjF,CAAC;AAEF,eAAO,MAAM,UAAU,UACd,SAAS,sBACoC,OAAO,CAAC,SAAS,CAAC,SAQvE,CAAC;AAEF,eAAO,MAAM,WAAW,wBAAwB,kBAAkB,KAAQ,SAazE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,UAAW,SAAS,QAAQ,WAAW,KAAG,MAEpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,UAAW,SAAS,OAAO,MAAM,KAAG,WAMhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,SAAS,SAAS,KAAG,MAEjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,UAAW,SAAS,OAAO,MAAM,KAAG,SAG9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,WAAY,WAAW,SAAS,WAAW,EAAE,KAAG,WAAW,GAAG,SAajF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,UAAW,SAAS,UAAU,MAAM,UAAU,MAAM,KAAG,MAUxF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
import { type ComputeNode } from '../graph';
|
|
3
|
+
export type ComputeOptions = {};
|
|
4
|
+
export declare const compute: (computeNode: ComputeNode, options?: ComputeOptions) => Extension;
|
|
5
|
+
//# sourceMappingURL=compute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../../src/extensions/compute.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAO5C,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC;AAEhC,eAAO,MAAM,OAAO,gBAAiB,WAAW,YAAW,cAAc,KAAQ,SA4DhF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type EditorProps = {
|
|
4
|
+
text?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: {
|
|
7
|
+
title: string;
|
|
8
|
+
decorators: import("@storybook/react").Decorator[];
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const Default: {
|
|
15
|
+
render: ({ text }: EditorProps) => React.JSX.Element;
|
|
16
|
+
args: {
|
|
17
|
+
text: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const Graph: {
|
|
21
|
+
render: (props: EditorProps) => React.JSX.Element;
|
|
22
|
+
args: {
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=compute.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute.stories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/compute.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AACrB,OAAO,KAA8B,MAAM,OAAO,CAAC;AAwBnD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;;;;;;AAqEF,wBASE;AAEF,eAAO,MAAM,OAAO;uBAxEM,WAAW;;;;CA8FpC,CAAC;AAEF,eAAO,MAAM,KAAK;oBA5CI,WAAW;;;;CA2DhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FunctionPlugin, type HyperFormula } from 'hyperformula';
|
|
2
1
|
import { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';
|
|
3
2
|
import { type InterpreterValue } from 'hyperformula/typings/interpreter/InterpreterValue';
|
|
4
3
|
import { type ProcedureAst } from 'hyperformula/typings/parser';
|
|
5
4
|
import { type UnsubscribeCallback } from '@dxos/async';
|
|
6
5
|
import { type Space } from '@dxos/client/echo';
|
|
6
|
+
import { FunctionPlugin, type HyperFormula } from '#hyperformula';
|
|
7
7
|
export type AsyncFunction = (...args: any) => Promise<InterpreterValue>;
|
|
8
8
|
export type FunctionOptions = {
|
|
9
9
|
ttl?: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-function.d.ts","sourceRoot":"","sources":["../../../../src/graph/async-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAoC,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AASpG,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG;IAC5B,GA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oB,SAAQ,cAAc;IACrD,IAAI,OAAO,IACqB,eAAe,CAC9C;IAED,gBAAgB,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,eAAe;CAO1G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute-graph.browser.test.d.ts","sourceRoot":"","sources":["../../../../src/graph/compute-graph.browser.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type FunctionPluginDefinition } from 'hyperformula';
|
|
2
|
+
import { type ConfigParams } from 'hyperformula/typings/ConfigParams';
|
|
3
|
+
import { type FunctionTranslationsPackage } from 'hyperformula/typings/interpreter';
|
|
4
|
+
import { Event } from '@dxos/async';
|
|
5
|
+
import { type SpaceId, type Space } from '@dxos/client/echo';
|
|
6
|
+
import { Resource } from '@dxos/context';
|
|
7
|
+
import { HyperFormula } from '#hyperformula';
|
|
8
|
+
import { FunctionContext, type FunctionContextOptions } from './async-function';
|
|
9
|
+
import { ComputeNode } from './compute-node';
|
|
10
|
+
import { type FunctionDefinition } from './function-defs';
|
|
11
|
+
export type ComputeGraphPlugin = {
|
|
12
|
+
plugin: FunctionPluginDefinition;
|
|
13
|
+
translations: FunctionTranslationsPackage;
|
|
14
|
+
};
|
|
15
|
+
export type ComputeGraphOptions = {
|
|
16
|
+
plugins?: ComputeGraphPlugin[];
|
|
17
|
+
} & Partial<FunctionContextOptions> & Partial<ConfigParams>;
|
|
18
|
+
export declare const defaultOptions: ComputeGraphOptions;
|
|
19
|
+
export declare const createSheetName: (id: string) => string;
|
|
20
|
+
export declare const getSheetId: (name: string) => string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* NOTE: Async imports to decouple hyperformula deps.
|
|
23
|
+
*/
|
|
24
|
+
export declare const createComputeGraphRegistry: (options?: Partial<FunctionContextOptions>) => ComputeGraphRegistry;
|
|
25
|
+
/**
|
|
26
|
+
* Manages a collection of ComputeGraph instances for each space.
|
|
27
|
+
*
|
|
28
|
+
* [ComputePlugin] => [ComputeGraphRegistry] => [ComputeGraph(Space)] => [ComputeNode(Object)]
|
|
29
|
+
*/
|
|
30
|
+
export declare class ComputeGraphRegistry extends Resource {
|
|
31
|
+
private readonly _options;
|
|
32
|
+
private readonly _registry;
|
|
33
|
+
constructor(_options?: ComputeGraphOptions);
|
|
34
|
+
getGraph(spaceId: SpaceId): ComputeGraph | undefined;
|
|
35
|
+
getOrCreateGraph(space: Space): Promise<ComputeGraph>;
|
|
36
|
+
createGraph(space: Space): Promise<ComputeGraph>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Per-space compute and dependency graph.
|
|
40
|
+
* Consists of multiple ComputeNode (corresponding to a HyperFormula sheet).
|
|
41
|
+
* Manages the set of custom functions.
|
|
42
|
+
* HyperFormula manages the dependency graph.
|
|
43
|
+
*/
|
|
44
|
+
export declare class ComputeGraph extends Resource {
|
|
45
|
+
private readonly _hf;
|
|
46
|
+
private readonly _space?;
|
|
47
|
+
private readonly _options?;
|
|
48
|
+
readonly id: string;
|
|
49
|
+
private readonly _nodes;
|
|
50
|
+
private _functions;
|
|
51
|
+
readonly context: FunctionContext;
|
|
52
|
+
readonly update: Event<void>;
|
|
53
|
+
constructor(_hf: HyperFormula, _space?: Space | undefined, _options?: Partial<FunctionContextOptions> | undefined);
|
|
54
|
+
get hf(): HyperFormula;
|
|
55
|
+
refresh(): void;
|
|
56
|
+
getFunctions({ standard, echo }?: {
|
|
57
|
+
standard?: boolean;
|
|
58
|
+
echo?: boolean;
|
|
59
|
+
}): FunctionDefinition[];
|
|
60
|
+
/**
|
|
61
|
+
* Get or create cell representing a sheet.
|
|
62
|
+
*/
|
|
63
|
+
getOrCreateNode(name: string): ComputeNode;
|
|
64
|
+
/**
|
|
65
|
+
* Map bound value to custom function invocation.
|
|
66
|
+
* E.g., "HELLO(...args)" => "EDGE("HELLO", ...args)".
|
|
67
|
+
*/
|
|
68
|
+
mapFormulaToNative(formula: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Map from binding to fully qualified ECHO ID (to store).
|
|
71
|
+
* E.g., HELLO() => spaceId:objectId()
|
|
72
|
+
*/
|
|
73
|
+
mapFunctionBindingToId(formula: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* Map from fully qualified ECHO ID to binding (from store).
|
|
76
|
+
* E.g., spaceId:objectId() => HELLO()
|
|
77
|
+
*/
|
|
78
|
+
mapFunctionBindingFromId(formula: string): string;
|
|
79
|
+
protected _open(): Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=compute-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute-graph.d.ts","sourceRoot":"","sources":["../../../../src/graph/compute-graph.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAEpF,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAA4B,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAOzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAY5E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,wBAAwB,CAAC;IACjC,YAAY,EAAE,2BAA2B,CAAC;CAC3C,CAAC;AAEF,MAA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AI,EAAE,iBAEL;IAED,OAAO;IAKP,YAAY,CAAC,EAAE,QAAe,EAAE,IAAW,EAAE,GAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,kBAAkB,EAAE;IAWjH;;OAEG;IAMH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAiB1C;;;OAGG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IA0C3C;;;OAGG;IACH,sBAAsB,CAAC,OAAO,EAAE,MAAM;IAgBtC;;;OAGG;IACH,wBAAwB,CAAC,OAAO,EAAE,MAAM;cAgBf,KAAK;CAY/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
decorators: import("@storybook/react").Decorator[];
|
|
6
|
+
render: (args: any) => React.JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const Default: {};
|
|
10
|
+
//# sourceMappingURL=compute-graph.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute-graph.stories.d.ts","sourceRoot":"","sources":["../../../../src/graph/compute-graph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAsC,MAAM,OAAO,CAAC;;;;mBAkF1C,GAAG;;AAPpB,wBAQE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Event } from '@dxos/async';
|
|
2
|
+
import { Resource } from '@dxos/context';
|
|
3
|
+
import { type ComputeGraph } from './compute-graph';
|
|
4
|
+
import { type CellAddress } from '../defs';
|
|
5
|
+
import { type CellScalarValue } from '../types';
|
|
6
|
+
/**
|
|
7
|
+
* Individual "sheet" (typically corresponds to an ECHO object).
|
|
8
|
+
*/
|
|
9
|
+
export declare class ComputeNode extends Resource {
|
|
10
|
+
private readonly _graph;
|
|
11
|
+
readonly sheetId: number;
|
|
12
|
+
readonly update: Event<void>;
|
|
13
|
+
constructor(_graph: ComputeGraph, sheetId: number);
|
|
14
|
+
get graph(): ComputeGraph;
|
|
15
|
+
get hf(): import("hyperformula").HyperFormula;
|
|
16
|
+
getValue(cell: CellAddress): CellScalarValue;
|
|
17
|
+
setValue(cell: CellAddress, value: CellScalarValue): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=compute-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute-node.d.ts","sourceRoot":"","sources":["../../../../src/graph/compute-node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AAEH,qBAAa,WAAY,SAAQ,QAAQ;IAKrC,OAAO,CAAC,QAAQ,CAAC,MAAM;aACP,OAAO,EAAE,MAAM;IAJjC,SAAgB,MAAM,cAAe;gBAGlB,MAAM,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM;IAMjC,IAAI,KAAK,iBAER;IAED,IAAI,EAAE,wCAEL;IAED,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe;IAS5C,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe;CAKnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-function.d.ts","sourceRoot":"","sources":["../../../../src/graph/custom-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKhE,OAAO,EAAsB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG3E;;GAEG;AACH,qBAAa,YAAa,SAAQ,mBAAmB;IACnD,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;IAQ/C,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;CAelD;AAgBD,eAAO,MAAM,wBAAwB;;;;;;;;;CASpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-function.d.ts","sourceRoot":"","sources":["../../../../src/graph/edge-function.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAShE,OAAO,EAAsB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI3E;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;CA0ChD;AAwBD,eAAO,MAAM,8BAA8B;;;;;;;CAO1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-defs.d.ts","sourceRoot":"","sources":["../../../../src/graph/function-defs.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,EA42EhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hyperformula.test.d.ts","sourceRoot":"","sources":["../../../../src/graph/hyperformula.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graph/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/graph/util.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,QAAS,MAAM,KAAG,MAE/C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ registry, children }: React.PropsWithChildren<import("../components").ComputeGraphContextType>) => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
render: (args: any) => React.JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: {};
|
|
11
|
+
//# sourceMappingURL=hooks.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.stories.d.ts","sourceRoot":"","sources":["../../../../src/hooks/hooks.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAA8B,MAAM,OAAO,CAAC;;;;;mBAwClC,GAAG;;AARpB,wBASE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
2
|
+
import { type ComputeGraph } from '../graph';
|
|
3
|
+
/**
|
|
4
|
+
* Get existing or create new compute graph for the given space.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useComputeGraph: (space?: Space) => ComputeGraph | undefined;
|
|
7
|
+
//# sourceMappingURL=useComputeGraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComputeGraph.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useComputeGraph.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIrD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,eAAe,WAAY,KAAK,KAAG,YAAY,GAAG,SAG9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormattingModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useFormattingModel.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,eAAO,MAAM,kBAAkB,UAAW,UAAU,GAAG,SAAS,KAAG,eAAe,GAAG,SAEpF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
2
|
+
import { SheetModel } from '../model';
|
|
3
|
+
import { type SheetType } from '../types';
|
|
4
|
+
export type UseSheetModelOptions = {
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const useSheetModel: (space?: Space, sheet?: SheetType, { readonly }?: UseSheetModelOptions) => SheetModel | undefined;
|
|
8
|
+
//# sourceMappingURL=useSheetModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSheetModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSheetModel.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,WAChB,KAAK,UACL,SAAS,iBACH,oBAAoB,KACjC,UAAU,GAAG,SAsBf,CAAC"}
|