@elaraai/east-ui 1.0.80 → 1.0.82
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/src/charts/chart/index.d.ts +4 -0
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/spec/index.d.ts +8 -0
- package/dist/src/charts/spec/index.d.ts.map +1 -1
- package/dist/src/collections/deck/index.d.ts +8 -0
- package/dist/src/collections/deck/index.d.ts.map +1 -1
- package/dist/src/collections/index.d.ts +2 -2
- package/dist/src/collections/index.d.ts.map +1 -1
- package/dist/src/collections/index.js.map +1 -1
- package/dist/src/collections/library/index.d.ts +4 -0
- package/dist/src/collections/library/index.d.ts.map +1 -1
- package/dist/src/collections/library/types.d.ts +4 -0
- package/dist/src/collections/library/types.d.ts.map +1 -1
- package/dist/src/collections/matrix/index.d.ts +56 -19
- package/dist/src/collections/matrix/index.d.ts.map +1 -1
- package/dist/src/collections/matrix/index.js +38 -24
- package/dist/src/collections/matrix/index.js.map +1 -1
- package/dist/src/collections/plan/assemble.d.ts +655 -2113
- package/dist/src/collections/plan/assemble.d.ts.map +1 -1
- package/dist/src/collections/plan/assemble.js +159 -136
- package/dist/src/collections/plan/assemble.js.map +1 -1
- package/dist/src/collections/plan/builders.d.ts +193 -40
- package/dist/src/collections/plan/builders.d.ts.map +1 -1
- package/dist/src/collections/plan/builders.js +162 -32
- package/dist/src/collections/plan/builders.js.map +1 -1
- package/dist/src/collections/plan/factories.d.ts +290 -116
- package/dist/src/collections/plan/factories.d.ts.map +1 -1
- package/dist/src/collections/plan/factories.js +281 -156
- package/dist/src/collections/plan/factories.js.map +1 -1
- package/dist/src/collections/plan/index.d.ts +111 -58
- package/dist/src/collections/plan/index.d.ts.map +1 -1
- package/dist/src/collections/plan/index.js +62 -31
- package/dist/src/collections/plan/index.js.map +1 -1
- package/dist/src/collections/plan/ir.d.ts +759 -1769
- package/dist/src/collections/plan/ir.d.ts.map +1 -1
- package/dist/src/collections/plan/ir.js +51 -27
- package/dist/src/collections/plan/ir.js.map +1 -1
- package/dist/src/collections/plan/pick.d.ts +89 -71
- package/dist/src/collections/plan/pick.d.ts.map +1 -1
- package/dist/src/collections/plan/pick.js +101 -86
- package/dist/src/collections/plan/pick.js.map +1 -1
- package/dist/src/collections/plan/root.d.ts +164 -77
- package/dist/src/collections/plan/root.d.ts.map +1 -1
- package/dist/src/collections/plan/root.js +350 -42
- package/dist/src/collections/plan/root.js.map +1 -1
- package/dist/src/collections/plan/series.d.ts +12524 -10527
- package/dist/src/collections/plan/series.d.ts.map +1 -1
- package/dist/src/collections/plan/series.js +1596 -298
- package/dist/src/collections/plan/series.js.map +1 -1
- package/dist/src/collections/plan/types.d.ts +6115 -2802
- package/dist/src/collections/plan/types.d.ts.map +1 -1
- package/dist/src/collections/plan/types.js +575 -170
- package/dist/src/collections/plan/types.js.map +1 -1
- package/dist/src/collections/sheet/bridge.d.ts +154 -43
- package/dist/src/collections/sheet/bridge.d.ts.map +1 -1
- package/dist/src/collections/sheet/bridge.js +383 -240
- package/dist/src/collections/sheet/bridge.js.map +1 -1
- package/dist/src/collections/sheet/columns.d.ts +66 -16
- package/dist/src/collections/sheet/columns.d.ts.map +1 -1
- package/dist/src/collections/sheet/columns.js +25 -25
- package/dist/src/collections/sheet/columns.js.map +1 -1
- package/dist/src/collections/sheet/context-bridge.d.ts +48 -0
- package/dist/src/collections/sheet/context-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/context-bridge.js +216 -0
- package/dist/src/collections/sheet/context-bridge.js.map +1 -0
- package/dist/src/collections/sheet/draft-bridge.d.ts +37 -0
- package/dist/src/collections/sheet/draft-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/draft-bridge.js +153 -0
- package/dist/src/collections/sheet/draft-bridge.js.map +1 -0
- package/dist/src/collections/sheet/drafts.d.ts +14 -0
- package/dist/src/collections/sheet/drafts.d.ts.map +1 -0
- package/dist/src/collections/sheet/drafts.js +14 -0
- package/dist/src/collections/sheet/drafts.js.map +1 -0
- package/dist/src/collections/sheet/editing-bridge.d.ts +36 -0
- package/dist/src/collections/sheet/editing-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/editing-bridge.js +196 -0
- package/dist/src/collections/sheet/editing-bridge.js.map +1 -0
- package/dist/src/collections/sheet/editing-types.d.ts +268 -0
- package/dist/src/collections/sheet/editing-types.d.ts.map +1 -0
- package/dist/src/collections/sheet/editing-types.js +34 -0
- package/dist/src/collections/sheet/editing-types.js.map +1 -0
- package/dist/src/collections/sheet/edits.d.ts +37 -0
- package/dist/src/collections/sheet/edits.d.ts.map +1 -0
- package/dist/src/collections/sheet/edits.js +31 -0
- package/dist/src/collections/sheet/edits.js.map +1 -0
- package/dist/src/collections/sheet/group.d.ts +165 -0
- package/dist/src/collections/sheet/group.d.ts.map +1 -0
- package/dist/src/collections/sheet/group.js +52 -0
- package/dist/src/collections/sheet/group.js.map +1 -0
- package/dist/src/collections/sheet/index.d.ts +171 -27
- package/dist/src/collections/sheet/index.d.ts.map +1 -1
- package/dist/src/collections/sheet/index.js +99 -17
- package/dist/src/collections/sheet/index.js.map +1 -1
- package/dist/src/collections/sheet/link.d.ts +22 -16
- package/dist/src/collections/sheet/link.d.ts.map +1 -1
- package/dist/src/collections/sheet/link.js +18 -12
- package/dist/src/collections/sheet/link.js.map +1 -1
- package/dist/src/collections/sheet/registers.d.ts +152 -5
- package/dist/src/collections/sheet/registers.d.ts.map +1 -1
- package/dist/src/collections/sheet/registers.js +154 -5
- package/dist/src/collections/sheet/registers.js.map +1 -1
- package/dist/src/collections/sheet/root.d.ts +175 -26
- package/dist/src/collections/sheet/root.d.ts.map +1 -1
- package/dist/src/collections/sheet/root.js +150 -26
- package/dist/src/collections/sheet/root.js.map +1 -1
- package/dist/src/collections/sheet/seed-bridge.d.ts +14 -0
- package/dist/src/collections/sheet/seed-bridge.d.ts.map +1 -0
- package/dist/src/collections/sheet/seed-bridge.js +51 -0
- package/dist/src/collections/sheet/seed-bridge.js.map +1 -0
- package/dist/src/collections/sheet/sub-rows.d.ts +249 -0
- package/dist/src/collections/sheet/sub-rows.d.ts.map +1 -0
- package/dist/src/collections/sheet/sub-rows.js +222 -0
- package/dist/src/collections/sheet/sub-rows.js.map +1 -0
- package/dist/src/collections/sheet/transactions.d.ts +76 -0
- package/dist/src/collections/sheet/transactions.d.ts.map +1 -0
- package/dist/src/collections/sheet/transactions.js +40 -0
- package/dist/src/collections/sheet/transactions.js.map +1 -0
- package/dist/src/collections/sheet/types.d.ts +12034 -3651
- package/dist/src/collections/sheet/types.d.ts.map +1 -1
- package/dist/src/collections/sheet/types.js +365 -48
- package/dist/src/collections/sheet/types.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +98 -123
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +97 -111
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/table/types.d.ts +87 -31
- package/dist/src/collections/table/types.d.ts.map +1 -1
- package/dist/src/collections/table/types.js +51 -26
- package/dist/src/collections/table/types.js.map +1 -1
- package/dist/src/collections/value-tree/flatten.d.ts.map +1 -1
- package/dist/src/collections/value-tree/flatten.js +4 -1
- package/dist/src/collections/value-tree/flatten.js.map +1 -1
- package/dist/src/component.d.ts +5075 -4079
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +46 -46
- package/dist/src/component.js.map +1 -1
- package/dist/src/contracts/approval.d.ts +10 -8
- package/dist/src/contracts/approval.d.ts.map +1 -1
- package/dist/src/contracts/approval.js +10 -8
- package/dist/src/contracts/approval.js.map +1 -1
- package/dist/src/contracts/drag.d.ts +11 -9
- package/dist/src/contracts/drag.d.ts.map +1 -1
- package/dist/src/contracts/drag.js +28 -21
- package/dist/src/contracts/drag.js.map +1 -1
- package/dist/src/contracts/editing.d.ts +1283 -0
- package/dist/src/contracts/editing.d.ts.map +1 -0
- package/dist/src/contracts/editing.js +711 -0
- package/dist/src/contracts/editing.js.map +1 -0
- package/dist/src/contracts/index.d.ts +2 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/index.js +2 -1
- package/dist/src/contracts/index.js.map +1 -1
- package/dist/src/contracts/pick.d.ts +6 -7
- package/dist/src/contracts/pick.d.ts.map +1 -1
- package/dist/src/contracts/pick.js +6 -7
- package/dist/src/contracts/pick.js.map +1 -1
- package/dist/src/contracts/review.d.ts +3 -1
- package/dist/src/contracts/review.d.ts.map +1 -1
- package/dist/src/contracts/review.js +3 -1
- package/dist/src/contracts/review.js.map +1 -1
- package/dist/src/contracts/source.d.ts +270 -80
- package/dist/src/contracts/source.d.ts.map +1 -1
- package/dist/src/contracts/source.js +357 -58
- package/dist/src/contracts/source.js.map +1 -1
- package/dist/src/display/chip-rail/index.d.ts.map +1 -1
- package/dist/src/display/chip-rail/index.js +10 -10
- package/dist/src/display/chip-rail/index.js.map +1 -1
- package/dist/src/extension.d.ts +2 -1
- package/dist/src/extension.d.ts.map +1 -1
- package/dist/src/extension.js +2 -1
- package/dist/src/extension.js.map +1 -1
- package/dist/src/format/index.d.ts +1 -154
- package/dist/src/format/index.d.ts.map +1 -1
- package/dist/src/format/types.d.ts +35 -23
- package/dist/src/format/types.d.ts.map +1 -1
- package/dist/src/format/types.js +16 -14
- package/dist/src/format/types.js.map +1 -1
- package/dist/src/forms/field/index.js +4 -4
- package/dist/src/forms/field/index.js.map +1 -1
- package/dist/src/forms/file-upload/index.js +16 -16
- package/dist/src/forms/file-upload/index.js.map +1 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +8 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +11 -3
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/box/index.d.ts.map +1 -1
- package/dist/src/layout/box/index.js +47 -47
- package/dist/src/layout/box/index.js.map +1 -1
- package/dist/src/layout/flex/index.d.ts.map +1 -1
- package/dist/src/layout/flex/index.js +47 -47
- package/dist/src/layout/flex/index.js.map +1 -1
- package/dist/src/layout/grid/index.js +11 -11
- package/dist/src/layout/grid/index.js.map +1 -1
- package/dist/src/layout/scroll-area/index.d.ts.map +1 -1
- package/dist/src/layout/scroll-area/index.js +8 -8
- package/dist/src/layout/scroll-area/index.js.map +1 -1
- package/dist/src/layout/separator/index.d.ts.map +1 -1
- package/dist/src/layout/separator/index.js +6 -6
- package/dist/src/layout/separator/index.js.map +1 -1
- package/dist/src/layout/stack/index.d.ts.map +1 -1
- package/dist/src/layout/stack/index.js +46 -46
- package/dist/src/layout/stack/index.js.map +1 -1
- package/dist/src/layout/sticky/index.d.ts.map +1 -1
- package/dist/src/layout/sticky/index.js +8 -8
- package/dist/src/layout/sticky/index.js.map +1 -1
- package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/index.js +8 -8
- package/dist/src/overlays/action-bar/index.js.map +1 -1
- package/dist/src/platform/index.d.ts +1 -1
- package/dist/src/platform/index.d.ts.map +1 -1
- package/dist/src/platform/index.js +1 -1
- package/dist/src/platform/index.js.map +1 -1
- package/dist/src/platform/slice/impl.d.ts +62 -51
- package/dist/src/platform/slice/impl.d.ts.map +1 -1
- package/dist/src/platform/slice/impl.js +155 -72
- package/dist/src/platform/slice/impl.js.map +1 -1
- package/dist/src/platform/slice/index.d.ts +3744 -2226
- package/dist/src/platform/slice/index.d.ts.map +1 -1
- package/dist/src/platform/slice/index.js +43 -1
- package/dist/src/platform/slice/index.js.map +1 -1
- package/dist/src/runtime/collections/deck.d.ts +4 -0
- package/dist/src/runtime/collections/deck.d.ts.map +1 -1
- package/dist/src/runtime/collections/matrix.d.ts +10 -9
- package/dist/src/runtime/collections/matrix.d.ts.map +1 -1
- package/dist/src/runtime/collections/matrix.js +11 -6
- package/dist/src/runtime/collections/matrix.js.map +1 -1
- package/dist/src/runtime/collections/plan.d.ts +148 -65
- package/dist/src/runtime/collections/plan.d.ts.map +1 -1
- package/dist/src/runtime/collections/plan.js +155 -67
- package/dist/src/runtime/collections/plan.js.map +1 -1
- package/dist/src/runtime/collections/sheet.d.ts +56 -23
- package/dist/src/runtime/collections/sheet.d.ts.map +1 -1
- package/dist/src/runtime/collections/sheet.js +30 -22
- package/dist/src/runtime/collections/sheet.js.map +1 -1
- package/dist/src/runtime/collections/table.d.ts +18 -11
- package/dist/src/runtime/collections/table.d.ts.map +1 -1
- package/dist/src/runtime/collections/table.js +7 -4
- package/dist/src/runtime/collections/table.js.map +1 -1
- package/dist/src/shared/reify.d.ts +4 -46
- package/dist/src/shared/reify.d.ts.map +1 -1
- package/dist/src/shared/reify.js +4 -61
- package/dist/src/shared/reify.js.map +1 -1
- package/dist/src/shared/tree.d.ts +88 -0
- package/dist/src/shared/tree.d.ts.map +1 -0
- package/dist/src/shared/tree.js +134 -0
- package/dist/src/shared/tree.js.map +1 -0
- package/dist/src/slice/breakdown/index.d.ts +4 -0
- package/dist/src/slice/breakdown/index.d.ts.map +1 -1
- package/dist/src/slice/breakdown/types.d.ts +4 -0
- package/dist/src/slice/breakdown/types.d.ts.map +1 -1
- package/dist/src/slice/cohort/index.d.ts +24 -4
- package/dist/src/slice/cohort/index.d.ts.map +1 -1
- package/dist/src/slice/cohort/index.js +8 -4
- package/dist/src/slice/cohort/index.js.map +1 -1
- package/dist/src/slice/cohort/types.d.ts +11 -0
- package/dist/src/slice/cohort/types.d.ts.map +1 -1
- package/dist/src/slice/cohort/types.js +7 -0
- package/dist/src/slice/cohort/types.js.map +1 -1
- package/dist/src/slice/filter/index.d.ts +4 -0
- package/dist/src/slice/filter/index.d.ts.map +1 -1
- package/dist/src/slice/filter/types.d.ts +4 -0
- package/dist/src/slice/filter/types.d.ts.map +1 -1
- package/dist/src/slice/index.d.ts +736 -0
- package/dist/src/slice/index.d.ts.map +1 -1
- package/dist/src/slice/legend/index.d.ts +4 -0
- package/dist/src/slice/legend/index.d.ts.map +1 -1
- package/dist/src/slice/legend/types.d.ts +4 -0
- package/dist/src/slice/legend/types.d.ts.map +1 -1
- package/dist/src/slice/rail/index.d.ts +8 -4
- package/dist/src/slice/rail/index.d.ts.map +1 -1
- package/dist/src/slice/rail/index.js.map +1 -1
- package/dist/src/slice/range/index.d.ts +4 -0
- package/dist/src/slice/range/index.d.ts.map +1 -1
- package/dist/src/slice/range/types.d.ts +4 -0
- package/dist/src/slice/range/types.d.ts.map +1 -1
- package/dist/src/slice/search/index.d.ts +4 -0
- package/dist/src/slice/search/index.d.ts.map +1 -1
- package/dist/src/slice/search/types.d.ts +4 -0
- package/dist/src/slice/search/types.d.ts.map +1 -1
- package/dist/src/slice/summary/index.d.ts +4 -0
- package/dist/src/slice/summary/index.d.ts.map +1 -1
- package/dist/src/slice/summary/types.d.ts +4 -0
- package/dist/src/slice/summary/types.d.ts.map +1 -1
- package/dist/src/typography/code/index.js +1 -1
- package/dist/src/typography/code/index.js.map +1 -1
- package/dist/src/typography/code-block/index.js +7 -7
- package/dist/src/typography/code-block/index.js.map +1 -1
- package/dist/src/typography/heading/index.js +2 -2
- package/dist/src/typography/heading/index.js.map +1 -1
- package/dist/src/typography/list/index.js +1 -1
- package/dist/src/typography/list/index.js.map +1 -1
- package/dist/src/typography/mark/index.js +1 -1
- package/dist/src/typography/mark/index.js.map +1 -1
- package/dist/src/typography/note/index.js +1 -1
- package/dist/src/typography/note/index.js.map +1 -1
- package/dist/src/typography/numeric/index.d.ts +3 -308
- package/dist/src/typography/numeric/index.d.ts.map +1 -1
- package/dist/src/typography/numeric/index.js +4 -4
- package/dist/src/typography/numeric/index.js.map +1 -1
- package/dist/src/typography/numeric/types.d.ts +1 -154
- package/dist/src/typography/numeric/types.d.ts.map +1 -1
- package/dist/src/typography/text/index.js +1 -1
- package/dist/src/typography/text/index.js.map +1 -1
- package/dist/test/collections/matrix.examples.d.ts +7 -3
- package/dist/test/collections/matrix.examples.d.ts.map +1 -1
- package/dist/test/collections/matrix.examples.js +55 -24
- package/dist/test/collections/matrix.examples.js.map +1 -1
- package/dist/test/collections/paged-source.examples.d.ts +4 -0
- package/dist/test/collections/paged-source.examples.d.ts.map +1 -1
- package/dist/test/collections/paged-source.examples.js +98 -13
- package/dist/test/collections/paged-source.examples.js.map +1 -1
- package/dist/test/collections/plan.examples.d.ts +101 -26
- package/dist/test/collections/plan.examples.d.ts.map +1 -1
- package/dist/test/collections/plan.examples.js +1481 -755
- package/dist/test/collections/plan.examples.js.map +1 -1
- package/dist/test/collections/sheet-link.examples.d.ts +7 -0
- package/dist/test/collections/sheet-link.examples.d.ts.map +1 -0
- package/dist/test/collections/sheet-link.examples.js +41 -0
- package/dist/test/collections/sheet-link.examples.js.map +1 -0
- package/dist/test/collections/sheet-transactions.examples.d.ts +7 -0
- package/dist/test/collections/sheet-transactions.examples.d.ts.map +1 -0
- package/dist/test/collections/sheet-transactions.examples.js +58 -0
- package/dist/test/collections/sheet-transactions.examples.js.map +1 -0
- package/dist/test/collections/sheet.examples.d.ts +52 -5
- package/dist/test/collections/sheet.examples.d.ts.map +1 -1
- package/dist/test/collections/sheet.examples.js +500 -158
- package/dist/test/collections/sheet.examples.js.map +1 -1
- package/dist/test/collections/table.examples.d.ts +31 -3
- package/dist/test/collections/table.examples.d.ts.map +1 -1
- package/dist/test/collections/table.examples.js +188 -28
- package/dist/test/collections/table.examples.js.map +1 -1
- package/dist/test/contracts/editing.examples.d.ts +7 -0
- package/dist/test/contracts/editing.examples.d.ts.map +1 -0
- package/dist/test/contracts/editing.examples.js +58 -0
- package/dist/test/contracts/editing.examples.js.map +1 -0
- package/dist/test/layout/splitter.examples.d.ts.map +1 -1
- package/dist/test/layout/splitter.examples.js +3 -1
- package/dist/test/layout/splitter.examples.js.map +1 -1
- package/dist/test/platform/slice.examples.d.ts.map +1 -1
- package/dist/test/platform/slice.examples.js +1 -0
- package/dist/test/platform/slice.examples.js.map +1 -1
- package/dist/test/slice/slice.examples.d.ts.map +1 -1
- package/dist/test/slice/slice.examples.js +5 -2
- package/dist/test/slice/slice.examples.js.map +1 -1
- package/package.json +4 -3
- package/dist/src/collections/plan/data-forms.d.ts +0 -332
- package/dist/src/collections/plan/data-forms.d.ts.map +0 -1
- package/dist/src/collections/plan/data-forms.js +0 -212
- package/dist/src/collections/plan/data-forms.js.map +0 -1
|
@@ -0,0 +1,1283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The editing contract (#879) — one transaction session for every editable
|
|
7
|
+
* collection. A gesture edits DRAFTS (every field missing, a value, or text
|
|
8
|
+
* that could not be read); each gesture is one undoable transaction, reported
|
|
9
|
+
* to the host as a {@link EditingPatchEventTypeFor patch event}; and Apply
|
|
10
|
+
* sends one checked, idempotent batch ({@link EditingChangeSetTypeFor}) against
|
|
11
|
+
* the base the drafts began from, which {@link applyEditing} applies to a
|
|
12
|
+
* collection atomically.
|
|
13
|
+
*
|
|
14
|
+
* The Sheet was first to speak it, and keeps its names for it —
|
|
15
|
+
* `Sheet.Types.ChangeSet` is `Editing.Types.ChangeSet`, `Sheet.apply` is
|
|
16
|
+
* `Editing.apply`. What only a sheet has (a new row's destination among a
|
|
17
|
+
* group's children, the `newRow` / `newGroup` contexts) stays the Sheet's.
|
|
18
|
+
*
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
import { ArrayType, AsyncFunctionType, BlobType, DictType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, type EastType, type ExprType, type PatchTypeOf } from "@elaraai/east";
|
|
22
|
+
/**
|
|
23
|
+
* A position in an explicitly ordered collection.
|
|
24
|
+
*
|
|
25
|
+
* @property start - First
|
|
26
|
+
* @property end - Last
|
|
27
|
+
* @property before - Just before the entry with this id
|
|
28
|
+
* @property after - Just after the entry with this id
|
|
29
|
+
*/
|
|
30
|
+
export declare const EditingPositionType: VariantType<{
|
|
31
|
+
readonly start: NullType;
|
|
32
|
+
readonly end: NullType;
|
|
33
|
+
readonly before: StringType;
|
|
34
|
+
readonly after: StringType;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Where an entry stands: a position in an ordered collection, or the key order
|
|
38
|
+
* of a keyed one.
|
|
39
|
+
*
|
|
40
|
+
* @property ordered - A position in an Array source
|
|
41
|
+
* @property keyOrder - A keyed source's own order — its entries sort by key
|
|
42
|
+
*/
|
|
43
|
+
export declare const EditingPlacementType: VariantType<{
|
|
44
|
+
readonly ordered: VariantType<{
|
|
45
|
+
readonly start: NullType;
|
|
46
|
+
readonly end: NullType;
|
|
47
|
+
readonly before: StringType;
|
|
48
|
+
readonly after: StringType;
|
|
49
|
+
}>;
|
|
50
|
+
readonly keyOrder: NullType;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* One issue on a field, as an author check reports it.
|
|
54
|
+
*
|
|
55
|
+
* @property field - The field
|
|
56
|
+
* @property message - What is wrong, in the author's words
|
|
57
|
+
*/
|
|
58
|
+
export declare const EditingFieldIssueType: StructType<{
|
|
59
|
+
readonly field: StringType;
|
|
60
|
+
readonly message: StringType;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* One entry's readiness, after the structural checks and the author's.
|
|
64
|
+
*
|
|
65
|
+
* @property ready - Nothing stands in the way
|
|
66
|
+
* @property incomplete - Fields still missing
|
|
67
|
+
* @property invalid - Fields whose text could not be read, or that a check refused
|
|
68
|
+
*/
|
|
69
|
+
export declare const EditingReadinessType: VariantType<{
|
|
70
|
+
readonly ready: NullType;
|
|
71
|
+
readonly incomplete: ArrayType<StructType<{
|
|
72
|
+
readonly field: StringType;
|
|
73
|
+
readonly message: StringType;
|
|
74
|
+
}>>;
|
|
75
|
+
readonly invalid: ArrayType<StructType<{
|
|
76
|
+
readonly field: StringType;
|
|
77
|
+
readonly message: StringType;
|
|
78
|
+
}>>;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* An issue addressed to an entry, and optionally to a child row and a field.
|
|
82
|
+
*
|
|
83
|
+
* @property entry - The entry's id
|
|
84
|
+
* @property row - The child row's index in a group's children, when it is one
|
|
85
|
+
* @property field - The field, when the issue has one
|
|
86
|
+
* @property message - What is wrong
|
|
87
|
+
*/
|
|
88
|
+
export declare const EditingIssueType: StructType<{
|
|
89
|
+
readonly entry: StringType;
|
|
90
|
+
readonly row: OptionType<IntegerType>;
|
|
91
|
+
readonly field: OptionType<StringType>;
|
|
92
|
+
readonly message: StringType;
|
|
93
|
+
}>;
|
|
94
|
+
/**
|
|
95
|
+
* The readiness of a whole batch — every draft's issues together.
|
|
96
|
+
*
|
|
97
|
+
* @property ready - The batch may be applied
|
|
98
|
+
* @property incomplete - Fields still missing
|
|
99
|
+
* @property invalid - Fields whose text could not be read, or that a check refused
|
|
100
|
+
*/
|
|
101
|
+
export declare const EditingBatchReadinessType: VariantType<{
|
|
102
|
+
readonly ready: NullType;
|
|
103
|
+
readonly incomplete: ArrayType<StructType<{
|
|
104
|
+
readonly entry: StringType;
|
|
105
|
+
readonly row: OptionType<IntegerType>;
|
|
106
|
+
readonly field: OptionType<StringType>;
|
|
107
|
+
readonly message: StringType;
|
|
108
|
+
}>>;
|
|
109
|
+
readonly invalid: ArrayType<StructType<{
|
|
110
|
+
readonly entry: StringType;
|
|
111
|
+
readonly row: OptionType<IntegerType>;
|
|
112
|
+
readonly field: OptionType<StringType>;
|
|
113
|
+
readonly message: StringType;
|
|
114
|
+
}>>;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* The gesture that made one transaction — how a host tells typing from a
|
|
118
|
+
* paste, a copilot's fill from a planner's drag, and a history step from both.
|
|
119
|
+
*
|
|
120
|
+
* @property typed - Typed into a cell
|
|
121
|
+
* @property pasted - Pasted
|
|
122
|
+
* @property fill - A copilot's fill taken
|
|
123
|
+
* @property row - A copilot's row fill taken
|
|
124
|
+
* @property pattern - A proposed row taken
|
|
125
|
+
* @property insert - An entry inserted
|
|
126
|
+
* @property move - An entry moved
|
|
127
|
+
* @property remove - An entry removed
|
|
128
|
+
* @property resize - An element's extent changed (#879 — a Plan run's start or end)
|
|
129
|
+
* @property drop - Something dropped onto the collection from elsewhere (#879)
|
|
130
|
+
* @property verdict - A review verdict (#879 — Approve, Reject, and their "all" forms)
|
|
131
|
+
* @property undo - Undo
|
|
132
|
+
* @property redo - Redo
|
|
133
|
+
* @property discard - Drafts discarded
|
|
134
|
+
*/
|
|
135
|
+
export declare const EditingOriginType: VariantType<{
|
|
136
|
+
readonly typed: NullType;
|
|
137
|
+
readonly pasted: NullType;
|
|
138
|
+
readonly fill: NullType;
|
|
139
|
+
readonly row: NullType;
|
|
140
|
+
readonly pattern: NullType;
|
|
141
|
+
readonly insert: NullType;
|
|
142
|
+
readonly move: NullType;
|
|
143
|
+
readonly remove: NullType;
|
|
144
|
+
readonly resize: NullType;
|
|
145
|
+
readonly drop: NullType;
|
|
146
|
+
readonly verdict: NullType;
|
|
147
|
+
readonly undo: NullType;
|
|
148
|
+
readonly redo: NullType;
|
|
149
|
+
readonly discard: NullType;
|
|
150
|
+
}>;
|
|
151
|
+
/**
|
|
152
|
+
* The source's authoritative answer to one idempotent request.
|
|
153
|
+
*
|
|
154
|
+
* @property applied - Applied; a mutable source names the revision it committed
|
|
155
|
+
* @property rejected - Refused as asked — revise the drafts before applying again
|
|
156
|
+
* @property conflict - The source moved on — review or discard the drafts
|
|
157
|
+
*/
|
|
158
|
+
export declare const EditingApplyResultType: VariantType<{
|
|
159
|
+
readonly applied: StructType<{
|
|
160
|
+
readonly revision: OptionType<StringType>;
|
|
161
|
+
}>;
|
|
162
|
+
readonly rejected: ArrayType<StructType<{
|
|
163
|
+
readonly entry: StringType;
|
|
164
|
+
readonly row: OptionType<IntegerType>;
|
|
165
|
+
readonly field: OptionType<StringType>;
|
|
166
|
+
readonly message: StringType;
|
|
167
|
+
}>>;
|
|
168
|
+
readonly conflict: ArrayType<StructType<{
|
|
169
|
+
readonly entry: StringType;
|
|
170
|
+
readonly row: OptionType<IntegerType>;
|
|
171
|
+
readonly field: OptionType<StringType>;
|
|
172
|
+
readonly message: StringType;
|
|
173
|
+
}>>;
|
|
174
|
+
}>;
|
|
175
|
+
/**
|
|
176
|
+
* One field of a draft — missing, a value of the field's type, or the text a
|
|
177
|
+
* planner typed that could not be read, kept as typed.
|
|
178
|
+
*
|
|
179
|
+
* @typeParam T - The field's type
|
|
180
|
+
* @param type - The field's type
|
|
181
|
+
* @returns The field's draft variant
|
|
182
|
+
*/
|
|
183
|
+
export declare function EditingDraftFieldType<T extends EastType>(type: T): VariantType<{
|
|
184
|
+
readonly missing: NullType;
|
|
185
|
+
readonly value: T;
|
|
186
|
+
readonly invalid: StringType;
|
|
187
|
+
}>;
|
|
188
|
+
/** The field-by-field draft type of a domain struct. */
|
|
189
|
+
export type EditingDraftOf<R extends StructType> = StructType<{
|
|
190
|
+
[K in keyof R["fields"]]: ReturnType<typeof EditingDraftFieldType<R["fields"][K]>>;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* Constructs the field-by-field draft type of a struct, including the fields
|
|
194
|
+
* no column shows.
|
|
195
|
+
*
|
|
196
|
+
* @typeParam R - The domain row type
|
|
197
|
+
* @param rowType - The complete domain struct
|
|
198
|
+
* @returns The draft struct; an optional domain field still starts missing
|
|
199
|
+
*/
|
|
200
|
+
export declare function EditingDraftTypeFor<R extends StructType>(rowType: R): EditingDraftOf<R>;
|
|
201
|
+
/** Fields that can hold a group's child rows. */
|
|
202
|
+
export type EditingChildrenField<G extends StructType> = {
|
|
203
|
+
[K in keyof G["fields"] & string]: G["fields"][K] extends ArrayType<StructType> ? K : never;
|
|
204
|
+
}[keyof G["fields"] & string];
|
|
205
|
+
/** The row type a group's child array holds. */
|
|
206
|
+
export type EditingChildOf<G extends StructType, F extends EditingChildrenField<G>> = G["fields"][F] extends ArrayType<infer R extends StructType> ? R : never;
|
|
207
|
+
/** A group's draft — its own fields drafted, its child array kept ordered, each child a draft. */
|
|
208
|
+
export type EditingDraftGroupOf<G extends StructType, F extends EditingChildrenField<G>> = StructType<{
|
|
209
|
+
[K in keyof G["fields"]]: K extends F ? ArrayType<EditingDraftOf<EditingChildOf<G, F>>> : ReturnType<typeof EditingDraftFieldType<G["fields"][K]>>;
|
|
210
|
+
}>;
|
|
211
|
+
/**
|
|
212
|
+
* Constructs a group's draft type, with drafts in its child array.
|
|
213
|
+
*
|
|
214
|
+
* @typeParam G - The complete group struct
|
|
215
|
+
* @typeParam F - Its Array-of-structs child field
|
|
216
|
+
* @param groupType - The group type
|
|
217
|
+
* @param field - The child array field
|
|
218
|
+
* @returns The group's draft struct
|
|
219
|
+
* @throws {Error} When the named field is not an Array of structs
|
|
220
|
+
*/
|
|
221
|
+
export declare function EditingDraftGroupTypeFor<G extends StructType, F extends EditingChildrenField<G>>(groupType: G, field: F): EditingDraftGroupOf<G, F>;
|
|
222
|
+
/**
|
|
223
|
+
* Constructs the union of groups carrying child rows and ungrouped rows. The
|
|
224
|
+
* child field is recorded with the type, so {@link EditingDraftEntryTypeFor}
|
|
225
|
+
* and {@link EditingPatchEventTypeFor} find it without being told again.
|
|
226
|
+
*
|
|
227
|
+
* @remarks
|
|
228
|
+
* The Sheet names it `Sheet.Types.Entry`; the example below uses that name.
|
|
229
|
+
*
|
|
230
|
+
* @typeParam G - The group struct
|
|
231
|
+
* @typeParam F - Its Array-of-structs child field
|
|
232
|
+
* @param groupType - The group type
|
|
233
|
+
* @param field - The child array field
|
|
234
|
+
* @returns The group-or-row entry type
|
|
235
|
+
* @throws {Error} When the child field is not an Array of structs
|
|
236
|
+
* @example
|
|
237
|
+
* ```ts
|
|
238
|
+
* import { ArrayType, East, OptionType, StringType, StructType, none, some, variant } from "@elaraai/east";
|
|
239
|
+
* import { Sheet } from "@elaraai/east-ui";
|
|
240
|
+
*
|
|
241
|
+
* const reordered = East.function([], ArrayType(StringType), ($) => {
|
|
242
|
+
* const TaskType = StructType({ id: StringType, task: StringType });
|
|
243
|
+
* const PackageType = StructType({ id: StringType, name: StringType, tasks: ArrayType(TaskType) });
|
|
244
|
+
* const Entry = Sheet.Types.Entry(PackageType, "tasks");
|
|
245
|
+
* const before = $.const(variant("group", { id: "p1", name: "P-40 roughing", tasks: [
|
|
246
|
+
* { id: "t1", task: "Machine blanks" }, { id: "t2", task: "Inspect lots" },
|
|
247
|
+
* ] }), Entry);
|
|
248
|
+
* const after = $.const(variant("group", { id: "p1", name: "P-40 roughing", tasks: [
|
|
249
|
+
* { id: "t2", task: "Inspect lots" }, { id: "t1", task: "Machine blanks" },
|
|
250
|
+
* ] }), Entry);
|
|
251
|
+
* const loose = $.const(variant("row", { id: "t9", task: "Pack for shipping" }), Entry);
|
|
252
|
+
* const entries = $.const([before, loose], ArrayType(Entry));
|
|
253
|
+
* const oldEntry = $.const(some(before), OptionType(Entry));
|
|
254
|
+
* const newEntry = $.const(some(after), OptionType(Entry));
|
|
255
|
+
* const batch = $.const({
|
|
256
|
+
* requestId: "reorder-roughing", base: variant("snapshot", entries), label: "Move a task",
|
|
257
|
+
* changes: [{ id: "p1", patch: East.diff(oldEntry, newEntry), place: none }],
|
|
258
|
+
* }, Sheet.Types.ChangeSet(Entry));
|
|
259
|
+
* const apply = $.const(Sheet.apply(Entry, "id"));
|
|
260
|
+
* const applied = $.const(apply(entries, batch, none).unwrap("applied"));
|
|
261
|
+
* return applied.map((_$, entry) => entry.match({
|
|
262
|
+
* group: (_$2, p) => East.str`${p.name}: ${p.tasks.map((_$3, t) => t.task).stringJoin(" → ")}`,
|
|
263
|
+
* row: (_$2, t) => t.task,
|
|
264
|
+
* }));
|
|
265
|
+
* });
|
|
266
|
+
* ```
|
|
267
|
+
*/
|
|
268
|
+
export declare function EditingEntryTypeFor<G extends StructType, F extends EditingChildrenField<G>>(groupType: G, field: F): VariantType<{
|
|
269
|
+
group: G;
|
|
270
|
+
row: EditingChildOf<G, F>;
|
|
271
|
+
}>;
|
|
272
|
+
/** Child fields whose row type matches an entry union's ungrouped arm. */
|
|
273
|
+
type MatchingChildren<G extends StructType, R extends StructType> = {
|
|
274
|
+
[K in EditingChildrenField<G>]: G["fields"][K] extends ArrayType<R> ? K : never;
|
|
275
|
+
}[EditingChildrenField<G>];
|
|
276
|
+
/** The draft type of a flat, grouped-only, or group-or-row entry. */
|
|
277
|
+
export type EditingDraftEntryOf<E extends EastType, F extends string = never> = E extends VariantType<{
|
|
278
|
+
group: infer G extends StructType;
|
|
279
|
+
row: infer R extends StructType;
|
|
280
|
+
}> ? VariantType<{
|
|
281
|
+
group: EditingDraftGroupOf<G, MatchingChildren<G, R>>;
|
|
282
|
+
row: EditingDraftOf<R>;
|
|
283
|
+
}> : E extends StructType ? [F] extends [never] ? EditingDraftOf<E> : EditingDraftGroupOf<E, F & EditingChildrenField<E>> : never;
|
|
284
|
+
/**
|
|
285
|
+
* Constructs the draft equivalent of a source entry.
|
|
286
|
+
*
|
|
287
|
+
* @typeParam E - The entry schema
|
|
288
|
+
* @typeParam F - A groups-only source's child field
|
|
289
|
+
* @param entryType - A flat struct or a group-or-row union
|
|
290
|
+
* @param field - The child field for a groups-only source
|
|
291
|
+
* @returns The draft entry schema
|
|
292
|
+
* @throws {Error} When a group union has no unambiguous child field
|
|
293
|
+
*/
|
|
294
|
+
export declare function EditingDraftEntryTypeFor<E extends EastType, F extends string = never>(entryType: E, field?: F): EditingDraftEntryOf<E, F>;
|
|
295
|
+
/** The collection a source of entries `E` holds: an Array, or a Dict keyed by `K`. */
|
|
296
|
+
export type EditingCollectionOf<E extends EastType, K extends EastType | undefined> = [
|
|
297
|
+
K
|
|
298
|
+
] extends [EastType] ? DictType<K, E> : ArrayType<E>;
|
|
299
|
+
/**
|
|
300
|
+
* Constructs the checked base of a batch — the revision a mutable source
|
|
301
|
+
* committed, or the whole inline collection the drafts began from.
|
|
302
|
+
*
|
|
303
|
+
* @typeParam E - The source entry type
|
|
304
|
+
* @typeParam K - A keyed source's key type; omitted for an Array
|
|
305
|
+
* @param entryType - The source entry type
|
|
306
|
+
* @param keyType - A keyed source's key type
|
|
307
|
+
* @returns A revision token or the complete collection snapshot
|
|
308
|
+
*/
|
|
309
|
+
export declare function EditingBaseTypeFor<E extends EastType, K extends EastType | undefined = undefined>(entryType: E, keyType?: K): VariantType<{
|
|
310
|
+
revision: StringType;
|
|
311
|
+
snapshot: EditingCollectionOf<E, K>;
|
|
312
|
+
}>;
|
|
313
|
+
/**
|
|
314
|
+
* Constructs one composed entry patch and its placement.
|
|
315
|
+
*
|
|
316
|
+
* @typeParam E - The source entry type
|
|
317
|
+
* @param entryType - The source entry type
|
|
318
|
+
* @returns An entry-addressed East patch; `none` stands for an absent entry
|
|
319
|
+
*/
|
|
320
|
+
export declare function EditingChangeTypeFor<E extends EastType>(entryType: E): StructType<{
|
|
321
|
+
readonly id: StringType;
|
|
322
|
+
readonly patch: PatchTypeOf<OptionType<E>>;
|
|
323
|
+
readonly place: OptionType<VariantType<{
|
|
324
|
+
readonly ordered: VariantType<{
|
|
325
|
+
readonly start: NullType;
|
|
326
|
+
readonly end: NullType;
|
|
327
|
+
readonly before: StringType;
|
|
328
|
+
readonly after: StringType;
|
|
329
|
+
}>;
|
|
330
|
+
readonly keyOrder: NullType;
|
|
331
|
+
}>>;
|
|
332
|
+
}>;
|
|
333
|
+
/**
|
|
334
|
+
* Constructs an atomic request against a checked base — what `onApply`
|
|
335
|
+
* receives.
|
|
336
|
+
*
|
|
337
|
+
* @typeParam E - The source entry type
|
|
338
|
+
* @typeParam K - A keyed source's key type; omitted for an Array
|
|
339
|
+
* @param entryType - The source entry type
|
|
340
|
+
* @param keyType - A keyed source's key type
|
|
341
|
+
* @returns The batch type
|
|
342
|
+
*/
|
|
343
|
+
export declare function EditingChangeSetTypeFor<E extends EastType, K extends EastType | undefined = undefined>(entryType: E, keyType?: K): StructType<{
|
|
344
|
+
readonly requestId: StringType;
|
|
345
|
+
readonly base: VariantType<{
|
|
346
|
+
revision: StringType;
|
|
347
|
+
snapshot: EditingCollectionOf<E, K>;
|
|
348
|
+
}>;
|
|
349
|
+
readonly label: StringType;
|
|
350
|
+
readonly changes: ArrayType<StructType<{
|
|
351
|
+
readonly id: StringType;
|
|
352
|
+
readonly patch: VariantType<{
|
|
353
|
+
unchanged: NullType;
|
|
354
|
+
replace: StructType<{
|
|
355
|
+
before: OptionType<E>;
|
|
356
|
+
after: OptionType<E>;
|
|
357
|
+
}>;
|
|
358
|
+
patch: VariantType<{
|
|
359
|
+
none: VariantType<{
|
|
360
|
+
unchanged: NullType;
|
|
361
|
+
replace: StructType<{
|
|
362
|
+
before: NullType;
|
|
363
|
+
after: NullType;
|
|
364
|
+
}>;
|
|
365
|
+
}>;
|
|
366
|
+
some: E extends EastType ? PatchTypeOf<E> : never;
|
|
367
|
+
}>;
|
|
368
|
+
}>;
|
|
369
|
+
readonly place: OptionType<VariantType<{
|
|
370
|
+
readonly ordered: VariantType<{
|
|
371
|
+
readonly start: NullType;
|
|
372
|
+
readonly end: NullType;
|
|
373
|
+
readonly before: StringType;
|
|
374
|
+
readonly after: StringType;
|
|
375
|
+
}>;
|
|
376
|
+
readonly keyOrder: NullType;
|
|
377
|
+
}>>;
|
|
378
|
+
}>>;
|
|
379
|
+
}>;
|
|
380
|
+
/**
|
|
381
|
+
* Constructs the result of {@link applyEditing}.
|
|
382
|
+
*
|
|
383
|
+
* @typeParam E - The source entry type
|
|
384
|
+
* @typeParam K - A keyed source's key type; omitted for an Array
|
|
385
|
+
* @param entryType - The source entry type
|
|
386
|
+
* @param keyType - A keyed source's key type
|
|
387
|
+
* @returns The complete applied collection, or the conflict's issues
|
|
388
|
+
*/
|
|
389
|
+
export declare function EditingAppliedTypeFor<E extends EastType, K extends EastType | undefined = undefined>(entryType: E, keyType?: K): VariantType<{
|
|
390
|
+
applied: EditingCollectionOf<E, K>;
|
|
391
|
+
conflict: ArrayType<typeof EditingIssueType>;
|
|
392
|
+
}>;
|
|
393
|
+
/**
|
|
394
|
+
* Constructs one gesture's typed, draft-aware patch event — what `onPatch`
|
|
395
|
+
* receives, incomplete drafts included.
|
|
396
|
+
*
|
|
397
|
+
* @typeParam E - The source entry type
|
|
398
|
+
* @typeParam F - A groups-only source's child field
|
|
399
|
+
* @param entryType - The domain entry schema
|
|
400
|
+
* @param field - The child field for a groups-only source
|
|
401
|
+
* @returns The event: its gesture, the draft changes, the domain changes once every draft is complete, and the batch's readiness
|
|
402
|
+
*/
|
|
403
|
+
export declare function EditingPatchEventTypeFor<E extends EastType, F extends string = never>(entryType: E, field?: F): StructType<{
|
|
404
|
+
readonly transactionId: StringType;
|
|
405
|
+
readonly origin: VariantType<{
|
|
406
|
+
readonly typed: NullType;
|
|
407
|
+
readonly pasted: NullType;
|
|
408
|
+
readonly fill: NullType;
|
|
409
|
+
readonly row: NullType;
|
|
410
|
+
readonly pattern: NullType;
|
|
411
|
+
readonly insert: NullType;
|
|
412
|
+
readonly move: NullType;
|
|
413
|
+
readonly remove: NullType;
|
|
414
|
+
readonly resize: NullType;
|
|
415
|
+
readonly drop: NullType;
|
|
416
|
+
readonly verdict: NullType;
|
|
417
|
+
readonly undo: NullType;
|
|
418
|
+
readonly redo: NullType;
|
|
419
|
+
readonly discard: NullType;
|
|
420
|
+
}>;
|
|
421
|
+
readonly label: StringType;
|
|
422
|
+
readonly draftChanges: ArrayType<StructType<{
|
|
423
|
+
readonly id: StringType;
|
|
424
|
+
readonly patch: VariantType<{
|
|
425
|
+
unchanged: NullType;
|
|
426
|
+
replace: StructType<{
|
|
427
|
+
before: OptionType<EditingDraftEntryOf<E, F>>;
|
|
428
|
+
after: OptionType<EditingDraftEntryOf<E, F>>;
|
|
429
|
+
}>;
|
|
430
|
+
patch: VariantType<{
|
|
431
|
+
none: VariantType<{
|
|
432
|
+
unchanged: NullType;
|
|
433
|
+
replace: StructType<{
|
|
434
|
+
before: NullType;
|
|
435
|
+
after: NullType;
|
|
436
|
+
}>;
|
|
437
|
+
}>;
|
|
438
|
+
some: EditingDraftEntryOf<E, F> extends EastType ? PatchTypeOf<EditingDraftEntryOf<E, F>> : never;
|
|
439
|
+
}>;
|
|
440
|
+
}>;
|
|
441
|
+
readonly place: OptionType<VariantType<{
|
|
442
|
+
readonly ordered: VariantType<{
|
|
443
|
+
readonly start: NullType;
|
|
444
|
+
readonly end: NullType;
|
|
445
|
+
readonly before: StringType;
|
|
446
|
+
readonly after: StringType;
|
|
447
|
+
}>;
|
|
448
|
+
readonly keyOrder: NullType;
|
|
449
|
+
}>>;
|
|
450
|
+
}>>;
|
|
451
|
+
readonly domainChanges: OptionType<ArrayType<StructType<{
|
|
452
|
+
readonly id: StringType;
|
|
453
|
+
readonly patch: VariantType<{
|
|
454
|
+
unchanged: NullType;
|
|
455
|
+
replace: StructType<{
|
|
456
|
+
before: OptionType<E>;
|
|
457
|
+
after: OptionType<E>;
|
|
458
|
+
}>;
|
|
459
|
+
patch: VariantType<{
|
|
460
|
+
none: VariantType<{
|
|
461
|
+
unchanged: NullType;
|
|
462
|
+
replace: StructType<{
|
|
463
|
+
before: NullType;
|
|
464
|
+
after: NullType;
|
|
465
|
+
}>;
|
|
466
|
+
}>;
|
|
467
|
+
some: E extends EastType ? PatchTypeOf<E> : never;
|
|
468
|
+
}>;
|
|
469
|
+
}>;
|
|
470
|
+
readonly place: OptionType<VariantType<{
|
|
471
|
+
readonly ordered: VariantType<{
|
|
472
|
+
readonly start: NullType;
|
|
473
|
+
readonly end: NullType;
|
|
474
|
+
readonly before: StringType;
|
|
475
|
+
readonly after: StringType;
|
|
476
|
+
}>;
|
|
477
|
+
readonly keyOrder: NullType;
|
|
478
|
+
}>>;
|
|
479
|
+
}>>>;
|
|
480
|
+
readonly readiness: VariantType<{
|
|
481
|
+
readonly ready: NullType;
|
|
482
|
+
readonly incomplete: ArrayType<StructType<{
|
|
483
|
+
readonly entry: StringType;
|
|
484
|
+
readonly row: OptionType<IntegerType>;
|
|
485
|
+
readonly field: OptionType<StringType>;
|
|
486
|
+
readonly message: StringType;
|
|
487
|
+
}>>;
|
|
488
|
+
readonly invalid: ArrayType<StructType<{
|
|
489
|
+
readonly entry: StringType;
|
|
490
|
+
readonly row: OptionType<IntegerType>;
|
|
491
|
+
readonly field: OptionType<StringType>;
|
|
492
|
+
readonly message: StringType;
|
|
493
|
+
}>>;
|
|
494
|
+
}>;
|
|
495
|
+
}>;
|
|
496
|
+
/**
|
|
497
|
+
* Constructs the patch event of a collection whose drafts take another shape
|
|
498
|
+
* than a field-by-field one — the Plan drafts a whole entry at once
|
|
499
|
+
* (`DraftField(E)`, #880), since every gesture on it writes a complete entry.
|
|
500
|
+
* {@link EditingPatchEventTypeFor} is this over the field-by-field draft.
|
|
501
|
+
*
|
|
502
|
+
* @typeParam E - The source entry type
|
|
503
|
+
* @typeParam D - The entry's draft type
|
|
504
|
+
* @param entryType - The domain entry schema
|
|
505
|
+
* @param draftType - The entry's draft schema
|
|
506
|
+
* @returns The event: its gesture, the draft changes, the domain changes once every draft is complete, and the batch's readiness
|
|
507
|
+
*/
|
|
508
|
+
export declare function EditingPatchEventTypeWith<E extends EastType, D extends EastType>(entryType: E, draftType: D): StructType<{
|
|
509
|
+
readonly transactionId: StringType;
|
|
510
|
+
readonly origin: VariantType<{
|
|
511
|
+
readonly typed: NullType;
|
|
512
|
+
readonly pasted: NullType;
|
|
513
|
+
readonly fill: NullType;
|
|
514
|
+
readonly row: NullType;
|
|
515
|
+
readonly pattern: NullType;
|
|
516
|
+
readonly insert: NullType;
|
|
517
|
+
readonly move: NullType;
|
|
518
|
+
readonly remove: NullType;
|
|
519
|
+
readonly resize: NullType;
|
|
520
|
+
readonly drop: NullType;
|
|
521
|
+
readonly verdict: NullType;
|
|
522
|
+
readonly undo: NullType;
|
|
523
|
+
readonly redo: NullType;
|
|
524
|
+
readonly discard: NullType;
|
|
525
|
+
}>;
|
|
526
|
+
readonly label: StringType;
|
|
527
|
+
readonly draftChanges: ArrayType<StructType<{
|
|
528
|
+
readonly id: StringType;
|
|
529
|
+
readonly patch: VariantType<{
|
|
530
|
+
unchanged: NullType;
|
|
531
|
+
replace: StructType<{
|
|
532
|
+
before: OptionType<D>;
|
|
533
|
+
after: OptionType<D>;
|
|
534
|
+
}>;
|
|
535
|
+
patch: VariantType<{
|
|
536
|
+
none: VariantType<{
|
|
537
|
+
unchanged: NullType;
|
|
538
|
+
replace: StructType<{
|
|
539
|
+
before: NullType;
|
|
540
|
+
after: NullType;
|
|
541
|
+
}>;
|
|
542
|
+
}>;
|
|
543
|
+
some: D extends EastType ? PatchTypeOf<D> : never;
|
|
544
|
+
}>;
|
|
545
|
+
}>;
|
|
546
|
+
readonly place: OptionType<VariantType<{
|
|
547
|
+
readonly ordered: VariantType<{
|
|
548
|
+
readonly start: NullType;
|
|
549
|
+
readonly end: NullType;
|
|
550
|
+
readonly before: StringType;
|
|
551
|
+
readonly after: StringType;
|
|
552
|
+
}>;
|
|
553
|
+
readonly keyOrder: NullType;
|
|
554
|
+
}>>;
|
|
555
|
+
}>>;
|
|
556
|
+
readonly domainChanges: OptionType<ArrayType<StructType<{
|
|
557
|
+
readonly id: StringType;
|
|
558
|
+
readonly patch: VariantType<{
|
|
559
|
+
unchanged: NullType;
|
|
560
|
+
replace: StructType<{
|
|
561
|
+
before: OptionType<E>;
|
|
562
|
+
after: OptionType<E>;
|
|
563
|
+
}>;
|
|
564
|
+
patch: VariantType<{
|
|
565
|
+
none: VariantType<{
|
|
566
|
+
unchanged: NullType;
|
|
567
|
+
replace: StructType<{
|
|
568
|
+
before: NullType;
|
|
569
|
+
after: NullType;
|
|
570
|
+
}>;
|
|
571
|
+
}>;
|
|
572
|
+
some: E extends EastType ? PatchTypeOf<E> : never;
|
|
573
|
+
}>;
|
|
574
|
+
}>;
|
|
575
|
+
readonly place: OptionType<VariantType<{
|
|
576
|
+
readonly ordered: VariantType<{
|
|
577
|
+
readonly start: NullType;
|
|
578
|
+
readonly end: NullType;
|
|
579
|
+
readonly before: StringType;
|
|
580
|
+
readonly after: StringType;
|
|
581
|
+
}>;
|
|
582
|
+
readonly keyOrder: NullType;
|
|
583
|
+
}>>;
|
|
584
|
+
}>>>;
|
|
585
|
+
readonly readiness: VariantType<{
|
|
586
|
+
readonly ready: NullType;
|
|
587
|
+
readonly incomplete: ArrayType<StructType<{
|
|
588
|
+
readonly entry: StringType;
|
|
589
|
+
readonly row: OptionType<IntegerType>;
|
|
590
|
+
readonly field: OptionType<StringType>;
|
|
591
|
+
readonly message: StringType;
|
|
592
|
+
}>>;
|
|
593
|
+
readonly invalid: ArrayType<StructType<{
|
|
594
|
+
readonly entry: StringType;
|
|
595
|
+
readonly row: OptionType<IntegerType>;
|
|
596
|
+
readonly field: OptionType<StringType>;
|
|
597
|
+
readonly message: StringType;
|
|
598
|
+
}>>;
|
|
599
|
+
}>;
|
|
600
|
+
}>;
|
|
601
|
+
/**
|
|
602
|
+
* Constructs an entry-addressed draft patch, placement included.
|
|
603
|
+
*
|
|
604
|
+
* @typeParam E - The source entry schema
|
|
605
|
+
* @typeParam F - A groups-only source's child field
|
|
606
|
+
* @param entryType - The source entry type
|
|
607
|
+
* @param field - The child field for a groups-only source
|
|
608
|
+
* @returns One change to the local draft collection
|
|
609
|
+
*/
|
|
610
|
+
export declare function EditingDraftChangeTypeFor<E extends EastType, F extends string = never>(entryType: E, field?: F): StructType<{
|
|
611
|
+
readonly id: StringType;
|
|
612
|
+
readonly patch: VariantType<{
|
|
613
|
+
unchanged: NullType;
|
|
614
|
+
replace: StructType<{
|
|
615
|
+
before: OptionType<EditingDraftEntryOf<E, F>>;
|
|
616
|
+
after: OptionType<EditingDraftEntryOf<E, F>>;
|
|
617
|
+
}>;
|
|
618
|
+
patch: VariantType<{
|
|
619
|
+
none: VariantType<{
|
|
620
|
+
unchanged: NullType;
|
|
621
|
+
replace: StructType<{
|
|
622
|
+
before: NullType;
|
|
623
|
+
after: NullType;
|
|
624
|
+
}>;
|
|
625
|
+
}>;
|
|
626
|
+
some: EditingDraftEntryOf<E, F> extends EastType ? PatchTypeOf<EditingDraftEntryOf<E, F>> : never;
|
|
627
|
+
}>;
|
|
628
|
+
}>;
|
|
629
|
+
readonly place: OptionType<VariantType<{
|
|
630
|
+
readonly ordered: VariantType<{
|
|
631
|
+
readonly start: NullType;
|
|
632
|
+
readonly end: NullType;
|
|
633
|
+
readonly before: StringType;
|
|
634
|
+
readonly after: StringType;
|
|
635
|
+
}>;
|
|
636
|
+
readonly keyOrder: NullType;
|
|
637
|
+
}>>;
|
|
638
|
+
}>;
|
|
639
|
+
/** The batch the Array form of {@link applyEditing} takes. */
|
|
640
|
+
type OrderedBatchOf<E extends EastType> = ReturnType<typeof EditingChangeSetTypeFor<E>>;
|
|
641
|
+
/** The batch the keyed form of {@link applyEditing} takes. */
|
|
642
|
+
type KeyedBatchOf<E extends EastType, K extends EastType> = ReturnType<typeof EditingChangeSetTypeFor<E, K>>;
|
|
643
|
+
/**
|
|
644
|
+
* Creates a reified East function that applies a complete batch to a
|
|
645
|
+
* collection atomically: every change, or none.
|
|
646
|
+
*
|
|
647
|
+
* Checks the whole snapshot or the authoritative revision before inspecting any
|
|
648
|
+
* patch; no positional rebasing takes place. The function does not own request
|
|
649
|
+
* deduplication — the live binding or the application's `onApply` does.
|
|
650
|
+
*
|
|
651
|
+
* - **An Array** (`Editing.apply(E, idField)`) addresses its entries by a
|
|
652
|
+
* String identity field every entry arm carries, and places a new entry by
|
|
653
|
+
* an ordered position.
|
|
654
|
+
* - **A keyed Dict** (`Editing.apply(DictType(K, E))`) addresses its entries
|
|
655
|
+
* by key: a String key is its own id, any other key its `.east` text
|
|
656
|
+
* (`East.print(key)`), parsed back. Its entries sort by key, so a new one's
|
|
657
|
+
* placement is `keyOrder`, and an ordered placement is refused.
|
|
658
|
+
*
|
|
659
|
+
* @typeParam E - The source entry type
|
|
660
|
+
* @param entryType - A row struct or a variant of entry structs
|
|
661
|
+
* @param idField - The String identity field shared by every entry arm
|
|
662
|
+
* @returns An East function taking the latest collection, the batch and the authoritative revision
|
|
663
|
+
* @throws {Error} When the identity field is not String on every entry arm
|
|
664
|
+
* @example
|
|
665
|
+
* ```ts
|
|
666
|
+
* import { ArrayType, East, IntegerType, OptionType, StringType, StructType, none, some, variant } from "@elaraai/east";
|
|
667
|
+
* import { Editing } from "@elaraai/east-ui";
|
|
668
|
+
*
|
|
669
|
+
* const Job = StructType({ id: StringType, task: StringType, qty: IntegerType });
|
|
670
|
+
*
|
|
671
|
+
* const applied = East.function([], ArrayType(Job), ($) => {
|
|
672
|
+
* const before = $.const({ id: "a", task: "Cut", qty: 2n }, Job);
|
|
673
|
+
* const after = $.const({ id: "a", task: "Cut", qty: 3n }, Job);
|
|
674
|
+
* const rows = $.const([before], ArrayType(Job));
|
|
675
|
+
* const oldEntry = $.const(some(before), OptionType(Job));
|
|
676
|
+
* const newEntry = $.const(some(after), OptionType(Job));
|
|
677
|
+
* const batch = $.const({
|
|
678
|
+
* requestId: "example-request", base: variant("snapshot", rows), label: "Set quantity",
|
|
679
|
+
* changes: [{ id: "a", patch: East.diff(oldEntry, newEntry), place: none }],
|
|
680
|
+
* }, Editing.Types.ChangeSet(Job));
|
|
681
|
+
* const apply = $.const(Editing.apply(Job, "id"));
|
|
682
|
+
* return apply(rows, batch, none).unwrap("applied");
|
|
683
|
+
* });
|
|
684
|
+
* ```
|
|
685
|
+
* @example
|
|
686
|
+
* ```ts
|
|
687
|
+
* import { DictType, East, IntegerType, OptionType, StringType, StructType, none, some, variant } from "@elaraai/east";
|
|
688
|
+
* import { Editing } from "@elaraai/east-ui";
|
|
689
|
+
*
|
|
690
|
+
* const KeyedJob = StructType({ task: StringType, qty: IntegerType });
|
|
691
|
+
*
|
|
692
|
+
* const applied = East.function([], DictType(StringType, KeyedJob), ($) => {
|
|
693
|
+
* const jobs = $.const(new Map([
|
|
694
|
+
* ["a", { task: "Cut", qty: 2n }],
|
|
695
|
+
* ["c", { task: "Weld", qty: 1n }],
|
|
696
|
+
* ]), DictType(StringType, KeyedJob));
|
|
697
|
+
* const cut = $.const(some({ task: "Cut", qty: 2n }), OptionType(KeyedJob));
|
|
698
|
+
* const cutMore = $.const(some({ task: "Cut", qty: 3n }), OptionType(KeyedJob));
|
|
699
|
+
* const weld = $.const(some({ task: "Weld", qty: 1n }), OptionType(KeyedJob));
|
|
700
|
+
* const paint = $.const(some({ task: "Paint", qty: 4n }), OptionType(KeyedJob));
|
|
701
|
+
* const absent = $.const(none, OptionType(KeyedJob));
|
|
702
|
+
* const batch = $.const({
|
|
703
|
+
* requestId: "keyed-request", base: variant("snapshot", jobs), label: "Edit jobs",
|
|
704
|
+
* changes: [
|
|
705
|
+
* { id: "a", patch: East.diff(cut, cutMore), place: none },
|
|
706
|
+
* { id: "b", patch: East.diff(absent, paint), place: some(variant("keyOrder", null)) },
|
|
707
|
+
* { id: "c", patch: East.diff(weld, absent), place: none },
|
|
708
|
+
* ],
|
|
709
|
+
* }, Editing.Types.ChangeSet(KeyedJob, StringType));
|
|
710
|
+
* const apply = $.const(Editing.apply(DictType(StringType, KeyedJob)));
|
|
711
|
+
* return apply(jobs, batch, none).unwrap("applied");
|
|
712
|
+
* });
|
|
713
|
+
* ```
|
|
714
|
+
*/
|
|
715
|
+
export declare function applyEditing<E extends EastType>(entryType: E, idField: string): ExprType<FunctionType<[
|
|
716
|
+
ArrayType<E>,
|
|
717
|
+
OrderedBatchOf<E>,
|
|
718
|
+
OptionType<StringType>
|
|
719
|
+
], ReturnType<typeof EditingAppliedTypeFor<E>>>>;
|
|
720
|
+
/**
|
|
721
|
+
* The keyed form: applies a batch to a Dict source, its entries addressed by key.
|
|
722
|
+
*
|
|
723
|
+
* @typeParam K - The source's key type
|
|
724
|
+
* @typeParam E - The source entry type
|
|
725
|
+
* @param sourceType - The source's Dict type
|
|
726
|
+
* @returns An East function taking the latest collection, the batch and the authoritative revision
|
|
727
|
+
*/
|
|
728
|
+
export declare function applyEditing<K extends EastType, E extends EastType>(sourceType: DictType<K, E>): ExprType<FunctionType<[
|
|
729
|
+
DictType<K, E>,
|
|
730
|
+
KeyedBatchOf<E, K>,
|
|
731
|
+
OptionType<StringType>
|
|
732
|
+
], ReturnType<typeof EditingAppliedTypeFor<E, K>>>>;
|
|
733
|
+
/**
|
|
734
|
+
* A synchronous or asynchronous authoritative apply callback, over the batch's
|
|
735
|
+
* bytes.
|
|
736
|
+
*
|
|
737
|
+
* @internal
|
|
738
|
+
* @property sync - A function
|
|
739
|
+
* @property async - An async function
|
|
740
|
+
*/
|
|
741
|
+
export declare const EditingWireApplyType: VariantType<{
|
|
742
|
+
readonly sync: FunctionType<[BlobType], VariantType<{
|
|
743
|
+
readonly applied: StructType<{
|
|
744
|
+
readonly revision: OptionType<StringType>;
|
|
745
|
+
}>;
|
|
746
|
+
readonly rejected: ArrayType<StructType<{
|
|
747
|
+
readonly entry: StringType;
|
|
748
|
+
readonly row: OptionType<IntegerType>;
|
|
749
|
+
readonly field: OptionType<StringType>;
|
|
750
|
+
readonly message: StringType;
|
|
751
|
+
}>>;
|
|
752
|
+
readonly conflict: ArrayType<StructType<{
|
|
753
|
+
readonly entry: StringType;
|
|
754
|
+
readonly row: OptionType<IntegerType>;
|
|
755
|
+
readonly field: OptionType<StringType>;
|
|
756
|
+
readonly message: StringType;
|
|
757
|
+
}>>;
|
|
758
|
+
}>>;
|
|
759
|
+
readonly async: AsyncFunctionType<[BlobType], VariantType<{
|
|
760
|
+
readonly applied: StructType<{
|
|
761
|
+
readonly revision: OptionType<StringType>;
|
|
762
|
+
}>;
|
|
763
|
+
readonly rejected: ArrayType<StructType<{
|
|
764
|
+
readonly entry: StringType;
|
|
765
|
+
readonly row: OptionType<IntegerType>;
|
|
766
|
+
readonly field: OptionType<StringType>;
|
|
767
|
+
readonly message: StringType;
|
|
768
|
+
}>>;
|
|
769
|
+
readonly conflict: ArrayType<StructType<{
|
|
770
|
+
readonly entry: StringType;
|
|
771
|
+
readonly row: OptionType<IntegerType>;
|
|
772
|
+
readonly field: OptionType<StringType>;
|
|
773
|
+
readonly message: StringType;
|
|
774
|
+
}>>;
|
|
775
|
+
}>>;
|
|
776
|
+
}>;
|
|
777
|
+
/**
|
|
778
|
+
* When a ready batch goes: on Apply, or as soon as it is ready. Both use the
|
|
779
|
+
* same serial checked protocol.
|
|
780
|
+
*
|
|
781
|
+
* @property batch - On Apply
|
|
782
|
+
* @property auto - As soon as the batch is ready
|
|
783
|
+
*/
|
|
784
|
+
export declare const EditingApplyModeType: VariantType<{
|
|
785
|
+
readonly batch: NullType;
|
|
786
|
+
readonly auto: NullType;
|
|
787
|
+
}>;
|
|
788
|
+
/**
|
|
789
|
+
* The fields every source-bound editing session carries to the renderer's
|
|
790
|
+
* shared session — a collection's own editing declaration spreads them beside
|
|
791
|
+
* its own (`SheetEditingType`). Blobs carry values at the exact schemas named,
|
|
792
|
+
* so no hidden domain field is ever lost.
|
|
793
|
+
*
|
|
794
|
+
* @internal
|
|
795
|
+
*/
|
|
796
|
+
export declare const EditingSessionFields: {
|
|
797
|
+
/** The source's identity — one session, and one unresolved request, per source. */
|
|
798
|
+
sourceId: StringType;
|
|
799
|
+
/** The entry schema. */
|
|
800
|
+
entryType: import("@elaraai/east").RecursiveType<VariantType<{
|
|
801
|
+
readonly Never: NullType;
|
|
802
|
+
readonly Null: NullType;
|
|
803
|
+
readonly Boolean: NullType;
|
|
804
|
+
readonly Integer: NullType;
|
|
805
|
+
readonly Float: NullType;
|
|
806
|
+
readonly String: NullType;
|
|
807
|
+
readonly DateTime: NullType;
|
|
808
|
+
readonly Blob: NullType;
|
|
809
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
810
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
811
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
812
|
+
readonly Dict: StructType<{
|
|
813
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
814
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
815
|
+
}>;
|
|
816
|
+
readonly Struct: ArrayType<StructType<{
|
|
817
|
+
readonly name: StringType;
|
|
818
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
819
|
+
}>>;
|
|
820
|
+
readonly Variant: ArrayType<StructType<{
|
|
821
|
+
readonly name: StringType;
|
|
822
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
823
|
+
}>>;
|
|
824
|
+
readonly Recursive: VariantType<{
|
|
825
|
+
readonly ref: IntegerType;
|
|
826
|
+
readonly wrapper: StructType<{
|
|
827
|
+
readonly id: IntegerType;
|
|
828
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
829
|
+
}>;
|
|
830
|
+
}>;
|
|
831
|
+
readonly Function: StructType<{
|
|
832
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
833
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
834
|
+
}>;
|
|
835
|
+
readonly AsyncFunction: StructType<{
|
|
836
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
837
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
838
|
+
}>;
|
|
839
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
840
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
841
|
+
}>>;
|
|
842
|
+
/** An Array source's String identity field. */
|
|
843
|
+
idField: OptionType<StringType>;
|
|
844
|
+
/** The entry's draft schema. */
|
|
845
|
+
draftType: import("@elaraai/east").RecursiveType<VariantType<{
|
|
846
|
+
readonly Never: NullType;
|
|
847
|
+
readonly Null: NullType;
|
|
848
|
+
readonly Boolean: NullType;
|
|
849
|
+
readonly Integer: NullType;
|
|
850
|
+
readonly Float: NullType;
|
|
851
|
+
readonly String: NullType;
|
|
852
|
+
readonly DateTime: NullType;
|
|
853
|
+
readonly Blob: NullType;
|
|
854
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
855
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
856
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
857
|
+
readonly Dict: StructType<{
|
|
858
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
859
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
860
|
+
}>;
|
|
861
|
+
readonly Struct: ArrayType<StructType<{
|
|
862
|
+
readonly name: StringType;
|
|
863
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
864
|
+
}>>;
|
|
865
|
+
readonly Variant: ArrayType<StructType<{
|
|
866
|
+
readonly name: StringType;
|
|
867
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
868
|
+
}>>;
|
|
869
|
+
readonly Recursive: VariantType<{
|
|
870
|
+
readonly ref: IntegerType;
|
|
871
|
+
readonly wrapper: StructType<{
|
|
872
|
+
readonly id: IntegerType;
|
|
873
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
874
|
+
}>;
|
|
875
|
+
}>;
|
|
876
|
+
readonly Function: StructType<{
|
|
877
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
878
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
879
|
+
}>;
|
|
880
|
+
readonly AsyncFunction: StructType<{
|
|
881
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
882
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
883
|
+
}>;
|
|
884
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
885
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
886
|
+
}>>;
|
|
887
|
+
/** A group entry's child field. */
|
|
888
|
+
children: OptionType<StringType>;
|
|
889
|
+
/**
|
|
890
|
+
* A keyed source's key type — its entries sort by key, a change names its
|
|
891
|
+
* entry by the key's text (a String key as it is, any other key its
|
|
892
|
+
* `.east` text), its batches are `ChangeSet(E, K)` and an inline snapshot
|
|
893
|
+
* is a `Dict` of it; `none` for an Array source.
|
|
894
|
+
*/
|
|
895
|
+
keyType: OptionType<import("@elaraai/east").RecursiveType<VariantType<{
|
|
896
|
+
readonly Never: NullType;
|
|
897
|
+
readonly Null: NullType;
|
|
898
|
+
readonly Boolean: NullType;
|
|
899
|
+
readonly Integer: NullType;
|
|
900
|
+
readonly Float: NullType;
|
|
901
|
+
readonly String: NullType;
|
|
902
|
+
readonly DateTime: NullType;
|
|
903
|
+
readonly Blob: NullType;
|
|
904
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
905
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
906
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
907
|
+
readonly Dict: StructType<{
|
|
908
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
909
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
910
|
+
}>;
|
|
911
|
+
readonly Struct: ArrayType<StructType<{
|
|
912
|
+
readonly name: StringType;
|
|
913
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
914
|
+
}>>;
|
|
915
|
+
readonly Variant: ArrayType<StructType<{
|
|
916
|
+
readonly name: StringType;
|
|
917
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
918
|
+
}>>;
|
|
919
|
+
readonly Recursive: VariantType<{
|
|
920
|
+
readonly ref: IntegerType;
|
|
921
|
+
readonly wrapper: StructType<{
|
|
922
|
+
readonly id: IntegerType;
|
|
923
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
924
|
+
}>;
|
|
925
|
+
}>;
|
|
926
|
+
readonly Function: StructType<{
|
|
927
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
928
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
929
|
+
}>;
|
|
930
|
+
readonly AsyncFunction: StructType<{
|
|
931
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
932
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
933
|
+
}>;
|
|
934
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
935
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
936
|
+
}>>>;
|
|
937
|
+
/** An inline source's whole collection — the base its batches check. */
|
|
938
|
+
snapshot: OptionType<BlobType>;
|
|
939
|
+
/** One entry by id at its source offset, for a paged source's reads. */
|
|
940
|
+
readEntry: FunctionType<[StringType, IntegerType], OptionType<BlobType>>;
|
|
941
|
+
/** The author's patch observer, over the event's bytes. */
|
|
942
|
+
onPatch: OptionType<FunctionType<[BlobType], NullType>>;
|
|
943
|
+
/** The authoritative apply. */
|
|
944
|
+
onApply: OptionType<VariantType<{
|
|
945
|
+
readonly sync: FunctionType<[BlobType], VariantType<{
|
|
946
|
+
readonly applied: StructType<{
|
|
947
|
+
readonly revision: OptionType<StringType>;
|
|
948
|
+
}>;
|
|
949
|
+
readonly rejected: ArrayType<StructType<{
|
|
950
|
+
readonly entry: StringType;
|
|
951
|
+
readonly row: OptionType<IntegerType>;
|
|
952
|
+
readonly field: OptionType<StringType>;
|
|
953
|
+
readonly message: StringType;
|
|
954
|
+
}>>;
|
|
955
|
+
readonly conflict: ArrayType<StructType<{
|
|
956
|
+
readonly entry: StringType;
|
|
957
|
+
readonly row: OptionType<IntegerType>;
|
|
958
|
+
readonly field: OptionType<StringType>;
|
|
959
|
+
readonly message: StringType;
|
|
960
|
+
}>>;
|
|
961
|
+
}>>;
|
|
962
|
+
readonly async: AsyncFunctionType<[BlobType], VariantType<{
|
|
963
|
+
readonly applied: StructType<{
|
|
964
|
+
readonly revision: OptionType<StringType>;
|
|
965
|
+
}>;
|
|
966
|
+
readonly rejected: ArrayType<StructType<{
|
|
967
|
+
readonly entry: StringType;
|
|
968
|
+
readonly row: OptionType<IntegerType>;
|
|
969
|
+
readonly field: OptionType<StringType>;
|
|
970
|
+
readonly message: StringType;
|
|
971
|
+
}>>;
|
|
972
|
+
readonly conflict: ArrayType<StructType<{
|
|
973
|
+
readonly entry: StringType;
|
|
974
|
+
readonly row: OptionType<IntegerType>;
|
|
975
|
+
readonly field: OptionType<StringType>;
|
|
976
|
+
readonly message: StringType;
|
|
977
|
+
}>>;
|
|
978
|
+
}>>;
|
|
979
|
+
}>>;
|
|
980
|
+
/** When a ready batch goes. */
|
|
981
|
+
mode: VariantType<{
|
|
982
|
+
readonly batch: NullType;
|
|
983
|
+
readonly auto: NullType;
|
|
984
|
+
}>;
|
|
985
|
+
};
|
|
986
|
+
/**
|
|
987
|
+
* The shared session's wire declaration — {@link EditingSessionFields} alone.
|
|
988
|
+
*
|
|
989
|
+
* @internal
|
|
990
|
+
*/
|
|
991
|
+
export declare const EditingType: StructType<{
|
|
992
|
+
/** The source's identity — one session, and one unresolved request, per source. */
|
|
993
|
+
sourceId: StringType;
|
|
994
|
+
/** The entry schema. */
|
|
995
|
+
entryType: import("@elaraai/east").RecursiveType<VariantType<{
|
|
996
|
+
readonly Never: NullType;
|
|
997
|
+
readonly Null: NullType;
|
|
998
|
+
readonly Boolean: NullType;
|
|
999
|
+
readonly Integer: NullType;
|
|
1000
|
+
readonly Float: NullType;
|
|
1001
|
+
readonly String: NullType;
|
|
1002
|
+
readonly DateTime: NullType;
|
|
1003
|
+
readonly Blob: NullType;
|
|
1004
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
1005
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
1006
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
1007
|
+
readonly Dict: StructType<{
|
|
1008
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
1009
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
1010
|
+
}>;
|
|
1011
|
+
readonly Struct: ArrayType<StructType<{
|
|
1012
|
+
readonly name: StringType;
|
|
1013
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
1014
|
+
}>>;
|
|
1015
|
+
readonly Variant: ArrayType<StructType<{
|
|
1016
|
+
readonly name: StringType;
|
|
1017
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
1018
|
+
}>>;
|
|
1019
|
+
readonly Recursive: VariantType<{
|
|
1020
|
+
readonly ref: IntegerType;
|
|
1021
|
+
readonly wrapper: StructType<{
|
|
1022
|
+
readonly id: IntegerType;
|
|
1023
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
1024
|
+
}>;
|
|
1025
|
+
}>;
|
|
1026
|
+
readonly Function: StructType<{
|
|
1027
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
1028
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
1029
|
+
}>;
|
|
1030
|
+
readonly AsyncFunction: StructType<{
|
|
1031
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
1032
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
1033
|
+
}>;
|
|
1034
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
1035
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
1036
|
+
}>>;
|
|
1037
|
+
/** An Array source's String identity field. */
|
|
1038
|
+
idField: OptionType<StringType>;
|
|
1039
|
+
/** The entry's draft schema. */
|
|
1040
|
+
draftType: import("@elaraai/east").RecursiveType<VariantType<{
|
|
1041
|
+
readonly Never: NullType;
|
|
1042
|
+
readonly Null: NullType;
|
|
1043
|
+
readonly Boolean: NullType;
|
|
1044
|
+
readonly Integer: NullType;
|
|
1045
|
+
readonly Float: NullType;
|
|
1046
|
+
readonly String: NullType;
|
|
1047
|
+
readonly DateTime: NullType;
|
|
1048
|
+
readonly Blob: NullType;
|
|
1049
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
1050
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
1051
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
1052
|
+
readonly Dict: StructType<{
|
|
1053
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
1054
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
1055
|
+
}>;
|
|
1056
|
+
readonly Struct: ArrayType<StructType<{
|
|
1057
|
+
readonly name: StringType;
|
|
1058
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
1059
|
+
}>>;
|
|
1060
|
+
readonly Variant: ArrayType<StructType<{
|
|
1061
|
+
readonly name: StringType;
|
|
1062
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
1063
|
+
}>>;
|
|
1064
|
+
readonly Recursive: VariantType<{
|
|
1065
|
+
readonly ref: IntegerType;
|
|
1066
|
+
readonly wrapper: StructType<{
|
|
1067
|
+
readonly id: IntegerType;
|
|
1068
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
1069
|
+
}>;
|
|
1070
|
+
}>;
|
|
1071
|
+
readonly Function: StructType<{
|
|
1072
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
1073
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
1074
|
+
}>;
|
|
1075
|
+
readonly AsyncFunction: StructType<{
|
|
1076
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
1077
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
1078
|
+
}>;
|
|
1079
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
1080
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
1081
|
+
}>>;
|
|
1082
|
+
/** A group entry's child field. */
|
|
1083
|
+
children: OptionType<StringType>;
|
|
1084
|
+
/**
|
|
1085
|
+
* A keyed source's key type — its entries sort by key, a change names its
|
|
1086
|
+
* entry by the key's text (a String key as it is, any other key its
|
|
1087
|
+
* `.east` text), its batches are `ChangeSet(E, K)` and an inline snapshot
|
|
1088
|
+
* is a `Dict` of it; `none` for an Array source.
|
|
1089
|
+
*/
|
|
1090
|
+
keyType: OptionType<import("@elaraai/east").RecursiveType<VariantType<{
|
|
1091
|
+
readonly Never: NullType;
|
|
1092
|
+
readonly Null: NullType;
|
|
1093
|
+
readonly Boolean: NullType;
|
|
1094
|
+
readonly Integer: NullType;
|
|
1095
|
+
readonly Float: NullType;
|
|
1096
|
+
readonly String: NullType;
|
|
1097
|
+
readonly DateTime: NullType;
|
|
1098
|
+
readonly Blob: NullType;
|
|
1099
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
1100
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
1101
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
1102
|
+
readonly Dict: StructType<{
|
|
1103
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
1104
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
1105
|
+
}>;
|
|
1106
|
+
readonly Struct: ArrayType<StructType<{
|
|
1107
|
+
readonly name: StringType;
|
|
1108
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
1109
|
+
}>>;
|
|
1110
|
+
readonly Variant: ArrayType<StructType<{
|
|
1111
|
+
readonly name: StringType;
|
|
1112
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
1113
|
+
}>>;
|
|
1114
|
+
readonly Recursive: VariantType<{
|
|
1115
|
+
readonly ref: IntegerType;
|
|
1116
|
+
readonly wrapper: StructType<{
|
|
1117
|
+
readonly id: IntegerType;
|
|
1118
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
1119
|
+
}>;
|
|
1120
|
+
}>;
|
|
1121
|
+
readonly Function: StructType<{
|
|
1122
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
1123
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
1124
|
+
}>;
|
|
1125
|
+
readonly AsyncFunction: StructType<{
|
|
1126
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
1127
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
1128
|
+
}>;
|
|
1129
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
1130
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
1131
|
+
}>>>;
|
|
1132
|
+
/** An inline source's whole collection — the base its batches check. */
|
|
1133
|
+
snapshot: OptionType<BlobType>;
|
|
1134
|
+
/** One entry by id at its source offset, for a paged source's reads. */
|
|
1135
|
+
readEntry: FunctionType<[StringType, IntegerType], OptionType<BlobType>>;
|
|
1136
|
+
/** The author's patch observer, over the event's bytes. */
|
|
1137
|
+
onPatch: OptionType<FunctionType<[BlobType], NullType>>;
|
|
1138
|
+
/** The authoritative apply. */
|
|
1139
|
+
onApply: OptionType<VariantType<{
|
|
1140
|
+
readonly sync: FunctionType<[BlobType], VariantType<{
|
|
1141
|
+
readonly applied: StructType<{
|
|
1142
|
+
readonly revision: OptionType<StringType>;
|
|
1143
|
+
}>;
|
|
1144
|
+
readonly rejected: ArrayType<StructType<{
|
|
1145
|
+
readonly entry: StringType;
|
|
1146
|
+
readonly row: OptionType<IntegerType>;
|
|
1147
|
+
readonly field: OptionType<StringType>;
|
|
1148
|
+
readonly message: StringType;
|
|
1149
|
+
}>>;
|
|
1150
|
+
readonly conflict: ArrayType<StructType<{
|
|
1151
|
+
readonly entry: StringType;
|
|
1152
|
+
readonly row: OptionType<IntegerType>;
|
|
1153
|
+
readonly field: OptionType<StringType>;
|
|
1154
|
+
readonly message: StringType;
|
|
1155
|
+
}>>;
|
|
1156
|
+
}>>;
|
|
1157
|
+
readonly async: AsyncFunctionType<[BlobType], VariantType<{
|
|
1158
|
+
readonly applied: StructType<{
|
|
1159
|
+
readonly revision: OptionType<StringType>;
|
|
1160
|
+
}>;
|
|
1161
|
+
readonly rejected: ArrayType<StructType<{
|
|
1162
|
+
readonly entry: StringType;
|
|
1163
|
+
readonly row: OptionType<IntegerType>;
|
|
1164
|
+
readonly field: OptionType<StringType>;
|
|
1165
|
+
readonly message: StringType;
|
|
1166
|
+
}>>;
|
|
1167
|
+
readonly conflict: ArrayType<StructType<{
|
|
1168
|
+
readonly entry: StringType;
|
|
1169
|
+
readonly row: OptionType<IntegerType>;
|
|
1170
|
+
readonly field: OptionType<StringType>;
|
|
1171
|
+
readonly message: StringType;
|
|
1172
|
+
}>>;
|
|
1173
|
+
}>>;
|
|
1174
|
+
}>>;
|
|
1175
|
+
/** When a ready batch goes. */
|
|
1176
|
+
mode: VariantType<{
|
|
1177
|
+
readonly batch: NullType;
|
|
1178
|
+
readonly auto: NullType;
|
|
1179
|
+
}>;
|
|
1180
|
+
}>;
|
|
1181
|
+
/**
|
|
1182
|
+
* The inline adapter's request ledger. Unlike reactive state, it must outlive
|
|
1183
|
+
* a collection disappearing from a render; the browser implementation scopes
|
|
1184
|
+
* it to the current UI store's lifetime.
|
|
1185
|
+
*
|
|
1186
|
+
* @internal
|
|
1187
|
+
*/
|
|
1188
|
+
export declare const EditingRequestStore: {
|
|
1189
|
+
readonly read: import("@elaraai/east").PlatformDefinition<[StringType], OptionType<BlobType>>;
|
|
1190
|
+
readonly write: import("@elaraai/east").PlatformDefinition<[StringType, BlobType], NullType>;
|
|
1191
|
+
};
|
|
1192
|
+
/**
|
|
1193
|
+
* Builds the inline `onUpdate` adapter over a live Array handle.
|
|
1194
|
+
*
|
|
1195
|
+
* A confirmed request replays before any stale-base check. A throwing write
|
|
1196
|
+
* leaves an unresolved request in the store: retries confirm the target by
|
|
1197
|
+
* reading it, and never repeat an uncertain mutation. The request table lives
|
|
1198
|
+
* in the same browser state store as the binding, surviving remounts. It
|
|
1199
|
+
* holds the source's latest request alone — a new one is taken only once
|
|
1200
|
+
* every earlier one is resolved, so none of those is retried again — and a
|
|
1201
|
+
* confirmed request keeps no copy of the collection it wrote.
|
|
1202
|
+
*
|
|
1203
|
+
* @internal
|
|
1204
|
+
* @param entryType - The exact domain schema
|
|
1205
|
+
* @param idField - The entry identity field
|
|
1206
|
+
* @param sourceId - Stable identity of the captured binding
|
|
1207
|
+
* @param read - Invocation-time collection reader
|
|
1208
|
+
* @param write - The author's whole-collection writer
|
|
1209
|
+
* @returns A closed Blob transport function for the typed apply callback
|
|
1210
|
+
*/
|
|
1211
|
+
export declare function buildInlineApply(entryType: EastType, idField: string, sourceId: ExprType<StringType>, read: ExprType<FunctionType>, write: ExprType<FunctionType>): ExprType<FunctionType<[BlobType], typeof EditingApplyResultType>>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Builds the inline `onUpdate` adapter over a live keyed handle — the
|
|
1214
|
+
* {@link buildInlineApply} protocol over a `Dict`, its batches applied by key
|
|
1215
|
+
* (`Editing.apply(DictType(K, E))`, #880).
|
|
1216
|
+
*
|
|
1217
|
+
* @internal
|
|
1218
|
+
* @param sourceType - The source's Dict type
|
|
1219
|
+
* @param sourceId - Stable identity of the captured binding
|
|
1220
|
+
* @param read - Invocation-time collection reader
|
|
1221
|
+
* @param write - The author's whole-collection writer
|
|
1222
|
+
* @returns A closed Blob transport function for the typed apply callback
|
|
1223
|
+
*/
|
|
1224
|
+
export declare function buildKeyedInlineApply(sourceType: DictType, sourceId: ExprType<StringType>, read: ExprType<FunctionType>, write: ExprType<FunctionType>): ExprType<FunctionType<[BlobType], typeof EditingApplyResultType>>;
|
|
1225
|
+
/**
|
|
1226
|
+
* The type of the {@link Editing} namespace — declared explicitly so the
|
|
1227
|
+
* declaration emit stays within TypeScript's serialization limit.
|
|
1228
|
+
*/
|
|
1229
|
+
export interface EditingNamespace {
|
|
1230
|
+
/** Applies a checked batch to a collection atomically — an Array by identity field, or a keyed Dict by key. */
|
|
1231
|
+
apply: typeof applyEditing;
|
|
1232
|
+
/** The editing contract's East types. */
|
|
1233
|
+
Types: {
|
|
1234
|
+
/** `DraftField(T)` — one field of a draft: missing, a value, or unreadable text ({@link EditingDraftFieldType}). */
|
|
1235
|
+
DraftField: typeof EditingDraftFieldType;
|
|
1236
|
+
/** `Draft(R)` — a struct's field-by-field draft ({@link EditingDraftTypeFor}). */
|
|
1237
|
+
Draft: typeof EditingDraftTypeFor;
|
|
1238
|
+
/** `DraftGroup(G, "rows")` — a group's draft, its children drafts ({@link EditingDraftGroupTypeFor}). */
|
|
1239
|
+
DraftGroup: typeof EditingDraftGroupTypeFor;
|
|
1240
|
+
/** `Entry(G, "rows")` — groups with their rows beside ungrouped rows, as one union ({@link EditingEntryTypeFor}). */
|
|
1241
|
+
Entry: typeof EditingEntryTypeFor;
|
|
1242
|
+
/** `DraftEntry(E)` — an entry's draft ({@link EditingDraftEntryTypeFor}). */
|
|
1243
|
+
DraftEntry: typeof EditingDraftEntryTypeFor;
|
|
1244
|
+
/** `DraftChange(E)` — one change to the drafts ({@link EditingDraftChangeTypeFor}). */
|
|
1245
|
+
DraftChange: typeof EditingDraftChangeTypeFor;
|
|
1246
|
+
/** `Change(E)` — one entry's composed patch and placement ({@link EditingChangeTypeFor}). */
|
|
1247
|
+
Change: typeof EditingChangeTypeFor;
|
|
1248
|
+
/** `ChangeSet(E)` / `ChangeSet(E, K)` — an atomic request against a checked base ({@link EditingChangeSetTypeFor}). */
|
|
1249
|
+
ChangeSet: typeof EditingChangeSetTypeFor;
|
|
1250
|
+
/** `Base(E)` / `Base(E, K)` — a revision, or the whole collection ({@link EditingBaseTypeFor}). */
|
|
1251
|
+
Base: typeof EditingBaseTypeFor;
|
|
1252
|
+
/** `Applied(E)` / `Applied(E, K)` — the applied collection or the conflict ({@link EditingAppliedTypeFor}). */
|
|
1253
|
+
Applied: typeof EditingAppliedTypeFor;
|
|
1254
|
+
/** The source's answer to a request ({@link EditingApplyResultType}). */
|
|
1255
|
+
ApplyResult: typeof EditingApplyResultType;
|
|
1256
|
+
/** An issue addressed to an entry ({@link EditingIssueType}). */
|
|
1257
|
+
Issue: typeof EditingIssueType;
|
|
1258
|
+
/** An issue on a field ({@link EditingFieldIssueType}). */
|
|
1259
|
+
FieldIssue: typeof EditingFieldIssueType;
|
|
1260
|
+
/** One entry's readiness ({@link EditingReadinessType}). */
|
|
1261
|
+
Readiness: typeof EditingReadinessType;
|
|
1262
|
+
/** A batch's readiness ({@link EditingBatchReadinessType}). */
|
|
1263
|
+
BatchReadiness: typeof EditingBatchReadinessType;
|
|
1264
|
+
/** The gesture that made a transaction ({@link EditingOriginType}). */
|
|
1265
|
+
Origin: typeof EditingOriginType;
|
|
1266
|
+
/** `PatchEvent(E)` — what `onPatch` receives ({@link EditingPatchEventTypeFor}). */
|
|
1267
|
+
PatchEvent: typeof EditingPatchEventTypeFor;
|
|
1268
|
+
/** Where an entry stands — ordered, or in key order ({@link EditingPlacementType}). */
|
|
1269
|
+
Placement: typeof EditingPlacementType;
|
|
1270
|
+
/** A position in an ordered collection ({@link EditingPositionType}). */
|
|
1271
|
+
Position: typeof EditingPositionType;
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* The editing contract (#879) — the one transaction session every editable
|
|
1276
|
+
* collection speaks: drafts, one undoable transaction per gesture reported as a
|
|
1277
|
+
* `PatchEvent`, and Apply as one checked, idempotent `ChangeSet` applied with
|
|
1278
|
+
* `Editing.apply`. The Sheet keeps its names for it (`Sheet.Types.ChangeSet`,
|
|
1279
|
+
* `Sheet.apply`, …) — the same values.
|
|
1280
|
+
*/
|
|
1281
|
+
export declare const Editing: EditingNamespace;
|
|
1282
|
+
export {};
|
|
1283
|
+
//# sourceMappingURL=editing.d.ts.map
|