@peripheries/renderer 0.8.1 → 0.9.0
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 +33 -2
- package/dist/catalog.js +2 -2
- package/dist/chunks/{projection-CDMo5g6t.js → projection-DNj8lq4J.js} +3 -3
- package/dist/chunks/projection-DNj8lq4J.js.map +1 -0
- package/dist/chunks/query-BsvcULsk.js +457 -0
- package/dist/chunks/query-BsvcULsk.js.map +1 -0
- package/dist/chunks/references-BawYmQMY.js +131 -0
- package/dist/chunks/references-BawYmQMY.js.map +1 -0
- package/dist/chunks/{structure-Bp7xbPck.js → structure-BdsfUYHS.js} +137 -110
- package/dist/chunks/structure-BdsfUYHS.js.map +1 -0
- package/dist/chunks/{validate-Cz2tUUdm.js → validate-Bji5gGV1.js} +163 -10
- package/dist/chunks/validate-Bji5gGV1.js.map +1 -0
- package/dist/core.js +306 -48
- package/dist/core.js.map +1 -1
- package/dist/react.js +26 -17
- package/dist/react.js.map +1 -1
- package/dist/testing.js +11 -0
- package/dist/testing.js.map +1 -1
- package/dist/types/core/actions.d.ts +33 -1
- package/dist/types/core/cell-props.d.ts +2 -2
- package/dist/types/core/data-context.d.ts +7 -5
- package/dist/types/core/diagnostics.d.ts +59 -3
- package/dist/types/core/graph.d.ts +6 -2
- package/dist/types/core/index.d.ts +7 -4
- package/dist/types/core/load-page.d.ts +31 -7
- package/dist/types/core/query.d.ts +93 -0
- package/dist/types/core/references.d.ts +27 -5
- package/dist/types/core/selected.d.ts +9 -0
- package/dist/types/react/cell-view.d.ts +5 -0
- package/dist/types/react/page-renderer.d.ts +10 -1
- package/dist/types/testing/golden.d.ts +5 -0
- package/package.json +4 -3
- package/dist/chunks/projection-CDMo5g6t.js.map +0 -1
- package/dist/chunks/structure-Bp7xbPck.js.map +0 -1
- package/dist/chunks/validate-Cz2tUUdm.js.map +0 -1
package/dist/core.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { C as resolveCell, S as normalizeCell, _ as projectCellData, a as projectSelections, b as STORE_FIELDS, c as pageScopeKey, d as resolveComponent, f as cellAttributes, g as assembleCellProps, h as pageContainerStyle, i as projectLive, l as projectScopeKey, n as attachViewStateSetters, o as projectViewState, p as cellPlacementStyle, r as collectScopeIds, s as shallowEqualBundle, t as attachSelectionSetters, u as resolveScopeId, v as CONTENT_FIELDS, w as rootCells, x as hasRef, y as HYDRATED_CELL_FIELDS } from "./chunks/projection-
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
1
|
+
import { C as resolveCell, S as normalizeCell, _ as projectCellData, a as projectSelections, b as STORE_FIELDS, c as pageScopeKey, d as resolveComponent, f as cellAttributes, g as assembleCellProps, h as pageContainerStyle, i as projectLive, l as projectScopeKey, n as attachViewStateSetters, o as projectViewState, p as cellPlacementStyle, r as collectScopeIds, s as shallowEqualBundle, t as attachSelectionSetters, u as resolveScopeId, v as CONTENT_FIELDS, w as rootCells, x as hasRef, y as HYDRATED_CELL_FIELDS } from "./chunks/projection-DNj8lq4J.js";
|
|
2
|
+
import { a as isEach, c as resolveReferences, i as cellResolutionContext, l as settled, n as EACH_DEFAULT_AS, o as pageContext, r as cellContext, s as passesConditions, t as EACH } from "./chunks/references-BawYmQMY.js";
|
|
3
|
+
import { _ as stateValue, a as nearestNames, b as walkRequest, c as selectionIssues, d as needsWalk, f as readField, g as stateNames, h as resolveWalkStart, i as eachFormProblems, l as RESERVED_LABELS, m as referencedLabels, n as STORE_SCOPES, o as validateCell, p as readWalk, r as WALK_DIRECTIONS, s as validatePage, t as RESPONSIVE_BUCKETS, u as mergeStates, v as systemsFromProcess, y as walkKey } from "./chunks/validate-Bji5gGV1.js";
|
|
4
|
+
import { a as orderByVariable, c as resolveDescriptorVariables, d as validateDescriptor, f as variableLabels, i as descriptorShape, l as selectionShape, n as UnsafeDocumentError, o as prepareDocument, p as variableReferences, r as VARIABLE_NAMESPACES, s as queryKey, t as RENDER_FUNCTIONS, u as shapeAt } from "./chunks/query-BsvcULsk.js";
|
|
5
|
+
import { S as resolveAction, _ as actionProblems, a as deriveSectionReferences, b as normalizeActionDeclaration, c as nodePrintStyle, d as referencesFor, f as sectionAnchor, g as actionBindingKey, h as usesStructureLayout, i as deriveSectionNumbering, l as normalizeStructure, m as structureIssues, n as SECTION_KINDS, r as deriveElementReferences, s as mergeSectionReferences, t as PAGE_DOCUMENT, u as numberingFor, v as actionReferences, x as projectCellActions, y as declaredActions } from "./chunks/structure-BdsfUYHS.js";
|
|
4
6
|
import { a as projectModule, i as loadBundles, n as isComponentExport, o as runtimeReady, r as loadBundle, t as _clearBundleCache } from "./chunks/load-BMzwz_H6.js";
|
|
5
7
|
import { a as normalizeRef, i as bundleScope, n as MAIN, o as refKey, r as PUBLIC, t as CORE_SPECIFIER } from "./chunks/refs-BLUokra5.js";
|
|
6
8
|
import { n as pageBundles, t as pageBundleRefs } from "./chunks/page-bundles-Bpea6ryV.js";
|
|
7
9
|
import { t as createStackStore } from "./chunks/create-store-CglsI7tw.js";
|
|
8
|
-
import { SECTION_KINDS as SECTION_KINDS$1, STATE_ROLES, STATE_TIERS, WALK_DEFAULTS } from "@peripheries/runtime";
|
|
10
|
+
import { ACTION_KINDS, QUERY_DESCRIPTOR_KEY, SECTION_KINDS as SECTION_KINDS$1, STATE_ROLES, STATE_TIERS, WALK_DEFAULTS, isDescriptorBinding, isLiveQueryState } from "@peripheries/runtime";
|
|
9
11
|
//#region packages/renderer/src/core/data-context.ts
|
|
10
12
|
function resolveDeclarations(queries, systems, diagnostics = [], cellId) {
|
|
11
13
|
const out = {};
|
|
@@ -43,6 +45,11 @@ function resolveDeclarations(queries, systems, diagnostics = [], cellId) {
|
|
|
43
45
|
}
|
|
44
46
|
return out;
|
|
45
47
|
}
|
|
48
|
+
function collectDescriptors(queries) {
|
|
49
|
+
const out = {};
|
|
50
|
+
for (const [label, raw] of Object.entries(queries ?? {})) if (isDescriptorBinding(raw)) out[label] = raw.descriptor;
|
|
51
|
+
return out;
|
|
52
|
+
}
|
|
46
53
|
var collectDeclarations = (page, systems, diagnostics = []) => resolveDeclarations(page.content?.data?.queries, systems, diagnostics);
|
|
47
54
|
function collectStatic(page) {
|
|
48
55
|
return { ...page.content?.data?.static ?? {} };
|
|
@@ -75,7 +82,7 @@ async function resolveSystems(source, page) {
|
|
|
75
82
|
async function resolveDataSystem(source, page) {
|
|
76
83
|
return (await resolveSystems(source, page)).eng_data ?? null;
|
|
77
84
|
}
|
|
78
|
-
async function loadPageData(page, source) {
|
|
85
|
+
async function loadPageData(page, source, scope = {}) {
|
|
79
86
|
const diagnostics = validatePage(page);
|
|
80
87
|
const systems = await resolveSystems(source, page);
|
|
81
88
|
const engDataSystemId = systems.eng_data ?? null;
|
|
@@ -105,8 +112,18 @@ async function loadPageData(page, source) {
|
|
|
105
112
|
});
|
|
106
113
|
const unresolved = cells.filter((c) => c.source === "pending").map((c) => c.id);
|
|
107
114
|
const declared = collectDeclarations(page, systems, diagnostics);
|
|
108
|
-
const explicit = new Set(Object.keys(declared));
|
|
109
115
|
const cellDecls = new Map(cells.filter((c) => c.component).map((c) => [c.id, resolveDeclarations(c.data?.queries, systems, diagnostics, c.id)]));
|
|
116
|
+
const pageQueries = collectDescriptors(page.content?.data?.queries);
|
|
117
|
+
const cellQueries = new Map(cells.filter((c) => c.component).map((c) => [c.id, collectDescriptors(c.data?.queries)]));
|
|
118
|
+
for (const cell of cells) {
|
|
119
|
+
if (cell.source !== "node") continue;
|
|
120
|
+
for (const [label, d] of Object.entries(cellQueries.get(cell.id) ?? {})) diagnostics.push(...validateDescriptor(d, `cell ${cell.id}.data.queries.${label}.descriptor`).map((x) => ({
|
|
121
|
+
...x,
|
|
122
|
+
cellId: cell.id,
|
|
123
|
+
label
|
|
124
|
+
})));
|
|
125
|
+
}
|
|
126
|
+
const explicit = new Set([...Object.keys(declared), ...Object.keys(pageQueries)]);
|
|
110
127
|
const walking = [];
|
|
111
128
|
for (const cell of cells) {
|
|
112
129
|
if (!cell.traversal || !cell.component) continue;
|
|
@@ -144,9 +161,105 @@ async function loadPageData(page, source) {
|
|
|
144
161
|
}
|
|
145
162
|
for (const r of d.reads) bySystem.set(r.systemId, (bySystem.get(r.systemId) ?? new Set()).add(d.graph_node_id));
|
|
146
163
|
}
|
|
164
|
+
const runs = new Map();
|
|
165
|
+
const runQuery = (d, ctx, at) => {
|
|
166
|
+
if (validateDescriptor(d).some((x) => x.severity === "error")) return Promise.resolve({
|
|
167
|
+
data: void 0,
|
|
168
|
+
isLoading: false,
|
|
169
|
+
error: new Error(`the descriptor of "${at.label}" isn't valid`)
|
|
170
|
+
});
|
|
171
|
+
const { variables, unresolved: missing, pending } = resolveDescriptorVariables(d, ctx);
|
|
172
|
+
if (pending.length) return Promise.resolve({
|
|
173
|
+
data: void 0,
|
|
174
|
+
isLoading: true,
|
|
175
|
+
error: null
|
|
176
|
+
});
|
|
177
|
+
if (missing.length) {
|
|
178
|
+
diagnostics.push({
|
|
179
|
+
severity: "warning",
|
|
180
|
+
code: "QUERY_UNRESOLVED",
|
|
181
|
+
...at,
|
|
182
|
+
message: `"${at.label}" doesn't run: ${missing.join(", ")} resolved to nothing`
|
|
183
|
+
});
|
|
184
|
+
return Promise.resolve({
|
|
185
|
+
data: void 0,
|
|
186
|
+
isLoading: false,
|
|
187
|
+
error: new Error(`QUERY_UNRESOLVED: ${missing.join(", ")}`)
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
const key = queryKey(d, variables);
|
|
191
|
+
if (!runs.has(key)) runs.set(key, source.query(d, variables).then((data) => settled(data), (e) => ({
|
|
192
|
+
data: void 0,
|
|
193
|
+
isLoading: false,
|
|
194
|
+
error: e
|
|
195
|
+
})));
|
|
196
|
+
return runs.get(key).then((entry) => {
|
|
197
|
+
if (entry.error) diagnostics.push({
|
|
198
|
+
severity: "error",
|
|
199
|
+
code: "QUERY_FAILED",
|
|
200
|
+
...at,
|
|
201
|
+
message: `"${at.label}" failed: ${entry.error.message}`
|
|
202
|
+
});
|
|
203
|
+
return entry;
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
const base = pageContext(scope.context, page);
|
|
207
|
+
const who = (ctx) => ({
|
|
208
|
+
viewer: scope.viewer,
|
|
209
|
+
context: ctx
|
|
210
|
+
});
|
|
211
|
+
const variableScope = (data, queryLabels) => {
|
|
212
|
+
const out = {};
|
|
213
|
+
for (const [k, v] of Object.entries(data)) if (!queryLabels.has(k)) out[k] = v;
|
|
214
|
+
return out;
|
|
215
|
+
};
|
|
216
|
+
const params = scope.params ?? {};
|
|
217
|
+
const readsQuery = (d, queryLabels, at) => {
|
|
218
|
+
const read = variableLabels(d).filter((l) => queryLabels.has(l));
|
|
219
|
+
if (read.length) diagnostics.push({
|
|
220
|
+
severity: "error",
|
|
221
|
+
code: "QUERY_READS_QUERY",
|
|
222
|
+
...at,
|
|
223
|
+
message: `"${at.label}"'s variables read ${read.map((l) => `@${l}`).join(", ")}, another query's label; a query reads node bindings, walks and statics only`
|
|
224
|
+
});
|
|
225
|
+
return read.length > 0;
|
|
226
|
+
};
|
|
147
227
|
const states = new Map();
|
|
148
228
|
const walks = new Map();
|
|
149
229
|
let records = {};
|
|
230
|
+
const pageEntries = {};
|
|
231
|
+
const cellEntries = new Map();
|
|
232
|
+
const early = [];
|
|
233
|
+
const pageQueryLabels = new Set(Object.keys(pageQueries));
|
|
234
|
+
for (const [label, d] of Object.entries(pageQueries)) {
|
|
235
|
+
if (variableLabels(d).length) continue;
|
|
236
|
+
const ctx = {
|
|
237
|
+
data: {
|
|
238
|
+
params: settled(params),
|
|
239
|
+
baseProps: settled(scope.baseProps),
|
|
240
|
+
...scope.viewer !== void 0 ? { viewer: settled(scope.viewer) } : {},
|
|
241
|
+
context: settled(base)
|
|
242
|
+
},
|
|
243
|
+
params
|
|
244
|
+
};
|
|
245
|
+
early.push(runQuery(d, ctx, { label }).then((e) => void (pageEntries[label] = e)));
|
|
246
|
+
}
|
|
247
|
+
for (const cell of cells) for (const [label, d] of Object.entries(cellQueries.get(cell.id) ?? {})) {
|
|
248
|
+
if (variableLabels(d).length) continue;
|
|
249
|
+
const ctx = {
|
|
250
|
+
data: {
|
|
251
|
+
params: settled(params),
|
|
252
|
+
baseProps: settled(scope.baseProps),
|
|
253
|
+
...scope.viewer !== void 0 ? { viewer: settled(scope.viewer) } : {},
|
|
254
|
+
context: settled(cellContext(base, cell))
|
|
255
|
+
},
|
|
256
|
+
params
|
|
257
|
+
};
|
|
258
|
+
early.push(runQuery(d, ctx, {
|
|
259
|
+
label,
|
|
260
|
+
cellId: cell.id
|
|
261
|
+
}).then((e) => void ((cellEntries.get(cell.id) ?? cellEntries.set(cell.id, {}).get(cell.id))[label] = e)));
|
|
262
|
+
}
|
|
150
263
|
await Promise.all([
|
|
151
264
|
...[...bySystem].map(async ([systemId, ids]) => {
|
|
152
265
|
const found = await source.latestStates(systemId, [...ids]);
|
|
@@ -165,8 +278,38 @@ async function loadPageData(page, source) {
|
|
|
165
278
|
}),
|
|
166
279
|
recordIds.size ? (async () => {
|
|
167
280
|
records = recordsByName(await source.nodeRecords([...recordIds], [...recordSystems]), allDecls);
|
|
168
|
-
})() : null
|
|
281
|
+
})() : null,
|
|
282
|
+
...early
|
|
169
283
|
]);
|
|
284
|
+
const liveDescriptor = (d) => {
|
|
285
|
+
if (d.as === "record") return null;
|
|
286
|
+
const merged = mergeStates(d.reads.map((r) => states.get(`${r.systemId}/${d.graph_node_id}`)));
|
|
287
|
+
return isLiveQueryState(merged) ? merged[QUERY_DESCRIPTOR_KEY] : null;
|
|
288
|
+
};
|
|
289
|
+
const liveNodes = [];
|
|
290
|
+
for (const [label, d] of Object.entries(declared)) {
|
|
291
|
+
const live = liveDescriptor(d);
|
|
292
|
+
if (live) liveNodes.push({
|
|
293
|
+
label,
|
|
294
|
+
descriptor: live
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
for (const [cellId, decls] of cellDecls) for (const [label, d] of Object.entries(decls)) {
|
|
298
|
+
const live = liveDescriptor(d);
|
|
299
|
+
if (live) liveNodes.push({
|
|
300
|
+
label,
|
|
301
|
+
descriptor: live,
|
|
302
|
+
cellId
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
for (const n of liveNodes) {
|
|
306
|
+
diagnostics.push(...validateDescriptor(n.descriptor, `node ${n.label}.${QUERY_DESCRIPTOR_KEY}`).map((x) => ({
|
|
307
|
+
...x,
|
|
308
|
+
label: n.label,
|
|
309
|
+
...n.cellId ? { cellId: n.cellId } : {}
|
|
310
|
+
})));
|
|
311
|
+
pageQueryLabels.add(n.label);
|
|
312
|
+
}
|
|
170
313
|
const cellData = {};
|
|
171
314
|
const entry = (id) => cellData[id] ??= {
|
|
172
315
|
static: {},
|
|
@@ -205,27 +348,110 @@ async function loadPageData(page, source) {
|
|
|
205
348
|
labels
|
|
206
349
|
};
|
|
207
350
|
}
|
|
351
|
+
const data = buildDataContext({
|
|
352
|
+
static: collectStatic(page),
|
|
353
|
+
declared,
|
|
354
|
+
states,
|
|
355
|
+
records
|
|
356
|
+
});
|
|
357
|
+
const pageVars = {
|
|
358
|
+
data: {
|
|
359
|
+
...variableScope(data, pageQueryLabels),
|
|
360
|
+
params: settled(params),
|
|
361
|
+
baseProps: settled(scope.baseProps),
|
|
362
|
+
...scope.viewer !== void 0 ? { viewer: settled(scope.viewer) } : {},
|
|
363
|
+
context: settled(base)
|
|
364
|
+
},
|
|
365
|
+
params
|
|
366
|
+
};
|
|
367
|
+
const late = [];
|
|
368
|
+
const pageLate = [...Object.entries(pageQueries).filter(([, d]) => variableLabels(d).length).map(([label, descriptor]) => ({
|
|
369
|
+
label,
|
|
370
|
+
descriptor
|
|
371
|
+
})), ...liveNodes.filter((n) => !n.cellId)];
|
|
372
|
+
for (const { label, descriptor } of pageLate) {
|
|
373
|
+
if (readsQuery(descriptor, pageQueryLabels, { label })) {
|
|
374
|
+
pageEntries[label] = {
|
|
375
|
+
data: void 0,
|
|
376
|
+
isLoading: false,
|
|
377
|
+
error: new Error("QUERY_READS_QUERY")
|
|
378
|
+
};
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
late.push(runQuery(descriptor, pageVars, { label }).then((e) => void (pageEntries[label] = e)));
|
|
382
|
+
}
|
|
383
|
+
for (const cell of cells) {
|
|
384
|
+
const own = cellQueries.get(cell.id) ?? {};
|
|
385
|
+
const cellLate = [...Object.entries(own).filter(([, d]) => variableLabels(d).length).map(([label, descriptor]) => ({
|
|
386
|
+
label,
|
|
387
|
+
descriptor
|
|
388
|
+
})), ...liveNodes.filter((n) => n.cellId === cell.id)];
|
|
389
|
+
if (!cellLate.length) continue;
|
|
390
|
+
const queryLabels = new Set([
|
|
391
|
+
...pageQueryLabels,
|
|
392
|
+
...Object.keys(own),
|
|
393
|
+
...cellLate.map((n) => n.label)
|
|
394
|
+
]);
|
|
395
|
+
const mine = cellData[cell.id];
|
|
396
|
+
const ctx = cellResolutionContext(cell, {
|
|
397
|
+
data: variableScope(data, queryLabels),
|
|
398
|
+
params
|
|
399
|
+
}, {
|
|
400
|
+
static: mine?.static,
|
|
401
|
+
declared: mine && variableScope(mine.declared, queryLabels),
|
|
402
|
+
walk: mine?.walk && {
|
|
403
|
+
...mine.walk,
|
|
404
|
+
labels: variableScope(mine.walk.labels, queryLabels)
|
|
405
|
+
},
|
|
406
|
+
pageDeclared: explicit
|
|
407
|
+
}, scope.baseProps, who(cellContext(base, cell)));
|
|
408
|
+
for (const { label, descriptor } of cellLate) {
|
|
409
|
+
const at = {
|
|
410
|
+
label,
|
|
411
|
+
cellId: cell.id
|
|
412
|
+
};
|
|
413
|
+
const target = cellEntries.get(cell.id) ?? cellEntries.set(cell.id, {}).get(cell.id);
|
|
414
|
+
if (readsQuery(descriptor, queryLabels, at)) {
|
|
415
|
+
target[label] = {
|
|
416
|
+
data: void 0,
|
|
417
|
+
isLoading: false,
|
|
418
|
+
error: new Error("QUERY_READS_QUERY")
|
|
419
|
+
};
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
late.push(runQuery(descriptor, ctx, at).then((e) => void (target[label] = e)));
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
await Promise.all(late);
|
|
426
|
+
Object.assign(data, pageEntries);
|
|
427
|
+
for (const [cellId, found] of cellEntries) Object.assign(entry(cellId).declared, found);
|
|
428
|
+
for (const n of liveNodes) for (const cell of cells) {
|
|
429
|
+
if (n.cellId ? cell.id !== n.cellId : !cell.component || cell.data?.queries?.[n.label]) continue;
|
|
430
|
+
diagnostics.push(...selectionIssues(cell, { [n.label]: n.descriptor }, `cell ${cell.id}`));
|
|
431
|
+
}
|
|
432
|
+
const graphNodeIds = new Set([
|
|
433
|
+
page.graph_node_id,
|
|
434
|
+
...cells.map((c) => c.ref?.graph_node_id ?? c.graph_node_id),
|
|
435
|
+
...walking.map((w) => w.request.start.graphNodeId),
|
|
436
|
+
...allDecls.flatMap((d) => Object.values(d).map((x) => x.graph_node_id))
|
|
437
|
+
].filter((id) => typeof id === "string" && id.length > 0));
|
|
208
438
|
return {
|
|
209
439
|
page,
|
|
210
440
|
cells,
|
|
211
441
|
unresolved,
|
|
212
|
-
data
|
|
213
|
-
static: collectStatic(page),
|
|
214
|
-
declared,
|
|
215
|
-
states,
|
|
216
|
-
records
|
|
217
|
-
}),
|
|
442
|
+
data,
|
|
218
443
|
declared: [...explicit],
|
|
219
444
|
cellData,
|
|
220
445
|
systems,
|
|
221
446
|
engDataSystemId,
|
|
447
|
+
graphNodeIds: [...graphNodeIds].sort(),
|
|
222
448
|
diagnostics: dedupe(diagnostics)
|
|
223
449
|
};
|
|
224
450
|
}
|
|
225
451
|
function dedupe(list) {
|
|
226
452
|
const seen = new Set();
|
|
227
453
|
return list.filter((d) => {
|
|
228
|
-
const key = `${d.code}|${d.cellId ?? ""}|${d.label ?? ""}`;
|
|
454
|
+
const key = `${d.code}|${d.cellId ?? ""}|${d.label ?? ""}${d.code === "REF_NOT_SELECTED" ? `|${d.path}` : ""}`;
|
|
229
455
|
if (seen.has(key)) return false;
|
|
230
456
|
seen.add(key);
|
|
231
457
|
return true;
|
|
@@ -319,11 +545,11 @@ var DIAGNOSTICS = {
|
|
|
319
545
|
},
|
|
320
546
|
BINDING_INVALID: {
|
|
321
547
|
meaning: "A `data.queries` entry is not a binding.",
|
|
322
|
-
fix: "Declare `{ graph_node_id, state?, as? }`, with `state` a system name and `as` value or record."
|
|
548
|
+
fix: "Declare `{ graph_node_id, state?, as? }`, with `state` a system name and `as` value or record, or `{ descriptor }` for a query."
|
|
323
549
|
},
|
|
324
550
|
UNSUPPORTED_REGISTRY_BINDING: {
|
|
325
|
-
meaning: "A binding names a registry query the host
|
|
326
|
-
fix: "
|
|
551
|
+
meaning: "A binding names a registry query (`{ registry: \"x.y\" }`) from the retired host contract.",
|
|
552
|
+
fix: "Copy the matching recipe’s descriptor into `{ descriptor }` (the component’s pattern pack has it), or bind the graph node that produces the data. docs/plan/host-contract-verdicts.md maps every id."
|
|
327
553
|
},
|
|
328
554
|
STATE_UNKNOWN_NAME: {
|
|
329
555
|
meaning: "A state name is not one of the twelve systems.",
|
|
@@ -333,10 +559,66 @@ var DIAGNOSTICS = {
|
|
|
333
559
|
meaning: "The page’s process has no system of that name.",
|
|
334
560
|
fix: "Read a system the process has, usually `eng_data`."
|
|
335
561
|
},
|
|
562
|
+
LABEL_RESERVED: {
|
|
563
|
+
meaning: "A declaration takes a reserved label name.",
|
|
564
|
+
fix: "Rename the label: `_traversal`, `params`, `baseProps`, `viewer`, `context`, `input` and `scope` are the host’s."
|
|
565
|
+
},
|
|
566
|
+
DESCRIPTOR_INVALID: {
|
|
567
|
+
meaning: "A query descriptor isn’t version 1’s shape.",
|
|
568
|
+
fix: "Write `{ kind: \"graphql\", version: 1, document, variables?, result?: { path?, flatten_connections? }, order_by?: [{ field, direction?, nulls? }] }`, with nothing else."
|
|
569
|
+
},
|
|
570
|
+
DESCRIPTOR_DOCUMENT_INVALID: {
|
|
571
|
+
meaning: "The document isn’t one query operation that reads only tables, views and the render functions.",
|
|
572
|
+
fix: "Write one `query`, whose root fields are `<table>Collection`, `<table>ByPk`, `node` or a render function such as `walk_graph`; no mutations, RPCs or introspection."
|
|
573
|
+
},
|
|
574
|
+
DESCRIPTOR_VARIABLE_MISSING: {
|
|
575
|
+
meaning: "The document requires a variable that `variables` doesn’t give.",
|
|
576
|
+
fix: "Give it in `variables`, as a literal or a reference (`@params.clientId`, `@viewer.userId`, `@budget.graph_node_id`); `$orderBy` comes from `order_by`."
|
|
577
|
+
},
|
|
578
|
+
DESCRIPTOR_VARIABLE_UNDECLARED: {
|
|
579
|
+
meaning: "`variables` gives a value the document never declares, so it isn’t used.",
|
|
580
|
+
fix: "Declare it in the operation (`query Q($name: Type)`), or remove it."
|
|
581
|
+
},
|
|
582
|
+
DESCRIPTOR_REFERENCE_INVALID: {
|
|
583
|
+
meaning: "A variable’s reference is malformed, or reads something variables can’t.",
|
|
584
|
+
fix: "Write a whole `@label.path`, `@params.*`, `@baseProps.*`, `@viewer.*` or `@context.*`; no `@input`, and no `@each` (select the list you need in the query)."
|
|
585
|
+
},
|
|
586
|
+
DESCRIPTOR_ORDER_BY_UNUSED: {
|
|
587
|
+
meaning: "`order_by` is set, but the document declares no `$orderBy`, so it is ignored.",
|
|
588
|
+
fix: "Declare `$orderBy: [<table>OrderBy!]` and pass `orderBy: $orderBy`, or remove `order_by`."
|
|
589
|
+
},
|
|
590
|
+
DESCRIPTOR_RESULT_PATH: {
|
|
591
|
+
meaning: "`result.path` names a part of the result the document doesn’t select.",
|
|
592
|
+
fix: "Point it at a selected field (its alias, if it has one), e.g. `clientCollection`."
|
|
593
|
+
},
|
|
594
|
+
REF_NOT_SELECTED: {
|
|
595
|
+
meaning: "A cell reads a path from a query’s label that the query doesn’t select.",
|
|
596
|
+
fix: "Select the field in the query (an alias renames it), or read a path it selects. Connections are lists of their nodes unless `flatten_connections` is false."
|
|
597
|
+
},
|
|
598
|
+
QUERY_READS_QUERY: {
|
|
599
|
+
meaning: "A query’s variables read another query’s label.",
|
|
600
|
+
fix: "Read the id from a node binding, a walk or a static value, or select what you need in one query: a query reads labels one step deep."
|
|
601
|
+
},
|
|
602
|
+
QUERY_UNRESOLVED: {
|
|
603
|
+
meaning: "A query didn’t run: a variable’s reference resolved to nothing.",
|
|
604
|
+
fix: "Check the label or parameter the variable reads exists for this viewer; the rest of the page renders."
|
|
605
|
+
},
|
|
606
|
+
QUERY_FAILED: {
|
|
607
|
+
meaning: "A query failed to run.",
|
|
608
|
+
fix: "The message gives the database’s reason; check the document against the schema with a dry run as a real viewer."
|
|
609
|
+
},
|
|
336
610
|
BINDING_DUPLICATE_KEY: {
|
|
337
611
|
meaning: "A walk reached several nodes with the same `binding_key`, so the label binds nothing.",
|
|
338
612
|
fix: "Declare the label on the page or cell with the node you mean, or narrow the walk."
|
|
339
613
|
},
|
|
614
|
+
ACTION_INVALID: {
|
|
615
|
+
meaning: "An action declaration is malformed: an unknown action, a field it needs missing, a field it doesn’t take, or a bad reference.",
|
|
616
|
+
fix: "Declare `{ \"action\": \"create\" | \"edit\" | \"append\" | \"move\" | \"link\" | \"unlink\" | \"archive\", … }` with that action’s fields; read what the component passes as `@input.*`."
|
|
617
|
+
},
|
|
618
|
+
ACTION_REGISTRY: {
|
|
619
|
+
meaning: "An action names a registry mutation (`\"node.create\"`, `{ registry, entityKey }`), the PWA’s form.",
|
|
620
|
+
fix: "Declare it as `{ \"action\": …, … }`: `node.create` → `create`, `node.editContent` → `edit`, `state.recordPatch` → `append`, `node.reorder` → `move`."
|
|
621
|
+
},
|
|
340
622
|
WALK_EDGE_TYPES_REQUIRED: {
|
|
341
623
|
meaning: "A traversal has no `edgeTypes`.",
|
|
342
624
|
fix: "List the edge types the walk follows, e.g. `[\"data_flow\"]`."
|
|
@@ -446,9 +728,14 @@ These are the host's rules for every page. Components, kits and patterns come fr
|
|
|
446
728
|
- A list in its own shape fills a list prop through a projection: \`{ "@each": "@label.path", "as": "item", "map": { … } }\`. \`map\` is what each element becomes, reading it as \`@item.…\`. Bind a list this way, never item by item (\`@label.list.0.value\`), so a longer list or another order stays right.
|
|
447
729
|
- Reserved labels: ${list(RESERVED_LABELS)}.
|
|
448
730
|
- Declare a label in \`data.queries\` on the page or a cell: \`{ graph_node_id, state?, as? }\`. \`state\` names systems \`<tier>_<role>\` (tiers ${list(STATE_TIERS)}; roles ${list(STATE_ROLES)}; default \`eng_data\`). \`as: "record"\` binds the whole node.
|
|
731
|
+
- A label can hold a query run as the viewer: \`{ descriptor: { kind: "graphql", version: 1, document, variables?, result?, order_by? } }\`, or a live \`query_data\` node bound by \`graph_node_id\`. The query shapes its own result (aliases, \`filter\`, \`orderBy\`, \`result.path\`); an unselected path is \`REF_NOT_SELECTED\`. Its variables read \`@params\`, \`@viewer\`, \`@context\` or a node binding's, walk's or static's label, never another query's.
|
|
732
|
+
- \`@viewer.*\` and \`@context.*\` work in props too.
|
|
449
733
|
- Precedence, lowest first: the page's static values, the cell's static values, the cell's walk, the page's declarations, the cell's declarations. Explicit beats discovered.
|
|
450
734
|
- A walk: \`traversal: { edgeTypes, direction?, nodeTypes?, maxDepth?, maxNodes?, include_state? }\`. \`edgeTypes\` is required; \`direction\` is ${list(WALK_DIRECTIONS)} (default \`${WALK_DEFAULTS.direction}\`); \`maxDepth\` ${WALK_DEFAULTS.maxDepth}; \`maxNodes\` ${WALK_DEFAULTS.maxNodes}, at most ${WALK_DEFAULTS.maxNodesCeiling}. Its nodes' \`binding_key\`s become labels for that cell only, and a key two nodes share binds nothing.
|
|
451
735
|
|
|
736
|
+
## Actions
|
|
737
|
+
- \`actions\`: \`{ "<name>": { "action": …, …fields } }\`, the action one of ${list(ACTION_KINDS)}, its fields in the props grammar with \`@input.*\` for what the component passes, which changes nothing else. Pass the version seen as \`expected\` (a stale write is \`CONFLICT\`). A call returns a \`WriteResult\` and never throws.
|
|
738
|
+
|
|
452
739
|
## Store
|
|
453
740
|
- \`selections\` and \`viewState\` declare a channel (or key) with \`scope\` ${list(STORE_SCOPES)}; \`live\` declares a channel. Cells that share a channel share its value.
|
|
454
741
|
|
|
@@ -490,40 +777,11 @@ function pageRuntimeFromValues(page, { values = {}, traversal } = {}) {
|
|
|
490
777
|
cellData,
|
|
491
778
|
systems: {},
|
|
492
779
|
engDataSystemId: null,
|
|
780
|
+
graphNodeIds: [],
|
|
493
781
|
diagnostics: validatePage(page)
|
|
494
782
|
};
|
|
495
783
|
}
|
|
496
784
|
//#endregion
|
|
497
|
-
//#region packages/renderer/src/core/actions.ts
|
|
498
|
-
var actionBindingKey = (registry, entityKey) => entityKey ? `${registry}#${entityKey}` : registry;
|
|
499
|
-
function normalizeActionDeclaration(decl) {
|
|
500
|
-
if (typeof decl === "string") return decl.trim() ? {
|
|
501
|
-
registry: decl.trim(),
|
|
502
|
-
bindingKey: decl.trim()
|
|
503
|
-
} : null;
|
|
504
|
-
if (!decl || typeof decl !== "object") return null;
|
|
505
|
-
const d = decl;
|
|
506
|
-
const registry = typeof d.registry === "string" ? d.registry.trim() : "";
|
|
507
|
-
if (!registry) return null;
|
|
508
|
-
const entityKey = typeof d.entityKey === "string" && d.entityKey.trim() ? d.entityKey.trim() : void 0;
|
|
509
|
-
return {
|
|
510
|
-
registry,
|
|
511
|
-
...entityKey ? { entityKey } : {},
|
|
512
|
-
bindingKey: actionBindingKey(registry, entityKey)
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
function projectCellActions(declarations, pageActions) {
|
|
516
|
-
if (!declarations || !pageActions) return void 0;
|
|
517
|
-
const out = {};
|
|
518
|
-
for (const [name, raw] of Object.entries(declarations)) {
|
|
519
|
-
const decl = normalizeActionDeclaration(raw);
|
|
520
|
-
if (!decl) continue;
|
|
521
|
-
const fn = pageActions[decl.bindingKey] ?? pageActions[decl.registry] ?? pageActions[name];
|
|
522
|
-
if (fn) out[name] = fn;
|
|
523
|
-
}
|
|
524
|
-
return Object.keys(out).length ? out : void 0;
|
|
525
|
-
}
|
|
526
|
-
//#endregion
|
|
527
785
|
//#region packages/renderer/src/core/store/persistence.ts
|
|
528
786
|
var KEY_PREFIX = "stack.store.";
|
|
529
787
|
function storageFor(mode) {
|
|
@@ -557,6 +815,6 @@ function clearScope(scope, mode) {
|
|
|
557
815
|
} catch {}
|
|
558
816
|
}
|
|
559
817
|
//#endregion
|
|
560
|
-
export { CONTENT_FIELDS, CORE_SPECIFIER, DIAGNOSTICS, EACH, EACH_DEFAULT_AS, HYDRATED_CELL_FIELDS, LAYOUT_TYPES, MAIN, PAGE_DOCUMENT, PAGE_RULES, PUBLIC, RESERVED_LABELS, RESPONSIVE_BUCKETS, SECTION_KINDS, STORE_FIELDS, STORE_SCOPES, WALK_DIRECTIONS, _clearBundleCache, actionBindingKey, assembleCellProps, attachSelectionSetters, attachViewStateSetters, buildDataContext, bundleScope, cellAttributes, cellPlacementStyle, cellResolutionContext, clearScope, collectDeclarations, collectScopeIds, collectStatic, createStackStore, deriveElementReferences, deriveSectionNumbering, deriveSectionReferences, eachFormProblems, hasRef, isComponentExport, isEach, loadBundle, loadBundles, loadPageData, loadScope, mergeSectionReferences, mergeStates, nearestNames, needsWalk, nodePrintStyle, normalizeActionDeclaration, normalizeCell, normalizeRef, normalizeStructure, numberingFor, pageBundleRefs, pageBundles, pageContainerStyle, pageRuntimeFromValues, pageScopeKey, passesConditions, projectCellActions, projectCellData, projectLive, projectModule, projectScopeKey, projectSelections, projectViewState, readField, readWalk, refKey, referencedLabels, referencesFor, resolveCell, resolveComponent, resolveDataSystem, resolveDeclarations, resolveReferences, resolveScopeId, resolveSystems, resolveWalkStart, rootCells, runtimeReady, saveScope, sectionAnchor, settled, shallowEqualBundle, stateNames, stateValue, structureIssues, systemsFromProcess, usesStructureLayout, validateCell, validatePage, walkKey, walkRequest };
|
|
818
|
+
export { CONTENT_FIELDS, CORE_SPECIFIER, DIAGNOSTICS, EACH, EACH_DEFAULT_AS, HYDRATED_CELL_FIELDS, LAYOUT_TYPES, MAIN, PAGE_DOCUMENT, PAGE_RULES, PUBLIC, RENDER_FUNCTIONS, RESERVED_LABELS, RESPONSIVE_BUCKETS, SECTION_KINDS, STORE_FIELDS, STORE_SCOPES, UnsafeDocumentError, VARIABLE_NAMESPACES, WALK_DIRECTIONS, _clearBundleCache, actionBindingKey, actionProblems, actionReferences, assembleCellProps, attachSelectionSetters, attachViewStateSetters, buildDataContext, bundleScope, cellAttributes, cellContext, cellPlacementStyle, cellResolutionContext, clearScope, collectDeclarations, collectDescriptors, collectScopeIds, collectStatic, createStackStore, declaredActions, deriveElementReferences, deriveSectionNumbering, deriveSectionReferences, descriptorShape, eachFormProblems, hasRef, isComponentExport, isEach, loadBundle, loadBundles, loadPageData, loadScope, mergeSectionReferences, mergeStates, nearestNames, needsWalk, nodePrintStyle, normalizeActionDeclaration, normalizeCell, normalizeRef, normalizeStructure, numberingFor, orderByVariable, pageBundleRefs, pageBundles, pageContainerStyle, pageContext, pageRuntimeFromValues, pageScopeKey, passesConditions, prepareDocument, projectCellActions, projectCellData, projectLive, projectModule, projectScopeKey, projectSelections, projectViewState, queryKey, readField, readWalk, refKey, referencedLabels, referencesFor, resolveAction, resolveCell, resolveComponent, resolveDataSystem, resolveDeclarations, resolveDescriptorVariables, resolveReferences, resolveScopeId, resolveSystems, resolveWalkStart, rootCells, runtimeReady, saveScope, sectionAnchor, selectionIssues, selectionShape, settled, shallowEqualBundle, shapeAt, stateNames, stateValue, structureIssues, systemsFromProcess, usesStructureLayout, validateCell, validateDescriptor, validatePage, variableLabels, variableReferences, walkKey, walkRequest };
|
|
561
819
|
|
|
562
820
|
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","names":["SECTION_KINDS"],"sources":["../src/core/data-context.ts","../src/core/load-page.ts","../src/core/diagnostics.ts","../src/core/rules.ts","../src/core/values.ts","../src/core/actions.ts","../src/core/store/persistence.ts"],"mappings":";;;;;;;;;AAqBA,SAAgB,oBACd,SACA,SACA,cAA4B,CAAC,GAC7B,QACqC;CACrC,MAAM,MAA2C,CAAC;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MAAM,GAAG,IAAuB;CACrD,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAgB,UAAU,OAAgB,OAAuB,MAAyB;CACxF,MAAM,QAAQ,WAAW,IAAI;CAC7B,IAAI,CAAC,OAAO;CACZ,IAAI;EACF,MAAM,QAAQ,aAAa,OAAO,KAAK,UAAU,KAAK,CAAC;CACzD,QAAQ,CAER;AACF;AAEA,SAAgB,WAAW,OAAgB,MAAyB;CAClE,IAAI;EACF,WAAW,IAAI,CAAC,EAAE,WAAW,aAAa,KAAK;CACjD,QAAQ,CAER;AACF"}
|
|
1
|
+
{"version":3,"file":"core.js","names":["SECTION_KINDS"],"sources":["../src/core/data-context.ts","../src/core/load-page.ts","../src/core/diagnostics.ts","../src/core/rules.ts","../src/core/values.ts","../src/core/store/persistence.ts"],"mappings":";;;;;;;;;;;AAqBA,SAAgB,oBACd,SACA,SACA,cAA4B,CAAC,GAC7B,QACqC;CACrC,MAAM,MAA2C,CAAC;CAClD,KAAK,MAAM,CAAC,OAAO,QAAQ,OAAO,QAAQ,WAAW,CAAC,CAAC,GAAG;EACxD,MAAM,OAAO;EACb,IAAI,CAAC,MAAM,eAAe;EAC1B,IAAI;EACJ,IAAI,KAAK,WAAW,QAAQ,CAAC,EAAE,UAAU,KAAK,UAAU,CAAC;OACpD;GACH,MAAM,EAAE,OAAO,YAAY,WAAW,KAAK,KAAK;GAChD,KAAK,MAAM,KAAK,SAAS,YAAY,KAAK;IAAE,UAAU;IAAS,MAAM;IAAsB;IAAO;IAAQ,SAAS,IAAI,MAAM,iBAAiB,EAAE;GAA8B,CAAC;GAC/K,QAAQ,CAAC;GACT,KAAK,MAAM,QAAQ,OACjB,IAAI,QAAQ,OAAO,MAAM,KAAK;IAAE;IAAM,UAAU,QAAQ;GAAO,CAAC;QAC3D,YAAY,KAAK;IAAE,UAAU;IAAS,MAAM;IAAwB;IAAO;IAAQ,SAAS,IAAI,MAAM,UAAU,KAAK,kCAAkC,KAAK;GAAS,CAAC;EAE/K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AAM,CAAC,CAAC,QAAQ,SAAS,KAAK,MAAM;CACtE;CACA,OAAO;EACL;EACA;EACA,YAAY,MAAM,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE;EACvE;EACA,UAAU,CAAC;EACX;EACA,SAAS,CAAC;EACV,iBAAiB;EACjB,cAAc,CAAC;EACf,aAAa,aAAa,IAAI;CAChC;AACF;;;AC7CA,IAAM,aAAa;AASnB,SAAS,WAAW,MAAmC;CACrD,IAAI,OAAO,WAAW,eAAe,SAAS,QAAQ,OAAO;CAC7D,IAAI;EACF,OAAO,SAAS,YAAY,OAAO,iBAAiB,OAAO;CAC7D,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAgB,UAAU,OAAgB,MAA0C;CAClF,MAAM,QAAQ,WAAW,IAAI;CAC7B,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI;EACF,MAAM,MAAM,MAAM,QAAQ,aAAa,KAAK;EAC5C,OAAO,MAAO,KAAK,MAAM,GAAG,IAAuB;CACrD,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAgB,UAAU,OAAgB,OAAuB,MAAyB;CACxF,MAAM,QAAQ,WAAW,IAAI;CAC7B,IAAI,CAAC,OAAO;CACZ,IAAI;EACF,MAAM,QAAQ,aAAa,OAAO,KAAK,UAAU,KAAK,CAAC;CACzD,QAAQ,CAER;AACF;AAEA,SAAgB,WAAW,OAAgB,MAAyB;CAClE,IAAI;EACF,WAAW,IAAI,CAAC,EAAE,WAAW,aAAa,KAAK;CACjD,QAAQ,CAER;AACF"}
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { _ as projectCellData, a as projectSelections, d as resolveComponent, f as cellAttributes, g as assembleCellProps, h as pageContainerStyle, i as projectLive, m as documentProfile, n as attachViewStateSetters, o as projectViewState, p as cellPlacementStyle, s as shallowEqualBundle, t as attachSelectionSetters, u as resolveScopeId, w as rootCells } from "./chunks/projection-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as projectCellData, a as projectSelections, d as resolveComponent, f as cellAttributes, g as assembleCellProps, h as pageContainerStyle, i as projectLive, m as documentProfile, n as attachViewStateSetters, o as projectViewState, p as cellPlacementStyle, s as shallowEqualBundle, t as attachSelectionSetters, u as resolveScopeId, w as rootCells } from "./chunks/projection-DNj8lq4J.js";
|
|
2
|
+
import { c as resolveReferences, i as cellResolutionContext, o as pageContext, r as cellContext, s as passesConditions } from "./chunks/references-BawYmQMY.js";
|
|
3
|
+
import { a as deriveSectionReferences, c as nodePrintStyle, d as referencesFor, f as sectionAnchor, h as usesStructureLayout, i as deriveSectionNumbering, l as normalizeStructure, m as structureIssues, o as isSectionNode, p as sortByOrder, r as deriveElementReferences, s as mergeSectionReferences, t as PAGE_DOCUMENT, u as numberingFor, y as declaredActions } from "./chunks/structure-BdsfUYHS.js";
|
|
3
4
|
import { Component, Fragment, Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { useSelector } from "@tanstack/react-store";
|
|
@@ -113,6 +114,12 @@ function useSoftNavigation(navigate) {
|
|
|
113
114
|
navigate(url.pathname + url.search + url.hash);
|
|
114
115
|
}, [navigate]);
|
|
115
116
|
}
|
|
117
|
+
function mergeActions(a, b) {
|
|
118
|
+
return a || b ? {
|
|
119
|
+
...a,
|
|
120
|
+
...b
|
|
121
|
+
} : void 0;
|
|
122
|
+
}
|
|
116
123
|
function CellView({ cell, env, nested = false, injectedProps }) {
|
|
117
124
|
const frame = useRef(null);
|
|
118
125
|
const store = useCellStore(cell, env.scope, env.store);
|
|
@@ -129,15 +136,21 @@ function CellView({ cell, env, nested = false, injectedProps }) {
|
|
|
129
136
|
const contract = resolved && env.bundles ? env.bundles.find((b) => b.label === resolved.source)?.contracts[cell.component] : void 0;
|
|
130
137
|
const size = useContainerSize(frame, Boolean(contract?.size));
|
|
131
138
|
const own = env.cellData?.[cell.id];
|
|
139
|
+
const context = useMemo(() => cellContext(env.context, cell), [env.context, cell]);
|
|
132
140
|
const ctx = useMemo(() => cellResolutionContext(cell, env.page, {
|
|
133
141
|
...own,
|
|
134
142
|
pageDeclared: env.declared
|
|
135
|
-
}, env.baseProps
|
|
143
|
+
}, env.baseProps, {
|
|
144
|
+
viewer: env.viewer,
|
|
145
|
+
context
|
|
146
|
+
}), [
|
|
136
147
|
cell,
|
|
137
148
|
env.page,
|
|
138
149
|
env.baseProps,
|
|
139
150
|
own,
|
|
140
|
-
env.declared
|
|
151
|
+
env.declared,
|
|
152
|
+
env.viewer,
|
|
153
|
+
context
|
|
141
154
|
]);
|
|
142
155
|
if (!passesConditions(cell.conditions, ctx)) return null;
|
|
143
156
|
let body;
|
|
@@ -171,14 +184,11 @@ function CellView({ cell, env, nested = false, injectedProps }) {
|
|
|
171
184
|
children,
|
|
172
185
|
baseProps: env.baseProps,
|
|
173
186
|
cellData: projectCellData(cell, ctx.data),
|
|
174
|
-
actions: env.actionsFor?.(cell),
|
|
187
|
+
actions: mergeActions(env.actionsFor?.(cell), declaredActions(cell, ctx, env.runAction)),
|
|
175
188
|
...store,
|
|
176
189
|
size,
|
|
177
190
|
navigate,
|
|
178
|
-
context
|
|
179
|
-
...env.context,
|
|
180
|
-
nodeId: cell.graph_node_id ?? cell.metadata?.graph_node_id
|
|
181
|
-
}
|
|
191
|
+
context
|
|
182
192
|
});
|
|
183
193
|
const { Component } = resolved;
|
|
184
194
|
body = jsx(CellErrorBoundary, {
|
|
@@ -303,10 +313,10 @@ function StructureView({ nodes, env, facts, level = 0, documentId = PAGE_DOCUMEN
|
|
|
303
313
|
//#endregion
|
|
304
314
|
//#region packages/renderer/src/react/page-renderer.tsx
|
|
305
315
|
var warn = (d) => console.warn(`[render] ${d.code}${d.cellId ? ` (cell ${d.cellId})` : ""}: ${d.message}`);
|
|
306
|
-
function PageRenderer({ runtime, bundles, params, baseProps, context, environment }) {
|
|
316
|
+
function PageRenderer({ runtime, bundles, params, baseProps, context, viewer, environment }) {
|
|
307
317
|
const { page, cells } = runtime;
|
|
308
318
|
const declared = useMemo(() => new Set(runtime.declared), [runtime.declared]);
|
|
309
|
-
const { core, navigate, store, onDiagnostic = warn, actionsFor, onCellError, onUnresolvedReference, frameProps } = environment;
|
|
319
|
+
const { core, navigate, store, onDiagnostic = warn, actionsFor, runAction, onCellError, onUnresolvedReference, frameProps } = environment;
|
|
310
320
|
useEffect(() => {
|
|
311
321
|
for (const d of runtime.diagnostics) onDiagnostic(d);
|
|
312
322
|
}, [runtime.diagnostics, onDiagnostic]);
|
|
@@ -324,6 +334,7 @@ function PageRenderer({ runtime, bundles, params, baseProps, context, environmen
|
|
|
324
334
|
navigate,
|
|
325
335
|
store,
|
|
326
336
|
actionsFor,
|
|
337
|
+
runAction,
|
|
327
338
|
onCellError,
|
|
328
339
|
onUnresolvedReference,
|
|
329
340
|
frameProps,
|
|
@@ -333,12 +344,8 @@ function PageRenderer({ runtime, bundles, params, baseProps, context, environmen
|
|
|
333
344
|
pageId: page.id,
|
|
334
345
|
projectId: page.project_id
|
|
335
346
|
},
|
|
336
|
-
context:
|
|
337
|
-
|
|
338
|
-
pageId: page.id,
|
|
339
|
-
projectId: page.project_id,
|
|
340
|
-
processId: page.process_id
|
|
341
|
-
}
|
|
347
|
+
context: pageContext(context, page),
|
|
348
|
+
viewer
|
|
342
349
|
};
|
|
343
350
|
}, [
|
|
344
351
|
cells,
|
|
@@ -346,6 +353,7 @@ function PageRenderer({ runtime, bundles, params, baseProps, context, environmen
|
|
|
346
353
|
params,
|
|
347
354
|
baseProps,
|
|
348
355
|
context,
|
|
356
|
+
viewer,
|
|
349
357
|
bundles,
|
|
350
358
|
core,
|
|
351
359
|
navigate,
|
|
@@ -353,6 +361,7 @@ function PageRenderer({ runtime, bundles, params, baseProps, context, environmen
|
|
|
353
361
|
page,
|
|
354
362
|
declared,
|
|
355
363
|
actionsFor,
|
|
364
|
+
runAction,
|
|
356
365
|
onCellError,
|
|
357
366
|
onUnresolvedReference,
|
|
358
367
|
frameProps
|