@dxos/plugin-sheet 0.7.0 → 0.7.1-staging.7f6f91c
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-P3NF5KEI.mjs → SheetContainer-YAMIOFC6.mjs} +10 -8
- package/dist/lib/browser/SheetContainer-YAMIOFC6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4LKIURJA.mjs → chunk-QHQFM7LV.mjs} +19 -13
- package/dist/lib/browser/chunk-QHQFM7LV.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/{SheetContainer-MPFKXY26.cjs → SheetContainer-BSDHHYXE.cjs} +22 -20
- package/dist/lib/node/SheetContainer-BSDHHYXE.cjs.map +7 -0
- package/dist/lib/node/{chunk-OO24XJBV.cjs → chunk-J5ZFWMOD.cjs} +24 -18
- package/dist/lib/node/chunk-J5ZFWMOD.cjs.map +7 -0
- package/dist/lib/node/index.cjs +5 -5
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/{SheetContainer-22IOAW3B.mjs → SheetContainer-T47T2NYJ.mjs} +10 -8
- package/dist/lib/node-esm/SheetContainer-T47T2NYJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BW36PM2Y.mjs → chunk-6GSTEN7N.mjs} +19 -13
- package/dist/lib/node-esm/chunk-6GSTEN7N.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +2 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +3 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/package.json +38 -38
- package/src/components/FunctionEditor/FunctionEditor.tsx +1 -2
- package/src/components/GridSheet/GridSheet.stories.tsx +2 -2
- package/src/components/GridSheet/GridSheet.tsx +7 -6
- package/src/components/GridSheet/util.ts +1 -1
- package/src/components/SheetContainer/SheetContainer.stories.tsx +2 -2
- package/src/components/SheetContainer/SheetContainer.tsx +13 -3
- package/src/components/SheetContext/SheetContext.tsx +16 -3
- package/src/components/Toolbar/Toolbar.tsx +1 -1
- package/dist/lib/browser/SheetContainer-P3NF5KEI.mjs.map +0 -7
- package/dist/lib/browser/chunk-4LKIURJA.mjs.map +0 -7
- package/dist/lib/node/SheetContainer-MPFKXY26.cjs.map +0 -7
- package/dist/lib/node/chunk-OO24XJBV.cjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-22IOAW3B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BW36PM2Y.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/GridSheet/GridSheet.tsx"],"names":[],"mappings":"AAIA,OAAO,KASN,MAAM,OAAO,CAAC;AAmDf,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/GridSheet/GridSheet.tsx"],"names":[],"mappings":"AAIA,OAAO,KASN,MAAM,OAAO,CAAC;AAmDf,eAAO,MAAM,SAAS,yBAySrB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Space } from '@dxos/react-client/echo';
|
|
3
3
|
import { type SheetType } from '../../types';
|
|
4
|
-
export declare const SheetContainer: ({ space, sheet, role }: {
|
|
4
|
+
export declare const SheetContainer: ({ space, sheet, role, ignoreAttention, }: {
|
|
5
5
|
space: Space;
|
|
6
6
|
sheet: SheetType;
|
|
7
7
|
role?: string;
|
|
8
|
+
ignoreAttention?: boolean;
|
|
8
9
|
}) => React.JSX.Element | null;
|
|
9
10
|
//# sourceMappingURL=SheetContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/SheetContainer/SheetContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"SheetContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/SheetContainer/SheetContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,eAAO,MAAM,cAAc,6CAKxB;IACD,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,6BAiBA,CAAC"}
|
|
@@ -17,12 +17,14 @@ export type SheetContextValue = {
|
|
|
17
17
|
activeRefs: GridContentProps['activeRefs'];
|
|
18
18
|
setActiveRefs: (activeRefs: GridContentProps['activeRefs']) => void;
|
|
19
19
|
onInfo?: () => void;
|
|
20
|
+
ignoreAttention?: boolean;
|
|
20
21
|
};
|
|
21
22
|
export declare const useSheetContext: () => SheetContextValue;
|
|
22
23
|
export type SheetProviderProps = {
|
|
23
24
|
graph: ComputeGraph;
|
|
24
25
|
sheet: SheetType;
|
|
25
26
|
readonly?: boolean;
|
|
27
|
+
ignoreAttention?: boolean;
|
|
26
28
|
} & Pick<SheetContextValue, 'onInfo'>;
|
|
27
|
-
export declare const SheetProvider: ({ children, graph, sheet, readonly, onInfo }: PropsWithChildren<SheetProviderProps>) => React.JSX.Element | null;
|
|
29
|
+
export declare const SheetProvider: ({ children, graph, sheet, readonly, ignoreAttention, onInfo, }: PropsWithChildren<SheetProviderProps>) => React.JSX.Element | null;
|
|
28
30
|
//# sourceMappingURL=SheetContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/SheetContext/SheetContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAoD,MAAM,OAAO,CAAC;AAIxG,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAGjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,UAAU,CAAC;IAIlB,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;IACjD,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IAGxC,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAA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AAgB,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAIpE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAGpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAIF,eAAO,MAAM,eAAe,QAAO,iBAIlC,CAAC;AA2DF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;AAEtC,eAAO,MAAM,aAAa,mEAOvB,iBAAiB,CAAC,kBAAkB,CAAC,6BAUvC,CAAC"}
|
|
@@ -2,9 +2,10 @@ export * from './ComputeGraph';
|
|
|
2
2
|
export * from './GridSheet';
|
|
3
3
|
export * from './RangeList';
|
|
4
4
|
export * from './SheetContext';
|
|
5
|
-
export declare const SheetContainer: import("react").LazyExoticComponent<({ space, sheet, role }: {
|
|
5
|
+
export declare const SheetContainer: import("react").LazyExoticComponent<({ space, sheet, role, ignoreAttention, }: {
|
|
6
6
|
space: import("packages/sdk/client-protocol/dist/types/src").Space;
|
|
7
7
|
sheet: import("../types").SheetType;
|
|
8
8
|
role?: string;
|
|
9
|
+
ignoreAttention?: boolean;
|
|
9
10
|
}) => import("react").JSX.Element | null>;
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,eAAO,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,eAAO,MAAM,cAAc;;;QAC8R,CAAC;mBAA2B,CAAC;yCADlR,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-sheet",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-staging.7f6f91c",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@dnd-kit/modifiers": "^6.0.0",
|
|
55
55
|
"@dnd-kit/sortable": "^7.0.1",
|
|
56
56
|
"@dnd-kit/utilities": "^3.2.0",
|
|
57
|
-
"@effect/schema": "^0.75.
|
|
57
|
+
"@effect/schema": "^0.75.5",
|
|
58
58
|
"@lezer/common": "^1.2.2",
|
|
59
59
|
"@lezer/highlight": "^1.2.1",
|
|
60
60
|
"@lezer/lezer": "^1.1.2",
|
|
@@ -69,33 +69,33 @@
|
|
|
69
69
|
"re-resizable": "^6.9.17",
|
|
70
70
|
"react-markdown": "^8.0.5",
|
|
71
71
|
"react-resize-detector": "^11.0.1",
|
|
72
|
-
"@dxos/app-framework": "0.7.
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/log": "0.7.
|
|
82
|
-
"@dxos/plugin-attention": "0.7.
|
|
83
|
-
"@dxos/plugin-client": "0.7.
|
|
84
|
-
"@dxos/plugin-markdown": "0.7.
|
|
85
|
-
"@dxos/plugin-
|
|
86
|
-
"@dxos/plugin-
|
|
87
|
-
"@dxos/plugin-
|
|
88
|
-
"@dxos/react-
|
|
89
|
-
"@dxos/plugin-
|
|
90
|
-
"@dxos/react-
|
|
91
|
-
"@dxos/react-ui-
|
|
92
|
-
"@dxos/react-
|
|
93
|
-
"@dxos/react-ui-
|
|
94
|
-
"@dxos/react-ui-
|
|
95
|
-
"@dxos/react-ui-
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/util": "0.7.
|
|
72
|
+
"@dxos/app-framework": "0.7.1-staging.7f6f91c",
|
|
73
|
+
"@dxos/client": "0.7.1-staging.7f6f91c",
|
|
74
|
+
"@dxos/async": "0.7.1-staging.7f6f91c",
|
|
75
|
+
"@dxos/context": "0.7.1-staging.7f6f91c",
|
|
76
|
+
"@dxos/crypto": "0.7.1-staging.7f6f91c",
|
|
77
|
+
"@dxos/debug": "0.7.1-staging.7f6f91c",
|
|
78
|
+
"@dxos/echo-schema": "0.7.1-staging.7f6f91c",
|
|
79
|
+
"@dxos/keys": "0.7.1-staging.7f6f91c",
|
|
80
|
+
"@dxos/invariant": "0.7.1-staging.7f6f91c",
|
|
81
|
+
"@dxos/log": "0.7.1-staging.7f6f91c",
|
|
82
|
+
"@dxos/plugin-attention": "0.7.1-staging.7f6f91c",
|
|
83
|
+
"@dxos/plugin-client": "0.7.1-staging.7f6f91c",
|
|
84
|
+
"@dxos/plugin-markdown": "0.7.1-staging.7f6f91c",
|
|
85
|
+
"@dxos/plugin-script": "0.7.1-staging.7f6f91c",
|
|
86
|
+
"@dxos/plugin-graph": "0.7.1-staging.7f6f91c",
|
|
87
|
+
"@dxos/plugin-stack": "0.7.1-staging.7f6f91c",
|
|
88
|
+
"@dxos/react-hooks": "0.7.1-staging.7f6f91c",
|
|
89
|
+
"@dxos/plugin-space": "0.7.1-staging.7f6f91c",
|
|
90
|
+
"@dxos/react-ui-attention": "0.7.1-staging.7f6f91c",
|
|
91
|
+
"@dxos/react-ui-editor": "0.7.1-staging.7f6f91c",
|
|
92
|
+
"@dxos/react-client": "0.7.1-staging.7f6f91c",
|
|
93
|
+
"@dxos/react-ui-grid": "0.7.1-staging.7f6f91c",
|
|
94
|
+
"@dxos/react-ui-list": "0.7.1-staging.7f6f91c",
|
|
95
|
+
"@dxos/react-ui-form": "0.7.1-staging.7f6f91c",
|
|
96
|
+
"@dxos/react-ui-stack": "0.7.1-staging.7f6f91c",
|
|
97
|
+
"@dxos/schema": "0.7.1-staging.7f6f91c",
|
|
98
|
+
"@dxos/util": "0.7.1-staging.7f6f91c"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@lezer/generator": "^1.7.1",
|
|
@@ -107,19 +107,19 @@
|
|
|
107
107
|
"react": "~18.2.0",
|
|
108
108
|
"react-dom": "~18.2.0",
|
|
109
109
|
"vite": "5.4.7",
|
|
110
|
-
"@dxos/echo-generator": "0.7.
|
|
111
|
-
"@dxos/random": "0.7.
|
|
112
|
-
"@dxos/react-ui": "0.7.
|
|
113
|
-
"@dxos/react-ui-syntax-highlighter": "0.7.
|
|
114
|
-
"@dxos/react-ui-theme": "0.7.
|
|
115
|
-
"@dxos/react-ui-types": "0.7.
|
|
116
|
-
"@dxos/storybook-utils": "0.7.
|
|
110
|
+
"@dxos/echo-generator": "0.7.1-staging.7f6f91c",
|
|
111
|
+
"@dxos/random": "0.7.1-staging.7f6f91c",
|
|
112
|
+
"@dxos/react-ui": "0.7.1-staging.7f6f91c",
|
|
113
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.1-staging.7f6f91c",
|
|
114
|
+
"@dxos/react-ui-theme": "0.7.1-staging.7f6f91c",
|
|
115
|
+
"@dxos/react-ui-types": "0.7.1-staging.7f6f91c",
|
|
116
|
+
"@dxos/storybook-utils": "0.7.1-staging.7f6f91c"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"react": "~18.2.0",
|
|
120
120
|
"react-dom": "~18.2.0",
|
|
121
|
-
"@dxos/react-ui-theme": "0.7.
|
|
122
|
-
"@dxos/react-ui": "0.7.
|
|
121
|
+
"@dxos/react-ui-theme": "0.7.1-staging.7f6f91c",
|
|
122
|
+
"@dxos/react-ui": "0.7.1-staging.7f6f91c"
|
|
123
123
|
},
|
|
124
124
|
"publishConfig": {
|
|
125
125
|
"access": "public"
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { Icon } from '@dxos/react-ui';
|
|
8
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
9
8
|
|
|
10
9
|
import { addressToA1Notation, isFormula, rangeToA1Notation } from '../../defs';
|
|
11
10
|
import { useSheetContext } from '../SheetContext';
|
|
@@ -26,7 +25,7 @@ export const FunctionEditor = () => {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
return (
|
|
29
|
-
<div className=
|
|
28
|
+
<div className='flex shrink-0 justify-between items-center px-4 py-1 text-sm attention-surface border-bs !border-separator'>
|
|
30
29
|
<div className='flex gap-4 items-center'>
|
|
31
30
|
<div className='flex w-16 items-center font-mono'>
|
|
32
31
|
{(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}
|
|
@@ -25,7 +25,7 @@ export const Basic = () => {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<SheetProvider graph={graph} sheet={sheet}>
|
|
28
|
+
<SheetProvider graph={graph} sheet={sheet} ignoreAttention>
|
|
29
29
|
<GridSheet />
|
|
30
30
|
</SheetProvider>
|
|
31
31
|
);
|
|
@@ -38,7 +38,7 @@ const meta: Meta = {
|
|
|
38
38
|
withClientProvider({ types: [SheetType], createSpace: true }),
|
|
39
39
|
withComputeGraphDecorator(),
|
|
40
40
|
withTheme,
|
|
41
|
-
withLayout({ fullscreen: true, tooltips: true }),
|
|
41
|
+
withLayout({ fullscreen: true, tooltips: true, classNames: 'grid' }),
|
|
42
42
|
],
|
|
43
43
|
parameters: { translations },
|
|
44
44
|
};
|
|
@@ -64,7 +64,8 @@ const sheetColDefault = { frozenColsStart: { size: 48, readonly: true }, grid: {
|
|
|
64
64
|
|
|
65
65
|
export const GridSheet = () => {
|
|
66
66
|
const { t } = useTranslation(SHEET_PLUGIN);
|
|
67
|
-
const { id, model, editing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs } =
|
|
67
|
+
const { id, model, editing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs, ignoreAttention } =
|
|
68
|
+
useSheetContext();
|
|
68
69
|
// NOTE(thure): using `useState` instead of `useRef` works with refs provided by `@lit/react` and gives us
|
|
69
70
|
// a reliable dependency for `useEffect` whereas `useLayoutEffect` does not guarantee the element will be defined.
|
|
70
71
|
const [dxGrid, setDxGrid] = useState<DxGridElement | null>(null);
|
|
@@ -151,11 +152,11 @@ export const GridSheet = () => {
|
|
|
151
152
|
);
|
|
152
153
|
const handleWheel = useCallback(
|
|
153
154
|
(event: WheelEvent) => {
|
|
154
|
-
if (!hasAttention) {
|
|
155
|
+
if (!ignoreAttention && !hasAttention) {
|
|
155
156
|
event.stopPropagation();
|
|
156
157
|
}
|
|
157
158
|
},
|
|
158
|
-
[hasAttention],
|
|
159
|
+
[hasAttention, ignoreAttention],
|
|
159
160
|
);
|
|
160
161
|
|
|
161
162
|
const selectEntireAxis = useCallback(
|
|
@@ -303,7 +304,7 @@ export const GridSheet = () => {
|
|
|
303
304
|
useSelectThreadOnCellFocus();
|
|
304
305
|
|
|
305
306
|
return (
|
|
306
|
-
|
|
307
|
+
<div role='none' className='relative min-bs-0'>
|
|
307
308
|
<GridCellEditor getCellContent={getCellContent} extension={extension} onBlur={handleBlur} />
|
|
308
309
|
<Grid.Content
|
|
309
310
|
initialCells={initialCells}
|
|
@@ -322,7 +323,7 @@ export const GridSheet = () => {
|
|
|
322
323
|
onContextMenu={handleContextMenu}
|
|
323
324
|
onClick={handleClick}
|
|
324
325
|
overscroll='trap'
|
|
325
|
-
className='[--dx-grid-base:var(--surface-bg)] [&_.dx-grid]:border-bs [&_.dx-grid]:border-separator'
|
|
326
|
+
className='[--dx-grid-base:var(--surface-bg)] [&_.dx-grid]:border-bs [&_.dx-grid]:absolute [&_.dx-grid]:inset-0 [&_.dx-grid]:border-separator'
|
|
326
327
|
activeRefs={activeRefs}
|
|
327
328
|
ref={setDxGrid}
|
|
328
329
|
/>
|
|
@@ -356,6 +357,6 @@ export const GridSheet = () => {
|
|
|
356
357
|
<DropdownMenu.Arrow />
|
|
357
358
|
</DropdownMenu.Content>
|
|
358
359
|
</DropdownMenu.Root>
|
|
359
|
-
|
|
360
|
+
</div>
|
|
360
361
|
);
|
|
361
362
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { createDocAccessor, fullyQualifiedId } from '@dxos/react-client/echo';
|
|
8
|
-
import { parseValue, cellClassesForFieldType } from '@dxos/react-ui-
|
|
8
|
+
import { parseValue, cellClassesForFieldType } from '@dxos/react-ui-form';
|
|
9
9
|
import {
|
|
10
10
|
type GridContentProps,
|
|
11
11
|
type DxGridElement,
|
|
@@ -23,7 +23,7 @@ export const Basic = () => {
|
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
return <SheetContainer space={space} sheet={sheet} role='article' />;
|
|
26
|
+
return <SheetContainer space={space} sheet={sheet} role='article' ignoreAttention />;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const meta: Meta = {
|
|
@@ -36,7 +36,7 @@ const meta: Meta = {
|
|
|
36
36
|
withLayout({
|
|
37
37
|
fullscreen: true,
|
|
38
38
|
tooltips: true,
|
|
39
|
-
classNames: 'grid
|
|
39
|
+
classNames: 'grid',
|
|
40
40
|
}),
|
|
41
41
|
],
|
|
42
42
|
parameters: { translations },
|
|
@@ -14,12 +14,22 @@ import { GridSheet } from '../GridSheet';
|
|
|
14
14
|
import { SheetProvider } from '../SheetContext';
|
|
15
15
|
import { Toolbar } from '../Toolbar';
|
|
16
16
|
|
|
17
|
-
export const SheetContainer = ({
|
|
17
|
+
export const SheetContainer = ({
|
|
18
|
+
space,
|
|
19
|
+
sheet,
|
|
20
|
+
role,
|
|
21
|
+
ignoreAttention,
|
|
22
|
+
}: {
|
|
23
|
+
space: Space;
|
|
24
|
+
sheet: SheetType;
|
|
25
|
+
role?: string;
|
|
26
|
+
ignoreAttention?: boolean;
|
|
27
|
+
}) => {
|
|
18
28
|
const graph = useComputeGraph(space);
|
|
19
29
|
|
|
20
30
|
return graph ? (
|
|
21
|
-
<SheetProvider sheet={sheet} graph={graph}>
|
|
22
|
-
<StackItem.Content toolbar statusbar classNames
|
|
31
|
+
<SheetProvider sheet={sheet} graph={graph} ignoreAttention={ignoreAttention}>
|
|
32
|
+
<StackItem.Content toolbar statusbar {...(role === 'section' && { classNames: 'aspect-video' })}>
|
|
23
33
|
<Toolbar.Root role={role}>
|
|
24
34
|
<Toolbar.Styles />
|
|
25
35
|
<Toolbar.Alignment />
|
|
@@ -43,6 +43,9 @@ export type SheetContextValue = {
|
|
|
43
43
|
// Events.
|
|
44
44
|
// TODO(burdon): Generalize.
|
|
45
45
|
onInfo?: () => void;
|
|
46
|
+
|
|
47
|
+
// Flags
|
|
48
|
+
ignoreAttention?: boolean;
|
|
46
49
|
};
|
|
47
50
|
|
|
48
51
|
const SheetContext = createContext<SheetContextValue | undefined>(undefined);
|
|
@@ -56,9 +59,10 @@ export const useSheetContext = (): SheetContextValue => {
|
|
|
56
59
|
const SheetProviderImpl = ({
|
|
57
60
|
model,
|
|
58
61
|
onInfo,
|
|
62
|
+
ignoreAttention,
|
|
59
63
|
children,
|
|
60
64
|
__gridScope,
|
|
61
|
-
}: GridScopedProps<PropsWithChildren<Pick<SheetContextValue, 'onInfo' | 'model'>>>) => {
|
|
65
|
+
}: GridScopedProps<PropsWithChildren<Pick<SheetContextValue, 'onInfo' | 'model' | 'ignoreAttention'>>>) => {
|
|
62
66
|
const { id, editing, setEditing } = useGridContext('SheetProvider', __gridScope);
|
|
63
67
|
|
|
64
68
|
const [cursor, setCursorInternal] = useState<CellAddress>();
|
|
@@ -101,6 +105,7 @@ const SheetProviderImpl = ({
|
|
|
101
105
|
setActiveRefs,
|
|
102
106
|
// TODO(burdon): Change to event.
|
|
103
107
|
onInfo,
|
|
108
|
+
ignoreAttention,
|
|
104
109
|
}}
|
|
105
110
|
>
|
|
106
111
|
{children}
|
|
@@ -112,14 +117,22 @@ export type SheetProviderProps = {
|
|
|
112
117
|
graph: ComputeGraph;
|
|
113
118
|
sheet: SheetType;
|
|
114
119
|
readonly?: boolean;
|
|
120
|
+
ignoreAttention?: boolean;
|
|
115
121
|
} & Pick<SheetContextValue, 'onInfo'>;
|
|
116
122
|
|
|
117
|
-
export const SheetProvider = ({
|
|
123
|
+
export const SheetProvider = ({
|
|
124
|
+
children,
|
|
125
|
+
graph,
|
|
126
|
+
sheet,
|
|
127
|
+
readonly,
|
|
128
|
+
ignoreAttention,
|
|
129
|
+
onInfo,
|
|
130
|
+
}: PropsWithChildren<SheetProviderProps>) => {
|
|
118
131
|
const model = useSheetModel(graph, sheet, { readonly });
|
|
119
132
|
|
|
120
133
|
return !model ? null : (
|
|
121
134
|
<Grid.Root id={fullyQualifiedId(sheet)}>
|
|
122
|
-
<SheetProviderImpl model={model} onInfo={onInfo}>
|
|
135
|
+
<SheetProviderImpl model={model} onInfo={onInfo} ignoreAttention={ignoreAttention}>
|
|
123
136
|
{children}
|
|
124
137
|
</SheetProviderImpl>
|
|
125
138
|
</Grid.Root>
|
|
@@ -178,7 +178,7 @@ const ToolbarRoot = ({ children, role, classNames }: ToolbarProps) => {
|
|
|
178
178
|
|
|
179
179
|
return (
|
|
180
180
|
<ToolbarContextProvider onAction={handleAction}>
|
|
181
|
-
<NaturalToolbar.Root classNames={['pli-0.5', !hasAttention && 'opacity-20', classNames]}>
|
|
181
|
+
<NaturalToolbar.Root classNames={['pli-0.5 attention-surface', !hasAttention && 'opacity-20', classNames]}>
|
|
182
182
|
{children}
|
|
183
183
|
</NaturalToolbar.Root>
|
|
184
184
|
</ToolbarContextProvider>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/SheetContainer/SheetContainer.tsx", "../../../src/components/FunctionEditor/FunctionEditor.tsx", "../../../src/components/Toolbar/Toolbar.tsx", "../../../src/components/SheetContainer/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { type SheetType } from '../../types';\nimport { useComputeGraph } from '../ComputeGraph';\nimport { FunctionEditor } from '../FunctionEditor';\nimport { GridSheet } from '../GridSheet';\nimport { SheetProvider } from '../SheetContext';\nimport { Toolbar } from '../Toolbar';\n\nexport const SheetContainer = ({ space, sheet, role }: { space: Space; sheet: SheetType; role?: string }) => {\n const graph = useComputeGraph(space);\n\n return graph ? (\n <SheetProvider sheet={sheet} graph={graph}>\n <StackItem.Content toolbar statusbar classNames='border-bs border-separator'>\n <Toolbar.Root role={role}>\n <Toolbar.Styles />\n <Toolbar.Alignment />\n <Toolbar.Separator />\n <Toolbar.Actions />\n </Toolbar.Root>\n <GridSheet />\n <FunctionEditor />\n </StackItem.Content>\n </SheetProvider>\n ) : null;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { addressToA1Notation, isFormula, rangeToA1Notation } from '../../defs';\nimport { useSheetContext } from '../SheetContext';\n\nexport const FunctionEditor = () => {\n const { model, cursor, range } = useSheetContext();\n\n let value;\n let formula = false;\n if (cursor) {\n value = model.getCellValue(cursor);\n if (isFormula(value)) {\n value = model.graph.mapFunctionBindingFromId(model.mapFormulaIndicesToRefs(value));\n formula = true;\n } else if (value != null) {\n value = String(value);\n }\n }\n\n return (\n <div className={mx('flex shrink-0 justify-between items-center px-4 py-1 text-sm attention-surface')}>\n <div className='flex gap-4 items-center'>\n <div className='flex w-16 items-center font-mono'>\n {(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}\n </div>\n <div className='flex gap-2 items-center'>\n <Icon icon='ph--function--regular' classNames={['text-greenText', formula ? 'visible' : 'invisible']} />\n <span className='font-mono'>{value}</span>\n </div>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type PropsWithChildren, useCallback } from 'react';\n\nimport { useIntentDispatcher } from '@dxos/app-framework';\nimport {\n Icon,\n type ThemedClassName,\n Toolbar as NaturalToolbar,\n type ToolbarButtonProps as NaturalToolbarButtonProps,\n type ToolbarToggleGroupItemProps as NaturalToolbarToggleGroupItemProps,\n type ToolbarToggleProps as NaturalToolbarToggleProps,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { nonNullable } from '@dxos/util';\n\nimport {\n alignKey,\n type AlignKey,\n type AlignValue,\n type CommentKey,\n type CommentValue,\n inRange,\n rangeFromIndex,\n rangeToIndex,\n styleKey,\n type StyleKey,\n type StyleValue,\n} from '../../defs';\nimport { completeCellRangeToThreadCursor } from '../../integrations';\nimport { SHEET_PLUGIN } from '../../meta';\nimport { type SheetType } from '../../types';\nimport { useSheetContext } from '../SheetContext';\n\n//\n// Buttons\n//\n\nconst buttonStyles = 'min-bs-0 p-2';\nconst tooltipProps = { side: 'bottom' as const, classNames: 'z-10' };\n\nconst ToolbarSeparator = () => <div role='separator' className='grow' />;\n\n//\n// ToolbarItem\n//\n\ntype ToolbarItemProps =\n | (NaturalToolbarButtonProps & { itemType: 'button'; icon: string })\n | (NaturalToolbarToggleGroupItemProps & { itemType: 'toggleGroupItem'; icon: string })\n | (NaturalToolbarToggleProps & { itemType: 'toggle'; icon: string });\n\nexport const ToolbarItem = ({ itemType, icon, children, ...props }: ToolbarItemProps) => {\n const Invoker =\n itemType === 'toggleGroupItem'\n ? NaturalToolbar.ToggleGroupItem\n : itemType === 'toggle'\n ? NaturalToolbar.Toggle\n : NaturalToolbar.Button;\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n {/* TODO(thure): type the props spread better. */}\n <Invoker variant='ghost' {...(props as any)} classNames={buttonStyles}>\n <Icon icon={icon} size={5} />\n <span className='sr-only'>{children}</span>\n </Invoker>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content {...tooltipProps}>\n {children}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\n//\n// Root\n//\n\ntype AlignAction = { key: AlignKey; value: AlignValue };\ntype CommentAction = { key: CommentKey; value: CommentValue; cellContent?: string };\ntype StyleAction = { key: StyleKey; value: StyleValue };\n\nexport type ToolbarAction = StyleAction | AlignAction | CommentAction;\nexport type ToolbarActionAnnotated = ToolbarAction & { unset?: boolean };\n\nexport type ToolbarActionType = ToolbarAction['key'];\n\nexport type ToolbarActionHandler = (action: ToolbarActionAnnotated) => void;\n\nexport type ToolbarProps = ThemedClassName<\n PropsWithChildren<{\n role?: string;\n }>\n>;\n\nconst [ToolbarContextProvider, useToolbarContext] = createContext<{\n onAction: (action: ToolbarActionAnnotated) => void;\n}>('Toolbar');\n\ntype Range = SheetType['ranges'][number];\n\nconst ToolbarRoot = ({ children, role, classNames }: ToolbarProps) => {\n const { id, model, cursorFallbackRange, cursor } = useSheetContext();\n const { hasAttention } = useAttention(id);\n const dispatch = useIntentDispatcher();\n\n // TODO(Zan): Externalize the toolbar action handler. E.g., Toolbar/keys should both fire events.\n const handleAction = useCallback(\n (action: ToolbarActionAnnotated) => {\n switch (action.key) {\n case 'alignment':\n if (cursorFallbackRange) {\n const index =\n model.sheet.ranges?.findIndex(\n (range) =>\n range.key === action.key &&\n inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n ) ?? -1;\n const nextRangeEntity = {\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: action.key,\n value: action.value,\n };\n if (index < 0) {\n model.sheet.ranges?.push(nextRangeEntity);\n } else if (model.sheet.ranges![index].value === action.value) {\n model.sheet.ranges?.splice(index, 1);\n } else {\n model.sheet.ranges?.splice(index, 1, nextRangeEntity);\n }\n }\n break;\n case 'style':\n if (action.unset) {\n const index = model.sheet.ranges?.findIndex(\n (range) =>\n range.key === action.key &&\n cursorFallbackRange &&\n inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n );\n if (index >= 0) {\n model.sheet.ranges?.splice(index, 1);\n }\n } else if (cursorFallbackRange) {\n model.sheet.ranges?.push({\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: action.key,\n value: action.value,\n });\n }\n break;\n case 'comment': {\n // TODO(Zan): We shouldn't hardcode the action ID.\n if (cursorFallbackRange) {\n void dispatch({\n action: 'dxos.org/plugin/thread/action/create',\n data: {\n cursor: completeCellRangeToThreadCursor(cursorFallbackRange),\n name: action.cellContent,\n subject: model.sheet,\n },\n });\n }\n }\n }\n },\n [model.sheet, cursorFallbackRange, cursor, dispatch],\n );\n\n return (\n <ToolbarContextProvider onAction={handleAction}>\n <NaturalToolbar.Root classNames={['pli-0.5', !hasAttention && 'opacity-20', classNames]}>\n {children}\n </NaturalToolbar.Root>\n </ToolbarContextProvider>\n );\n};\n\n// TODO(burdon): Generalize.\n// TODO(burdon): Detect and display current state.\ntype ButtonProps<T> = {\n value: T;\n icon: string;\n disabled?: (state: Range) => boolean;\n};\n\n//\n// Alignment\n//\n\nconst alignmentOptions: ButtonProps<AlignValue>[] = [\n { value: 'start', icon: 'ph--text-align-left--regular' },\n { value: 'center', icon: 'ph--text-align-center--regular' },\n { value: 'end', icon: 'ph--text-align-right--regular' },\n];\n\nconst Alignment = () => {\n const { cursor, model } = useSheetContext();\n const { onAction } = useToolbarContext('Alignment');\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const value = cursor\n ? model.sheet.ranges?.findLast(\n ({ range, key }) => key === alignKey && inRange(rangeFromIndex(model.sheet, range), cursor),\n )?.value\n : undefined;\n\n return (\n <NaturalToolbar.ToggleGroup\n type='single'\n value={\n // TODO(thure): providing `undefined` leaves the last item active which was active rather than showing none.\n value ?? 'never'\n }\n onValueChange={(value: AlignValue) => onAction?.({ key: alignKey, value })}\n >\n {alignmentOptions.map(({ value, icon }) => (\n <ToolbarItem itemType='toggleGroupItem' key={value} value={value} icon={icon}>\n {t('toolbar action label', {\n key: t(`range key ${alignKey} label`),\n value: t(`range value ${value} label`),\n })}\n </ToolbarItem>\n ))}\n </NaturalToolbar.ToggleGroup>\n );\n};\n\nconst styleOptions: ButtonProps<StyleValue>[] = [\n { value: 'highlight', icon: 'ph--highlighter--regular' },\n { value: 'softwrap', icon: 'ph--paragraph--regular' },\n];\n\nconst Styles = () => {\n const { cursorFallbackRange, model } = useSheetContext();\n const { onAction } = useToolbarContext('Styles');\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const activeValues = cursorFallbackRange\n ? model.sheet.ranges\n ?.filter(\n ({ range, key }) => key === 'style' && inRange(rangeFromIndex(model.sheet, range), cursorFallbackRange.from),\n )\n .reduce((acc, { value }) => {\n acc.add(value);\n return acc;\n }, new Set())\n : undefined;\n\n return (\n <>\n {styleOptions.map(({ value, icon }) => (\n <ToolbarItem\n itemType='toggle'\n key={value}\n pressed={activeValues?.has(value)}\n onPressedChange={(nextPressed: boolean) => {\n onAction?.({ key: 'style', value, unset: !nextPressed });\n }}\n icon={icon}\n >\n {t('toolbar action label', {\n key: t(`range key ${styleKey} label`),\n value: t(`range value ${value} label`),\n })}\n </ToolbarItem>\n ))}\n </>\n );\n};\n\n//\n// Actions\n//\n\nconst Actions = () => {\n const { onAction } = useToolbarContext('Actions');\n const { cursorFallbackRange, cursor, model } = useSheetContext();\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const overlapsCommentAnchor = (model.sheet.threads ?? [])\n .filter(nonNullable)\n .filter((thread) => thread.status !== 'resolved')\n .some((thread) => {\n if (!cursorFallbackRange) {\n return false;\n }\n return rangeToIndex(model.sheet, cursorFallbackRange) === thread.anchor;\n });\n\n const tooltipLabelKey = !cursor\n ? 'no cursor label'\n : overlapsCommentAnchor\n ? 'selection overlaps existing comment label'\n : 'comment label';\n\n return (\n <ToolbarItem\n itemType='button'\n value='comment'\n icon='ph--chat-text--regular'\n data-testid='editor.toolbar.comment'\n onClick={() => {\n if (!cursorFallbackRange) {\n return;\n }\n return onAction?.({\n key: 'comment',\n value: rangeToIndex(model.sheet, cursorFallbackRange),\n cellContent: model.getCellText(cursorFallbackRange.from),\n });\n }}\n disabled={!cursorFallbackRange || overlapsCommentAnchor}\n >\n {t(tooltipLabelKey)}\n </ToolbarItem>\n );\n};\n\nexport const Toolbar = {\n Root: ToolbarRoot,\n Separator: ToolbarSeparator,\n Alignment,\n Styles,\n Actions,\n};\n\nexport { useToolbarContext };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { SheetContainer } from './SheetContainer';\n\nexport default SheetContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAGlB,SAASC,iBAAiB;;;ACH1B,OAAOC,WAAW;AAElB,SAASC,YAAY;AACrB,SAASC,UAAU;AAKZ,IAAMC,iBAAiB,MAAA;AAC5B,QAAM,EAAEC,OAAOC,QAAQC,MAAK,IAAKC,gBAAAA;AAEjC,MAAIC;AACJ,MAAIC,UAAU;AACd,MAAIJ,QAAQ;AACVG,YAAQJ,MAAMM,aAAaL,MAAAA;AAC3B,QAAIM,UAAUH,KAAAA,GAAQ;AACpBA,cAAQJ,MAAMQ,MAAMC,yBAAyBT,MAAMU,wBAAwBN,KAAAA,CAAAA;AAC3EC,gBAAU;IACZ,WAAWD,SAAS,MAAM;AACxBA,cAA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AACF;;;AFjUO,IAAMe,iBAAiB,CAAC,EAAEC,OAAOC,OAAOC,KAAI,MAAqD;AACtG,QAAMC,QAAQC,gBAAgBJ,KAAAA;AAE9B,SAAOG,QACL,gBAAAE,OAAA,cAACC,eAAAA;IAAcL;IAAcE;KAC3B,gBAAAE,OAAA,cAACE,UAAUC,SAAO;IAACC,SAAAA;IAAQC,WAAAA;IAAUC,YAAW;KAC9C,gBAAAN,OAAA,cAACO,QAAQC,MAAI;IAACX;KACZ,gBAAAG,OAAA,cAACO,QAAQE,QAAM,IAAA,GACf,gBAAAT,OAAA,cAACO,QAAQG,WAAS,IAAA,GAClB,gBAAAV,OAAA,cAACO,QAAQI,WAAS,IAAA,GAClB,gBAAAX,OAAA,cAACO,QAAQK,SAAO,IAAA,CAAA,GAElB,gBAAAZ,OAAA,cAACa,WAAAA,IAAAA,GACD,gBAAAb,OAAA,cAACc,gBAAAA,IAAAA,CAAAA,CAAAA,IAGH;AACN;;;AG3BA,IAAA,yBAAeC;",
|
|
6
|
-
"names": ["React", "StackItem", "React", "Icon", "mx", "FunctionEditor", "model", "cursor", "range", "useSheetContext", "value", "formula", "getCellValue", "isFormula", "graph", "mapFunctionBindingFromId", "mapFormulaIndicesToRefs", "String", "div", "className", "mx", "rangeToA1Notation", "addressToA1Notation", "Icon", "icon", "classNames", "span", "createContext", "React", "useCallback", "useIntentDispatcher", "Icon", "Toolbar", "NaturalToolbar", "Tooltip", "useTranslation", "useAttention", "nonNullable", "buttonStyles", "tooltipProps", "side", "classNames", "ToolbarSeparator", "React", "div", "role", "className", "ToolbarItem", "itemType", "icon", "children", "props", "Invoker", "NaturalToolbar", "ToggleGroupItem", "Toggle", "Button", "Tooltip", "Root", "Trigger", "asChild", "variant", "Icon", "size", "span", "Portal", "Content", "Arrow", "ToolbarContextProvider", "useToolbarContext", "createContext", "ToolbarRoot", "id", "model", "cursorFallbackRange", "cursor", "useSheetContext", "hasAttention", "useAttention", "dispatch", "useIntentDispatcher", "handleAction", "useCallback", "action", "key", "index", "sheet", "ranges", "findIndex", "range", "inRange", "rangeFromIndex", "from", "nextRangeEntity", "rangeToIndex", "value", "push", "splice", "unset", "data", "completeCellRangeToThreadCursor", "name", "cellContent", "subject", "onAction", "alignmentOptions", "Alignment", "t", "useTranslation", "SHEET_PLUGIN", "findLast", "alignKey", "undefined", "ToggleGroup", "type", "onValueChange", "map", "styleOptions", "Styles", "activeValues", "filter", "reduce", "acc", "add", "Set", "pressed", "has", "onPressedChange", "nextPressed", "styleKey", "Actions", "overlapsCommentAnchor", "threads", "nonNullable", "thread", "status", "some", "anchor", "tooltipLabelKey", "data-testid", "onClick", "getCellText", "disabled", "Toolbar", "Separator", "SheetContainer", "space", "sheet", "role", "graph", "useComputeGraph", "React", "SheetProvider", "StackItem", "Content", "toolbar", "statusbar", "classNames", "Toolbar", "Root", "Styles", "Alignment", "Separator", "Actions", "GridSheet", "FunctionEditor", "SheetContainer"]
|
|
7
|
-
}
|