@dxos/plugin-sheet 0.8.3 → 0.8.4-main.1da679c
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-BDZXBB5U.mjs → SheetContainer-OUN6AARA.mjs} +30 -31
- package/dist/lib/browser/SheetContainer-OUN6AARA.mjs.map +7 -0
- package/dist/lib/browser/{anchor-sort-NYYZLRAA.mjs → anchor-sort-CAYLDDRF.mjs} +6 -6
- package/dist/lib/browser/{anchor-sort-NYYZLRAA.mjs.map → anchor-sort-CAYLDDRF.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-D3G4UGEK.mjs → chunk-6AKBCBL4.mjs} +2 -2
- package/dist/lib/browser/{chunk-IR42IS3F.mjs → chunk-KJWZUQVA.mjs} +3 -3
- package/dist/lib/browser/{chunk-FJRLDX7Z.mjs → chunk-SSN4HYJL.mjs} +7 -7
- package/dist/lib/browser/chunk-SSN4HYJL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5TA43LO4.mjs → chunk-X4EWLDT3.mjs} +207 -203
- package/dist/lib/browser/chunk-X4EWLDT3.mjs.map +7 -0
- package/dist/lib/browser/{chunk-I7FZ4TWJ.mjs → chunk-XSXUU6FO.mjs} +29 -15
- package/dist/lib/browser/chunk-XSXUU6FO.mjs.map +7 -0
- package/dist/lib/browser/{compute-graph-registry-IXGGJJBU.mjs → compute-graph-registry-WHF3BJTJ.mjs} +6 -6
- package/dist/lib/{node-esm/compute-graph-registry-7PDWXMHF.mjs.map → browser/compute-graph-registry-WHF3BJTJ.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +21 -20
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-IBBI6B74.mjs → intent-resolver-LKZXAJRJ.mjs} +7 -7
- package/dist/lib/browser/{intent-resolver-IBBI6B74.mjs.map → intent-resolver-LKZXAJRJ.mjs.map} +3 -3
- package/dist/lib/browser/{markdown-T4TUP4BF.mjs → markdown-XKFA4Z2M.mjs} +7 -7
- package/dist/lib/browser/markdown-XKFA4Z2M.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-UI46P43F.mjs → react-surface-N6NYHHT3.mjs} +9 -9
- package/dist/lib/browser/{react-surface-UI46P43F.mjs.map → react-surface-N6NYHHT3.mjs.map} +2 -2
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{SheetContainer-V632Q4HA.mjs → SheetContainer-NFLLTGNV.mjs} +30 -31
- package/dist/lib/node-esm/SheetContainer-NFLLTGNV.mjs.map +7 -0
- package/dist/lib/node-esm/{anchor-sort-JTNZOE67.mjs → anchor-sort-4R2ID6GE.mjs} +6 -6
- package/dist/lib/node-esm/{anchor-sort-JTNZOE67.mjs.map → anchor-sort-4R2ID6GE.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-Y6ND5HWX.mjs → chunk-3K5VNYOF.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-IQ76YE6M.mjs → chunk-6SK5LJ5S.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-NMCVJWDT.mjs → chunk-IK4O7FUJ.mjs} +7 -7
- package/dist/lib/node-esm/chunk-IK4O7FUJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-C4IKYVTV.mjs → chunk-ODP4L4OV.mjs} +29 -15
- package/dist/lib/node-esm/chunk-ODP4L4OV.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SOC52B67.mjs → chunk-PYF4ZJXN.mjs} +207 -203
- package/dist/lib/node-esm/chunk-PYF4ZJXN.mjs.map +7 -0
- package/dist/lib/node-esm/{compute-graph-registry-7PDWXMHF.mjs → compute-graph-registry-3IUZXRXJ.mjs} +6 -6
- package/dist/lib/{browser/compute-graph-registry-IXGGJJBU.mjs.map → node-esm/compute-graph-registry-3IUZXRXJ.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +21 -20
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-M2HNR7PJ.mjs → intent-resolver-JHH6ZVJ4.mjs} +7 -7
- package/dist/lib/node-esm/{intent-resolver-M2HNR7PJ.mjs.map → intent-resolver-JHH6ZVJ4.mjs.map} +3 -3
- package/dist/lib/node-esm/{markdown-WWUJ3E5F.mjs → markdown-NOKROLCG.mjs} +7 -7
- package/dist/lib/node-esm/markdown-NOKROLCG.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-OLXO2MVB.mjs → react-surface-TYBS4DOF.mjs} +9 -9
- package/dist/lib/node-esm/{react-surface-OLXO2MVB.mjs.map → react-surface-TYBS4DOF.mjs.map} +2 -2
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/capabilities/anchor-sort.d.ts +2 -2
- package/dist/types/src/capabilities/compute-graph-registry.d.ts +1 -1
- package/dist/types/src/capabilities/compute-graph-registry.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +1 -3
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/ComputeGraphContextProvider.d.ts.map +1 -1
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts +9 -3
- package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +49 -2
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts +11 -19
- package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/util.d.ts +1 -1
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +49 -2
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +86 -3
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/align.d.ts +2 -2
- package/dist/types/src/components/SheetToolbar/align.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.d.ts +1 -1
- package/dist/types/src/extensions/compute.d.ts.map +1 -1
- package/dist/types/src/extensions/compute.stories.d.ts +10 -12
- package/dist/types/src/extensions/compute.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/index.d.ts +1 -1
- package/dist/types/src/extensions/editor/index.d.ts.map +1 -1
- package/dist/types/src/extensions/editor/{extension.d.ts → sheet-extension.d.ts} +1 -1
- package/dist/types/src/extensions/editor/sheet-extension.d.ts.map +1 -0
- package/dist/types/src/extensions/editor/sheet-extension.test.d.ts +2 -0
- package/dist/types/src/extensions/editor/sheet-extension.test.d.ts.map +1 -0
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +1 -1
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/playwright/playwright.config.d.ts +3 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
- package/dist/types/src/{testing/playwright → playwright}/sheet-manager.d.ts +1 -1
- package/dist/types/src/playwright/sheet-manager.d.ts.map +1 -0
- package/dist/types/src/playwright/sheet.spec.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -62
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/types/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +59 -57
- package/src/SheetPlugin.tsx +3 -3
- package/src/capabilities/anchor-sort.ts +1 -1
- package/src/capabilities/compute-graph-registry.ts +1 -1
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/capabilities/markdown.ts +3 -2
- package/src/capabilities/react-surface.tsx +2 -1
- package/src/components/ComputeGraph/ComputeGraphContextProvider.tsx +1 -1
- package/src/components/ComputeGraph/compute-graph.stories.tsx +13 -10
- package/src/components/GridSheet/GridSheet.stories.tsx +9 -6
- package/src/components/GridSheet/GridSheet.tsx +19 -18
- package/src/components/GridSheet/SheetCellEditor.stories.tsx +37 -38
- package/src/components/GridSheet/util.ts +6 -6
- package/src/components/SheetContainer/SheetContainer.stories.tsx +10 -7
- package/src/components/SheetContainer/SheetContainer.tsx +1 -1
- package/src/components/SheetContext/SheetContext.tsx +1 -1
- package/src/components/SheetToolbar/SheetToolbar.stories.tsx +10 -7
- package/src/components/SheetToolbar/SheetToolbar.tsx +16 -15
- package/src/components/SheetToolbar/align.ts +4 -3
- package/src/components/SheetToolbar/style.ts +2 -2
- package/src/extensions/compute.stories.tsx +20 -19
- package/src/extensions/compute.ts +2 -3
- package/src/extensions/editor/index.ts +1 -1
- package/src/extensions/editor/{extension.test.ts → sheet-extension.test.ts} +1 -1
- package/src/integrations/thread-ranges.ts +7 -6
- package/src/model/sheet-model.test.ts +2 -1
- package/src/model/sheet-model.ts +6 -6
- package/src/playwright/playwright.config.ts +17 -0
- package/src/{testing/playwright → playwright}/sheet-manager.ts +1 -1
- package/src/{testing/playwright → playwright}/sheet.spec.ts +2 -2
- package/src/sanity.test.ts +1 -1
- package/src/testing/testing.tsx +1 -1
- package/src/translations.ts +8 -6
- package/src/types/schema.ts +1 -0
- package/src/types/types.ts +2 -1
- package/src/types/util.ts +3 -3
- package/dist/lib/browser/SheetContainer-BDZXBB5U.mjs.map +0 -7
- package/dist/lib/browser/chunk-5TA43LO4.mjs.map +0 -7
- package/dist/lib/browser/chunk-FJRLDX7Z.mjs.map +0 -7
- package/dist/lib/browser/chunk-I7FZ4TWJ.mjs.map +0 -7
- package/dist/lib/browser/markdown-T4TUP4BF.mjs.map +0 -7
- package/dist/lib/node/SheetContainer-VWPM3HYJ.cjs +0 -351
- package/dist/lib/node/SheetContainer-VWPM3HYJ.cjs.map +0 -7
- package/dist/lib/node/anchor-sort-A7NABMJM.cjs +0 -39
- package/dist/lib/node/anchor-sort-A7NABMJM.cjs.map +0 -7
- package/dist/lib/node/chunk-FIM6EZ6M.cjs +0 -256
- package/dist/lib/node/chunk-FIM6EZ6M.cjs.map +0 -7
- package/dist/lib/node/chunk-JSIDCZHB.cjs +0 -41
- package/dist/lib/node/chunk-JSIDCZHB.cjs.map +0 -7
- package/dist/lib/node/chunk-LJWWS53Z.cjs +0 -34
- package/dist/lib/node/chunk-LJWWS53Z.cjs.map +0 -7
- package/dist/lib/node/chunk-N7FSEUIN.cjs +0 -927
- package/dist/lib/node/chunk-N7FSEUIN.cjs.map +0 -7
- package/dist/lib/node/chunk-ST3WA73J.cjs +0 -855
- package/dist/lib/node/chunk-ST3WA73J.cjs.map +0 -7
- package/dist/lib/node/compute-graph-registry-ARLDHPFW.cjs +0 -56
- package/dist/lib/node/compute-graph-registry-ARLDHPFW.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -173
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-2657YDOU.cjs +0 -69
- package/dist/lib/node/intent-resolver-2657YDOU.cjs.map +0 -7
- package/dist/lib/node/markdown-DBPOAYI7.cjs +0 -40
- package/dist/lib/node/markdown-DBPOAYI7.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-XQEIRKWU.cjs +0 -71
- package/dist/lib/node/react-surface-XQEIRKWU.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -84
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-V632Q4HA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C4IKYVTV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NMCVJWDT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SOC52B67.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-WWUJ3E5F.mjs.map +0 -7
- package/dist/types/src/extensions/editor/extension.d.ts.map +0 -1
- package/dist/types/src/extensions/editor/extension.test.d.ts +0 -2
- package/dist/types/src/extensions/editor/extension.test.d.ts.map +0 -1
- package/dist/types/src/testing/playwright/sheet-manager.d.ts.map +0 -1
- package/dist/types/src/testing/playwright/sheet.spec.d.ts.map +0 -1
- package/src/testing/playwright/playwright.config.cts +0 -18
- /package/dist/lib/browser/{chunk-D3G4UGEK.mjs.map → chunk-6AKBCBL4.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-IR42IS3F.mjs.map → chunk-KJWZUQVA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-Y6ND5HWX.mjs.map → chunk-3K5VNYOF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-IQ76YE6M.mjs.map → chunk-6SK5LJ5S.mjs.map} +0 -0
- /package/dist/types/src/{testing/playwright → playwright}/sheet.spec.d.ts +0 -0
- /package/src/extensions/editor/{extension.ts → sheet-extension.ts} +0 -0
|
@@ -4,25 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
-
import { Capabilities, contributes, createResolver
|
|
10
|
+
import { Capabilities, IntentPlugin, contributes, createResolver } from '@dxos/app-framework';
|
|
11
11
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
12
|
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
13
13
|
import { fullyQualifiedId, useSpace } from '@dxos/react-client/echo';
|
|
14
14
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
15
|
import { AttendableContainer } from '@dxos/react-ui-attention';
|
|
16
16
|
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
17
|
-
import {
|
|
17
|
+
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
18
18
|
|
|
19
|
-
import { SheetContainer } from './SheetContainer';
|
|
20
19
|
import { createTestCells, useTestSheet, withComputeGraphDecorator } from '../../testing';
|
|
21
|
-
import translations from '../../translations';
|
|
20
|
+
import { translations } from '../../translations';
|
|
22
21
|
import { SheetAction, SheetType } from '../../types';
|
|
23
22
|
import { useComputeGraph } from '../ComputeGraph';
|
|
24
23
|
import { RangeList } from '../RangeList';
|
|
25
24
|
|
|
25
|
+
import { SheetContainer } from './SheetContainer';
|
|
26
|
+
|
|
26
27
|
export const Basic = () => {
|
|
27
28
|
const space = useSpace();
|
|
28
29
|
const graph = useComputeGraph(space);
|
|
@@ -58,7 +59,7 @@ export const Spec = () => {
|
|
|
58
59
|
);
|
|
59
60
|
};
|
|
60
61
|
|
|
61
|
-
const meta
|
|
62
|
+
const meta = {
|
|
62
63
|
title: 'plugins/plugin-sheet/SheetContainer',
|
|
63
64
|
component: SheetContainer,
|
|
64
65
|
decorators: [
|
|
@@ -84,6 +85,8 @@ const meta: Meta = {
|
|
|
84
85
|
}),
|
|
85
86
|
],
|
|
86
87
|
parameters: { translations },
|
|
87
|
-
}
|
|
88
|
+
} satisfies Meta<typeof SheetContainer>;
|
|
88
89
|
|
|
89
90
|
export default meta;
|
|
91
|
+
|
|
92
|
+
type Story = StoryObj<typeof meta>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { type Space, fullyQualifiedId } from '@dxos/react-client/echo';
|
|
8
8
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
9
9
|
|
|
10
10
|
import { type SheetType } from '../../types';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, createContext, useCallback, useContext, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type CellAddress, type CellRange, type CompleteCellRange, type ComputeGraph } from '@dxos/compute';
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
10
|
import {
|
|
@@ -4,26 +4,29 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
11
11
|
|
|
12
|
+
import { translations } from '../../translations';
|
|
13
|
+
|
|
12
14
|
import { SheetToolbar } from './SheetToolbar';
|
|
13
|
-
import translations from '../../translations';
|
|
14
15
|
|
|
15
16
|
const DefaultStory = () => {
|
|
16
17
|
return <SheetToolbar id='test' />;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const meta: Meta = {
|
|
20
|
+
const meta = {
|
|
22
21
|
title: 'plugins/plugin-sheet/Toolbar',
|
|
23
|
-
component: SheetToolbar,
|
|
22
|
+
component: SheetToolbar as any,
|
|
24
23
|
render: DefaultStory,
|
|
25
24
|
decorators: [withTheme, withLayout()],
|
|
26
25
|
parameters: { translations, layout: 'fullscreen' },
|
|
27
|
-
}
|
|
26
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
28
27
|
|
|
29
28
|
export default meta;
|
|
29
|
+
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
|
|
32
|
+
export const Default: Story = {};
|
|
@@ -9,21 +9,20 @@ import { useAppGraph } from '@dxos/app-framework';
|
|
|
9
9
|
import { type CompleteCellRange } from '@dxos/compute';
|
|
10
10
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
11
11
|
import {
|
|
12
|
-
type ActionGraphEdges,
|
|
13
|
-
type ActionGraphNodes,
|
|
14
12
|
type ActionGraphProps,
|
|
15
|
-
createGapSeparator,
|
|
16
13
|
MenuProvider,
|
|
17
|
-
rxFromSignal,
|
|
18
14
|
ToolbarMenu,
|
|
15
|
+
createGapSeparator,
|
|
16
|
+
rxFromSignal,
|
|
19
17
|
useMenuActions,
|
|
20
18
|
} from '@dxos/react-ui-menu';
|
|
21
19
|
|
|
20
|
+
import { type SheetModel } from '../../model';
|
|
21
|
+
import { useSheetContext } from '../SheetContext';
|
|
22
|
+
|
|
22
23
|
import { createAlign, useAlignState } from './align';
|
|
23
24
|
import { createStyle, useStyleState } from './style';
|
|
24
25
|
import { type ToolbarState, useToolbarState } from './useToolbarState';
|
|
25
|
-
import { type SheetModel } from '../../model';
|
|
26
|
-
import { useSheetContext } from '../SheetContext';
|
|
27
26
|
|
|
28
27
|
//
|
|
29
28
|
// Root
|
|
@@ -36,22 +35,24 @@ const createToolbarActions = (
|
|
|
36
35
|
state: ToolbarState,
|
|
37
36
|
cursorFallbackRange?: CompleteCellRange,
|
|
38
37
|
customActions?: Rx.Rx<ActionGraphProps>,
|
|
39
|
-
) => {
|
|
38
|
+
): Rx.Rx<ActionGraphProps> => {
|
|
40
39
|
return Rx.make((get) => {
|
|
41
40
|
const align = get(rxFromSignal(() => createAlign(model, state, cursorFallbackRange)));
|
|
42
41
|
const style = get(rxFromSignal(() => createStyle(model, state, cursorFallbackRange)));
|
|
43
42
|
const gap = createGapSeparator();
|
|
44
|
-
|
|
45
|
-
const
|
|
43
|
+
|
|
44
|
+
const graph: ActionGraphProps = {
|
|
45
|
+
nodes: [...align.nodes, ...style.nodes, ...gap.nodes],
|
|
46
|
+
edges: [...align.edges, ...style.edges, ...gap.edges],
|
|
47
|
+
};
|
|
48
|
+
|
|
46
49
|
if (customActions) {
|
|
47
50
|
const custom = get(customActions);
|
|
48
|
-
nodes.push(...custom.nodes);
|
|
49
|
-
edges.push(...custom.edges);
|
|
51
|
+
graph.nodes.push(...custom.nodes);
|
|
52
|
+
graph.edges.push(...custom.edges);
|
|
50
53
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
edges,
|
|
54
|
-
};
|
|
54
|
+
|
|
55
|
+
return graph;
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
58
|
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type CompleteCellRange, inRange } from '@dxos/compute';
|
|
8
|
-
import { createMenuAction, createMenuItemGroup
|
|
8
|
+
import { type ToolbarMenuActionGroupProperties, createMenuAction, createMenuItemGroup } from '@dxos/react-ui-menu';
|
|
9
9
|
|
|
10
|
-
import { type ToolbarState } from './useToolbarState';
|
|
11
10
|
import { SHEET_PLUGIN } from '../../meta';
|
|
12
11
|
import { type SheetModel } from '../../model';
|
|
13
|
-
import { type AlignKey,
|
|
12
|
+
import { type AlignKey, type AlignValue, alignKey, rangeFromIndex, rangeToIndex } from '../../types';
|
|
14
13
|
import { useSheetContext } from '../SheetContext';
|
|
15
14
|
|
|
15
|
+
import { type ToolbarState } from './useToolbarState';
|
|
16
|
+
|
|
16
17
|
export type AlignAction = { key: AlignKey; value: AlignValue };
|
|
17
18
|
|
|
18
19
|
export type AlignState = { [alignKey]: AlignValue | undefined };
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type CompleteCellRange, inRange } from '@dxos/compute';
|
|
8
|
-
import { createMenuAction, createMenuItemGroup
|
|
8
|
+
import { type ToolbarMenuActionGroupProperties, createMenuAction, createMenuItemGroup } from '@dxos/react-ui-menu';
|
|
9
9
|
|
|
10
10
|
import { SHEET_PLUGIN } from '../../meta';
|
|
11
11
|
import { type SheetModel } from '../../model';
|
|
12
|
-
import {
|
|
12
|
+
import { type StyleKey, type StyleValue, rangeFromIndex, rangeToIndex } from '../../types';
|
|
13
13
|
import { useSheetContext } from '../SheetContext';
|
|
14
14
|
|
|
15
15
|
export type StyleState = Partial<Record<StyleValue, boolean>>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { useEffect, useMemo } from 'react';
|
|
9
9
|
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
@@ -19,15 +19,16 @@ import {
|
|
|
19
19
|
documentId,
|
|
20
20
|
useTextEditor,
|
|
21
21
|
} from '@dxos/react-ui-editor';
|
|
22
|
-
import {
|
|
22
|
+
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
23
23
|
import { isNonNullable } from '@dxos/util';
|
|
24
24
|
|
|
25
|
-
import { compute, computeGraphFacet } from './compute';
|
|
26
25
|
import { GridSheet, SheetProvider, useComputeGraph } from '../components';
|
|
27
26
|
import { useSheetModel } from '../model';
|
|
28
27
|
import { useTestSheet, withComputeGraphDecorator } from '../testing';
|
|
29
28
|
import { SheetType } from '../types';
|
|
30
29
|
|
|
30
|
+
import { compute, computeGraphFacet } from './compute';
|
|
31
|
+
|
|
31
32
|
const str = (...lines: string[]) => lines.join('\n');
|
|
32
33
|
|
|
33
34
|
type EditorProps = {
|
|
@@ -51,7 +52,7 @@ const EditorStory = ({ text }: EditorProps) => {
|
|
|
51
52
|
initialValue: text,
|
|
52
53
|
extensions: [
|
|
53
54
|
createBasicExtensions(),
|
|
54
|
-
createMarkdownExtensions(
|
|
55
|
+
createMarkdownExtensions(),
|
|
55
56
|
createThemeExtensions({ themeMode, syntaxHighlighting: true }),
|
|
56
57
|
documentId.of(id.toHex()),
|
|
57
58
|
computeGraph && computeGraphFacet.of(computeGraph),
|
|
@@ -98,8 +99,21 @@ const GraphStory = (props: EditorProps) => {
|
|
|
98
99
|
);
|
|
99
100
|
};
|
|
100
101
|
|
|
102
|
+
const meta = {
|
|
103
|
+
title: 'plugins/plugin-sheet/extensions',
|
|
104
|
+
decorators: [
|
|
105
|
+
withClientProvider({ types: [SheetType], createIdentity: true, createSpace: true }),
|
|
106
|
+
withComputeGraphDecorator(),
|
|
107
|
+
withTheme,
|
|
108
|
+
withLayout({ fullscreen: true, classNames: 'justify-center' }),
|
|
109
|
+
],
|
|
110
|
+
parameters: { layout: 'fullscreen' },
|
|
111
|
+
} satisfies Meta;
|
|
112
|
+
|
|
113
|
+
export default meta;
|
|
114
|
+
|
|
101
115
|
// TODO(burdon): Inline formulae.
|
|
102
|
-
export const Default = {
|
|
116
|
+
export const Default: StoryObj<typeof EditorStory> = {
|
|
103
117
|
render: EditorStory,
|
|
104
118
|
args: {
|
|
105
119
|
text: str(
|
|
@@ -123,7 +137,7 @@ export const Default = {
|
|
|
123
137
|
},
|
|
124
138
|
};
|
|
125
139
|
|
|
126
|
-
export const Graph = {
|
|
140
|
+
export const Graph: StoryObj<typeof GraphStory> = {
|
|
127
141
|
render: GraphStory,
|
|
128
142
|
args: {
|
|
129
143
|
text: str(
|
|
@@ -140,16 +154,3 @@ export const Graph = {
|
|
|
140
154
|
),
|
|
141
155
|
},
|
|
142
156
|
};
|
|
143
|
-
|
|
144
|
-
const meta: Meta = {
|
|
145
|
-
title: 'plugins/plugin-sheet/extensions',
|
|
146
|
-
decorators: [
|
|
147
|
-
withClientProvider({ types: [SheetType], createIdentity: true, createSpace: true }),
|
|
148
|
-
withComputeGraphDecorator(),
|
|
149
|
-
withTheme,
|
|
150
|
-
withLayout({ fullscreen: true, classNames: 'justify-center' }),
|
|
151
|
-
],
|
|
152
|
-
parameters: { layout: 'fullscreen' },
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export default meta;
|
|
@@ -16,11 +16,11 @@ import { Decoration, EditorView, ViewPlugin, WidgetType } from '@codemirror/view
|
|
|
16
16
|
|
|
17
17
|
import { type CleanupFn, debounce } from '@dxos/async';
|
|
18
18
|
import {
|
|
19
|
-
createSheetName,
|
|
20
19
|
type CellAddress,
|
|
21
20
|
type CellScalarValue,
|
|
22
21
|
type ComputeGraph,
|
|
23
22
|
type ComputeNode,
|
|
23
|
+
createSheetName,
|
|
24
24
|
} from '@dxos/compute';
|
|
25
25
|
import { invariant } from '@dxos/invariant';
|
|
26
26
|
import { documentId, singleValueFacet } from '@dxos/react-ui-editor';
|
|
@@ -34,7 +34,7 @@ export const computeGraphFacet = singleValueFacet<ComputeGraph>();
|
|
|
34
34
|
|
|
35
35
|
export type ComputeOptions = {};
|
|
36
36
|
|
|
37
|
-
export const compute = (
|
|
37
|
+
export const compute = (_options: ComputeOptions = {}): Extension => {
|
|
38
38
|
let computeNode: ComputeNode | undefined;
|
|
39
39
|
|
|
40
40
|
const update = (state: EditorState, current?: RangeSet<Decoration>) => {
|
|
@@ -53,7 +53,6 @@ export const compute = (options: ComputeOptions = {}): Extension => {
|
|
|
53
53
|
const text = node.node.getChild('CodeText');
|
|
54
54
|
if (type === LANGUAGE_TAG && text) {
|
|
55
55
|
const formula = state.sliceDoc(text.from, text.to);
|
|
56
|
-
|
|
57
56
|
const iter = current?.iter(node.node.from);
|
|
58
57
|
if (iter?.value && iter?.value.spec.formula === formula) {
|
|
59
58
|
// Add existing widget.
|
|
@@ -10,7 +10,7 @@ import { describe, expect, test } from 'vitest';
|
|
|
10
10
|
|
|
11
11
|
import { defaultFunctions } from '@dxos/compute';
|
|
12
12
|
|
|
13
|
-
import { sheetExtension } from './extension';
|
|
13
|
+
import { sheetExtension } from './sheet-extension';
|
|
14
14
|
|
|
15
15
|
describe('formula parser', () => {
|
|
16
16
|
const {
|
|
@@ -6,20 +6,20 @@ import { Schema, pipe } from 'effect';
|
|
|
6
6
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
+
LayoutAction,
|
|
10
|
+
chain,
|
|
9
11
|
createIntent,
|
|
10
12
|
createResolver,
|
|
11
|
-
LayoutAction,
|
|
12
|
-
useIntentResolver,
|
|
13
13
|
useIntentDispatcher,
|
|
14
|
-
|
|
14
|
+
useIntentResolver,
|
|
15
15
|
} from '@dxos/app-framework';
|
|
16
16
|
import { debounce } from '@dxos/async';
|
|
17
17
|
import { type CellAddress, type CompleteCellRange, inRange } from '@dxos/compute';
|
|
18
18
|
import { Obj, Relation } from '@dxos/echo';
|
|
19
19
|
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
20
20
|
import { ThreadAction, ThreadType } from '@dxos/plugin-thread/types';
|
|
21
|
-
import { Filter, fullyQualifiedId, getSpace,
|
|
22
|
-
import { type DxGridElement, type
|
|
21
|
+
import { Filter, Query, fullyQualifiedId, getSpace, useQuery } from '@dxos/react-client/echo';
|
|
22
|
+
import { type DxGridElement, type GridContentProps } from '@dxos/react-ui-grid';
|
|
23
23
|
import { AnchoredTo } from '@dxos/schema';
|
|
24
24
|
|
|
25
25
|
import { useSheetContext } from '../components';
|
|
@@ -111,13 +111,14 @@ export const useSelectThreadOnCellFocus = () => {
|
|
|
111
111
|
);
|
|
112
112
|
|
|
113
113
|
const debounced = useMemo(() => {
|
|
114
|
-
return debounce((cellCoords:
|
|
114
|
+
return debounce((cellCoords: CellAddress) => requestAnimationFrame(() => selectClosestThread(cellCoords)), 50);
|
|
115
115
|
}, [selectClosestThread]);
|
|
116
116
|
|
|
117
117
|
useEffect(() => {
|
|
118
118
|
if (!cursor) {
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
+
|
|
121
122
|
debounced(cursor);
|
|
122
123
|
}, [cursor, debounced]);
|
|
123
124
|
};
|
|
@@ -10,9 +10,10 @@ import { TestBuilder, testFunctionPlugins } from '@dxos/compute/testing';
|
|
|
10
10
|
import { FunctionType } from '@dxos/functions';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
12
|
|
|
13
|
+
import { createSheet, mapFormulaIndicesToRefs, mapFormulaRefsToIndices } from '../types';
|
|
14
|
+
|
|
13
15
|
import { SheetModel } from './sheet-model';
|
|
14
16
|
import { createTestGrid } from './testing';
|
|
15
|
-
import { createSheet, mapFormulaIndicesToRefs, mapFormulaRefsToIndices } from '../types';
|
|
16
17
|
|
|
17
18
|
describe('SheetModel', () => {
|
|
18
19
|
let testBuilder: TestBuilder;
|
package/src/model/sheet-model.ts
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import { Event } from '@dxos/async';
|
|
6
6
|
import {
|
|
7
|
-
addressFromA1Notation,
|
|
8
|
-
addressToA1Notation,
|
|
9
|
-
createSheetName,
|
|
10
|
-
isFormula,
|
|
11
7
|
type CellAddress,
|
|
12
8
|
type CellRange,
|
|
13
9
|
type CellScalarValue,
|
|
@@ -16,10 +12,14 @@ import {
|
|
|
16
12
|
type ComputeNodeEvent,
|
|
17
13
|
DetailedCellError,
|
|
18
14
|
ExportedCellChange,
|
|
19
|
-
type SimpleCellRange,
|
|
20
15
|
type SimpleCellAddress,
|
|
16
|
+
type SimpleCellRange,
|
|
21
17
|
type SimpleDate,
|
|
22
18
|
type SimpleDateTime,
|
|
19
|
+
addressFromA1Notation,
|
|
20
|
+
addressToA1Notation,
|
|
21
|
+
createSheetName,
|
|
22
|
+
isFormula,
|
|
23
23
|
} from '@dxos/compute';
|
|
24
24
|
import { Resource } from '@dxos/context';
|
|
25
25
|
import { Obj } from '@dxos/echo';
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
mapFormulaIndicesToRefs,
|
|
40
40
|
mapFormulaRefsToIndices,
|
|
41
41
|
} from '../types';
|
|
42
|
-
import { type
|
|
42
|
+
import { type CellValue, type SheetAction, type SheetType } from '../types';
|
|
43
43
|
|
|
44
44
|
// TODO(burdon): Move to compute.
|
|
45
45
|
// Map sheet types to system types.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { defineConfig } from '@playwright/test';
|
|
6
|
+
|
|
7
|
+
import { e2ePreset } from '@dxos/test-utils/playwright';
|
|
8
|
+
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
...e2ePreset(import.meta.dirname),
|
|
11
|
+
// TODO(wittjosiah): Avoid hard-coding ports.
|
|
12
|
+
webServer: {
|
|
13
|
+
command: 'moon run storybook:serve-e2e -- --port=9005',
|
|
14
|
+
port: 9005,
|
|
15
|
+
reuseExistingServer: false,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type Locator, type Page } from '@playwright/test';
|
|
6
6
|
|
|
7
7
|
import { DxGridManager } from '@dxos/lit-grid/testing';
|
|
8
|
-
import { type
|
|
8
|
+
import { type DxGridAxis, type DxGridPosition } from '@dxos/react-ui-grid';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Test helper for managing dx-grid interactions and assertions in Playwright tests.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { expect, test
|
|
5
|
+
import { type Page, expect, test } from '@playwright/test';
|
|
6
6
|
|
|
7
7
|
import { faker } from '@dxos/random';
|
|
8
8
|
import { setupPage, storybookUrl } from '@dxos/test-utils/playwright';
|
|
@@ -15,7 +15,7 @@ test.describe('plugin-sheet', () => {
|
|
|
15
15
|
|
|
16
16
|
test.beforeEach(async ({ browser }) => {
|
|
17
17
|
const setup = await setupPage(browser, {
|
|
18
|
-
url: storybookUrl('plugins-plugin-sheet-sheetcontainer--spec'),
|
|
18
|
+
url: storybookUrl('plugins-plugin-sheet-sheetcontainer--spec', 9005),
|
|
19
19
|
});
|
|
20
20
|
page = setup.page;
|
|
21
21
|
sheet = new SheetManager(page);
|
package/src/sanity.test.ts
CHANGED
package/src/testing/testing.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import { type Space } from '@dxos/react-client/echo';
|
|
|
10
10
|
import { useAsyncState } from '@dxos/react-hooks';
|
|
11
11
|
|
|
12
12
|
import { ComputeGraphContextProvider } from '../components';
|
|
13
|
-
import {
|
|
13
|
+
import { type CreateSheetOptions, createSheet } from '../types';
|
|
14
14
|
|
|
15
15
|
export const useTestSheet = (space?: Space, graph?: ComputeGraph, options?: CreateSheetOptions) => {
|
|
16
16
|
const [sheet] = useAsyncState(async () => {
|
package/src/translations.ts
CHANGED
|
@@ -2,22 +2,24 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { meta } from './meta';
|
|
8
8
|
import { SheetType } from './types';
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export const translations = [
|
|
11
11
|
{
|
|
12
12
|
'en-US': {
|
|
13
|
-
[
|
|
13
|
+
[SheetType.typename]: {
|
|
14
14
|
'typename label': 'Sheet',
|
|
15
15
|
'typename label_zero': 'Sheets',
|
|
16
16
|
'typename label_one': 'Sheet',
|
|
17
17
|
'typename label_other': 'Sheets',
|
|
18
18
|
'object name placeholder': 'New sheet',
|
|
19
|
+
'rename object label': 'Rename sheet',
|
|
20
|
+
'delete object label': 'Delete sheet',
|
|
19
21
|
},
|
|
20
|
-
[
|
|
22
|
+
[meta.id]: {
|
|
21
23
|
'plugin name': 'Sheets',
|
|
22
24
|
'cell placeholder': 'Cell value...',
|
|
23
25
|
'range key alignment label': 'Align',
|
|
@@ -47,4 +49,4 @@ export default [
|
|
|
47
49
|
},
|
|
48
50
|
},
|
|
49
51
|
},
|
|
50
|
-
] as const;
|
|
52
|
+
] as const satisfies Resource[];
|
package/src/types/schema.ts
CHANGED
package/src/types/types.ts
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
|
|
7
|
-
import { type CellValue, RowColumnMeta, SheetType } from './schema';
|
|
8
7
|
import { SHEET_PLUGIN } from '../meta';
|
|
9
8
|
import { SheetModel } from '../model';
|
|
10
9
|
|
|
10
|
+
import { type CellValue, RowColumnMeta, SheetType } from './schema';
|
|
11
|
+
|
|
11
12
|
export type SheetSize = {
|
|
12
13
|
rows: number;
|
|
13
14
|
columns: number;
|
package/src/types/util.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
addressFromA1Notation,
|
|
7
|
-
addressToA1Notation,
|
|
8
|
-
isFormula,
|
|
9
6
|
type CellAddress,
|
|
10
7
|
type CellRange,
|
|
11
8
|
type CompleteCellRange,
|
|
9
|
+
addressFromA1Notation,
|
|
10
|
+
addressToA1Notation,
|
|
11
|
+
isFormula,
|
|
12
12
|
} from '@dxos/compute';
|
|
13
13
|
import { randomBytes } from '@dxos/crypto';
|
|
14
14
|
import { Obj } from '@dxos/echo';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/SheetContainer/SheetContainer.tsx", "../../../src/components/FunctionEditor/FunctionEditor.tsx", "../../../src/components/SheetToolbar/SheetToolbar.tsx", "../../../src/components/SheetToolbar/align.ts", "../../../src/components/SheetToolbar/style.ts", "../../../src/components/SheetToolbar/useToolbarState.ts", "../../../src/components/SheetContainer/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { fullyQualifiedId, 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 { SheetToolbar } from '../SheetToolbar';\n\nexport type SheetContainerProps = {\n space: Space;\n sheet: SheetType;\n role?: string;\n ignoreAttention?: boolean;\n};\n\nexport const SheetContainer = ({ space, sheet, role, ignoreAttention }: SheetContainerProps) => {\n const graph = useComputeGraph(space);\n\n return graph ? (\n <SheetProvider sheet={sheet} graph={graph} ignoreAttention={ignoreAttention}>\n <StackItem.Content toolbar statusbar {...(role === 'section' && { classNames: 'aspect-video' })}>\n <SheetToolbar id={fullyQualifiedId(sheet)} />\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 { addressToA1Notation, isFormula, rangeToA1Notation } from '@dxos/compute';\nimport { Icon } from '@dxos/react-ui';\n\nimport { mapFormulaIndicesToRefs } from '../../types';\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(mapFormulaIndicesToRefs(model.sheet, value));\n formula = true;\n } else if (value != null) {\n value = String(value);\n }\n }\n\n return (\n <div className='flex shrink-0 justify-between items-center px-4 py-1 text-sm bg-toolbarSurface border-bs !border-subduedSeparator'>\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 { Rx } from '@effect-rx/rx-react';\nimport React, { type PropsWithChildren, useMemo } from 'react';\n\nimport { useAppGraph } from '@dxos/app-framework';\nimport { type CompleteCellRange } from '@dxos/compute';\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport {\n type ActionGraphEdges,\n type ActionGraphNodes,\n type ActionGraphProps,\n createGapSeparator,\n MenuProvider,\n rxFromSignal,\n ToolbarMenu,\n useMenuActions,\n} from '@dxos/react-ui-menu';\n\nimport { createAlign, useAlignState } from './align';\nimport { createStyle, useStyleState } from './style';\nimport { type ToolbarState, useToolbarState } from './useToolbarState';\nimport { type SheetModel } from '../../model';\nimport { useSheetContext } from '../SheetContext';\n\n//\n// Root\n//\n\nexport type SheetToolbarProps = ThemedClassName<PropsWithChildren<{ id: string }>>;\n\nconst createToolbarActions = (\n model: SheetModel,\n state: ToolbarState,\n cursorFallbackRange?: CompleteCellRange,\n customActions?: Rx.Rx<ActionGraphProps>,\n) => {\n return Rx.make((get) => {\n const align = get(rxFromSignal(() => createAlign(model, state, cursorFallbackRange)));\n const style = get(rxFromSignal(() => createStyle(model, state, cursorFallbackRange)));\n const gap = createGapSeparator();\n const nodes: ActionGraphNodes = [...align.nodes, ...style.nodes, ...gap.nodes];\n const edges: ActionGraphEdges = [...align.edges, ...style.edges, ...gap.edges];\n if (customActions) {\n const custom = get(customActions);\n nodes.push(...custom.nodes);\n edges.push(...custom.edges);\n }\n return {\n nodes,\n edges,\n };\n });\n};\n\nexport const SheetToolbar = ({ id, classNames }: SheetToolbarProps) => {\n const { model, cursorFallbackRange } = useSheetContext();\n const state = useToolbarState({});\n useAlignState(state);\n useStyleState(state);\n\n const { graph } = useAppGraph();\n const customActions = useMemo(() => {\n return Rx.make((get) => {\n const actions = get(graph.actions(id));\n const nodes = actions.filter((action) => action.properties.disposition === 'toolbar');\n return { nodes, edges: nodes.map((node) => ({ source: 'root', target: node.id })) };\n });\n }, [graph]);\n\n const actionsCreator = useMemo(\n () => createToolbarActions(model, state, cursorFallbackRange, customActions),\n [model, state, cursorFallbackRange, customActions],\n );\n const menu = useMenuActions(actionsCreator);\n\n return (\n <MenuProvider {...menu} attendableId={id}>\n <ToolbarMenu classNames={classNames} />\n </MenuProvider>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { type CompleteCellRange, inRange } from '@dxos/compute';\nimport { createMenuAction, createMenuItemGroup, type ToolbarMenuActionGroupProperties } from '@dxos/react-ui-menu';\n\nimport { type ToolbarState } from './useToolbarState';\nimport { SHEET_PLUGIN } from '../../meta';\nimport { type SheetModel } from '../../model';\nimport { type AlignKey, alignKey, type AlignValue, rangeFromIndex, rangeToIndex } from '../../types';\nimport { useSheetContext } from '../SheetContext';\n\nexport type AlignAction = { key: AlignKey; value: AlignValue };\n\nexport type AlignState = { [alignKey]: AlignValue | undefined };\n\nconst aligns: Record<AlignValue, string> = {\n start: 'ph--text-align-left--regular',\n center: 'ph--text-align-center--regular',\n end: 'ph--text-align-right--regular',\n};\n\nexport const useAlignState = (state: Partial<AlignState>) => {\n const { cursor, model } = useSheetContext();\n useEffect(() => {\n // TODO(thure): Can this O(n) call be memoized?\n state[alignKey] = (\n cursor\n ? model.sheet.ranges?.findLast(\n ({ range, key }) => key === alignKey && inRange(rangeFromIndex(model.sheet, range), cursor),\n )?.value\n : undefined\n ) as AlignValue | undefined;\n }, [cursor, model.sheet]);\n};\n\nconst createAlignGroupAction = (value?: AlignValue) =>\n createMenuItemGroup('align', {\n label: ['align label', { ns: SHEET_PLUGIN }],\n variant: 'toggleGroup',\n selectCardinality: 'single',\n value: `${alignKey}--${value}`,\n } as ToolbarMenuActionGroupProperties);\n\nconst createAlignActions = (model: SheetModel, state: ToolbarState, cursorFallbackRange?: CompleteCellRange) =>\n Object.entries(aligns).map(([alignValue, icon]) => {\n return createMenuAction<AlignAction>(\n `${alignKey}--${alignValue}`,\n () => {\n if (!cursorFallbackRange) {\n return;\n }\n const index =\n model.sheet.ranges?.findIndex(\n (range) =>\n range.key === alignKey && inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n ) ?? -1;\n const nextRangeEntity = {\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: alignKey,\n value: alignValue as AlignValue,\n };\n if (index < 0) {\n model.sheet.ranges?.push(nextRangeEntity);\n state[alignKey] = nextRangeEntity.value;\n } else if (model.sheet.ranges![index].value === nextRangeEntity.value) {\n model.sheet.ranges?.splice(index, 1);\n state[alignKey] = undefined;\n } else {\n model.sheet.ranges?.splice(index, 1, nextRangeEntity);\n state[alignKey] = nextRangeEntity.value;\n }\n },\n {\n key: alignKey,\n value: alignValue as AlignValue,\n checked: state[alignKey] === alignValue,\n label: [`range value ${alignValue} label`, { ns: SHEET_PLUGIN }],\n icon,\n testId: `grid.toolbar.${alignKey}.${alignValue}`,\n },\n );\n });\n\nexport const createAlign = (model: SheetModel, state: ToolbarState, cursorFallbackRange?: CompleteCellRange) => {\n const alignGroup = createAlignGroupAction(state[alignKey]);\n const alignActions = createAlignActions(model, state, cursorFallbackRange);\n return {\n nodes: [alignGroup, ...alignActions],\n edges: [\n { source: 'root', target: 'align' },\n ...alignActions.map(({ id }) => ({ source: alignGroup.id, target: id })),\n ],\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { type CompleteCellRange, inRange } from '@dxos/compute';\nimport { createMenuAction, createMenuItemGroup, type ToolbarMenuActionGroupProperties } from '@dxos/react-ui-menu';\n\nimport { SHEET_PLUGIN } from '../../meta';\nimport { type SheetModel } from '../../model';\nimport { rangeFromIndex, rangeToIndex, type StyleKey, type StyleValue } from '../../types';\nimport { useSheetContext } from '../SheetContext';\n\nexport type StyleState = Partial<Record<StyleValue, boolean>>;\n\nexport type StyleAction = { key: StyleKey; value: StyleValue };\n\nconst styles: Record<StyleValue, string> = {\n highlight: 'ph--highlighter--regular',\n softwrap: 'ph--paragraph--regular',\n};\n\nexport const useStyleState = (state: StyleState) => {\n const { cursorFallbackRange, model } = useSheetContext();\n\n useEffect(() => {\n state.highlight = false;\n state.softwrap = false;\n if (cursorFallbackRange && model.sheet.ranges) {\n model.sheet.ranges\n .filter(\n ({ range, key }) => key === 'style' && inRange(rangeFromIndex(model.sheet, range), cursorFallbackRange.from),\n )\n .forEach(({ value }) => {\n state[value as StyleValue] = true;\n });\n }\n }, [cursorFallbackRange, model.sheet]);\n};\n\nconst createStyleGroup = (state: StyleState) => {\n return createMenuItemGroup('style', {\n variant: 'toggleGroup',\n selectCardinality: 'multiple',\n value: Object.keys(styles)\n .filter((key) => !!state[key as StyleValue])\n .map((styleValue) => `style--${styleValue}`),\n } as ToolbarMenuActionGroupProperties);\n};\n\nconst createStyleActions = (model: SheetModel, state: StyleState, cursorFallbackRange?: CompleteCellRange) =>\n Object.entries(styles).map(([styleValue, icon]) => {\n return createMenuAction<StyleAction>(\n `style--${styleValue}`,\n () => {\n if (!cursorFallbackRange) {\n return;\n }\n const index =\n model.sheet.ranges?.findIndex(\n (range) =>\n range.key === 'style' && inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n ) ?? -1;\n const nextRangeEntity = {\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: 'style',\n value: styleValue as StyleValue,\n };\n if (\n model.sheet.ranges\n .filter(\n ({ range, key: rangeKey }) =>\n rangeKey === 'style' && inRange(rangeFromIndex(model.sheet, range), cursorFallbackRange.from),\n )\n .some(({ value: rangeValue }) => rangeValue === styleValue)\n ) {\n // this value should be unset\n if (index >= 0) {\n model.sheet.ranges?.splice(index, 1);\n }\n state[nextRangeEntity.value] = false;\n } else {\n model.sheet.ranges?.push(nextRangeEntity);\n state[nextRangeEntity.value] = true;\n }\n },\n {\n key: 'style',\n value: styleValue as StyleValue,\n icon,\n label: [`range value ${styleValue} label`, { ns: SHEET_PLUGIN }],\n checked: !!state[styleValue as StyleValue],\n },\n );\n });\n\nexport const createStyle = (model: SheetModel, state: StyleState, cursorFallbackRange?: CompleteCellRange) => {\n const styleGroupAction = createStyleGroup(state);\n const styleActions = createStyleActions(model, state, cursorFallbackRange);\n return {\n nodes: [styleGroupAction, ...styleActions],\n edges: [\n { source: 'root', target: 'style' },\n ...styleActions.map(({ id }) => ({ source: styleGroupAction.id, target: id })),\n ],\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { live } from '@dxos/live-object';\n\nimport { type AlignState } from './align';\nimport { type StyleState } from './style';\n\nexport type ToolbarState = Partial<StyleState & AlignState>;\n\nexport const useToolbarState = (initialState: ToolbarState = {}) => {\n return useMemo(() => live<ToolbarState>(initialState), []);\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { SheetContainer } from './SheetContainer';\n\nexport default SheetContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,wBAAoC;AAC7C,SAASC,iBAAiB;;;;ACH1B,OAAOC,WAAW;AAElB,SAASC,qBAAqBC,WAAWC,yBAAyB;AAClE,SAASC,YAAY;AAKd,IAAMC,iBAAiB,MAAA;;;AAC5B,UAAM,EAAEC,OAAOC,QAAQC,MAAK,IAAKC,gBAAAA;AAEjC,QAAIC;AACJ,QAAIC,UAAU;AACd,QAAIJ,QAAQ;AACVG,cAAQJ,MAAMM,aAAaL,MAAAA;AAC3B,UAAIM,UAAUH,KAAAA,GAAQ;AACpBA,gBAAQJ,MAAMQ,MAAMC,yBAAyBC,wBAAwBV,MAAMW,OAAOP,KAAAA,CAAAA;AAClFC,kBAAU;MACZ,WAAWD,SAAS,MAAM;AACxBA,gBAAQQ,OAAOR,KAAAA;MACjB;IACF;AAEA,WACE,sBAAA,cAACS,OAAAA;MAAIC,WAAU;OACb,sBAAA,cAACD,OAAAA;MAAIC,WAAU;OACb,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;UAAElB;UAAOC,OAAOD,MAAMmB,IAAI,CAACC,UAAU;YAAEC,QAAQ;YAAQC,QAAQF,KAAKf;UAAG,EAAA;QAAI;MACpF,CAAA;IACF,GAAG;MAACM;KAAM;AAEV,UAAMY,iBAAiBV,SACrB,MAAM5B,qBAAqBC,OAAOC,OAAOC,qBAAqBC,aAAAA,GAC9D;MAACH;MAAOC;MAAOC;MAAqBC;KAAc;AAEpD,UAAMmC,OAAOC,eAAeF,cAAAA;AAE5B,WACE,gBAAAG,OAAA,cAACC,cAAAA;MAAc,GAAGH;MAAMI,cAAcvB;OACpC,gBAAAqB,OAAA,cAACG,aAAAA;MAAYvB;;;;;AAGnB;;;AF5DO,IAAMwB,iBAAiB,CAAC,EAAEC,OAAOC,OAAOC,MAAMC,gBAAe,MAAuB;;;AACzF,UAAMC,QAAQC,gBAAgBL,KAAAA;AAE9B,WAAOI,QACL,gBAAAE,OAAA,cAACC,eAAAA;MAAcN;MAAcG;MAAcD;OACzC,gBAAAG,OAAA,cAACE,UAAUC,SAAO;MAACC,SAAAA;MAAQC,WAAAA;MAAW,GAAIT,SAAS,aAAa;QAAEU,YAAY;MAAe;OAC3F,gBAAAN,OAAA,cAACO,cAAAA;MAAaC,IAAIC,iBAAiBd,KAAAA;QACnC,gBAAAK,OAAA,cAACU,WAAAA,IAAAA,GACD,gBAAAV,OAAA,cAACW,gBAAAA,IAAAA,CAAAA,CAAAA,IAGH;;;;AACN;;;AM7BA,IAAA,yBAAeC;",
|
|
6
|
-
"names": ["React", "fullyQualifiedId", "StackItem", "React", "addressToA1Notation", "isFormula", "rangeToA1Notation", "Icon", "FunctionEditor", "model", "cursor", "range", "useSheetContext", "value", "formula", "getCellValue", "isFormula", "graph", "mapFunctionBindingFromId", "mapFormulaIndicesToRefs", "sheet", "String", "div", "className", "rangeToA1Notation", "addressToA1Notation", "Icon", "icon", "classNames", "span", "Rx", "React", "useMemo", "useAppGraph", "createGapSeparator", "MenuProvider", "rxFromSignal", "ToolbarMenu", "useMenuActions", "useEffect", "inRange", "createMenuAction", "createMenuItemGroup", "aligns", "start", "center", "end", "useAlignState", "state", "cursor", "model", "useSheetContext", "useEffect", "alignKey", "sheet", "ranges", "findLast", "range", "key", "inRange", "rangeFromIndex", "value", "undefined", "createAlignGroupAction", "createMenuItemGroup", "label", "ns", "SHEET_PLUGIN", "variant", "selectCardinality", "createAlignActions", "cursorFallbackRange", "Object", "entries", "map", "alignValue", "icon", "createMenuAction", "index", "findIndex", "from", "nextRangeEntity", "rangeToIndex", "push", "splice", "checked", "testId", "createAlign", "alignGroup", "alignActions", "nodes", "edges", "source", "target", "id", "useEffect", "inRange", "createMenuAction", "createMenuItemGroup", "styles", "highlight", "softwrap", "useStyleState", "state", "cursorFallbackRange", "model", "useSheetContext", "useEffect", "sheet", "ranges", "filter", "range", "key", "inRange", "rangeFromIndex", "from", "forEach", "value", "createStyleGroup", "createMenuItemGroup", "variant", "selectCardinality", "Object", "keys", "map", "styleValue", "createStyleActions", "entries", "icon", "createMenuAction", "index", "findIndex", "nextRangeEntity", "rangeToIndex", "rangeKey", "some", "rangeValue", "splice", "push", "label", "ns", "SHEET_PLUGIN", "checked", "createStyle", "styleGroupAction", "styleActions", "nodes", "edges", "source", "target", "id", "useMemo", "live", "useToolbarState", "initialState", "useMemo", "live", "createToolbarActions", "model", "state", "cursorFallbackRange", "customActions", "Rx", "make", "get", "align", "rxFromSignal", "createAlign", "style", "createStyle", "gap", "createGapSeparator", "nodes", "edges", "custom", "push", "SheetToolbar", "id", "classNames", "useSheetContext", "useToolbarState", "useAlignState", "useStyleState", "graph", "useAppGraph", "useMemo", "actions", "filter", "action", "properties", "disposition", "map", "node", "source", "target", "actionsCreator", "menu", "useMenuActions", "React", "MenuProvider", "attendableId", "ToolbarMenu", "SheetContainer", "space", "sheet", "role", "ignoreAttention", "graph", "useComputeGraph", "React", "SheetProvider", "StackItem", "Content", "toolbar", "statusbar", "classNames", "SheetToolbar", "id", "fullyQualifiedId", "GridSheet", "FunctionEditor", "SheetContainer"]
|
|
7
|
-
}
|