@dxos/plugin-sheet 0.6.11 → 0.6.12-main.568932b
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-T2QWJOFD.mjs +262 -0
- package/dist/lib/browser/SheetContainer-T2QWJOFD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FUAGSXA4.mjs → chunk-5ZMVZYGB.mjs} +24 -19
- package/dist/lib/browser/chunk-5ZMVZYGB.mjs.map +7 -0
- package/dist/lib/browser/chunk-GSV5QNLD.mjs +2966 -0
- package/dist/lib/browser/chunk-GSV5QNLD.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/browser/{SheetContainer-U4H5D34A.mjs → chunk-ZL2V5UJR.mjs} +1182 -249
- package/dist/lib/browser/chunk-ZL2V5UJR.mjs.map +7 -0
- package/dist/lib/browser/graph-M4IQ76QX.mjs +33 -0
- package/dist/lib/browser/graph-M4IQ76QX.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +96 -60
- package/dist/lib/browser/index.mjs.map +4 -4
- 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-PV5ET4UJ.cjs +280 -0
- package/dist/lib/node/SheetContainer-PV5ET4UJ.cjs.map +7 -0
- package/dist/lib/node/{SheetContainer-AXQV3ZT5.cjs → chunk-2K53Z2TU.cjs} +1212 -287
- package/dist/lib/node/chunk-2K53Z2TU.cjs.map +7 -0
- package/dist/lib/node/{chunk-5KKJ4NPP.cjs → chunk-5XPK2V4A.cjs} +418 -678
- package/dist/lib/node/chunk-5XPK2V4A.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-DSYKOI4E.cjs → chunk-STAVQ2JE.cjs} +28 -24
- package/dist/lib/node/chunk-STAVQ2JE.cjs.map +7 -0
- package/dist/lib/node/graph-Q3N2X26H.cjs +55 -0
- package/dist/lib/node/graph-Q3N2X26H.cjs.map +7 -0
- package/dist/lib/node/index.cjs +106 -66
- package/dist/lib/node/index.cjs.map +4 -4
- 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-FOZD2WLT.mjs +263 -0
- package/dist/lib/node-esm/SheetContainer-FOZD2WLT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2HAM45RC.mjs +88 -0
- package/dist/lib/node-esm/chunk-2HAM45RC.mjs.map +7 -0
- package/dist/lib/{browser/chunk-D5AGLXJP.mjs → node-esm/chunk-5WPZCXNS.mjs} +411 -678
- package/dist/lib/node-esm/chunk-5WPZCXNS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IU2L277A.mjs +17 -0
- package/dist/lib/node-esm/chunk-IU2L277A.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QEUCIHIN.mjs +2706 -0
- package/dist/lib/node-esm/chunk-QEUCIHIN.mjs.map +7 -0
- package/dist/lib/node-esm/graph-SMPUMOV2.mjs +34 -0
- package/dist/lib/node-esm/graph-SMPUMOV2.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +285 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/meta.mjs +10 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +21 -0
- package/dist/lib/node-esm/types.mjs.map +7 -0
- 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 +16 -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/decorations.d.ts +24 -0
- package/dist/types/src/components/Sheet/decorations.d.ts.map +1 -0
- 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 +8 -7
- package/dist/types/src/components/Sheet/sheet-context.d.ts.map +1 -1
- package/dist/types/src/components/Sheet/threads.d.ts +2 -0
- package/dist/types/src/components/Sheet/threads.d.ts.map +1 -0
- package/dist/types/src/components/SheetContainer.d.ts +2 -3
- package/dist/types/src/components/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +19 -3
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +18 -13
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- 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/defs/util.d.ts +43 -0
- package/dist/types/src/defs/util.d.ts.map +1 -0
- package/dist/types/src/extensions/compute.d.ts +6 -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/graph/compute-graph-registry.d.ts +34 -0
- package/dist/types/src/graph/compute-graph-registry.d.ts.map +1 -0
- package/dist/types/src/graph/compute-graph.d.ts +64 -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-graph.test.d.ts +2 -0
- package/dist/types/src/graph/compute-graph.test.d.ts.map +1 -0
- package/dist/types/src/graph/compute-node.d.ts +26 -0
- package/dist/types/src/graph/compute-node.d.ts.map +1 -0
- package/dist/types/src/{components/ComputeGraph → graph/functions}/async-function.d.ts +14 -5
- package/dist/types/src/graph/functions/async-function.d.ts.map +1 -0
- package/dist/types/src/graph/functions/edge-function.d.ts +21 -0
- package/dist/types/src/graph/functions/edge-function.d.ts.map +1 -0
- package/dist/types/src/{model/functions.d.ts → graph/functions/function-defs.d.ts} +1 -1
- package/dist/types/src/graph/functions/function-defs.d.ts.map +1 -0
- package/dist/types/src/graph/functions/index.d.ts +4 -0
- package/dist/types/src/graph/functions/index.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 +5 -0
- package/dist/types/src/graph/index.d.ts.map +1 -0
- package/dist/types/src/graph/testing/index.d.ts +3 -0
- package/dist/types/src/graph/testing/index.d.ts.map +1 -0
- package/dist/types/src/graph/testing/test-builder.d.ts +15 -0
- package/dist/types/src/graph/testing/test-builder.d.ts.map +1 -0
- package/dist/types/src/graph/testing/test-plugin.d.ts +36 -0
- package/dist/types/src/graph/testing/test-plugin.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 -3
- package/dist/types/src/model/index.d.ts.map +1 -1
- package/dist/types/src/model/{model.d.ts → sheet-model.d.ts} +10 -65
- package/dist/types/src/model/sheet-model.d.ts.map +1 -0
- package/dist/types/src/model/sheet-model.test.d.ts +2 -0
- package/dist/types/src/model/sheet-model.test.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 +8 -0
- package/dist/types/src/testing/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +17 -12
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +86 -5
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/vendor/hyperformula.mjs +37145 -0
- package/package.json +55 -47
- package/src/SheetPlugin.tsx +50 -73
- package/src/components/CellEditor/CellEditor.stories.tsx +6 -6
- package/src/components/CellEditor/CellEditor.tsx +59 -9
- package/src/components/CellEditor/extension.test.ts +4 -6
- package/src/components/CellEditor/extension.ts +5 -6
- 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 +171 -0
- package/src/components/GridSheet/util.ts +148 -0
- package/src/components/Sheet/Sheet.stories.tsx +52 -88
- package/src/components/Sheet/Sheet.tsx +87 -32
- package/src/components/Sheet/decorations.ts +62 -0
- package/src/components/Sheet/grid.ts +3 -3
- package/src/components/Sheet/nav.ts +19 -19
- package/src/components/Sheet/sheet-context.tsx +18 -80
- package/src/components/Sheet/threads.tsx +205 -0
- package/src/components/SheetContainer.tsx +68 -16
- package/src/components/Toolbar/Toolbar.tsx +53 -12
- package/src/components/index.ts +1 -0
- package/src/defs/index.ts +6 -0
- package/src/{model → defs}/types.test.ts +8 -9
- package/src/{model → defs}/types.ts +24 -14
- package/src/defs/util.ts +151 -0
- package/src/extensions/compute.stories.tsx +151 -0
- package/src/extensions/compute.ts +147 -0
- package/src/extensions/index.ts +5 -0
- package/src/graph/compute-graph-registry.ts +90 -0
- package/src/graph/compute-graph.stories.tsx +93 -0
- package/src/graph/compute-graph.test.ts +87 -0
- package/src/graph/compute-graph.ts +242 -0
- package/src/graph/compute-node.ts +63 -0
- package/src/{components/ComputeGraph → graph/functions}/async-function.ts +25 -15
- package/src/{components/ComputeGraph → graph/functions}/edge-function.ts +16 -14
- package/src/graph/functions/index.ts +7 -0
- package/src/graph/hyperformula.test.ts +14 -0
- package/src/graph/index.ts +8 -0
- package/src/graph/testing/index.ts +6 -0
- package/src/graph/testing/test-builder.ts +54 -0
- package/src/{components/ComputeGraph/custom.ts → graph/testing/test-plugin.ts} +44 -14
- 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 +28 -0
- package/src/hooks/useFormattingModel.ts +11 -0
- package/src/hooks/useSheetModel.ts +40 -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 -3
- package/src/model/sheet-model.test.ts +57 -0
- package/src/model/sheet-model.ts +416 -0
- package/src/sanity.test.ts +40 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/testing.tsx +68 -0
- package/src/translations.ts +6 -1
- package/src/types.ts +35 -10
- package/dist/lib/browser/SheetContainer-U4H5D34A.mjs.map +0 -7
- package/dist/lib/browser/chunk-APHOLYUB.mjs +0 -175
- package/dist/lib/browser/chunk-APHOLYUB.mjs.map +0 -7
- package/dist/lib/browser/chunk-D5AGLXJP.mjs.map +0 -7
- package/dist/lib/browser/chunk-FUAGSXA4.mjs.map +0 -7
- package/dist/lib/browser/chunk-JRL5LGCE.mjs.map +0 -7
- package/dist/lib/browser/chunk-NU4PBN33.mjs +0 -8
- package/dist/lib/browser/chunk-NU4PBN33.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-AXQV3ZT5.cjs.map +0 -7
- package/dist/lib/node/chunk-5KKJ4NPP.cjs.map +0 -7
- package/dist/lib/node/chunk-BJ6ZD7MN.cjs.map +0 -7
- package/dist/lib/node/chunk-CN3RPESU.cjs +0 -202
- package/dist/lib/node/chunk-CN3RPESU.cjs.map +0 -7
- package/dist/lib/node/chunk-DSYKOI4E.cjs.map +0 -7
- package/dist/lib/node/chunk-PYXHNAAK.cjs +0 -40
- package/dist/lib/node/chunk-PYXHNAAK.cjs.map +0 -7
- package/dist/lib/node/testing.cjs +0 -111
- package/dist/lib/node/testing.cjs.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 +0 -21
- package/dist/types/src/components/ComputeGraph/custom.d.ts.map +0 -1
- package/dist/types/src/components/ComputeGraph/edge-function.d.ts +0 -20
- 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 +0 -15
- 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 -50
- package/src/components/ComputeGraph/graph.ts +0 -62
- package/src/model/model.browser.test.ts +0 -100
- package/src/model/model.ts +0 -550
- package/src/model/util.ts +0 -36
- package/src/testing.ts +0 -50
- /package/dist/types/src/{model → defs}/types.test.d.ts +0 -0
- /package/src/{model/functions.ts → graph/functions/function-defs.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComputeGraphContextProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComputeGraph/ComputeGraphContextProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAiB,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,oDAAgE,CAAC;AAEjG,eAAO,MAAM,2BAA2B,2BAA4B,iBAAiB,CAAC,uBAAuB,CAAC,sBAE7G,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComputeGraph/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ComputeGraph/index.ts"],"names":[],"mappings":"AAIA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ComputeGraph } from '../../graph';
|
|
3
|
+
import { type UseSheetModelOptions } from '../../hooks';
|
|
4
|
+
import { type SheetType } from '../../types';
|
|
5
|
+
export type GridSheetProps = {
|
|
6
|
+
graph?: ComputeGraph;
|
|
7
|
+
sheet?: SheetType;
|
|
8
|
+
} & UseSheetModelOptions;
|
|
9
|
+
export declare const GridSheet: ({ graph, sheet, ...options }: GridSheetProps) => React.JSX.Element | null;
|
|
10
|
+
//# sourceMappingURL=GridSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/GridSheet/GridSheet.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAY5D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAqC,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE3F,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAyI7C,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,CAAC,EAAE,YAAY,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,CAAC;AAEhG,eAAO,MAAM,SAAS,iCAAkC,cAAc,6BAYrE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ graph, sheet, ...options }: import("./GridSheet").GridSheetProps) => React.JSX.Element | null;
|
|
5
|
+
decorators: import("@storybook/react").Decorator[];
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Basic: () => React.JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=GridSheet.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridSheet.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/GridSheet/GridSheet.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAW1B,wBASE;AAEF,eAAO,MAAM,KAAK,gCASjB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type MutableRefObject } from 'react';
|
|
2
|
+
import { type GridEditing, type GridContentProps, type DxGridElement } from '@dxos/react-ui-grid';
|
|
3
|
+
import { type CellAddress } from '../../defs';
|
|
4
|
+
import { type SheetModel, type FormattingModel } from '../../model';
|
|
5
|
+
export declare const dxGridCellIndexToSheetCellAddress: (gridEditing: GridEditing) => CellAddress | null;
|
|
6
|
+
export declare const rowLabelCell: (row: number) => {
|
|
7
|
+
value: string;
|
|
8
|
+
className: string;
|
|
9
|
+
resizeHandle: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const colLabelCell: (col: number) => {
|
|
12
|
+
value: string;
|
|
13
|
+
resizeHandle: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const useSheetModelDxGridProps: (dxGridRef: MutableRefObject<DxGridElement | null>, model: SheetModel, formatting: FormattingModel) => Pick<GridContentProps, "columns" | "rows">;
|
|
16
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/components/GridSheet/util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAwC,MAAM,OAAO,CAAC;AAGpF,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAOnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpE,eAAO,MAAM,iCAAiC,gBAAiB,WAAW,KAAG,WAAW,GAAG,IAS1F,CAAC;AA6CF,eAAO,MAAM,YAAY,QAAS,MAAM;;;;CAItC,CAAC;AAEH,eAAO,MAAM,YAAY,QAAS,MAAM;;;CAA2D,CAAC;AA0BpG,eAAO,MAAM,wBAAwB,cACxB,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC,SAC1C,UAAU,cACL,eAAe,KAC1B,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,MAAM,CAkC3C,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { type ThemedClassName } from '@dxos/react-ui';
|
|
|
3
3
|
import { type GridLayoutProps, type SizeMap } from './grid';
|
|
4
4
|
import { type GridSize } from './nav';
|
|
5
5
|
import { type SheetContextProps } from './sheet-context';
|
|
6
|
-
import { type CellIndex, type CellAddress } from '../../
|
|
6
|
+
import { type CellIndex, type CellAddress } from '../../defs';
|
|
7
7
|
type SheetRootProps = SheetContextProps;
|
|
8
8
|
type SheetMainProps = ThemedClassName<Partial<GridSize>>;
|
|
9
9
|
type ResizeProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,EAGlB,KAAK,iBAAiB,EAOvB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,OAAO,EAYb,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,KAAK,QAAQ,EAA6C,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,KAAK,iBAAiB,EAAyC,MAAM,iBAAiB,CAAC;AAGhG,OAAO,EACL,KAAK,SAAS,EACd,KAAK,WAAW,EAOjB,MAAM,YAAY,CAAC;AAuDpB,KAAK,cAAc,GAAG,iBAAiB,CAAC;AAUxC,KAAK,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AA+NzD,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAgBF,KAAK,cAAc,GAAG;IAAE,IAAI,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG,kBAAkB,GAAG,WAAW,GAAG,SAAS,CAAC;AAkK3F,KAAK,iBAAiB,GAAG;IAAE,OAAO,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG,kBAAkB,GAAG,WAAW,GAAG,SAAS,CAAC;AAmKjG,KAAK,cAAc,GAAG,eAAe,GAAG;IACtC,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AA8SF,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3D,CAAC;AAkLF,eAAO,MAAM,KAAK;mCAhjCyB,iBAAiB,CAAC,iBAAiB,CAAC;;;;;cAmQjD,SAAS,EAAE;;;iBAkKL,SAAS,EAAE;;;cAoKvC,QAAQ;;kDAuT0C,cAAc;;;CAyLvE,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -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;;;;;;;;;;;;;;;+EA2Os3H,CAAC;;;;;;;;;;;+EAAD,CAAC;;;;;;;;;;;;;AArJ75H,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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Decoration = {
|
|
2
|
+
type: string;
|
|
3
|
+
/**
|
|
4
|
+
* A wrapping render function to encapsulate cell content. This function is applied between
|
|
5
|
+
* the cell's border and its padding/layout/content, allowing for custom rendering or
|
|
6
|
+
* additional elements to be inserted around the cell's main content.
|
|
7
|
+
*/
|
|
8
|
+
decorate?: (props: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}) => React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* An array of CSS class names to be applied to the content of the SheetCell.
|
|
13
|
+
* These classes can be used to style the cell's content independently of its structure.
|
|
14
|
+
*/
|
|
15
|
+
classNames?: string[];
|
|
16
|
+
cellIndex: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const createDecorations: () => {
|
|
19
|
+
readonly addDecoration: (cellIndex: string, decorator: Decoration) => void;
|
|
20
|
+
readonly removeDecoration: (cellIndex: string, type?: string) => void;
|
|
21
|
+
readonly getDecorationsForCell: (cellIndex: string) => Decoration[] | undefined;
|
|
22
|
+
readonly getAllDecorations: () => Decoration[];
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=decorations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorations.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/decorations.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,iBAAiB;wCAMM,MAAM,aAAa,UAAU;2CAI1B,MAAM,SAAS,MAAM;gDAShB,MAAM,KAAG,UAAU,EAAE,GAAG,SAAS;sCAI7C,UAAU,EAAE;CAgB3C,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,EAAE,KAAK,UAAU,EAAuB,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAA8C,MAAM,
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/grid.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAA8C,MAAM,YAAY,CAAC;AAK1G,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;AAE/E,eAAO,MAAM,SAAS,+BAA+B,CAAC;AACtD,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,QAAQ,MAAM,CAAC;AAE5B,eAAO,MAAM,SAAS,KAAa,CAAC;AACpC,eAAO,MAAM,SAAS,MAAM,CAAC;AAE7B,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,aAAa,KAAY,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,aAAa,SAAS,CAAC;AAEpC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,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,9 +1,9 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { type
|
|
2
|
+
import { createDecorations } from './decorations';
|
|
3
|
+
import { type CellAddress, type CellRange } from '../../defs';
|
|
4
|
+
import { type ComputeGraph } from '../../graph';
|
|
5
|
+
import { type FormattingModel, type SheetModel } from '../../model';
|
|
5
6
|
import { type SheetType } from '../../types';
|
|
6
|
-
import { type FunctionContextOptions } from '../ComputeGraph';
|
|
7
7
|
export type SheetContextType = {
|
|
8
8
|
model: SheetModel;
|
|
9
9
|
formatting: FormattingModel;
|
|
@@ -14,12 +14,13 @@ export type SheetContextType = {
|
|
|
14
14
|
editing: boolean;
|
|
15
15
|
setEditing: (editing: boolean) => void;
|
|
16
16
|
onInfo?: () => void;
|
|
17
|
+
decorations: ReturnType<typeof createDecorations>;
|
|
17
18
|
};
|
|
18
19
|
export declare const useSheetContext: () => SheetContextType;
|
|
19
20
|
export type SheetContextProps = {
|
|
21
|
+
graph: ComputeGraph;
|
|
20
22
|
sheet: SheetType;
|
|
21
|
-
space: Space;
|
|
22
23
|
readonly?: boolean;
|
|
23
|
-
} & Pick<SheetContextType, 'onInfo'
|
|
24
|
-
export declare const SheetContextProvider: ({ children,
|
|
24
|
+
} & Pick<SheetContextType, 'onInfo'>;
|
|
25
|
+
export declare const SheetContextProvider: ({ children, graph, sheet, readonly, onInfo, }: PropsWithChildren<SheetContextProps>) => React.JSX.Element | null;
|
|
25
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,CAAC;AAIpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,eAAe,CAAC;IAI5B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IAGjD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAIvC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAGpB,WAAW,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;CACnD,CAAC;AAIF,eAAO,MAAM,eAAe,QAAO,gBAIlC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AAErC,eAAO,MAAM,oBAAoB,kDAM9B,iBAAiB,CAAC,iBAAiB,CAAC,6BA6BtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/threads.tsx"],"names":[],"mappings":"AAwMA,eAAO,MAAM,UAAU,YAItB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type LayoutCoordinate } from '@dxos/app-framework';
|
|
3
2
|
import { type SheetRootProps } from './Sheet';
|
|
4
|
-
declare const
|
|
3
|
+
export declare const sectionToolbarLayout = "bs-[--rail-action] bg-[--sticky-bg] sticky block-start-0 __-block-start-px transition-opacity";
|
|
4
|
+
declare const SheetContainer: ({ graph, sheet, role }: SheetRootProps & {
|
|
5
5
|
role?: string;
|
|
6
|
-
coordinate?: LayoutCoordinate;
|
|
7
6
|
}) => React.JSX.Element;
|
|
8
7
|
export default SheetContainer;
|
|
9
8
|
//# sourceMappingURL=SheetContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/SheetContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
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;AAIrD,eAAO,MAAM,oBAAoB,kGACgE,CAAC;AAElG,QAAA,MAAM,cAAc,2BAA4B,cAAc,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,sBAiEjF,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
-
export type ToolbarActionType = 'clear' | 'highlight' | 'left' | 'center' | 'right' | 'date' | 'currency';
|
|
4
3
|
export type ToolbarAction = {
|
|
5
|
-
type:
|
|
4
|
+
type: 'clear';
|
|
5
|
+
} | {
|
|
6
|
+
type: 'highlight';
|
|
7
|
+
} | {
|
|
8
|
+
type: 'left';
|
|
9
|
+
} | {
|
|
10
|
+
type: 'center';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'right';
|
|
13
|
+
} | {
|
|
14
|
+
type: 'date';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'currency';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'comment';
|
|
19
|
+
anchor: string;
|
|
20
|
+
cellContent?: string;
|
|
6
21
|
};
|
|
7
|
-
export type
|
|
22
|
+
export type ToolbarActionType = ToolbarAction['type'];
|
|
23
|
+
export type ToolbarActionHandler = (action: ToolbarAction) => void;
|
|
8
24
|
export type ToolbarProps = ThemedClassName<PropsWithChildren<{
|
|
9
25
|
onAction?: ToolbarActionHandler;
|
|
10
26
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,gBAAgB,CAAC;AAaxB,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,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,22 +10,27 @@ 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
|
-
translations: {
|
|
16
|
-
'en-US': {
|
|
17
|
-
"dxos.org/plugin/sheet": {
|
|
18
|
-
'plugin name':
|
|
19
|
-
'sheet title placeholder':
|
|
20
|
-
'create sheet label':
|
|
21
|
-
'create sheet section label':
|
|
22
|
-
'cell placeholder':
|
|
23
|
-
'toolbar left label':
|
|
24
|
-
'toolbar left center':
|
|
25
|
-
'toolbar left right':
|
|
15
|
+
translations: readonly [{
|
|
16
|
+
readonly 'en-US': {
|
|
17
|
+
readonly "dxos.org/plugin/sheet": {
|
|
18
|
+
readonly 'plugin name': "Sheets";
|
|
19
|
+
readonly 'sheet title placeholder': "New sheet";
|
|
20
|
+
readonly 'create sheet label': "Create sheet";
|
|
21
|
+
readonly 'create sheet section label': "Create sheet";
|
|
22
|
+
readonly 'cell placeholder': "Cell value...";
|
|
23
|
+
readonly 'toolbar left label': "Align left";
|
|
24
|
+
readonly 'toolbar left center': "Align center";
|
|
25
|
+
readonly 'toolbar left right': "Align right";
|
|
26
|
+
readonly 'selection overlaps existing comment label': "Selected cell already has a comment";
|
|
27
|
+
readonly 'comment label': "Add comment";
|
|
28
|
+
readonly 'comment ranges not supported label': "Commenting on ranges is not yet supported";
|
|
29
|
+
readonly 'no cursor label': "Select a cell to comment";
|
|
30
|
+
readonly 'open comment for sheet cell': "View comments for cell";
|
|
26
31
|
};
|
|
27
32
|
};
|
|
28
|
-
}
|
|
33
|
+
}];
|
|
29
34
|
layout: string;
|
|
30
35
|
};
|
|
31
36
|
render: (args: any) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAqBT,GAAG;;AALpB,wBAME;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
|
@@ -1,7 +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<({ graph, sheet, role }: import("./Sheet").SheetRootProps & {
|
|
4
5
|
role?: string;
|
|
5
|
-
coordinate?: import("packages/sdk/app-framework/dist/types/src").LayoutCoordinate;
|
|
6
6
|
}) => React.JSX.Element>;
|
|
7
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;QAC0b,CAAC;wBAD5Y,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;AAGF,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":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type CellAddress, type CellRange } from './types';
|
|
2
|
+
import { type CreateSheetOptions, type SheetSize, SheetType } from '../types';
|
|
3
|
+
export declare class ApiError extends Error {
|
|
4
|
+
}
|
|
5
|
+
export declare class ReadonlyException extends ApiError {
|
|
6
|
+
}
|
|
7
|
+
export declare class RangeException extends ApiError {
|
|
8
|
+
constructor(n: number);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* With a string length of 8, the chance of a collision is 0.02% for a sheet with 10,000 strings.
|
|
12
|
+
*/
|
|
13
|
+
export declare const createIndex: (length?: number) => string;
|
|
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: ({ name, cells, ...size }?: CreateSheetOptions) => SheetType;
|
|
18
|
+
/**
|
|
19
|
+
* E.g., "A1" => "CA2@CB3".
|
|
20
|
+
*/
|
|
21
|
+
export declare const addressToIndex: (sheet: SheetType, cell: CellAddress) => string;
|
|
22
|
+
/**
|
|
23
|
+
* E.g., "CA2@CB3" => "A1".
|
|
24
|
+
*/
|
|
25
|
+
export declare const addressFromIndex: (sheet: SheetType, idx: string) => CellAddress;
|
|
26
|
+
/**
|
|
27
|
+
* E.g., "A1:B2" => "CA2@CB3:CC4@CD5".
|
|
28
|
+
*/
|
|
29
|
+
export declare const rangeToIndex: (sheet: SheetType, range: CellRange) => string;
|
|
30
|
+
/**
|
|
31
|
+
* E.g., "CA2@CB3:CC4@CD5" => "A1:B2".
|
|
32
|
+
*/
|
|
33
|
+
export declare const rangeFromIndex: (sheet: SheetType, idx: string) => CellRange;
|
|
34
|
+
/**
|
|
35
|
+
* Find closest cell to cursor.
|
|
36
|
+
*/
|
|
37
|
+
export declare const closest: (cursor: CellAddress, cells: CellAddress[]) => CellAddress | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Compares the positions of two cell indexes in a sheet.
|
|
40
|
+
* Sorts primarily by row, then by column if rows are equal.
|
|
41
|
+
*/
|
|
42
|
+
export declare const compareIndexPositions: (sheet: SheetType, indexA: string, indexB: string) => number;
|
|
43
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/defs/util.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EAKf,MAAM,SAAS,CAAC;AACjB,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,8BAA8B,kBAAkB,KAAQ,SAqB/E,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,6 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
import { type ComputeGraph } from '../graph';
|
|
3
|
+
export declare const computeGraphFacet: import("@codemirror/state").Facet<ComputeGraph, ComputeGraph>;
|
|
4
|
+
export type ComputeOptions = {};
|
|
5
|
+
export declare const compute: (options?: ComputeOptions) => Extension;
|
|
6
|
+
//# 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;AAQ3B,OAAO,EAAE,KAAK,YAAY,EAAqC,MAAM,UAAU,CAAC;AAQhF,eAAO,MAAM,iBAAiB,+DAAmC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC;AAEhC,eAAO,MAAM,OAAO,aAAa,cAAc,KAAQ,SAgGtD,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,KAA6B,MAAM,OAAO,CAAC;AAyBlD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;;;;;;AAkEF,wBASE;AAGF,eAAO,MAAM,OAAO;uBArEM,WAAW;;;;CA2FpC,CAAC;AAEF,eAAO,MAAM,KAAK;oBA7CI,WAAW;;;;CA6DhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { FunctionPluginDefinition } from 'hyperformula';
|
|
2
|
+
import type { ConfigParams } from 'hyperformula/typings/ConfigParams';
|
|
3
|
+
import type { FunctionTranslationsPackage } from 'hyperformula/typings/interpreter';
|
|
4
|
+
import { type SpaceId, type Space } from '@dxos/client/echo';
|
|
5
|
+
import { Resource } from '@dxos/context';
|
|
6
|
+
import { ComputeGraph } from './compute-graph';
|
|
7
|
+
import { type FunctionContextOptions } from './functions';
|
|
8
|
+
export type ComputeGraphPlugin = {
|
|
9
|
+
plugin: FunctionPluginDefinition;
|
|
10
|
+
translations: FunctionTranslationsPackage;
|
|
11
|
+
};
|
|
12
|
+
export type ComputeGraphOptions = {
|
|
13
|
+
plugins?: ComputeGraphPlugin[];
|
|
14
|
+
} & Partial<FunctionContextOptions> & Partial<ConfigParams>;
|
|
15
|
+
export declare const defaultOptions: ComputeGraphOptions;
|
|
16
|
+
export declare const defaultPlugins: ComputeGraphPlugin[];
|
|
17
|
+
/**
|
|
18
|
+
* Manages a collection of ComputeGraph instances for each space.
|
|
19
|
+
*
|
|
20
|
+
* [ComputePlugin] => [ComputeGraphRegistry] => [ComputeGraph(Space)] => [ComputeNode(Object)]
|
|
21
|
+
*
|
|
22
|
+
* NOTE: The ComputeGraphRegistry manages the hierarchy of resources via its root Context.
|
|
23
|
+
* NOTE: The package.json file defines the packaged #hyperformula module.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ComputeGraphRegistry extends Resource {
|
|
26
|
+
private readonly _graphs;
|
|
27
|
+
private readonly _options;
|
|
28
|
+
constructor(options?: ComputeGraphOptions);
|
|
29
|
+
getGraph(spaceId: SpaceId): ComputeGraph | undefined;
|
|
30
|
+
getOrCreateGraph(space: Space): ComputeGraph;
|
|
31
|
+
createGraph(space: Space): ComputeGraph;
|
|
32
|
+
protected _close(): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=compute-graph-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute-graph-registry.d.ts","sourceRoot":"","sources":["../../../../src/graph/compute-graph-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAGpF,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAsD,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE9G,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,wBAAwB,CAAC;IACjC,YAAY,EAAE,2BAA2B,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAChC,GAAG,OAAO,CAAC,sBAAsB,CAAC,GACjC,OAAO,CAAC,YAAY,CAAC,CAAC;AAExB,eAAO,MAAM,cAAc,EAAE,mBAE5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAAkB,EAK9C,CAAC;AAEF;;;;;;;GAOG;AAEH,qBAAa,oBAAqB,SAAQ,QAAQ;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAE5D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;gBAEnC,OAAO,GAAE,mBAAiD;IAQtE,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS;IAIpD,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY;IAU5C,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY;cAQd,MAAM;CAMhC"}
|