@dxos/plugin-sheet 0.6.12-staging.e11e696 → 0.6.13-main.548ca8d
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-NDNIS44E.mjs +265 -0
- package/dist/lib/browser/SheetContainer-NDNIS44E.mjs.map +7 -0
- package/dist/lib/browser/chunk-AQSGDA4X.mjs +1614 -0
- package/dist/lib/browser/chunk-AQSGDA4X.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QILRZNE5.mjs → chunk-D3QTX46O.mjs} +4 -5
- package/dist/lib/browser/chunk-D3QTX46O.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WZMOZKQZ.mjs → chunk-GKI67SEF.mjs} +19 -25
- package/dist/lib/browser/chunk-GKI67SEF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +14 -19
- 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 -8
- package/dist/lib/node/SheetContainer-YSQGJD7K.cjs +276 -0
- package/dist/lib/node/SheetContainer-YSQGJD7K.cjs.map +7 -0
- package/dist/lib/node/chunk-6F43RV45.cjs +1610 -0
- package/dist/lib/node/chunk-6F43RV45.cjs.map +7 -0
- package/dist/lib/node/{chunk-AOP42UAA.cjs → chunk-ER3PM7GD.cjs} +25 -33
- package/dist/lib/node/chunk-ER3PM7GD.cjs.map +7 -0
- package/dist/lib/node/{chunk-BNARJ5GM.cjs → chunk-QIFIGEKV.cjs} +6 -7
- package/dist/lib/node/chunk-QIFIGEKV.cjs.map +7 -0
- package/dist/lib/node/index.cjs +36 -40
- 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 +8 -12
- package/dist/lib/node/types.cjs.map +2 -2
- package/dist/lib/node-esm/SheetContainer-M7WRMZDU.mjs +266 -0
- package/dist/lib/node-esm/SheetContainer-M7WRMZDU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ELTFPX5B.mjs +1615 -0
- package/dist/lib/node-esm/chunk-ELTFPX5B.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IU2L277A.mjs → chunk-VCYJWE3O.mjs} +4 -5
- package/dist/lib/node-esm/chunk-VCYJWE3O.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-RR2AO4SM.mjs → chunk-ZVLLQ2PJ.mjs} +19 -25
- package/dist/lib/node-esm/chunk-ZVLLQ2PJ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +14 -19
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/meta.mjs +1 -1
- package/dist/lib/node-esm/types.mjs +4 -8
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +3 -0
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +1 -0
- package/dist/types/src/components/FunctionEditor/index.d.ts +2 -0
- package/dist/types/src/components/FunctionEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/GridSheet.d.ts +1 -8
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/{CellEditor/CellEditor.stories.d.ts → GridSheet/SheetCellEditor.stories.d.ts} +2 -2
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/index.d.ts +2 -0
- package/dist/types/src/components/GridSheet/index.d.ts.map +1 -0
- package/dist/types/src/components/GridSheet/util.d.ts +11 -2
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +6 -0
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -0
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +11 -0
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/SheetContainer/index.d.ts +3 -0
- package/dist/types/src/components/SheetContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +27 -0
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -0
- package/dist/types/src/components/SheetContext/index.d.ts +2 -0
- package/dist/types/src/components/SheetContext/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +31 -17
- 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 +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/extension.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/extension.test.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/index.d.ts +2 -0
- package/dist/types/src/extensions/editor/index.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +1 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/threads.d.ts +8 -0
- package/dist/types/src/hooks/threads.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +3 -6
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/{components/Sheet → model}/decorations.d.ts +1 -0
- package/dist/types/src/model/decorations.d.ts.map +1 -0
- package/dist/types/src/model/formatting-model.d.ts +3 -0
- package/dist/types/src/model/formatting-model.d.ts.map +1 -1
- package/dist/types/src/model/index.d.ts +1 -0
- package/dist/types/src/model/index.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +3 -2
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +13 -28
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +36 -39
- package/src/SheetPlugin.tsx +3 -2
- package/src/components/FunctionEditor/FunctionEditor.tsx +45 -0
- package/src/components/FunctionEditor/index.ts +5 -0
- package/src/components/GridSheet/GridSheet.stories.tsx +7 -2
- package/src/components/GridSheet/GridSheet.tsx +77 -69
- package/src/components/{CellEditor/CellEditor.stories.tsx → GridSheet/SheetCellEditor.stories.tsx} +2 -2
- package/src/components/{Sheet → GridSheet}/index.ts +1 -1
- package/src/components/GridSheet/util.ts +63 -27
- package/src/components/SheetContainer/SheetContainer.stories.tsx +40 -0
- package/src/components/SheetContainer/SheetContainer.tsx +52 -0
- package/src/components/SheetContainer/index.ts +7 -0
- package/src/components/{Sheet/sheet-context.tsx → SheetContext/SheetContext.tsx} +47 -27
- package/src/components/SheetContext/index.ts +5 -0
- package/src/components/Toolbar/Toolbar.tsx +127 -86
- package/src/components/index.ts +2 -1
- package/src/defs/util.ts +1 -1
- package/src/extensions/compute.stories.tsx +4 -4
- package/src/{components/CellEditor → extensions/editor}/index.ts +0 -1
- package/src/extensions/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/{components/Sheet/threads.tsx → hooks/threads.ts} +26 -84
- package/src/{meta.tsx → meta.ts} +3 -3
- package/src/{components/Sheet → model}/decorations.ts +2 -0
- package/src/model/formatting-model.ts +12 -9
- package/src/model/index.ts +1 -0
- package/src/model/sheet-model.test.ts +1 -3
- package/src/model/sheet-model.ts +13 -11
- package/src/types.ts +9 -35
- package/dist/lib/browser/SheetContainer-LG77O4RM.mjs +0 -262
- package/dist/lib/browser/SheetContainer-LG77O4RM.mjs.map +0 -7
- package/dist/lib/browser/chunk-CHQAW4F4.mjs +0 -2705
- package/dist/lib/browser/chunk-CHQAW4F4.mjs.map +0 -7
- package/dist/lib/browser/chunk-QILRZNE5.mjs.map +0 -7
- package/dist/lib/browser/chunk-WZMOZKQZ.mjs.map +0 -7
- package/dist/lib/node/SheetContainer-OZ7DHH4L.cjs +0 -280
- package/dist/lib/node/SheetContainer-OZ7DHH4L.cjs.map +0 -7
- package/dist/lib/node/chunk-5FTFZL5W.cjs +0 -2690
- package/dist/lib/node/chunk-5FTFZL5W.cjs.map +0 -7
- package/dist/lib/node/chunk-AOP42UAA.cjs.map +0 -7
- package/dist/lib/node/chunk-BNARJ5GM.cjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-4XS2G25Z.mjs +0 -263
- package/dist/lib/node-esm/SheetContainer-4XS2G25Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IU2L277A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KK3XL37M.mjs +0 -2706
- package/dist/lib/node-esm/chunk-KK3XL37M.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RR2AO4SM.mjs.map +0 -7
- package/dist/types/src/components/CellEditor/CellEditor.d.ts +0 -34
- package/dist/types/src/components/CellEditor/CellEditor.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/CellEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/extension.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/extension.test.d.ts.map +0 -1
- package/dist/types/src/components/CellEditor/index.d.ts +0 -3
- package/dist/types/src/components/CellEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/Sheet.d.ts +0 -55
- package/dist/types/src/components/Sheet/Sheet.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/Sheet.stories.d.ts +0 -53
- package/dist/types/src/components/Sheet/Sheet.stories.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/decorations.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/grid.d.ts +0 -52
- package/dist/types/src/components/Sheet/grid.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/index.d.ts +0 -2
- package/dist/types/src/components/Sheet/index.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/nav.d.ts +0 -29
- package/dist/types/src/components/Sheet/nav.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/sheet-context.d.ts +0 -26
- package/dist/types/src/components/Sheet/sheet-context.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/threads.d.ts +0 -2
- package/dist/types/src/components/Sheet/threads.d.ts.map +0 -1
- package/dist/types/src/components/Sheet/util.d.ts +0 -18
- package/dist/types/src/components/Sheet/util.d.ts.map +0 -1
- package/dist/types/src/components/SheetContainer.d.ts +0 -8
- package/dist/types/src/components/SheetContainer.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/common.d.ts +0 -20
- package/dist/types/src/components/Toolbar/common.d.ts.map +0 -1
- package/src/components/CellEditor/CellEditor.tsx +0 -163
- package/src/components/Sheet/Sheet.stories.tsx +0 -251
- package/src/components/Sheet/Sheet.tsx +0 -1215
- package/src/components/Sheet/grid.ts +0 -191
- package/src/components/Sheet/nav.ts +0 -157
- package/src/components/Sheet/util.ts +0 -56
- package/src/components/SheetContainer.tsx +0 -86
- package/src/components/Toolbar/common.tsx +0 -72
- /package/dist/types/src/{components/CellEditor → extensions/editor}/extension.d.ts +0 -0
- /package/dist/types/src/{components/CellEditor → extensions/editor}/extension.test.d.ts +0 -0
- /package/src/{components/CellEditor → extensions/editor}/extension.test.ts +0 -0
- /package/src/{components/CellEditor → extensions/editor}/extension.ts +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { type SizeMap } from './grid';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: {
|
|
7
|
-
Root: ({ children, ...props }: React.PropsWithChildren<import("./sheet-context").SheetContextProps>) => React.JSX.Element;
|
|
8
|
-
Main: React.ForwardRefExoticComponent<Omit<Partial<import("./nav").GridSize>, "className"> & {
|
|
9
|
-
classNames?: import("@dxos/react-ui").ClassNameValue;
|
|
10
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
Rows: React.ForwardRefExoticComponent<{
|
|
12
|
-
rows: import("../../defs").CellIndex[];
|
|
13
|
-
} & {
|
|
14
|
-
selected?: number;
|
|
15
|
-
onSelect?: (selected: number) => void;
|
|
16
|
-
} & {
|
|
17
|
-
sizes?: SizeMap;
|
|
18
|
-
onResize?: (idx: import("../../defs").CellIndex, size: number, save?: boolean) => void;
|
|
19
|
-
} & {
|
|
20
|
-
onMove?: (from: number, to: number) => void;
|
|
21
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
Columns: React.ForwardRefExoticComponent<{
|
|
23
|
-
columns: import("../../defs").CellIndex[];
|
|
24
|
-
} & {
|
|
25
|
-
selected?: number;
|
|
26
|
-
onSelect?: (selected: number) => void;
|
|
27
|
-
} & {
|
|
28
|
-
sizes?: SizeMap;
|
|
29
|
-
onResize?: (idx: import("../../defs").CellIndex, size: number, save?: boolean) => void;
|
|
30
|
-
} & {
|
|
31
|
-
onMove?: (from: number, to: number) => void;
|
|
32
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
Grid: React.ForwardRefExoticComponent<import("./grid").GridLayoutProps & {
|
|
34
|
-
size: import("./nav").GridSize;
|
|
35
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
Cell: ({ id, cell, style, active, onSelect }: import("./Sheet").SheetCellProps) => React.JSX.Element;
|
|
37
|
-
StatusBar: () => React.JSX.Element;
|
|
38
|
-
Debug: () => React.JSX.Element;
|
|
39
|
-
};
|
|
40
|
-
decorators: import("@storybook/react").Decorator[];
|
|
41
|
-
};
|
|
42
|
-
export default _default;
|
|
43
|
-
export declare const Default: () => React.JSX.Element | null;
|
|
44
|
-
export declare const Debug: () => React.JSX.Element | null;
|
|
45
|
-
export declare const Rows: () => React.JSX.Element | null;
|
|
46
|
-
export declare const Columns: () => React.JSX.Element | null;
|
|
47
|
-
export declare const Main: () => React.JSX.Element | null;
|
|
48
|
-
/**
|
|
49
|
-
* Scrolling container with fixed border that overlaps the border of inner elements.
|
|
50
|
-
*/
|
|
51
|
-
export declare const ScrollLayout: () => React.JSX.Element;
|
|
52
|
-
export declare const GridLayout: () => React.JSX.Element;
|
|
53
|
-
//# sourceMappingURL=Sheet.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,52 +0,0 @@
|
|
|
1
|
-
import { type MouseEvent } from 'react';
|
|
2
|
-
import { type CellAddress, type CellIndex } from '../../defs';
|
|
3
|
-
export type SizeMap = Record<string, number>;
|
|
4
|
-
export type RowPosition = {
|
|
5
|
-
row: number;
|
|
6
|
-
} & Pick<DOMRect, 'top' | 'height'>;
|
|
7
|
-
export type ColumnPosition = {
|
|
8
|
-
col: number;
|
|
9
|
-
} & Pick<DOMRect, 'left' | 'width'>;
|
|
10
|
-
export declare const axisWidth = "calc(var(--rail-size)-2px)";
|
|
11
|
-
export declare const axisHeight = 34;
|
|
12
|
-
export declare const minWidth = 40;
|
|
13
|
-
export declare const maxWidth = 800;
|
|
14
|
-
export declare const minHeight = 34;
|
|
15
|
-
export declare const maxHeight = 400;
|
|
16
|
-
export declare const defaultWidth = 200;
|
|
17
|
-
export declare const defaultHeight = 34;
|
|
18
|
-
/**
|
|
19
|
-
* Cell nodes are identified by their A1 notation.
|
|
20
|
-
*/
|
|
21
|
-
export declare const CELL_DATA_KEY = "cell";
|
|
22
|
-
export type GridLayoutProps = {
|
|
23
|
-
rows: CellIndex[];
|
|
24
|
-
columns: CellIndex[];
|
|
25
|
-
rowSizes?: SizeMap;
|
|
26
|
-
columnSizes?: SizeMap;
|
|
27
|
-
};
|
|
28
|
-
export type GridLayout = {
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
rowRange: RowPosition[];
|
|
32
|
-
columnRange: ColumnPosition[];
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Calculates the grid geometry for the current viewport.
|
|
36
|
-
*/
|
|
37
|
-
export declare const useGridLayout: ({ scroller, size, rows, columns, rowSizes, columnSizes, }: GridLayoutProps & {
|
|
38
|
-
scroller: HTMLDivElement | null;
|
|
39
|
-
size: {
|
|
40
|
-
width: number;
|
|
41
|
-
height: number;
|
|
42
|
-
};
|
|
43
|
-
}) => GridLayout;
|
|
44
|
-
/**
|
|
45
|
-
* Find child node at mouse pointer.
|
|
46
|
-
*/
|
|
47
|
-
export declare const getCellAtPointer: (event: MouseEvent) => CellAddress | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Get element.
|
|
50
|
-
*/
|
|
51
|
-
export declare const getCellElement: (root: HTMLElement, cell: CellAddress) => HTMLElement | null;
|
|
52
|
-
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type KeyboardEvent, type MouseEventHandler } from 'react';
|
|
2
|
-
import { type CellAddress, type CellRange } from '../../defs';
|
|
3
|
-
export type GridSize = {
|
|
4
|
-
numRows: number;
|
|
5
|
-
numCols: number;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Calculate next range based on arrow keys.
|
|
9
|
-
*/
|
|
10
|
-
export declare const handleNav: (ev: KeyboardEvent<HTMLInputElement>, cursor: CellAddress | undefined, range: CellRange | undefined, size: GridSize) => {
|
|
11
|
-
cursor?: CellAddress;
|
|
12
|
-
range?: CellRange;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Calculate next cell based on arrow keys.
|
|
16
|
-
*/
|
|
17
|
-
export declare const handleArrowNav: (ev: Pick<KeyboardEvent<HTMLInputElement>, "key" | "metaKey">, cursor: CellAddress | undefined, { numRows, numCols }: GridSize) => CellAddress | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Hook to manage range drag handlers.
|
|
20
|
-
*/
|
|
21
|
-
export declare const useRangeSelect: (cb: (event: "start" | "move" | "end", range: CellRange | undefined) => void) => {
|
|
22
|
-
range: CellRange | undefined;
|
|
23
|
-
handlers: {
|
|
24
|
-
onMouseDown: MouseEventHandler<HTMLDivElement>;
|
|
25
|
-
onMouseMove: MouseEventHandler<HTMLDivElement>;
|
|
26
|
-
onMouseUp: MouseEventHandler<HTMLDivElement>;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=nav.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,26 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
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';
|
|
6
|
-
import { type SheetType } from '../../types';
|
|
7
|
-
export type SheetContextType = {
|
|
8
|
-
model: SheetModel;
|
|
9
|
-
formatting: FormattingModel;
|
|
10
|
-
cursor?: CellAddress;
|
|
11
|
-
setCursor: (cell: CellAddress | undefined) => void;
|
|
12
|
-
range?: CellRange;
|
|
13
|
-
setRange: (range: CellRange | undefined) => void;
|
|
14
|
-
editing: boolean;
|
|
15
|
-
setEditing: (editing: boolean) => void;
|
|
16
|
-
onInfo?: () => void;
|
|
17
|
-
decorations: ReturnType<typeof createDecorations>;
|
|
18
|
-
};
|
|
19
|
-
export declare const useSheetContext: () => SheetContextType;
|
|
20
|
-
export type SheetContextProps = {
|
|
21
|
-
graph: ComputeGraph;
|
|
22
|
-
sheet: SheetType;
|
|
23
|
-
readonly?: boolean;
|
|
24
|
-
} & Pick<SheetContextType, 'onInfo'>;
|
|
25
|
-
export declare const SheetContextProvider: ({ children, graph, sheet, readonly, onInfo, }: PropsWithChildren<SheetContextProps>) => React.JSX.Element | null;
|
|
26
|
-
//# sourceMappingURL=sheet-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/threads.tsx"],"names":[],"mappings":"AAwMA,eAAO,MAAM,UAAU,YAItB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the relative client rect of an element within a parent container.
|
|
3
|
-
* NOTE: This is stable even when the parent is scrolling.
|
|
4
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect
|
|
5
|
-
* @param root Parent container (e.g., scrollable container).
|
|
6
|
-
* @param element
|
|
7
|
-
*/
|
|
8
|
-
export declare const getRelativeClientRect: (root: HTMLElement, element: HTMLElement) => DOMRect;
|
|
9
|
-
/**
|
|
10
|
-
* Union of two rectangles.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getRectUnion: (b1: DOMRect, b2: DOMRect) => Pick<DOMRect, "left" | "top" | "width" | "height">;
|
|
13
|
-
/**
|
|
14
|
-
* Scroll to cell.
|
|
15
|
-
* We need to correct for the DOM `scrollIntoView` function which doesn't show the border.
|
|
16
|
-
*/
|
|
17
|
-
export declare const scrollIntoView: (scrollContainer: HTMLElement, el: HTMLElement) => void;
|
|
18
|
-
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sheet/util.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,SAAU,WAAW,WAAW,WAAW,KAAG,OAS/E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,OAAQ,OAAO,MAAM,OAAO,KAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAOxG,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,oBAAqB,WAAW,MAAM,WAAW,SAiB3E,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type SheetRootProps } from './Sheet';
|
|
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
|
-
role?: string;
|
|
6
|
-
}) => React.JSX.Element;
|
|
7
|
-
export default SheetContainer;
|
|
8
|
-
//# sourceMappingURL=SheetContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,20 +0,0 @@
|
|
|
1
|
-
import { type Icon } from '@phosphor-icons/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { type ToolbarButtonProps as NaturalToolbarButtonProps, type ToolbarToggleGroupItemProps as NaturalToolbarToggleGroupItemProps } from '@dxos/react-ui';
|
|
4
|
-
export declare const iconStyles: string;
|
|
5
|
-
export declare const buttonStyles = "min-bs-0 p-2";
|
|
6
|
-
export declare const tooltipProps: {
|
|
7
|
-
side: "top";
|
|
8
|
-
classNames: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const ToolbarSeparator: () => React.JSX.Element;
|
|
11
|
-
type ToolbarButtonProps = NaturalToolbarButtonProps & {
|
|
12
|
-
Icon: Icon;
|
|
13
|
-
};
|
|
14
|
-
export declare const ToolbarButton: ({ Icon, children, ...props }: ToolbarButtonProps) => React.JSX.Element;
|
|
15
|
-
export type ToolbarToggleButtonProps = NaturalToolbarToggleGroupItemProps & {
|
|
16
|
-
Icon: Icon;
|
|
17
|
-
};
|
|
18
|
-
export declare const ToolbarToggleButton: ({ Icon, children, ...props }: ToolbarToggleButtonProps) => React.JSX.Element;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/common.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAGL,KAAK,kBAAkB,IAAI,yBAAyB,EACpD,KAAK,2BAA2B,IAAI,kCAAkC,EACvE,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,UAAU,QAAa,CAAC;AACrC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,YAAY;;;CAA+C,CAAC;AAEzE,eAAO,MAAM,gBAAgB,yBAAkD,CAAC;AAMhF,KAAK,kBAAkB,GAAG,yBAAyB,GAAG;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAErE,eAAO,MAAM,aAAa,iCAAkC,kBAAkB,sBAiB7E,CAAC;AAMF,MAAM,MAAM,wBAAwB,GAAG,kCAAkC,GAAG;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAE3F,eAAO,MAAM,mBAAmB,iCAAkC,wBAAwB,sBAiBzF,CAAC"}
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Extension } from '@codemirror/state';
|
|
6
|
-
import { EditorView, keymap } from '@codemirror/view';
|
|
7
|
-
import React, { type DOMAttributes, type KeyboardEvent } from 'react';
|
|
8
|
-
|
|
9
|
-
import { useThemeContext } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
11
|
-
type UseTextEditorProps,
|
|
12
|
-
createBasicExtensions,
|
|
13
|
-
createThemeExtensions,
|
|
14
|
-
preventNewline,
|
|
15
|
-
useTextEditor,
|
|
16
|
-
} from '@dxos/react-ui-editor';
|
|
17
|
-
import { type GridEditBox } from '@dxos/react-ui-grid';
|
|
18
|
-
|
|
19
|
-
type EditorKeyEvent = Pick<KeyboardEvent<HTMLInputElement>, 'key'> & { shift?: boolean };
|
|
20
|
-
|
|
21
|
-
export type EditorKeysProps = {
|
|
22
|
-
onClose: (value: string | undefined, event: EditorKeyEvent) => void;
|
|
23
|
-
onNav?: (value: string | undefined, event: EditorKeyEvent) => void;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const editorKeys = ({ onNav, onClose }: EditorKeysProps): Extension => {
|
|
27
|
-
return keymap.of([
|
|
28
|
-
{
|
|
29
|
-
key: 'ArrowUp',
|
|
30
|
-
run: (editor) => {
|
|
31
|
-
const value = editor.state.doc.toString();
|
|
32
|
-
onNav?.(value, { key: 'ArrowUp' });
|
|
33
|
-
return !!onNav;
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
key: 'ArrowDown',
|
|
38
|
-
run: (editor) => {
|
|
39
|
-
const value = editor.state.doc.toString();
|
|
40
|
-
onNav?.(value, { key: 'ArrowDown' });
|
|
41
|
-
return !!onNav;
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
key: 'ArrowLeft',
|
|
46
|
-
run: (editor) => {
|
|
47
|
-
const value = editor.state.doc.toString();
|
|
48
|
-
onNav?.(value, { key: 'ArrowLeft' });
|
|
49
|
-
return !!onNav;
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
key: 'ArrowRight',
|
|
54
|
-
run: (editor) => {
|
|
55
|
-
const value = editor.state.doc.toString();
|
|
56
|
-
onNav?.(value, { key: 'ArrowRight' });
|
|
57
|
-
return !!onNav;
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
key: 'Enter',
|
|
62
|
-
run: (editor) => {
|
|
63
|
-
onClose(editor.state.doc.toString(), { key: 'Enter' });
|
|
64
|
-
return true;
|
|
65
|
-
},
|
|
66
|
-
shift: (editor) => {
|
|
67
|
-
onClose(editor.state.doc.toString(), { key: 'Enter', shift: true });
|
|
68
|
-
return true;
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
key: 'Tab',
|
|
73
|
-
run: (editor) => {
|
|
74
|
-
onClose(editor.state.doc.toString(), { key: 'Tab' });
|
|
75
|
-
return true;
|
|
76
|
-
},
|
|
77
|
-
shift: (editor) => {
|
|
78
|
-
onClose(editor.state.doc.toString(), { key: 'Tab', shift: true });
|
|
79
|
-
return true;
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: 'Escape',
|
|
84
|
-
run: () => {
|
|
85
|
-
onClose(undefined, { key: 'Escape' });
|
|
86
|
-
return true;
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
]);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export type CellEditorProps = {
|
|
93
|
-
value?: string;
|
|
94
|
-
extension?: Extension;
|
|
95
|
-
variant?: keyof typeof editorVariants;
|
|
96
|
-
box?: GridEditBox;
|
|
97
|
-
gridId?: string;
|
|
98
|
-
} & Pick<UseTextEditorProps, 'autoFocus'> &
|
|
99
|
-
Pick<DOMAttributes<HTMLInputElement>, 'onBlur' | 'onKeyDown'>;
|
|
100
|
-
|
|
101
|
-
const editorVariants = {
|
|
102
|
-
// TODO(thure): remove when legacy is no longer used.
|
|
103
|
-
legacy: {
|
|
104
|
-
root: 'flex w-full',
|
|
105
|
-
editor: 'flex w-full [&>.cm-scroller]:scrollbar-none',
|
|
106
|
-
content: '!px-2 !py-1',
|
|
107
|
-
},
|
|
108
|
-
grid: {
|
|
109
|
-
root: 'absolute z-[1]',
|
|
110
|
-
editor: '[&>.cm-scroller]:scrollbar-none tabular-nums',
|
|
111
|
-
content: '!border !border-transparent !p-0.5',
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export const CellEditor = ({
|
|
116
|
-
value,
|
|
117
|
-
extension,
|
|
118
|
-
autoFocus,
|
|
119
|
-
onBlur,
|
|
120
|
-
variant = 'legacy',
|
|
121
|
-
box,
|
|
122
|
-
gridId,
|
|
123
|
-
}: CellEditorProps) => {
|
|
124
|
-
const { themeMode } = useThemeContext();
|
|
125
|
-
const { parentRef } = useTextEditor(() => {
|
|
126
|
-
return {
|
|
127
|
-
autoFocus,
|
|
128
|
-
initialValue: value,
|
|
129
|
-
selection: { anchor: value?.length ?? 0 },
|
|
130
|
-
extensions: [
|
|
131
|
-
extension ?? [],
|
|
132
|
-
preventNewline,
|
|
133
|
-
EditorView.focusChangeEffect.of((_, focusing) => {
|
|
134
|
-
if (!focusing) {
|
|
135
|
-
onBlur?.({ type: 'blur' } as any);
|
|
136
|
-
}
|
|
137
|
-
return null;
|
|
138
|
-
}),
|
|
139
|
-
createBasicExtensions({ lineWrapping: false }),
|
|
140
|
-
createThemeExtensions({
|
|
141
|
-
themeMode,
|
|
142
|
-
slots: {
|
|
143
|
-
editor: {
|
|
144
|
-
className: editorVariants[variant].editor,
|
|
145
|
-
},
|
|
146
|
-
content: {
|
|
147
|
-
className: editorVariants[variant].content,
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
}),
|
|
151
|
-
],
|
|
152
|
-
};
|
|
153
|
-
}, [extension, autoFocus, value, variant, onBlur]);
|
|
154
|
-
|
|
155
|
-
return (
|
|
156
|
-
<div
|
|
157
|
-
ref={parentRef}
|
|
158
|
-
className={editorVariants[variant].root}
|
|
159
|
-
style={box}
|
|
160
|
-
{...(gridId && { 'data-grid': gridId })}
|
|
161
|
-
/>
|
|
162
|
-
);
|
|
163
|
-
};
|