@peripheries/renderer 0.4.1 → 0.6.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.
@@ -0,0 +1,548 @@
1
+ import { _ as EACH_DEFAULT_AS, g as EACH, h as usesStructureLayout, m as structureIssues, y as isEach } from "./structure-Bp7xbPck.js";
2
+ import { DEFAULT_STATE, STATE_NAMES, WALK_DEFAULTS, isStateName } from "@peripheries/runtime";
3
+ //#region packages/renderer/src/core/graph.ts
4
+ function systemsFromProcess(row) {
5
+ const out = {};
6
+ for (const name of STATE_NAMES) {
7
+ const id = row?.[`${name}_system_id`];
8
+ if (typeof id === "string" && id) out[name] = id;
9
+ }
10
+ return out;
11
+ }
12
+ function stateNames(state) {
13
+ const raw = state === void 0 || state === null ? [DEFAULT_STATE] : Array.isArray(state) ? state : [state];
14
+ const names = [];
15
+ const unknown = [];
16
+ for (const s of raw) if (!isStateName(s)) unknown.push(String(s));
17
+ else if (!names.includes(s)) names.push(s);
18
+ return {
19
+ names,
20
+ unknown
21
+ };
22
+ }
23
+ function readField(state, field) {
24
+ if (!field) return state;
25
+ return field.split(".").reduce((o, k) => o === null || o === void 0 ? void 0 : o[k], state);
26
+ }
27
+ function mergeStates(values) {
28
+ let merged = void 0;
29
+ for (const v of values) {
30
+ if (v === void 0) continue;
31
+ merged = isPlainObject(merged) && isPlainObject(v) ? {
32
+ ...merged,
33
+ ...v
34
+ } : v;
35
+ }
36
+ return merged;
37
+ }
38
+ function stateValue(state, names, field) {
39
+ const merged = mergeStates(names.map((n) => state[n] ? state[n].data : void 0));
40
+ return merged === void 0 ? void 0 : readField(merged, field);
41
+ }
42
+ var isPlainObject = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
43
+ function resolveWalkStart(cell, pageGraphNodeId) {
44
+ const own = cell.graph_node_id ?? cell.metadata?.graph_node_id;
45
+ if (own) return {
46
+ graphNodeId: own,
47
+ kind: "cell"
48
+ };
49
+ if (pageGraphNodeId) return {
50
+ graphNodeId: pageGraphNodeId,
51
+ kind: "page"
52
+ };
53
+ return null;
54
+ }
55
+ var RESERVED_LABELS = [
56
+ "_traversal",
57
+ "params",
58
+ "baseProps"
59
+ ];
60
+ var RESERVED$1 = new Set(RESERVED_LABELS);
61
+ var STRICT_REF$1 = /^@([A-Za-z0-9_$-]+)(\.[A-Za-z0-9_$[\]-]+)*$/;
62
+ function referencedLabels(cell) {
63
+ const out = new Set();
64
+ const visit = (v, local) => {
65
+ if (typeof v === "string") {
66
+ const m = STRICT_REF$1.exec(v);
67
+ if (m && !local.has(m[1])) out.add(m[1]);
68
+ } else if (Array.isArray(v)) v.forEach((x) => visit(x, local));
69
+ else if (isEach(v)) {
70
+ visit(v[EACH], local);
71
+ visit(v.map, new Set([...local, typeof v.as === "string" ? v.as : EACH_DEFAULT_AS]));
72
+ } else if (v && typeof v === "object") Object.values(v).forEach((x) => visit(x, local));
73
+ };
74
+ visit(cell.props, new Set());
75
+ visit(cell.conditions, new Set());
76
+ return out;
77
+ }
78
+ function needsWalk(cell, explicit) {
79
+ for (const label of referencedLabels(cell)) {
80
+ if (label === "_traversal") return true;
81
+ if (RESERVED$1.has(label) || explicit.has(label) || cell.data?.queries?.[label]) continue;
82
+ return true;
83
+ }
84
+ return false;
85
+ }
86
+ var sortedOrNull = (v) => Array.isArray(v) && v.length ? [...new Set(v.map(String))].sort() : null;
87
+ function walkRequest(config, start, systems) {
88
+ const diagnostics = [];
89
+ const edgeTypes = sortedOrNull(config.edgeTypes);
90
+ if (!edgeTypes) return { diagnostics: [{
91
+ severity: "error",
92
+ code: "WALK_EDGE_TYPES_REQUIRED",
93
+ message: "traversal.edgeTypes is required: without it a walk follows every edge type"
94
+ }] };
95
+ const direction = config.direction ?? WALK_DEFAULTS.direction;
96
+ if (![
97
+ "incoming",
98
+ "outgoing",
99
+ "both"
100
+ ].includes(direction)) return { diagnostics: [{
101
+ severity: "error",
102
+ code: "WALK_BAD_DIRECTION",
103
+ message: `traversal.direction "${direction}" isn't incoming, outgoing or both`
104
+ }] };
105
+ const requested = config.maxNodes ?? WALK_DEFAULTS.maxNodes;
106
+ if (requested > WALK_DEFAULTS.maxNodesCeiling) diagnostics.push({
107
+ severity: "warning",
108
+ code: "WALK_MAX_NODES_CLAMPED",
109
+ message: `traversal.maxNodes ${requested} is above ${WALK_DEFAULTS.maxNodesCeiling}; clamped`
110
+ });
111
+ const { names, unknown } = stateNames(config.include_state);
112
+ for (const u of unknown) diagnostics.push({
113
+ severity: "error",
114
+ code: "STATE_UNKNOWN_NAME",
115
+ message: `include_state "${u}" isn't a system name (${STATE_NAMES.join(", ")})`
116
+ });
117
+ const states = [];
118
+ for (const name of names) {
119
+ const systemId = systems[name];
120
+ if (systemId) states.push({
121
+ name,
122
+ systemId
123
+ });
124
+ else diagnostics.push({
125
+ severity: "error",
126
+ code: "STATE_UNKNOWN_SYSTEM",
127
+ message: `the page's process has no ${name} system`
128
+ });
129
+ }
130
+ return {
131
+ request: {
132
+ start,
133
+ direction,
134
+ edgeTypes,
135
+ nodeTypes: sortedOrNull(config.nodeTypes),
136
+ maxDepth: config.maxDepth ?? WALK_DEFAULTS.maxDepth,
137
+ maxNodes: Math.min(requested, WALK_DEFAULTS.maxNodesCeiling),
138
+ states,
139
+ excludeNodeTypes: sortedOrNull(config.excludeNodeTypes),
140
+ excludeEdgeTypes: sortedOrNull(config.excludeEdgeTypes)
141
+ },
142
+ diagnostics
143
+ };
144
+ }
145
+ var walkKey = (r) => JSON.stringify([
146
+ r.start.graphNodeId,
147
+ r.direction,
148
+ r.edgeTypes,
149
+ r.nodeTypes,
150
+ r.maxDepth,
151
+ r.maxNodes,
152
+ r.states.map((s) => s.systemId),
153
+ r.excludeNodeTypes,
154
+ r.excludeEdgeTypes
155
+ ]);
156
+ function isNoise(node, start) {
157
+ if (node.graph_node_id === start.graphNodeId) return true;
158
+ if (node.node_type === "project_page_cell") return true;
159
+ return start.kind === "page" && node.content?.role === "page";
160
+ }
161
+ function readWalk(raw, request) {
162
+ const diagnostics = [];
163
+ if (raw.truncated) diagnostics.push({
164
+ severity: "warning",
165
+ code: "WALK_TRUNCATED",
166
+ message: `the walk stopped at maxNodes ${request.maxNodes}; nodes past it are missing`
167
+ });
168
+ const nodes = raw.nodes.filter((n) => !isNoise(n, request.start)).map((n) => {
169
+ const state = {};
170
+ for (const { name, systemId } of request.states) state[name] = n.state?.[systemId] ?? null;
171
+ return {
172
+ ...n,
173
+ state
174
+ };
175
+ });
176
+ const kept = new Set(nodes.map((n) => n.id));
177
+ const edges = raw.edges.filter((e) => kept.has(e.source) && kept.has(e.target));
178
+ const byLabel = new Map();
179
+ for (const n of nodes) {
180
+ const label = n.content?.binding_key;
181
+ if (typeof label !== "string" || !label) continue;
182
+ const field = typeof n.content?.field === "string" ? n.content.field : void 0;
183
+ byLabel.set(label, [...byLabel.get(label) ?? [], {
184
+ label,
185
+ graph_node_id: n.graph_node_id,
186
+ field
187
+ }]);
188
+ }
189
+ const bindings = [];
190
+ for (const [label, found] of byLabel) if (found.length === 1) bindings.push(found[0]);
191
+ else diagnostics.push({
192
+ severity: "error",
193
+ code: "BINDING_DUPLICATE_KEY",
194
+ label,
195
+ message: `${found.length} nodes the walk reached share binding_key "${label}"; it binds nothing`
196
+ });
197
+ return {
198
+ traversal: {
199
+ nodes,
200
+ edges
201
+ },
202
+ bindings,
203
+ diagnostics
204
+ };
205
+ }
206
+ //#endregion
207
+ //#region packages/renderer/src/core/validate.ts
208
+ var words = (name) => name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase().split(/[\s_-]+/).filter(Boolean);
209
+ function editDistance(a, b) {
210
+ let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
211
+ for (let i = 1; i <= a.length; i++) {
212
+ const row = [i];
213
+ for (let j = 1; j <= b.length; j++) row[j] = Math.min(prev[j] + 1, row[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
214
+ prev = row;
215
+ }
216
+ return prev[b.length];
217
+ }
218
+ function nearestNames(name, names, limit = 3) {
219
+ const lower = name.toLowerCase();
220
+ const own = words(name);
221
+ const scored = [];
222
+ for (const candidate of names) {
223
+ const d = editDistance(lower, candidate.toLowerCase());
224
+ const theirs = words(candidate);
225
+ const byWords = own.length > 0 && own.every((w) => theirs.some((t) => t.startsWith(w)));
226
+ if (d <= Math.max(2, Math.floor(lower.length / 3)) || byWords) scored.push([candidate, byWords ? Math.min(d, 1) : d]);
227
+ }
228
+ return scored.sort((a, b) => a[1] - b[1] || a[0].localeCompare(b[0])).slice(0, limit).map(([n]) => n);
229
+ }
230
+ var RESPONSIVE_BUCKETS = [
231
+ "narrow",
232
+ "compact",
233
+ "wide"
234
+ ];
235
+ var STORE_SCOPES = ["page", "project"];
236
+ var WALK_DIRECTIONS = [
237
+ "incoming",
238
+ "outgoing",
239
+ "both"
240
+ ];
241
+ var BUCKETS = RESPONSIVE_BUCKETS;
242
+ var SCOPES = STORE_SCOPES;
243
+ var DIRECTIONS = WALK_DIRECTIONS;
244
+ function checkBindings(queries, path, push, cellId, template = false) {
245
+ if (queries === void 0) return;
246
+ if (!queries || typeof queries !== "object" || Array.isArray(queries)) {
247
+ push({
248
+ severity: "error",
249
+ code: "BINDING_INVALID",
250
+ cellId,
251
+ path,
252
+ message: "data.queries must be an object of label → binding"
253
+ });
254
+ return;
255
+ }
256
+ for (const [label, raw] of Object.entries(queries)) {
257
+ const at = `${path}.${label}`;
258
+ const b = raw;
259
+ if (!b || typeof b !== "object") {
260
+ push({
261
+ severity: "error",
262
+ code: "BINDING_INVALID",
263
+ cellId,
264
+ label,
265
+ path: at,
266
+ message: `"${label}" isn't a binding`
267
+ });
268
+ continue;
269
+ }
270
+ if (typeof b.registry === "string") {
271
+ push({
272
+ severity: "warning",
273
+ code: "UNSUPPORTED_REGISTRY_BINDING",
274
+ cellId,
275
+ label,
276
+ path: at,
277
+ message: `"${label}" names the registry query ${b.registry}, which the host no longer runs (R2 maps or retires it)`
278
+ });
279
+ continue;
280
+ }
281
+ if (typeof b.graph_node_id !== "string" || !b.graph_node_id) {
282
+ if (!template) push({
283
+ severity: "error",
284
+ code: "BINDING_INVALID",
285
+ cellId,
286
+ label,
287
+ path: at,
288
+ message: `"${label}" names no graph_node_id`
289
+ });
290
+ continue;
291
+ }
292
+ if (b.as !== void 0 && b.as !== "value" && b.as !== "record") push({
293
+ severity: "error",
294
+ code: "BINDING_INVALID",
295
+ cellId,
296
+ label,
297
+ path: `${at}.as`,
298
+ message: `"${label}".as is "${String(b.as)}"; expected value or record`
299
+ });
300
+ for (const s of b.state === void 0 ? [] : Array.isArray(b.state) ? b.state : [b.state]) if (!isStateName(s)) push({
301
+ severity: "error",
302
+ code: "STATE_UNKNOWN_NAME",
303
+ cellId,
304
+ label,
305
+ path: `${at}.state`,
306
+ message: `"${label}" names state "${String(s)}"; expected one of ${STATE_NAMES.join(", ")}`
307
+ });
308
+ }
309
+ }
310
+ function checkTraversal(t, path, push, cellId) {
311
+ if (t === void 0) return;
312
+ const w = t;
313
+ if (!Array.isArray(w.edgeTypes) || w.edgeTypes.length === 0) push({
314
+ severity: "error",
315
+ code: "WALK_EDGE_TYPES_REQUIRED",
316
+ cellId,
317
+ path: `${path}.edgeTypes`,
318
+ message: "traversal.edgeTypes is required: without it a walk follows every edge type"
319
+ });
320
+ if (w.direction !== void 0 && !DIRECTIONS.includes(String(w.direction))) push({
321
+ severity: "error",
322
+ code: "WALK_BAD_DIRECTION",
323
+ cellId,
324
+ path: `${path}.direction`,
325
+ message: `traversal.direction "${String(w.direction)}" isn't incoming, outgoing or both`
326
+ });
327
+ if (Array.isArray(w.nodeTypes) && w.nodeTypes.length === 0) push({
328
+ severity: "warning",
329
+ code: "WALK_NODE_TYPES_EMPTY",
330
+ cellId,
331
+ path: `${path}.nodeTypes`,
332
+ message: "traversal.nodeTypes is empty, which filters nothing: leave it out, or name the types the walk may enter"
333
+ });
334
+ if (typeof w.maxNodes === "number" && w.maxNodes > 500) push({
335
+ severity: "warning",
336
+ code: "WALK_MAX_NODES_CLAMPED",
337
+ cellId,
338
+ path: `${path}.maxNodes`,
339
+ message: `traversal.maxNodes ${w.maxNodes} is above 500; clamped`
340
+ });
341
+ for (const s of Array.isArray(w.include_state) ? w.include_state : []) if (!isStateName(s)) push({
342
+ severity: "error",
343
+ code: "STATE_UNKNOWN_NAME",
344
+ cellId,
345
+ path: `${path}.include_state`,
346
+ message: `include_state "${String(s)}" isn't a system name`
347
+ });
348
+ }
349
+ var STRICT_REF = /^@[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$[\]-]+)*$/;
350
+ var LABEL = /^[A-Za-z_][A-Za-z0-9_$-]*$/;
351
+ var EACH_KEYS = new Set([
352
+ EACH,
353
+ "as",
354
+ "map"
355
+ ]);
356
+ var RESERVED = new Set(RESERVED_LABELS);
357
+ function checkProjections(value, path, push, cellId) {
358
+ if (Array.isArray(value)) return value.forEach((v, i) => checkProjections(v, `${path}[${i}]`, push, cellId));
359
+ if (!value || typeof value !== "object") return;
360
+ if (!isEach(value)) {
361
+ for (const [k, v] of Object.entries(value)) checkProjections(v, `${path}.${k}`, push, cellId);
362
+ return;
363
+ }
364
+ const bad = (message) => push({
365
+ severity: "error",
366
+ code: "EACH_INVALID",
367
+ cellId,
368
+ path,
369
+ message
370
+ });
371
+ if (typeof value["@each"] !== "string" || !STRICT_REF.test(value["@each"])) bad(`"@each" must be a whole \`@label.path\` reference to a list`);
372
+ if (value.as !== void 0 && (typeof value.as !== "string" || !LABEL.test(value.as) || RESERVED.has(value.as))) bad(`"as" must be a label name that isn't reserved (${RESERVED_LABELS.join(", ")})`);
373
+ if (value.map === void 0) bad("a projection needs a \"map\": what each element becomes");
374
+ const extra = Object.keys(value).filter((k) => !EACH_KEYS.has(k));
375
+ if (extra.length) bad(`a projection takes only "@each", "as" and "map", not ${extra.map((k) => `"${k}"`).join(", ")}`);
376
+ checkProjections(value.map, `${path}.map`, push, cellId);
377
+ }
378
+ function checkStore(cell, path, push) {
379
+ for (const [kind, key] of [
380
+ ["selections", "channel"],
381
+ ["viewState", "key"],
382
+ ["live", "channel"]
383
+ ]) for (const [name, decl] of Object.entries(cell[kind] ?? {})) {
384
+ const at = `${path}.${kind}.${name}`;
385
+ if (typeof decl?.[key] !== "string" || !decl[key]) push({
386
+ severity: "error",
387
+ code: "STORE_INVALID",
388
+ cellId: cell.id,
389
+ path: at,
390
+ message: `${kind}.${name} names no ${key}`
391
+ });
392
+ if (kind !== "live" && !SCOPES.includes(String(decl?.scope))) push({
393
+ severity: "error",
394
+ code: "STORE_INVALID",
395
+ cellId: cell.id,
396
+ path: `${at}.scope`,
397
+ message: `${kind}.${name}.scope must be page or project`
398
+ });
399
+ }
400
+ }
401
+ function validateCell(cell, catalog, path = "cell", ids, options = {}) {
402
+ const out = [];
403
+ const push = (d) => out.push(d);
404
+ if (typeof cell?.id !== "string" || !cell.id) {
405
+ push({
406
+ severity: "error",
407
+ code: "CELL_NO_ID",
408
+ path,
409
+ message: "a cell needs an id"
410
+ });
411
+ return out;
412
+ }
413
+ const cellId = cell.id;
414
+ const ref = cell.ref;
415
+ if (ref !== void 0 && (typeof ref?.graph_node_id !== "string" || !ref.graph_node_id)) push({
416
+ severity: "error",
417
+ code: "REF_INVALID",
418
+ cellId,
419
+ path: `${path}.ref`,
420
+ message: "ref names no graph_node_id"
421
+ });
422
+ const nodeManaged = Boolean(ref?.graph_node_id) || Boolean(cell.graph_node_id) && !cell.component;
423
+ if (!ref && cell.graph_node_id && !cell.component) push({
424
+ severity: "legacy",
425
+ code: "LEGACY_THIN_REF",
426
+ cellId,
427
+ path,
428
+ message: "a thin ref `{ id, graph_node_id }`: publish it as `{ id, ref: { graph_node_id } }`"
429
+ });
430
+ else if (!ref && cell.graph_node_id) push({
431
+ severity: "legacy",
432
+ code: "LEGACY_INLINE_NODE",
433
+ cellId,
434
+ path,
435
+ 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"
436
+ });
437
+ if (!nodeManaged && !cell.component) push({
438
+ severity: "error",
439
+ code: "CELL_NO_COMPONENT",
440
+ cellId,
441
+ path,
442
+ message: "an inline cell needs a component"
443
+ });
444
+ if (cell.component && catalog && !cell.component.startsWith("@core/")) {
445
+ const entry = catalog.components[cell.component];
446
+ if (!entry) {
447
+ const suggestions = nearestNames(cell.component, Object.keys(catalog.components));
448
+ push({
449
+ severity: nodeManaged ? "warning" : "error",
450
+ code: "CELL_UNKNOWN_COMPONENT",
451
+ cellId,
452
+ path: `${path}.component`,
453
+ message: `no bundle in scope exports ${cell.component}${suggestions.length ? `; did you mean ${suggestions.join(", ")}?` : ""}`,
454
+ ...suggestions.length ? { suggestions } : {}
455
+ });
456
+ } else {
457
+ const schema = entry.props_schema;
458
+ for (const prop of schema?.required ?? []) if ((prop === "children" ? cell.props?.children ?? (cell.children?.length ? cell.children : void 0) : cell.props?.[prop]) === void 0) push({
459
+ severity: nodeManaged ? "warning" : "error",
460
+ code: "PROP_REQUIRED",
461
+ cellId,
462
+ path: `${path}.props.${prop}`,
463
+ message: `${cell.component} requires ${prop}`
464
+ });
465
+ const declared = schema?.properties;
466
+ if (declared && schema?.additionalProperties !== true && typeof schema?.additionalProperties !== "object") {
467
+ for (const prop of Object.keys(cell.props ?? {})) if (prop !== "children" && !(prop in declared)) push({
468
+ severity: "warning",
469
+ code: "PROP_UNKNOWN",
470
+ cellId,
471
+ path: `${path}.props.${prop}`,
472
+ message: `${cell.component} declares no prop ${prop}`
473
+ });
474
+ }
475
+ }
476
+ }
477
+ for (const child of cell.children ?? []) if (child === cellId) push({
478
+ severity: "error",
479
+ code: "CELL_CHILD_CYCLE",
480
+ cellId,
481
+ path: `${path}.children`,
482
+ message: "a cell lists itself as a child"
483
+ });
484
+ else if (ids && !ids.has(child)) push({
485
+ severity: "error",
486
+ code: "CELL_UNKNOWN_CHILD",
487
+ cellId,
488
+ path: `${path}.children`,
489
+ message: `child cell "${child}" is not on the page`
490
+ });
491
+ checkBindings(cell.data?.queries, `${path}.data.queries`, push, cellId, options.template);
492
+ checkProjections(cell.props, `${path}.props`, push, cellId);
493
+ checkProjections(cell.conditions, `${path}.conditions`, push, cellId);
494
+ checkTraversal(cell.traversal, `${path}.traversal`, push, cellId);
495
+ checkStore(cell, path, push);
496
+ for (const key of [
497
+ "hideWhen",
498
+ "showWhen",
499
+ "stackWhen",
500
+ "truncateWhen"
501
+ ]) {
502
+ const v = cell.layout?.[key];
503
+ if (v !== void 0 && !BUCKETS.includes(v)) push({
504
+ severity: "warning",
505
+ code: "LAYOUT_INVALID",
506
+ cellId,
507
+ path: `${path}.layout.${key}`,
508
+ message: `layout.${key} "${v}" isn't narrow, compact or wide`
509
+ });
510
+ }
511
+ return out;
512
+ }
513
+ function validatePage(page, catalog) {
514
+ const options = { template: Boolean(page.is_template) };
515
+ const out = [];
516
+ const cells = page.content?.cells;
517
+ if (cells !== void 0 && !Array.isArray(cells)) return [{
518
+ severity: "error",
519
+ code: "PAGE_INVALID",
520
+ path: "content.cells",
521
+ message: "content.cells must be a list"
522
+ }];
523
+ const list = cells ?? [];
524
+ const ids = new Set();
525
+ list.forEach((cell, i) => {
526
+ if (typeof cell?.id === "string" && ids.has(cell.id)) out.push({
527
+ severity: "error",
528
+ code: "CELL_DUPLICATE_ID",
529
+ cellId: cell.id,
530
+ path: `content.cells[${i}].id`,
531
+ message: `two cells share the id "${cell.id}"`
532
+ });
533
+ if (typeof cell?.id === "string") ids.add(cell.id);
534
+ });
535
+ list.forEach((cell, i) => out.push(...validateCell(cell, catalog, `content.cells[${i}]`, ids, options)));
536
+ checkBindings(page.content?.data?.queries, "content.data.queries", (d) => out.push(d), void 0, options.template);
537
+ if (usesStructureLayout(page.layout)) for (const issue of structureIssues(page.layout?.structure, list)) out.push({
538
+ severity: "error",
539
+ code: "STRUCTURE_INVALID",
540
+ path: "layout.structure",
541
+ message: issue
542
+ });
543
+ return out;
544
+ }
545
+ //#endregion
546
+ export { walkKey as _, validateCell as a, mergeStates as c, readWalk as d, referencedLabels as f, systemsFromProcess as g, stateValue as h, nearestNames as i, needsWalk as l, stateNames as m, STORE_SCOPES as n, validatePage as o, resolveWalkStart as p, WALK_DIRECTIONS as r, RESERVED_LABELS as s, RESPONSIVE_BUCKETS as t, readField as u, walkRequest as v };
547
+
548
+ //# sourceMappingURL=validate-ADfCrhn-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-ADfCrhn-.js","names":["RESERVED","STRICT_REF"],"sources":["../../src/core/graph.ts","../../src/core/validate.ts"],"mappings":";;;AA4CA,SAAgB,mBAAmB,KAAiE;CAClG,MAAM,MAAsB,CAAC;CAC7B,KAAK,MAAM,QAAQ,aAAa;EAC9B,MAAM,KAAK,MAAM,GAAG,KAAK;EACzB,IAAI,OAAO,OAAO,YAAY,IAAI,IAAI,QAAQ;CAChD;CACA,OAAO;AACT;AAGA,SAAgB,WAAW,OAA2D;CACpF,MAAM,MAAM,UAAU,KAAA,KAAa,UAAU,OAAO,CAAC,aAAa,IAAI,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CAC3G,MAAM,QAAqB,CAAC;CAC5B,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,KAAK,KACd,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC;MACtC,IAAI,CAAC,MAAM,SAAS,CAAC,GAAG,MAAM,KAAK,CAAC;CAE3C,OAAO;EAAE;EAAO;CAAQ;AAC1B;AAGA,SAAgB,UAAU,OAAgB,OAAyB;CACjE,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MAAM,MAAM,GAAG,CAAC,CAAC,QAAiB,GAAG,MAAO,MAAM,QAAQ,MAAM,KAAA,IAAY,KAAA,IAAa,EAA8B,IAAK,KAAK;AAC1I;AAOA,SAAgB,YAAY,QAAqC;CAC/D,IAAI,SAAkB,KAAA;CACtB,KAAK,MAAM,KAAK,QAAQ;EACtB,IAAI,MAAM,KAAA,GAAW;EACrB,SAAS,cAAc,MAAM,KAAK,cAAc,CAAC,IAAI;G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