@elaraai/e3-ui-components 0.0.1-beta.9 → 1.0.1

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 (89) hide show
  1. package/CLA.md +1 -1
  2. package/CONTRIBUTING.md +3 -3
  3. package/LICENSE.md +15 -666
  4. package/README.md +69 -1
  5. package/dist/components/DataTaskPreview.d.ts +16 -0
  6. package/dist/components/DataTaskPreview.d.ts.map +1 -0
  7. package/dist/components/DatasetPreview.d.ts +14 -0
  8. package/dist/components/DatasetPreview.d.ts.map +1 -0
  9. package/dist/components/EastValueViewer.d.ts.map +1 -1
  10. package/dist/components/ErrorBoundary.d.ts +10 -2
  11. package/dist/components/ErrorBoundary.d.ts.map +1 -1
  12. package/dist/components/InputPreview.d.ts +1 -7
  13. package/dist/components/InputPreview.d.ts.map +1 -1
  14. package/dist/components/TaskLogs.d.ts +13 -0
  15. package/dist/components/TaskLogs.d.ts.map +1 -0
  16. package/dist/components/TaskPreview.d.ts +1 -8
  17. package/dist/components/TaskPreview.d.ts.map +1 -1
  18. package/dist/components/UITaskPreview.d.ts +16 -0
  19. package/dist/components/UITaskPreview.d.ts.map +1 -0
  20. package/dist/components/VirtualizedLogViewer.d.ts.map +1 -1
  21. package/dist/components/index.d.ts +4 -0
  22. package/dist/components/index.d.ts.map +1 -1
  23. package/dist/diff/format.d.ts +19 -0
  24. package/dist/diff/format.d.ts.map +1 -0
  25. package/dist/diff/index.d.ts +10 -0
  26. package/dist/diff/index.d.ts.map +1 -0
  27. package/dist/diff/manual.d.ts +25 -0
  28. package/dist/diff/manual.d.ts.map +1 -0
  29. package/dist/diff/walker.d.ts +52 -0
  30. package/dist/diff/walker.d.ts.map +1 -0
  31. package/dist/hooks/datasets.d.ts +5 -1
  32. package/dist/hooks/datasets.d.ts.map +1 -1
  33. package/dist/hooks/index.d.ts +3 -0
  34. package/dist/hooks/index.d.ts.map +1 -1
  35. package/dist/hooks/types.d.ts +2 -6
  36. package/dist/hooks/types.d.ts.map +1 -1
  37. package/dist/hooks/useDatasetStatus.d.ts +20 -0
  38. package/dist/hooks/useDatasetStatus.d.ts.map +1 -0
  39. package/dist/hooks/useDatasetValue.d.ts +35 -0
  40. package/dist/hooks/useDatasetValue.d.ts.map +1 -0
  41. package/dist/hooks/useInputData.d.ts +5 -1
  42. package/dist/hooks/useInputData.d.ts.map +1 -1
  43. package/dist/hooks/useTaskDetails.d.ts +14 -0
  44. package/dist/hooks/useTaskDetails.d.ts.map +1 -0
  45. package/dist/hooks/useTaskLogsHook.d.ts +2 -2
  46. package/dist/hooks/useTaskLogsHook.d.ts.map +1 -1
  47. package/dist/hooks/useTaskOutput.d.ts +5 -1
  48. package/dist/hooks/useTaskOutput.d.ts.map +1 -1
  49. package/dist/index.cjs +50775 -1780
  50. package/dist/index.cjs.map +1 -1
  51. package/dist/index.d.ts +6 -4
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +50886 -1907
  54. package/dist/index.js.map +1 -1
  55. package/dist/ontology/NodePropertiesDrawer.d.ts +19 -0
  56. package/dist/ontology/NodePropertiesDrawer.d.ts.map +1 -0
  57. package/dist/ontology/OntologyEdge.d.ts +11 -0
  58. package/dist/ontology/OntologyEdge.d.ts.map +1 -0
  59. package/dist/ontology/OntologyNode.d.ts +14 -0
  60. package/dist/ontology/OntologyNode.d.ts.map +1 -0
  61. package/dist/ontology/accents.d.ts +20 -0
  62. package/dist/ontology/accents.d.ts.map +1 -0
  63. package/dist/ontology/bind-runtime.d.ts +30 -0
  64. package/dist/ontology/bind-runtime.d.ts.map +1 -0
  65. package/dist/ontology/flow-state.d.ts +34 -0
  66. package/dist/ontology/flow-state.d.ts.map +1 -0
  67. package/dist/ontology/index.d.ts +10 -0
  68. package/dist/ontology/index.d.ts.map +1 -0
  69. package/dist/ontology/layout.d.ts +9 -0
  70. package/dist/ontology/layout.d.ts.map +1 -0
  71. package/dist/ontology/types.d.ts +46 -0
  72. package/dist/ontology/types.d.ts.map +1 -0
  73. package/dist/platform/bind-runtime.d.ts +139 -0
  74. package/dist/platform/bind-runtime.d.ts.map +1 -0
  75. package/dist/platform/dataset-hooks.d.ts +175 -0
  76. package/dist/platform/dataset-hooks.d.ts.map +1 -0
  77. package/dist/platform/dataset-store.d.ts +251 -0
  78. package/dist/platform/dataset-store.d.ts.map +1 -0
  79. package/dist/platform/e3-config.d.ts +59 -0
  80. package/dist/platform/e3-config.d.ts.map +1 -0
  81. package/dist/platform/index.d.ts +16 -0
  82. package/dist/platform/index.d.ts.map +1 -0
  83. package/dist/platform/staged-store.d.ts +108 -0
  84. package/dist/platform/staged-store.d.ts.map +1 -0
  85. package/package.json +47 -24
  86. package/dist/hooks/useInputDataPreview.d.ts +0 -8
  87. package/dist/hooks/useInputDataPreview.d.ts.map +0 -1
  88. package/dist/hooks/useTaskOutputPreview.d.ts +0 -8
  89. package/dist/hooks/useTaskOutputPreview.d.ts.map +0 -1
