@dxos/plugin-sheet 0.13.0 → 0.16.0-next-60712ab191a99ba90316cc4be753e9e11b17100a
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/PLUGIN.mdl +72 -0
- package/dist/lib/Sheet.mjs +1 -59
- package/dist/lib/SheetCapabilities.mjs +1 -29
- package/dist/lib/SheetEvents.mjs +1 -15
- package/dist/lib/SheetOperation.mjs +1 -136
- package/dist/lib/SheetPlugin.mjs +1 -16
- package/dist/lib/SheetRange.mjs +1 -32
- package/dist/lib/SheetUtil.mjs +1 -122
- package/dist/lib/capabilities.browser.mjs +3 -3
- package/dist/lib/capabilities.browser.mjs.map +1 -1
- package/dist/lib/capabilities.mjs +3 -3
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +2 -1
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +3 -3
- package/dist/lib/capabilities.tauri.mjs.map +1 -1
- package/dist/lib/capabilities.workerd.mjs +2 -1
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/chunk-PLUGIN.mjs +2 -2
- package/dist/lib/chunk-RangeList.mjs +4 -5
- package/dist/lib/chunk-RangeList.mjs.map +1 -1
- package/dist/lib/chunk-Sheet.mjs +90 -0
- package/dist/lib/chunk-Sheet.mjs.map +1 -0
- package/dist/lib/chunk-SheetArticle.mjs +2 -2
- package/dist/lib/chunk-SheetArticle.mjs.map +1 -1
- package/dist/lib/chunk-SheetCapabilities.mjs +29 -0
- package/dist/lib/chunk-SheetCapabilities.mjs.map +1 -0
- package/dist/lib/chunk-SheetChartsCompanion.mjs +58 -0
- package/dist/lib/chunk-SheetChartsCompanion.mjs.map +1 -0
- package/dist/lib/chunk-SheetEvents.mjs +15 -0
- package/dist/lib/chunk-SheetEvents.mjs.map +1 -0
- package/dist/lib/chunk-SheetOperation.mjs +136 -0
- package/dist/lib/chunk-SheetOperation.mjs.map +1 -0
- package/dist/lib/chunk-SheetPlugin.mjs +16 -0
- package/dist/lib/chunk-SheetPlugin.mjs.map +1 -0
- package/dist/lib/chunk-SheetRange.mjs +75 -0
- package/dist/lib/chunk-SheetRange.mjs.map +1 -0
- package/dist/lib/chunk-SheetUtil.mjs +122 -0
- package/dist/lib/chunk-SheetUtil.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +27 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-markdown-extension.mjs +1 -1
- package/dist/lib/chunk-react-surface.mjs +27 -15
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-thread-ranges.mjs +2 -2
- package/dist/lib/chunk-useSheetModel.mjs +543 -0
- package/dist/lib/chunk-useSheetModel.mjs.map +1 -0
- package/dist/lib/components.mjs +281 -562
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/containers.mjs +2 -1
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/index.mjs +1 -2
- package/dist/lib/meta.mjs +6 -1
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/operations/node.mjs +1 -2
- package/dist/lib/plugin.mjs +2 -2
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/testing.mjs +77 -3
- package/dist/lib/testing.mjs.map +1 -1
- package/dist/lib/translations.mjs +16 -1
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/lib/types.mjs +6 -6
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/node.d.ts +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts +1 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/workerd.d.ts +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/components/ChartCompanion/ChartCompanion.d.ts +20 -0
- package/dist/types/src/components/ChartCompanion/ChartCompanion.d.ts.map +1 -0
- package/dist/types/src/components/ChartCompanion/ChartCompanion.stories.d.ts +269 -0
- package/dist/types/src/components/ChartCompanion/ChartCompanion.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChartCompanion/index.d.ts +3 -0
- package/dist/types/src/components/ChartCompanion/index.d.ts.map +1 -0
- package/dist/types/src/components/ChartCompanion/useRangeValues.d.ts +8 -0
- package/dist/types/src/components/ChartCompanion/useRangeValues.d.ts.map +1 -0
- package/dist/types/src/components/SheetContent/SheetContent.d.ts.map +1 -1
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts +30 -0
- package/dist/types/src/components/SheetContent/SheetContent.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContent/util.d.ts.map +1 -1
- package/dist/types/src/components/SheetStatusbar/SheetStatusbar.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts +30 -0
- package/dist/types/src/components/SheetToolbar/SheetToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetToolbar/style.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts +30 -0
- package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SheetChartsCompanion/SheetChartsCompanion.d.ts +11 -0
- package/dist/types/src/containers/SheetChartsCompanion/SheetChartsCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/SheetChartsCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/SheetChartsCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -0
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/model/sheet-model.d.ts +4 -0
- package/dist/types/src/model/sheet-model.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/testing/data.d.ts +4 -0
- package/dist/types/src/testing/data.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +30 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Sheet.d.ts +30 -1
- package/dist/types/src/types/Sheet.d.ts.map +1 -1
- package/dist/types/src/types/SheetRange.d.ts +6 -1
- package/dist/types/src/types/SheetRange.d.ts.map +1 -1
- package/dist/types/src/types/SheetRange.test.d.ts +2 -0
- package/dist/types/src/types/SheetRange.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +2 -0
- package/package.json +49 -47
- package/src/capabilities/app-graph-builder.ts +37 -0
- package/src/capabilities/gen/browser.ts +3 -3
- package/src/capabilities/gen/node.ts +4 -0
- package/src/capabilities/gen/tauri.ts +3 -3
- package/src/capabilities/gen/workerd.ts +4 -0
- package/src/capabilities/index.ts +2 -4
- package/src/capabilities/react-surface.ts +10 -1
- package/src/components/ChartCompanion/ChartCompanion.stories.tsx +105 -0
- package/src/components/ChartCompanion/ChartCompanion.tsx +242 -0
- package/src/components/ChartCompanion/index.ts +6 -0
- package/src/components/ChartCompanion/useRangeValues.ts +32 -0
- package/src/components/SheetContent/SheetContent.tsx +30 -3
- package/src/components/SheetContent/util.ts +3 -1
- package/src/components/SheetStatusbar/SheetStatusbar.tsx +14 -15
- package/src/components/SheetToolbar/style.ts +7 -8
- package/src/components/index.ts +1 -0
- package/src/containers/RangeList/RangeList.tsx +1 -1
- package/src/containers/SheetArticle/SheetArticle.stories.tsx +3 -2
- package/src/containers/SheetArticle/SheetArticle.tsx +6 -3
- package/src/containers/SheetChartsCompanion/SheetChartsCompanion.tsx +78 -0
- package/src/containers/SheetChartsCompanion/index.ts +5 -0
- package/src/containers/index.ts +1 -0
- package/src/model/sheet-model.ts +7 -0
- package/src/playwright/sheet.spec.ts +5 -3
- package/src/plugin.tsx +2 -0
- package/src/testing/data.ts +40 -1
- package/src/translations.ts +16 -0
- package/src/types/Sheet.ts +43 -4
- package/src/types/SheetRange.test.ts +35 -0
- package/src/types/SheetRange.ts +46 -1
- package/dist/lib/Sheet.mjs.map +0 -1
- package/dist/lib/SheetCapabilities.mjs.map +0 -1
- package/dist/lib/SheetEvents.mjs.map +0 -1
- package/dist/lib/SheetOperation.mjs.map +0 -1
- package/dist/lib/SheetPlugin.mjs.map +0 -1
- package/dist/lib/SheetRange.mjs.map +0 -1
- package/dist/lib/SheetUtil.mjs.map +0 -1
package/PLUGIN.mdl
CHANGED
|
@@ -398,6 +398,78 @@ test QA-1: Create a sheet, set values, evaluate a formula, read back
|
|
|
398
398
|
default to that same collection rather than a different one.
|
|
399
399
|
```
|
|
400
400
|
|
|
401
|
+
```mdl
|
|
402
|
+
test QA-2: Build a budget and watch its totals recompute
|
|
403
|
+
desc: The demo path — create a sheet, type a small table, total it with SUM, and change a value.
|
|
404
|
+
actors: human
|
|
405
|
+
covers: [F-1.1, F-2.1, F-2.3, T-1, T-2]
|
|
406
|
+
status: passing # 2026-10-09, recorded by autocue/budget.mjs
|
|
407
|
+
given:
|
|
408
|
+
- an identity exists, on a fresh profile
|
|
409
|
+
- space: the default space is open on its Home
|
|
410
|
+
steps:
|
|
411
|
+
- name: Create a sheet
|
|
412
|
+
do: Click "Add to space" and choose Sheet.
|
|
413
|
+
expect: an empty grid opens in a new plank
|
|
414
|
+
- name: Enter a header row and four rows of costs
|
|
415
|
+
do: |
|
|
416
|
+
From A1, type "Item", "Q1", "Q2" with Tab between cells and Enter at the end, then four rows:
|
|
417
|
+
Hosting 120 140, Design 80 95, Marketing 60 75, Support 40 45.
|
|
418
|
+
expect: the values fill A1:C5, numbers right-aligned
|
|
419
|
+
- name: Total each quarter with SUM
|
|
420
|
+
do: In A6 type "Total", then "=SUM(B2:B5)" in B6 and "=SUM(C2:C5)" in C6.
|
|
421
|
+
expect: B6 shows 300 and C6 shows 355
|
|
422
|
+
- name: Change a cost and watch the total update
|
|
423
|
+
do: Click B2, type "200" and press Enter.
|
|
424
|
+
expect: B6 updates to 380 without any other action
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
```mdl
|
|
428
|
+
test QA-3: Chart a sales report in the Charts companion
|
|
429
|
+
desc: The charts demo — open the Bramble template's sales report and switch between its charts.
|
|
430
|
+
actors: human
|
|
431
|
+
status: passing # 2026-10-16, recorded by autocue/sales-charts.mjs
|
|
432
|
+
given:
|
|
433
|
+
- an identity exists, on a fresh profile
|
|
434
|
+
- space: the default space is open on its Home
|
|
435
|
+
steps:
|
|
436
|
+
- name: Create the Bramble Coffee Roasters space
|
|
437
|
+
do: Open the app menu, choose "Create space", pick the Bramble Coffee Roasters template and click Create.
|
|
438
|
+
expect: the new space opens with its collections in the sidebar
|
|
439
|
+
- name: Open the sales report
|
|
440
|
+
do: In the sidebar, open Collections › Reference › Sales report.
|
|
441
|
+
expect: the sheet opens with green header rows over the monthly sales and revenue tables
|
|
442
|
+
- name: Show the bags sold chart
|
|
443
|
+
do: Open the Charts companion.
|
|
444
|
+
expect: |
|
|
445
|
+
it lists "Bags sold by blend" and "Revenue by channel", with the first selected and its grouped
|
|
446
|
+
bar chart drawn below
|
|
447
|
+
- name: Switch to the revenue chart
|
|
448
|
+
do: Click "Revenue by channel".
|
|
449
|
+
expect: a pie chart of revenue by channel replaces the bar chart, and its range F1:G4 is selected in the sheet
|
|
450
|
+
- name: Switch back to the bags sold chart
|
|
451
|
+
do: Click "Bags sold by blend".
|
|
452
|
+
expect: the bar chart returns and A1:D7 is selected in the sheet
|
|
453
|
+
|
|
454
|
+
test QA-4: Showcase clip
|
|
455
|
+
desc: |
|
|
456
|
+
The 10s showcase clip: Fill a sheet with values and formulas. Recorded light at 60 fps with no ident, captions or
|
|
457
|
+
count-in by `tools/autocue/showcase/overnight.mjs`; the clip is the `clip: sheet` step.
|
|
458
|
+
actors: human
|
|
459
|
+
status: unverified # driven by autocue/showcase.mjs
|
|
460
|
+
given:
|
|
461
|
+
- an identity exists
|
|
462
|
+
- space: a space is open
|
|
463
|
+
- plugin-sheet enabled
|
|
464
|
+
steps:
|
|
465
|
+
- name: Create a sheet
|
|
466
|
+
do: Create a Sheet.
|
|
467
|
+
expect: an empty grid opens
|
|
468
|
+
- name: Enter values and formulas
|
|
469
|
+
do: Type four rows of a label, a value and a formula.
|
|
470
|
+
expect: the formulas compute as each row is entered
|
|
471
|
+
```
|
|
472
|
+
|
|
401
473
|
---
|
|
402
474
|
|
|
403
475
|
## Appendix: Extension Definitions
|
package/dist/lib/Sheet.mjs
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { addressToIndex, initialize, mapFormulaRefsToIndices } from "./SheetUtil.mjs";
|
|
3
|
-
import { Annotation, Collection, DXN, Obj, Type } from "@dxos/echo";
|
|
4
|
-
import { addressFromA1Notation, isFormula } from "@dxos/compute-hyperformula/types";
|
|
5
|
-
import * as Skill from "@dxos/compute/Skill";
|
|
6
|
-
import * as Schema from "effect/Schema";
|
|
7
|
-
//#region src/types/Sheet.ts
|
|
8
|
-
var Sheet_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
CellValue: () => CellValue,
|
|
10
|
-
Range: () => Range,
|
|
11
|
-
RowColumnMeta: () => RowColumnMeta,
|
|
12
|
-
SKILL_KEY: () => SKILL_KEY,
|
|
13
|
-
Sheet: () => Sheet,
|
|
14
|
-
make: () => make
|
|
15
|
-
});
|
|
16
|
-
var SKILL_KEY = "org.dxos.skill.sheet";
|
|
17
|
-
var CellValue = Schema.Struct({ value: Schema.Any });
|
|
18
|
-
var Range = Schema.Struct({
|
|
19
|
-
range: Schema.String,
|
|
20
|
-
key: Schema.String,
|
|
21
|
-
value: Schema.String
|
|
22
|
-
});
|
|
23
|
-
var RowColumnMeta = Schema.Struct({ size: Schema.optional(Schema.Number) });
|
|
24
|
-
var Sheet = class extends Type.makeObject(DXN.make("org.dxos.type.sheet", "0.1.0"))(Schema.Struct({
|
|
25
|
-
name: Schema.optional(Schema.String),
|
|
26
|
-
cells: Schema.Record(Schema.String, CellValue).pipe(Annotation.FormInputAnnotation.set(false)),
|
|
27
|
-
rows: Schema.Array(Schema.String).pipe(Annotation.FormInputAnnotation.set(false)),
|
|
28
|
-
columns: Schema.Array(Schema.String).pipe(Annotation.FormInputAnnotation.set(false)),
|
|
29
|
-
rowMeta: Schema.Record(Schema.String, RowColumnMeta).pipe(Annotation.FormInputAnnotation.set(false)),
|
|
30
|
-
columnMeta: Schema.Record(Schema.String, RowColumnMeta).pipe(Annotation.FormInputAnnotation.set(false)),
|
|
31
|
-
ranges: Schema.Array(Range).pipe(Annotation.FormInputAnnotation.set(false))
|
|
32
|
-
}).pipe(Annotation.IconAnnotation.set({
|
|
33
|
-
icon: "ph--grid-nine--regular",
|
|
34
|
-
hue: "indigo"
|
|
35
|
-
}), Skill.SkillsAnnotation.set([SKILL_KEY]), Annotation.UserType.set({ tags: [Collection.ItemTag] }))) {};
|
|
36
|
-
var make = ({ name, cells = {}, ...size } = {}) => {
|
|
37
|
-
const sheet = Obj.make(Sheet, {
|
|
38
|
-
name,
|
|
39
|
-
cells: {},
|
|
40
|
-
rows: [],
|
|
41
|
-
columns: [],
|
|
42
|
-
rowMeta: {},
|
|
43
|
-
columnMeta: {},
|
|
44
|
-
ranges: []
|
|
45
|
-
});
|
|
46
|
-
Obj.update(sheet, (sheet) => {
|
|
47
|
-
initialize(sheet, size);
|
|
48
|
-
if (cells) Object.entries(cells).forEach(([key, { value }]) => {
|
|
49
|
-
const idx = addressToIndex(sheet, addressFromA1Notation(key));
|
|
50
|
-
if (isFormula(value)) value = mapFormulaRefsToIndices(sheet, value);
|
|
51
|
-
sheet.cells[idx] = { value };
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
return sheet;
|
|
55
|
-
};
|
|
56
|
-
//#endregion
|
|
57
|
-
export { CellValue, Range, RowColumnMeta, SKILL_KEY, Sheet, make, Sheet_exports as t };
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=Sheet.mjs.map
|
|
1
|
+
export { t as CellValue, n as Chart, r as ChartType, i as Range, a as RowColumnMeta, o as SKILL_KEY, s as Sheet, l as make } from "./chunk-Sheet.mjs";
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { RowColumnMeta } from "./Sheet.mjs";
|
|
3
|
-
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
|
-
import { meta } from "#meta";
|
|
5
|
-
import * as Schema from "effect/Schema";
|
|
6
|
-
//#region src/types/SheetCapabilities.ts
|
|
7
|
-
var SheetCapabilities_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
-
ComputeGraphRegistry: () => ComputeGraphRegistry,
|
|
9
|
-
GridInstances: () => GridInstances,
|
|
10
|
-
SheetAction: () => SheetAction
|
|
11
|
-
});
|
|
12
|
-
var ComputeGraphRegistry = Capability.makeSingleton()(`${meta.profile.key}.capability.computeGraphRegistry`);
|
|
13
|
-
/** Registry of active grid instances keyed by attendable ID. */
|
|
14
|
-
var GridInstances = Capability.makeSingleton()(`${meta.profile.key}.capability.gridInstances`);
|
|
15
|
-
var ActionAxis = Schema.Union([Schema.Literal("row"), Schema.Literal("col")]);
|
|
16
|
-
var SheetAction;
|
|
17
|
-
(function(_SheetAction) {
|
|
18
|
-
_SheetAction.RestoreAxis = Schema.Struct({
|
|
19
|
-
axis: ActionAxis,
|
|
20
|
-
axisIndex: Schema.String,
|
|
21
|
-
index: Schema.Number,
|
|
22
|
-
axisMeta: RowColumnMeta,
|
|
23
|
-
values: Schema.Array(Schema.Any)
|
|
24
|
-
});
|
|
25
|
-
})(SheetAction || (SheetAction = {}));
|
|
26
|
-
//#endregion
|
|
27
|
-
export { ComputeGraphRegistry, GridInstances, SheetAction, SheetCapabilities_exports as t };
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=SheetCapabilities.mjs.map
|
|
1
|
+
export { t as ComputeGraphRegistry, n as GridInstances, r as SheetAction } from "./chunk-SheetCapabilities.mjs";
|
package/dist/lib/SheetEvents.mjs
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { meta } from "#meta";
|
|
3
|
-
import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
|
|
4
|
-
//#region src/types/SheetEvents.ts
|
|
5
|
-
var SheetEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
|
|
6
|
-
/**
|
|
7
|
-
* The feature's start event: the plugin's start-gated modules (and cross-plugin
|
|
8
|
-
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
9
|
-
* host's idle trickle.
|
|
10
|
-
*/
|
|
11
|
-
var Start = ActivationEvent.pluginStart(meta.profile.key);
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Start, SheetEvents_exports as t };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=SheetEvents.mjs.map
|
|
1
|
+
export { n as Start } from "./chunk-SheetEvents.mjs";
|
|
@@ -1,136 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Sheet } from "./Sheet.mjs";
|
|
3
|
-
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
|
-
import * as Operation from "@dxos/compute/Operation";
|
|
5
|
-
import { Database, Ref } from "@dxos/echo";
|
|
6
|
-
import { DXN as DXN$1 } from "@dxos/keys";
|
|
7
|
-
import * as Schema from "effect/Schema";
|
|
8
|
-
//#region src/types/SheetOperation.ts
|
|
9
|
-
var SheetOperation_exports = /* @__PURE__ */ __exportAll({
|
|
10
|
-
Create: () => Create,
|
|
11
|
-
DropAxis: () => DropAxis,
|
|
12
|
-
DropAxisOutput: () => DropAxisOutput,
|
|
13
|
-
GetValues: () => GetValues,
|
|
14
|
-
InsertAxis: () => InsertAxis,
|
|
15
|
-
RestoreAxis: () => RestoreAxis,
|
|
16
|
-
ScrollToAnchor: () => ScrollToAnchor,
|
|
17
|
-
SetValues: () => SetValues
|
|
18
|
-
});
|
|
19
|
-
var Axis = Schema.Union([Schema.Literal("row"), Schema.Literal("col")]);
|
|
20
|
-
var InsertAxis = Operation.make({
|
|
21
|
-
meta: {
|
|
22
|
-
key: DXN$1.make("org.dxos.operation.sheet.insertAxis"),
|
|
23
|
-
name: "Insert Axis",
|
|
24
|
-
icon: "ph--plus--regular"
|
|
25
|
-
},
|
|
26
|
-
input: Schema.Struct({
|
|
27
|
-
model: Schema.Any,
|
|
28
|
-
axis: Axis,
|
|
29
|
-
index: Schema.Number,
|
|
30
|
-
count: Schema.optional(Schema.Number)
|
|
31
|
-
}),
|
|
32
|
-
output: Schema.Void
|
|
33
|
-
});
|
|
34
|
-
var DropAxisOutput = Schema.Struct({
|
|
35
|
-
axis: Axis.annotate({ description: "The axis type (row or col)." }),
|
|
36
|
-
axisIndex: Schema.String.annotate({ description: "The dropped axis index." }),
|
|
37
|
-
index: Schema.Number.annotate({ description: "The position the axis was at." }),
|
|
38
|
-
axisMeta: Schema.Any.annotate({ description: "The row/column metadata." }),
|
|
39
|
-
values: Schema.Array(Schema.Any).annotate({ description: "The cell values that were dropped." })
|
|
40
|
-
});
|
|
41
|
-
var DropAxis = Operation.make({
|
|
42
|
-
meta: {
|
|
43
|
-
key: DXN$1.make("org.dxos.operation.sheet.dropAxis"),
|
|
44
|
-
name: "Drop Axis",
|
|
45
|
-
icon: "ph--trash--regular"
|
|
46
|
-
},
|
|
47
|
-
input: Schema.Struct({
|
|
48
|
-
model: Schema.Any,
|
|
49
|
-
axis: Axis,
|
|
50
|
-
axisIndex: Schema.String
|
|
51
|
-
}),
|
|
52
|
-
output: DropAxisOutput
|
|
53
|
-
});
|
|
54
|
-
var ScrollToAnchor = Operation.make({
|
|
55
|
-
meta: {
|
|
56
|
-
key: DXN$1.make("org.dxos.operation.sheet.scrollToAnchor"),
|
|
57
|
-
name: "Scroll To Anchor",
|
|
58
|
-
icon: "ph--anchor-simple--regular"
|
|
59
|
-
},
|
|
60
|
-
services: [Capability.Service],
|
|
61
|
-
input: Schema.Struct({
|
|
62
|
-
subject: Schema.String.annotate({ description: "Attendable ID of the sheet." }),
|
|
63
|
-
cursor: Schema.String.annotate({ description: "Cell range coordinates." }),
|
|
64
|
-
id: Schema.optional(Schema.Any.annotate({ description: "Active refs for highlighting." }))
|
|
65
|
-
}),
|
|
66
|
-
output: Schema.Void
|
|
67
|
-
});
|
|
68
|
-
var Create = Operation.make({
|
|
69
|
-
meta: {
|
|
70
|
-
key: DXN$1.make("org.dxos.operation.sheet.create"),
|
|
71
|
-
name: "Create",
|
|
72
|
-
description: "Creates a new sheet and adds it to the space.",
|
|
73
|
-
icon: "ph--grid-nine--regular"
|
|
74
|
-
},
|
|
75
|
-
input: Schema.Struct({
|
|
76
|
-
name: Schema.optional(Schema.String).annotate({ description: "Display name for the sheet." }),
|
|
77
|
-
rows: Schema.optional(Schema.Number).annotate({ description: "Initial number of rows (default 50)." }),
|
|
78
|
-
columns: Schema.optional(Schema.Number).annotate({ description: "Initial number of columns (default 26)." })
|
|
79
|
-
}),
|
|
80
|
-
output: Schema.Struct({ id: Schema.String.annotate({ description: "The DXN of the created sheet." }) }),
|
|
81
|
-
services: [Capability.Service, Database.Service]
|
|
82
|
-
});
|
|
83
|
-
var GetValues = Operation.make({
|
|
84
|
-
meta: {
|
|
85
|
-
key: DXN$1.make("org.dxos.operation.sheet.getRange"),
|
|
86
|
-
name: "Get Range Values",
|
|
87
|
-
description: "Returns cell values from a sheet as a 2D array. Defaults to the entire occupied area.",
|
|
88
|
-
icon: "ph--table--regular"
|
|
89
|
-
},
|
|
90
|
-
input: Schema.Struct({
|
|
91
|
-
sheet: Ref.Ref(Sheet).annotate({ description: "The sheet to read from." }),
|
|
92
|
-
range: Schema.optional(Schema.String).annotate({ description: "Range in A1 notation (e.g. \"A1:C5\"). Omit to return the entire occupied area." })
|
|
93
|
-
}),
|
|
94
|
-
output: Schema.Struct({
|
|
95
|
-
values: Schema.Array(Schema.Array(Schema.Any)).annotate({ description: "2D array of cell values indexed [row][col]. Empty cells are null. Formulas are shown in A1 notation." }),
|
|
96
|
-
range: Schema.String.annotate({ description: "The A1 range actually returned (e.g. \"A1:E5\")." })
|
|
97
|
-
}),
|
|
98
|
-
services: [Database.Service]
|
|
99
|
-
});
|
|
100
|
-
var SetValues = Operation.make({
|
|
101
|
-
meta: {
|
|
102
|
-
key: DXN$1.make("org.dxos.operation.sheet.setRange"),
|
|
103
|
-
name: "Set Range Values",
|
|
104
|
-
description: "Sets multiple cell values in a sheet at once.",
|
|
105
|
-
icon: "ph--pencil--regular"
|
|
106
|
-
},
|
|
107
|
-
input: Schema.Struct({
|
|
108
|
-
sheet: Ref.Ref(Sheet).annotate({ description: "The sheet to write to." }),
|
|
109
|
-
cells: Schema.Record(Schema.String, Schema.Any).annotate({ description: "Map of A1 address to value (e.g. { \"A1\": \"Name\", \"B1\": 42, \"C1\": \"=A1+B1\" })." })
|
|
110
|
-
}),
|
|
111
|
-
output: Schema.Void,
|
|
112
|
-
services: [Database.Service]
|
|
113
|
-
});
|
|
114
|
-
/**
|
|
115
|
-
* Restore a dropped axis (inverse of DropAxis).
|
|
116
|
-
*/
|
|
117
|
-
var RestoreAxis = Operation.make({
|
|
118
|
-
meta: {
|
|
119
|
-
key: DXN$1.make("org.dxos.operation.sheet.restoreAxis"),
|
|
120
|
-
name: "Restore Axis",
|
|
121
|
-
icon: "ph--clock-counter-clockwise--regular"
|
|
122
|
-
},
|
|
123
|
-
input: Schema.Struct({
|
|
124
|
-
model: Schema.Any.annotate({ description: "The sheet model." }),
|
|
125
|
-
axis: Axis.annotate({ description: "The axis type (row or col)." }),
|
|
126
|
-
axisIndex: Schema.String.annotate({ description: "The axis index to restore." }),
|
|
127
|
-
index: Schema.Number.annotate({ description: "The position to restore at." }),
|
|
128
|
-
axisMeta: Schema.Any.annotate({ description: "The row/column metadata." }),
|
|
129
|
-
values: Schema.Array(Schema.Any).annotate({ description: "The cell values to restore." })
|
|
130
|
-
}),
|
|
131
|
-
output: Schema.Void
|
|
132
|
-
});
|
|
133
|
-
//#endregion
|
|
134
|
-
export { Create, DropAxis, DropAxisOutput, GetValues, InsertAxis, RestoreAxis, ScrollToAnchor, SetValues, SheetOperation_exports as t };
|
|
135
|
-
|
|
136
|
-
//# sourceMappingURL=SheetOperation.mjs.map
|
|
1
|
+
export { t as Create, n as DropAxis, r as DropAxisOutput, i as GetValues, a as InsertAxis, o as RestoreAxis, s as ScrollToAnchor, c as SetValues } from "./chunk-SheetOperation.mjs";
|
package/dist/lib/SheetPlugin.mjs
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { meta as meta$1 } from "#meta";
|
|
3
|
-
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
4
|
-
//#region src/SheetPlugin.ts
|
|
5
|
-
var SheetPlugin_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
-
make: () => make,
|
|
7
|
-
meta: () => meta
|
|
8
|
-
});
|
|
9
|
-
/** Plugin metadata, available without loading the plugin body. */
|
|
10
|
-
var meta = meta$1;
|
|
11
|
-
/** Constructs the plugin; the body loads on first enable. */
|
|
12
|
-
var make = Plugin.lazy(meta, () => import("#plugin"));
|
|
13
|
-
//#endregion
|
|
14
|
-
export { make, meta, SheetPlugin_exports as t };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=SheetPlugin.mjs.map
|
|
1
|
+
export { n as make, r as meta } from "./chunk-SheetPlugin.mjs";
|
package/dist/lib/SheetRange.mjs
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/types/SheetRange.ts
|
|
3
|
-
var SheetRange_exports = /* @__PURE__ */ __exportAll({
|
|
4
|
-
alignKey: () => alignKey,
|
|
5
|
-
cellClassNameForRange: () => cellClassNameForRange,
|
|
6
|
-
commentKey: () => commentKey,
|
|
7
|
-
styleKey: () => styleKey
|
|
8
|
-
});
|
|
9
|
-
var alignKey = "alignment";
|
|
10
|
-
var commentKey = "comment";
|
|
11
|
-
var styleKey = "style";
|
|
12
|
-
var cellClassNameForRange = ({ key, value }) => {
|
|
13
|
-
switch (key) {
|
|
14
|
-
case alignKey: switch (value) {
|
|
15
|
-
case "start": return "text-start";
|
|
16
|
-
case "center": return "text-center";
|
|
17
|
-
case "end": return "text-end";
|
|
18
|
-
default: return;
|
|
19
|
-
}
|
|
20
|
-
case commentKey: return "bg-grid-comment";
|
|
21
|
-
case styleKey: switch (value) {
|
|
22
|
-
case "highlight": return "bg-grid-highlight!";
|
|
23
|
-
case "softwrap": return "whitespace-normal!";
|
|
24
|
-
default: return;
|
|
25
|
-
}
|
|
26
|
-
default: return;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
export { alignKey, cellClassNameForRange, commentKey, styleKey, SheetRange_exports as t };
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=SheetRange.mjs.map
|
|
1
|
+
export { n as alignKey, r as cellClassNameForRange, i as commentKey, a as headerRanges, o as styleKey } from "./chunk-SheetRange.mjs";
|
package/dist/lib/SheetUtil.mjs
CHANGED
|
@@ -1,122 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertArgument } from "@dxos/invariant";
|
|
3
|
-
import { addressFromA1Notation, addressToA1Notation, isFormula } from "@dxos/compute-hyperformula/types";
|
|
4
|
-
import { randomBytes } from "@dxos/crypto/random";
|
|
5
|
-
//#region src/types/SheetUtil.ts
|
|
6
|
-
var SheetUtil_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
-
ApiError: () => ApiError,
|
|
8
|
-
DEFAULT_COLS: () => 26,
|
|
9
|
-
DEFAULT_ROWS: () => 50,
|
|
10
|
-
MAX_COLS: () => 676,
|
|
11
|
-
MAX_ROWS: () => 500,
|
|
12
|
-
RangeException: () => RangeException,
|
|
13
|
-
ReadonlyException: () => ReadonlyException,
|
|
14
|
-
addressFromIndex: () => addressFromIndex,
|
|
15
|
-
addressToIndex: () => addressToIndex,
|
|
16
|
-
compareIndexPositions: () => compareIndexPositions,
|
|
17
|
-
createIndex: () => createIndex,
|
|
18
|
-
createIndices: () => createIndices,
|
|
19
|
-
initialize: () => initialize,
|
|
20
|
-
insertIndices: () => insertIndices,
|
|
21
|
-
mapFormulaIndicesToRefs: () => mapFormulaIndicesToRefs,
|
|
22
|
-
mapFormulaRefsToIndices: () => mapFormulaRefsToIndices,
|
|
23
|
-
rangeFromIndex: () => rangeFromIndex,
|
|
24
|
-
rangeToIndex: () => rangeToIndex
|
|
25
|
-
});
|
|
26
|
-
var MAX_ROWS = 500;
|
|
27
|
-
var MAX_COLS = 676;
|
|
28
|
-
var DEFAULT_ROWS = 50;
|
|
29
|
-
var DEFAULT_COLS = 26;
|
|
30
|
-
var ApiError = class extends Error {};
|
|
31
|
-
var ReadonlyException = class extends ApiError {};
|
|
32
|
-
var RangeException = class extends ApiError {
|
|
33
|
-
constructor(n) {
|
|
34
|
-
super();
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* With a string length of 8, the chance of a collision is 0.02% for a sheet with 10,000 strings.
|
|
39
|
-
*/
|
|
40
|
-
var createIndex = (length = 8) => {
|
|
41
|
-
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
42
|
-
const charactersLength = 62;
|
|
43
|
-
const randomBuffer = randomBytes(length);
|
|
44
|
-
return Array.from(randomBuffer, (byte) => characters[byte % charactersLength]).join("");
|
|
45
|
-
};
|
|
46
|
-
var createIndices = (length) => Array.from({ length }).map(() => createIndex());
|
|
47
|
-
var insertIndices = (indices, i, n, max) => {
|
|
48
|
-
if (i + n > max) throw new RangeException(i + n);
|
|
49
|
-
const idx = createIndices(n);
|
|
50
|
-
indices.splice(i, 0, ...idx);
|
|
51
|
-
return idx;
|
|
52
|
-
};
|
|
53
|
-
var initialize = (sheet, { rows = 50, columns = 26 } = {}) => {
|
|
54
|
-
if (!sheet.rows.length) insertIndices(sheet.rows, 0, rows, 500);
|
|
55
|
-
if (!sheet.columns.length) insertIndices(sheet.columns, 0, columns, 676);
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* E.g., "A1" => "CA2@CB3".
|
|
59
|
-
*/
|
|
60
|
-
var addressToIndex = (sheet, cell) => {
|
|
61
|
-
return `${sheet.columns[cell.col]}@${sheet.rows[cell.row]}`;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* E.g., "CA2@CB3" => "A1".
|
|
65
|
-
*/
|
|
66
|
-
var addressFromIndex = (sheet, idx) => {
|
|
67
|
-
const [column, row] = idx.split("@");
|
|
68
|
-
return {
|
|
69
|
-
col: sheet.columns.indexOf(column),
|
|
70
|
-
row: sheet.rows.indexOf(row)
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* E.g., "A1:B2" => "CA2@CB3:CC4@CD5".
|
|
75
|
-
*/
|
|
76
|
-
var rangeToIndex = (sheet, range) => {
|
|
77
|
-
return [range.from, range.to ?? range.from].map((cell) => addressToIndex(sheet, cell)).join(":");
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* E.g., "CA2@CB3:CC4@CD5" => "A1:B2".
|
|
81
|
-
*/
|
|
82
|
-
var rangeFromIndex = (sheet, idx) => {
|
|
83
|
-
const [from, to] = idx.split(":").map((index) => addressFromIndex(sheet, index));
|
|
84
|
-
return {
|
|
85
|
-
from,
|
|
86
|
-
to
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Compares the positions of two cell indexes in a sheet.
|
|
91
|
-
* Sorts primarily by row, then by column if rows are equal.
|
|
92
|
-
*/
|
|
93
|
-
var compareIndexPositions = (sheet, indexA, indexB) => {
|
|
94
|
-
const { row: rowA, col: columnA } = addressFromIndex(sheet, indexA);
|
|
95
|
-
const { row: rowB, col: columnB } = addressFromIndex(sheet, indexB);
|
|
96
|
-
if (rowA !== rowB) return rowA - rowB;
|
|
97
|
-
else return columnA - columnB;
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Map from A1 notation to indices.
|
|
101
|
-
*/
|
|
102
|
-
var mapFormulaRefsToIndices = (sheet, formula) => {
|
|
103
|
-
assertArgument(isFormula(formula), "formula");
|
|
104
|
-
return formula.replace(/([a-zA-Z]+)([0-9]+)/g, (match) => {
|
|
105
|
-
const cell = addressFromA1Notation(match);
|
|
106
|
-
if (cell.col < 0 || cell.row < 0 || cell.col >= sheet.columns.length || cell.row >= sheet.rows.length) return match;
|
|
107
|
-
return addressToIndex(sheet, cell);
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Map from indices to A1 notation.
|
|
112
|
-
*/
|
|
113
|
-
var mapFormulaIndicesToRefs = (sheet, formula) => {
|
|
114
|
-
assertArgument(isFormula(formula), "formula");
|
|
115
|
-
return formula.replace(/([a-zA-Z0-9]+)@([a-zA-Z0-9]+)/g, (idx) => {
|
|
116
|
-
return addressToA1Notation(addressFromIndex(sheet, idx));
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
//#endregion
|
|
120
|
-
export { ApiError, DEFAULT_COLS, DEFAULT_ROWS, MAX_COLS, MAX_ROWS, RangeException, ReadonlyException, addressFromIndex, addressToIndex, compareIndexPositions, createIndex, createIndices, initialize, insertIndices, mapFormulaIndicesToRefs, mapFormulaRefsToIndices, rangeFromIndex, rangeToIndex, SheetUtil_exports as t };
|
|
121
|
-
|
|
122
|
-
//# sourceMappingURL=SheetUtil.mjs.map
|
|
1
|
+
export { t as ApiError, n as DEFAULT_COLS, r as DEFAULT_ROWS, i as MAX_COLS, a as MAX_ROWS, o as RangeException, s as ReadonlyException, l as addressFromIndex, u as addressToIndex, d as compareIndexPositions, f as createIndex, p as createIndices, m as initialize, h as insertIndices, g as mapFormulaIndicesToRefs, _ as mapFormulaRefsToIndices, v as rangeFromIndex, y as rangeToIndex } from "./chunk-SheetUtil.mjs";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
2
1
|
import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
|
|
3
2
|
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
3
|
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
@@ -12,6 +11,7 @@ import * as SpaceCapability from "@dxos/plugin-space/SpaceCapability";
|
|
|
12
11
|
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
13
12
|
import { meta } from "#meta";
|
|
14
13
|
//#region src/capabilities/gen/browser.ts
|
|
14
|
+
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"));
|
|
15
15
|
var AnchorSort = AppCapability.anchorSort(() => import("./chunk-anchor-sort.mjs"), {
|
|
16
16
|
requires: [AppCapabilities.AppGraph],
|
|
17
17
|
activatesOn: SheetEvents.Start
|
|
@@ -76,10 +76,10 @@ var Translations = AppCapability.translations(translations);
|
|
|
76
76
|
var PluginAsset = AppCapability.pluginAsset({
|
|
77
77
|
pluginId: meta.profile.key,
|
|
78
78
|
path: "PLUGIN.mdl",
|
|
79
|
-
content:
|
|
79
|
+
content: () => import("./chunk-PLUGIN.mjs"),
|
|
80
80
|
mimeType: "application/x-mdl"
|
|
81
81
|
});
|
|
82
82
|
//#endregion
|
|
83
|
-
export { AnchorSort, CommentConfig, ComputeGraphRegistry, CreateObject, Markdown, OperationHandler, PluginAsset, ReactSurface, Schema, SheetState, SkillDefinition, Translations, UndoMappings };
|
|
83
|
+
export { AnchorSort, AppGraphBuilder, CommentConfig, ComputeGraphRegistry, CreateObject, Markdown, OperationHandler, PluginAsset, ReactSurface, Schema, SheetState, SkillDefinition, Translations, UndoMappings };
|
|
84
84
|
|
|
85
85
|
//# sourceMappingURL=capabilities.browser.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ClientCapabilities from '@dxos/plugin-client/ClientCapabilities';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { SheetCapabilities, SheetEvents } from '#types';\n\
|
|
1
|
+
{"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ClientCapabilities from '@dxos/plugin-client/ClientCapabilities';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { SheetCapabilities, SheetEvents } from '#types';\n\n// Ordering-only: registers the sort comparator once the app graph exists; the body reads\n// nothing else.\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'));\n\nexport const AnchorSort = AppCapability.anchorSort(() => import('../anchor-sort.ts'), {\n requires: [AppCapabilities.AppGraph],\n activatesOn: SheetEvents.Start,\n});\n\nexport const CommentConfig = AppCapability.commentConfig(() => import('../comment-config.ts'), {\n activatesOn: SheetEvents.Start,\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const ComputeGraphRegistry = Capability.lazyModule(\n 'ComputeGraphRegistry',\n {\n // Headless: formulas evaluate in a markdown document with no sheet surface ever rendered, so\n // gating this on the sheet's own start conflates \"the sheet UI is on screen\" with \"compute\n // graphs exist\". Ungated (hence idle) it also becomes pullable by the consumers that need it\n // earlier, which a start-gated provider is not.\n requires: [ClientCapabilities.Client, Capabilities.ProcessManagerRuntime],\n provides: [SheetCapabilities.ComputeGraphRegistry],\n // Needs a client, which headless hosts (EDGE) do not provide.\n environments: ['browser', 'node', 'tauri'],\n },\n () => import('../compute-graph-registry.ts'),\n);\n\nexport const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const Markdown = Capability.lazyModule(\n 'MarkdownExtension',\n {\n // The provider callbacks read the registry, so it must be in place when this activates.\n requires: [SheetCapabilities.ComputeGraphRegistry],\n provides: [MarkdownCapabilities.ExtensionProvider],\n activatesOn: MarkdownEvents.Start,\n // Follows its required registry, which headless hosts (EDGE) do not provide.\n environments: ['browser', 'node', 'tauri'],\n },\n () => import('../markdown-extension.ts'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.article', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const SheetState = Capability.lazyModule(\n 'SheetState',\n { provides: [SheetCapabilities.GridInstances], activatesOn: SheetEvents.Start },\n () => import('../state.ts'),\n);\n\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const UndoMappings = AppCapability.undoMappings(() => import('../undo-mappings.ts'), {\n activatesOn: SheetEvents.Start,\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;;;;;AAsBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,gCAA0B;AAEpG,IAAa,aAAa,cAAc,iBAAiB,OAAO,4BAAsB;CACpF,UAAU,CAAC,gBAAgB,QAAQ;CACnC,aAAa,YAAY;AAC3B,CAAC;AAED,IAAa,gBAAgB,cAAc,oBAAoB,OAAO,+BAAyB;CAC7F,aAAa,YAAY;CACzB,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AAED,IAAa,uBAAuB,WAAW,WAC7C,wBACA;CAKE,UAAU,CAAC,mBAAmB,QAAQ,aAAa,qBAAqB;CACxE,UAAU,CAAC,kBAAkB,oBAAoB;CAEjD,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,SACM,OAAO,qCACf;AAEA,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,8BAAwB,EAC5F,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,WAAW,WAAW,WACjC,qBACA;CAEE,UAAU,CAAC,kBAAkB,oBAAoB;CACjD,UAAU,CAAC,qBAAqB,iBAAiB;CACjD,aAAa,eAAe;CAE5B,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,SACM,OAAO,iCACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA4B,EACtG,aAAa,iBAAiB,KAChC,CAAC;AAED,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO;CAAC;CAAyB;CAAkC;AAAuB,EAC5F,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,aAAa,WAAW,WACnC,cACA;CAAE,UAAU,CAAC,kBAAkB,aAAa;CAAG,aAAa,YAAY;AAAM,SACxE,OAAO,oBACf;AAEA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,iCAA2B,EACnG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,eAAe,cAAc,mBAAmB,OAAO,8BAAwB;CAC1F,aAAa,YAAY;CACzB,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AAED,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
2
1
|
import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
|
|
3
2
|
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
3
|
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
@@ -12,6 +11,7 @@ import * as SpaceCapability from "@dxos/plugin-space/SpaceCapability";
|
|
|
12
11
|
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
13
12
|
import { meta } from "#meta";
|
|
14
13
|
//#region src/capabilities/index.ts
|
|
14
|
+
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"));
|
|
15
15
|
var AnchorSort = AppCapability.anchorSort(() => import("./chunk-anchor-sort.mjs"), {
|
|
16
16
|
requires: [AppCapabilities.AppGraph],
|
|
17
17
|
activatesOn: SheetEvents.Start
|
|
@@ -76,10 +76,10 @@ var Translations = AppCapability.translations(translations);
|
|
|
76
76
|
var PluginAsset = AppCapability.pluginAsset({
|
|
77
77
|
pluginId: meta.profile.key,
|
|
78
78
|
path: "PLUGIN.mdl",
|
|
79
|
-
content:
|
|
79
|
+
content: () => import("./chunk-PLUGIN.mjs"),
|
|
80
80
|
mimeType: "application/x-mdl"
|
|
81
81
|
});
|
|
82
82
|
//#endregion
|
|
83
|
-
export { AnchorSort, CommentConfig, ComputeGraphRegistry, CreateObject, Markdown, OperationHandler, PluginAsset, ReactSurface, Schema, SheetState, SkillDefinition, Translations, UndoMappings };
|
|
83
|
+
export { AnchorSort, AppGraphBuilder, CommentConfig, ComputeGraphRegistry, CreateObject, Markdown, OperationHandler, PluginAsset, ReactSurface, Schema, SheetState, SkillDefinition, Translations, UndoMappings };
|
|
84
84
|
|
|
85
85
|
//# sourceMappingURL=capabilities.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ClientCapabilities from '@dxos/plugin-client/ClientCapabilities';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { SheetCapabilities, SheetEvents } from '#types';\n\n//
|
|
1
|
+
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ClientCapabilities from '@dxos/plugin-client/ClientCapabilities';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { SheetCapabilities, SheetEvents } from '#types';\n\n// Ordering-only: registers the sort comparator once the app graph exists; the body reads\n// nothing else.\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder.ts'));\nexport const AnchorSort = AppCapability.anchorSort(() => import('./anchor-sort.ts'), {\n requires: [AppCapabilities.AppGraph],\n activatesOn: SheetEvents.Start,\n});\nexport const CommentConfig = AppCapability.commentConfig(() => import('./comment-config.ts'), {\n activatesOn: SheetEvents.Start,\n environments: ['browser', 'node', 'tauri'],\n});\nexport const ComputeGraphRegistry = Capability.lazyModule(\n 'ComputeGraphRegistry',\n {\n // Headless: formulas evaluate in a markdown document with no sheet surface ever rendered, so\n // gating this on the sheet's own start conflates \"the sheet UI is on screen\" with \"compute\n // graphs exist\". Ungated (hence idle) it also becomes pullable by the consumers that need it\n // earlier, which a start-gated provider is not.\n requires: [ClientCapabilities.Client, Capabilities.ProcessManagerRuntime],\n provides: [SheetCapabilities.ComputeGraphRegistry],\n // Needs a client, which headless hosts (EDGE) do not provide.\n environments: ['browser', 'node', 'tauri'],\n },\n () => import('./compute-graph-registry.ts'),\n);\nexport const CreateObject = SpaceCapability.createObject(() => import('./create-object.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\nexport const Markdown = Capability.lazyModule(\n 'MarkdownExtension',\n {\n // The provider callbacks read the registry, so it must be in place when this activates.\n requires: [SheetCapabilities.ComputeGraphRegistry],\n provides: [MarkdownCapabilities.ExtensionProvider],\n activatesOn: MarkdownEvents.Start,\n // Follows its required registry, which headless hosts (EDGE) do not provide.\n environments: ['browser', 'node', 'tauri'],\n },\n () => import('./markdown-extension.ts'),\n);\nexport const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {\n roles: ['org.dxos.role.article', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],\n});\nexport const Schema = AppCapability.schema(() => import('./schema.ts'));\nexport const SheetState = Capability.lazyModule(\n 'SheetState',\n { provides: [SheetCapabilities.GridInstances], activatesOn: SheetEvents.Start },\n () => import('./state.ts'),\n);\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('./skill-definition.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\nexport const UndoMappings = AppCapability.undoMappings(() => import('./undo-mappings.ts'), {\n activatesOn: SheetEvents.Start,\n environments: ['browser', 'node', 'tauri'],\n});\nexport const Translations = AppCapability.translations(translations);\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;;;;;AAoBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,gCAAyB;AACnG,IAAa,aAAa,cAAc,iBAAiB,OAAO,4BAAqB;CACnF,UAAU,CAAC,gBAAgB,QAAQ;CACnC,aAAa,YAAY;AAC3B,CAAC;AACD,IAAa,gBAAgB,cAAc,oBAAoB,OAAO,+BAAwB;CAC5F,aAAa,YAAY;CACzB,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AACD,IAAa,uBAAuB,WAAW,WAC7C,wBACA;CAKE,UAAU,CAAC,mBAAmB,QAAQ,aAAa,qBAAqB;CACxE,UAAU,CAAC,kBAAkB,oBAAoB;CAEjD,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,SACM,OAAO,qCACf;AACA,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,8BAAuB,EAC3F,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AACD,IAAa,WAAW,WAAW,WACjC,qBACA;CAEE,UAAU,CAAC,kBAAkB,oBAAoB;CACjD,UAAU,CAAC,qBAAqB,iBAAiB;CACjD,aAAa,eAAe;CAE5B,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,SACM,OAAO,iCACf;AACA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA2B,EACrG,aAAa,iBAAiB,KAChC,CAAC;AACD,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAuB,EACpF,OAAO;CAAC;CAAyB;CAAkC;AAAuB,EAC5F,CAAC;AACD,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAc;AACtE,IAAa,aAAa,WAAW,WACnC,cACA;CAAE,UAAU,CAAC,kBAAkB,aAAa;CAAG,aAAa,YAAY;AAAM,SACxE,OAAO,oBACf;AACA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,iCAA0B,EAClG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AACD,IAAa,eAAe,cAAc,mBAAmB,OAAO,8BAAuB;CACzF,aAAa,YAAY;CACzB,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AACD,IAAa,eAAe,cAAc,aAAa,YAAY;AACnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC"}
|
|
@@ -9,6 +9,7 @@ import * as MarkdownCapabilities from "@dxos/plugin-markdown/MarkdownCapabilitie
|
|
|
9
9
|
import * as MarkdownEvents from "@dxos/plugin-markdown/MarkdownEvents";
|
|
10
10
|
import * as SpaceCapability from "@dxos/plugin-space/SpaceCapability";
|
|
11
11
|
//#region src/capabilities/gen/node.ts
|
|
12
|
+
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"));
|
|
12
13
|
var CommentConfig = AppCapability.commentConfig(() => import("./chunk-comment-config.mjs"), {
|
|
13
14
|
activatesOn: SheetEvents.Start,
|
|
14
15
|
environments: [
|
|
@@ -65,6 +66,6 @@ var AnchorSort = void 0;
|
|
|
65
66
|
var PluginAsset = void 0;
|
|
66
67
|
var ReactSurface = void 0;
|
|
67
68
|
//#endregion
|
|
68
|
-
export { AnchorSort, CommentConfig, ComputeGraphRegistry, CreateObject, Markdown, OperationHandler, PluginAsset, ReactSurface, Schema, SheetState, SkillDefinition, Translations, UndoMappings };
|
|
69
|
+
export { AnchorSort, AppGraphBuilder, CommentConfig, ComputeGraphRegistry, CreateObject, Markdown, OperationHandler, PluginAsset, ReactSurface, Schema, SheetState, SkillDefinition, Translations, UndoMappings };
|
|
69
70
|
|
|
70
71
|
//# sourceMappingURL=capabilities.node.mjs.map
|