@peripheries/renderer 0.1.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 +65 -0
- package/dist/chunks/create-store-CglsI7tw.js +90 -0
- package/dist/chunks/create-store-CglsI7tw.js.map +1 -0
- package/dist/chunks/load-6zEgvJ6I.js +60 -0
- package/dist/chunks/load-6zEgvJ6I.js.map +1 -0
- package/dist/chunks/page-bundles-C4VW3dsK.js +87 -0
- package/dist/chunks/page-bundles-C4VW3dsK.js.map +1 -0
- package/dist/chunks/projection-Dsy9ruj8.js +592 -0
- package/dist/chunks/projection-Dsy9ruj8.js.map +1 -0
- package/dist/core.js +740 -0
- package/dist/core.js.map +1 -0
- package/dist/react.js +357 -0
- package/dist/react.js.map +1 -0
- package/dist/runtime.js +91 -0
- package/dist/runtime.js.map +1 -0
- package/dist/styles.css +51 -0
- package/dist/testing.js +944 -0
- package/dist/testing.js.map +1 -0
- package/dist/types/core/bundles/load.d.ts +49 -0
- package/dist/types/core/bundles/page-bundles.d.ts +17 -0
- package/dist/types/core/bundles/refs.d.ts +41 -0
- package/dist/types/core/bundles/resolve.d.ts +25 -0
- package/dist/types/core/cell-props.d.ts +39 -0
- package/dist/types/core/cells.d.ts +39 -0
- package/dist/types/core/data-context.d.ts +38 -0
- package/dist/types/core/graph.d.ts +95 -0
- package/dist/types/core/index.d.ts +19 -0
- package/dist/types/core/layout.d.ts +12 -0
- package/dist/types/core/load-page.d.ts +72 -0
- package/dist/types/core/references.d.ts +43 -0
- package/dist/types/core/store/create-store.d.ts +26 -0
- package/dist/types/core/store/persistence.d.ts +9 -0
- package/dist/types/core/store/projection.d.ts +15 -0
- package/dist/types/core/store/scope-keys.d.ts +10 -0
- package/dist/types/core/store/types.d.ts +37 -0
- package/dist/types/core/structure.d.ts +72 -0
- package/dist/types/core/types.d.ts +30 -0
- package/dist/types/core/validate.d.ts +14 -0
- package/dist/types/react/cell-states.d.ts +25 -0
- package/dist/types/react/cell-view.d.ts +31 -0
- package/dist/types/react/index.d.ts +6 -0
- package/dist/types/react/page-renderer.d.ts +30 -0
- package/dist/types/react/structure-view.d.ts +30 -0
- package/dist/types/react/use-cell-store.d.ts +13 -0
- package/dist/types/react/use-container-size.d.ts +11 -0
- package/dist/types/runtime/boot.d.ts +7 -0
- package/dist/types/runtime/index.d.ts +4 -0
- package/dist/types/runtime/install.d.ts +21 -0
- package/dist/types/runtime/shims.d.ts +11 -0
- package/dist/types/runtime/store-export.d.ts +18 -0
- package/dist/types/testing/base-props.d.ts +3 -0
- package/dist/types/testing/components.d.ts +51 -0
- package/dist/types/testing/golden.d.ts +51 -0
- package/dist/types/testing/ids.d.ts +14 -0
- package/dist/types/testing/index.d.ts +5 -0
- package/dist/types/testing/sources.d.ts +25 -0
- package/package.json +51 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { SECTION_KINDS } from "@peripheries/runtime";
|
|
2
|
+
//#region packages/renderer/src/core/cells.ts
|
|
3
|
+
var HYDRATED_CELL_FIELDS = [
|
|
4
|
+
"component",
|
|
5
|
+
"props",
|
|
6
|
+
"layout",
|
|
7
|
+
"conditions",
|
|
8
|
+
"children",
|
|
9
|
+
"traversal",
|
|
10
|
+
"data",
|
|
11
|
+
"bundle_ref",
|
|
12
|
+
"actions"
|
|
13
|
+
];
|
|
14
|
+
var STORE_FIELDS = [
|
|
15
|
+
"selections",
|
|
16
|
+
"viewState",
|
|
17
|
+
"live"
|
|
18
|
+
];
|
|
19
|
+
var CONTENT_FIELDS = [...HYDRATED_CELL_FIELDS.filter((f) => f !== "layout"), ...STORE_FIELDS];
|
|
20
|
+
function normalizeCell(cell, path = "cell") {
|
|
21
|
+
const diagnostics = [];
|
|
22
|
+
if (cell.ref) return {
|
|
23
|
+
cell,
|
|
24
|
+
diagnostics
|
|
25
|
+
};
|
|
26
|
+
if (cell.graph_node_id && !cell.component) {
|
|
27
|
+
diagnostics.push({
|
|
28
|
+
severity: "legacy",
|
|
29
|
+
code: "LEGACY_THIN_REF",
|
|
30
|
+
cellId: cell.id,
|
|
31
|
+
path,
|
|
32
|
+
message: "a thin ref `{ id, graph_node_id }`: publish it as `{ id, ref: { graph_node_id } }`"
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
cell: {
|
|
36
|
+
...cell,
|
|
37
|
+
ref: { graph_node_id: cell.graph_node_id }
|
|
38
|
+
},
|
|
39
|
+
diagnostics
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (cell.graph_node_id) diagnostics.push({
|
|
43
|
+
severity: "legacy",
|
|
44
|
+
code: "LEGACY_INLINE_NODE",
|
|
45
|
+
cellId: cell.id,
|
|
46
|
+
path,
|
|
47
|
+
message: "an inline cell with a graph_node_id: its node only starts its walk. Give it a `ref` if the node should manage the cell"
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
cell,
|
|
51
|
+
diagnostics
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
var hasRef = (cell) => Boolean(cell.ref?.graph_node_id);
|
|
55
|
+
function resolveCell(cell, config) {
|
|
56
|
+
if (!hasRef(cell)) return {
|
|
57
|
+
...cell,
|
|
58
|
+
source: "inline"
|
|
59
|
+
};
|
|
60
|
+
const own = cell.ref.graph_node_id;
|
|
61
|
+
if (!config) return {
|
|
62
|
+
...cell,
|
|
63
|
+
graph_node_id: own,
|
|
64
|
+
source: cell.component ? "fallback" : "pending"
|
|
65
|
+
};
|
|
66
|
+
const out = {
|
|
67
|
+
...cell,
|
|
68
|
+
graph_node_id: own,
|
|
69
|
+
source: "node"
|
|
70
|
+
};
|
|
71
|
+
for (const f of CONTENT_FIELDS) if (config[f] !== void 0) out[f] = config[f];
|
|
72
|
+
out.name = cell.name ?? config.name;
|
|
73
|
+
if (out.name === void 0) delete out.name;
|
|
74
|
+
const layout = cell.layout ?? config.layout;
|
|
75
|
+
if (layout !== void 0) out.layout = layout;
|
|
76
|
+
out.metadata = {
|
|
77
|
+
...cell.metadata,
|
|
78
|
+
...config.metadata,
|
|
79
|
+
graph_node_id: own
|
|
80
|
+
};
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
83
|
+
function rootCells(cells) {
|
|
84
|
+
const nested = new Set(cells.flatMap((c) => c.children ?? []));
|
|
85
|
+
const roots = cells.filter((c) => !nested.has(c.id));
|
|
86
|
+
return roots.length ? roots : cells;
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region packages/renderer/src/core/references.ts
|
|
90
|
+
var STRICT_REF = /^@[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$[\]-]+)*$/;
|
|
91
|
+
var INTERPOLATION = /\$\{(?:context\.)?([^}]+)\}/g;
|
|
92
|
+
var UnresolvedReference = class extends Error {};
|
|
93
|
+
function walk(root, path) {
|
|
94
|
+
let cur = root;
|
|
95
|
+
for (const seg of path) {
|
|
96
|
+
if (cur === null || cur === void 0) throw new UnresolvedReference(`null before "${seg}"`);
|
|
97
|
+
if (Array.isArray(cur) && /^\d+$/.test(seg)) {
|
|
98
|
+
const i = Number(seg);
|
|
99
|
+
if (i >= cur.length) throw new UnresolvedReference(`index ${i} out of range`);
|
|
100
|
+
cur = cur[i];
|
|
101
|
+
} else if (typeof cur === "object" || Array.isArray(cur)) cur = cur[seg];
|
|
102
|
+
else throw new UnresolvedReference(`"${seg}" on a ${typeof cur}`);
|
|
103
|
+
}
|
|
104
|
+
return cur;
|
|
105
|
+
}
|
|
106
|
+
function resolveRef(ref, ctx) {
|
|
107
|
+
const [key, ...path] = ref.slice(1).split(".");
|
|
108
|
+
const entry = ctx.data[key];
|
|
109
|
+
if (!entry) throw new UnresolvedReference(`no data "${key}"`);
|
|
110
|
+
if (entry.isLoading) throw new UnresolvedReference(`"${key}" is loading`);
|
|
111
|
+
if (entry.error) throw new UnresolvedReference(`"${key}" failed`);
|
|
112
|
+
return path.length ? walk(entry.data, path) : entry.data;
|
|
113
|
+
}
|
|
114
|
+
function interpolate(s, params) {
|
|
115
|
+
return s.replace(INTERPOLATION, (whole, path) => {
|
|
116
|
+
let cur = params;
|
|
117
|
+
for (const seg of path.split(".")) {
|
|
118
|
+
if (cur === null || cur === void 0) return whole;
|
|
119
|
+
cur = cur[seg];
|
|
120
|
+
}
|
|
121
|
+
return cur === void 0 ? whole : String(cur);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function resolveString(s, ctx) {
|
|
125
|
+
const text = interpolate(s, ctx.params);
|
|
126
|
+
if (!text.startsWith("@")) return text;
|
|
127
|
+
try {
|
|
128
|
+
return resolveRef(text, ctx);
|
|
129
|
+
} catch (e) {
|
|
130
|
+
if (!(e instanceof UnresolvedReference)) throw e;
|
|
131
|
+
return STRICT_REF.test(text) ? void 0 : s;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function resolveReferences(value, ctx) {
|
|
135
|
+
if (value === null || value === void 0) return value;
|
|
136
|
+
if (typeof value === "string") return resolveString(value, ctx);
|
|
137
|
+
if (Array.isArray(value)) return value.map((v) => resolveReferences(v, ctx));
|
|
138
|
+
if (typeof value === "object") {
|
|
139
|
+
const out = {};
|
|
140
|
+
for (const [k, v] of Object.entries(value)) out[k] = resolveReferences(v, ctx);
|
|
141
|
+
return out;
|
|
142
|
+
}
|
|
143
|
+
return value;
|
|
144
|
+
}
|
|
145
|
+
var settled = (data) => ({
|
|
146
|
+
data,
|
|
147
|
+
isLoading: false,
|
|
148
|
+
error: null
|
|
149
|
+
});
|
|
150
|
+
function cellResolutionContext(cell, page, own, baseProps) {
|
|
151
|
+
const pageDeclared = own?.pageDeclared ?? new Set();
|
|
152
|
+
const data = { ...page.data };
|
|
153
|
+
for (const [label, entry] of Object.entries(own?.static ?? {})) if (!pageDeclared.has(label)) data[label] = entry;
|
|
154
|
+
for (const [label, entry] of Object.entries(own?.walk?.labels ?? {})) if (!pageDeclared.has(label) && !own?.declared?.[label]) data[label] = entry;
|
|
155
|
+
Object.assign(data, own?.declared);
|
|
156
|
+
for (const [friendly, decl] of Object.entries(cell.data?.queries ?? {})) {
|
|
157
|
+
const registry = decl.registry;
|
|
158
|
+
if (registry && page.data[registry]) data[friendly] = page.data[registry];
|
|
159
|
+
}
|
|
160
|
+
data._traversal = settled(own?.walk?.traversal ?? {
|
|
161
|
+
nodes: [],
|
|
162
|
+
edges: []
|
|
163
|
+
});
|
|
164
|
+
data.params = settled(page.params);
|
|
165
|
+
if (baseProps !== void 0) data.baseProps = settled(baseProps);
|
|
166
|
+
return {
|
|
167
|
+
data,
|
|
168
|
+
params: page.params
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function passesConditions(conditions, ctx) {
|
|
172
|
+
if (!conditions) return true;
|
|
173
|
+
const { showIf, hideIf } = conditions;
|
|
174
|
+
if (showIf !== void 0 && showIf !== "" && !resolveReferences(showIf, ctx)) return false;
|
|
175
|
+
if (hideIf !== void 0 && hideIf !== "" && resolveReferences(hideIf, ctx)) return false;
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region packages/renderer/src/core/structure.ts
|
|
180
|
+
var PAGE_DOCUMENT = "__page__";
|
|
181
|
+
function normalizeStructure(nodes) {
|
|
182
|
+
if (!Array.isArray(nodes)) return [];
|
|
183
|
+
return nodes.map((n) => typeof n === "string" ? { cellId: n } : {
|
|
184
|
+
...n,
|
|
185
|
+
children: n.children ? normalizeStructure(n.children) : void 0
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
var sortByOrder = (nodes) => [...nodes].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
189
|
+
var isSectionNode = (n) => typeof n.sectionId === "string" && n.sectionId.length > 0;
|
|
190
|
+
var isSectionKind = (v) => typeof v === "string" && SECTION_KINDS.includes(v);
|
|
191
|
+
var sectionAnchor = (n) => n.cellId ?? n.sectionId;
|
|
192
|
+
function usesStructureLayout(layout) {
|
|
193
|
+
const structure = layout?.structure;
|
|
194
|
+
if (!Array.isArray(structure)) return false;
|
|
195
|
+
if (layout?.type === "document") return true;
|
|
196
|
+
return normalizeStructure(structure).some((n) => isSectionNode(n) || (n.children?.length ?? 0) > 0);
|
|
197
|
+
}
|
|
198
|
+
var EMPTY = Object.freeze({
|
|
199
|
+
numbers: {},
|
|
200
|
+
levels: {},
|
|
201
|
+
authoredLevels: {},
|
|
202
|
+
titles: {},
|
|
203
|
+
anchors: {}
|
|
204
|
+
});
|
|
205
|
+
var numberingFor = (numbering, documentId) => numbering?.byDocument[documentId ?? "__page__"] ?? EMPTY;
|
|
206
|
+
function deriveSectionNumbering(structure) {
|
|
207
|
+
const byDocument = {};
|
|
208
|
+
const unknownKinds = [];
|
|
209
|
+
const mapsFor = (d) => byDocument[d] ??= {
|
|
210
|
+
numbers: {},
|
|
211
|
+
levels: {},
|
|
212
|
+
authoredLevels: {},
|
|
213
|
+
titles: {},
|
|
214
|
+
anchors: {}
|
|
215
|
+
};
|
|
216
|
+
const nodes = normalizeStructure(structure);
|
|
217
|
+
const scan = (list, depth, path, inherited) => sortByOrder(list).forEach((node, i) => {
|
|
218
|
+
const here = `${path}[${i}]`;
|
|
219
|
+
const documentId = node.documentId ?? inherited;
|
|
220
|
+
if (node.kind !== void 0 && !isSectionKind(node.kind)) unknownKinds.push({
|
|
221
|
+
path: here,
|
|
222
|
+
...node.sectionId ? { sectionId: node.sectionId } : {},
|
|
223
|
+
kind: typeof node.kind === "string" ? node.kind : JSON.stringify(node.kind)
|
|
224
|
+
});
|
|
225
|
+
const section = isSectionNode(node);
|
|
226
|
+
if (section) {
|
|
227
|
+
const maps = mapsFor(documentId);
|
|
228
|
+
maps.levels[node.sectionId] = depth + 1;
|
|
229
|
+
if (node.level !== void 0) maps.authoredLevels[node.sectionId] = node.level;
|
|
230
|
+
if (typeof node.title === "string" && node.title !== "") maps.titles[node.sectionId] = node.title;
|
|
231
|
+
maps.anchors[node.sectionId] = sectionAnchor(node);
|
|
232
|
+
}
|
|
233
|
+
scan(node.children ?? [], section ? depth + 1 : depth, `${here}.children`, documentId);
|
|
234
|
+
});
|
|
235
|
+
const articles = (list, inherited) => sortByOrder(list).flatMap((node) => {
|
|
236
|
+
const documentId = node.documentId ?? inherited;
|
|
237
|
+
return node.kind === "article" && isSectionNode(node) ? [{
|
|
238
|
+
node,
|
|
239
|
+
documentId
|
|
240
|
+
}] : articles(node.children ?? [], documentId);
|
|
241
|
+
});
|
|
242
|
+
const number = (list, prefix, inherited) => {
|
|
243
|
+
const counters = new Map();
|
|
244
|
+
for (const { node, documentId } of articles(list, inherited)) {
|
|
245
|
+
const next = (counters.get(documentId) ?? 0) + 1;
|
|
246
|
+
counters.set(documentId, next);
|
|
247
|
+
const trail = [...prefix, next];
|
|
248
|
+
mapsFor(documentId).numbers[node.sectionId] = trail;
|
|
249
|
+
number(node.children ?? [], trail, documentId);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
scan(nodes, 0, "structure", PAGE_DOCUMENT);
|
|
253
|
+
number(nodes, [], PAGE_DOCUMENT);
|
|
254
|
+
return {
|
|
255
|
+
byDocument,
|
|
256
|
+
unknownKinds
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function uniqueDocumentLabels(documentIds, documents) {
|
|
260
|
+
const owners = new Map();
|
|
261
|
+
for (const id of documentIds) {
|
|
262
|
+
const label = documents?.[id]?.label;
|
|
263
|
+
if (typeof label === "string" && label !== "") owners.set(label, [...owners.get(label) ?? [], id]);
|
|
264
|
+
}
|
|
265
|
+
const out = new Map();
|
|
266
|
+
for (const [label, ids] of owners) if (ids.length === 1) out.set(label, ids[0]);
|
|
267
|
+
else console.warn(`[structure] label "${label}" is shared by ${ids.join(", ")}; references to "${label}:…" resolve to nothing.`);
|
|
268
|
+
return out;
|
|
269
|
+
}
|
|
270
|
+
function deriveSectionReferences(numbering, documents) {
|
|
271
|
+
const recordFor = (maps, role) => {
|
|
272
|
+
const anchor = maps.anchors[role];
|
|
273
|
+
return {
|
|
274
|
+
...maps.numbers[role] ? { number: maps.numbers[role] } : {},
|
|
275
|
+
...maps.titles[role] ? { title: maps.titles[role] } : {},
|
|
276
|
+
anchor,
|
|
277
|
+
href: `#${anchor}`,
|
|
278
|
+
openable: true
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
const cross = {};
|
|
282
|
+
for (const [label, id] of uniqueDocumentLabels(Object.keys(numbering.byDocument), documents)) {
|
|
283
|
+
const maps = numbering.byDocument[id];
|
|
284
|
+
for (const role of Object.keys(maps.anchors)) cross[`${label}:${role}`] = recordFor(maps, role);
|
|
285
|
+
}
|
|
286
|
+
const out = {};
|
|
287
|
+
for (const [id, maps] of Object.entries(numbering.byDocument)) {
|
|
288
|
+
const own = {};
|
|
289
|
+
for (const role of Object.keys(maps.anchors)) own[role] = recordFor(maps, role);
|
|
290
|
+
out[id] = {
|
|
291
|
+
...cross,
|
|
292
|
+
...own
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
return out;
|
|
296
|
+
}
|
|
297
|
+
function clauseItemsOf(blocks) {
|
|
298
|
+
if (!Array.isArray(blocks)) return [];
|
|
299
|
+
return blocks.flatMap((b) => b && typeof b === "object" && b.kind === "clause" && Array.isArray(b.items) ? b.items.filter((i) => i && typeof i === "object") : []);
|
|
300
|
+
}
|
|
301
|
+
function deriveElementReferences(structure, blocksByCellId, documents) {
|
|
302
|
+
const numbering = deriveSectionNumbering(structure);
|
|
303
|
+
const sections = [];
|
|
304
|
+
const walk = (nodes, inherited) => {
|
|
305
|
+
for (const node of sortByOrder(nodes)) {
|
|
306
|
+
const documentId = node.documentId ?? inherited;
|
|
307
|
+
if (isSectionNode(node)) {
|
|
308
|
+
const body = (node.children ?? []).filter((c) => c.cellId && !c.sectionId).map((c) => c.cellId);
|
|
309
|
+
sections.push({
|
|
310
|
+
documentId,
|
|
311
|
+
role: node.sectionId,
|
|
312
|
+
cellIds: [...node.cellId ? [node.cellId] : [], ...body]
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
walk(node.children ?? [], documentId);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
walk(normalizeStructure(structure), PAGE_DOCUMENT);
|
|
319
|
+
const perDocument = {};
|
|
320
|
+
for (const { documentId, role, cellIds } of sections) {
|
|
321
|
+
const items = cellIds.flatMap((id) => clauseItemsOf(blocksByCellId[id]));
|
|
322
|
+
if (!items.some((i) => typeof i.id === "string" && i.id !== "")) continue;
|
|
323
|
+
const shape = items.map((i) => ({
|
|
324
|
+
...typeof i.level === "number" ? { level: i.level } : {},
|
|
325
|
+
...typeof i.marker === "string" ? { marker: i.marker } : {}
|
|
326
|
+
}));
|
|
327
|
+
const maps = numberingFor(numbering, documentId);
|
|
328
|
+
const anchor = maps.anchors[role] ?? role;
|
|
329
|
+
items.forEach((item, index) => {
|
|
330
|
+
if (typeof item.id !== "string" || item.id === "") return;
|
|
331
|
+
(perDocument[documentId] ??= {})[`${role}#${item.id}`] = {
|
|
332
|
+
...maps.numbers[role] ? { number: maps.numbers[role] } : {},
|
|
333
|
+
...maps.titles[role] ? { title: maps.titles[role] } : {},
|
|
334
|
+
anchor,
|
|
335
|
+
href: `#${anchor}`,
|
|
336
|
+
openable: true,
|
|
337
|
+
element: {
|
|
338
|
+
index,
|
|
339
|
+
shape
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
const cross = {};
|
|
345
|
+
for (const [label, id] of uniqueDocumentLabels(Object.keys(numbering.byDocument), documents)) for (const [key, record] of Object.entries(perDocument[id] ?? {})) cross[`${label}:${key}`] = record;
|
|
346
|
+
const out = {};
|
|
347
|
+
for (const id of Object.keys(numbering.byDocument)) {
|
|
348
|
+
const own = perDocument[id] ?? {};
|
|
349
|
+
if (Object.keys(own).length || Object.keys(cross).length) out[id] = {
|
|
350
|
+
...cross,
|
|
351
|
+
...own
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
return out;
|
|
355
|
+
}
|
|
356
|
+
function mergeSectionReferences(samePage, other) {
|
|
357
|
+
if (!other || Object.keys(other).length === 0) return samePage;
|
|
358
|
+
const out = {};
|
|
359
|
+
for (const id of new Set([...Object.keys(samePage), ...Object.keys(other)])) out[id] = {
|
|
360
|
+
...other[id],
|
|
361
|
+
...samePage[id]
|
|
362
|
+
};
|
|
363
|
+
return out;
|
|
364
|
+
}
|
|
365
|
+
var referencesFor = (refs, documentId) => refs?.[documentId ?? "__page__"] ?? {};
|
|
366
|
+
function structureIssues(structure, cells) {
|
|
367
|
+
const ids = new Set(cells.map((c) => c.id));
|
|
368
|
+
const issues = [];
|
|
369
|
+
const visit = (nodes, path) => nodes.forEach((n, i) => {
|
|
370
|
+
if (n.cellId && !ids.has(n.cellId)) issues.push(`${path}[${i}]: cell '${n.cellId}' is not on the page`);
|
|
371
|
+
visit(n.children ?? [], `${path}[${i}].children`);
|
|
372
|
+
});
|
|
373
|
+
visit(normalizeStructure(structure), "structure");
|
|
374
|
+
for (const u of deriveSectionNumbering(structure).unknownKinds) issues.push(`${u.path}: unknown section kind '${u.kind}'${u.sectionId ? ` on '${u.sectionId}'` : ""}; expected ${SECTION_KINDS.join(", ")}`);
|
|
375
|
+
return issues;
|
|
376
|
+
}
|
|
377
|
+
function nodePrintStyle(node) {
|
|
378
|
+
const p = node.print;
|
|
379
|
+
if (!p) return void 0;
|
|
380
|
+
const breakBefore = p.breakBefore ? "page" : p.keepWithPrevious ? "avoid" : void 0;
|
|
381
|
+
const breakInside = p.breakInside === "avoid" ? "avoid" : void 0;
|
|
382
|
+
return breakBefore || breakInside ? {
|
|
383
|
+
...breakBefore ? { breakBefore } : {},
|
|
384
|
+
...breakInside ? { breakInside } : {}
|
|
385
|
+
} : void 0;
|
|
386
|
+
}
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region packages/renderer/src/core/cell-props.ts
|
|
389
|
+
function projectCellData(cell, ctx) {
|
|
390
|
+
if (!cell.data) return null;
|
|
391
|
+
const data = { ...cell.data.static };
|
|
392
|
+
const errors = [];
|
|
393
|
+
let isLoading = false;
|
|
394
|
+
for (const [key, decl] of Object.entries(cell.data.queries ?? {})) {
|
|
395
|
+
const entry = ctx[decl.registry ?? key];
|
|
396
|
+
data[key] = entry?.isLoading ? void 0 : entry?.data;
|
|
397
|
+
if (entry?.isLoading) isLoading = true;
|
|
398
|
+
if (entry?.error) errors.push(entry.error);
|
|
399
|
+
}
|
|
400
|
+
return {
|
|
401
|
+
data,
|
|
402
|
+
status: {
|
|
403
|
+
isLoading,
|
|
404
|
+
isError: errors.length > 0,
|
|
405
|
+
...errors.length ? { errors } : {}
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
function assembleCellProps(i) {
|
|
410
|
+
const props = { ...i.resolvedProps };
|
|
411
|
+
if (i.children !== null && i.children !== void 0) props.children = i.children;
|
|
412
|
+
props.isLoading = i.cellData?.status.isLoading ?? false;
|
|
413
|
+
props.error = i.cellData?.status.errors?.[0] ?? null;
|
|
414
|
+
props.baseProps = i.baseProps;
|
|
415
|
+
if (i.cellData) {
|
|
416
|
+
if (props.data === void 0) props.data = i.cellData.data;
|
|
417
|
+
props.status = i.cellData.status;
|
|
418
|
+
}
|
|
419
|
+
if (i.actions) props.actions = i.actions;
|
|
420
|
+
if (i.selections) props.selections = i.selections;
|
|
421
|
+
if (i.viewState) props.viewState = i.viewState;
|
|
422
|
+
if (i.live) props.live = i.live;
|
|
423
|
+
if (i.size) props.size = i.size;
|
|
424
|
+
props.navigate = i.navigate;
|
|
425
|
+
props.onNavigate = i.navigate;
|
|
426
|
+
props.context = i.context;
|
|
427
|
+
return props;
|
|
428
|
+
}
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region packages/renderer/src/core/layout.ts
|
|
431
|
+
function pageContainerStyle(layout) {
|
|
432
|
+
const type = layout?.type ?? "stack";
|
|
433
|
+
const gap = typeof layout?.gap === "number" ? `${layout.gap}px` : typeof layout?.gap === "string" ? layout.gap : "16px";
|
|
434
|
+
if (type === "grid") return {
|
|
435
|
+
display: "grid",
|
|
436
|
+
gridTemplateColumns: `repeat(${typeof layout?.columns === "number" ? layout.columns : 12}, minmax(0, 1fr))`,
|
|
437
|
+
gap
|
|
438
|
+
};
|
|
439
|
+
if (type === "flex") return {
|
|
440
|
+
display: "flex",
|
|
441
|
+
flexDirection: "row",
|
|
442
|
+
flexWrap: "wrap",
|
|
443
|
+
gap
|
|
444
|
+
};
|
|
445
|
+
return {
|
|
446
|
+
display: "flex",
|
|
447
|
+
flexDirection: "column",
|
|
448
|
+
gap
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
function cellPlacementStyle(layout) {
|
|
452
|
+
const style = {
|
|
453
|
+
gridColumn: layout?.grid?.col ?? (layout?.span ? `span ${layout.span}` : "1 / -1"),
|
|
454
|
+
minWidth: 0
|
|
455
|
+
};
|
|
456
|
+
if (layout?.grid?.row) style.gridRow = layout.grid.row;
|
|
457
|
+
if (layout?.order !== void 0) style.order = layout.order;
|
|
458
|
+
if (layout?.sticky) Object.assign(style, {
|
|
459
|
+
position: "sticky",
|
|
460
|
+
top: 0
|
|
461
|
+
});
|
|
462
|
+
if (layout?.zIndex !== void 0) style.zIndex = layout.zIndex;
|
|
463
|
+
return style;
|
|
464
|
+
}
|
|
465
|
+
function cellAttributes(cell) {
|
|
466
|
+
const attrs = {
|
|
467
|
+
"data-page-cell": "",
|
|
468
|
+
"data-oa-page-cell": "",
|
|
469
|
+
"data-cell-id": cell.id
|
|
470
|
+
};
|
|
471
|
+
if (cell.component) attrs["data-component"] = cell.component;
|
|
472
|
+
for (const key of [
|
|
473
|
+
"hideWhen",
|
|
474
|
+
"showWhen",
|
|
475
|
+
"stackWhen",
|
|
476
|
+
"truncateWhen"
|
|
477
|
+
]) {
|
|
478
|
+
const bucket = cell.layout?.[key];
|
|
479
|
+
if (!bucket) continue;
|
|
480
|
+
const name = key.replace(/When$/, "").toLowerCase();
|
|
481
|
+
attrs[`data-${name}-when`] = bucket;
|
|
482
|
+
attrs[`data-oa-${name}-when`] = bucket;
|
|
483
|
+
}
|
|
484
|
+
return attrs;
|
|
485
|
+
}
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region packages/renderer/src/core/bundles/resolve.ts
|
|
488
|
+
function resolveComponent(name, { cellBundle, scope, core }) {
|
|
489
|
+
for (const prefix of ["@core/", "host:"]) if (name.startsWith(prefix)) {
|
|
490
|
+
const Component = core[name.slice(prefix.length)];
|
|
491
|
+
return Component ? {
|
|
492
|
+
Component,
|
|
493
|
+
source: "core"
|
|
494
|
+
} : null;
|
|
495
|
+
}
|
|
496
|
+
const bundles = cellBundle ? [cellBundle] : scope;
|
|
497
|
+
for (const b of bundles) {
|
|
498
|
+
const Component = b.components[name];
|
|
499
|
+
if (Component) return {
|
|
500
|
+
Component,
|
|
501
|
+
source: b.label
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
const Component = core[name];
|
|
505
|
+
return Component ? {
|
|
506
|
+
Component,
|
|
507
|
+
source: "core"
|
|
508
|
+
} : null;
|
|
509
|
+
}
|
|
510
|
+
function nearestThemeProvider(scope) {
|
|
511
|
+
return scope.find((b) => b.ThemeProvider)?.ThemeProvider;
|
|
512
|
+
}
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region packages/renderer/src/core/store/scope-keys.ts
|
|
515
|
+
var pageScopeKey = (pageId) => `page:${pageId}`;
|
|
516
|
+
var projectScopeKey = (projectId) => `project:${projectId}`;
|
|
517
|
+
function resolveScopeId(kind, ctx) {
|
|
518
|
+
if (kind === "page") return ctx.pageId ? pageScopeKey(ctx.pageId) : null;
|
|
519
|
+
if (kind === "project") return ctx.projectId ? projectScopeKey(ctx.projectId) : null;
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
//#endregion
|
|
523
|
+
//#region packages/renderer/src/core/store/projection.ts
|
|
524
|
+
var setterName = (name) => "set" + name.charAt(0).toUpperCase() + name.slice(1);
|
|
525
|
+
function projectSelections(decls, state, ctx) {
|
|
526
|
+
if (!decls) return void 0;
|
|
527
|
+
const out = {};
|
|
528
|
+
for (const [name, decl] of Object.entries(decls)) {
|
|
529
|
+
const scope = resolveScopeId(decl.scope, ctx);
|
|
530
|
+
const current = scope ? state.selections[scope]?.[decl.channel] : void 0;
|
|
531
|
+
out[name] = current === void 0 ? decl.default : current;
|
|
532
|
+
}
|
|
533
|
+
return out;
|
|
534
|
+
}
|
|
535
|
+
function attachSelectionSetters(values, decls, store, ctx) {
|
|
536
|
+
const out = { ...values };
|
|
537
|
+
for (const [name, decl] of Object.entries(decls)) {
|
|
538
|
+
const scope = decl.writable ? resolveScopeId(decl.scope, ctx) : null;
|
|
539
|
+
if (scope) out[setterName(name)] = (value) => store.setSelection(scope, decl.channel, value);
|
|
540
|
+
}
|
|
541
|
+
return out;
|
|
542
|
+
}
|
|
543
|
+
function projectViewState(decls, state, ctx) {
|
|
544
|
+
if (!decls) return void 0;
|
|
545
|
+
const out = {};
|
|
546
|
+
for (const [name, decl] of Object.entries(decls)) {
|
|
547
|
+
const scope = resolveScopeId(decl.scope, ctx);
|
|
548
|
+
const current = scope ? state.viewState[scope]?.[decl.key] : void 0;
|
|
549
|
+
out[name] = current === void 0 ? decl.default : current;
|
|
550
|
+
}
|
|
551
|
+
return out;
|
|
552
|
+
}
|
|
553
|
+
function attachViewStateSetters(values, decls, store, ctx) {
|
|
554
|
+
const out = { ...values };
|
|
555
|
+
for (const [name, decl] of Object.entries(decls)) {
|
|
556
|
+
const scope = decl.writable === false ? null : resolveScopeId(decl.scope, ctx);
|
|
557
|
+
if (scope) out[setterName(name)] = (value) => store.setViewState(scope, decl.key, value);
|
|
558
|
+
}
|
|
559
|
+
return out;
|
|
560
|
+
}
|
|
561
|
+
function projectLive(decls, state) {
|
|
562
|
+
if (!decls) return void 0;
|
|
563
|
+
const out = {};
|
|
564
|
+
for (const [name, decl] of Object.entries(decls)) {
|
|
565
|
+
const entry = state.live[decl.channel];
|
|
566
|
+
out[name] = entry?.data ?? decl.default;
|
|
567
|
+
out[`${name}Status`] = entry ? {
|
|
568
|
+
status: entry.status,
|
|
569
|
+
updatedAt: entry.updatedAt,
|
|
570
|
+
error: entry.error
|
|
571
|
+
} : { status: "idle" };
|
|
572
|
+
}
|
|
573
|
+
return out;
|
|
574
|
+
}
|
|
575
|
+
function shallowEqualBundle(a, b) {
|
|
576
|
+
if (a === b) return true;
|
|
577
|
+
if (!a || !b) return false;
|
|
578
|
+
const keys = Object.keys(a);
|
|
579
|
+
return keys.length === Object.keys(b).length && keys.every((k) => a[k] === b[k]);
|
|
580
|
+
}
|
|
581
|
+
function collectScopeIds(ctx, selections, viewState) {
|
|
582
|
+
const ids = new Set();
|
|
583
|
+
for (const decl of [...Object.values(selections ?? {}), ...Object.values(viewState ?? {})]) {
|
|
584
|
+
const scope = resolveScopeId(decl.scope, ctx);
|
|
585
|
+
if (scope) ids.add(scope);
|
|
586
|
+
}
|
|
587
|
+
return [...ids];
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
export { sortByOrder as A, hasRef as B, isSectionNode as C, numberingFor as D, normalizeStructure as E, resolveReferences as F, resolveCell as H, settled as I, CONTENT_FIELDS as L, usesStructureLayout as M, cellResolutionContext as N, referencesFor as O, passesConditions as P, HYDRATED_CELL_FIELDS as R, deriveSectionReferences as S, nodePrintStyle as T, rootCells as U, normalizeCell as V, projectCellData as _, projectSelections as a, deriveElementReferences as b, pageScopeKey as c, nearestThemeProvider as d, resolveComponent as f, assembleCellProps as g, pageContainerStyle as h, projectLive as i, structureIssues as j, sectionAnchor as k, projectScopeKey as l, cellPlacementStyle as m, attachViewStateSetters as n, projectViewState as o, cellAttributes as p, collectScopeIds as r, shallowEqualBundle as s, attachSelectionSetters as t, resolveScopeId as u, PAGE_DOCUMENT as v, mergeSectionReferences as w, deriveSectionNumbering as x, SECTION_KINDS as y, STORE_FIELDS as z };
|
|
591
|
+
|
|
592
|
+
//# sourceMappingURL=projection-Dsy9ruj8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection-Dsy9ruj8.js","names":[],"sources":["../../src/core/cells.ts","../../src/core/references.ts","../../src/core/structure.ts","../../src/core/cell-props.ts","../../src/core/layout.ts","../../src/core/bundles/resolve.ts","../../src/core/store/scope-keys.ts","../../src/core/store/projection.ts"],"mappings":";;AAQA,IAAa,uBAAuB;CAAC;CAAa;CAAS;CAAU;CAAc;CAAY;CAAa;CAAQ;CAAc;AAAS;AAG3I,IAAa,eAAe;CAAC;CAAc;CAAa;AAAM;AAG9D,IAAa,iBAAiB,CAAC,GAAG,qBAAqB,QAAQ,MAAM,MAAM,QAAQ,GAAG,GAAG,YAAY;AAcrG,SAAgB,cAAc,MAAgB,OAAO,QAAuD;CAC1G,MAAM,cAA4B,CAAC;CACnC,IAAI,KAAK,KAAK,OAAO;EAAE;EAAM;CAAY;CACzC,IAAI,KAAK,iBAAiB,CAAC,KAAK,WAAW;EACzC,YAAY,KAAK;GAAE,UAAU;GAAU,MAAM;GAAmB,QAAQ,KAAK;GAAI;GAAM,SAAS;EAAqF,CAAC;EACtL,OAAO;GAAE,MAAM;IAAE,GAAG;IAAM,KAAK,EAAE,eAAe,KAAK,cAAc;GAAE;GAAG;EAAY;CACtF;CACA,IAAI,KAAK,eACP,YAAY,KAAK;EAAE,UAAU;EAAU,MAAM;EAAsB,QAAQ,KAAK;EAAI;EAAM,SAAS;CAAyH,CAAC;CAE/N,OAAO;EAAE;EAAM;CAAY;AAC7B;AAGA,IAAa,UAAU,SAA6E,QAAQ,KAAK,KAAK,aAAa;AAUnI,SAAgB,YAAY,MAAgB,QAAkE;CAC5G,IAAI,CAAC,OAAO,IAAI,GAAG,OAAO;EAAE,GAAG;EAAM,QAAQ;CAAS;CACtD,MAAM,MAAM,KAAK,IAAI;CACrB,IAAI,CAAC,QAAQ,OAAO;EAAE,GAAG;EAAM,eAAe;EAAK,QAAQ,KAAK,YAAY,aAAa;CAAU;CACnG,MAAM,MAAoB;EAAE,GAAG;EAAM,eAAe;EAAK,QAAQ;CAAO;CACxE,KAAK,MAAM,KAAK,gBACd,IAAI,OAAO,OAAO,K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