@dxos/plugin-sheet 0.9.0 → 0.9.1-main.c7dcc2e112
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/neutral/{RangeList-HYB5S6KQ.mjs → RangeList-7NS3MU5O.mjs} +23 -16
- package/dist/lib/neutral/RangeList-7NS3MU5O.mjs.map +7 -0
- package/dist/lib/neutral/{SheetArticle-5AJRM3V3.mjs → SheetArticle-IUPQYGUU.mjs} +3 -2
- package/dist/lib/neutral/SheetArticle-IUPQYGUU.mjs.map +7 -0
- package/dist/lib/neutral/SheetPlugin.mjs +2 -2
- package/dist/lib/neutral/SheetPlugin.mjs.map +4 -4
- package/dist/lib/neutral/{app-graph-builder-2QP6GYB2.mjs → app-graph-builder-PXTENKOB.mjs} +3 -4
- package/dist/lib/neutral/app-graph-builder-PXTENKOB.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +5 -5
- package/dist/lib/neutral/capabilities/index.mjs.map +2 -2
- package/dist/lib/neutral/{chunk-KUWATEHB.mjs → chunk-2EZJRMC4.mjs} +4 -4
- package/dist/lib/neutral/{chunk-KUWATEHB.mjs.map → chunk-2EZJRMC4.mjs.map} +3 -3
- package/dist/lib/neutral/{chunk-S2UNH6VD.mjs → chunk-QT3L3OR2.mjs} +3 -3
- package/dist/lib/neutral/chunk-QT3L3OR2.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WTSCOM64.mjs +45 -0
- package/dist/lib/neutral/chunk-WTSCOM64.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZJEI77EI.mjs +8 -0
- package/dist/lib/neutral/components/index.mjs +7 -7
- package/dist/lib/neutral/components/index.mjs.map +3 -3
- package/dist/lib/neutral/containers/index.mjs +2 -2
- package/dist/lib/neutral/{create-object-TDQQ24IB.mjs → create-object-RR5OBY5H.mjs} +2 -2
- package/dist/lib/neutral/{drop-axis-WSWFOLQN.mjs → drop-axis-PRINKF5X.mjs} +2 -2
- package/dist/lib/neutral/index.mjs +4 -4
- package/dist/lib/neutral/{insert-axis-6UQJTIWC.mjs → insert-axis-FCSVF6OW.mjs} +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{navigation-resolver-FXEZYO7G.mjs → navigation-resolver-F5LR3IIW.mjs} +3 -3
- package/dist/lib/neutral/navigation-resolver-F5LR3IIW.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/{react-surface-4H3PC4WG.mjs → react-surface-TJT6F2E4.mjs} +2 -6
- package/dist/lib/neutral/react-surface-TJT6F2E4.mjs.map +7 -0
- package/dist/lib/neutral/{restore-axis-AMMVTPS3.mjs → restore-axis-2RUGHTNA.mjs} +2 -2
- package/dist/lib/neutral/{scroll-to-anchor-FK2CXCQR.mjs → scroll-to-anchor-7BAFVTIM.mjs} +2 -2
- package/dist/lib/neutral/translations.mjs +1 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/lib/neutral/{undo-mappings-3FQLSTCZ.mjs → undo-mappings-O75AYIRG.mjs} +2 -2
- package/dist/lib/neutral/{undo-mappings-3FQLSTCZ.mjs.map → undo-mappings-O75AYIRG.mjs.map} +3 -3
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -16
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -1
- package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts +1 -1
- package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +28 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/paths.d.ts.map +1 -1
- package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +31 -0
- package/package.json +46 -45
- package/src/SheetPlugin.test.ts +1 -1
- package/src/SheetPlugin.tsx +1 -1
- package/src/capabilities/app-graph-builder.ts +1 -3
- package/src/capabilities/index.ts +1 -7
- package/src/capabilities/navigation-resolver.ts +5 -2
- package/src/capabilities/react-surface.tsx +4 -5
- package/src/capabilities/undo-mappings.ts +1 -1
- package/src/components/SheetContent/SheetContent.tsx +1 -1
- package/src/components/SheetContent/util.ts +3 -3
- package/src/components/SheetToolbar/align.ts +2 -2
- package/src/components/SheetToolbar/style.ts +1 -1
- package/src/containers/RangeList/RangeList.tsx +35 -19
- package/src/containers/SheetArticle/SheetArticle.tsx +2 -2
- package/src/meta.ts +2 -24
- package/src/paths.ts +2 -2
- package/src/translations.ts +1 -1
- package/src/types/SheetCapabilities.ts +2 -2
- package/src/types/SheetOperation.ts +1 -1
- package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +0 -7
- package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-2QP6GYB2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BGR7FVNF.mjs +0 -8
- package/dist/lib/neutral/chunk-FQHTXKMF.mjs +0 -34
- package/dist/lib/neutral/chunk-FQHTXKMF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-S2UNH6VD.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-FXEZYO7G.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-4H3PC4WG.mjs.map +0 -7
- /package/dist/lib/neutral/{chunk-BGR7FVNF.mjs.map → chunk-ZJEI77EI.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-object-TDQQ24IB.mjs.map → create-object-RR5OBY5H.mjs.map} +0 -0
- /package/dist/lib/neutral/{drop-axis-WSWFOLQN.mjs.map → drop-axis-PRINKF5X.mjs.map} +0 -0
- /package/dist/lib/neutral/{insert-axis-6UQJTIWC.mjs.map → insert-axis-FCSVF6OW.mjs.map} +0 -0
- /package/dist/lib/neutral/{restore-axis-AMMVTPS3.mjs.map → restore-axis-2RUGHTNA.mjs.map} +0 -0
- /package/dist/lib/neutral/{scroll-to-anchor-FK2CXCQR.mjs.map → scroll-to-anchor-7BAFVTIM.mjs.map} +0 -0
package/dx.config.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Config2 } from '@dxos/app-framework/config';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
export default Config2.make({
|
|
9
|
+
plugin: {
|
|
10
|
+
key: 'org.dxos.plugin.sheet',
|
|
11
|
+
name: 'Sheet',
|
|
12
|
+
author: 'DXOS',
|
|
13
|
+
description: trim`
|
|
14
|
+
Full-featured spreadsheet for DXOS Composer backed by ECHO for local-first, real-time collaborative editing.
|
|
15
|
+
Cells, row/column metadata, and range-based formatting are all stored as ECHO objects and replicated to peers instantly.
|
|
16
|
+
|
|
17
|
+
Formula evaluation is powered by HyperFormula, providing over 400 built-in functions covering arithmetic, statistics,
|
|
18
|
+
text manipulation, date/time, financial, and logical operations. Formulas are stored with internal cell indices and
|
|
19
|
+
translated to A1-notation on display, keeping references stable across row and column insertions.
|
|
20
|
+
|
|
21
|
+
The plugin integrates with plugin-markdown to expose formula results inside document fenced code blocks, and
|
|
22
|
+
contributes anchor-navigation support so other plugins can scroll and highlight specific cell ranges by DXN reference.
|
|
23
|
+
AI agents can invoke sheet operations — insert/drop axes, scroll to anchor, and read or write cell values — through
|
|
24
|
+
the standard operations framework.
|
|
25
|
+
`,
|
|
26
|
+
icon: { key: 'ph--grid-nine--regular', hue: 'indigo' },
|
|
27
|
+
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-sheet',
|
|
28
|
+
spec: 'PLUGIN.mdl',
|
|
29
|
+
screenshots: [{ dark: 'https://dxos.network/plugin-details-sheet-dark.png' }],
|
|
30
|
+
},
|
|
31
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-sheet",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1-main.c7dcc2e112",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"types": "dist/types/src/index.d.ts",
|
|
83
83
|
"files": [
|
|
84
84
|
"dist",
|
|
85
|
+
"dx.config.ts",
|
|
85
86
|
"src",
|
|
86
87
|
"PLUGIN.mdl"
|
|
87
88
|
],
|
|
@@ -93,38 +94,38 @@
|
|
|
93
94
|
"@lezer/common": "^1.5.2",
|
|
94
95
|
"@lezer/highlight": "^1.2.3",
|
|
95
96
|
"codemirror-lang-spreadsheet": "^1.3.0",
|
|
96
|
-
"@dxos/app-framework": "0.9.
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/compute-hyperformula": "0.9.
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/echo": "0.9.
|
|
106
|
-
"@dxos/echo
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/plugin-
|
|
114
|
-
"@dxos/plugin-comments": "0.9.
|
|
115
|
-
"@dxos/plugin-space": "0.9.
|
|
116
|
-
"@dxos/react-client": "0.9.
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/react-
|
|
119
|
-
"@dxos/react-
|
|
120
|
-
"@dxos/react-ui-
|
|
121
|
-
"@dxos/react-ui-
|
|
122
|
-
"@dxos/react-ui-
|
|
123
|
-
"@dxos/react-ui-
|
|
124
|
-
"@dxos/react-ui-
|
|
125
|
-
"@dxos/
|
|
126
|
-
"@dxos/
|
|
127
|
-
"@dxos/util": "0.9.
|
|
97
|
+
"@dxos/app-framework": "0.9.1-main.c7dcc2e112",
|
|
98
|
+
"@dxos/app-toolkit": "0.9.1-main.c7dcc2e112",
|
|
99
|
+
"@dxos/client": "0.9.1-main.c7dcc2e112",
|
|
100
|
+
"@dxos/compute": "0.9.1-main.c7dcc2e112",
|
|
101
|
+
"@dxos/async": "0.9.1-main.c7dcc2e112",
|
|
102
|
+
"@dxos/context": "0.9.1-main.c7dcc2e112",
|
|
103
|
+
"@dxos/compute-hyperformula": "0.9.1-main.c7dcc2e112",
|
|
104
|
+
"@dxos/debug": "0.9.1-main.c7dcc2e112",
|
|
105
|
+
"@dxos/echo-client": "0.9.1-main.c7dcc2e112",
|
|
106
|
+
"@dxos/echo-react": "0.9.1-main.c7dcc2e112",
|
|
107
|
+
"@dxos/echo": "0.9.1-main.c7dcc2e112",
|
|
108
|
+
"@dxos/invariant": "0.9.1-main.c7dcc2e112",
|
|
109
|
+
"@dxos/keys": "0.9.1-main.c7dcc2e112",
|
|
110
|
+
"@dxos/log": "0.9.1-main.c7dcc2e112",
|
|
111
|
+
"@dxos/plugin-client": "0.9.1-main.c7dcc2e112",
|
|
112
|
+
"@dxos/plugin-graph": "0.9.1-main.c7dcc2e112",
|
|
113
|
+
"@dxos/lit-grid": "0.9.1-main.c7dcc2e112",
|
|
114
|
+
"@dxos/plugin-markdown": "0.9.1-main.c7dcc2e112",
|
|
115
|
+
"@dxos/plugin-comments": "0.9.1-main.c7dcc2e112",
|
|
116
|
+
"@dxos/plugin-space": "0.9.1-main.c7dcc2e112",
|
|
117
|
+
"@dxos/react-client": "0.9.1-main.c7dcc2e112",
|
|
118
|
+
"@dxos/crypto": "0.9.1-main.c7dcc2e112",
|
|
119
|
+
"@dxos/react-ui-attention": "0.9.1-main.c7dcc2e112",
|
|
120
|
+
"@dxos/react-hooks": "0.9.1-main.c7dcc2e112",
|
|
121
|
+
"@dxos/react-ui-editor": "0.9.1-main.c7dcc2e112",
|
|
122
|
+
"@dxos/react-ui-grid": "0.9.1-main.c7dcc2e112",
|
|
123
|
+
"@dxos/react-ui-form": "0.9.1-main.c7dcc2e112",
|
|
124
|
+
"@dxos/react-ui-menu": "0.9.1-main.c7dcc2e112",
|
|
125
|
+
"@dxos/react-ui-list": "0.9.1-main.c7dcc2e112",
|
|
126
|
+
"@dxos/ui-editor": "0.9.1-main.c7dcc2e112",
|
|
127
|
+
"@dxos/types": "0.9.1-main.c7dcc2e112",
|
|
128
|
+
"@dxos/util": "0.9.1-main.c7dcc2e112"
|
|
128
129
|
},
|
|
129
130
|
"devDependencies": {
|
|
130
131
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -138,16 +139,16 @@
|
|
|
138
139
|
"react": "~19.2.3",
|
|
139
140
|
"react-dom": "~19.2.3",
|
|
140
141
|
"vite": "^8.0.16",
|
|
141
|
-
"@dxos/
|
|
142
|
-
"@dxos/
|
|
143
|
-
"@dxos/
|
|
144
|
-
"@dxos/
|
|
145
|
-
"@dxos/
|
|
146
|
-
"@dxos/
|
|
147
|
-
"@dxos/
|
|
148
|
-
"@dxos/test-utils": "0.9.
|
|
149
|
-
"@dxos/ui-theme": "0.9.
|
|
150
|
-
"@dxos/ui-types": "0.9.
|
|
142
|
+
"@dxos/lit-grid": "0.9.1-main.c7dcc2e112",
|
|
143
|
+
"@dxos/echo-generator": "0.9.1-main.c7dcc2e112",
|
|
144
|
+
"@dxos/random": "0.9.1-main.c7dcc2e112",
|
|
145
|
+
"@dxos/react-ui-syntax-highlighter": "0.9.1-main.c7dcc2e112",
|
|
146
|
+
"@dxos/plugin-testing": "0.9.1-main.c7dcc2e112",
|
|
147
|
+
"@dxos/react-ui": "0.9.1-main.c7dcc2e112",
|
|
148
|
+
"@dxos/storybook-utils": "0.9.1-main.c7dcc2e112",
|
|
149
|
+
"@dxos/test-utils": "0.9.1-main.c7dcc2e112",
|
|
150
|
+
"@dxos/ui-theme": "0.9.1-main.c7dcc2e112",
|
|
151
|
+
"@dxos/ui-types": "0.9.1-main.c7dcc2e112"
|
|
151
152
|
},
|
|
152
153
|
"peerDependencies": {
|
|
153
154
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -155,8 +156,8 @@
|
|
|
155
156
|
"effect": "3.21.3",
|
|
156
157
|
"react": "~19.2.3",
|
|
157
158
|
"react-dom": "~19.2.3",
|
|
158
|
-
"@dxos/react-ui": "0.9.
|
|
159
|
-
"@dxos/ui-theme": "0.9.
|
|
159
|
+
"@dxos/react-ui": "0.9.1-main.c7dcc2e112",
|
|
160
|
+
"@dxos/ui-theme": "0.9.1-main.c7dcc2e112"
|
|
160
161
|
},
|
|
161
162
|
"publishConfig": {
|
|
162
163
|
"access": "public"
|
package/src/SheetPlugin.test.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { SheetPlugin } from '#plugin';
|
|
|
12
12
|
|
|
13
13
|
import { meta } from './meta';
|
|
14
14
|
|
|
15
|
-
const moduleId = (name: string) => `${meta.
|
|
15
|
+
const moduleId = (name: string) => `${meta.profile.key}.module.${name}`;
|
|
16
16
|
|
|
17
17
|
describe('SheetPlugin', () => {
|
|
18
18
|
test('modules activate on the expected events', async ({ expect }) => {
|
package/src/SheetPlugin.tsx
CHANGED
|
@@ -55,7 +55,7 @@ export const SheetPlugin = Plugin.define(meta).pipe(
|
|
|
55
55
|
activate: AnchorSort,
|
|
56
56
|
}),
|
|
57
57
|
AppPlugin.addPluginAssetModule({
|
|
58
|
-
asset: { pluginId: meta.
|
|
58
|
+
asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
59
59
|
}),
|
|
60
60
|
Plugin.make,
|
|
61
61
|
);
|
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import * as Option from 'effect/Option';
|
|
7
7
|
|
|
8
8
|
import { Capability } from '@dxos/app-framework';
|
|
9
|
-
import { AppCapabilities, LayoutOperation
|
|
9
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
10
10
|
import { isSpace } from '@dxos/client/echo';
|
|
11
11
|
import { Operation } from '@dxos/compute';
|
|
12
12
|
import { Type } from '@dxos/echo';
|
|
@@ -22,8 +22,6 @@ const sheetTypename = Type.getTypename(Sheet.Sheet);
|
|
|
22
22
|
export default Capability.makeModule(
|
|
23
23
|
Effect.fnUntraced(function* () {
|
|
24
24
|
const extensions = yield* Effect.all([
|
|
25
|
-
createTypeSectionExtension(Sheet.Sheet),
|
|
26
|
-
|
|
27
25
|
GraphBuilder.createExtension({
|
|
28
26
|
id: 'sheetsSectionActions',
|
|
29
27
|
match: (node) => {
|
|
@@ -3,18 +3,12 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
7
6
|
import { OperationHandlerSet } from '@dxos/compute';
|
|
8
7
|
|
|
9
8
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
10
9
|
export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
|
|
11
10
|
export const AnchorSort = Capability.lazy('AnchorSort', () => import('./anchor-sort'));
|
|
12
|
-
|
|
13
|
-
// wrapper needs an explicit annotation to keep the inferred type portable (TS2883).
|
|
14
|
-
export const CommentConfig: Capability.LazyCapability<
|
|
15
|
-
void,
|
|
16
|
-
Capability.Capability<typeof AppCapabilities.CommentConfig>
|
|
17
|
-
> = Capability.lazy('CommentConfig', () => import('./comment-config'));
|
|
11
|
+
export const CommentConfig = Capability.lazy('CommentConfig', () => import('./comment-config'));
|
|
18
12
|
export const ComputeGraphRegistry = Capability.lazy('ComputeGraphRegistry', () => import('./compute-graph-registry'));
|
|
19
13
|
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
20
14
|
export const Markdown = Capability.lazy('MarkdownExtension', () => import('./markdown-extension'));
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { AppCapabilities,
|
|
8
|
+
import { AppCapabilities, TypeSection } from '@dxos/app-toolkit';
|
|
9
9
|
|
|
10
10
|
import { Sheet } from '#types';
|
|
11
11
|
|
|
12
12
|
export default Capability.makeModule(
|
|
13
13
|
Effect.fnUntraced(function* () {
|
|
14
|
-
return Capability.contributes(
|
|
14
|
+
return Capability.contributes(
|
|
15
|
+
AppCapabilities.NavigationPathResolver,
|
|
16
|
+
TypeSection.createTypeSectionPathResolver(Sheet.Sheet),
|
|
17
|
+
);
|
|
15
18
|
}),
|
|
16
19
|
);
|
|
@@ -20,11 +20,10 @@ export default Capability.makeModule(() =>
|
|
|
20
20
|
Surface.create({
|
|
21
21
|
id: 'sheet',
|
|
22
22
|
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
!!Obj.getDatabase(data.subject),
|
|
23
|
+
filter: AppSurface.oneOf(
|
|
24
|
+
AppSurface.object(AppSurface.Article, Sheet.Sheet, (data) => !!Obj.getDatabase(data.subject)),
|
|
25
|
+
AppSurface.object(AppSurface.Section, Sheet.Sheet, (data) => !!Obj.getDatabase(data.subject)),
|
|
26
|
+
),
|
|
28
27
|
component: ({ data, role }) => {
|
|
29
28
|
const computeGraphRegistry = useCapability(SheetCapabilities.ComputeGraphRegistry);
|
|
30
29
|
|
|
@@ -75,7 +75,7 @@ const sheetRowDefault = {
|
|
|
75
75
|
export type SheetContentProps = {};
|
|
76
76
|
|
|
77
77
|
export const SheetContent = composable<HTMLDivElement, SheetContentProps>((props, forwardedRef) => {
|
|
78
|
-
const { t } = useTranslation(meta.
|
|
78
|
+
const { t } = useTranslation(meta.profile.key);
|
|
79
79
|
const {
|
|
80
80
|
id,
|
|
81
81
|
attendableId,
|
|
@@ -97,13 +97,13 @@ const gridCellGetter = (model: SheetModel) => {
|
|
|
97
97
|
|
|
98
98
|
export const rowLabelCell = (row: number) => ({
|
|
99
99
|
value: rowToA1Notation(row),
|
|
100
|
-
className: '
|
|
100
|
+
className: 'bg-axis-surface! text-axis-text text-end pe-1',
|
|
101
101
|
resizeHandle: 'row',
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
export const colLabelCell = (col: number) => ({
|
|
105
105
|
value: colToA1Notation(col),
|
|
106
|
-
className: '
|
|
106
|
+
className: 'bg-axis-surface! text-axis-text',
|
|
107
107
|
resizeHandle: 'col',
|
|
108
108
|
});
|
|
109
109
|
|
|
@@ -115,7 +115,7 @@ const cellGetter = (model: SheetModel) => {
|
|
|
115
115
|
return getGridCells(nextBounds);
|
|
116
116
|
case 'fixedStartStart': {
|
|
117
117
|
return {
|
|
118
|
-
'0,0': { className: '
|
|
118
|
+
'0,0': { className: 'bg-axis-surface!' },
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
case 'frozenColsStart':
|
|
@@ -50,7 +50,7 @@ export const useAlignState = (stateAtom: ToolbarStateAtom) => {
|
|
|
50
50
|
|
|
51
51
|
const createAlignGroupAction = (value?: AlignValue) =>
|
|
52
52
|
createMenuItemGroup('align', {
|
|
53
|
-
label: ['align.label', { ns: meta.
|
|
53
|
+
label: ['align.label', { ns: meta.profile.key }],
|
|
54
54
|
variant: 'toggleGroup',
|
|
55
55
|
selectCardinality: 'single',
|
|
56
56
|
value: `${alignKey}--${value}`,
|
|
@@ -104,7 +104,7 @@ const createAlignActions = ({ model, state, stateAtom, registry, cursorFallbackR
|
|
|
104
104
|
key: alignKey,
|
|
105
105
|
value: alignValue as AlignValue,
|
|
106
106
|
checked: state[alignKey] === alignValue,
|
|
107
|
-
label: [`range-value.${alignValue}.label`, { ns: meta.
|
|
107
|
+
label: [`range-value.${alignValue}.label`, { ns: meta.profile.key }],
|
|
108
108
|
icon,
|
|
109
109
|
testId: `grid.toolbar.${alignKey}.${alignValue}`,
|
|
110
110
|
},
|
|
@@ -119,7 +119,7 @@ const createStyleActions = ({ model, state, stateAtom, registry, cursorFallbackR
|
|
|
119
119
|
key: 'style',
|
|
120
120
|
value: styleValue as StyleValue,
|
|
121
121
|
icon,
|
|
122
|
-
label: [`range-value.${styleValue}.label`, { ns: meta.
|
|
122
|
+
label: [`range-value.${styleValue}.label`, { ns: meta.profile.key }],
|
|
123
123
|
checked: !!state[styleValue as StyleValue],
|
|
124
124
|
},
|
|
125
125
|
);
|
|
@@ -8,7 +8,7 @@ import React, { useCallback } from 'react';
|
|
|
8
8
|
import { rangeToA1Notation } from '@dxos/compute-hyperformula';
|
|
9
9
|
import { useObject } from '@dxos/echo-react';
|
|
10
10
|
import { Input, Message, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import {
|
|
11
|
+
import { OrderedList } from '@dxos/react-ui-list';
|
|
12
12
|
|
|
13
13
|
import { meta } from '#meta';
|
|
14
14
|
import { rangeFromIndex } from '#types';
|
|
@@ -19,7 +19,7 @@ export type RangeListProps = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export const RangeList = ({ sheet: sheetProp }: RangeListProps) => {
|
|
22
|
-
const { t } = useTranslation(meta.
|
|
22
|
+
const { t } = useTranslation(meta.profile.key);
|
|
23
23
|
const [sheet, updateSheet] = useObject(sheetProp);
|
|
24
24
|
// TODO(thure): Implement similar to comments, #8121
|
|
25
25
|
const handleSelectRange = (range: Sheet.Range) => {};
|
|
@@ -42,23 +42,39 @@ export const RangeList = ({ sheet: sheetProp }: RangeListProps) => {
|
|
|
42
42
|
<Message.Title>{t('no-ranges.message')}</Message.Title>
|
|
43
43
|
</Message.Root>
|
|
44
44
|
) : (
|
|
45
|
-
<
|
|
46
|
-
{({ items: ranges }) =>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
<OrderedList.Root<Sheet.Range> items={sheet.ranges} isItem={Schema.is(Sheet.Range)}>
|
|
46
|
+
{({ items: ranges }) => (
|
|
47
|
+
<OrderedList.Content>
|
|
48
|
+
{ranges.map((range) => {
|
|
49
|
+
// Use the range's underlying cell range string as the stable id so deletes /
|
|
50
|
+
// re-renders don't shift row identity by array position. Reorder is not
|
|
51
|
+
// wired (DX-8121); add `OrderedList.DragHandle` + a real id strategy when it
|
|
52
|
+
// lands. We avoid `OrderedList.Title` because there's no disclosure panel
|
|
53
|
+
// for it to control here.
|
|
54
|
+
const id = range.range;
|
|
55
|
+
return (
|
|
56
|
+
<OrderedList.Item
|
|
57
|
+
key={id}
|
|
58
|
+
id={id}
|
|
59
|
+
item={range}
|
|
60
|
+
hover
|
|
61
|
+
classNames='flex items-center cursor-pointer'
|
|
62
|
+
onClick={() => handleSelectRange(range)}
|
|
63
|
+
>
|
|
64
|
+
<div className='flex grow items-center truncate px-2'>
|
|
65
|
+
{t('range.title', {
|
|
66
|
+
position: rangeToA1Notation(rangeFromIndex(sheetProp, range.range)),
|
|
67
|
+
key: t(`range-key.${range.key}.label`),
|
|
68
|
+
value: t(`range-value.${range.value}.label`),
|
|
69
|
+
})}
|
|
70
|
+
</div>
|
|
71
|
+
<OrderedList.DeleteButton onClick={() => handleDeleteRange(range)} />
|
|
72
|
+
</OrderedList.Item>
|
|
73
|
+
);
|
|
74
|
+
})}
|
|
75
|
+
</OrderedList.Content>
|
|
76
|
+
)}
|
|
77
|
+
</OrderedList.Root>
|
|
62
78
|
)}
|
|
63
79
|
</>
|
|
64
80
|
);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
8
|
import { type ComputeGraphRegistry } from '@dxos/compute-hyperformula';
|
|
9
9
|
import { type Space } from '@dxos/react-client/echo';
|
|
10
10
|
import { Panel } from '@dxos/react-ui';
|
|
@@ -41,7 +41,7 @@ const SheetArticleInner = ({
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<Sheet.Root graph={graph} sheet={sheet} attendableId={attendableId!} ignoreAttention={ignoreAttention}>
|
|
44
|
-
<Panel.Root classNames={role ===
|
|
44
|
+
<Panel.Root classNames={role === AppSurface.Section.role && 'aspect-square'}>
|
|
45
45
|
<Panel.Toolbar asChild>
|
|
46
46
|
<Sheet.Toolbar />
|
|
47
47
|
</Panel.Toolbar>
|
package/src/meta.ts
CHANGED
|
@@ -3,29 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
|
-
import { DXN } from '@dxos/keys';
|
|
7
|
-
import { trim } from '@dxos/util';
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
key: DXN.make('org.dxos.plugin.sheet'),
|
|
11
|
-
name: 'Sheet',
|
|
12
|
-
author: 'DXOS',
|
|
13
|
-
description: trim`
|
|
14
|
-
Full-featured spreadsheet for DXOS Composer backed by ECHO for local-first, real-time collaborative editing.
|
|
15
|
-
Cells, row/column metadata, and range-based formatting are all stored as ECHO objects and replicated to peers instantly.
|
|
7
|
+
import config from '../dx.config';
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
text manipulation, date/time, financial, and logical operations. Formulas are stored with internal cell indices and
|
|
19
|
-
translated to A1-notation on display, keeping references stable across row and column insertions.
|
|
20
|
-
|
|
21
|
-
The plugin integrates with plugin-markdown to expose formula results inside document fenced code blocks, and
|
|
22
|
-
contributes anchor-navigation support so other plugins can scroll and highlight specific cell ranges by DXN reference.
|
|
23
|
-
AI agents can invoke sheet operations — insert/drop axes, scroll to anchor, and read or write cell values — through
|
|
24
|
-
the standard operations framework.
|
|
25
|
-
`,
|
|
26
|
-
icon: 'ph--grid-nine--regular',
|
|
27
|
-
iconHue: 'indigo',
|
|
28
|
-
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-sheet',
|
|
29
|
-
spec: 'PLUGIN.mdl',
|
|
30
|
-
screenshots: ['https://dxos.network/plugin-details-sheet-dark.png'],
|
|
31
|
-
});
|
|
9
|
+
export const meta = Plugin.getMetaFromConfig(config);
|
package/src/paths.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Paths } from '@dxos/app-toolkit';
|
|
6
6
|
|
|
7
7
|
import { Sheet } from '#types';
|
|
8
8
|
|
|
9
|
-
const { getSectionPath: getSheetsPath, getObjectPath: getSheetPath } = createTypeSectionPaths(Sheet.Sheet);
|
|
9
|
+
const { getSectionPath: getSheetsPath, getObjectPath: getSheetPath } = Paths.createTypeSectionPaths(Sheet.Sheet);
|
|
10
10
|
|
|
11
11
|
export { getSheetsPath, getSheetPath };
|
package/src/translations.ts
CHANGED
|
@@ -19,8 +19,8 @@ export type GridRegistry = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export const ComputeGraphRegistry = Capability.make<ComputeGraphRegistryType>(
|
|
22
|
-
`${meta.
|
|
22
|
+
`${meta.profile.key}.capability.compute-graph-registry`,
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
/** Registry of active grid instances keyed by attendable ID. */
|
|
26
|
-
export const GridInstances = Capability.make<GridRegistry>(`${meta.
|
|
26
|
+
export const GridInstances = Capability.make<GridRegistry>(`${meta.profile.key}.capability.grid-instances`);
|
|
@@ -12,7 +12,7 @@ import { DXN } from '@dxos/keys';
|
|
|
12
12
|
|
|
13
13
|
import { meta } from '#meta';
|
|
14
14
|
|
|
15
|
-
const makeKey = (name: string) => DXN.make(`${meta.
|
|
15
|
+
const makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);
|
|
16
16
|
|
|
17
17
|
// TODO(wittjosiah): Factor out. This is `DxGridAxis` from `@dxos/react-ui-grid`.
|
|
18
18
|
const Axis = Schema.Union(Schema.Literal('row'), Schema.Literal('col'));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/RangeList/RangeList.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback } from 'react';\n\nimport { rangeToA1Notation } from '@dxos/compute-hyperformula';\nimport { useObject } from '@dxos/echo-react';\nimport { Input, Message, useTranslation } from '@dxos/react-ui';\nimport { List } from '@dxos/react-ui-list';\n\nimport { meta } from '#meta';\nimport { rangeFromIndex } from '#types';\nimport { Sheet } from '#types';\n\nexport type RangeListProps = {\n sheet: Sheet.Sheet;\n};\n\nexport const RangeList = ({ sheet: sheetProp }: RangeListProps) => {\n const { t } = useTranslation(meta.id);\n const [sheet, updateSheet] = useObject(sheetProp);\n // TODO(thure): Implement similar to comments, #8121\n const handleSelectRange = (range: Sheet.Range) => {};\n const handleDeleteRange = useCallback(\n (range: Sheet.Range) => {\n const index = sheet.ranges.findIndex((sheetRange) => sheetRange === range);\n updateSheet((sheet) => {\n sheet.ranges.splice(index, 1);\n });\n },\n [sheet, updateSheet],\n );\n return (\n <>\n <Input.Root>\n <Input.Label>{t('range-list.heading')}</Input.Label>\n </Input.Root>\n {sheet.ranges.length < 1 ? (\n <Message.Root>\n <Message.Title>{t('no-ranges.message')}</Message.Title>\n </Message.Root>\n ) : (\n <List.Root<Sheet.Range> items={sheet.ranges} isItem={Schema.is(Sheet.Range)}>\n {({ items: ranges }) =>\n ranges.map((range, i) => (\n <List.Item key={i} item={range}>\n <List.ItemDragHandle />\n <List.ItemTitle onClick={() => handleSelectRange(range)}>\n {t('range.title', {\n position: rangeToA1Notation(rangeFromIndex(sheetProp, range.range)),\n key: t(`range-key.${range.key}.label`),\n value: t(`range-value.${range.value}.label`),\n })}\n </List.ItemTitle>\n <List.ItemDeleteButton onClick={() => handleDeleteRange(range)} />\n </List.Item>\n ))\n }\n </List.Root>\n )}\n </>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,yBAAyB;AAClC,SAASC,iBAAiB;AAC1B,SAASC,OAAOC,SAASC,sBAAsB;AAC/C,SAASC,YAAY;AAErB,SAASC,YAAY;AACrB,SAASC,sBAAsB;AAC/B,SAASC,aAAa;AAMf,IAAMC,YAAY,CAAC,EAAEC,OAAOC,UAAS,MAAkB;AAC5D,QAAM,EAAEC,EAAC,IAAKR,eAAeE,KAAKO,EAAE;AACpC,QAAM,CAACH,OAAOI,WAAAA,IAAeb,UAAUU,SAAAA;AAEvC,QAAMI,oBAAoB,CAACC,UAAAA;EAAwB;AACnD,QAAMC,oBAAoBlB,YACxB,CAACiB,UAAAA;AACC,UAAME,QAAQR,MAAMS,OAAOC,UAAU,CAACC,eAAeA,eAAeL,KAAAA;AACpEF,gBAAY,CAACJ,WAAAA;AACXA,MAAAA,OAAMS,OAAOG,OAAOJ,OAAO,CAAA;IAC7B,CAAA;EACF,GACA;IAACR;IAAOI;GAAY;AAEtB,SACE,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAACZ,MAAMqB,MAAI,MACT,sBAAA,cAACrB,MAAMsB,OAAK,MAAEZ,EAAE,oBAAA,CAAA,CAAA,GAEjBF,MAAMS,OAAOM,SAAS,IACrB,sBAAA,cAACtB,QAAQoB,MAAI,MACX,sBAAA,cAACpB,QAAQuB,OAAK,MAAEd,EAAE,mBAAA,CAAA,CAAA,IAGpB,sBAAA,cAACP,KAAKkB,MAAI;IAAcI,OAAOjB,MAAMS;IAAQS,QAAeC,UAAGrB,MAAMsB,KAAK;KACvE,CAAC,EAAEH,OAAOR,OAAM,MACfA,OAAOY,IAAI,CAACf,OAAOgB,MACjB,sBAAA,cAAC3B,KAAK4B,MAAI;IAACC,KAAKF;IAAGG,MAAMnB;KACvB,sBAAA,cAACX,KAAK+B,gBAAc,IAAA,GACpB,sBAAA,cAAC/B,KAAKgC,WAAS;IAACC,SAAS,MAAMvB,kBAAkBC,KAAAA;KAC9CJ,EAAE,eAAe;IAChB2B,UAAUvC,kBAAkBO,eAAeI,WAAWK,MAAMA,KAAK,CAAA;IACjEkB,KAAKtB,EAAE,aAAaI,MAAMkB,GAAG,QAAQ;IACrCM,OAAO5B,EAAE,eAAeI,MAAMwB,KAAK,QAAQ;EAC7C,CAAA,CAAA,GAEF,sBAAA,cAACnC,KAAKoC,kBAAgB;IAACH,SAAS,MAAMrB,kBAAkBD,KAAAA;;AAQxE;",
|
|
6
|
-
"names": ["Schema", "React", "useCallback", "rangeToA1Notation", "useObject", "Input", "Message", "useTranslation", "List", "meta", "rangeFromIndex", "Sheet", "RangeList", "sheet", "sheetProp", "t", "id", "updateSheet", "handleSelectRange", "range", "handleDeleteRange", "index", "ranges", "findIndex", "sheetRange", "splice", "Root", "Label", "length", "Title", "items", "isItem", "is", "Range", "map", "i", "Item", "key", "item", "ItemDragHandle", "ItemTitle", "onClick", "position", "value", "ItemDeleteButton"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/SheetArticle/SheetArticle.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type ComputeGraphRegistry } from '@dxos/compute-hyperformula';\nimport { type Space } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\n\nimport { ComputeGraphContextProvider, Sheet, useComputeGraph } from '#components';\nimport { type Sheet as SheetType } from '#types';\n\nexport type SheetArticleProps = AppSurface.ObjectArticleProps<\n SheetType.Sheet,\n {\n space: Space;\n registry: ComputeGraphRegistry;\n ignoreAttention?: boolean;\n }\n>;\n\nexport const SheetArticle = ({ registry, ...props }: SheetArticleProps) => (\n <ComputeGraphContextProvider registry={registry}>\n <SheetArticleInner {...props} />\n </ComputeGraphContextProvider>\n);\n\nconst SheetArticleInner = ({\n role,\n subject: sheet,\n attendableId,\n space,\n ignoreAttention,\n}: Omit<SheetArticleProps, 'registry'>) => {\n const graph = useComputeGraph(space);\n if (!graph) {\n return null;\n }\n\n return (\n <Sheet.Root graph={graph} sheet={sheet} attendableId={attendableId!} ignoreAttention={ignoreAttention}>\n <Panel.Root classNames={role === 'section' && 'aspect-aquare'}>\n <Panel.Toolbar asChild>\n <Sheet.Toolbar />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Sheet.Content />\n </Panel.Content>\n <Panel.Statusbar asChild>\n <Sheet.Statusbar />\n </Panel.Statusbar>\n </Panel.Root>\n </Sheet.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,OAAOA,WAAW;AAKlB,SAASC,aAAa;AAEtB,SAASC,6BAA6BC,OAAOC,uBAAuB;AAY7D,IAAMC,eAAe,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAC1C,sBAAA,cAACL,6BAAAA;EAA4BI;GAC3B,sBAAA,cAACE,mBAAsBD,KAAAA,CAAAA;AAI3B,IAAMC,oBAAoB,CAAC,EACzBC,MACAC,SAASC,OACTC,cACAC,OACAC,gBAAe,MACqB;AACpC,QAAMC,QAAQX,gBAAgBS,KAAAA;AAC9B,MAAI,CAACE,OAAO;AACV,WAAO;EACT;AAEA,SACE,sBAAA,cAACZ,MAAMa,MAAI;IAACD;IAAcJ;IAAcC;IAA6BE;KACnE,sBAAA,cAACb,MAAMe,MAAI;IAACC,YAAYR,SAAS,aAAa;KAC5C,sBAAA,cAACR,MAAMiB,SAAO;IAACC,SAAAA;KACb,sBAAA,cAAChB,MAAMe,SAAO,IAAA,CAAA,GAEhB,sBAAA,cAACjB,MAAMmB,SAAO;IAACD,SAAAA;KACb,sBAAA,cAAChB,MAAMiB,SAAO,IAAA,CAAA,GAEhB,sBAAA,cAACnB,MAAMoB,WAAS;IAACF,SAAAA;KACf,sBAAA,cAAChB,MAAMkB,WAAS,IAAA,CAAA,CAAA,CAAA;AAK1B;",
|
|
6
|
-
"names": ["React", "Panel", "ComputeGraphContextProvider", "Sheet", "useComputeGraph", "SheetArticle", "registry", "props", "SheetArticleInner", "role", "subject", "sheet", "attendableId", "space", "ignoreAttention", "graph", "Root", "classNames", "Toolbar", "asChild", "Content", "Statusbar"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, LayoutOperation, createTypeSectionExtension } from '@dxos/app-toolkit';\nimport { isSpace } from '@dxos/client/echo';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { GraphBuilder, Node } from '@dxos/plugin-graph';\nimport { SpaceOperation } from '@dxos/plugin-space';\n\nimport { Sheet } from '#types';\n\nimport { getSheetsPath } from '../paths';\n\nconst sheetTypename = Type.getTypename(Sheet.Sheet);\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n createTypeSectionExtension(Sheet.Sheet),\n\n GraphBuilder.createExtension({\n id: 'sheetsSectionActions',\n match: (node) => {\n const space = isSpace(node.properties.space) ? node.properties.space : undefined;\n return node.type === sheetTypename && space ? Option.some(space) : Option.none();\n },\n actions: (space) =>\n Effect.succeed([\n Node.makeAction({\n id: 'create-sheet',\n data: () =>\n Effect.gen(function* () {\n const sheet = Sheet.make({});\n const { subject } = yield* Operation.invoke(\n SpaceOperation.AddObject,\n { object: sheet, target: space.db, hidden: true, targetNodeId: getSheetsPath(space.db.spaceId) },\n { spaceId: space.db.spaceId },\n );\n yield* Operation.invoke(\n LayoutOperation.Open,\n { subject: [...subject] },\n { spaceId: space.db.spaceId },\n );\n }),\n properties: {\n label: ['add-object.label', { ns: sheetTypename }],\n icon: 'ph--plus--regular',\n disposition: 'list-item-primary',\n },\n }),\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,iBAAiBC,kCAAkC;AAC7E,SAASC,eAAe;AACxB,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,cAAcC,YAAY;AACnC,SAASC,sBAAsB;AAE/B,SAASC,aAAa;AAItB,IAAMC,gBAAgBC,KAAKC,YAAYC,MAAMA,KAAK;AAElD,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCC,2BAA2BN,MAAMA,KAAK;IAEtCO,aAAaC,gBAAgB;MAC3BC,IAAI;MACJC,OAAO,CAACC,SAAAA;AACN,cAAMC,QAAQC,QAAQF,KAAKG,WAAWF,KAAK,IAAID,KAAKG,WAAWF,QAAQG;AACvE,eAAOJ,KAAKK,SAASnB,iBAAiBe,QAAeK,YAAKL,KAAAA,IAAgBM,YAAI;MAChF;MACAC,SAAS,CAACP,UACDQ,eAAQ;QACbC,KAAKC,WAAW;UACdb,IAAI;UACJc,MAAM,MACGC,WAAI,aAAA;AACT,kBAAMC,QAAQzB,MAAM0B,KAAK,CAAC,CAAA;AAC1B,kBAAM,EAAEC,QAAO,IAAK,OAAOC,UAAUC,OACnCC,eAAeC,WACf;cAAEC,QAAQP;cAAOQ,QAAQrB,MAAMsB;cAAIC,QAAQ;cAAMC,cAAcC,cAAczB,MAAMsB,GAAGI,OAAO;YAAE,GAC/F;cAAEA,SAAS1B,MAAMsB,GAAGI;YAAQ,CAAA;AAE9B,mBAAOV,UAAUC,OACfU,gBAAgBC,MAChB;cAAEb,SAAS;mBAAIA;;YAAS,GACxB;cAAEW,SAAS1B,MAAMsB,GAAGI;YAAQ,CAAA;UAEhC,CAAA;UACFxB,YAAY;YACV2B,OAAO;cAAC;cAAoB;gBAAEC,IAAI7C;cAAc;;YAChD8C,MAAM;YACNC,aAAa;UACf;QACF,CAAA;OACD;IACL,CAAA;GACD;AAED,SAAO3C,WAAW4C,YAAYC,gBAAgBC,iBAAiB3C,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Option", "Capability", "AppCapabilities", "LayoutOperation", "createTypeSectionExtension", "isSpace", "Operation", "Type", "GraphBuilder", "Node", "SpaceOperation", "Sheet", "sheetTypename", "Type", "getTypename", "Sheet", "Capability", "makeModule", "fnUntraced", "extensions", "all", "createTypeSectionExtension", "GraphBuilder", "createExtension", "id", "match", "node", "space", "isSpace", "properties", "undefined", "type", "some", "none", "actions", "succeed", "Node", "makeAction", "data", "gen", "sheet", "make", "subject", "Operation", "invoke", "SpaceOperation", "AddObject", "object", "target", "db", "hidden", "targetNodeId", "getSheetsPath", "spaceId", "LayoutOperation", "Open", "label", "ns", "icon", "disposition", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// src/operations/index.ts
|
|
2
|
-
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
-
var SheetOperationHandlerSet = OperationHandlerSet.lazy(() => import("./drop-axis-WSWFOLQN.mjs"), () => import("./insert-axis-6UQJTIWC.mjs"), () => import("./restore-axis-AMMVTPS3.mjs"), () => import("./scroll-to-anchor-FK2CXCQR.mjs"));
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
SheetOperationHandlerSet
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=chunk-BGR7FVNF.mjs.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { Plugin } from "@dxos/app-framework";
|
|
3
|
-
import { DXN } from "@dxos/keys";
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = Plugin.makeMeta({
|
|
6
|
-
key: DXN.make("org.dxos.plugin.sheet"),
|
|
7
|
-
name: "Sheet",
|
|
8
|
-
author: "DXOS",
|
|
9
|
-
description: trim`
|
|
10
|
-
Full-featured spreadsheet for DXOS Composer backed by ECHO for local-first, real-time collaborative editing.
|
|
11
|
-
Cells, row/column metadata, and range-based formatting are all stored as ECHO objects and replicated to peers instantly.
|
|
12
|
-
|
|
13
|
-
Formula evaluation is powered by HyperFormula, providing over 400 built-in functions covering arithmetic, statistics,
|
|
14
|
-
text manipulation, date/time, financial, and logical operations. Formulas are stored with internal cell indices and
|
|
15
|
-
translated to A1-notation on display, keeping references stable across row and column insertions.
|
|
16
|
-
|
|
17
|
-
The plugin integrates with plugin-markdown to expose formula results inside document fenced code blocks, and
|
|
18
|
-
contributes anchor-navigation support so other plugins can scroll and highlight specific cell ranges by DXN reference.
|
|
19
|
-
AI agents can invoke sheet operations — insert/drop axes, scroll to anchor, and read or write cell values — through
|
|
20
|
-
the standard operations framework.
|
|
21
|
-
`,
|
|
22
|
-
icon: "ph--grid-nine--regular",
|
|
23
|
-
iconHue: "indigo",
|
|
24
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-sheet",
|
|
25
|
-
spec: "PLUGIN.mdl",
|
|
26
|
-
screenshots: [
|
|
27
|
-
"https://dxos.network/plugin-details-sheet-dark.png"
|
|
28
|
-
]
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
meta
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=chunk-FQHTXKMF.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.sheet'),\n name: 'Sheet',\n author: 'DXOS',\n description: trim`\n Full-featured spreadsheet for DXOS Composer backed by ECHO for local-first, real-time collaborative editing.\n Cells, row/column metadata, and range-based formatting are all stored as ECHO objects and replicated to peers instantly.\n\n Formula evaluation is powered by HyperFormula, providing over 400 built-in functions covering arithmetic, statistics,\n text manipulation, date/time, financial, and logical operations. Formulas are stored with internal cell indices and\n translated to A1-notation on display, keeping references stable across row and column insertions.\n\n The plugin integrates with plugin-markdown to expose formula results inside document fenced code blocks, and\n contributes anchor-navigation support so other plugins can scroll and highlight specific cell ranges by DXN reference.\n AI agents can invoke sheet operations — insert/drop axes, scroll to anchor, and read or write cell values — through\n the standard operations framework.\n `,\n icon: 'ph--grid-nine--regular',\n iconHue: 'indigo',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-sheet',\n spec: 'PLUGIN.mdl',\n screenshots: ['https://dxos.network/plugin-details-sheet-dark.png'],\n});\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,uBAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;;;;;;;;;;EAabQ,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,aAAa;IAAC;;AAChB,CAAA;",
|
|
6
|
-
"names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source", "spec", "screenshots"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/paths.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { createTypeSectionPaths } from '@dxos/app-toolkit';\n\nimport { Sheet } from '#types';\n\nconst { getSectionPath: getSheetsPath, getObjectPath: getSheetPath } = createTypeSectionPaths(Sheet.Sheet);\n\nexport { getSheetsPath, getSheetPath };\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,8BAA8B;AAEvC,SAASC,aAAa;AAEtB,IAAM,EAAEC,gBAAgBC,eAAeC,eAAeC,aAAY,IAAKL,uBAAuBC,MAAMA,KAAK;",
|
|
6
|
-
"names": ["createTypeSectionPaths", "Sheet", "getSectionPath", "getSheetsPath", "getObjectPath", "getSheetPath"]
|
|
7
|
-
}
|