@elaraai/east-ui 1.0.39 → 1.0.41

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.
Files changed (121) hide show
  1. package/dist/src/collections/calendar/index.d.ts +275 -62
  2. package/dist/src/collections/calendar/index.d.ts.map +1 -1
  3. package/dist/src/collections/calendar/index.js +168 -51
  4. package/dist/src/collections/calendar/index.js.map +1 -1
  5. package/dist/src/collections/calendar/types.d.ts +228 -22
  6. package/dist/src/collections/calendar/types.d.ts.map +1 -1
  7. package/dist/src/collections/calendar/types.js +132 -18
  8. package/dist/src/collections/calendar/types.js.map +1 -1
  9. package/dist/src/collections/deck/index.d.ts +2229 -0
  10. package/dist/src/collections/deck/index.d.ts.map +1 -0
  11. package/dist/src/collections/deck/index.js +461 -0
  12. package/dist/src/collections/deck/index.js.map +1 -0
  13. package/dist/src/collections/deck/types.d.ts +327 -0
  14. package/dist/src/collections/deck/types.d.ts.map +1 -0
  15. package/dist/src/collections/deck/types.js +206 -0
  16. package/dist/src/collections/deck/types.js.map +1 -0
  17. package/dist/src/collections/index.d.ts +2 -0
  18. package/dist/src/collections/index.d.ts.map +1 -1
  19. package/dist/src/collections/index.js +2 -0
  20. package/dist/src/collections/index.js.map +1 -1
  21. package/dist/src/collections/value-tree/index.d.ts +380 -0
  22. package/dist/src/collections/value-tree/index.d.ts.map +1 -0
  23. package/dist/src/collections/value-tree/index.js +688 -0
  24. package/dist/src/collections/value-tree/index.js.map +1 -0
  25. package/dist/src/collections/value-tree/materialize.d.ts +65 -0
  26. package/dist/src/collections/value-tree/materialize.d.ts.map +1 -0
  27. package/dist/src/collections/value-tree/materialize.js +238 -0
  28. package/dist/src/collections/value-tree/materialize.js.map +1 -0
  29. package/dist/src/collections/value-tree/types.d.ts +324 -0
  30. package/dist/src/collections/value-tree/types.d.ts.map +1 -0
  31. package/dist/src/collections/value-tree/types.js +168 -0
  32. package/dist/src/collections/value-tree/types.js.map +1 -0
  33. package/dist/src/component.d.ts +1047 -61
  34. package/dist/src/component.d.ts.map +1 -1
  35. package/dist/src/component.js +97 -3
  36. package/dist/src/component.js.map +1 -1
  37. package/dist/src/index.d.ts +3 -3
  38. package/dist/src/index.d.ts.map +1 -1
  39. package/dist/src/index.js +2 -2
  40. package/dist/src/index.js.map +1 -1
  41. package/dist/src/internal.d.ts +4 -3
  42. package/dist/src/internal.d.ts.map +1 -1
  43. package/dist/src/internal.js +3 -3
  44. package/dist/src/internal.js.map +1 -1
  45. package/dist/src/layout/splitter/index.d.ts +1 -0
  46. package/dist/src/layout/splitter/index.d.ts.map +1 -1
  47. package/dist/src/layout/splitter/index.js +2 -1
  48. package/dist/src/layout/splitter/index.js.map +1 -1
  49. package/dist/src/layout/splitter/types.d.ts +9 -0
  50. package/dist/src/layout/splitter/types.d.ts.map +1 -1
  51. package/dist/src/layout/splitter/types.js +4 -0
  52. package/dist/src/layout/splitter/types.js.map +1 -1
  53. package/dist/src/navigation/app/index.d.ts +135 -0
  54. package/dist/src/navigation/app/index.d.ts.map +1 -0
  55. package/dist/src/navigation/app/index.js +191 -0
  56. package/dist/src/navigation/app/index.js.map +1 -0
  57. package/dist/src/navigation/index.d.ts +1 -0
  58. package/dist/src/navigation/index.d.ts.map +1 -1
  59. package/dist/src/navigation/index.js +1 -0
  60. package/dist/src/navigation/index.js.map +1 -1
  61. package/dist/src/navigation/pages/types.d.ts +15 -1
  62. package/dist/src/navigation/pages/types.d.ts.map +1 -1
  63. package/dist/src/navigation/pages/types.js.map +1 -1
  64. package/dist/src/platform/slice/impl.js +2 -2
  65. package/dist/src/platform/slice/impl.js.map +1 -1
  66. package/dist/src/runtime/collections/calendar.d.ts +10 -5
  67. package/dist/src/runtime/collections/calendar.d.ts.map +1 -1
  68. package/dist/src/runtime/collections/calendar.js +10 -5
  69. package/dist/src/runtime/collections/calendar.js.map +1 -1
  70. package/dist/src/runtime/collections/deck.d.ts +1066 -0
  71. package/dist/src/runtime/collections/deck.d.ts.map +1 -0
  72. package/dist/src/runtime/collections/deck.js +54 -0
  73. package/dist/src/runtime/collections/deck.js.map +1 -0
  74. package/dist/src/runtime/collections/index.d.ts +2 -0
  75. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  76. package/dist/src/runtime/collections/index.js +2 -0
  77. package/dist/src/runtime/collections/index.js.map +1 -1
  78. package/dist/src/runtime/collections/value-tree.d.ts +202 -0
  79. package/dist/src/runtime/collections/value-tree.d.ts.map +1 -0
  80. package/dist/src/runtime/collections/value-tree.js +49 -0
  81. package/dist/src/runtime/collections/value-tree.js.map +1 -0
  82. package/dist/src/runtime/navigation/app.d.ts +50 -0
  83. package/dist/src/runtime/navigation/app.d.ts.map +1 -0
  84. package/dist/src/runtime/navigation/app.js +51 -0
  85. package/dist/src/runtime/navigation/app.js.map +1 -0
  86. package/dist/src/runtime/navigation/index.d.ts +1 -0
  87. package/dist/src/runtime/navigation/index.d.ts.map +1 -1
  88. package/dist/src/runtime/navigation/index.js +1 -0
  89. package/dist/src/runtime/navigation/index.js.map +1 -1
  90. package/dist/test/collections/calendar.examples.d.ts +2 -0
  91. package/dist/test/collections/calendar.examples.d.ts.map +1 -1
  92. package/dist/test/collections/calendar.examples.js +74 -42
  93. package/dist/test/collections/calendar.examples.js.map +1 -1
  94. package/dist/test/collections/deck.examples.d.ts +8 -0
  95. package/dist/test/collections/deck.examples.d.ts.map +1 -0
  96. package/dist/test/collections/deck.examples.js +169 -0
  97. package/dist/test/collections/deck.examples.js.map +1 -0
  98. package/dist/test/collections/planner.examples.js +2 -2
  99. package/dist/test/collections/value-tree.examples.d.ts +10 -0
  100. package/dist/test/collections/value-tree.examples.d.ts.map +1 -0
  101. package/dist/test/collections/value-tree.examples.js +263 -0
  102. package/dist/test/collections/value-tree.examples.js.map +1 -0
  103. package/dist/test/display/image.examples.js +1 -1
  104. package/dist/test/display/image.examples.js.map +1 -1
  105. package/dist/test/layout/aligned-stack.examples.js +4 -4
  106. package/dist/test/layout/aligned-stack.examples.js.map +1 -1
  107. package/dist/test/layout/dock.examples.js +6 -6
  108. package/dist/test/layout/dock.examples.js.map +1 -1
  109. package/dist/test/layout/splitter.examples.d.ts +1 -0
  110. package/dist/test/layout/splitter.examples.d.ts.map +1 -1
  111. package/dist/test/layout/splitter.examples.js +11 -0
  112. package/dist/test/layout/splitter.examples.js.map +1 -1
  113. package/dist/test/navigation/app.examples.d.ts +22 -0
  114. package/dist/test/navigation/app.examples.d.ts.map +1 -0
  115. package/dist/test/navigation/app.examples.js +116 -0
  116. package/dist/test/navigation/app.examples.js.map +1 -0
  117. package/dist/test/navigation/nav-list.examples.js +2 -2
  118. package/dist/test/navigation/nav-list.examples.js.map +1 -1
  119. package/dist/test/overlays/drawer.examples.js +2 -2
  120. package/dist/test/overlays/drawer.examples.js.map +1 -1
  121. package/package.json +3 -3
