@elaraai/e3-ui-components 1.0.67 → 1.0.69

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.
@@ -1 +1 @@
1
- {"version":3,"file":"dataset-hooks.d.ts","sourceRoot":"","sources":["../../src/platform/dataset-hooks.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EASH,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAEH,KAAK,6BAA6B,EAGrC,MAAM,oBAAoB,CAAC;AAwB5B;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IACzC,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CAAC,EACpC,QAAQ,GACX,EAAE,4BAA4B,2CA2F9B;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,6BAA6B,CAMvE;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,IAAI,6BAA6B,GAAG,IAAI,CAEtF;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAM5D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAc/F;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,4BAA4B;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;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2CAuB5B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,IAAI,CACvC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,UAAU,KAChB,OAAO,CAAC,IAAI,CAAC,CAOjB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAchF"}
@@ -12,6 +12,7 @@ export { ReactiveDatasetCache, createReactiveDatasetCache, createDefaultDatasetA
12
12
  export { StagedStore, IndexedDBStagedAdapter, MemoryStagedAdapter, type StagedStoreInterface, type StagedPersistenceAdapter, type StagedEntry, type PersistedStagedEntry, getStagedStore, initializeStagedStore, clearStagedStoreSingleton, } from './staged-store.js';
13
13
  export { BindRuntime, defaultBindRuntime, BindPlatform, createScopedBindPlatform, getReactiveDatasetCache, initializeReactiveDatasetCache, clearReactiveDatasetCache, enableBindingTracking, disableBindingTracking, isBindingTracking, trackDatasetPath, getBindingTypes, clearBindingRegistry, type BindingTypes, type BindHandle, preloadReactiveDatasetList, clearReactiveDatasetListCache, onWriteError, awaitPendingWrites, clearPendingWrites, } from './bind-runtime.js';
14
14
  export { FuncRuntime, defaultFuncRuntime, FuncPlatform, createScopedFuncPlatform, createDefaultFunctionApi, initializeFunctionApi, clearFunctionApi, funcChannelKey, signatureOfFuncHandleType, createInMemoryFunctionApi, type InMemoryFunctionDef, type FunctionApi, type FunctionCallArgs, } from './func-runtime.js';
15
+ export { PagedRuntime, defaultPagedRuntime, PagedPlatform, createScopedPagedPlatform, createDefaultPagedApi, initializePagedApi, clearPagedApi, pagedWindowKey, pagedTotalKey, type PagedApi, type PagedWindow, } from './paged-runtime.js';
15
16
  export { RecordRuntime, defaultRecordRuntime, RecordPlatform, createScopedRecordPlatform, createDefaultRecordApi, initializeRecordApi, clearRecordApi, recordChannelKey, createInMemoryRecordApi, type InMemoryRecordDef, type RecordApi, type RecordMutateArgs, } from './record-runtime.js';
16
17
  export { E3Provider, useE3Config, useE3ConfigOptional, type E3Config, type E3ProviderProps, } from './e3-config.js';
17
18
  export { ReactiveDatasetProvider, type ReactiveDatasetProviderProps, useReactiveDatasetCache, useReactiveDatasetCacheSubscription, useReactiveDatasetKey, usePreloadReactiveDatasets, type ReactiveDatasetToPreload, type PreloadReactiveDatasetsResult, useReactiveDatasetWrite, useReactiveDatasetHas, ReactiveDatasetLoader, type ReactiveDatasetLoaderProps, } from './dataset-hooks.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAGH,OAAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,SAAS,EACT,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,UAAU,EACf,KAAK,KAAK,EACV,eAAe,EACf,mBAAmB,GACtB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EACH,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,cAAc,EACd,qBAAqB,EACrB,yBAAyB,GAC5B,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,0BAA0B,EAC1B,6BAA6B,EAC7B,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,GACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACH,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,gBAAgB,GACxB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACH,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,GACvB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACH,uBAAuB,EACvB,KAAK,4BAA4B,EACjC,uBAAuB,EACvB,mCAAmC,EACnC,qBAAqB,EACrB,0BAA0B,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,0BAA0B,GAClC,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAGH,OAAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,SAAS,EACT,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,UAAU,EACf,KAAK,KAAK,EACV,eAAe,EACf,mBAAmB,GACtB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EACH,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,cAAc,EACd,qBAAqB,EACrB,yBAAyB,GAC5B,MAAM,mBAAmB,CAAC;AAI3B,OAAO,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qB,EACrB,qBAAqB,EACrB,KAAK,0BAA0B,GAClC,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,146 @@
1
+ import { EastTypeValue } from '@elaraai/east';
2
+ import { PlatformFunction } from '@elaraai/east/internal';
3
+ import { DatasetPage, DatasetFindQuery, DatasetFindResult } from '@elaraai/e3-api-client';
4
+ import { TreePath } from '@elaraai/e3-types';
5
+ import { TrackedChannelStore } from './tracked-channel.js';
6
+ /** One element window of a paged source. */
7
+ export interface PagedWindow {
8
+ /** Global element offset of the window's first element. */
9
+ offset: number;
10
+ /** Maximum elements to return (the server may clamp it). */
11
+ limit: number;
12
+ }
13
+ /**
14
+ * Adapter for the dataset paging endpoint. The default wraps
15
+ * `@elaraai/e3-api-client`'s `datasetGetPage`.
16
+ */
17
+ export interface PagedApi {
18
+ /** Fetch one element window of a collection dataset. */
19
+ getPage(workspace: string, path: TreePath, window: PagedWindow): Promise<DatasetPage>;
20
+ /** Locate a key query in a Set/Dict dataset's canonical key order. The
21
+ * `row` it answers with indexes the SAME row space {@link getPage}'s
22
+ * element windows serve, which is what makes a hit addressable. */
23
+ findKey(workspace: string, path: TreePath, query: DatasetFindQuery): Promise<DatasetFindResult>;
24
+ }
25
+ /**
26
+ * Build the default {@link PagedApi} that talks to a real e3 server via
27
+ * `@elaraai/e3-api-client`.
28
+ *
29
+ * @remarks
30
+ * Windows are requested unpinned (no content hash). `useDatasetPage` pins its
31
+ * requests so browser/edge caches can hold pages immutably; a bound paged
32
+ * source has no hash to pin with — it never fetches the whole value or polls
33
+ * status — so it reads the current content instead.
34
+ */
35
+ export declare function createDefaultPagedApi(apiUrl: string, repo: string, getToken: () => string | null): PagedApi;
36
+ /** One tracked channel per window (and one per source, for the total). */
37
+ interface PageEntry {
38
+ status: "idle" | "running" | "loaded" | "failed";
39
+ launchSeq: number;
40
+ /** The decoded window — a value of the dataset's own type. */
41
+ window?: unknown;
42
+ /** Total elements in the source, learned from any landed window. */
43
+ total?: number;
44
+ /** Where a key query landed — the answer on a seek channel. */
45
+ range?: DatasetFindResult;
46
+ /** When the last attempt failed, so a retry can be rate-limited. */
47
+ failedAtMs?: number;
48
+ /** The failure is an authoring error, so retrying can never help. */
49
+ permanent?: boolean;
50
+ }
51
+ /** The Dict key / Set element type of a keyed collection, else null — the
52
+ * `seek` capability is decided from the dataset's own type at bind time. */
53
+ export declare function keyTypeOf(sourceType: EastTypeValue): EastTypeValue | null;
54
+ /** Tracked-channel key for one window. */
55
+ export declare function pagedWindowKey(workspace: string, path: TreePath, offset: number, limit: number): string;
56
+ /** Tracked-channel key for a source's element total. */
57
+ export declare function pagedTotalKey(workspace: string, path: TreePath): string;
58
+ /** Tracked-channel key for ONE key query against a source. Every distinct
59
+ * query gets its own channel: a search result is as immutable as a window. */
60
+ export declare function pagedSeekKey(workspace: string, path: TreePath, query: DatasetFindQuery): string;
61
+ /**
62
+ * The decoded East {@link SeekQueryType} value as e3's wire query.
63
+ *
64
+ * The two are deliberately the same three shapes, so this is a re-tagging
65
+ * rather than a translation: `.east` literals stay text, and the East option on
66
+ * the `fields` arm becomes an absent property (`exactOptionalPropertyTypes`).
67
+ */
68
+ export declare function toFindQuery(query: unknown): DatasetFindQuery;
69
+ /**
70
+ * Encapsulates all `Data.bindPaged` runtime state. The module-level
71
+ * {@link defaultPagedRuntime} instance backs the registered platform; tests
72
+ * construct their own for isolation.
73
+ */
74
+ export declare class PagedRuntime extends TrackedChannelStore<PageEntry> {
75
+ private api;
76
+ private workspace;
77
+ private readonly handleCache;
78
+ /** Loaded window keys in least-recently-READ order (a Map preserves
79
+ * insertion order; a read re-inserts). Bounds the decoded-window cache. */
80
+ private readonly loadedWindows;
81
+ /** Monotonic clock seam so tests can drive the retry gate. */
82
+ protected now(): number;
83
+ protected createEntry(): PageEntry;
84
+ /** Install the API adapter + workspace — called by the React provider
85
+ * (or a test/showcase harness) before any handle is used. */
86
+ initialize(api: PagedApi, workspace: string): void;
87
+ /** Tear down the adapter and all window state. */
88
+ clear(): void;
89
+ private resolveWorkspace;
90
+ /** Note a window as most-recently-read, and drop the coldest decoded
91
+ * windows once the cache exceeds its cap. An evicted window returns to
92
+ * `idle`, so the next read refetches it rather than reading a hole. */
93
+ private touchWindow;
94
+ /**
95
+ * Start the fetch for a window if it isn't loaded or already in flight.
96
+ *
97
+ * Deliberately does NOT notify on launch — the read that triggers it runs
98
+ * inside a render pass, and notifying there would re-enter the renderer.
99
+ * Only the settle notifies.
100
+ */
101
+ private ensureWindow;
102
+ /**
103
+ * Start the fence search for one key query if it isn't answered or already
104
+ * in flight — the seek sibling of {@link ensureWindow}, with the same
105
+ * launch-does-not-notify rule (the read runs inside a render pass).
106
+ */
107
+ private ensureSeek;
108
+ /**
109
+ * The low-level primitives backing handle methods, bound to THIS runtime.
110
+ * Registered globally (extension registry) and included by the scoped
111
+ * platform (e3 `ui()` tasks) so a decoded handle re-binds to whatever
112
+ * runtime resolves the primitives on the decode side.
113
+ */
114
+ buildPrimitives(): PlatformFunction[];
115
+ /**
116
+ * Build the handle value for one `Data.bindPaged` evaluation. Both methods
117
+ * are thin IR-bearing `East.function`s over {@link buildPrimitives},
118
+ * capturing only the plain-data source path (the value type rides as a
119
+ * type-arg) — so the handle is ordinary serializable East data (issue #106).
120
+ */
121
+ buildHandle(sourceType: EastTypeValue, path: TreePath): Record<string, unknown>;
122
+ /** Build a `Data.bindPaged` PlatformFunction bound to this runtime. Pass
123
+ * `allowed=null` for an unscoped impl; pass a Set of path strings for
124
+ * manifest scoping. */
125
+ buildPlatform(allowed: ReadonlySet<string> | null): PlatformFunction;
126
+ }
127
+ /** Process-global runtime backing the `PagedPlatform` export. */
128
+ export declare const defaultPagedRuntime: PagedRuntime;
129
+ /** Install the paging API adapter + workspace — called by the React provider
130
+ * on mount (or by a test/showcase harness). */
131
+ export declare function initializePagedApi(api: PagedApi, workspace: string): void;
132
+ /** Tear down the paging API adapter and all window state. */
133
+ export declare function clearPagedApi(): void;
134
+ /** Global, manifest-unscoped `Data.bindPaged` impl + its backing primitives.
135
+ * Registered on module load (powers the extension registry decode path). */
136
+ export declare const PagedPlatform: PlatformFunction[];
137
+ /** Build a manifest-scoped `Data.bindPaged` implementation + its backing
138
+ * primitives, from the manifest's `pages` list.
139
+ *
140
+ * The `data_page*` primitives MUST ship with the scoped platform: e3 `ui()`
141
+ * tasks render through `createScoped*()` arrays (UITaskPreview), NOT the
142
+ * global registry, so a serialized handle's methods would otherwise decode to
143
+ * "Platform function 'data_page' is not available". */
144
+ export declare function createScopedPagedPlatform(pages: readonly TreePath[]): PlatformFunction[];
145
+ export {};
146
+ //# sourceMappingURL=paged-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paged-runtime.d.ts","sourceRoot":"","sources":["../../src/platform/paged-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAYH,KAAK,aAAa,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,wBAAwB,CAAC;AAO7E,OAAO,EAAkC,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACzI,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAS3D,4CAA4C;AAC5C,MAAM,WAAW,WAAW;IACxB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACrB,wDAAwD;IACxD,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACtF;;wEAEoE;IACpE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,I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CAMxF"}
@@ -41,6 +41,11 @@ export declare abstract class TrackedChannelStore<E extends ChannelEntry> {
41
41
  enableTracking(): Set<string>;
42
42
  disableTracking(): string[];
43
43
  isTracking(): boolean;
44
+ /** Whether the CURRENT evaluation has already read this channel. A cache
45
+ * that evicts by least-recently-read must never drop one of these: a read
46
+ * pass longer than the cache would otherwise evict its own head, and the
47
+ * next pass would find it gone (#581). */
48
+ protected isTracked(key: string): boolean;
44
49
  /** Record a channel-key dependency for the current render (no-op when not
45
50
  * tracking). */
46
51
  protected track(key: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"tracked-channel.d.ts","sourceRoot":"","sources":["../../src/platform/tracked-channel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,sDAAsD;AACtD,MAAM,WAAW,YAAY;IACzB;sDACkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf;0EACsE;IACtE,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,8BAAsB,mBAAmB,CAAC,CAAC,SAAS,YAAY;IAC5D,SAAS,CAAC,QAAQ,CAAC,OAAO,iBAAwB;IAGlD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAsC;IACrE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IAIzD,OAAO,CAAC,eAAe,CAA4B;IAEnD,+DAA+D;IAC/D,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC;IAInC,cAAc,IAAI,GAAG,CAAC,MAAM,CAAC;IAK7B,eAAe,IAAI,MAAM,EAAE;IAM3B,UAAU,IAAI,OAAO;IAIrB;qBACiB;IACjB,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMlC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAexD,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIlC,SAAS,CAAC,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C,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzC;qBACiB;IACjB,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMlC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAexD,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIlC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQnC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC;IAS/B;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CACjB,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAC3B;QAAE,KAAK,EAAE,CAAC,CAAC;QAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAAK,IAAI,CAAA;KAAE;IAiB7D;;;;OAIG;IACH,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAUtE,mEAAmE;IACnE,SAAS,CAAC,aAAa,IAAI,IAAI;CAKlC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/e3-ui-components",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
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-types": "1.0.67",
40
- "@elaraai/e3-ui": "1.0.67",
41
- "@elaraai/e3-api-client": "1.0.67",
42
- "@elaraai/east": "1.0.67",
43
- "@elaraai/east-ui-components": "1.0.67",
44
- "@elaraai/east-ui": "1.0.67"
39
+ "@elaraai/e3-api-client": "1.0.69",
40
+ "@elaraai/e3-types": "1.0.69",
41
+ "@elaraai/e3-ui": "1.0.69",
42
+ "@elaraai/east": "1.0.69",
43
+ "@elaraai/east-ui": "1.0.69",
44
+ "@elaraai/east-ui-components": "1.0.69"
45
45
  },
46
46
  "dependencies": {
47
47
  "@emotion/react": "^11.14.0",
@@ -87,12 +87,12 @@
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.67",
91
- "@elaraai/e3-types": "1.0.67",
92
- "@elaraai/east": "1.0.67",
93
- "@elaraai/e3-ui": "1.0.67",
94
- "@elaraai/east-ui": "1.0.67",
95
- "@elaraai/east-ui-components": "1.0.67"
90
+ "@elaraai/e3-api-client": "1.0.69",
91
+ "@elaraai/e3-ui": "1.0.69",
92
+ "@elaraai/east": "1.0.69",
93
+ "@elaraai/e3-types": "1.0.69",
94
+ "@elaraai/east-ui": "1.0.69",
95
+ "@elaraai/east-ui-components": "1.0.69"
96
96
  },
97
97
  "repository": {
98
98
  "type": "git",
@@ -1,84 +0,0 @@
1
- import { EastTypeValue } from '@elaraai/east';
2
- /** Where a query landed in the collection's canonical key order. */
3
- export interface DatasetKeyMatchRange {
4
- /** Whether any row matched. */
5
- found: boolean;
6
- /** First matched row (for a miss, the query's insertion row). */
7
- row: number;
8
- /** Number of matched rows. */
9
- count: number;
10
- }
11
- /**
12
- * A key query in wire form: a whole-key `.east` literal (`key`), a String
13
- * prefix (`prefix`), or — for struct keys — exact leading-field literals
14
- * (`fields`, declaration order) optionally followed by a `prefix` on the
15
- * next (String) field. Every form addresses one contiguous row range in
16
- * the canonical key order.
17
- */
18
- export type DatasetKeyQuery = {
19
- key: string;
20
- } | {
21
- prefix: string;
22
- } | {
23
- fields: string[];
24
- prefix?: string;
25
- };
26
- export interface DatasetKeySearchProps {
27
- /** The searched collection's Dict key / Set element type. */
28
- keyType: EastTypeValue;
29
- /** Locates a query; literals are canonical `.east` text of
30
- * already-validated values. */
31
- onFind: (query: DatasetKeyQuery) => Promise<DatasetKeyMatchRange>;
32
- /** Labels rows `[row, row + limit)` for the popup, in row order. */
33
- onListRange: (row: number, limit: number) => Promise<string[]>;
34
- /** Jumps the host tree to a global root row. */
35
- onJump: (row: number) => void;
36
- /** Clears the host's jump (and its held row highlight) when the query
37
- * is cleared. */
38
- onClear?: (() => void) | undefined;
39
- }
40
- /** A parsed search input: a wire query, or the hint to show instead. */
41
- export type ParsedKeyInput = {
42
- kind: 'query';
43
- query: DatasetKeyQuery;
44
- } | {
45
- kind: 'hint';
46
- hint: string;
47
- };
48
- /**
49
- * Turns typed search text into a wire query, or a hint when it cannot
50
- * parse. Struct keys: `(` opens a whole-key `.east` literal; otherwise
51
- * comma-separated leading field values — exact for all but the last
52
- * segment (unquoted String segments need no quotes), the last a prefix on
53
- * a String field or an exact value otherwise, and a trailing comma
54
- * narrows to the leading exact fields.
55
- *
56
- * @param keyType - the collection's Dict key / Set element type
57
- * @param text - the raw search input
58
- * @returns the query to send, or the hint to display
59
- */
60
- export declare function parseKeyInput(keyType: EastTypeValue, text: string): ParsedKeyInput;
61
- /**
62
- * Builds the monotone lower/upper row predicates of a RANGE query over
63
- * keys in canonical East order — the client-side mirror of the server's
64
- * fence-search predicates, for inline (already-decoded) previews. The
65
- * range is `[first row where lower holds, first row where upper holds)`.
66
- *
67
- * @param keyType - the collection's Dict key / Set element type
68
- * @param query - the wire query
69
- * @returns the predicate pair, or `null` for a whole-key literal query
70
- * (an exact lookup, not a range)
71
- */
72
- export declare function keyRangePredicates(keyType: EastTypeValue, query: DatasetKeyQuery): {
73
- lower: (k: unknown) => boolean;
74
- upper: (k: unknown) => boolean;
75
- } | null;
76
- /**
77
- * Renders the dataset key search control.
78
- *
79
- * @param props - see {@link DatasetKeySearchProps}
80
- * @returns the search combobox with its match count, range navigation and
81
- * clear affordance
82
- */
83
- export declare const DatasetKeySearch: import('react').NamedExoticComponent<DatasetKeySearchProps>;
84
- //# sourceMappingURL=DatasetKeySearch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatasetKeySearch.d.ts","sourceRoot":"","sources":["../../src/components/DatasetKeySearch.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAoCH,OAAO,EAAmE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAQpH,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACjC,+BAA+B;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GACrB;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GACf;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5C,MAAM,WAAW,qBAAqB;IAClC,6DAA6D;IAC7D,OAAO,EAAE,aAAa,CAAC;IACvB;oCACgC;IAChC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClE,oEAAoE;IACpE,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/D,gDAAgD;IAChD,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B;sBACkB;IAClB,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACtC;AAwDD,wEAAwE;AACxE,MAAM,MAAM,cAAc,GACpB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,eAA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