@elaraai/e3-ui-components 1.0.7 → 1.0.8
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/dist/components/UITaskPreview.d.ts.map +1 -1
- package/dist/index.cjs +3833 -365
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3839 -371
- package/dist/index.js.map +1 -1
- package/dist/ontology/OntologyNode.d.ts.map +1 -1
- package/dist/ontology/OntologyTable.d.ts +8 -0
- package/dist/ontology/OntologyTable.d.ts.map +1 -0
- package/dist/ontology/accents.d.ts.map +1 -1
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/projection.d.ts +82 -0
- package/dist/ontology/projection.d.ts.map +1 -0
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/platform/dataset-hooks.d.ts.map +1 -1
- package/dist/platform/dataset-store.d.ts +52 -10
- package/dist/platform/dataset-store.d.ts.map +1 -1
- package/dist/platform/func-runtime.d.ts +108 -0
- package/dist/platform/func-runtime.d.ts.map +1 -0
- package/dist/platform/index.d.ts +1 -0
- package/dist/platform/index.d.ts.map +1 -1
- package/package.json +15 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OntologyNode.d.ts","sourceRoot":"","sources":["../../src/ontology/OntologyNode.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAO5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"OntologyNode.d.ts","sourceRoot":"","sources":["../../src/ontology/OntologyNode.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAO5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAiBnD,qEAAqE;AACrE,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC9C,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAmBD,eAAO,MAAM,YAAY,2DAA6B,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,6CAsHzF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Ontology as OntologyValue } from './types.js';
|
|
2
|
+
export interface OntologyTableProps {
|
|
3
|
+
ontology: OntologyValue;
|
|
4
|
+
/** Open a node in the shared properties drawer. */
|
|
5
|
+
onSelectNode: (id: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const OntologyTable: import('react').NamedExoticComponent<OntologyTableProps>;
|
|
8
|
+
//# sourceMappingURL=OntologyTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OntologyTable.d.ts","sourceRoot":"","sources":["../../src/ontology/OntologyTable.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAgCH,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AAge5D,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,aAAa,CAAC;IACxB,mDAAmD;IACnD,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,aAAa,0DA4FxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accents.d.ts","sourceRoot":"","sources":["../../src/ontology/accents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"accents.d.ts","sourceRoot":"","sources":["../../src/ontology/accents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAY7D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAsBtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ontology/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ontology/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AA+BnD,KAAK,eAAe,GAAG,WAAW,CAAC,OAAO,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAoBrE,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACtB;AAiWD,QAAA,MAAM,kBAAkB,+DAkMtB,CAAC;AAIH,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Ontology, OntologyNodeKind } from './types.js';
|
|
2
|
+
/** A node reference rendered as a chip in a table cell. */
|
|
3
|
+
export interface NodeChip {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
kind: OntologyNodeKind;
|
|
7
|
+
}
|
|
8
|
+
/** A process adjacent in the resource flow, with the resources that
|
|
9
|
+
* connect it — the row-level answer to "how does this process affect
|
|
10
|
+
* the next one". */
|
|
11
|
+
export interface FlowNeighbor {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
/** Names of the resources carrying the dependency. */
|
|
15
|
+
via: string[];
|
|
16
|
+
}
|
|
17
|
+
/** One process leaf row. */
|
|
18
|
+
export interface ProcessRow {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
description: string | undefined;
|
|
22
|
+
/** 1-based global value-chain stage (longest-path layer of the SCC
|
|
23
|
+
* condensation). Identical for every member of a resource cycle. */
|
|
24
|
+
stage: number;
|
|
25
|
+
/** True iff this process is in a resource-flow cycle (SCC size > 1). */
|
|
26
|
+
cyclic: boolean;
|
|
27
|
+
/** Names of the other processes in the same cycle (empty if acyclic). */
|
|
28
|
+
cycleWith: string[];
|
|
29
|
+
/** Processes that produce a resource this one uses (what feeds me). */
|
|
30
|
+
upstream: FlowNeighbor[];
|
|
31
|
+
/** Processes that use a resource this one produces (what I feed). */
|
|
32
|
+
downstream: FlowNeighbor[];
|
|
33
|
+
uses: NodeChip[];
|
|
34
|
+
produces: NodeChip[];
|
|
35
|
+
kpis: NodeChip[];
|
|
36
|
+
data: NodeChip[];
|
|
37
|
+
decisions: NodeChip[];
|
|
38
|
+
policies: NodeChip[];
|
|
39
|
+
agents: NodeChip[];
|
|
40
|
+
/** KPIs (beyond the section's own) that also connect this row to the
|
|
41
|
+
* enclosing objective — rendered as "also via …" chips. */
|
|
42
|
+
alsoVia: NodeChip[];
|
|
43
|
+
/** Row-level completeness warnings (REA duality etc.). */
|
|
44
|
+
lints: string[];
|
|
45
|
+
}
|
|
46
|
+
/** A KPI sub-section within an objective group. `kpi === null` collects
|
|
47
|
+
* processes that reach the objective without a connecting KPI (direct
|
|
48
|
+
* `process --drives--> objective`). */
|
|
49
|
+
export interface KpiSection {
|
|
50
|
+
kpi: NodeChip | null;
|
|
51
|
+
rows: ProcessRow[];
|
|
52
|
+
}
|
|
53
|
+
/** An objective group — one node of the objective forest. */
|
|
54
|
+
export interface ObjectiveGroup {
|
|
55
|
+
/** `null` for the synthetic "Unassigned" group. */
|
|
56
|
+
id: string | null;
|
|
57
|
+
name: string;
|
|
58
|
+
description: string | undefined;
|
|
59
|
+
/** Indent depth in the objective forest (apex = 0). */
|
|
60
|
+
depth: number;
|
|
61
|
+
/** KPI sub-sections. A single section with `kpi: null` when the
|
|
62
|
+
* objective has at most one connecting KPI (no tier tax). */
|
|
63
|
+
sections: KpiSection[];
|
|
64
|
+
/** Sub-objectives indented beneath this one. */
|
|
65
|
+
children: ObjectiveGroup[];
|
|
66
|
+
/** Totals across this group (excluding children). */
|
|
67
|
+
processCount: number;
|
|
68
|
+
decisionCount: number;
|
|
69
|
+
lintCount: number;
|
|
70
|
+
}
|
|
71
|
+
/** The full table projection. */
|
|
72
|
+
export interface TableProjection {
|
|
73
|
+
groups: ObjectiveGroup[];
|
|
74
|
+
/** Graph-level warnings (unattached KPIs, idle decisions, orphan links…). */
|
|
75
|
+
lints: string[];
|
|
76
|
+
/** Highest stage number assigned (for the stage legend). */
|
|
77
|
+
stageCount: number;
|
|
78
|
+
/** Total process count (for the empty state). */
|
|
79
|
+
processCount: number;
|
|
80
|
+
}
|
|
81
|
+
export declare function projectTable(ontology: Ontology): TableProjection;
|
|
82
|
+
//# sourceMappingURL=projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../src/ontology/projection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;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G,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,cAAc,EAAE,gBAAgB,EAG5C,CAAC"}
|
|
@@ -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;
|
|
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;AAmB5B;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IACzC,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CAAC,EACpC,QAAQ,GACX,EAAE,4BAA4B,2CA6E9B;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,M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/** Fetch a dataset's content. `hash` is the server's content hash
|
|
29
|
+
* when it exposes one (`null` otherwise) — the cache records it so
|
|
30
|
+
* the next status poll doesn't refetch content it already has. */
|
|
31
|
+
get(workspace: string, path: TreePath): Promise<{
|
|
32
|
+
data: Uint8Array;
|
|
33
|
+
hash: string | null;
|
|
34
|
+
}>;
|
|
29
35
|
set(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
|
|
30
36
|
launchDataflow(workspace: string): Promise<void>;
|
|
31
37
|
listRoot(workspace: string): Promise<string[]>;
|
|
@@ -86,6 +92,13 @@ export interface ReactiveDatasetCacheInterface {
|
|
|
86
92
|
list(workspace: string, path: TreePath): Promise<string[]>;
|
|
87
93
|
/** Set polling interval for a dataset */
|
|
88
94
|
setRefetchInterval(workspace: string, path: TreePath, intervalMs: number): void;
|
|
95
|
+
/**
|
|
96
|
+
* Stop polling a dataset previously registered with
|
|
97
|
+
* {@link setRefetchInterval}. The workspace's shared poller stops
|
|
98
|
+
* entirely once its last path is cleared — without this, a long-lived
|
|
99
|
+
* session accumulates watched paths (and network traffic) forever.
|
|
100
|
+
*/
|
|
101
|
+
clearRefetchInterval(workspace: string, path: TreePath): void;
|
|
89
102
|
/** Subscribe to changes on a specific key */
|
|
90
103
|
subscribe(key: string, callback: () => void): () => void;
|
|
91
104
|
/** Subscribe to all changes */
|
|
@@ -105,6 +118,11 @@ export interface ReactiveDatasetCacheInterface {
|
|
|
105
118
|
}
|
|
106
119
|
/**
|
|
107
120
|
* Convert a dataset path to a string key for caching.
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* Dot-joined to match the server's own path encoding (workspaceStatus
|
|
124
|
+
* reports `.a.b` paths) — field names containing `.` are ambiguous at
|
|
125
|
+
* the e3 wire level itself, so the cache doesn't try to out-encode it.
|
|
108
126
|
*/
|
|
109
127
|
export declare function datasetPathToString(path: TreePath): string;
|
|
110
128
|
/**
|
|
@@ -115,9 +133,11 @@ export declare function datasetCacheKey(workspace: string, path: TreePath): stri
|
|
|
115
133
|
* ReactiveDatasetCache manages dataset caching and reactivity.
|
|
116
134
|
*
|
|
117
135
|
* @remarks
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
136
|
+
* Content bytes live in a `@tanstack/query-core` {@link QueryClient}
|
|
137
|
+
* (structured query keys, fetch dedup + cancellation); statuses, content
|
|
138
|
+
* hashes, write pipelines, the workspace-status poll loop, and the
|
|
139
|
+
* string-keyed subscription shim are cache-owned. See the module remarks
|
|
140
|
+
* for the write/poll race rules.
|
|
121
141
|
*
|
|
122
142
|
* This differs from raw `@elaraai/e3-api-client` dataset functions which
|
|
123
143
|
* are for direct API calls without reactive binding or caching.
|
|
@@ -126,9 +146,13 @@ export declare class ReactiveDatasetCache implements ReactiveDatasetCacheInterfa
|
|
|
126
146
|
private destroyed;
|
|
127
147
|
private api;
|
|
128
148
|
private config;
|
|
129
|
-
private
|
|
149
|
+
private readonly client;
|
|
130
150
|
private knownHashes;
|
|
131
151
|
private statuses;
|
|
152
|
+
private writeEpochs;
|
|
153
|
+
private writeChains;
|
|
154
|
+
private writeBaselines;
|
|
155
|
+
private pendingWriteCounts;
|
|
132
156
|
private keySubscribers;
|
|
133
157
|
private globalSubscribers;
|
|
134
158
|
private version;
|
|
@@ -138,10 +162,11 @@ export declare class ReactiveDatasetCache implements ReactiveDatasetCacheInterfa
|
|
|
138
162
|
private inFlightPolls;
|
|
139
163
|
private batchDepth;
|
|
140
164
|
private changedKeys;
|
|
141
|
-
private pendingFetches;
|
|
142
165
|
private scheduler;
|
|
143
166
|
private flushScheduled;
|
|
144
167
|
constructor(config: ReactiveDatasetCacheConfig, api: DatasetApi, clock?: Clock);
|
|
168
|
+
/** Structured query key for a dataset's content. */
|
|
169
|
+
private contentKey;
|
|
145
170
|
/**
|
|
146
171
|
* Read the cache's own configuration. Server identity (apiUrl,
|
|
147
172
|
* repo, token) is NOT here — read it from `<E3Provider>` via
|
|
@@ -163,6 +188,13 @@ export declare class ReactiveDatasetCache implements ReactiveDatasetCacheInterfa
|
|
|
163
188
|
getStatus(workspace: string, path: TreePath): PlatformDatasetStatus;
|
|
164
189
|
/**
|
|
165
190
|
* Write a dataset value (async - mutates remotely).
|
|
191
|
+
*
|
|
192
|
+
* @remarks
|
|
193
|
+
* Optimistic and synchronous: the bytes are readable via {@link read}
|
|
194
|
+
* before this method's first await. Concurrent writes to the same key
|
|
195
|
+
* are serialized server-side (issue order preserved); on failure, only
|
|
196
|
+
* the newest write rolls the key back — to the last server-confirmed
|
|
197
|
+
* baseline, not to a possibly-superseded optimistic intermediate.
|
|
166
198
|
*/
|
|
167
199
|
write(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
|
|
168
200
|
/**
|
|
@@ -173,7 +205,9 @@ export declare class ReactiveDatasetCache implements ReactiveDatasetCacheInterfa
|
|
|
173
205
|
*/
|
|
174
206
|
writeAndStart(workspace: string, path: TreePath, value: Uint8Array): Promise<void>;
|
|
175
207
|
/**
|
|
176
|
-
* Preload a dataset into cache.
|
|
208
|
+
* Preload a dataset into cache. Concurrent preloads of the same key
|
|
209
|
+
* share one fetch (query-core dedup); a write racing the fetch cancels
|
|
210
|
+
* it, so a preload can never clobber optimistic bytes.
|
|
177
211
|
*/
|
|
178
212
|
preload(workspace: string, path: TreePath): Promise<void>;
|
|
179
213
|
private fetchDataset;
|
|
@@ -191,8 +225,15 @@ export declare class ReactiveDatasetCache implements ReactiveDatasetCacheInterfa
|
|
|
191
225
|
* 3. Only fetches full content when hash changes
|
|
192
226
|
*
|
|
193
227
|
* Multiple subscriptions to the same workspace share a single poller.
|
|
228
|
+
* Pair with {@link clearRefetchInterval} on unmount so the poller can
|
|
229
|
+
* stop when nothing is watching.
|
|
194
230
|
*/
|
|
195
231
|
setRefetchInterval(workspace: string, path: TreePath, intervalMs: number): void;
|
|
232
|
+
/**
|
|
233
|
+
* Stop polling a dataset; the workspace poller is torn down when its
|
|
234
|
+
* last watched path is cleared.
|
|
235
|
+
*/
|
|
236
|
+
clearRefetchInterval(workspace: string, path: TreePath): void;
|
|
196
237
|
/**
|
|
197
238
|
* Poll workspace status and reconcile the cache with the server.
|
|
198
239
|
* Concurrent calls for the same workspace dedupe to a single fetch.
|
|
@@ -234,9 +275,10 @@ export declare class ReactiveDatasetCache implements ReactiveDatasetCacheInterfa
|
|
|
234
275
|
private flush;
|
|
235
276
|
private doFlush;
|
|
236
277
|
/**
|
|
237
|
-
* Cleanup resources. After `destroy()` returns, in-flight fetches
|
|
238
|
-
* and
|
|
239
|
-
* `this.destroyed` short-circuits their post-await branches
|
|
278
|
+
* Cleanup resources. After `destroy()` returns, in-flight fetches,
|
|
279
|
+
* polls, and writes that are still mid-await won't write to the cache —
|
|
280
|
+
* `this.destroyed` short-circuits their post-await branches, and the
|
|
281
|
+
* query client's in-flight fetches are torn down with it.
|
|
240
282
|
*/
|
|
241
283
|
destroy(): void;
|
|
242
284
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset-store.d.ts","sourceRoot":"","sources":["../../src/platform/dataset-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"dataset-store.d.ts","sourceRoot":"","sources":["../../src/platform/dataset-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,OAAO,EAOH,KAAK,iBAAiB,EACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1F;;;;GAIG;AACH,MAAM,WAAW,KAAK;IAClB;sDACkD;IAClD,WAAW,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG;QAAE,KAAK,IAAI,IAAI,CAAA;KAAE,CAAC;CAC9D;AAED,gEAAgE;AAChE,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACvB;;uEAEmE;IACnE,GAAG,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G,MAAM,IAAI;IA4BxD;;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;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAoBlB;AAQD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACtC,MAAM,EAAE,0BAA0B,EAClC,GAAG,EAAE,UAAU,EACf,KAAK,CAAC,EAAE,KAAK,GACd,oBAAoB,CAEtB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { EastType, EastTypeValue } from '@elaraai/east';
|
|
2
|
+
import { PlatformFunction } from '@elaraai/east/internal';
|
|
3
|
+
import { ExecuteResult, FunctionSignature } from '@elaraai/e3-api-client';
|
|
4
|
+
/** Request shape for {@link FunctionApi.call} — beast2-encoded positional
|
|
5
|
+
* args. Runner/limit overrides are deliberately not exposed (the deployed
|
|
6
|
+
* function's runner is authoritative). */
|
|
7
|
+
export interface FunctionCallArgs {
|
|
8
|
+
args: Uint8Array[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Adapter for the workspace function endpoints. The default wraps
|
|
12
|
+
* `@elaraai/e3-api-client`'s `workspaceFunctionList` /
|
|
13
|
+
* `workspaceFunctionCall`.
|
|
14
|
+
*/
|
|
15
|
+
export interface FunctionApi {
|
|
16
|
+
/** List the workspace's deployed functions with their signatures. */
|
|
17
|
+
list(workspace: string): Promise<FunctionSignature[]>;
|
|
18
|
+
/** Call a function synchronously, returning its terminal ExecuteResult. */
|
|
19
|
+
call(workspace: string, fn: string, req: FunctionCallArgs): Promise<ExecuteResult>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Build the default {@link FunctionApi} that talks to a real e3 server via
|
|
23
|
+
* `@elaraai/e3-api-client`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createDefaultFunctionApi(apiUrl: string, repo: string, getToken: () => string | null): FunctionApi;
|
|
26
|
+
/** A handle's signature, recovered from the instantiated handle type. */
|
|
27
|
+
interface HandleSignature {
|
|
28
|
+
readonly inputs: EastTypeValue[];
|
|
29
|
+
readonly output: EastTypeValue;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Introspect the instantiated handle struct type `H`: the input types come
|
|
33
|
+
* from the `call` field's FunctionType, the output type from the `read`
|
|
34
|
+
* field's `Option(Output)` return. The handle's shape IS the signature —
|
|
35
|
+
* there are no duplicate signature arguments to drift out of sync.
|
|
36
|
+
*/
|
|
37
|
+
export declare function signatureOfHandleType(handleType: EastTypeValue): HandleSignature;
|
|
38
|
+
/** Tracked-channel key. */
|
|
39
|
+
export declare function funcChannelKey(workspace: string, name: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Encapsulates all `Func.bind` runtime state. The module-level
|
|
42
|
+
* {@link defaultFuncRuntime} instance backs the registered platform; tests
|
|
43
|
+
* construct their own for isolation.
|
|
44
|
+
*/
|
|
45
|
+
export declare class FuncRuntime {
|
|
46
|
+
private api;
|
|
47
|
+
private workspace;
|
|
48
|
+
private readonly entries;
|
|
49
|
+
private signatureLists;
|
|
50
|
+
private readonly keySubscribers;
|
|
51
|
+
private readonly keyVersions;
|
|
52
|
+
private trackingContext;
|
|
53
|
+
/** Install the API adapter + workspace — called by the React provider
|
|
54
|
+
* (or a test/showcase harness) before any handle is used. */
|
|
55
|
+
initialize(api: FunctionApi, workspace: string): void;
|
|
56
|
+
/** Tear down the adapter and all call state. */
|
|
57
|
+
clear(): void;
|
|
58
|
+
enableTracking(): Set<string>;
|
|
59
|
+
disableTracking(): string[];
|
|
60
|
+
isTracking(): boolean;
|
|
61
|
+
private track;
|
|
62
|
+
subscribe(key: string, callback: () => void): () => void;
|
|
63
|
+
getKeyVersion(key: string): number;
|
|
64
|
+
private notify;
|
|
65
|
+
private entry;
|
|
66
|
+
/** The deployed signature list for a workspace (fetched once). */
|
|
67
|
+
private signatures;
|
|
68
|
+
/** Validate a declared signature against the deployed list. Returns a
|
|
69
|
+
* FuncError when the name is unknown or the signature disagrees. */
|
|
70
|
+
private validate;
|
|
71
|
+
private launch;
|
|
72
|
+
/** Build the handle value for one `Func.bind` platform evaluation. */
|
|
73
|
+
buildHandle(handleType: EastTypeValue, name: string): Record<string, unknown>;
|
|
74
|
+
/** Build a `Func.bind` PlatformFunction bound to this runtime. Pass
|
|
75
|
+
* `allowed=null` for an unscoped impl; pass a Set of function names
|
|
76
|
+
* for manifest scoping. */
|
|
77
|
+
buildPlatform(allowed: ReadonlySet<string> | null): PlatformFunction;
|
|
78
|
+
}
|
|
79
|
+
/** Process-global runtime backing the `FuncPlatform` export. */
|
|
80
|
+
export declare const defaultFuncRuntime: FuncRuntime;
|
|
81
|
+
/** Install the function API adapter + workspace — called by the React
|
|
82
|
+
* provider on mount (or by a test/showcase harness). */
|
|
83
|
+
export declare function initializeFunctionApi(api: FunctionApi, workspace: string): void;
|
|
84
|
+
/** Tear down the function API adapter and all call state. */
|
|
85
|
+
export declare function clearFunctionApi(): void;
|
|
86
|
+
/** Global, manifest-unscoped `Func.bind` impl. Registered on module load. */
|
|
87
|
+
export declare const FuncPlatform: PlatformFunction[];
|
|
88
|
+
/** Build a manifest-scoped `Func.bind` implementation. */
|
|
89
|
+
export declare function createScopedFuncPlatform(functions: readonly string[]): PlatformFunction[];
|
|
90
|
+
/** One offline function implementation for {@link createInMemoryFunctionApi}. */
|
|
91
|
+
export interface InMemoryFunctionDef {
|
|
92
|
+
/** Function name (what `Func.bind` is bound to). */
|
|
93
|
+
name: string;
|
|
94
|
+
/** Positional parameter types. */
|
|
95
|
+
inputTypes: (EastType | EastTypeValue)[];
|
|
96
|
+
/** Return type. */
|
|
97
|
+
outputType: EastType | EastTypeValue;
|
|
98
|
+
/** The implementation — receives decoded args, returns the result
|
|
99
|
+
* value (or a promise of it). */
|
|
100
|
+
fn: (...args: unknown[]) => unknown;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Build an offline {@link FunctionApi} from local implementations — the
|
|
104
|
+
* showcase/snapshot harnesses' stand-in for a deployed package.
|
|
105
|
+
*/
|
|
106
|
+
export declare function createInMemoryFunctionApi(functions: InMemoryFunctionDef[]): FunctionApi;
|
|
107
|
+
export {};
|
|
108
|
+
//# sourceMappingURL=func-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"func-runtime.d.ts","sourceRoot":"","sources":["../../src/platform/func-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,aAAa,EAOrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,wBAAwB,CAAC;AAE7E,OAAO,EAGH,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACzB,MAAM,wBAAwB,CAAC;AAWhC;;2CAE2C;AAC3C,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,UAAU,EAAE,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB,qEAAqE;IACrE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACtD,2EAA2E;IAC3E,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACtF;AAED;;;GAGG;AACH,wBAAgB,wBA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OAAO,CAAC,MAAM;IAwDd,sEAAsE;IACtE,WAAW,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IA4D7E;;gCAE4B;IAC5B,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,gBAAgB;CAcvE;AAMD,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,aAAoB,CAAC;AAEpD;yDACyD;AACzD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAE/E;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED,6EAA6E;AAC7E,eAAO,MAAM,YAAY,EAAE,gBAAgB,EAA6C,CAAC;AAEzF,0DAA0D;AAC1D,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAEzF;AAQD,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAChC,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,UAAU,EAAE,CAAC,QAAQ,GAAG,aAAa,CAAC,EAAE,CAAC;IACzC,mBAAmB;IACnB,UAAU,EAAE,QAAQ,GAAG,aAAa,CAAC;IACrC;sCACkC;IAClC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,mBAAmB,EAAE,GAAG,WAAW,CA8BvF"}
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
export { ReactiveDatasetCache, createReactiveDatasetCache, createDefaultDatasetApi, realClock, type ReactiveDatasetCacheInterface, type ReactiveDatasetCacheConfig, type DatasetApi, type Clock, datasetCacheKey, datasetPathToString, } from './dataset-store.js';
|
|
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
|
+
export { FuncRuntime, defaultFuncRuntime, FuncPlatform, createScopedFuncPlatform, createDefaultFunctionApi, initializeFunctionApi, clearFunctionApi, funcChannelKey, signatureOfHandleType, createInMemoryFunctionApi, type InMemoryFunctionDef, type FunctionApi, type FunctionCallArgs, } from './func-runtime.js';
|
|
14
15
|
export { E3Provider, useE3Config, useE3ConfigOptional, type E3Config, type E3ProviderProps, } from './e3-config.js';
|
|
15
16
|
export { ReactiveDatasetProvider, type ReactiveDatasetProviderProps, useReactiveDatasetCache, useReactiveDatasetCacheSubscription, useReactiveDatasetKey, usePreloadReactiveDatasets, type ReactiveDatasetToPreload, type PreloadReactiveDatasetsResult, useReactiveDatasetWrite, useReactiveDatasetHas, ReactiveDatasetLoader, type ReactiveDatasetLoaderProps, } from './dataset-hooks.js';
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;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"}
|
|
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,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACxB,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"}
|
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.8",
|
|
4
4
|
"description": "React Query hooks and preview components for the e3 API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -34,18 +34,19 @@
|
|
|
34
34
|
"@tanstack/react-query": "^5.62.0",
|
|
35
35
|
"react": "^19.0.0",
|
|
36
36
|
"react-dom": "^19.0.0",
|
|
37
|
-
"@elaraai/e3-api-client": "1.0.
|
|
38
|
-
"@elaraai/
|
|
39
|
-
"@elaraai/
|
|
40
|
-
"@elaraai/east-ui
|
|
41
|
-
"@elaraai/
|
|
42
|
-
"@elaraai/
|
|
37
|
+
"@elaraai/e3-api-client": "1.0.8",
|
|
38
|
+
"@elaraai/e3-ui": "1.0.8",
|
|
39
|
+
"@elaraai/east": "1.0.8",
|
|
40
|
+
"@elaraai/east-ui": "1.0.8",
|
|
41
|
+
"@elaraai/e3-types": "1.0.8",
|
|
42
|
+
"@elaraai/east-ui-components": "1.0.8"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/react": "^11.14.0",
|
|
46
46
|
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
|
47
47
|
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
|
48
48
|
"@fortawesome/react-fontawesome": "^3.1.1",
|
|
49
|
+
"@tanstack/query-core": "^5.62.0",
|
|
49
50
|
"@tanstack/react-virtual": "^3.11.2",
|
|
50
51
|
"@xyflow/react": "^12.10.1",
|
|
51
52
|
"cytoscape": "^3.30.0",
|
|
@@ -72,13 +73,13 @@
|
|
|
72
73
|
"typescript": "~5.9.2",
|
|
73
74
|
"vite": "^6.0.0",
|
|
74
75
|
"vite-plugin-dts": "^4.3.0",
|
|
75
|
-
"@elaraai/e3
|
|
76
|
-
"@elaraai/e3-
|
|
77
|
-
"@elaraai/e3": "1.0.
|
|
78
|
-
"@elaraai/e3-ui": "1.0.
|
|
79
|
-
"@elaraai/east": "1.0.
|
|
80
|
-
"@elaraai/east-ui": "1.0.
|
|
81
|
-
"@elaraai/east-ui
|
|
76
|
+
"@elaraai/e3": "1.0.8",
|
|
77
|
+
"@elaraai/e3-api-client": "1.0.8",
|
|
78
|
+
"@elaraai/e3-types": "1.0.8",
|
|
79
|
+
"@elaraai/e3-ui": "1.0.8",
|
|
80
|
+
"@elaraai/east": "1.0.8",
|
|
81
|
+
"@elaraai/east-ui-components": "1.0.8",
|
|
82
|
+
"@elaraai/east-ui": "1.0.8"
|
|
82
83
|
},
|
|
83
84
|
"repository": {
|
|
84
85
|
"type": "git",
|