@@ -0,0 +1,380 @@
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
+ * ValueTree — the editable value-driven tree (#360).
7
+ *
8
+ * `ValueTree.Root(value, opts)` walks the STATIC East type of `value` at
9
+ * authoring time and materializes it into the fixed recursive
10
+ * {@link ValueTreeNodeType} IR — automatic tree formation from ANY East
11
+ * type, leaf-type-aware editing, and compound/collection editing
12
+ * (add/remove array rows and dict entries, variant tag switching,
13
+ * option toggling).
14
+ *
15
+ * Two edit surfaces, one contract:
16
+ *
17
+ * - **Value handlers** (the default): `onUpdate` receives the whole
18
+ * value with the edit applied; `at: [ValueTree.at(Type, p => …, fn)]`
19
+ * scopes receive just the rebuilt SUBTREE at their path. Every edit
20
+ * dispatches to the deepest scope whose path prefixes the edit path
21
+ * and bubbles up to `onUpdate` when no scope matches. The rebuild is
22
+ * an authoring-time macro over the static type — hosts never
23
+ * hand-apply paths.
24
+ * - **Path callbacks** (the escape hatch): `onEdit` / `onInsert` /
25
+ * `onRemove` / `onTag` receive the raw typed path and payload for
26
+ * hosts that own a finer-grained store. A raw callback overrides the
27
+ * generated handler for its event.
28
+ *
29
+ * The host owns the data either way: write the new value and let the
30
+ * Reactive re-materialization refresh the tree (the same contract as
31
+ * every collection surface).
32
+ */
33
+ import { type EastType, type ExprType, type SubtypeExprOrValue, type ValueTypeOf, ArrayType, type AsyncFunctionType, type DictType, Expr, FunctionType, NullType, type RecursiveType, StringType, StructType, type VariantType } from "@elaraai/east";
34
+ import { UIComponentType } from "../../component.js";
35
+ import { ValueTreePathType, ValueTreeLeafType } from "./types.js";
36
+ export { ValueTreeStepType, ValueTreePathType, ValueTreeLeafType, ValueTreeNodeType, ValueTreeStyleType, ValueTreeRootType, } from "./types.js";
37
+ import { materialize, applyEdit } from "./materialize.js";
38
+ export { materialize, applyEdit, type ValueTreeNodeValue, type ValueTreeLeafValue, type ValueTreeStepValue, type ValueTreeEditOp, } from "./materialize.js";
39
+ /** One recorded step of a scope path (host-side; mirrors the editable
40
+ * subset of {@link ValueTreeStepType}). */
41
+ export type ValueTreeScopeStep = {
42
+ readonly kind: "field";
43
+ readonly name: string;
44
+ } | {
45
+ readonly kind: "index";
46
+ readonly index: bigint;
47
+ } | {
48
+ readonly kind: "key";
49
+ readonly key: string;
50
+ } | {
51
+ readonly kind: "some";
52
+ };
53
+ /**
54
+ * A scoped subtree handler built by {@link ValueTree.at} — dispatched
55
+ * when an edit lands at or below its path (deepest scope wins;
56
+ * unmatched edits bubble to the root `onUpdate`).
57
+ */
58
+ export interface ValueTreeScope {
59
+ /** @internal Recorded path steps from the root. */
60
+ readonly steps: readonly ValueTreeScopeStep[];
61
+ /** @internal The subtree's East type at the recorded path. */
62
+ readonly subtype: EastType;
63
+ /** @internal The user's subtree handler (`FunctionType([S], Null)`). */
64
+ readonly handler: unknown;
65
+ }
66
+ /**
67
+ * The typed path probe passed to {@link ValueTree.at} accessors.
68
+ * Navigation is structural over the value's static type: struct fields
69
+ * are properties, `item(i)` addresses an array element, `entry(k)` a
70
+ * dict entry, and `some()` an option's payload. RecursiveType wrappers
71
+ * are transparent.
72
+ *
73
+ * @typeParam T - The East type at this probe position
74
+ */
75
+ export type ValueTreeProbe<T> = T extends RecursiveType<infer U> ? ValueTreeProbe<U> : {
76
+ readonly __vt?: T;
77
+ } & (T extends StructType<infer F> ? {
78
+ readonly [K in keyof F]: ValueTreeProbe<F[K]>;
79
+ } : unknown) & (T extends ArrayType<infer U> ? {
80
+ item(index: number | bigint): ValueTreeProbe<U>;
81
+ } : unknown) & (T extends DictType<StringType, infer V> ? {
82
+ entry(key: string): ValueTreeProbe<V>;
83
+ } : unknown) & (T extends VariantType<{
84
+ none: NullType;
85
+ some: infer U;
86
+ }> ? {
87
+ some(): ValueTreeProbe<U>;
88
+ } : unknown);
89
+ /**
90
+ * Builds a scoped subtree handler for {@link ValueTree.Root}'s `at`
91
+ * option: navigate the root type with the typed probe, and receive the
92
+ * rebuilt SUBTREE at that path whenever an edit lands inside it.
93
+ *
94
+ * @typeParam T - The root value's East type
95
+ * @typeParam S - The subtree type at the accessor's path (inferred)
96
+ * @param root - The root value's East type (drives probe navigation)
97
+ * @param path - Accessor over the typed probe selecting the subtree
98
+ * @param onUpdate - Handler receiving the rebuilt subtree value
99
+ * @returns An opaque scope for the `at` option
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * import { East, DictType, StringType, FloatType, NullType } from "@elaraai/east";
104
+ * import { ValueTree } from "@elaraai/east-ui";
105
+ *
106
+ * const RatesType = DictType(StringType, FloatType);
107
+ * const scope = ValueTree.at(RatesType, p => p.entry("base"),
108
+ * East.function([FloatType], NullType, (_$, _next) => null));
109
+ * ```
110
+ */
111
+ declare function scopeAt<T extends EastType, S extends EastType>(root: T, path: (probe: ValueTreeProbe<T>) => {
112
+ readonly __vt?: S;
113
+ }, onUpdate: SubtypeExprOrValue<FunctionType<[S], NullType>> | SubtypeExprOrValue<AsyncFunctionType<[S], NullType>>): ValueTreeScope;
114
+ /**
115
+ * Options for {@link ValueTree.Root}.
116
+ *
117
+ * @typeParam T - The value's East type (drives the handler signatures)
118
+ *
119
+ * @property onUpdate - Whole-value handler: every edit arrives as the
120
+ * fully rebuilt value (the default sink when no `at` scope matches)
121
+ * @property at - Scoped subtree handlers ({@link ValueTree.at}); the
122
+ * deepest scope whose path prefixes the edit path receives the rebuilt
123
+ * subtree, unmatched edits bubble to `onUpdate`
124
+ * @property onEdit - RAW leaf edit callback: the node path + the new leaf
125
+ * value (overrides the generated handler for leaf edits)
126
+ * @property onInsert - RAW append/insert callback: array paths end with an
127
+ * `append` step, dict paths with the new `key` step
128
+ * @property onRemove - RAW remove callback with the element/entry path
129
+ * @property onTag - RAW variant tag switch (and option toggle:
130
+ * "some"/"none") with the node path and the new tag
131
+ * @property style - Layout style (height / maxHeight)
132
+ */
133
+ export interface ValueTreeOptions<T extends EastType = EastType> {
134
+ /** Whole-value handler — receives the rebuilt value after every edit */
135
+ onUpdate?: SubtypeExprOrValue<FunctionType<[T], NullType>> | SubtypeExprOrValue<AsyncFunctionType<[T], NullType>>;
136
+ /** Scoped subtree handlers (deepest match wins, else `onUpdate`) */
137
+ at?: readonly ValueTreeScope[];
138
+ /** RAW leaf edit callback: node path + new leaf value */
139
+ onEdit?: SubtypeExprOrValue<FunctionType<[ValueTreePathType, ValueTreeLeafType], NullType>> | SubtypeExprOrValue<AsyncFunctionType<[ValueTreePathType, ValueTreeLeafType], NullType>>;
140
+ /** RAW append/insert callback (array `append` / dict new-`key` paths) */
141
+ onInsert?: SubtypeExprOrValue<FunctionType<[ValueTreePathType], NullType>> | SubtypeExprOrValue<AsyncFunctionType<[ValueTreePathType], NullType>>;
142
+ /** RAW remove callback with the element/entry path */
143
+ onRemove?: SubtypeExprOrValue<FunctionType<[ValueTreePathType], NullType>> | SubtypeExprOrValue<AsyncFunctionType<[ValueTreePathType], NullType>>;
144
+ /** RAW variant tag switch / option toggle callback */
145
+ onTag?: SubtypeExprOrValue<FunctionType<[ValueTreePathType, StringType], NullType>> | SubtypeExprOrValue<AsyncFunctionType<[ValueTreePathType, StringType], NullType>>;
146
+ /** Layout style (height / maxHeight) */
147
+ style?: {
148
+ /** Pinned height (CSS length; rows virtualize within) */
149
+ height?: SubtypeExprOrValue<StringType>;
150
+ /** Height cap (content-sized up to it, then scrolls) */
151
+ maxHeight?: SubtypeExprOrValue<StringType>;
152
+ };
153
+ }
154
+ /**
155
+ * Creates a ValueTree — the editable tree of any East value.
156
+ *
157
+ * @typeParam T - The value's East type (captured statically)
158
+ * @param value - The value to materialize (any East type)
159
+ * @param options - Value handlers, raw path callbacks + style
160
+ * ({@link ValueTreeOptions})
161
+ * @returns An East expression of `UIComponentType`
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * import { East, DictType, StringType, StructType, FloatType } from "@elaraai/east";
166
+ * import { ValueTree, UIComponentType } from "@elaraai/east-ui";
167
+ *
168
+ * const ConfigType = DictType(StringType, StructType({ rate: FloatType, label: StringType }));
169
+ * const view = East.function([ConfigType], UIComponentType, (_$, config) =>
170
+ * ValueTree.Root(config),
171
+ * );
172
+ * ```
173
+ */
174
+ declare function createValueTree<T extends EastType>(value: SubtypeExprOrValue<T> | Expr, options?: ValueTreeOptions<T>): ExprType<UIComponentType>;
175
+ /**
176
+ * A host-side zero value for any East data type — the default payload
177
+ * for inserted elements, toggled options and switched variant cases.
178
+ *
179
+ * @param t - The East type to zero
180
+ * @returns The TypeScript `ValueTypeOf` zero value
181
+ * @throws When the type has no default (functions; recursion below the
182
+ * top level)
183
+ *
184
+ * @remarks
185
+ * Delegates to east's {@link defaultValue} (option variants default to
186
+ * `none` — their sorted first case), unrolling a top-level
187
+ * RecursiveType wrapper first.
188
+ */
189
+ declare function zeroValue<T extends EastType>(t: T): ValueTypeOf<T>;
190
+ /**
191
+ * ValueTree component namespace.
192
+ *
193
+ * @remarks
194
+ * `ValueTree.Root(value, options)` materializes any East value into the
195
+ * editable tree; `ValueTree.at(Type, p => …, handler)` builds a scoped
196
+ * subtree handler for the `at` option; `ValueTree.zero(Type)` builds
197
+ * the host-side default element for raw `onInsert` handlers.
198
+ */
199
+ export declare const ValueTree: {
200
+ /**
201
+ * Creates a ValueTree — the editable tree of any East value.
202
+ *
203
+ * @param value - The value to materialize (any East type)
204
+ * @param options - Value handlers, raw callbacks + style
205
+ * ({@link ValueTreeOptions})
206
+ * @returns An East expression of `UIComponentType`
207
+ */
208
+ readonly Root: typeof createValueTree;
209
+ /**
210
+ * Builds a scoped subtree handler for the `at` option — the deepest
211
+ * scope whose path prefixes an edit's path receives the rebuilt
212
+ * subtree; unmatched edits bubble to `onUpdate`.
213
+ */
214
+ readonly at: typeof scopeAt;
215
+ /** Host-side zero value for any East type (for raw `onInsert` handlers). */
216
+ readonly zero: typeof zeroValue;
217
+ /**
218
+ * Host-side materializer — a DECODED value + its type into the node tree
219
+ * the renderer consumes (for callers holding a value, not an `Expr`; the
220
+ * East-side {@link ValueTree.Root} materializes an expression instead).
221
+ */
222
+ readonly materialize: typeof materialize;
223
+ /**
224
+ * Host-side edit application — apply one reported ValueTree edit (leaf /
225
+ * insert / remove / tag) to a decoded value, returning the new value.
226
+ */
227
+ readonly applyEdit: typeof applyEdit;
228
+ readonly Types: {
229
+ /** The full ValueTree payload. */
230
+ readonly Root: StructType<{
231
+ readonly root: RecursiveType<VariantType<{
232
+ readonly struct: StructType<{
233
+ readonly fields: ArrayType<StructType<{
234
+ readonly name: StringType;
235
+ readonly node: import("@elaraai/east").RecursiveTypeMarker;
236
+ }>>;
237
+ }>;
238
+ readonly array: StructType<{
239
+ readonly items: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
240
+ }>;
241
+ readonly dict: StructType<{
242
+ readonly entries: ArrayType<StructType<{
243
+ readonly key: StringType;
244
+ readonly node: import("@elaraai/east").RecursiveTypeMarker;
245
+ }>>;
246
+ readonly editable: import("@elaraai/east").BooleanType;
247
+ }>;
248
+ readonly option: StructType<{
249
+ readonly value: import("@elaraai/east").OptionType<import("@elaraai/east").RecursiveTypeMarker>;
250
+ }>;
251
+ readonly variant: StructType<{
252
+ readonly tag: StringType;
253
+ readonly tags: ArrayType<StringType>;
254
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
255
+ }>;
256
+ readonly leaf: VariantType<{
257
+ readonly string: StringType;
258
+ readonly integer: import("@elaraai/east").IntegerType;
259
+ readonly float: import("@elaraai/east").FloatType;
260
+ readonly boolean: import("@elaraai/east").BooleanType;
261
+ readonly datetime: import("@elaraai/east").DateTimeType;
262
+ readonly null: NullType;
263
+ }>;
264
+ readonly opaque: StringType;
265
+ }>>;
266
+ readonly onEdit: import("@elaraai/east").OptionType<AsyncFunctionType<[ArrayType<VariantType<{
267
+ readonly append: NullType;
268
+ readonly field: StringType;
269
+ readonly index: import("@elaraai/east").IntegerType;
270
+ readonly key: StringType;
271
+ readonly some: NullType;
272
+ readonly tag: NullType;
273
+ }>>, VariantType<{
274
+ readonly string: StringType;
275
+ readonly integer: import("@elaraai/east").IntegerType;
276
+ readonly float: import("@elaraai/east").FloatType;
277
+ readonly boolean: import("@elaraai/east").BooleanType;
278
+ readonly datetime: import("@elaraai/east").DateTimeType;
279
+ readonly null: NullType;
280
+ }>], NullType>>;
281
+ readonly onInsert: import("@elaraai/east").OptionType<AsyncFunctionType<[ArrayType<VariantType<{
282
+ readonly append: NullType;
283
+ readonly field: StringType;
284
+ readonly index: import("@elaraai/east").IntegerType;
285
+ readonly key: StringType;
286
+ readonly some: NullType;
287
+ readonly tag: NullType;
288
+ }>>], NullType>>;
289
+ readonly onRemove: import("@elaraai/east").OptionType<AsyncFunctionType<[ArrayType<VariantType<{
290
+ readonly append: NullType;
291
+ readonly field: StringType;
292
+ readonly index: import("@elaraai/east").IntegerType;
293
+ readonly key: StringType;
294
+ readonly some: NullType;
295
+ readonly tag: NullType;
296
+ }>>], NullType>>;
297
+ readonly onTag: import("@elaraai/east").OptionType<AsyncFunctionType<[ArrayType<VariantType<{
298
+ readonly append: NullType;
299
+ readonly field: StringType;
300
+ readonly index: import("@elaraai/east").IntegerType;
301
+ readonly key: StringType;
302
+ readonly some: NullType;
303
+ readonly tag: NullType;
304
+ }>>, StringType], NullType>>;
305
+ readonly style: import("@elaraai/east").OptionType<StructType<{
306
+ readonly height: import("@elaraai/east").OptionType<StringType>;
307
+ readonly maxHeight: import("@elaraai/east").OptionType<StringType>;
308
+ }>>;
309
+ }>;
310
+ /** The materialized node tree. */
311
+ readonly Node: RecursiveType<VariantType<{
312
+ readonly struct: StructType<{
313
+ readonly fields: ArrayType<StructType<{
314
+ readonly name: StringType;
315
+ readonly node: import("@elaraai/east").RecursiveTypeMarker;
316
+ }>>;
317
+ }>;
318
+ readonly array: StructType<{
319
+ readonly items: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
320
+ }>;
321
+ readonly dict: StructType<{
322
+ readonly entries: ArrayType<StructType<{
323
+ readonly key: StringType;
324
+ readonly node: import("@elaraai/east").RecursiveTypeMarker;
325
+ }>>;
326
+ readonly editable: import("@elaraai/east").BooleanType;
327
+ }>;
328
+ readonly option: StructType<{
329
+ readonly value: import("@elaraai/east").OptionType<import("@elaraai/east").RecursiveTypeMarker>;
330
+ }>;
331
+ readonly variant: StructType<{
332
+ readonly tag: StringType;
333
+ readonly tags: ArrayType<StringType>;
334
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
335
+ }>;
336
+ readonly leaf: VariantType<{
337
+ readonly string: StringType;
338
+ readonly integer: import("@elaraai/east").IntegerType;
339
+ readonly float: import("@elaraai/east").FloatType;
340
+ readonly boolean: import("@elaraai/east").BooleanType;
341
+ readonly datetime: import("@elaraai/east").DateTimeType;
342
+ readonly null: NullType;
343
+ }>;
344
+ readonly opaque: StringType;
345
+ }>>;
346
+ /** A node path. */
347
+ readonly Path: ArrayType<VariantType<{
348
+ readonly append: NullType;
349
+ readonly field: StringType;
350
+ readonly index: import("@elaraai/east").IntegerType;
351
+ readonly key: StringType;
352
+ readonly some: NullType;
353
+ readonly tag: NullType;
354
+ }>>;
355
+ /** One path step. */
356
+ readonly Step: VariantType<{
357
+ readonly append: NullType;
358
+ readonly field: StringType;
359
+ readonly index: import("@elaraai/east").IntegerType;
360
+ readonly key: StringType;
361
+ readonly some: NullType;
362
+ readonly tag: NullType;
363
+ }>;
364
+ /** A primitive leaf value / leaf edit. */
365
+ readonly Leaf: VariantType<{
366
+ readonly string: StringType;
367
+ readonly integer: import("@elaraai/east").IntegerType;
368
+ readonly float: import("@elaraai/east").FloatType;
369
+ readonly boolean: import("@elaraai/east").BooleanType;
370
+ readonly datetime: import("@elaraai/east").DateTimeType;
371
+ readonly null: NullType;
372
+ }>;
373
+ /** Container style. */
374
+ readonly Style: StructType<{
375
+ readonly height: import("@elaraai/east").OptionType<StringType>;
376
+ readonly maxHeight: import("@elaraai/east").OptionType<StringType>;
377
+ }>;
378
+ };
379
+ };
380
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collections/value-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,SAAS,EACT,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EAEb,IAAI,EACJ,YAAY,EACZ,QAAQ,EAER,KAAK,aAAa,EAClB,UAAU,EACV,UAAU,EACV,KAAK,WAAW,EAKnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAEH,iBAAiB,EACjB,iBAAiB,EAIpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACH,WAAW,EACX,SAAS,EACT,KAAK,kB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