@elaraai/e3-ui-components 1.0.79 → 1.0.81
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/components/DatasetPreview.d.ts +10 -2
- package/dist/components/DatasetPreview.d.ts.map +1 -1
- package/dist/components/EastValueViewer.d.ts.map +1 -1
- package/dist/components/PagedDatasetPreview.d.ts +15 -1
- package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
- package/dist/components/TaskPreview.d.ts.map +1 -1
- package/dist/components/UITaskPreview.d.ts +7 -3
- package/dist/components/UITaskPreview.d.ts.map +1 -1
- package/dist/decision/constraint-format.d.ts +15 -7
- package/dist/decision/constraint-format.d.ts.map +1 -1
- package/dist/decision/contract.d.ts +28 -0
- package/dist/decision/contract.d.ts.map +1 -0
- package/dist/decision/facets.d.ts +21 -3
- package/dist/decision/facets.d.ts.map +1 -1
- package/dist/decision/grouping.d.ts +11 -0
- package/dist/decision/grouping.d.ts.map +1 -1
- package/dist/decision/handle-runtime.d.ts.map +1 -1
- package/dist/decision/journal.d.ts.map +1 -1
- package/dist/decision/lever-editor.d.ts +11 -18
- package/dist/decision/lever-editor.d.ts.map +1 -1
- package/dist/decision/queue.d.ts.map +1 -1
- package/dist/diff/format.d.ts +20 -12
- package/dist/diff/format.d.ts.map +1 -1
- package/dist/diff/index.d.ts.map +1 -1
- package/dist/diff/manual.d.ts +37 -18
- package/dist/diff/manual.d.ts.map +1 -1
- package/dist/diff/walker.d.ts +14 -6
- package/dist/diff/walker.d.ts.map +1 -1
- package/dist/experiment/charts.d.ts +4 -1
- package/dist/experiment/charts.d.ts.map +1 -1
- package/dist/experiment/derive.d.ts +25 -5
- package/dist/experiment/derive.d.ts.map +1 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/run-runtime.d.ts +4 -8
- package/dist/experiment/run-runtime.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useDatasetValue.d.ts +13 -2
- package/dist/hooks/useDatasetValue.d.ts.map +1 -1
- package/dist/hooks/useTaskDetails.d.ts +1 -5
- package/dist/hooks/useTaskDetails.d.ts.map +1 -1
- package/dist/hooks/workspaces.d.ts +16 -3
- package/dist/hooks/workspaces.d.ts.map +1 -1
- package/dist/index.cjs +1361 -1028
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1385 -1052
- package/dist/index.js.map +1 -1
- package/dist/platform/bind-runtime.d.ts +14 -5
- package/dist/platform/bind-runtime.d.ts.map +1 -1
- package/dist/platform/dataset-hooks.d.ts +12 -4
- package/dist/platform/dataset-hooks.d.ts.map +1 -1
- package/dist/platform/dataset-store.d.ts +47 -11
- package/dist/platform/dataset-store.d.ts.map +1 -1
- package/dist/platform/func-runtime.d.ts +16 -6
- package/dist/platform/func-runtime.d.ts.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/paged-runtime.d.ts +183 -49
- package/dist/platform/paged-runtime.d.ts.map +1 -1
- package/dist/platform/record-runtime.d.ts +14 -4
- package/dist/platform/record-runtime.d.ts.map +1 -1
- package/dist/platform/staged-store.d.ts +19 -2
- package/dist/platform/staged-store.d.ts.map +1 -1
- package/package.json +16 -15
|
@@ -2,6 +2,7 @@ import { EastTypeValue } from '@elaraai/east';
|
|
|
2
2
|
import { PlatformFunction } from '@elaraai/east/internal';
|
|
3
3
|
import { DatasetPage, DatasetFindQuery, DatasetFindResult } from '@elaraai/e3-api-client';
|
|
4
4
|
import { TreePath } from '@elaraai/e3-types';
|
|
5
|
+
import { ReactiveDatasetCacheInterface } from './dataset-store.js';
|
|
5
6
|
import { TrackedChannelStore } from './tracked-channel.js';
|
|
6
7
|
/** One element window of a paged source. */
|
|
7
8
|
export interface PagedWindow {
|
|
@@ -9,33 +10,77 @@ export interface PagedWindow {
|
|
|
9
10
|
offset: number;
|
|
10
11
|
/** Maximum elements to return (the server may clamp it). */
|
|
11
12
|
limit: number;
|
|
13
|
+
/** Read through one of a record's secondary indexes instead of the record
|
|
14
|
+
* itself — the window is then the INDEX's row space, in its own order. */
|
|
15
|
+
index?: string;
|
|
16
|
+
/** With {@link index}: read each entry's row from the record too. */
|
|
17
|
+
join?: boolean;
|
|
18
|
+
/** The content hash the window is pinned to. The server answers from that
|
|
19
|
+
* content or refuses, naming the content the dataset holds now; it never
|
|
20
|
+
* answers from other content. */
|
|
21
|
+
hash?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Which rows a bind serves: the dataset's own, or one of a record's indexes.
|
|
24
|
+
* Every channel key, every fetch and the handle cache carry it, because two
|
|
25
|
+
* binds that differ here serve different row spaces from one path. */
|
|
26
|
+
export interface PagedSelector {
|
|
27
|
+
/** The index's name, or `null` for the dataset itself. */
|
|
28
|
+
index: string | null;
|
|
29
|
+
/** Whether an index read joins each entry to its row. */
|
|
30
|
+
join: boolean;
|
|
12
31
|
}
|
|
13
32
|
/**
|
|
14
|
-
* Adapter for the dataset paging
|
|
15
|
-
* `@elaraai/e3-api-client`'s `datasetGetPage
|
|
33
|
+
* Adapter for the dataset paging endpoints. The default wraps
|
|
34
|
+
* `@elaraai/e3-api-client`'s `datasetGetPage`, `datasetFindKey` and
|
|
35
|
+
* `datasetGetStatus`, and follows datasets through the dataset store.
|
|
16
36
|
*/
|
|
17
37
|
export interface PagedApi {
|
|
18
|
-
/** Fetch one element window of a collection dataset
|
|
38
|
+
/** Fetch one element window of a collection dataset — or of one of a
|
|
39
|
+
* record's indexes, when the window names one. */
|
|
19
40
|
getPage(workspace: string, path: TreePath, window: PagedWindow): Promise<DatasetPage>;
|
|
20
41
|
/** Locate a key query in a Set/Dict dataset's canonical key order. The
|
|
21
42
|
* `row` it answers with indexes the SAME row space {@link getPage}'s
|
|
22
43
|
* element windows serve, which is what makes a hit addressable. */
|
|
23
44
|
findKey(workspace: string, path: TreePath, query: DatasetFindQuery): Promise<DatasetFindResult>;
|
|
45
|
+
/**
|
|
46
|
+
* The dataset's current content hash, or `null` while it has no value. For
|
|
47
|
+
* a record it is the record's state hash, which reads through its indexes
|
|
48
|
+
* are pinned to as well.
|
|
49
|
+
*/
|
|
50
|
+
getRevision(workspace: string, path: TreePath): Promise<string | null>;
|
|
51
|
+
/**
|
|
52
|
+
* Follow a dataset's content hash.
|
|
53
|
+
*
|
|
54
|
+
* @param workspace - The workspace
|
|
55
|
+
* @param path - The dataset's path
|
|
56
|
+
* @param onChange - Hears each hash the dataset moves to, the first report
|
|
57
|
+
* included; `null` while it has no value
|
|
58
|
+
* @returns A function that stops following
|
|
59
|
+
*/
|
|
60
|
+
watchRevision(workspace: string, path: TreePath, onChange: (hash: string | null) => void): () => void;
|
|
24
61
|
}
|
|
25
62
|
/**
|
|
26
63
|
* Build the default {@link PagedApi} that talks to a real e3 server via
|
|
27
64
|
* `@elaraai/e3-api-client`.
|
|
28
65
|
*
|
|
29
66
|
* @remarks
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
67
|
+
* A dataset is followed through the dataset store's workspace-status poll,
|
|
68
|
+
* which reports every dataset's hash: a followed dataset joins that poll, adds
|
|
69
|
+
* no request of its own, and never has its content fetched.
|
|
70
|
+
*
|
|
71
|
+
* @param apiUrl - Base URL of the e3 API server
|
|
72
|
+
* @param repo - Repository name
|
|
73
|
+
* @param getToken - Reads the current token, so a rotated one is used at once
|
|
74
|
+
* @param datasets - The dataset store whose status poll reports the hashes
|
|
75
|
+
* @returns The adapter
|
|
34
76
|
*/
|
|
35
|
-
export declare function createDefaultPagedApi(apiUrl: string, repo: string, getToken: () => string | null): PagedApi;
|
|
36
|
-
/** One tracked channel per window
|
|
77
|
+
export declare function createDefaultPagedApi(apiUrl: string, repo: string, getToken: () => string | null, datasets: Pick<ReactiveDatasetCacheInterface, "watchHash">): PagedApi;
|
|
78
|
+
/** One tracked channel per window, per total and per search. */
|
|
37
79
|
interface PageEntry {
|
|
38
80
|
status: "idle" | "running" | "loaded" | "failed";
|
|
81
|
+
/** The fetch the channel waits on; a settling fetch that is no longer it
|
|
82
|
+
* is discarded. Unique across the runtime, so a channel dropped by a move
|
|
83
|
+
* and made again never mistakes an old fetch for its own. */
|
|
39
84
|
launchSeq: number;
|
|
40
85
|
/** The decoded window — a value of the dataset's own type. */
|
|
41
86
|
window?: unknown;
|
|
@@ -43,29 +88,35 @@ interface PageEntry {
|
|
|
43
88
|
total?: number;
|
|
44
89
|
/** Where a key query landed — the answer on a seek channel. */
|
|
45
90
|
range?: DatasetFindResult;
|
|
91
|
+
/** Why the last attempt failed — what a read of the channel throws. */
|
|
92
|
+
error?: string;
|
|
46
93
|
/** When the last attempt failed, so a retry can be rate-limited. */
|
|
47
94
|
failedAtMs?: number;
|
|
48
|
-
/**
|
|
95
|
+
/** No retry can help while the source holds the same content. */
|
|
49
96
|
permanent?: boolean;
|
|
50
97
|
}
|
|
51
98
|
/** The Dict key / Set element type of a keyed collection, else null — the
|
|
52
99
|
* `seek` capability is decided from the dataset's own type at bind time. */
|
|
53
100
|
export declare function keyTypeOf(sourceType: EastTypeValue): EastTypeValue | null;
|
|
54
|
-
/** Tracked-channel key for
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export declare function
|
|
101
|
+
/** Tracked-channel key for a dataset's revision. Every read of the dataset
|
|
102
|
+
* tracks it, so every read re-fires when the source moves. */
|
|
103
|
+
export declare function pagedRevisionKey(workspace: string, path: TreePath): string;
|
|
104
|
+
/** Tracked-channel key for one window of one revision. */
|
|
105
|
+
export declare function pagedWindowKey(workspace: string, path: TreePath, revision: string, offset: number, limit: number, selector?: PagedSelector): string;
|
|
106
|
+
/** Tracked-channel key for one revision's element total. */
|
|
107
|
+
export declare function pagedTotalKey(workspace: string, path: TreePath, revision: string, selector?: PagedSelector): string;
|
|
108
|
+
/** Tracked-channel key for ONE key query against one revision. Every distinct
|
|
109
|
+
* query gets its own channel: a search result is as fixed as a window. */
|
|
110
|
+
export declare function pagedSeekKey(workspace: string, path: TreePath, revision: string, query: DatasetFindQuery, selector?: PagedSelector): string;
|
|
61
111
|
/**
|
|
62
112
|
* The decoded East {@link SeekQueryType} value as e3's wire query.
|
|
63
113
|
*
|
|
64
|
-
* The two are deliberately the same
|
|
65
|
-
*
|
|
66
|
-
*
|
|
114
|
+
* The two are deliberately the same shapes, so this is a re-tagging rather
|
|
115
|
+
* than a translation: `.east` literals stay text, and the East option on the
|
|
116
|
+
* `fields` arm, like an open end of a `range`, becomes an absent property
|
|
117
|
+
* (`exactOptionalPropertyTypes`).
|
|
67
118
|
*/
|
|
68
|
-
export declare function toFindQuery(query: unknown): DatasetFindQuery;
|
|
119
|
+
export declare function toFindQuery(query: unknown, selector?: PagedSelector): DatasetFindQuery;
|
|
69
120
|
/**
|
|
70
121
|
* Encapsulates all `Data.bindPaged` runtime state. The module-level
|
|
71
122
|
* {@link defaultPagedRuntime} instance backs the registered platform; tests
|
|
@@ -78,32 +129,95 @@ export declare class PagedRuntime extends TrackedChannelStore<PageEntry> {
|
|
|
78
129
|
/** Loaded window keys in least-recently-READ order (a Map preserves
|
|
79
130
|
* insertion order; a read re-inserts). Bounds the decoded-window cache. */
|
|
80
131
|
private readonly loadedWindows;
|
|
132
|
+
/** Each dataset's snapshot, by workspace and path. */
|
|
133
|
+
private readonly snapshots;
|
|
134
|
+
/** Fetches launched so far — the source of every channel's `launchSeq`. */
|
|
135
|
+
private launches;
|
|
81
136
|
/** Monotonic clock seam so tests can drive the retry gate. */
|
|
82
137
|
protected now(): number;
|
|
83
138
|
protected createEntry(): PageEntry;
|
|
84
139
|
/** Install the API adapter + workspace — called by the React provider
|
|
85
|
-
* (or a test/showcase harness) before any handle is used.
|
|
140
|
+
* (or a test/showcase harness) before any handle is used. Another adapter
|
|
141
|
+
* or workspace starts from nothing: no snapshot of the old one's carries
|
|
142
|
+
* over. */
|
|
86
143
|
initialize(api: PagedApi, workspace: string): void;
|
|
87
|
-
/**
|
|
88
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Tear down the adapter and all window state.
|
|
146
|
+
*
|
|
147
|
+
* @param api - Clear only while this is the installed adapter, so a
|
|
148
|
+
* provider tearing down after another installed its own leaves that one
|
|
149
|
+
* in place
|
|
150
|
+
*/
|
|
151
|
+
clear(api?: PagedApi): void;
|
|
152
|
+
/** Stop following every dataset, and drop what every snapshot delivered. */
|
|
153
|
+
private reset;
|
|
89
154
|
private resolveWorkspace;
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
|
|
93
|
-
|
|
155
|
+
/** A dataset's snapshot, followed from its first read until the runtime
|
|
156
|
+
* is cleared. */
|
|
157
|
+
private snapshotOf;
|
|
158
|
+
/** Whether a snapshot is still the runtime's, rather than one a clear or a
|
|
159
|
+
* re-initialization dropped. */
|
|
160
|
+
private isLive;
|
|
161
|
+
/** Whether a live snapshot is still pinned to `revision`. */
|
|
162
|
+
private pinnedTo;
|
|
94
163
|
/**
|
|
95
|
-
*
|
|
164
|
+
* The revision a read of `path` is pinned to — a hash, `null` while the
|
|
165
|
+
* dataset has no value, or `undefined` while it is being found — tracked so
|
|
166
|
+
* the read re-fires when the source moves.
|
|
96
167
|
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* Only the settle notifies.
|
|
168
|
+
* @throws The failed lookup's reason, until a read after the retry gap
|
|
169
|
+
* looks again
|
|
100
170
|
*/
|
|
101
|
-
private
|
|
171
|
+
private revisionFor;
|
|
102
172
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* launch-does-not-notify rule (the read runs inside a render pass).
|
|
173
|
+
* Ask the server which content the dataset holds, and move there — unless
|
|
174
|
+
* a move lands first, which came from something no older than the answer.
|
|
106
175
|
*/
|
|
176
|
+
private find;
|
|
177
|
+
/**
|
|
178
|
+
* Move a dataset's source to `revision`: drop what the old snapshot
|
|
179
|
+
* delivered and re-fire every read of the dataset, so the windows and
|
|
180
|
+
* searches still in use are fetched again, pinned to the new one. A move to
|
|
181
|
+
* the revision the source already has changes nothing.
|
|
182
|
+
*/
|
|
183
|
+
private moveTo;
|
|
184
|
+
/**
|
|
185
|
+
* Handle what a pinned fetch threw when it is not the read's failure: a
|
|
186
|
+
* refusal naming other content moves the source there, and "no value"
|
|
187
|
+
* moves it to no snapshot. Returns whether the error was one of those, or
|
|
188
|
+
* arrived after the source had already moved on.
|
|
189
|
+
*/
|
|
190
|
+
private followed;
|
|
191
|
+
/** A channel of the snapshot's current revision, dropped when it moves. */
|
|
192
|
+
private channel;
|
|
193
|
+
/** Whether a channel is due a fetch: never fetched, evicted, or failed
|
|
194
|
+
* for a reason a retry can fix, longer ago than the retry gap. */
|
|
195
|
+
private due;
|
|
196
|
+
/**
|
|
197
|
+
* Mark a channel's fetch as started, returning the fetch's sequence number.
|
|
198
|
+
*
|
|
199
|
+
* Deliberately does NOT notify — the read that triggers it runs inside a
|
|
200
|
+
* render pass, and notifying there would re-enter the renderer. Only the
|
|
201
|
+
* settle notifies.
|
|
202
|
+
*/
|
|
203
|
+
private launch;
|
|
204
|
+
/** Apply a fetch's outcome if the channel still waits on it, re-firing the
|
|
205
|
+
* channel's reads. Returns whether it applied. */
|
|
206
|
+
private settle;
|
|
207
|
+
/** Settle a fetch as failed, with the reason a read will throw. */
|
|
208
|
+
private fail;
|
|
209
|
+
/** What a read of a channel answers: its value once loaded, `none` while
|
|
210
|
+
* in flight, or its failure, thrown. */
|
|
211
|
+
private answer;
|
|
212
|
+
/** Note a window as most-recently-read, and drop the coldest decoded
|
|
213
|
+
* windows once the cache exceeds its cap. An evicted window returns to
|
|
214
|
+
* `idle`, so the next read refetches it rather than reading a hole. */
|
|
215
|
+
private touchWindow;
|
|
216
|
+
/** Start the pinned fetch for a window if it is due one, returning its
|
|
217
|
+
* channel. */
|
|
218
|
+
private ensureWindow;
|
|
219
|
+
/** Start the pinned fence search for one key query if it is due one,
|
|
220
|
+
* returning its channel — the seek sibling of {@link ensureWindow}. */
|
|
107
221
|
private ensureSeek;
|
|
108
222
|
/**
|
|
109
223
|
* The low-level primitives backing handle methods, bound to THIS runtime.
|
|
@@ -113,29 +227,49 @@ export declare class PagedRuntime extends TrackedChannelStore<PageEntry> {
|
|
|
113
227
|
*/
|
|
114
228
|
buildPrimitives(): PlatformFunction[];
|
|
115
229
|
/**
|
|
116
|
-
* Build the handle value for one
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* type-arg) — so the handle is ordinary serializable East data (issue
|
|
230
|
+
* Build the handle value for one paged bind. Every method is a thin
|
|
231
|
+
* IR-bearing `East.function` over {@link buildPrimitives}, capturing only
|
|
232
|
+
* the plain-data source path and selector (the value type rides as a
|
|
233
|
+
* type-arg) — so the handle is ordinary serializable East data (issue
|
|
234
|
+
* #106).
|
|
235
|
+
*
|
|
236
|
+
* @param sourceType - The dataset's type, or an index's window type
|
|
237
|
+
* @param path - The dataset's path
|
|
238
|
+
* @param selector - The rows the bind serves
|
|
239
|
+
* @param shape - `released`: the handle `data_bind_paged` returns, without
|
|
240
|
+
* `revision` or `refresh`; `pinned`: the handle `data_bind_paged_pinned`
|
|
241
|
+
* returns. Both read through the same snapshot.
|
|
242
|
+
* @returns The handle
|
|
120
243
|
*/
|
|
121
|
-
buildHandle(sourceType: EastTypeValue, path: TreePath): Record<string, unknown>;
|
|
122
|
-
/** Build
|
|
123
|
-
*
|
|
124
|
-
*
|
|
244
|
+
buildHandle(sourceType: EastTypeValue, path: TreePath, selector: PagedSelector, shape: "released" | "pinned"): Record<string, unknown>;
|
|
245
|
+
/** Build the PlatformFunction behind `data_bind_paged` — the bind a UI
|
|
246
|
+
* exported before pinned reads calls — bound to this runtime. Its handle
|
|
247
|
+
* has no `revision` or `refresh`, but its reads are pinned, follow the
|
|
248
|
+
* dataset and fail visibly all the same. Pass `allowed=null` for an
|
|
249
|
+
* unscoped impl, or a Set of path strings for manifest scoping. */
|
|
125
250
|
buildPlatform(allowed: ReadonlySet<string> | null): PlatformFunction;
|
|
251
|
+
/** Build the PlatformFunction behind `data_bind_paged_pinned` — what
|
|
252
|
+
* `Data.bindPaged` emits, for a dataset's own rows or a record's index —
|
|
253
|
+
* bound to this runtime and scoped by `allowed` exactly as
|
|
254
|
+
* {@link buildPlatform} is: an index read is a read of the record's path. */
|
|
255
|
+
buildPinnedPlatform(allowed: ReadonlySet<string> | null): PlatformFunction;
|
|
126
256
|
}
|
|
127
257
|
/** Process-global runtime backing the `PagedPlatform` export. */
|
|
128
258
|
export declare const defaultPagedRuntime: PagedRuntime;
|
|
129
259
|
/** Install the paging API adapter + workspace — called by the React provider
|
|
130
260
|
* on mount (or by a test/showcase harness). */
|
|
131
261
|
export declare function initializePagedApi(api: PagedApi, workspace: string): void;
|
|
132
|
-
/**
|
|
133
|
-
|
|
134
|
-
|
|
262
|
+
/**
|
|
263
|
+
* Tear down the paging API adapter and all window state.
|
|
264
|
+
*
|
|
265
|
+
* @param api - Clear only while this is the installed adapter
|
|
266
|
+
*/
|
|
267
|
+
export declare function clearPagedApi(api?: PagedApi): void;
|
|
268
|
+
/** Global, manifest-unscoped paged binds + their backing primitives.
|
|
135
269
|
* Registered on module load (powers the extension registry decode path). */
|
|
136
270
|
export declare const PagedPlatform: PlatformFunction[];
|
|
137
|
-
/** Build
|
|
138
|
-
*
|
|
271
|
+
/** Build manifest-scoped paged binds + their backing primitives, from the
|
|
272
|
+
* manifest's `pages` list.
|
|
139
273
|
*
|
|
140
274
|
* The `data_page*` primitives MUST ship with the scoped platform: e3 `ui()`
|
|
141
275
|
* tasks render through `createScoped*()` arrays (UITaskPreview), NOT the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paged-runtime.d.ts","sourceRoot":"","sources":["../../src/platform/paged-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"paged-runtime.d.ts","sourceRoot":"","sources":["../../src/platform/paged-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;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gB,aAAa,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,CAElD;AAED;6EAC6E;AAC7E,eAAO,MAAM,aAAa,EAAE,gBAAgB,EAI3C,CAAC;AAEF;;;;;;wDAMwD;AACxD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,gBAAgB,EAAE,CAOxF"}
|
|
@@ -75,8 +75,14 @@ export declare class RecordRuntime extends TrackedChannelStore<RecordEntry> {
|
|
|
75
75
|
/** Install the API adapter + dataset cache + workspace — called by the
|
|
76
76
|
* React provider (or a test/showcase harness) before any handle is used. */
|
|
77
77
|
initialize(api: RecordApi, cache: ReactiveDatasetCacheInterface, workspace: string): void;
|
|
78
|
-
/**
|
|
79
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Tear down the adapter and all record state.
|
|
80
|
+
*
|
|
81
|
+
* @param api - Clear only while this is the installed adapter, so a
|
|
82
|
+
* provider tearing down after another installed its own leaves that one
|
|
83
|
+
* in place
|
|
84
|
+
*/
|
|
85
|
+
clear(api?: RecordApi): void;
|
|
80
86
|
private resolveWorkspace;
|
|
81
87
|
/** The deployed describe signature for a record (fetched once, evicted on failure). */
|
|
82
88
|
private signature;
|
|
@@ -113,8 +119,12 @@ export declare const defaultRecordRuntime: RecordRuntime;
|
|
|
113
119
|
/** Install the record API adapter + dataset cache + workspace — called by the
|
|
114
120
|
* React provider on mount (or by a test/showcase harness). */
|
|
115
121
|
export declare function initializeRecordApi(api: RecordApi, cache: ReactiveDatasetCacheInterface, workspace: string): void;
|
|
116
|
-
/**
|
|
117
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Tear down the record API adapter and all record state.
|
|
124
|
+
*
|
|
125
|
+
* @param api - Clear only while this is the installed adapter
|
|
126
|
+
*/
|
|
127
|
+
export declare function clearRecordApi(api?: RecordApi): void;
|
|
118
128
|
/** Global, manifest-unscoped `Record.bind` impl + its backing primitives.
|
|
119
129
|
* Registered on module load (powers the extension registry decode path). */
|
|
120
130
|
export declare const RecordPlatform: PlatformFunction[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-runtime.d.ts","sourceRoot":"","sources":["../../src/platform/record-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAaH,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAA8C,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAIH,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAE3B,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAmB,KAAK,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AASzF;qEACqE;AACrE,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,UAAU,EAAE,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACtE,6EAA6E;IAC7E,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5G,mDAAmD;IACnD,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACtH;AAED;;;GAGG;AACH,wBAAgB,sBAAs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EAAE,SAAS,EAAE,KAAK,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAEjH;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,CAEpD;AAED;6EAC6E;AAC7E,eAAO,MAAM,cAAc,EAAE,gBAAgB,EAG5C,CAAC;AAEF;;;;;0DAK0D;AAC1D,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAKzF;AASD,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAC9B,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,SAAS,EAAE,QAAQ,GAAG,aAAa,CAAC;IACpC,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,SAAS,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC,QAAQ,GAAG,aAAa,CAAC,EAAE,CAAC;QACvC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;KAC3D,EAAE,CAAC;CACP;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,6BAA6B,EACpC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,iBAAiB,EAAE,GAC1B,SAAS,CAmEX"}
|
|
@@ -47,8 +47,18 @@ export interface StagedStoreInterface {
|
|
|
47
47
|
write(workspace: string, path: TreePath, snapshotIfNew: Uint8Array, buffered: Uint8Array): void;
|
|
48
48
|
/** Drop the staged entry for a path. Returns true if there was one. */
|
|
49
49
|
discard(workspace: string, path: TreePath): boolean;
|
|
50
|
-
/** All currently-staged keys (workspace+path combinations). */
|
|
50
|
+
/** All currently-staged keys (workspace+path combinations) in the scope. */
|
|
51
51
|
listKeys(): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Scope the store to a server and repository: every read and write goes to
|
|
54
|
+
* that scope's entries, and entries of any other scope are kept, unseen.
|
|
55
|
+
* With no scope set, the store has one scope of its own.
|
|
56
|
+
*
|
|
57
|
+
* @param scope - The server and repository, as one string
|
|
58
|
+
* @returns A function that unsets the scope while it is still this one, so
|
|
59
|
+
* a provider tearing down after another set its own leaves that in place
|
|
60
|
+
*/
|
|
61
|
+
setScope(scope: string): () => void;
|
|
52
62
|
subscribe(key: string, callback: () => void): () => void;
|
|
53
63
|
getKeyVersion(key: string): number;
|
|
54
64
|
/** Register a listener for durable-persistence failures (save / remove /
|
|
@@ -85,6 +95,7 @@ export declare class MemoryStagedAdapter implements StagedPersistenceAdapter {
|
|
|
85
95
|
}
|
|
86
96
|
export declare class StagedStore implements StagedStoreInterface {
|
|
87
97
|
private entries;
|
|
98
|
+
private scope;
|
|
88
99
|
private subscribers;
|
|
89
100
|
private versions;
|
|
90
101
|
private adapter;
|
|
@@ -102,11 +113,17 @@ export declare class StagedStore implements StagedStoreInterface {
|
|
|
102
113
|
write(workspace: string, path: TreePath, snapshotIfNew: Uint8Array, buffered: Uint8Array): void;
|
|
103
114
|
discard(workspace: string, path: TreePath): boolean;
|
|
104
115
|
listKeys(): string[];
|
|
116
|
+
setScope(scope: string): () => void;
|
|
105
117
|
subscribe(key: string, callback: () => void): () => void;
|
|
106
118
|
getKeyVersion(key: string): number;
|
|
107
119
|
onPersistError(cb: (key: string, err: unknown) => void): () => void;
|
|
108
|
-
/** Test-only: clear in-memory + persisted state. */
|
|
120
|
+
/** Test-only: clear in-memory + persisted state, in every scope. */
|
|
109
121
|
clear(): Promise<void>;
|
|
122
|
+
/** The key a path's entry is held under in the current scope. */
|
|
123
|
+
private keyOf;
|
|
124
|
+
/** Tells every path with an entry in either scope that what it reads has
|
|
125
|
+
* changed: the scope's move shows one's entries and hides the other's. */
|
|
126
|
+
private notifyScopes;
|
|
110
127
|
private notify;
|
|
111
128
|
/**
|
|
112
129
|
* Serialize a persistence op behind any prior op for the same key, so they
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-store.d.ts","sourceRoot":"","sources":["../../src/platform/staged-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"staged-store.d.ts","sourceRoot":"","sources":["../../src/platform/staged-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAOlD,qDAAqD;AACrD,MAAM,WAAW,WAAW;IACxB;2EACuE;IACvE,QAAQ,EAAE,UAAU,CAAC;IACrB,8DAA8D;IAC9D,QAAQ,EAAE,UAAU,CAAC;CACxB;AAED;;qCAEqC;AACrC,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;CACxB;AAED;iCACiC;AACjC,MAAM,WAAW,wBAAwB;IACrC,6EAA6E;IAC7E,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACtD,4CAA4C;IAC5C,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,8CAA8C;IAC9C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,oCAAoC;IACpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACjC;wEACoE;IACpE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;8CAE0C;IAC1C,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B,sDAAsD;IACtD,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,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CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS;IAIpE,KAAK,CACD,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,EACd,aAAa,EAAE,UAAU,EACzB,QAAQ,EAAE,UAAU,GACrB,IAAI;IAgBP,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO;IASnD,QAAQ,IAAI,MAAM,EAAE;IAKpB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,IAAI;IAWnC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAaxD,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIlC,cAAc,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI;IAKnE,oEAAoE;IAC9D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5B,iEAAiE;IACjE,OAAO,CAAC,KAAK;IAIb;+EAC2E;IAC3E,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,MAAM;IAMd;;;;;OAKG;IACH,OAAO,CAAC,OAAO;IAgBf,OAAO,CAAC,gBAAgB;YAcV,OAAO;CAyBxB;AAmBD,wBAAgB,cAAc,IAAI,oBAAoB,CAKrD;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAEvE;AAED,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/e3-ui-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"description": "React Query hooks and preview components for the e3 API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"@tanstack/react-query": "^5.62.0",
|
|
37
37
|
"react": "^19.0.0",
|
|
38
38
|
"react-dom": "^19.0.0",
|
|
39
|
-
"@elaraai/e3-api-client": "1.0.
|
|
40
|
-
"@elaraai/e3-types": "1.0.
|
|
41
|
-
"@elaraai/
|
|
42
|
-
"@elaraai/east-ui": "1.0.
|
|
43
|
-
"@elaraai/
|
|
44
|
-
"@elaraai/east
|
|
39
|
+
"@elaraai/e3-api-client": "1.0.81",
|
|
40
|
+
"@elaraai/e3-types": "1.0.81",
|
|
41
|
+
"@elaraai/e3-ui": "1.0.81",
|
|
42
|
+
"@elaraai/east-ui": "1.0.81",
|
|
43
|
+
"@elaraai/east-ui-components": "1.0.81",
|
|
44
|
+
"@elaraai/east": "1.0.81"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@emotion/react": "^11.14.0",
|
|
@@ -87,12 +87,13 @@
|
|
|
87
87
|
"vite": "^6.0.0",
|
|
88
88
|
"vite-plugin-dts": "^4.3.0",
|
|
89
89
|
"vitest": "^4.0.14",
|
|
90
|
-
"@elaraai/e3-api-client": "1.0.
|
|
91
|
-
"@elaraai/e3-
|
|
92
|
-
"@elaraai/e3-
|
|
93
|
-
"@elaraai/east": "1.0.
|
|
94
|
-
"@elaraai/east
|
|
95
|
-
"@elaraai/
|
|
90
|
+
"@elaraai/e3-api-client": "1.0.81",
|
|
91
|
+
"@elaraai/e3-ui": "1.0.81",
|
|
92
|
+
"@elaraai/e3-types": "1.0.81",
|
|
93
|
+
"@elaraai/east-ui": "1.0.81",
|
|
94
|
+
"@elaraai/east": "1.0.81",
|
|
95
|
+
"@elaraai/eslint-plugin-east": "1.0.81",
|
|
96
|
+
"@elaraai/east-ui-components": "1.0.81"
|
|
96
97
|
},
|
|
97
98
|
"repository": {
|
|
98
99
|
"type": "git",
|
|
@@ -112,8 +113,8 @@
|
|
|
112
113
|
"node": ">=22.0.0"
|
|
113
114
|
},
|
|
114
115
|
"scripts": {
|
|
115
|
-
"build": "vite build",
|
|
116
|
-
"typecheck": "tsc
|
|
116
|
+
"build": "pnpm run typecheck && vite build",
|
|
117
|
+
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
117
118
|
"lint": "eslint .",
|
|
118
119
|
"lint:fix": "eslint . --fix",
|
|
119
120
|
"test": "node --import tsx --test test/*.spec.ts test/**/*.spec.ts && vitest run",
|