@@ -0,0 +1,251 @@
1
+ import { DatasetStatusInfo } from '@elaraai/e3-api-client';
2
+ import { TreePath, DatasetStatus as PlatformDatasetStatus } from '@elaraai/e3-types';
3
+ /**
4
+ * Timer abstraction the cache uses for periodic polling. Exists so
5
+ * tests can drive the poll loop deterministically with a fake clock
6
+ * instead of `setInterval` real-time.
7
+ */
8
+ export interface Clock {
9
+ /** Schedule `fn` to run every `ms` milliseconds. Returns a handle
10
+ * whose `clear()` cancels future invocations. */
11
+ setInterval(fn: () => void, ms: number): {
12
+ clear(): void;
13
+ };
14
+ }
15
+ /** Default {@link Clock} backed by `globalThis.setInterval`. */
16
+ export declare const realClock: Clock;
17
+ /**
18
+ * Adapter the cache uses for every server round-trip. Exists so tests
19
+ * (and any non-e3 host) can inject a synthetic implementation; the
20
+ * default wraps the `@elaraai/e3-api-client` module-level functions.
21
+ *
22
+ * The cache passes its own `apiUrl` / `repo` / `token` config to the
23
+ * adapter only via the {@link createDefaultDatasetApi} factory — the
24
+ * adapter itself doesn't see those values, so tests don't need to
25
+ * scaffold dummy URLs.
26
+ */
27
+ export interface DatasetApi {
28
+ get(workspace: string, path: TreePath): Promise<Uint8Array>;
29
+ set(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
30
+ launchDataflow(workspace: string): Promise<void>;
31
+ listRoot(workspace: string): Promise<string[]>;
32
+ listAt(workspace: string, path: TreePath): Promise<string[]>;
33
+ workspaceStatus(workspace: string): Promise<{
34
+ datasets: DatasetStatusInfo[];
35
+ }>;
36
+ }
37
+ /**
38
+ * Build the default {@link DatasetApi} that talks to a real e3 server
39
+ * via `@elaraai/e3-api-client`. Tests typically construct a
40
+ * hand-rolled adapter instead.
41
+ */
42
+ export declare function createDefaultDatasetApi(apiUrl: string, repo: string, getToken: () => string | null): DatasetApi;
43
+ /**
44
+ * Configuration for the {@link ReactiveDatasetCache}.
45
+ *
46
+ * Strictly cache-internal — credentials and server identity (apiUrl,
47
+ * repo, token) live in the {@link E3Config} context exposed by
48
+ * `<E3Provider>`. The cache talks to the server only via the injected
49
+ * {@link DatasetApi} adapter, so it has no opinion on transport.
50
+ *
51
+ * @property workspace - The workspace this cache instance renders
52
+ * against. Used by `Data.bind` to scope cache keys; consumed by
53
+ * bind-runtime + the Diff renderer via `getConfig().workspace`.
54
+ */
55
+ export interface ReactiveDatasetCacheConfig {
56
+ workspace?: string;
57
+ }
58
+ /**
59
+ * Interface for the ReactiveDatasetCache.
60
+ */
61
+ export interface ReactiveDatasetCacheInterface {
62
+ /** Read a cached dataset value synchronously */
63
+ read(workspace: string, path: TreePath): Uint8Array | undefined;
64
+ /** Check if a dataset is cached */
65
+ has(workspace: string, path: TreePath): boolean;
66
+ /**
67
+ * Get the platform status of a dataset — `unset` | `stale` | `up-to-date`.
68
+ * Returns `unset` if we don't know yet (status hasn't been polled).
69
+ * `write()` flips the local entry to `stale` immediately (optimistic).
70
+ * The next poll updates from the server's authoritative status.
71
+ */
72
+ getStatus(workspace: string, path: TreePath): PlatformDatasetStatus;
73
+ /** Write a dataset value (async - mutates remotely) */
74
+ write(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
75
+ /**
76
+ * Write a dataset value AND launch a dataflow execution to propagate the
77
+ * change to downstream tasks. Use when a single user action both mutates
78
+ * input data and should trigger downstream recomputation (e.g. a Slider's
79
+ * `onChangeEnd`). Use plain `write` for high-frequency optimistic updates
80
+ * that you don't want to drive the dataflow on every tick.
81
+ */
82
+ writeAndStart(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
83
+ /** Preload a dataset into cache */
84
+ preload(workspace: string, path: TreePath): Promise<void>;
85
+ /** List fields at a path */
86
+ list(workspace: string, path: TreePath): Promise<string[]>;
87
+ /** Set polling interval for a dataset */
88
+ setRefetchInterval(workspace: string, path: TreePath, intervalMs: number): void;
89
+ /** Subscribe to changes on a specific key */
90
+ subscribe(key: string, callback: () => void): () => void;
91
+ /** Subscribe to all changes */
92
+ subscribe(callback: () => void): () => void;
93
+ /** Get global snapshot version */
94
+ getSnapshot(): number;
95
+ /** Get version for a specific key */
96
+ getKeyVersion(key: string): number;
97
+ /** Set notification scheduler */
98
+ setScheduler(scheduler: ((notify: () => void) => void) | undefined): void;
99
+ /** Batch multiple operations */
100
+ batch<T>(fn: () => T): T;
101
+ /** Get the configuration */
102
+ getConfig(): ReactiveDatasetCacheConfig;
103
+ /** Clean up resources */
104
+ destroy(): void;
105
+ }
106
+ /**
107
+ * Convert a dataset path to a string key for caching.
108
+ */
109
+ export declare function datasetPathToString(path: TreePath): string;
110
+ /**
111
+ * Create a cache key from workspace and path.
112
+ */
113
+ export declare function datasetCacheKey(workspace: string, path: TreePath): string;
114
+ /**
115
+ * ReactiveDatasetCache manages dataset caching and reactivity.
116
+ *
117
+ * @remarks
118
+ * Combines TanStack Query for network operations with a local
119
+ * subscription system for reactive updates. Uses e3-api-client
120
+ * for all e3 API interactions.
121
+ *
122
+ * This differs from raw `@elaraai/e3-api-client` dataset functions which
123
+ * are for direct API calls without reactive binding or caching.
124
+ */
125
+ export declare class ReactiveDatasetCache implements ReactiveDatasetCacheInterface {
126
+ private destroyed;
127
+ private api;
128
+ private config;
129
+ private cache;
130
+ private knownHashes;
131
+ private statuses;
132
+ private keySubscribers;
133
+ private globalSubscribers;
134
+ private version;
135
+ private keyVersions;
136
+ private workspacePollers;
137
+ private readonly clock;
138
+ private inFlightPolls;
139
+ private batchDepth;
140
+ private changedKeys;
141
+ private pendingFetches;
142
+ private scheduler;
143
+ private flushScheduled;
144
+ constructor(config: ReactiveDatasetCacheConfig, api: DatasetApi, clock?: Clock);
145
+ /**
146
+ * Read the cache's own configuration. Server identity (apiUrl,
147
+ * repo, token) is NOT here — read it from `<E3Provider>` via
148
+ * `useE3Config()` instead.
149
+ */
150
+ getConfig(): ReactiveDatasetCacheConfig;
151
+ /**
152
+ * Read a dataset value synchronously from cache.
153
+ */
154
+ read(workspace: string, path: TreePath): Uint8Array | undefined;
155
+ /**
156
+ * Check if a dataset is cached.
157
+ */
158
+ has(workspace: string, path: TreePath): boolean;
159
+ /**
160
+ * Get the platform status of a dataset. Defaults to `unset` until the
161
+ * first poll returns a server status.
162
+ */
163
+ getStatus(workspace: string, path: TreePath): PlatformDatasetStatus;
164
+ /**
165
+ * Write a dataset value (async - mutates remotely).
166
+ */
167
+ write(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
168
+ /**
169
+ * Write a dataset value AND launch a workspace dataflow run so downstream
170
+ * tasks pick up the change. The launch is fire-and-await: it returns once
171
+ * the server has accepted the request (not when the dataflow finishes).
172
+ * Polling continues to surface live status as tasks complete.
173
+ */
174
+ writeAndStart(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
175
+ /**
176
+ * Preload a dataset into cache.
177
+ */
178
+ preload(workspace: string, path: TreePath): Promise<void>;
179
+ private fetchDataset;
180
+ /**
181
+ * List fields at a path. Empty path lists workspace root.
182
+ */
183
+ list(workspace: string, path: TreePath): Promise<string[]>;
184
+ /**
185
+ * Set refetch interval for a dataset (polling).
186
+ *
187
+ * @remarks
188
+ * Uses hash-based change detection for efficiency:
189
+ * 1. Polls workspaceStatus to get dataset hashes (lightweight)
190
+ * 2. Compares hashes to detect changes
191
+ * 3. Only fetches full content when hash changes
192
+ *
193
+ * Multiple subscriptions to the same workspace share a single poller.
194
+ */
195
+ setRefetchInterval(workspace: string, path: TreePath, intervalMs: number): void;
196
+ /**
197
+ * Poll workspace status and reconcile the cache with the server.
198
+ * Concurrent calls for the same workspace dedupe to a single fetch.
199
+ */
200
+ private pollWorkspaceStatus;
201
+ private doPollWorkspaceStatus;
202
+ /**
203
+ * Convert a path string back to TreePath.
204
+ */
205
+ private stringToPath;
206
+ /**
207
+ * Subscribe to changes on a specific key or all changes.
208
+ */
209
+ subscribe(callback: () => void): () => void;
210
+ subscribe(key: string, callback: () => void): () => void;
211
+ /**
212
+ * Get global version for useSyncExternalStore.
213
+ */
214
+ getSnapshot(): number;
215
+ /**
216
+ * Get version for a specific key.
217
+ */
218
+ getKeyVersion(key: string): number;
219
+ /**
220
+ * Set scheduler for deferred notifications.
221
+ */
222
+ setScheduler(scheduler: ((notify: () => void) => void) | undefined): void;
223
+ /**
224
+ * Batch multiple operations.
225
+ */
226
+ batch<T>(fn: () => T): T;
227
+ /**
228
+ * Notify subscribers of a change.
229
+ */
230
+ private notifyChange;
231
+ /**
232
+ * Flush pending notifications.
233
+ */
234
+ private flush;
235
+ private doFlush;
236
+ /**
237
+ * Cleanup resources. After `destroy()` returns, in-flight fetches
238
+ * and polls that are still mid-await won't write to the cache —
239
+ * `this.destroyed` short-circuits their post-await branches.
240
+ */
241
+ destroy(): void;
242
+ }
243
+ /**
244
+ * Create a new {@link ReactiveDatasetCache}. The caller is responsible
245
+ * for constructing a {@link DatasetApi} adapter; in a React tree the
246
+ * `<ReactiveDatasetProvider>` builds one from the surrounding
247
+ * `<E3Provider>`. Tests inject a fake `clock` to drive polling
248
+ * deterministically.
249
+ */
250
+ export declare function createReactiveDatasetCache(config: ReactiveDatasetCacheConfig, api: DatasetApi, clock?: Clock): ReactiveDatasetCache;
251
+ //# source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,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAC3C,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAyBxD;;OAEG;IACH,WAAW,IAAI,MAAM;IAIrB;;OAEG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIlC;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI;IAIzE;;OAEG;IACH,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAYxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAYpB;;OAEG;IACH,OAAO,CAAC,KAAK;IAeb,OAAO,CAAC,OAAO;IAsBf;;;;OAIG;IACH,OAAO,IAAI,IAAI;CAgBlB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACtC,MAAM,EAAE,0BAA0B,EAClC,GAAG,EAAE,UAAU,EACf,KAAK,CAAC,EAAE,KAAK,GACd,oBAAoB,CAEtB"}
@@ -0,0 +1,59 @@
1
+ import { ReactNode } from 'react';
2
+ import { QueryClient } from '@tanstack/react-query';
3
+ /**
4
+ * Server identity + auth for an e3 React tree.
5
+ *
6
+ * @property apiUrl - Base URL of the e3 API server.
7
+ * @property repo - Repository name. Defaults to `"default"` when omitted.
8
+ * @property workspace - Active workspace. Optional at the provider
9
+ * level — components that strictly require one (e.g. `<UITaskPreview>`,
10
+ * `Data.bind`) surface their own error if it's missing.
11
+ * @property token - Optional bearer token for authenticated requests.
12
+ * May be `null` for "anonymous." Rotates freely — every call re-reads.
13
+ */
14
+ export interface E3Config {
15
+ apiUrl: string;
16
+ repo?: string;
17
+ workspace?: string;
18
+ token?: string | null;
19
+ }
20
+ /**
21
+ * Props for {@link E3Provider}.
22
+ *
23
+ * @property children - Subtree that should see this config.
24
+ * @property config - The {@link E3Config} to expose.
25
+ * @property queryClient - Optional external `QueryClient`. One is
26
+ * created if omitted; pass an external instance to share a TanStack
27
+ * cache with the rest of your application.
28
+ */
29
+ export interface E3ProviderProps {
30
+ children: ReactNode;
31
+ config: E3Config;
32
+ queryClient?: QueryClient;
33
+ }
34
+ /**
35
+ * Provide e3 server identity + auth + a TanStack-Query client to a
36
+ * React subtree.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * <E3Provider config={{ apiUrl: "http://localhost:3000", workspace: "prod", token }}>
41
+ * <ReactiveDatasetProvider>
42
+ * <App />
43
+ * </ReactiveDatasetProvider>
44
+ * </E3Provider>
45
+ * ```
46
+ */
47
+ export declare function E3Provider({ children, config, queryClient: externalClient }: E3ProviderProps): import("react/jsx-runtime").JSX.Element;
48
+ /**
49
+ * Read the active {@link E3Config}. Throws if no `<E3Provider>` is
50
+ * mounted — every component that talks to e3 needs one.
51
+ */
52
+ export declare function useE3Config(): E3Config;
53
+ /**
54
+ * Read the active {@link E3Config}, or `null` if no provider is
55
+ * mounted. Use this when a component should degrade gracefully
56
+ * (e.g. an empty state) rather than throwing.
57
+ */
58
+ export declare function useE3ConfigOptional(): E3Config | null;
59
+ //# sourceMappingURL=e3-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e3-config.d.ts","sourceRoot":"","sources":["../../src/platform/e3-config.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAuB,MAAM,uBAAuB,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAID;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,QAAQ,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,EAAE,eAAe,2CAc5F;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAStC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,QAAQ,GAAG,IAAI,CAErD"}
@@ -0,0 +1,16 @@
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
+ * e3 Data platform — reactive dataset cache, runtime, and React hooks for
7
+ * `Data.bind`.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ export { ReactiveDatasetCache, createReactiveDatasetCache, createDefaultDatasetApi, realClock, type ReactiveDatasetCacheInterface, type ReactiveDatasetCacheConfig, type DatasetApi, type Clock, datasetCacheKey, datasetPathToString, } from './dataset-store.js';
12
+ export { StagedStore, IndexedDBStagedAdapter, MemoryStagedAdapter, type StagedStoreInterface, type StagedPersistenceAdapter, type StagedEntry, type PersistedStagedEntry, getStagedStore, initializeStagedStore, clearStagedStoreSingleton, } from './staged-store.js';
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
+ export { E3Provider, useE3Config, useE3ConfigOptional, type E3Config, type E3ProviderProps, } from './e3-config.js';
15
+ export { ReactiveDatasetProvider, type ReactiveDatasetProviderProps, useReactiveDatasetCache, useReactiveDatasetCacheSubscription, useReactiveDatasetKey, usePreloadReactiveDatasets, type ReactiveDatasetToPreload, type PreloadReactiveDatasetsResult, useReactiveDatasetWrite, useReactiveDatasetHas, ReactiveDatasetLoader, type ReactiveDatasetLoaderProps, } from './dataset-hooks.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAK3B,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"}
@@ -0,0 +1,108 @@
1
+ import { TreePath } from '@elaraai/e3-types';
2
+ /** A staged entry as held in the in-memory cache. */
3
+ export interface StagedEntry {
4
+ /** Server value at the moment staging began. Pinned across writes;
5
+ * used as the snapshot side of the eventual 3-way merge at commit. */
6
+ snapshot: Uint8Array;
7
+ /** Current locally-edited value. Updates on every `write`. */
8
+ buffered: Uint8Array;
9
+ }
10
+ /** Persisted form. Identical to {@link StagedEntry} — kept distinct so
11
+ * future persistence-layer fields (e.g. compression metadata) don't
12
+ * leak into the in-memory shape. */
13
+ export interface PersistedStagedEntry {
14
+ snapshot: Uint8Array;
15
+ buffered: Uint8Array;
16
+ }
17
+ /** Pluggable persistence adapter. Production uses IndexedDB; tests / SSR
18
+ * use the in-memory adapter. */
19
+ export interface StagedPersistenceAdapter {
20
+ /** Load every persisted entry. Called once when the store is constructed. */
21
+ loadAll(): Promise<Map<string, PersistedStagedEntry>>;
22
+ /** Persist (or replace) an entry by key. */
23
+ save(key: string, entry: PersistedStagedEntry): Promise<void>;
24
+ /** Remove a single persisted entry by key. */
25
+ remove(key: string): Promise<void>;
26
+ /** Remove all persisted entries. */
27
+ clear(): Promise<void>;
28
+ }
29
+ export interface StagedStoreInterface {
30
+ /** Resolves when the initial hydrate from persistence has completed.
31
+ * Reactive subscribers are notified per-key as entries hydrate. */
32
+ ready(): Promise<void>;
33
+ /** Resolves when every in-flight persistence write has completed.
34
+ * Used by tests and by host code that needs to ensure durability
35
+ * before a navigation / unload event. */
36
+ flushPending(): Promise<void>;
37
+ /** True iff this path has a pending staged change. */
38
+ hasPending(workspace: string, path: TreePath): boolean;
39
+ /** Get the buffered (locally-edited) value, or undefined if not staged. */
40
+ getBuffered(workspace: string, path: TreePath): Uint8Array | undefined;
41
+ /** Get the pinned snapshot value, or undefined if not staged. */
42
+ getSnapshot(workspace: string, path: TreePath): Uint8Array | undefined;
43
+ /** Get the full staged entry, or undefined if not staged. */
44
+ getEntry(workspace: string, path: TreePath): StagedEntry | undefined;
45
+ /** Write a buffered value. Snapshot is pinned on the first call for a
46
+ * given path; subsequent writes update only the buffered value. */
47
+ write(workspace: string, path: TreePath, snapshotIfNew: Uint8Array, buffered: Uint8Array): void;
48
+ /** Drop the staged entry for a path. Returns true if there was one. */
49
+ discard(workspace: string, path: TreePath): boolean;
50
+ /** All currently-staged keys (workspace+path combinations). */
51
+ listKeys(): string[];
52
+ subscribe(key: string, callback: () => void): () => void;
53
+ getKeyVersion(key: string): number;
54
+ }
55
+ /**
56
+ * IndexedDB-backed persistence adapter. Stores entries as native
57
+ * structured-clone shapes; no base64 encoding — `Uint8Array` fields
58
+ * survive structured clone losslessly.
59
+ */
60
+ export declare class IndexedDBStagedAdapter implements StagedPersistenceAdapter {
61
+ private dbPromise;
62
+ private getDB;
63
+ loadAll(): Promise<Map<string, PersistedStagedEntry>>;
64
+ save(key: string, entry: PersistedStagedEntry): Promise<void>;
65
+ remove(key: string): Promise<void>;
66
+ clear(): Promise<void>;
67
+ }
68
+ /**
69
+ * Trivial in-memory implementation. Used by tests directly and as the
70
+ * fallback when IndexedDB isn't available (e.g. SSR, very locked-down
71
+ * iframes). The "persistence" is process-lifetime only.
72
+ */
73
+ export declare class MemoryStagedAdapter implements StagedPersistenceAdapter {
74
+ private map;
75
+ loadAll(): Promise<Map<string, PersistedStagedEntry>>;
76
+ save(key: string, entry: PersistedStagedEntry): Promise<void>;
77
+ remove(key: string): Promise<void>;
78
+ clear(): Promise<void>;
79
+ }
80
+ export declare class StagedStore implements StagedStoreInterface {
81
+ private entries;
82
+ private subscribers;
83
+ private versions;
84
+ private adapter;
85
+ private hydrated;
86
+ private inFlight;
87
+ constructor(adapter: StagedPersistenceAdapter);
88
+ ready(): Promise<void>;
89
+ flushPending(): Promise<void>;
90
+ hasPending(workspace: string, path: TreePath): boolean;
91
+ getBuffered(workspace: string, path: TreePath): Uint8Array | undefined;
92
+ getSnapshot(workspace: string, path: TreePath): Uint8Array | undefined;
93
+ getEntry(workspace: string, path: TreePath): StagedEntry | undefined;
94
+ write(workspace: string, path: TreePath, snapshotIfNew: Uint8Array, buffered: Uint8Array): void;
95
+ discard(workspace: string, path: TreePath): boolean;
96
+ listKeys(): string[];
97
+ subscribe(key: string, callback: () => void): () => void;
98
+ getKeyVersion(key: string): number;
99
+ /** Test-only: clear in-memory + persisted state. */
100
+ clear(): Promise<void>;
101
+ private notify;
102
+ private track;
103
+ private hydrate;
104
+ }
105
+ export declare function getStagedStore(): StagedStoreInterface;
106
+ export declare function initializeStagedStore(store: StagedStoreInterface): void;
107
+ export declare function clearStagedStoreSingleton(): void;
108
+ //# sourceMappingURL=staged-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staged-store.d.ts","sourceRoot":"","sources":["../../src/platform/staged-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;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,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,EAAE,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;IAItE,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;IAItE,QAAQ,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;IAIpB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAaxD,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIlC,oDAAoD;IAC9C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5B,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,KAAK;YASC,OAAO;CAgBxB;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": "0.0.1-beta.9",
3
+ "version": "1.0.1",
4
4
  "description": "React Query hooks and preview components for the e3 API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -19,38 +19,44 @@
19
19
  "CONTRIBUTING.md",
20
20
  "CLA.md"
21
21
  ],
22
- "sideEffects": false,
23
- "scripts": {
24
- "build": "vite build",
25
- "lint": "eslint .",
26
- "lint:fix": "eslint . --fix"
27
- },
22
+ "sideEffects": [
23
+ "./dist/platform/dataset-runtime.js",
24
+ "./src/platform/dataset-runtime.ts",
25
+ "./dist/platform/staged-runtime.js",
26
+ "./src/platform/staged-runtime.ts",
27
+ "./dist/diff/index.js",
28
+ "./src/diff/index.tsx",
29
+ "./dist/ontology/index.js",
30
+ "./src/ontology/index.tsx"
31
+ ],
28
32
  "peerDependencies": {
29
33
  "@chakra-ui/react": "^3.0.0",
30
- "@elaraai/e3-api-client": "beta",
31
- "@elaraai/e3-types": "beta",
32
- "@elaraai/east": "beta",
33
- "@elaraai/east-ui": "beta",
34
- "@elaraai/east-ui-components": "beta",
35
34
  "@tanstack/react-query": "^5.62.0",
36
35
  "react": "^19.0.0",
37
- "react-dom": "^19.0.0"
36
+ "react-dom": "^19.0.0",
37
+ "@elaraai/e3-api-client": "1.0.1",
38
+ "@elaraai/e3-types": "1.0.1",
39
+ "@elaraai/e3-ui": "1.0.1",
40
+ "@elaraai/east": "1.0.1",
41
+ "@elaraai/east-ui": "1.0.1",
42
+ "@elaraai/east-ui-components": "1.0.1"
38
43
  },
39
44
  "dependencies": {
40
45
  "@emotion/react": "^11.14.0",
41
46
  "@fortawesome/fontawesome-svg-core": "^7.1.0",
42
47
  "@fortawesome/free-solid-svg-icons": "^7.1.0",
43
48
  "@fortawesome/react-fontawesome": "^3.1.1",
44
- "@tanstack/react-virtual": "^3.11.2"
49
+ "@tanstack/react-virtual": "^3.11.2",
50
+ "@xyflow/react": "^12.10.1",
51
+ "cytoscape": "^3.30.0",
52
+ "cytoscape-cose-bilkent": "^4.1.0",
53
+ "react-icons": "^5.4.0",
54
+ "use-local-storage-state": "^19.5.0"
45
55
  },
46
56
  "devDependencies": {
47
57
  "@chakra-ui/react": "^3.0.0",
48
- "@elaraai/e3-api-client": "beta",
49
- "@elaraai/e3-types": "beta",
50
- "@elaraai/east": "beta",
51
- "@elaraai/east-ui": "beta",
52
- "@elaraai/east-ui-components": "beta",
53
58
  "@tanstack/react-query": "^5.62.0",
59
+ "@types/cytoscape": "^3.21.0",
54
60
  "@types/react": "^19.0.0",
55
61
  "@types/react-dom": "^19.0.0",
56
62
  "@typescript-eslint/eslint-plugin": "^8.42.0",
@@ -59,16 +65,25 @@
59
65
  "eslint": "^9.34.0",
60
66
  "eslint-plugin-headers": "^1.3.3",
61
67
  "eslint-plugin-react-hooks": "^5.0.0",
68
+ "playwright": "^1.49.0",
62
69
  "react": "^19.0.0",
63
70
  "react-dom": "^19.0.0",
71
+ "tsx": "^4.19.2",
64
72
  "typescript": "~5.9.2",
65
73
  "vite": "^6.0.0",
66
- "vite-plugin-dts": "^4.3.0"
74
+ "vite-plugin-dts": "^4.3.0",
75
+ "@elaraai/e3": "1.0.1",
76
+ "@elaraai/e3-api-client": "1.0.1",
77
+ "@elaraai/e3-ui": "1.0.1",
78
+ "@elaraai/e3-types": "1.0.1",
79
+ "@elaraai/east": "1.0.1",
80
+ "@elaraai/east-ui": "1.0.1",
81
+ "@elaraai/east-ui-components": "1.0.1"
67
82
  },
68
83
  "repository": {
69
84
  "type": "git",
70
- "url": "https://github.com/elaraai/east-ui.git",
71
- "directory": "packages/e3-ui-components"
85
+ "url": "git+https://github.com/elaraai/east-workspace.git",
86
+ "directory": "libs/east-ui/packages/e3-ui-components"
72
87
  },
73
88
  "keywords": [
74
89
  "east",
@@ -78,8 +93,16 @@
78
93
  "hooks"
79
94
  ],
80
95
  "author": "Elara AI Pty Ltd",
81
- "license": "SEE LICENSE IN LICENSE",
96
+ "license": "AGPL-3.0-or-later",
82
97
  "engines": {
83
98
  "node": ">=22.0.0"
99
+ },
100
+ "scripts": {
101
+ "build": "vite build",
102
+ "typecheck": "tsc --noEmit",
103
+ "lint": "eslint .",
104
+ "lint:fix": "eslint . --fix",
105
+ "test": "node --import tsx --test test/*.spec.ts test/**/*.spec.ts",
106
+ "snapshot": "tsx scripts/snapshot.ts"
84
107
  }
85
- }
108
+ }
@@ -1,8 +0,0 @@
1
- import { QueryOverrides, DatasetPreview } from './types.js';
2
- import { DatasetStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
3
- export declare function useInputDataPreview(apiUrl: string, repo: string, workspace: string | null, inputInfo: DatasetStatusInfo | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): {
4
- data: DatasetPreview | undefined;
5
- isLoading: boolean;
6
- error: Error | null;
7
- };
8
- //# sourceMappingURL=useInputDataPreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInputDataPreview.d.ts","sourceRoot":"","sources":["../../src/hooks/useInputDataPreview.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKhF,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc;;;;EA8ChC"}
@@ -1,8 +0,0 @@
1
- import { QueryOverrides, DatasetPreview } from './types.js';
2
- import { TaskStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
3
- export declare function useTaskOutputPreview(apiUrl: string, repo: string, workspace: string | null, task: TaskStatusInfo | null, outputHash?: string | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): {
4
- data: DatasetPreview | undefined;
5
- isLoading: boolean;
6
- error: Error | null;
7
- };
8
- //# sourceMappingURL=useTaskOutputPreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTaskOutputPreview.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskOutputPreview.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAK7E,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,IAAI,EAAE,cAAc,GAAG,IAAI,EAC3B,UAAU,GAAE,MAAM,GAAG,IAAW,EAChC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc;;;;EA6ChC"}