@elaraai/east-ui 1.0.71 → 1.0.73
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/README.md +1 -1
- package/dist/src/collections/value-tree/flatten.d.ts +354 -0
- package/dist/src/collections/value-tree/flatten.d.ts.map +1 -0
- package/dist/src/collections/value-tree/flatten.js +520 -0
- package/dist/src/collections/value-tree/flatten.js.map +1 -0
- package/dist/src/collections/value-tree/index.d.ts +84 -0
- package/dist/src/collections/value-tree/index.d.ts.map +1 -1
- package/dist/src/collections/value-tree/index.js +53 -0
- package/dist/src/collections/value-tree/index.js.map +1 -1
- package/dist/src/collections/value-tree/key-search.d.ts +112 -0
- package/dist/src/collections/value-tree/key-search.d.ts.map +1 -0
- package/dist/src/collections/value-tree/key-search.js +251 -0
- package/dist/src/collections/value-tree/key-search.js.map +1 -0
- package/dist/src/internal.d.ts +2 -0
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +2 -0
- package/dist/src/internal.js.map +1 -1
- package/dist/src/runtime/collections/value-tree.d.ts +17 -0
- package/dist/src/runtime/collections/value-tree.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ Dual-licensed:
|
|
|
140
140
|
- [@elaraai/east-ui-components](https://www.npmjs.com/package/@elaraai/east-ui-components): React renderer with Chakra UI v3 styling
|
|
141
141
|
- [@elaraai/e3-ui](https://www.npmjs.com/package/@elaraai/e3-ui): e3 + UI bridge — Data bindings, `e3.ui()` task, manifest
|
|
142
142
|
- [@elaraai/e3-ui-components](https://www.npmjs.com/package/@elaraai/e3-ui-components): React Query hooks and preview components for the e3 API
|
|
143
|
-
- [@elaraai/e3-ui-cli](https://www.npmjs.com/package/@elaraai/e3-ui-cli):
|
|
143
|
+
- [@elaraai/e3-ui-cli](https://www.npmjs.com/package/@elaraai/e3-ui-cli): Browse an e3 repository in the terminal (`e3-ui [repo]`), and render east-ui / e3-ui components to PNG (`e3-ui shot`)
|
|
144
144
|
- [east-ui-preview](https://marketplace.visualstudio.com/items?itemName=ElaraAI.east-ui-preview): VS Code extension for live East UI component preview
|
|
145
145
|
|
|
146
146
|
- **[e3 — East Execution Engine](https://github.com/elaraai/east-workspace/tree/main/libs/e3)**: Durable execution engine for running East pipelines at scale. Git-like content-addressable storage, automatic memoization, reactive dataflow, real-time monitoring.
|
|
@@ -0,0 +1,354 @@
|
|
|
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
|
+
import type { ValueTreeLeafValue, ValueTreeNodeValue, ValueTreeStepValue } from "./materialize.js";
|
|
6
|
+
/** Rows at depth < this start expanded when the host sets no `openDepth`
|
|
7
|
+
* (per-row toggles and the toolbar override it). */
|
|
8
|
+
export declare const DEFAULT_OPEN_DEPTH = 1;
|
|
9
|
+
/** Leaf preview parts a struct row's summary surfaces. */
|
|
10
|
+
export declare const PREVIEW_PARTS = 3;
|
|
11
|
+
/**
|
|
12
|
+
* The kind of a flattened row.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* `leaf` / `opaque` / `struct` / `array` / `dict` mirror the resolved node
|
|
16
|
+
* kind (option and variant wrappers are collapsed into the row's controls);
|
|
17
|
+
* `emptyOption` is a `none` option; `appendArray` / `appendDict` are the
|
|
18
|
+
* "Add item" / "Add entry" ghost rows an expanded editable collection ends
|
|
19
|
+
* in.
|
|
20
|
+
*/
|
|
21
|
+
export type RowKind = "leaf" | "opaque" | "struct" | "array" | "dict" | "emptyOption" | "appendArray" | "appendDict";
|
|
22
|
+
/**
|
|
23
|
+
* One flattened row of a ValueTree.
|
|
24
|
+
*
|
|
25
|
+
* @property id - Stable row identity: the {@link pathKey} of the row's own
|
|
26
|
+
* (raw) path; append rows use `<parent>/$append`
|
|
27
|
+
* @property parentId - The id of the row this row is nested under
|
|
28
|
+
* @property depth - Nesting depth (0 = a root row)
|
|
29
|
+
* @property label - End-user label (humanized field, item title, dict key)
|
|
30
|
+
* @property kind - The row kind ({@link RowKind})
|
|
31
|
+
* @property leaf - The primitive leaf value for `leaf` rows
|
|
32
|
+
* @property opaque - The printed summary for `opaque` rows
|
|
33
|
+
* @property summary - Muted value-cell text for branches (preview / counts / "Not set")
|
|
34
|
+
* @property path - Path to the RESOLVED node — the edit / insert target
|
|
35
|
+
* @property ownPath - Path of the row's own binding step — the remove target
|
|
36
|
+
* @property variantCtl - Variant tag control (path, active tag, all tags), if the row wraps a variant
|
|
37
|
+
* @property optionCtl - Option control (path, whether set), if the row wraps an option
|
|
38
|
+
* @property removable - Whether the row may be removed from its container
|
|
39
|
+
* @property expandable - Whether the row has children (or an append ghost)
|
|
40
|
+
* @property expanded - Whether the row's children are currently listed
|
|
41
|
+
* @property posinset - 1-based position among rendered siblings (aria-posinset)
|
|
42
|
+
* @property setsize - Rendered sibling count (aria-setsize)
|
|
43
|
+
*/
|
|
44
|
+
export interface RowModel {
|
|
45
|
+
id: string;
|
|
46
|
+
parentId: string | undefined;
|
|
47
|
+
depth: number;
|
|
48
|
+
label: string;
|
|
49
|
+
kind: RowKind;
|
|
50
|
+
leaf: ValueTreeLeafValue | undefined;
|
|
51
|
+
opaque: string | undefined;
|
|
52
|
+
summary: string | undefined;
|
|
53
|
+
path: ValueTreeStepValue[];
|
|
54
|
+
ownPath: ValueTreeStepValue[];
|
|
55
|
+
variantCtl: {
|
|
56
|
+
path: ValueTreeStepValue[];
|
|
57
|
+
tag: string;
|
|
58
|
+
tags: string[];
|
|
59
|
+
} | undefined;
|
|
60
|
+
optionCtl: {
|
|
61
|
+
path: ValueTreeStepValue[];
|
|
62
|
+
isSome: boolean;
|
|
63
|
+
} | undefined;
|
|
64
|
+
removable: boolean;
|
|
65
|
+
expandable: boolean;
|
|
66
|
+
expanded: boolean;
|
|
67
|
+
posinset: number;
|
|
68
|
+
setsize: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* One child of a compound node: its display label, its node and the path
|
|
72
|
+
* step that binds it.
|
|
73
|
+
*
|
|
74
|
+
* @property label - Display label
|
|
75
|
+
* @property node - The child node
|
|
76
|
+
* @property step - The path step from the parent to this child
|
|
77
|
+
*/
|
|
78
|
+
export interface ChildEntry {
|
|
79
|
+
label: string;
|
|
80
|
+
node: ValueTreeNodeValue;
|
|
81
|
+
step: ValueTreeStepValue;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Shared flatten context: expansion state, edit capabilities, output.
|
|
85
|
+
*
|
|
86
|
+
* @property open - Per-row expansion overrides keyed by row id
|
|
87
|
+
* @property openDepth - Rows at depth < this start expanded (per-row `open` overrides)
|
|
88
|
+
* @property canRemove - Whether the host can remove elements / entries
|
|
89
|
+
* @property canInsert - Whether the host can append elements / entries
|
|
90
|
+
* @property rows - The output rows, appended in order
|
|
91
|
+
*/
|
|
92
|
+
export interface FlattenCtx {
|
|
93
|
+
open: Record<string, boolean>;
|
|
94
|
+
openDepth: number;
|
|
95
|
+
canRemove: boolean;
|
|
96
|
+
canInsert: boolean;
|
|
97
|
+
rows: RowModel[];
|
|
98
|
+
}
|
|
99
|
+
/** One pageable root row supplied by a paging host: its materialized node,
|
|
100
|
+
* the row's own path step (global index / dict key), and optionally a
|
|
101
|
+
* display label (derived from content when omitted). */
|
|
102
|
+
export interface ValueTreePagedRow {
|
|
103
|
+
node: ValueTreeNodeValue;
|
|
104
|
+
step: ValueTreeStepValue;
|
|
105
|
+
label?: string | undefined;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Remote-paging contract for a collection-rooted tree.
|
|
109
|
+
*
|
|
110
|
+
* When set, the tree's root rows come from `pages` instead of the payload's
|
|
111
|
+
* root node: the extent spans all `totalRows` (a scrollbar covers the whole
|
|
112
|
+
* collection), unloaded rows render as placeholders, and scrolling requests
|
|
113
|
+
* the windows that come into view via `onNeedRows`. Loaded rows expand and
|
|
114
|
+
* edit exactly like ordinary rows — their path steps are global, so edit
|
|
115
|
+
* callbacks stay correct. The host owns fetching and deduping; replace the
|
|
116
|
+
* `pages` map (new identity) as pages arrive.
|
|
117
|
+
*/
|
|
118
|
+
export interface ValueTreePaging {
|
|
119
|
+
/** Total root rows in the full collection. */
|
|
120
|
+
totalRows: number;
|
|
121
|
+
/** Rows per page — keys of `pages` are `floor(row / pageSize)`. */
|
|
122
|
+
pageSize: number;
|
|
123
|
+
/** Loaded pages by page index (the final page may be shorter). */
|
|
124
|
+
pages: ReadonlyMap<number, readonly ValueTreePagedRow[]>;
|
|
125
|
+
/** Requests loading of the pages covering rows `[startRow, endRow)`. */
|
|
126
|
+
onNeedRows: (startRow: number, endRow: number) => void;
|
|
127
|
+
/** Controlled jump (browser renderer): on each change to a defined value
|
|
128
|
+
* the tree scrolls this global root row into view, highlights it, and
|
|
129
|
+
* requests the destination window through {@link onNeedRows}. The
|
|
130
|
+
* highlight holds until this clears back to `undefined` (#520). Kept
|
|
131
|
+
* optional so hosts without a controlled jump omit it. */
|
|
132
|
+
scrollToRow?: number | undefined;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Paged-mode flat structure: per-page flattened row models, prefix sums
|
|
136
|
+
* mapping flat indexes to pages, and the loaded rows in order for keyboard
|
|
137
|
+
* traversal. Unloaded root rows contribute one placeholder row each, so
|
|
138
|
+
* the extent always spans the whole collection.
|
|
139
|
+
*
|
|
140
|
+
* @property totalFlat - Total flat rows (loaded models + placeholders)
|
|
141
|
+
* @property prefix - `prefix[p]` = flat rows before page `p` (length `pageCount + 1`)
|
|
142
|
+
* @property pageModels - Flattened rows of each loaded page
|
|
143
|
+
* @property loadedRows - Every loaded row in flat order
|
|
144
|
+
* @property pageCount - Number of pages in the collection
|
|
145
|
+
* @property rootRowsInPage - Root rows page `p` covers (the final page may be shorter)
|
|
146
|
+
*/
|
|
147
|
+
export interface PagedFlat {
|
|
148
|
+
totalFlat: number;
|
|
149
|
+
prefix: number[];
|
|
150
|
+
pageModels: Map<number, RowModel[]>;
|
|
151
|
+
loadedRows: RowModel[];
|
|
152
|
+
pageCount: number;
|
|
153
|
+
rootRowsInPage: (p: number) => number;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The stable text identity of a node path — the row id.
|
|
157
|
+
*
|
|
158
|
+
* @param steps - The path steps
|
|
159
|
+
* @returns `.field`, `[index]`, `{key}`, `?` (some) and `!` (tag) joined; `$` for the root
|
|
160
|
+
*/
|
|
161
|
+
export declare function pathKey(steps: ValueTreeStepValue[]): string;
|
|
162
|
+
/**
|
|
163
|
+
* "flowRate" / "flow_rate" → "Flow rate" — end-user field labels. Dict keys
|
|
164
|
+
* are user data and stay verbatim.
|
|
165
|
+
*
|
|
166
|
+
* @param name - A struct field name
|
|
167
|
+
* @returns The humanized label
|
|
168
|
+
*/
|
|
169
|
+
export declare function humanize(name: string): string;
|
|
170
|
+
/**
|
|
171
|
+
* A node with its option / variant wrappers collapsed into row controls.
|
|
172
|
+
*
|
|
173
|
+
* @property kind - The row kind of the content node
|
|
174
|
+
* @property leaf - The leaf value, for leaves
|
|
175
|
+
* @property opaque - The printed summary, for opaque nodes
|
|
176
|
+
* @property node - The content node the row displays
|
|
177
|
+
* @property path - The path to the content node
|
|
178
|
+
* @property variantCtl - The outermost variant wrapper's control
|
|
179
|
+
* @property optionCtl - The outermost option wrapper's control
|
|
180
|
+
*/
|
|
181
|
+
export interface ResolvedNode {
|
|
182
|
+
kind: RowKind;
|
|
183
|
+
leaf: ValueTreeLeafValue | undefined;
|
|
184
|
+
opaque: string | undefined;
|
|
185
|
+
node: ValueTreeNodeValue;
|
|
186
|
+
path: ValueTreeStepValue[];
|
|
187
|
+
variantCtl: RowModel["variantCtl"];
|
|
188
|
+
optionCtl: RowModel["optionCtl"];
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Collapses option / variant wrappers into row controls, leaving the content
|
|
192
|
+
* node the row displays (or `emptyOption` for a none).
|
|
193
|
+
*
|
|
194
|
+
* @param raw - The node as materialized
|
|
195
|
+
* @param rawPath - The path to `raw`
|
|
196
|
+
* @returns The resolved node
|
|
197
|
+
*/
|
|
198
|
+
export declare function resolveNode(raw: ValueTreeNodeValue, rawPath: ValueTreeStepValue[]): ResolvedNode;
|
|
199
|
+
/**
|
|
200
|
+
* Unwraps option / variant wrappers to the content node (display only).
|
|
201
|
+
*
|
|
202
|
+
* @param node - A node
|
|
203
|
+
* @returns The innermost non-wrapper node (a `none` option stays as is)
|
|
204
|
+
*/
|
|
205
|
+
export declare function contentOf(node: ValueTreeNodeValue): ValueTreeNodeValue;
|
|
206
|
+
/**
|
|
207
|
+
* Formats a leaf for display.
|
|
208
|
+
*
|
|
209
|
+
* @param leaf - The leaf value
|
|
210
|
+
* @returns Strings verbatim, numbers as printed, booleans as `true` / `false`,
|
|
211
|
+
* datetimes as `YYYY-MM-DD HH:MM:SS`, null as `—`
|
|
212
|
+
*/
|
|
213
|
+
export declare function fmtLeaf(leaf: ValueTreeLeafValue): string;
|
|
214
|
+
/**
|
|
215
|
+
* One short preview token for a struct field's value, or undefined.
|
|
216
|
+
*
|
|
217
|
+
* @param node - The field's node
|
|
218
|
+
* @returns The token (a variant's humanized tag, a non-empty leaf's text), or undefined
|
|
219
|
+
*/
|
|
220
|
+
export declare function previewPart(node: ValueTreeNodeValue): string | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* The muted value-cell text for a resolved branch node.
|
|
223
|
+
*
|
|
224
|
+
* @param node - A resolved struct / array / dict node
|
|
225
|
+
* @returns A ` · `-joined preview of the first leaf parts for structs (else
|
|
226
|
+
* `N fields`), `N items` for arrays, `N entries` for dicts, `Empty` when empty
|
|
227
|
+
*/
|
|
228
|
+
export declare function summaryOf(node: ValueTreeNodeValue): string;
|
|
229
|
+
/**
|
|
230
|
+
* A content-derived title for an array element — its first non-empty string
|
|
231
|
+
* leaf (fields searched in order), else "Item N".
|
|
232
|
+
*
|
|
233
|
+
* @param node - The element node
|
|
234
|
+
* @param index - The element's 0-based index
|
|
235
|
+
* @returns The title
|
|
236
|
+
*/
|
|
237
|
+
export declare function itemTitle(node: ValueTreeNodeValue, index: number): string;
|
|
238
|
+
/**
|
|
239
|
+
* The children of a compound node with their labels and binding steps.
|
|
240
|
+
*
|
|
241
|
+
* @param node - A struct / array / dict node (anything else has no children)
|
|
242
|
+
* @returns The child entries in display order
|
|
243
|
+
*/
|
|
244
|
+
export declare function childrenOf(node: ValueTreeNodeValue): ChildEntry[];
|
|
245
|
+
/**
|
|
246
|
+
* The "Add item" / "Add entry" ghost row an expanded editable collection
|
|
247
|
+
* ends in.
|
|
248
|
+
*
|
|
249
|
+
* @param parentId - The collection row's id (undefined for a root collection)
|
|
250
|
+
* @param containerPath - The collection's path — the insert target
|
|
251
|
+
* @param kind - Array or dict append
|
|
252
|
+
* @param depth - The ghost row's depth
|
|
253
|
+
* @param posinset - Its 1-based sibling position
|
|
254
|
+
* @param setsize - The sibling count
|
|
255
|
+
* @returns The ghost row
|
|
256
|
+
*/
|
|
257
|
+
export declare function appendRowModel(parentId: string | undefined, containerPath: ValueTreeStepValue[], kind: "appendArray" | "appendDict", depth: number, posinset: number, setsize: number): RowModel;
|
|
258
|
+
/**
|
|
259
|
+
* Flattens one node's visible subtree, depth-first, into `ctx.rows`.
|
|
260
|
+
*
|
|
261
|
+
* @param ctx - The flatten context (expansion state, capabilities, output)
|
|
262
|
+
* @param label - The row's label
|
|
263
|
+
* @param raw - The node as materialized
|
|
264
|
+
* @param rawPath - The path to `raw` (the row's own path)
|
|
265
|
+
* @param parentId - The parent row's id
|
|
266
|
+
* @param depth - The row's depth
|
|
267
|
+
* @param removable - Whether the row may be removed from its container
|
|
268
|
+
* @param posinset - Its 1-based sibling position
|
|
269
|
+
* @param setsize - The sibling count
|
|
270
|
+
*/
|
|
271
|
+
export declare function visitNode(ctx: FlattenCtx, label: string, raw: ValueTreeNodeValue, rawPath: ValueTreeStepValue[], parentId: string | undefined, depth: number, removable: boolean, posinset: number, setsize: number): void;
|
|
272
|
+
/**
|
|
273
|
+
* Flattens the visible (expanded) rows of an inline tree, depth-first. A
|
|
274
|
+
* compound root lists its children directly (no synthetic top row); anything
|
|
275
|
+
* else is a single `Value` row. Expanded editable collections end in an
|
|
276
|
+
* append ghost row.
|
|
277
|
+
*
|
|
278
|
+
* @param root - The materialized root node
|
|
279
|
+
* @param open - Per-row expansion overrides keyed by row id
|
|
280
|
+
* @param openDepth - Rows at depth < this start expanded
|
|
281
|
+
* @param canRemove - Whether the host can remove elements / entries
|
|
282
|
+
* @param canInsert - Whether the host can append elements / entries
|
|
283
|
+
* @returns The visible rows in order
|
|
284
|
+
*/
|
|
285
|
+
export declare function flattenRows(root: ValueTreeNodeValue, open: Record<string, boolean>, openDepth: number, canRemove: boolean, canInsert: boolean): RowModel[];
|
|
286
|
+
/**
|
|
287
|
+
* Flattens the loaded pages of a paged collection root. Paged roots are
|
|
288
|
+
* read-only at the row level (no append ghost, no row removal) — leaf edits
|
|
289
|
+
* inside a loaded row still work through the ordinary callbacks, with global
|
|
290
|
+
* path steps.
|
|
291
|
+
*
|
|
292
|
+
* @param paging - The paging contract (totals, page size, loaded pages)
|
|
293
|
+
* @param open - Per-row expansion overrides keyed by row id
|
|
294
|
+
* @param openDepth - Rows at depth < this start expanded
|
|
295
|
+
* @returns The paged flat structure
|
|
296
|
+
*/
|
|
297
|
+
export declare function flattenPaged(paging: ValueTreePaging, open: Record<string, boolean>, openDepth: number): PagedFlat;
|
|
298
|
+
/**
|
|
299
|
+
* Binary-searches the page whose flat range contains `flatIdx`.
|
|
300
|
+
*
|
|
301
|
+
* @param prefix - The prefix sums from {@link flattenPaged}
|
|
302
|
+
* @param flatIdx - A flat row index
|
|
303
|
+
* @returns The page index
|
|
304
|
+
*/
|
|
305
|
+
export declare function pageOfFlat(prefix: number[], flatIdx: number): number;
|
|
306
|
+
/**
|
|
307
|
+
* Flat index of global root row `globalRow`: through the loaded page's
|
|
308
|
+
* flattened models when present (expanded children shift later rows), else
|
|
309
|
+
* the one-placeholder-per-root arithmetic.
|
|
310
|
+
*
|
|
311
|
+
* @param flat - The paged flat structure
|
|
312
|
+
* @param paging - The paging contract
|
|
313
|
+
* @param globalRow - A global root row (clamped to the collection)
|
|
314
|
+
* @returns The flat index, or undefined for an empty collection
|
|
315
|
+
*/
|
|
316
|
+
export declare function pagedFlatIndexOfRoot(flat: PagedFlat, paging: ValueTreePaging, globalRow: number): number | undefined;
|
|
317
|
+
/**
|
|
318
|
+
* Flat index of the `rootRow`-th depth-0 row of an inline tree.
|
|
319
|
+
*
|
|
320
|
+
* @param rows - The flattened rows
|
|
321
|
+
* @param rootRow - A 0-based root row ordinal
|
|
322
|
+
* @returns The flat index, or undefined when there are fewer roots
|
|
323
|
+
*/
|
|
324
|
+
export declare function flatIndexOfRoot(rows: RowModel[], rootRow: number): number | undefined;
|
|
325
|
+
/**
|
|
326
|
+
* Resolves a paged flat row: a loaded model, or the global root index of a
|
|
327
|
+
* placeholder.
|
|
328
|
+
*
|
|
329
|
+
* @param flat - The paged flat structure
|
|
330
|
+
* @param paging - The paging contract
|
|
331
|
+
* @param flatIdx - A flat row index
|
|
332
|
+
* @returns The row model, or the placeholder's global root row
|
|
333
|
+
*/
|
|
334
|
+
export declare function pagedRowAt(flat: PagedFlat, paging: ValueTreePaging, flatIdx: number): {
|
|
335
|
+
kind: "model";
|
|
336
|
+
row: RowModel;
|
|
337
|
+
} | {
|
|
338
|
+
kind: "placeholder";
|
|
339
|
+
globalRow: number;
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Drops loaded pages far from the window `[firstPage, lastPage]`, keeping
|
|
343
|
+
* the window itself and then the nearest pages up to the retention cap.
|
|
344
|
+
* Returns the SAME map (no re-render) while under the cap.
|
|
345
|
+
*
|
|
346
|
+
* @typeParam T - The page payload
|
|
347
|
+
* @param pages - The loaded pages by index
|
|
348
|
+
* @param firstPage - First page of the visible window
|
|
349
|
+
* @param lastPage - Last page of the visible window
|
|
350
|
+
* @param max - Retention cap
|
|
351
|
+
* @returns The retained pages (the input map when nothing was dropped)
|
|
352
|
+
*/
|
|
353
|
+
export declare function pruneRetainedPages<T>(pages: ReadonlyMap<number, T>, firstPage: number, lastPage: number, max: number): ReadonlyMap<number, T>;
|
|
354
|
+
//# sourceMappingURL=flatten.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../../../src/collections/value-tree/flatten.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEnG;qDACqD;AACrD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,0DAA0D;AAC1D,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,aAAa,GAAG,YAAY,CAAC;AAErH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACrC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,UAAU,EAAE;QAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,G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