@elaraai/e3-ui 1.0.103 → 1.0.104
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/allocation/functions.d.ts +2 -1
- package/dist/src/allocation/functions.d.ts.map +1 -1
- package/dist/src/allocation/functions.js +3 -2
- package/dist/src/allocation/functions.js.map +1 -1
- package/dist/src/allocation/index.d.ts +120 -1
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +24 -4
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +25 -4
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +58 -7
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/bind/data.d.ts +12 -14
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +11 -11
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/func.d.ts +7 -2
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +10 -3
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/calendar/index.d.ts +148 -1
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +55 -5
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +32 -14
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +21 -6
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/details.d.ts +469 -0
- package/dist/src/flowchart/details.d.ts.map +1 -0
- package/dist/src/flowchart/details.js +1035 -0
- package/dist/src/flowchart/details.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +16 -72
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js +10 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +282 -251
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +234 -220
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/kinds.d.ts +438 -0
- package/dist/src/flowchart/kinds.d.ts.map +1 -0
- package/dist/src/flowchart/kinds.js +799 -0
- package/dist/src/flowchart/kinds.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +154 -739
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +191 -673
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +3652 -7843
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +331 -469
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/templates.d.ts +657 -0
- package/dist/src/flowchart/templates.d.ts.map +1 -0
- package/dist/src/flowchart/templates.js +658 -0
- package/dist/src/flowchart/templates.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +2258 -214
- package/dist/src/flowchart/types.d.ts.map +1 -1
- package/dist/src/flowchart/types.js +374 -124
- package/dist/src/flowchart/types.js.map +1 -1
- package/dist/src/index.d.ts +13 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -29
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +5 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +12 -19
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ontology/index.d.ts +44 -15
- package/dist/src/ontology/index.d.ts.map +1 -1
- package/dist/src/ontology/index.js +19 -11
- package/dist/src/ontology/index.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +2 -1
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +6 -4
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1 -0
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/plan.d.ts +145 -1
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +67 -3
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/types.d.ts +1 -0
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/query/builder.d.ts +362 -315
- package/dist/src/query/builder.d.ts.map +1 -1
- package/dist/src/query/builder.js +12 -1
- package/dist/src/query/builder.js.map +1 -1
- package/dist/src/query/index.d.ts +5 -1
- package/dist/src/query/index.d.ts.map +1 -1
- package/dist/src/query/index.js +3 -1
- package/dist/src/query/index.js.map +1 -1
- package/dist/src/roster/fit.d.ts +5 -2
- package/dist/src/roster/fit.d.ts.map +1 -1
- package/dist/src/roster/fit.js +5 -3
- package/dist/src/roster/fit.js.map +1 -1
- package/dist/src/roster/index.d.ts +103 -2
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +45 -6
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/runtime/index.d.ts +1 -3
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +1 -3
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/src/schedule/record-window.d.ts +1 -0
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schematic/index.d.ts +1 -1
- package/dist/src/schematic/index.d.ts.map +1 -1
- package/dist/src/schematic/index.js +1 -1
- package/dist/src/schematic/index.js.map +1 -1
- package/dist/src/schematic/kinds.d.ts +4 -24
- package/dist/src/schematic/kinds.d.ts.map +1 -1
- package/dist/src/schematic/kinds.js +8 -212
- package/dist/src/schematic/kinds.js.map +1 -1
- package/dist/src/schematic/payload.d.ts +140 -1
- package/dist/src/schematic/payload.d.ts.map +1 -1
- package/dist/src/schematic/payload.js +38 -1
- package/dist/src/schematic/payload.js.map +1 -1
- package/dist/src/schematic/types.d.ts.map +1 -1
- package/dist/src/schematic/types.js +4 -36
- package/dist/src/schematic/types.js.map +1 -1
- package/dist/src/schematic/window.d.ts +9 -42
- package/dist/src/schematic/window.d.ts.map +1 -1
- package/dist/src/schematic/window.js +10 -115
- package/dist/src/schematic/window.js.map +1 -1
- package/dist/src/sheet/actions.d.ts +388 -0
- package/dist/src/sheet/actions.d.ts.map +1 -0
- package/dist/src/sheet/actions.js +594 -0
- package/dist/src/sheet/actions.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +12 -1
- package/dist/src/sheet/bridge.d.ts.map +1 -1
- package/dist/src/sheet/bridge.js +30 -6
- package/dist/src/sheet/bridge.js.map +1 -1
- package/dist/src/sheet/columns.d.ts +5 -2
- package/dist/src/sheet/columns.d.ts.map +1 -1
- package/dist/src/sheet/columns.js.map +1 -1
- package/dist/src/sheet/draft-bridge.d.ts +9 -4
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
- package/dist/src/sheet/draft-bridge.js +22 -7
- package/dist/src/sheet/draft-bridge.js.map +1 -1
- package/dist/src/sheet/fields.d.ts +13 -0
- package/dist/src/sheet/fields.d.ts.map +1 -1
- package/dist/src/sheet/fields.js +3 -0
- package/dist/src/sheet/fields.js.map +1 -1
- package/dist/src/sheet/index.d.ts +32 -2
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +18 -3
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +8 -0
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/root.d.ts +23 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +40 -5
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +7843 -4132
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +41 -2
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +4 -0
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/types.d.ts +12449 -5268
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +114 -2
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/utils/derive.d.ts +1 -1
- package/dist/src/utils/derive.js +1 -1
- package/dist/src/utils/record-kind.d.ts +625 -0
- package/dist/src/utils/record-kind.d.ts.map +1 -0
- package/dist/src/utils/record-kind.js +450 -0
- package/dist/src/utils/record-kind.js.map +1 -0
- package/dist/src/utils/views.d.ts +55 -0
- package/dist/src/utils/views.d.ts.map +1 -0
- package/dist/src/utils/views.js +72 -0
- package/dist/src/utils/views.js.map +1 -0
- package/dist/src/utils/vocabulary.d.ts +48 -0
- package/dist/src/utils/vocabulary.d.ts.map +1 -0
- package/dist/src/utils/vocabulary.js +47 -0
- package/dist/src/utils/vocabulary.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +2 -0
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +81 -2
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/bind/func/func.examples.d.ts +19 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +36 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +2 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +80 -2
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts +1 -0
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +12 -0
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +5 -4
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +861 -512
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/ontology/ontology.examples.d.ts +2 -3
- package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
- package/dist/test/ontology/ontology.examples.js +32 -21
- package/dist/test/ontology/ontology.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +44 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-nested.examples.d.ts +2 -2
- package/dist/test/plan/plan-nested.examples.js +5 -5
- package/dist/test/plan/plan-nested.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +1 -1
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +2 -0
- package/dist/test/query/query.examples.d.ts.map +1 -1
- package/dist/test/query/query.examples.js +37 -1
- package/dist/test/query/query.examples.js.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +76 -15
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.js +6 -4
- package/dist/test/schematic/schematic-records.examples.js.map +1 -1
- package/dist/test/schematic/schematic.examples.d.ts +1 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic.examples.js +144 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -1
- package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
- package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-actions.examples.js +394 -0
- package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
- package/dist/test/sheet/sheet.examples.d.ts +1 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +77 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/dist/test/studio/studio.examples.d.ts +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +18 -8
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +12 -12
- package/dist/src/diff/index.d.ts +0 -407
- package/dist/src/diff/index.d.ts.map +0 -1
- package/dist/src/diff/index.js +0 -203
- package/dist/src/diff/index.js.map +0 -1
- package/dist/src/experiment/index.d.ts +0 -1033
- package/dist/src/experiment/index.d.ts.map +0 -1
- package/dist/src/experiment/index.js +0 -197
- package/dist/src/experiment/index.js.map +0 -1
- package/dist/src/experiment/types.d.ts +0 -1093
- package/dist/src/experiment/types.d.ts.map +0 -1
- package/dist/src/experiment/types.js +0 -423
- package/dist/src/experiment/types.js.map +0 -1
- package/dist/src/flowchart/over.d.ts +0 -227
- package/dist/src/flowchart/over.d.ts.map +0 -1
- package/dist/src/flowchart/over.js +0 -213
- package/dist/src/flowchart/over.js.map +0 -1
- package/dist/src/flowchart/patch.d.ts +0 -64
- package/dist/src/flowchart/patch.d.ts.map +0 -1
- package/dist/src/flowchart/patch.js +0 -67
- package/dist/src/flowchart/patch.js.map +0 -1
- package/dist/src/flowchart/values.d.ts +0 -271
- package/dist/src/flowchart/values.d.ts.map +0 -1
- package/dist/src/flowchart/values.js +0 -220
- package/dist/src/flowchart/values.js.map +0 -1
- package/dist/src/flowchart/window.d.ts +0 -306
- package/dist/src/flowchart/window.d.ts.map +0 -1
- package/dist/src/flowchart/window.js +0 -63
- package/dist/src/flowchart/window.js.map +0 -1
- package/dist/src/runtime/diff.d.ts +0 -36
- package/dist/src/runtime/diff.d.ts.map +0 -1
- package/dist/src/runtime/diff.js +0 -34
- package/dist/src/runtime/diff.js.map +0 -1
- package/dist/src/runtime/experiment.d.ts +0 -48
- package/dist/src/runtime/experiment.d.ts.map +0 -1
- package/dist/src/runtime/experiment.js +0 -10
- package/dist/src/runtime/experiment.js.map +0 -1
- package/dist/test/diff/diff.examples.d.ts +0 -313
- package/dist/test/diff/diff.examples.d.ts.map +0 -1
- package/dist/test/diff/diff.examples.js +0 -452
- package/dist/test/diff/diff.examples.js.map +0 -1
- package/dist/test/experiment/experiment.examples.d.ts +0 -1512
- package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
- package/dist/test/experiment/experiment.examples.js +0 -609
- package/dist/test/experiment/experiment.examples.js.map +0 -1
|
@@ -0,0 +1,625 @@
|
|
|
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
|
+
* A kind over the app's own record: what the Schematic's kinds (#1386) and the
|
|
7
|
+
* Flowchart's (#1500) share. A kind maps the fields of the app's row to the
|
|
8
|
+
* builder's roles and closes the record behind East functions over beast2
|
|
9
|
+
* bytes — its stored rows a read holds, each one's roles beside its bytes; a
|
|
10
|
+
* drafted row's roles; the fields an author's card sets, any field at any
|
|
11
|
+
* depth; the shared editing session over the record with its patch door; the
|
|
12
|
+
* record read by key; its history, its form, its own Details and the app's
|
|
13
|
+
* check — so a builder's payload is one type whatever the rows hold, and its
|
|
14
|
+
* renderer needs no row type.
|
|
15
|
+
*
|
|
16
|
+
* A kind's record is bound three ways, as each builder's binding check tells
|
|
17
|
+
* them apart: `Record.bind(record)` with its patch door, editable — read
|
|
18
|
+
* whole, or through its source of the builder's slice with `entries:
|
|
19
|
+
* Data.bindPaged(record)` beside it; `Data.bind(record)`, read only and whole;
|
|
20
|
+
* or `Data.bindPaged(record)`, read only, through its source. Each builder
|
|
21
|
+
* keeps its own check and its own words; what this module holds is the same
|
|
22
|
+
* for every builder.
|
|
23
|
+
*
|
|
24
|
+
* @packageDocumentation
|
|
25
|
+
*/
|
|
26
|
+
import { ArrayType, BlobType, BooleanType, DictType, FunctionType, IntegerType, OptionType, StringType, StructType, type EastType, type ExprType, type NullType, type SubtypeExprOrValue } from "@elaraai/east";
|
|
27
|
+
import type { UIComponentType } from "@elaraai/east-ui";
|
|
28
|
+
import { EditingReadinessType, type FieldHints } from "@elaraai/east-ui/internal";
|
|
29
|
+
/** A record's commits, newest first, as its handle reads them. */
|
|
30
|
+
export declare const KindHistoryType: FunctionType<[], OptionType<ArrayType<StructType<{
|
|
31
|
+
readonly hash: StringType;
|
|
32
|
+
readonly parent: OptionType<StringType>;
|
|
33
|
+
readonly state: StringType;
|
|
34
|
+
readonly mutation: StringType;
|
|
35
|
+
readonly actor: StringType;
|
|
36
|
+
readonly at: import("@elaraai/east").DateTimeType;
|
|
37
|
+
readonly delta: OptionType<StringType>;
|
|
38
|
+
}>>>>;
|
|
39
|
+
/** Type representing {@link KindHistoryType}. */
|
|
40
|
+
export type KindHistoryType = typeof KindHistoryType;
|
|
41
|
+
/** The author's check over drafted entries, one result each. */
|
|
42
|
+
export declare const KindReadyType: FunctionType<[ArrayType<StructType<{
|
|
43
|
+
readonly id: StringType;
|
|
44
|
+
readonly entry: BlobType;
|
|
45
|
+
}>>], ArrayType<import("@elaraai/east").VariantType<{
|
|
46
|
+
readonly ready: NullType;
|
|
47
|
+
readonly incomplete: ArrayType<StructType<{
|
|
48
|
+
readonly field: StringType;
|
|
49
|
+
readonly message: StringType;
|
|
50
|
+
}>>;
|
|
51
|
+
readonly invalid: ArrayType<StructType<{
|
|
52
|
+
readonly field: StringType;
|
|
53
|
+
readonly message: StringType;
|
|
54
|
+
}>>;
|
|
55
|
+
}>>>;
|
|
56
|
+
/** Type representing {@link KindReadyType}. */
|
|
57
|
+
export type KindReadyType = typeof KindReadyType;
|
|
58
|
+
/**
|
|
59
|
+
* What every kind over the app's record carries: how the record is read and
|
|
60
|
+
* written, and the inspector's form.
|
|
61
|
+
*
|
|
62
|
+
* @property editable - Whether the record is bound with its patch door: what its gestures, drops and edits write
|
|
63
|
+
* @property editing - The shared session over the record, with its patch door; `none` for a record bound read only
|
|
64
|
+
* @property entries - The record read by key, for a record read through its source or bound with `Data.bindPaged`; `none` for one read whole
|
|
65
|
+
* @property history - The record's commits, newest first; `none` for a record bound with `Data.bind` or `Data.bindPaged`
|
|
66
|
+
* @property fields - The inspector's form over the fields no role writes (`Fields`)
|
|
67
|
+
* @property inspector - The kind's own Details in place of its form, over bytes
|
|
68
|
+
* @property ready - The app's check on drafted rows, one result each
|
|
69
|
+
* @property set - The row with each field write applied in order — a field at any depth, its value as bytes at the field's type — and every other field as it was: what an author's card dropped on a row sets (#1390); `none` for a write naming no field of the row
|
|
70
|
+
* @property rowType - The record's row type
|
|
71
|
+
*/
|
|
72
|
+
export declare const KindSideFields: {
|
|
73
|
+
readonly editable: BooleanType;
|
|
74
|
+
readonly editing: OptionType<StructType<{
|
|
75
|
+
sourceId: StringType;
|
|
76
|
+
entryType: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
77
|
+
readonly Never: NullType;
|
|
78
|
+
readonly Null: NullType;
|
|
79
|
+
readonly Boolean: NullType;
|
|
80
|
+
readonly Integer: NullType;
|
|
81
|
+
readonly Float: NullType;
|
|
82
|
+
readonly String: NullType;
|
|
83
|
+
readonly DateTime: NullType;
|
|
84
|
+
readonly Blob: NullType;
|
|
85
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
86
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
87
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
88
|
+
readonly Dict: StructType<{
|
|
89
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
90
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
91
|
+
}>;
|
|
92
|
+
readonly Struct: ArrayType<StructType<{
|
|
93
|
+
readonly name: StringType;
|
|
94
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
95
|
+
}>>;
|
|
96
|
+
readonly Variant: ArrayType<StructType<{
|
|
97
|
+
readonly name: StringType;
|
|
98
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
99
|
+
}>>;
|
|
100
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
101
|
+
readonly ref: IntegerType;
|
|
102
|
+
readonly wrapper: StructType<{
|
|
103
|
+
readonly id: IntegerType;
|
|
104
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
105
|
+
}>;
|
|
106
|
+
}>;
|
|
107
|
+
readonly Function: StructType<{
|
|
108
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
109
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
110
|
+
}>;
|
|
111
|
+
readonly AsyncFunction: StructType<{
|
|
112
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
113
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
114
|
+
}>;
|
|
115
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
116
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
117
|
+
}>>;
|
|
118
|
+
idField: OptionType<StringType>;
|
|
119
|
+
draftType: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
120
|
+
readonly Never: NullType;
|
|
121
|
+
readonly Null: NullType;
|
|
122
|
+
readonly Boolean: NullType;
|
|
123
|
+
readonly Integer: NullType;
|
|
124
|
+
readonly Float: NullType;
|
|
125
|
+
readonly String: NullType;
|
|
126
|
+
readonly DateTime: NullType;
|
|
127
|
+
readonly Blob: NullType;
|
|
128
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
129
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
130
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
131
|
+
readonly Dict: StructType<{
|
|
132
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
133
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
134
|
+
}>;
|
|
135
|
+
readonly Struct: ArrayType<StructType<{
|
|
136
|
+
readonly name: StringType;
|
|
137
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
138
|
+
}>>;
|
|
139
|
+
readonly Variant: ArrayType<StructType<{
|
|
140
|
+
readonly name: StringType;
|
|
141
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
142
|
+
}>>;
|
|
143
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
144
|
+
readonly ref: IntegerType;
|
|
145
|
+
readonly wrapper: StructType<{
|
|
146
|
+
readonly id: IntegerType;
|
|
147
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
150
|
+
readonly Function: StructType<{
|
|
151
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
152
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
153
|
+
}>;
|
|
154
|
+
readonly AsyncFunction: StructType<{
|
|
155
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
156
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
157
|
+
}>;
|
|
158
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
159
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
160
|
+
}>>;
|
|
161
|
+
children: OptionType<StringType>;
|
|
162
|
+
keyType: OptionType<import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
163
|
+
readonly Never: NullType;
|
|
164
|
+
readonly Null: NullType;
|
|
165
|
+
readonly Boolean: NullType;
|
|
166
|
+
readonly Integer: NullType;
|
|
167
|
+
readonly Float: NullType;
|
|
168
|
+
readonly String: NullType;
|
|
169
|
+
readonly DateTime: NullType;
|
|
170
|
+
readonly Blob: NullType;
|
|
171
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
172
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
173
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
174
|
+
readonly Dict: StructType<{
|
|
175
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
176
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
177
|
+
}>;
|
|
178
|
+
readonly Struct: ArrayType<StructType<{
|
|
179
|
+
readonly name: StringType;
|
|
180
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
181
|
+
}>>;
|
|
182
|
+
readonly Variant: ArrayType<StructType<{
|
|
183
|
+
readonly name: StringType;
|
|
184
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
185
|
+
}>>;
|
|
186
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
187
|
+
readonly ref: IntegerType;
|
|
188
|
+
readonly wrapper: StructType<{
|
|
189
|
+
readonly id: IntegerType;
|
|
190
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
191
|
+
}>;
|
|
192
|
+
}>;
|
|
193
|
+
readonly Function: StructType<{
|
|
194
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
195
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
196
|
+
}>;
|
|
197
|
+
readonly AsyncFunction: StructType<{
|
|
198
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
199
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
200
|
+
}>;
|
|
201
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
202
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
203
|
+
}>>>;
|
|
204
|
+
snapshot: OptionType<BlobType>;
|
|
205
|
+
readEntry: FunctionType<[StringType, IntegerType], OptionType<BlobType>>;
|
|
206
|
+
onPatch: OptionType<FunctionType<[BlobType], NullType>>;
|
|
207
|
+
onApply: OptionType<import("@elaraai/east").VariantType<{
|
|
208
|
+
readonly sync: FunctionType<[BlobType], import("@elaraai/east").VariantType<{
|
|
209
|
+
readonly applied: StructType<{
|
|
210
|
+
readonly revision: OptionType<StringType>;
|
|
211
|
+
}>;
|
|
212
|
+
readonly rejected: ArrayType<StructType<{
|
|
213
|
+
readonly entry: StringType;
|
|
214
|
+
readonly row: OptionType<IntegerType>;
|
|
215
|
+
readonly field: OptionType<StringType>;
|
|
216
|
+
readonly message: StringType;
|
|
217
|
+
}>>;
|
|
218
|
+
readonly conflict: ArrayType<StructType<{
|
|
219
|
+
readonly entry: StringType;
|
|
220
|
+
readonly row: OptionType<IntegerType>;
|
|
221
|
+
readonly field: OptionType<StringType>;
|
|
222
|
+
readonly message: StringType;
|
|
223
|
+
}>>;
|
|
224
|
+
}>>;
|
|
225
|
+
readonly async: import("@elaraai/east").AsyncFunctionType<[BlobType], import("@elaraai/east").VariantType<{
|
|
226
|
+
readonly applied: StructType<{
|
|
227
|
+
readonly revision: OptionType<StringType>;
|
|
228
|
+
}>;
|
|
229
|
+
readonly rejected: ArrayType<StructType<{
|
|
230
|
+
readonly entry: StringType;
|
|
231
|
+
readonly row: OptionType<IntegerType>;
|
|
232
|
+
readonly field: OptionType<StringType>;
|
|
233
|
+
readonly message: StringType;
|
|
234
|
+
}>>;
|
|
235
|
+
readonly conflict: ArrayType<StructType<{
|
|
236
|
+
readonly entry: StringType;
|
|
237
|
+
readonly row: OptionType<IntegerType>;
|
|
238
|
+
readonly field: OptionType<StringType>;
|
|
239
|
+
readonly message: StringType;
|
|
240
|
+
}>>;
|
|
241
|
+
}>>;
|
|
242
|
+
}>>;
|
|
243
|
+
mode: import("@elaraai/east").VariantType<{
|
|
244
|
+
readonly batch: NullType;
|
|
245
|
+
readonly auto: NullType;
|
|
246
|
+
}>;
|
|
247
|
+
}>>;
|
|
248
|
+
readonly entries: OptionType<StructType<{
|
|
249
|
+
readonly revision: FunctionType<[], OptionType<StringType>>;
|
|
250
|
+
readonly refresh: FunctionType<[OptionType<StringType>], NullType>;
|
|
251
|
+
readonly entry: FunctionType<[StringType], OptionType<OptionType<BlobType>>>;
|
|
252
|
+
readonly last: FunctionType<[], OptionType<OptionType<StringType>>>;
|
|
253
|
+
}>>;
|
|
254
|
+
readonly history: OptionType<FunctionType<[], OptionType<ArrayType<StructType<{
|
|
255
|
+
readonly hash: StringType;
|
|
256
|
+
readonly parent: OptionType<StringType>;
|
|
257
|
+
readonly state: StringType;
|
|
258
|
+
readonly mutation: StringType;
|
|
259
|
+
readonly actor: StringType;
|
|
260
|
+
readonly at: import("@elaraai/east").DateTimeType;
|
|
261
|
+
readonly delta: OptionType<StringType>;
|
|
262
|
+
}>>>>>;
|
|
263
|
+
readonly fields: ArrayType<StructType<{
|
|
264
|
+
readonly path: ArrayType<StringType>;
|
|
265
|
+
readonly label: StringType;
|
|
266
|
+
readonly help: OptionType<StringType>;
|
|
267
|
+
readonly group: OptionType<StringType>;
|
|
268
|
+
readonly type: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
269
|
+
readonly Never: NullType;
|
|
270
|
+
readonly Null: NullType;
|
|
271
|
+
readonly Boolean: NullType;
|
|
272
|
+
readonly Integer: NullType;
|
|
273
|
+
readonly Float: NullType;
|
|
274
|
+
readonly String: NullType;
|
|
275
|
+
readonly DateTime: NullType;
|
|
276
|
+
readonly Blob: NullType;
|
|
277
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
278
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
279
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
280
|
+
readonly Dict: StructType<{
|
|
281
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
282
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
283
|
+
}>;
|
|
284
|
+
readonly Struct: ArrayType<StructType<{
|
|
285
|
+
readonly name: StringType;
|
|
286
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
287
|
+
}>>;
|
|
288
|
+
readonly Variant: ArrayType<StructType<{
|
|
289
|
+
readonly name: StringType;
|
|
290
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
291
|
+
}>>;
|
|
292
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
293
|
+
readonly ref: IntegerType;
|
|
294
|
+
readonly wrapper: StructType<{
|
|
295
|
+
readonly id: IntegerType;
|
|
296
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
297
|
+
}>;
|
|
298
|
+
}>;
|
|
299
|
+
readonly Function: StructType<{
|
|
300
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
301
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
302
|
+
}>;
|
|
303
|
+
readonly AsyncFunction: StructType<{
|
|
304
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
305
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
306
|
+
}>;
|
|
307
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
308
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
309
|
+
}>>;
|
|
310
|
+
readonly optional: BooleanType;
|
|
311
|
+
readonly editor: import("@elaraai/east").VariantType<{
|
|
312
|
+
readonly text: StructType<{
|
|
313
|
+
readonly placeholder: OptionType<StringType>;
|
|
314
|
+
}>;
|
|
315
|
+
readonly number: StructType<{
|
|
316
|
+
readonly unit: OptionType<StringType>;
|
|
317
|
+
readonly step: OptionType<import("@elaraai/east").FloatType>;
|
|
318
|
+
readonly min: OptionType<import("@elaraai/east").FloatType>;
|
|
319
|
+
readonly max: OptionType<import("@elaraai/east").FloatType>;
|
|
320
|
+
}>;
|
|
321
|
+
readonly checkbox: NullType;
|
|
322
|
+
readonly datetime: StructType<{
|
|
323
|
+
readonly precision: OptionType<import("@elaraai/east").VariantType<{
|
|
324
|
+
readonly date: NullType;
|
|
325
|
+
readonly time: NullType;
|
|
326
|
+
readonly datetime: NullType;
|
|
327
|
+
}>>;
|
|
328
|
+
}>;
|
|
329
|
+
readonly select: ArrayType<StructType<{
|
|
330
|
+
readonly case: StringType;
|
|
331
|
+
readonly label: StringType;
|
|
332
|
+
}>>;
|
|
333
|
+
readonly tags: StructType<{
|
|
334
|
+
readonly options: ArrayType<StringType>;
|
|
335
|
+
}>;
|
|
336
|
+
readonly checklist: StructType<{
|
|
337
|
+
readonly text: StringType;
|
|
338
|
+
readonly done: StringType;
|
|
339
|
+
}>;
|
|
340
|
+
readonly reference: StructType<{
|
|
341
|
+
readonly of: StringType;
|
|
342
|
+
}>;
|
|
343
|
+
readonly readonly: NullType;
|
|
344
|
+
}>;
|
|
345
|
+
}>>;
|
|
346
|
+
readonly inspector: OptionType<FunctionType<[BlobType, FunctionType<[BlobType], NullType>], import("@elaraai/east").RecursiveType<import("@elaraai/east-ui").UIComponentNode>>>;
|
|
347
|
+
readonly ready: OptionType<FunctionType<[ArrayType<StructType<{
|
|
348
|
+
readonly id: StringType;
|
|
349
|
+
readonly entry: BlobType;
|
|
350
|
+
}>>], ArrayType<import("@elaraai/east").VariantType<{
|
|
351
|
+
readonly ready: NullType;
|
|
352
|
+
readonly incomplete: ArrayType<StructType<{
|
|
353
|
+
readonly field: StringType;
|
|
354
|
+
readonly message: StringType;
|
|
355
|
+
}>>;
|
|
356
|
+
readonly invalid: ArrayType<StructType<{
|
|
357
|
+
readonly field: StringType;
|
|
358
|
+
readonly message: StringType;
|
|
359
|
+
}>>;
|
|
360
|
+
}>>>>;
|
|
361
|
+
readonly set: FunctionType<[BlobType, ArrayType<StructType<{
|
|
362
|
+
readonly path: ArrayType<StringType>;
|
|
363
|
+
readonly value: BlobType;
|
|
364
|
+
}>>], OptionType<BlobType>>;
|
|
365
|
+
readonly rowType: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
366
|
+
readonly Never: NullType;
|
|
367
|
+
readonly Null: NullType;
|
|
368
|
+
readonly Boolean: NullType;
|
|
369
|
+
readonly Integer: NullType;
|
|
370
|
+
readonly Float: NullType;
|
|
371
|
+
readonly String: NullType;
|
|
372
|
+
readonly DateTime: NullType;
|
|
373
|
+
readonly Blob: NullType;
|
|
374
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
375
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
376
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
377
|
+
readonly Dict: StructType<{
|
|
378
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
379
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
380
|
+
}>;
|
|
381
|
+
readonly Struct: ArrayType<StructType<{
|
|
382
|
+
readonly name: StringType;
|
|
383
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
384
|
+
}>>;
|
|
385
|
+
readonly Variant: ArrayType<StructType<{
|
|
386
|
+
readonly name: StringType;
|
|
387
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
388
|
+
}>>;
|
|
389
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
390
|
+
readonly ref: IntegerType;
|
|
391
|
+
readonly wrapper: StructType<{
|
|
392
|
+
readonly id: IntegerType;
|
|
393
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
394
|
+
}>;
|
|
395
|
+
}>;
|
|
396
|
+
readonly Function: StructType<{
|
|
397
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
398
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
399
|
+
}>;
|
|
400
|
+
readonly AsyncFunction: StructType<{
|
|
401
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
402
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
403
|
+
}>;
|
|
404
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
405
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
406
|
+
}>>;
|
|
407
|
+
};
|
|
408
|
+
/** A kind's record, bound: how, its handle, and its row type. */
|
|
409
|
+
export interface KindBinding {
|
|
410
|
+
/** `record`: `Record.bind` with its patch door, editable; `data`: `Data.bind`, read whole; `paged`: `Data.bindPaged`, read through a source. */
|
|
411
|
+
readonly form: "record" | "data" | "paged";
|
|
412
|
+
/** The binding's handle. */
|
|
413
|
+
readonly handle: ExprType<EastType>;
|
|
414
|
+
/** The record's row type. */
|
|
415
|
+
readonly rowType: StructType;
|
|
416
|
+
}
|
|
417
|
+
/** An accessor of a row and its key: what a computed role is. */
|
|
418
|
+
export type KindAccessor<R extends EastType, T extends EastType> = (row: ExprType<R>, key: ExprType<StringType>) => SubtypeExprOrValue<T>;
|
|
419
|
+
/** A kind's own Details: an East function over the row and its writer, as the Sheet's are. */
|
|
420
|
+
export type KindRowInspector<R extends StructType> = SubtypeExprOrValue<FunctionType<[R, FunctionType<[R], NullType>], UIComponentType>>;
|
|
421
|
+
/** A kind's rows, by key: what a read of it gives; `none` while it is in flight. */
|
|
422
|
+
export type KindRowsRead = ExprType<FunctionType<[], OptionType<DictType<StringType, EastType>>>>;
|
|
423
|
+
/**
|
|
424
|
+
* A kind's record read whole: its binding's `read()` — `Record.bind`'s or
|
|
425
|
+
* `Data.bind`'s — by key.
|
|
426
|
+
*
|
|
427
|
+
* @param handle - The record's binding
|
|
428
|
+
* @param rowType - Its row type
|
|
429
|
+
* @returns `()` → the record's rows, by key
|
|
430
|
+
*/
|
|
431
|
+
export declare function kindWholeRows(handle: ExprType<EastType>, rowType: StructType): KindRowsRead;
|
|
432
|
+
/**
|
|
433
|
+
* A kind's narrowing read complete through its source of the builder's slice
|
|
434
|
+
* — the record slice's `PagedScan`, over `recordSliceReadPlatform` — answering
|
|
435
|
+
* `none` while a search or a page is in flight.
|
|
436
|
+
*
|
|
437
|
+
* Through its source a kind reads what its narrowing holds and nothing else:
|
|
438
|
+
* the source's choices, each as the rail holds it. Read with `every`, it reads
|
|
439
|
+
* every row through its source instead, and never the narrowing, so a choice
|
|
440
|
+
* reads none of its rows again: the renderer draws the rows the narrowing
|
|
441
|
+
* leaves out as context, from the source's shown keys. An entry's row is its
|
|
442
|
+
* `row` — the source joins it — or its `value`, for an index that carries the
|
|
443
|
+
* whole row.
|
|
444
|
+
*
|
|
445
|
+
* @param part - The kind's source of the slice, bound once in the builder's payload (`recordSources(…).bind($)`)
|
|
446
|
+
* @param source - The source's name
|
|
447
|
+
* @param rowType - The kind's record's row type
|
|
448
|
+
* @param where - The kind, as a refusal names it
|
|
449
|
+
* @param every - Whether it reads every row, the narrowing read nowhere: what the narrowing leaves out draws as context
|
|
450
|
+
* @param remedy - How the refusal of a source over another record names the source to give
|
|
451
|
+
* @returns `()` → the rows the narrowing holds — or every row — by key; `none` while a search or a page is in flight
|
|
452
|
+
* @throws {Error} When the source narrows another record, or reads neither its rows nor an index carrying them
|
|
453
|
+
*/
|
|
454
|
+
export declare function kindSourceRows(part: ExprType<StructType>, source: string, rowType: StructType, where: string, every: boolean, remedy: string): KindRowsRead;
|
|
455
|
+
/**
|
|
456
|
+
* A field's type by name, refused naming the role when the row lacks it.
|
|
457
|
+
*
|
|
458
|
+
* @param rowType - The kind's row type
|
|
459
|
+
* @param where - The kind, as a refusal names it
|
|
460
|
+
* @returns `(role, name)` → the field's type
|
|
461
|
+
*/
|
|
462
|
+
export declare function fieldTypeOf(rowType: StructType, where: string): (role: string, name: string) => EastType;
|
|
463
|
+
/**
|
|
464
|
+
* A role naming a field of one type: the field's name, refused naming the
|
|
465
|
+
* role, the field and its type.
|
|
466
|
+
*
|
|
467
|
+
* @param rowType - The kind's row type
|
|
468
|
+
* @param where - The kind, as a refusal names it
|
|
469
|
+
* @returns `(role, name, type, what)` → the field's name; `undefined` for a role not given
|
|
470
|
+
*/
|
|
471
|
+
export declare function roleField(rowType: StructType, where: string): (role: string, name: string | undefined, type: EastType, what: string) => string | undefined;
|
|
472
|
+
/**
|
|
473
|
+
* An accessor role, reified once and held to the type it returns, naming the
|
|
474
|
+
* role and what it returns.
|
|
475
|
+
*
|
|
476
|
+
* @typeParam T - The type it returns
|
|
477
|
+
* @param rowType - The kind's row type
|
|
478
|
+
* @param where - The kind, as a refusal names it
|
|
479
|
+
* @param role - The role, as the refusal names it
|
|
480
|
+
* @param out - The type it returns
|
|
481
|
+
* @param what - What it returns, as the refusal says it
|
|
482
|
+
* @param fn - What the kind was given
|
|
483
|
+
* @returns The accessor, reified; `undefined` when not given
|
|
484
|
+
* @throws {Error} When it is no function, or returns another type
|
|
485
|
+
*/
|
|
486
|
+
export declare function accessorRole<T extends EastType>(rowType: StructType, where: string, role: string, out: T, what: string, fn: unknown): import("@elaraai/east").CallableFunctionExpr<[EastType, EastType], T> | undefined;
|
|
487
|
+
/**
|
|
488
|
+
* A row of the record's type, field by field: each field `set` names from it,
|
|
489
|
+
* every other from `source`.
|
|
490
|
+
*
|
|
491
|
+
* @param rowType - The record's row type
|
|
492
|
+
* @param source - The row, or a card's values, the other fields are read from
|
|
493
|
+
* @param set - The fields written, by name
|
|
494
|
+
* @returns The row
|
|
495
|
+
*/
|
|
496
|
+
export declare function rowWith(rowType: StructType, source: unknown, set: Readonly<Record<string, unknown>>): ExprType<EastType>;
|
|
497
|
+
/**
|
|
498
|
+
* The row's fields less those its roles write on a drop: what a card's values
|
|
499
|
+
* give.
|
|
500
|
+
*
|
|
501
|
+
* @param rowType - The record's row type
|
|
502
|
+
* @param placed - The fields a drop writes
|
|
503
|
+
* @returns The values' type
|
|
504
|
+
*/
|
|
505
|
+
export declare function valuesTypeOf(rowType: StructType, placed: readonly string[]): StructType;
|
|
506
|
+
/**
|
|
507
|
+
* An accessor's value for a row, bound in the block; `otherwise` for a kind
|
|
508
|
+
* with no such accessor.
|
|
509
|
+
*
|
|
510
|
+
* @typeParam T - The type the accessor returns
|
|
511
|
+
* @param $ - The block
|
|
512
|
+
* @param fn - The accessor, reified; `undefined` for none
|
|
513
|
+
* @param row - The row
|
|
514
|
+
* @param key - Its key
|
|
515
|
+
* @param wrap - What the value becomes
|
|
516
|
+
* @param otherwise - The value without the accessor
|
|
517
|
+
* @returns The value
|
|
518
|
+
*/
|
|
519
|
+
export declare function called<T extends EastType>($: {
|
|
520
|
+
const: (value: unknown) => unknown;
|
|
521
|
+
}, fn: ExprType<FunctionType<[EastType, EastType], T>> | undefined, row: unknown, key: unknown, wrap: (value: ExprType<T>) => unknown, otherwise: unknown): unknown;
|
|
522
|
+
/**
|
|
523
|
+
* A kind's stored rows a read holds, by key: each one's roles, read in the
|
|
524
|
+
* pass that reads the row, beside its bytes. The renderer puts its drafts in
|
|
525
|
+
* place itself.
|
|
526
|
+
*
|
|
527
|
+
* @param read - The kind's read: whole, or through its source
|
|
528
|
+
* @param rolesOf - A row's roles, from it and its key
|
|
529
|
+
* @param EntryType - A stored row's type: its roles beside its bytes
|
|
530
|
+
* @returns `()` → the rows, by key; `none` while the read is in flight
|
|
531
|
+
*/
|
|
532
|
+
export declare function storedRows(read: ExprType<FunctionType<[], OptionType<DictType<StringType, EastType>>>>, rolesOf: ExprType<FunctionType<[EastType, StringType], EastType>>, EntryType: StructType): import("@elaraai/east").CallableFunctionExpr<[], OptionType<DictType<StringType, StructType>>>;
|
|
533
|
+
/**
|
|
534
|
+
* The rows a reader read of a record by area or by key, made its stored rows
|
|
535
|
+
* (#1393): each row's roles, read in the pass that reads it, beside its bytes,
|
|
536
|
+
* as `rows` gives them — from the rows as beast2 bytes of an `Array` of
|
|
537
|
+
* `{ key, row }` at the record's row type, which the reader encodes from what
|
|
538
|
+
* it read.
|
|
539
|
+
*
|
|
540
|
+
* @param rowType - The record's row type
|
|
541
|
+
* @param rolesOf - A row's roles, from it and its key
|
|
542
|
+
* @param EntryType - A stored row's type: its roles beside its bytes
|
|
543
|
+
* @returns `(bytes)` → the rows, by key
|
|
544
|
+
*/
|
|
545
|
+
export declare function rowsReadOf(rowType: StructType, rolesOf: ExprType<FunctionType<[EastType, StringType], EastType>>, EntryType: StructType): import("@elaraai/east").CallableFunctionExpr<[BlobType], DictType<StringType, StructType>>;
|
|
546
|
+
/**
|
|
547
|
+
* A drafted row's roles, from its bytes and its key: what `rows` gives a
|
|
548
|
+
* stored one.
|
|
549
|
+
*
|
|
550
|
+
* @param rowType - The record's row type
|
|
551
|
+
* @param rolesOf - A row's roles, from it and its key
|
|
552
|
+
* @param RolesType - The roles' type
|
|
553
|
+
* @returns `(bytes, key)` → the roles
|
|
554
|
+
*/
|
|
555
|
+
export declare function readOf(rowType: StructType, rolesOf: ExprType<FunctionType<[EastType, StringType], EastType>>, RolesType: StructType): import("@elaraai/east").CallableFunctionExpr<[BlobType, StringType], StructType>;
|
|
556
|
+
/**
|
|
557
|
+
* The app's check over drafted rows, one result each; a check that throws
|
|
558
|
+
* refuses its own row alone.
|
|
559
|
+
*
|
|
560
|
+
* @param rowType - The record's row type
|
|
561
|
+
* @param ready - The app's check over a row and its key
|
|
562
|
+
* @returns The check over bytes; `undefined` for none
|
|
563
|
+
*/
|
|
564
|
+
export declare function readyOf(rowType: StructType, ready: ((row: ExprType<StructType>, key: ExprType<StringType>) => unknown) | undefined): import("@elaraai/east").CallableFunctionExpr<[ArrayType<StructType<{
|
|
565
|
+
readonly id: StringType;
|
|
566
|
+
readonly entry: BlobType;
|
|
567
|
+
}>>], ArrayType<import("@elaraai/east").VariantType<{
|
|
568
|
+
readonly ready: NullType;
|
|
569
|
+
readonly incomplete: ArrayType<StructType<{
|
|
570
|
+
readonly field: StringType;
|
|
571
|
+
readonly message: StringType;
|
|
572
|
+
}>>;
|
|
573
|
+
readonly invalid: ArrayType<StructType<{
|
|
574
|
+
readonly field: StringType;
|
|
575
|
+
readonly message: StringType;
|
|
576
|
+
}>>;
|
|
577
|
+
}>>> | undefined;
|
|
578
|
+
/**
|
|
579
|
+
* The row with each of a card's field writes applied in order, and every other
|
|
580
|
+
* field as it was (#1390): what an author's card dropped on a row sets — the
|
|
581
|
+
* fields its patch sets, each a field at any depth, its value as bytes at the
|
|
582
|
+
* field's type — through the setter Schedule's kinds write an inspector's edit
|
|
583
|
+
* with (`fieldSetters`).
|
|
584
|
+
*
|
|
585
|
+
* @param rowType - The record's row type
|
|
586
|
+
* @returns `(bytes, writes)` → the row written; `none` when a write names no field of the row
|
|
587
|
+
*/
|
|
588
|
+
export declare function rowSetter(rowType: StructType): import("@elaraai/east").CallableFunctionExpr<[BlobType, ArrayType<StructType<{
|
|
589
|
+
readonly path: ArrayType<StringType>;
|
|
590
|
+
readonly value: BlobType;
|
|
591
|
+
}>>], OptionType<BlobType>>;
|
|
592
|
+
/**
|
|
593
|
+
* What every kind declares beside its roles, each typed over the record's
|
|
594
|
+
* row, as Schedule's kinds' are (#1391).
|
|
595
|
+
*
|
|
596
|
+
* @typeParam R - The record's row type
|
|
597
|
+
*/
|
|
598
|
+
export interface RecordSide<R extends StructType = StructType> {
|
|
599
|
+
/** A paged read of the record's own entries, for an editable record read through its source. */
|
|
600
|
+
entries?: unknown;
|
|
601
|
+
/** Hints for the inspector's form over the fields no role writes (`Fields`). */
|
|
602
|
+
fields?: FieldHints<R["fields"]>;
|
|
603
|
+
/** The app's check on a drafted row, over the row and its key: a refusal holds Save, naming the row and its field. */
|
|
604
|
+
ready?: (row: ExprType<R>, key: ExprType<StringType>) => SubtypeExprOrValue<typeof EditingReadinessType>;
|
|
605
|
+
/** The kind's own Details, in place of its form: an East function over the row and its writer. */
|
|
606
|
+
inspector?: KindRowInspector<R>;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* A record's side of a kind on the wire ({@link KindSideFields}): whether it
|
|
610
|
+
* is editable, its session and its read by key, its history, its form, its
|
|
611
|
+
* own Details, the app's check, and the setter an author's card writes its
|
|
612
|
+
* fields through.
|
|
613
|
+
*
|
|
614
|
+
* @typeParam R - The record's row type
|
|
615
|
+
* @param bound - The record's binding
|
|
616
|
+
* @param entries - Its `entries`, checked
|
|
617
|
+
* @param byKey - The paged read its rows are read by key through, if any
|
|
618
|
+
* @param config - Its form's hints, its check and its own Details
|
|
619
|
+
* @param omitted - The fields its roles write, which its form leaves out
|
|
620
|
+
* @param where - The kind, as a refusal names it
|
|
621
|
+
* @returns The fields every kind carries
|
|
622
|
+
* @throws {Error} As `Fields.specs`, `rowInspector` and the patch door's check refuse
|
|
623
|
+
*/
|
|
624
|
+
export declare function recordSide<R extends StructType>(bound: KindBinding, entries: ExprType<EastType> | undefined, byKey: ExprType<EastType> | undefined, config: RecordSide<R>, omitted: readonly (string | undefined)[], where: string): Record<string, unknown>;
|
|
625
|
+
//# sourceMappingURL=record-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-kind.d.ts","sourceRoot":"","sources":["../../../src/utils/record-kind.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAA4B,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAEnI,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EACvE,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACH,oBAAoB,EACpB,KAAK,UAAU,EAClB,MAAM,2BAA2B,CAAC;AAYnC,kEAAkE;AAClE,eAAO,MAAM,eAAe;;;;;;;;KAAgE,CAAC;AAE7F,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,gEAAgE;AAChE,eAAO,MAAM,aAAa;;;;;;;;;;;;;IAAqF,CAAC;AAEhH,+CAA+C;AAC/C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc;aACvB,QAAQ;aACR,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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