@prisma/orm-framework 8.0.0-rc.12-dev.14 → 8.0.0-rc.12-dev.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/ast-helpers-2XRnkQEO-BxG5qx3Q.mjs +386 -0
  2. package/dist/ast-helpers-2XRnkQEO-BxG5qx3Q.mjs.map +1 -0
  3. package/dist/authoring-BffMNBO5.d.mts +43 -0
  4. package/dist/authoring-BffMNBO5.d.mts.map +1 -0
  5. package/dist/authoring-DbG78eh2.mjs +88 -0
  6. package/dist/authoring-DbG78eh2.mjs.map +1 -0
  7. package/dist/{utils-DMAM0unR.mjs → canonicalize-json-ZPawceQR-Dua1VNEB.mjs} +2 -2
  8. package/dist/canonicalize-json-ZPawceQR-Dua1VNEB.mjs.map +1 -0
  9. package/dist/components.d.mts +5 -5
  10. package/dist/components.mjs +5 -5
  11. package/dist/components__authoring.d.mts +2 -2
  12. package/dist/components__authoring.mjs +2 -2
  13. package/dist/components__control.d.mts +2 -2
  14. package/dist/components__control.mjs +2 -2
  15. package/dist/components__psl-ast.d.mts +3 -3
  16. package/dist/components__psl-ast.mjs +2 -2
  17. package/dist/components__utils.mjs +1 -1
  18. package/dist/{config-types-DgoEWkgA.d.mts → config-types-CWeyMWBV.d.mts} +17 -14
  19. package/dist/config-types-CWeyMWBV.d.mts.map +1 -0
  20. package/dist/{config-types-BZjCZ4qx.mjs → config-types-D0mYyP62.mjs} +25 -2
  21. package/dist/config-types-D0mYyP62.mjs.map +1 -0
  22. package/dist/config.d.mts +2 -2
  23. package/dist/config.mjs +2 -2
  24. package/dist/config__config-types.d.mts +2 -2
  25. package/dist/config__config-types.mjs +2 -2
  26. package/dist/contract-authoring.d.mts +1 -1
  27. package/dist/{control-Bc_dos9-.d.mts → control-BTo8rNKi.d.mts} +23 -3
  28. package/dist/{control-Bc_dos9-.d.mts.map → control-BTo8rNKi.d.mts.map} +1 -1
  29. package/dist/{control-BjK3Jrmp.mjs → control-CS45l6kB.mjs} +5 -2
  30. package/dist/control-CS45l6kB.mjs.map +1 -0
  31. package/dist/{declarations-D79GooqC-CcAbqTsq.mjs → declarations-43E1JFHg-DGBa0YH_.mjs} +8 -388
  32. package/dist/declarations-43E1JFHg-DGBa0YH_.mjs.map +1 -0
  33. package/dist/errors.d.mts +1 -1
  34. package/dist/errors__execution.d.mts +1 -1
  35. package/dist/{execution-oqC6O8ES.d.mts → execution-BsiK0DjS.d.mts} +2 -2
  36. package/dist/{execution-oqC6O8ES.d.mts.map → execution-BsiK0DjS.d.mts.map} +1 -1
  37. package/dist/{parse-SHpUIBnv-BvPsKLqw.d.mts → parse-DZRO_CK2-D8YAg23m.d.mts} +10 -18
  38. package/dist/{parse-SHpUIBnv-BvPsKLqw.d.mts.map → parse-DZRO_CK2-D8YAg23m.d.mts.map} +1 -1
  39. package/dist/{parse-DN-F4ASD-ClJdPlzj.mjs → parse-Km2Ne67K-CakfHP9f.mjs} +26 -29
  40. package/dist/parse-Km2Ne67K-CakfHP9f.mjs.map +1 -0
  41. package/dist/{psl-ast-BKF2fYgk-D6YxdCnP.d.mts → psl-ast-BePuKena-AYNqFKCE.d.mts} +8 -3
  42. package/dist/{psl-ast-BKF2fYgk-D6YxdCnP.d.mts.map → psl-ast-BePuKena-AYNqFKCE.d.mts.map} +1 -1
  43. package/dist/{psl-ast-Bu85Lu-k.d.mts → psl-ast-Cec7KbOn.d.mts} +2 -2
  44. package/dist/{psl-ast-Bu85Lu-k.d.mts.map → psl-ast-Cec7KbOn.d.mts.map} +1 -1
  45. package/dist/{psl-ast-DUCvVXbB.mjs → psl-ast-DYtFdynZ.mjs} +7 -2
  46. package/dist/psl-ast-DYtFdynZ.mjs.map +1 -0
  47. package/dist/psl-parser.d.mts +14 -7
  48. package/dist/psl-parser.d.mts.map +1 -1
  49. package/dist/psl-parser.mjs +10 -65
  50. package/dist/psl-parser.mjs.map +1 -1
  51. package/dist/psl-parser__format.mjs +23 -30
  52. package/dist/psl-parser__format.mjs.map +1 -1
  53. package/dist/psl-parser__interpret.d.mts +15 -7
  54. package/dist/psl-parser__interpret.d.mts.map +1 -1
  55. package/dist/psl-parser__interpret.mjs +24 -3
  56. package/dist/psl-parser__interpret.mjs.map +1 -1
  57. package/dist/psl-parser__syntax.d.mts +3 -3
  58. package/dist/psl-parser__syntax.mjs +3 -2
  59. package/dist/psl-parser__syntax.mjs.map +1 -1
  60. package/dist/psl-parser__tokenizer.d.mts +1 -1
  61. package/dist/psl-parser__tokenizer.mjs +1 -1
  62. package/dist/psl-printer.d.mts +8 -3
  63. package/dist/psl-printer.d.mts.map +1 -1
  64. package/dist/psl-printer.mjs +16 -9
  65. package/dist/psl-printer.mjs.map +1 -1
  66. package/dist/resolve-D_lZ54qh-DqOQkoMT.mjs +145 -0
  67. package/dist/resolve-D_lZ54qh-DqOQkoMT.mjs.map +1 -0
  68. package/dist/{symbol-table-DVPEY1fq-C5mC1wdG.d.mts → symbol-table-CRtoii4t-DubuO_5j.d.mts} +5 -5
  69. package/dist/{symbol-table-DVPEY1fq-C5mC1wdG.d.mts.map → symbol-table-CRtoii4t-DubuO_5j.d.mts.map} +1 -1
  70. package/dist/{tokenizer-CFsbtfFw-BnfUBepb.mjs → tokenizer-BMz7z2KR-J0yZ4im3.mjs} +11 -3
  71. package/dist/tokenizer-BMz7z2KR-J0yZ4im3.mjs.map +1 -0
  72. package/dist/{tokenizer-DcYI0Xrq-C-nNE9mE.d.mts → tokenizer-DW30uwhx-BHsWTwYk.d.mts} +8 -3
  73. package/dist/tokenizer-DW30uwhx-BHsWTwYk.d.mts.map +1 -0
  74. package/package.json +16 -15
  75. package/dist/authoring-D_Czkofy.mjs +0 -35
  76. package/dist/authoring-D_Czkofy.mjs.map +0 -1
  77. package/dist/authoring-DjeaZGzp.d.mts +0 -27
  78. package/dist/authoring-DjeaZGzp.d.mts.map +0 -1
  79. package/dist/config-types-BZjCZ4qx.mjs.map +0 -1
  80. package/dist/config-types-DgoEWkgA.d.mts.map +0 -1
  81. package/dist/control-BjK3Jrmp.mjs.map +0 -1
  82. package/dist/declarations-D79GooqC-CcAbqTsq.mjs.map +0 -1
  83. package/dist/diagnostic-Esyl8Qw1-Cd6SnWPN.mjs +0 -83
  84. package/dist/diagnostic-Esyl8Qw1-Cd6SnWPN.mjs.map +0 -1
  85. package/dist/parse-DN-F4ASD-ClJdPlzj.mjs.map +0 -1
  86. package/dist/psl-ast-DUCvVXbB.mjs.map +0 -1
  87. package/dist/tokenizer-CFsbtfFw-BnfUBepb.mjs.map +0 -1
  88. package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +0 -1
  89. package/dist/utils-DMAM0unR.mjs.map +0 -1
@@ -0,0 +1,386 @@
1
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/ast-helpers-2XRnkQEO.mjs
2
+ /**
3
+ * A token in the red tree. Unlike the green-layer {@link Token} (kind + text
4
+ * only), a red token also carries its absolute `offset` within the source and a
5
+ * link back to its `parent` {@link SyntaxNode}, so a cursor anchored on a token
6
+ * can walk outward (parent, previous/next token, siblings) without re-scanning
7
+ * from the document root.
8
+ */
9
+ var SyntaxToken = class {
10
+ green;
11
+ kind;
12
+ text;
13
+ offset;
14
+ parent;
15
+ /** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */
16
+ index;
17
+ constructor(green, offset, parent, index) {
18
+ this.green = green;
19
+ this.kind = green.kind;
20
+ this.text = green.text;
21
+ this.offset = offset;
22
+ this.parent = parent;
23
+ this.index = index;
24
+ }
25
+ get textLength() {
26
+ return this.text.length;
27
+ }
28
+ get endOffset() {
29
+ return this.offset + this.textLength;
30
+ }
31
+ /** Whether `offset` falls within this token, inclusive of both ends. */
32
+ isInside(offset) {
33
+ return offset >= this.offset && offset <= this.endOffset;
34
+ }
35
+ isOutside(offset) {
36
+ return !this.isInside(offset);
37
+ }
38
+ /** The sibling element immediately after this token within its parent. */
39
+ get nextSiblingOrToken() {
40
+ return this.parent.childAt(this.index + 1);
41
+ }
42
+ /** The sibling element immediately before this token within its parent. */
43
+ get prevSiblingOrToken() {
44
+ return this.parent.childAt(this.index - 1);
45
+ }
46
+ /** The next token in document order, crossing node boundaries. */
47
+ get nextToken() {
48
+ for (let el = climbingNext(this); el !== void 0; el = climbingNext(el)) {
49
+ const token = firstToken(el);
50
+ if (token !== void 0) return token;
51
+ }
52
+ }
53
+ /** The previous token in document order, crossing node boundaries. */
54
+ get prevToken() {
55
+ for (let el = climbingPrev(this); el !== void 0; el = climbingPrev(el)) {
56
+ const token = lastToken(el);
57
+ if (token !== void 0) return token;
58
+ }
59
+ }
60
+ };
61
+ var TokenAtOffset = class TokenAtOffset {
62
+ #state;
63
+ constructor(state) {
64
+ this.#state = state;
65
+ }
66
+ static none() {
67
+ return new TokenAtOffset({ kind: "none" });
68
+ }
69
+ static single(token) {
70
+ return new TokenAtOffset({
71
+ kind: "single",
72
+ token
73
+ });
74
+ }
75
+ static between(left, right) {
76
+ return new TokenAtOffset({
77
+ kind: "between",
78
+ left,
79
+ right
80
+ });
81
+ }
82
+ get isEmpty() {
83
+ return this.#state.kind === "none";
84
+ }
85
+ get isBetween() {
86
+ return this.#state.kind === "between";
87
+ }
88
+ leftBiased() {
89
+ switch (this.#state.kind) {
90
+ case "none": return;
91
+ case "single": return this.#state.token;
92
+ case "between": return this.#state.left;
93
+ }
94
+ }
95
+ rightBiased() {
96
+ switch (this.#state.kind) {
97
+ case "none": return;
98
+ case "single": return this.#state.token;
99
+ case "between": return this.#state.right;
100
+ }
101
+ }
102
+ };
103
+ var SyntaxNode = class SyntaxNode {
104
+ green;
105
+ offset;
106
+ parent;
107
+ /** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */
108
+ index;
109
+ #childSlots;
110
+ #childOffsets;
111
+ constructor(green, offset, parent, index) {
112
+ this.green = green;
113
+ this.offset = offset;
114
+ this.parent = parent;
115
+ this.index = index;
116
+ }
117
+ #slots() {
118
+ let slots = this.#childSlots;
119
+ if (slots === void 0) {
120
+ slots = new Array(this.green.children.length).fill(void 0);
121
+ this.#childSlots = slots;
122
+ }
123
+ return slots;
124
+ }
125
+ #childOffset(index) {
126
+ let offsets = this.#childOffsets;
127
+ if (offsets === void 0) {
128
+ offsets = [];
129
+ this.#childOffsets = offsets;
130
+ }
131
+ for (let known = offsets.length; known <= index; known++) {
132
+ const previousOffset = offsets[known - 1];
133
+ const previousChild = this.green.children[known - 1];
134
+ offsets.push(previousOffset === void 0 || previousChild === void 0 ? this.offset : previousOffset + elementTextLength(previousChild));
135
+ }
136
+ return offsets[index] ?? this.offset;
137
+ }
138
+ childAt(index) {
139
+ const green = this.green.children[index];
140
+ if (green === void 0) return void 0;
141
+ const slots = this.#slots();
142
+ const cached = slots[index];
143
+ if (cached !== void 0) return cached;
144
+ const created = wrapElement(green, this.#childOffset(index), this, index);
145
+ slots[index] = created;
146
+ return created;
147
+ }
148
+ get kind() {
149
+ return this.green.kind;
150
+ }
151
+ get textLength() {
152
+ return this.green.textLength;
153
+ }
154
+ get endOffset() {
155
+ return this.offset + this.textLength;
156
+ }
157
+ /** Whether `offset` falls within this node, inclusive of both ends. */
158
+ isInside(offset) {
159
+ return offset >= this.offset && offset <= this.endOffset;
160
+ }
161
+ isOutside(offset) {
162
+ return !this.isInside(offset);
163
+ }
164
+ get firstChild() {
165
+ return this.childAt(0);
166
+ }
167
+ get lastChild() {
168
+ return this.childAt(this.green.children.length - 1);
169
+ }
170
+ get nextSibling() {
171
+ return this.parent?.childAt(this.index + 1);
172
+ }
173
+ get prevSibling() {
174
+ return this.parent?.childAt(this.index - 1);
175
+ }
176
+ /** The sibling element immediately after this node within its parent. */
177
+ get nextSiblingOrToken() {
178
+ return this.nextSibling;
179
+ }
180
+ /** The sibling element immediately before this node within its parent. */
181
+ get prevSiblingOrToken() {
182
+ return this.prevSibling;
183
+ }
184
+ /** The first token in this subtree (depth-first), or `undefined` if empty. */
185
+ get firstToken() {
186
+ return firstToken(this);
187
+ }
188
+ /** The last token in this subtree (depth-first), or `undefined` if empty. */
189
+ get lastToken() {
190
+ return lastToken(this);
191
+ }
192
+ *children() {
193
+ const count = this.green.children.length;
194
+ for (let index = 0; index < count; index++) {
195
+ const child = this.childAt(index);
196
+ if (child !== void 0) yield child;
197
+ }
198
+ }
199
+ *childNodes() {
200
+ for (const child of this.children()) if (child instanceof SyntaxNode) yield child;
201
+ }
202
+ root() {
203
+ let current = this;
204
+ for (const parent of this.ancestors()) current = parent;
205
+ return current;
206
+ }
207
+ *ancestors() {
208
+ let current = this.parent;
209
+ while (current) {
210
+ yield current;
211
+ current = current.parent;
212
+ }
213
+ }
214
+ /** The nearest match, testing this node itself before walking its ancestors. */
215
+ findAncestor(cast) {
216
+ const self = cast(this);
217
+ if (self !== void 0) return self;
218
+ for (const ancestor of this.ancestors()) {
219
+ const result = cast(ancestor);
220
+ if (result !== void 0) return result;
221
+ }
222
+ }
223
+ *descendants() {
224
+ const stack = [this];
225
+ for (let el = stack.pop(); el !== void 0; el = stack.pop()) {
226
+ yield el;
227
+ if (el instanceof SyntaxNode) {
228
+ const children = Array.from(el.children());
229
+ for (let i = children.length - 1; i >= 0; i--) {
230
+ const child = children[i];
231
+ if (child !== void 0) stack.push(child);
232
+ }
233
+ }
234
+ }
235
+ }
236
+ *tokens() {
237
+ for (const el of this.descendants()) if (el instanceof SyntaxToken) yield el;
238
+ }
239
+ /**
240
+ * The token(s) at `offset`. The between-two-tokens case (offset exactly on a
241
+ * token seam) is represented explicitly so callers can left/right bias.
242
+ */
243
+ tokenAtOffset(offset) {
244
+ return tokenAtOffsetOf(this, offset);
245
+ }
246
+ /**
247
+ * The smallest element fully containing the range `[start, end]`. At a seam
248
+ * (and for empty ranges) the left-hand element is preferred, matching
249
+ * {@link containsOffset}'s inclusive span.
250
+ */
251
+ coveringElement(start, end) {
252
+ let result = this;
253
+ for (;;) {
254
+ if (result instanceof SyntaxToken) return result;
255
+ let next;
256
+ for (const child of result.children()) if (containsRange(child, start, end)) {
257
+ next = child;
258
+ break;
259
+ }
260
+ if (next === void 0) return result;
261
+ result = next;
262
+ }
263
+ }
264
+ };
265
+ function elementTextLength(el) {
266
+ return el.type === "token" ? el.text.length : el.textLength;
267
+ }
268
+ function elementLength(el) {
269
+ return el instanceof SyntaxToken ? el.text.length : el.textLength;
270
+ }
271
+ /**
272
+ * Whether `el` contains `offset`. The span is inclusive on both ends so a seam
273
+ * offset touches both neighbours.
274
+ */
275
+ function containsOffset(el, offset) {
276
+ const start = el.offset;
277
+ const len = elementLength(el);
278
+ return offset >= start && offset <= start + len;
279
+ }
280
+ function containsRange(el, start, end) {
281
+ const elStart = el.offset;
282
+ const len = elementLength(el);
283
+ return elStart <= start && end <= elStart + len;
284
+ }
285
+ function tokenAtOffsetOf(el, offset) {
286
+ if (el instanceof SyntaxToken) return TokenAtOffset.single(el);
287
+ let left;
288
+ let right;
289
+ for (const child of el.children()) {
290
+ if (!containsOffset(child, offset)) continue;
291
+ if (left === void 0) left = child;
292
+ else {
293
+ right = child;
294
+ break;
295
+ }
296
+ }
297
+ if (left === void 0) return TokenAtOffset.none();
298
+ if (right === void 0) return tokenAtOffsetOf(left, offset);
299
+ const leftToken = tokenAtOffsetOf(left, offset).rightBiased();
300
+ const rightToken = tokenAtOffsetOf(right, offset).leftBiased();
301
+ if (leftToken !== void 0 && rightToken !== void 0) return TokenAtOffset.between(leftToken, rightToken);
302
+ if (leftToken !== void 0) return TokenAtOffset.single(leftToken);
303
+ if (rightToken !== void 0) return TokenAtOffset.single(rightToken);
304
+ return TokenAtOffset.none();
305
+ }
306
+ function firstToken(el) {
307
+ if (el instanceof SyntaxToken) return el;
308
+ for (const child of el.children()) {
309
+ const token = firstToken(child);
310
+ if (token !== void 0) return token;
311
+ }
312
+ }
313
+ function lastToken(el) {
314
+ if (el instanceof SyntaxToken) return el;
315
+ const children = Array.from(el.children());
316
+ for (let i = children.length - 1; i >= 0; i--) {
317
+ const child = children[i];
318
+ if (child !== void 0) {
319
+ const token = lastToken(child);
320
+ if (token !== void 0) return token;
321
+ }
322
+ }
323
+ }
324
+ function climbingNext(el) {
325
+ let current = el;
326
+ for (;;) {
327
+ const parent = current.parent;
328
+ if (parent === void 0) return void 0;
329
+ const sibling = parent.childAt(current.index + 1);
330
+ if (sibling !== void 0) return sibling;
331
+ current = parent;
332
+ }
333
+ }
334
+ function climbingPrev(el) {
335
+ let current = el;
336
+ for (;;) {
337
+ const parent = current.parent;
338
+ if (parent === void 0) return void 0;
339
+ const sibling = parent.childAt(current.index - 1);
340
+ if (sibling !== void 0) return sibling;
341
+ current = parent;
342
+ }
343
+ }
344
+ function wrapElement(green, offset, parent, index) {
345
+ if (green.type === "token") return new SyntaxToken(green, offset, parent, index);
346
+ return new SyntaxNode(green, offset, parent, index);
347
+ }
348
+ function createSyntaxTree(green) {
349
+ return new SyntaxNode(green, 0, void 0, 0);
350
+ }
351
+ function findChildToken(node, kind) {
352
+ for (const child of node.children()) if (!(child instanceof SyntaxNode) && child.kind === kind) return child;
353
+ }
354
+ function findFirstChild(node, cast) {
355
+ for (const child of node.childNodes()) {
356
+ const result = cast(child);
357
+ if (result !== void 0) return result;
358
+ }
359
+ }
360
+ function* filterChildren(node, cast) {
361
+ for (const child of node.childNodes()) {
362
+ const result = cast(child);
363
+ if (result !== void 0) yield result;
364
+ }
365
+ }
366
+ function any(...casts) {
367
+ return (node) => {
368
+ for (const cast of casts) {
369
+ const result = cast(node);
370
+ if (result !== void 0) return result;
371
+ }
372
+ };
373
+ }
374
+ /**
375
+ * Raw source text of a CST node, verbatim (quotes and brackets preserved). For
376
+ * the decoded value of a string literal, decode it instead.
377
+ */
378
+ function printSyntax(node) {
379
+ let text = "";
380
+ for (const token of node.tokens()) text += token.text;
381
+ return text;
382
+ }
383
+ //#endregion
384
+ export { createSyntaxTree as a, findFirstChild as c, any as i, printSyntax as l, SyntaxToken as n, filterChildren as o, TokenAtOffset as r, findChildToken as s, SyntaxNode as t };
385
+
386
+ //# sourceMappingURL=ast-helpers-2XRnkQEO-BxG5qx3Q.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast-helpers-2XRnkQEO-BxG5qx3Q.mjs","names":["#state","#childSlots","#childOffsets","#slots","#childOffset"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/ast-helpers-2XRnkQEO.mjs"],"sourcesContent":["//#region src/syntax/red.ts\n/**\n* A token in the red tree. Unlike the green-layer {@link Token} (kind + text\n* only), a red token also carries its absolute `offset` within the source and a\n* link back to its `parent` {@link SyntaxNode}, so a cursor anchored on a token\n* can walk outward (parent, previous/next token, siblings) without re-scanning\n* from the document root.\n*/\nvar SyntaxToken = class {\n\tgreen;\n\tkind;\n\ttext;\n\toffset;\n\tparent;\n\t/** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */\n\tindex;\n\tconstructor(green, offset, parent, index) {\n\t\tthis.green = green;\n\t\tthis.kind = green.kind;\n\t\tthis.text = green.text;\n\t\tthis.offset = offset;\n\t\tthis.parent = parent;\n\t\tthis.index = index;\n\t}\n\tget textLength() {\n\t\treturn this.text.length;\n\t}\n\tget endOffset() {\n\t\treturn this.offset + this.textLength;\n\t}\n\t/** Whether `offset` falls within this token, inclusive of both ends. */\n\tisInside(offset) {\n\t\treturn offset >= this.offset && offset <= this.endOffset;\n\t}\n\tisOutside(offset) {\n\t\treturn !this.isInside(offset);\n\t}\n\t/** The sibling element immediately after this token within its parent. */\n\tget nextSiblingOrToken() {\n\t\treturn this.parent.childAt(this.index + 1);\n\t}\n\t/** The sibling element immediately before this token within its parent. */\n\tget prevSiblingOrToken() {\n\t\treturn this.parent.childAt(this.index - 1);\n\t}\n\t/** The next token in document order, crossing node boundaries. */\n\tget nextToken() {\n\t\tfor (let el = climbingNext(this); el !== void 0; el = climbingNext(el)) {\n\t\t\tconst token = firstToken(el);\n\t\t\tif (token !== void 0) return token;\n\t\t}\n\t}\n\t/** The previous token in document order, crossing node boundaries. */\n\tget prevToken() {\n\t\tfor (let el = climbingPrev(this); el !== void 0; el = climbingPrev(el)) {\n\t\t\tconst token = lastToken(el);\n\t\t\tif (token !== void 0) return token;\n\t\t}\n\t}\n};\nvar TokenAtOffset = class TokenAtOffset {\n\t#state;\n\tconstructor(state) {\n\t\tthis.#state = state;\n\t}\n\tstatic none() {\n\t\treturn new TokenAtOffset({ kind: \"none\" });\n\t}\n\tstatic single(token) {\n\t\treturn new TokenAtOffset({\n\t\t\tkind: \"single\",\n\t\t\ttoken\n\t\t});\n\t}\n\tstatic between(left, right) {\n\t\treturn new TokenAtOffset({\n\t\t\tkind: \"between\",\n\t\t\tleft,\n\t\t\tright\n\t\t});\n\t}\n\tget isEmpty() {\n\t\treturn this.#state.kind === \"none\";\n\t}\n\tget isBetween() {\n\t\treturn this.#state.kind === \"between\";\n\t}\n\tleftBiased() {\n\t\tswitch (this.#state.kind) {\n\t\t\tcase \"none\": return;\n\t\t\tcase \"single\": return this.#state.token;\n\t\t\tcase \"between\": return this.#state.left;\n\t\t}\n\t}\n\trightBiased() {\n\t\tswitch (this.#state.kind) {\n\t\t\tcase \"none\": return;\n\t\t\tcase \"single\": return this.#state.token;\n\t\t\tcase \"between\": return this.#state.right;\n\t\t}\n\t}\n};\nvar SyntaxNode = class SyntaxNode {\n\tgreen;\n\toffset;\n\tparent;\n\t/** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */\n\tindex;\n\t#childSlots;\n\t#childOffsets;\n\tconstructor(green, offset, parent, index) {\n\t\tthis.green = green;\n\t\tthis.offset = offset;\n\t\tthis.parent = parent;\n\t\tthis.index = index;\n\t}\n\t#slots() {\n\t\tlet slots = this.#childSlots;\n\t\tif (slots === void 0) {\n\t\t\tslots = new Array(this.green.children.length).fill(void 0);\n\t\t\tthis.#childSlots = slots;\n\t\t}\n\t\treturn slots;\n\t}\n\t#childOffset(index) {\n\t\tlet offsets = this.#childOffsets;\n\t\tif (offsets === void 0) {\n\t\t\toffsets = [];\n\t\t\tthis.#childOffsets = offsets;\n\t\t}\n\t\tfor (let known = offsets.length; known <= index; known++) {\n\t\t\tconst previousOffset = offsets[known - 1];\n\t\t\tconst previousChild = this.green.children[known - 1];\n\t\t\toffsets.push(previousOffset === void 0 || previousChild === void 0 ? this.offset : previousOffset + elementTextLength(previousChild));\n\t\t}\n\t\treturn offsets[index] ?? this.offset;\n\t}\n\tchildAt(index) {\n\t\tconst green = this.green.children[index];\n\t\tif (green === void 0) return void 0;\n\t\tconst slots = this.#slots();\n\t\tconst cached = slots[index];\n\t\tif (cached !== void 0) return cached;\n\t\tconst created = wrapElement(green, this.#childOffset(index), this, index);\n\t\tslots[index] = created;\n\t\treturn created;\n\t}\n\tget kind() {\n\t\treturn this.green.kind;\n\t}\n\tget textLength() {\n\t\treturn this.green.textLength;\n\t}\n\tget endOffset() {\n\t\treturn this.offset + this.textLength;\n\t}\n\t/** Whether `offset` falls within this node, inclusive of both ends. */\n\tisInside(offset) {\n\t\treturn offset >= this.offset && offset <= this.endOffset;\n\t}\n\tisOutside(offset) {\n\t\treturn !this.isInside(offset);\n\t}\n\tget firstChild() {\n\t\treturn this.childAt(0);\n\t}\n\tget lastChild() {\n\t\treturn this.childAt(this.green.children.length - 1);\n\t}\n\tget nextSibling() {\n\t\treturn this.parent?.childAt(this.index + 1);\n\t}\n\tget prevSibling() {\n\t\treturn this.parent?.childAt(this.index - 1);\n\t}\n\t/** The sibling element immediately after this node within its parent. */\n\tget nextSiblingOrToken() {\n\t\treturn this.nextSibling;\n\t}\n\t/** The sibling element immediately before this node within its parent. */\n\tget prevSiblingOrToken() {\n\t\treturn this.prevSibling;\n\t}\n\t/** The first token in this subtree (depth-first), or `undefined` if empty. */\n\tget firstToken() {\n\t\treturn firstToken(this);\n\t}\n\t/** The last token in this subtree (depth-first), or `undefined` if empty. */\n\tget lastToken() {\n\t\treturn lastToken(this);\n\t}\n\t*children() {\n\t\tconst count = this.green.children.length;\n\t\tfor (let index = 0; index < count; index++) {\n\t\t\tconst child = this.childAt(index);\n\t\t\tif (child !== void 0) yield child;\n\t\t}\n\t}\n\t*childNodes() {\n\t\tfor (const child of this.children()) if (child instanceof SyntaxNode) yield child;\n\t}\n\troot() {\n\t\tlet current = this;\n\t\tfor (const parent of this.ancestors()) current = parent;\n\t\treturn current;\n\t}\n\t*ancestors() {\n\t\tlet current = this.parent;\n\t\twhile (current) {\n\t\t\tyield current;\n\t\t\tcurrent = current.parent;\n\t\t}\n\t}\n\t/** The nearest match, testing this node itself before walking its ancestors. */\n\tfindAncestor(cast) {\n\t\tconst self = cast(this);\n\t\tif (self !== void 0) return self;\n\t\tfor (const ancestor of this.ancestors()) {\n\t\t\tconst result = cast(ancestor);\n\t\t\tif (result !== void 0) return result;\n\t\t}\n\t}\n\t*descendants() {\n\t\tconst stack = [this];\n\t\tfor (let el = stack.pop(); el !== void 0; el = stack.pop()) {\n\t\t\tyield el;\n\t\t\tif (el instanceof SyntaxNode) {\n\t\t\t\tconst children = Array.from(el.children());\n\t\t\t\tfor (let i = children.length - 1; i >= 0; i--) {\n\t\t\t\t\tconst child = children[i];\n\t\t\t\t\tif (child !== void 0) stack.push(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t*tokens() {\n\t\tfor (const el of this.descendants()) if (el instanceof SyntaxToken) yield el;\n\t}\n\t/**\n\t* The token(s) at `offset`. The between-two-tokens case (offset exactly on a\n\t* token seam) is represented explicitly so callers can left/right bias.\n\t*/\n\ttokenAtOffset(offset) {\n\t\treturn tokenAtOffsetOf(this, offset);\n\t}\n\t/**\n\t* The smallest element fully containing the range `[start, end]`. At a seam\n\t* (and for empty ranges) the left-hand element is preferred, matching\n\t* {@link containsOffset}'s inclusive span.\n\t*/\n\tcoveringElement(start, end) {\n\t\tlet result = this;\n\t\tfor (;;) {\n\t\t\tif (result instanceof SyntaxToken) return result;\n\t\t\tlet next;\n\t\t\tfor (const child of result.children()) if (containsRange(child, start, end)) {\n\t\t\t\tnext = child;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (next === void 0) return result;\n\t\t\tresult = next;\n\t\t}\n\t}\n};\nfunction elementTextLength(el) {\n\treturn el.type === \"token\" ? el.text.length : el.textLength;\n}\nfunction elementLength(el) {\n\treturn el instanceof SyntaxToken ? el.text.length : el.textLength;\n}\n/**\n* Whether `el` contains `offset`. The span is inclusive on both ends so a seam\n* offset touches both neighbours.\n*/\nfunction containsOffset(el, offset) {\n\tconst start = el.offset;\n\tconst len = elementLength(el);\n\treturn offset >= start && offset <= start + len;\n}\nfunction containsRange(el, start, end) {\n\tconst elStart = el.offset;\n\tconst len = elementLength(el);\n\treturn elStart <= start && end <= elStart + len;\n}\nfunction tokenAtOffsetOf(el, offset) {\n\tif (el instanceof SyntaxToken) return TokenAtOffset.single(el);\n\tlet left;\n\tlet right;\n\tfor (const child of el.children()) {\n\t\tif (!containsOffset(child, offset)) continue;\n\t\tif (left === void 0) left = child;\n\t\telse {\n\t\t\tright = child;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (left === void 0) return TokenAtOffset.none();\n\tif (right === void 0) return tokenAtOffsetOf(left, offset);\n\tconst leftToken = tokenAtOffsetOf(left, offset).rightBiased();\n\tconst rightToken = tokenAtOffsetOf(right, offset).leftBiased();\n\tif (leftToken !== void 0 && rightToken !== void 0) return TokenAtOffset.between(leftToken, rightToken);\n\tif (leftToken !== void 0) return TokenAtOffset.single(leftToken);\n\tif (rightToken !== void 0) return TokenAtOffset.single(rightToken);\n\treturn TokenAtOffset.none();\n}\nfunction firstToken(el) {\n\tif (el instanceof SyntaxToken) return el;\n\tfor (const child of el.children()) {\n\t\tconst token = firstToken(child);\n\t\tif (token !== void 0) return token;\n\t}\n}\nfunction lastToken(el) {\n\tif (el instanceof SyntaxToken) return el;\n\tconst children = Array.from(el.children());\n\tfor (let i = children.length - 1; i >= 0; i--) {\n\t\tconst child = children[i];\n\t\tif (child !== void 0) {\n\t\t\tconst token = lastToken(child);\n\t\t\tif (token !== void 0) return token;\n\t\t}\n\t}\n}\nfunction climbingNext(el) {\n\tlet current = el;\n\tfor (;;) {\n\t\tconst parent = current.parent;\n\t\tif (parent === void 0) return void 0;\n\t\tconst sibling = parent.childAt(current.index + 1);\n\t\tif (sibling !== void 0) return sibling;\n\t\tcurrent = parent;\n\t}\n}\nfunction climbingPrev(el) {\n\tlet current = el;\n\tfor (;;) {\n\t\tconst parent = current.parent;\n\t\tif (parent === void 0) return void 0;\n\t\tconst sibling = parent.childAt(current.index - 1);\n\t\tif (sibling !== void 0) return sibling;\n\t\tcurrent = parent;\n\t}\n}\nfunction wrapElement(green, offset, parent, index) {\n\tif (green.type === \"token\") return new SyntaxToken(green, offset, parent, index);\n\treturn new SyntaxNode(green, offset, parent, index);\n}\nfunction createSyntaxTree(green) {\n\treturn new SyntaxNode(green, 0, void 0, 0);\n}\n//#endregion\n//#region src/syntax/ast-helpers.ts\nfunction findChildToken(node, kind) {\n\tfor (const child of node.children()) if (!(child instanceof SyntaxNode) && child.kind === kind) return child;\n}\nfunction findFirstChild(node, cast) {\n\tfor (const child of node.childNodes()) {\n\t\tconst result = cast(child);\n\t\tif (result !== void 0) return result;\n\t}\n}\nfunction* filterChildren(node, cast) {\n\tfor (const child of node.childNodes()) {\n\t\tconst result = cast(child);\n\t\tif (result !== void 0) yield result;\n\t}\n}\nfunction any(...casts) {\n\treturn (node) => {\n\t\tfor (const cast of casts) {\n\t\t\tconst result = cast(node);\n\t\t\tif (result !== void 0) return result;\n\t\t}\n\t};\n}\n/**\n* Raw source text of a CST node, verbatim (quotes and brackets preserved). For\n* the decoded value of a string literal, decode it instead.\n*/\nfunction printSyntax(node) {\n\tlet text = \"\";\n\tfor (const token of node.tokens()) text += token.text;\n\treturn text;\n}\n//#endregion\nexport { printSyntax as a, TokenAtOffset as c, findFirstChild as i, createSyntaxTree as l, filterChildren as n, SyntaxNode as o, findChildToken as r, SyntaxToken as s, any as t };\n\n//# sourceMappingURL=ast-helpers-2XRnkQEO.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,cAAc,MAAM;CACvB;CACA;CACA;CACA;CACA;;CAEA;CACA,YAAY,OAAO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;CACnC,KAAK,MAAM,SAAS,KAAK,WAAW,GAAG;EACtC,MAAM,SAAS,KAAK,KAAK;EACzB,IAAI,WAAW,KAAK,GAAG,OAAO;CAC/B;AACD;AACA,UAAU,eAAe,MAAM,MAAM;CACpC,KAAK,MAAM,SAAS,KAAK,WAAW,GAAG;EACtC,MAAM,SAAS,KAAK,KAAK;EACzB,IAAI,WAAW,KAAK,GAAG,MAAM;CAC9B;AACD;AACA,SAAS,IAAI,GAAG,OAAO;CACtB,QAAQ,SAAS;EAChB,KAAK,MAAM,QAAQ,OAAO;GACzB,MAAM,SAAS,KAAK,IAAI;GACxB,IAAI,WAAW,KAAK,GAAG,OAAO;EAC/B;CACD;AACD;;;;;AAKA,SAAS,YAAY,MAAM;CAC1B,IAAI,OAAO;CACX,KAAK,MAAM,SAAS,KAAK,OAAO,GAAG,QAAQ,MAAM;CACjD,OAAO;AACR"}
@@ -0,0 +1,43 @@
1
+ import { A as AuthoringTypeNamespace, St as instantiateAuthoringTypeConstructor, a as AuthoringContributions, m as AuthoringFieldPresetDescriptor } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
2
+ import "./temporal-presets-L05Tl534-jgcrZX_O.mjs";
3
+ //#region ../../../1-framework/1-core/framework-components/dist/authoring.d.mts
4
+ //#region src/shared/authoring-type-constructor-call.d.ts
5
+ /** What a type constructor call produces for a column. */
6
+ type AuthoringTypeConstructorOutput = ReturnType<typeof instantiateAuthoringTypeConstructor>;
7
+ /** A type constructor, by its path in an authoring namespace, and the arguments of one call to it. */
8
+ interface AuthoringTypeConstructorCall {
9
+ readonly path: readonly string[];
10
+ readonly args: readonly unknown[];
11
+ }
12
+ /**
13
+ * The first call, in namespace order, to a type constructor in `namespace` that produces exactly
14
+ * `output`. The inverse of {@link instantiateAuthoringTypeConstructor} for constructors whose type
15
+ * parameters each come straight from one argument. A constructor whose argument names another
16
+ * entity is never chosen. `undefined` when no call produces `output`.
17
+ */
18
+ declare function findAuthoringTypeConstructorCall(namespace: AuthoringTypeNamespace, output: AuthoringTypeConstructorOutput): AuthoringTypeConstructorCall | undefined;
19
+ //#endregion
20
+ //#region src/shared/field-preset-resolution.d.ts
21
+ /**
22
+ * Walks `authoringContributions.field` segment by segment and returns the field-preset descriptor at the path, or `undefined` when none is registered there.
23
+ */
24
+ declare function getAuthoringFieldPreset(contributions: AuthoringContributions | undefined, path: readonly string[]): AuthoringFieldPresetDescriptor | undefined;
25
+ /**
26
+ * Returns the namespace prefix of `attributeName` when it names an extension namespace that is not composed, otherwise `undefined`. A namespace is recognized when it is:
27
+ *
28
+ * - `db` (native-type spec, always allowed),
29
+ * - the active family id,
30
+ * - the active target id,
31
+ * - a registered field-preset namespace (e.g. `temporal`),
32
+ * - present in `composedExtensions`.
33
+ *
34
+ * Family, target, and field-preset namespaces are exempt so an attribute that does not exist under them surfaces as an unsupported attribute rather than as an uncomposed extension namespace.
35
+ */
36
+ declare function checkUncomposedNamespace(attributeName: string, composedExtensions: ReadonlySet<string>, context?: {
37
+ readonly familyId?: string;
38
+ readonly targetId?: string;
39
+ readonly authoringContributions?: AuthoringContributions | undefined;
40
+ }): string | undefined;
41
+ //#endregion
42
+ export { getAuthoringFieldPreset as a, findAuthoringTypeConstructorCall as i, AuthoringTypeConstructorOutput as n, checkUncomposedNamespace as r, AuthoringTypeConstructorCall as t };
43
+ //# sourceMappingURL=authoring-BffMNBO5.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authoring-BffMNBO5.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/authoring.d.mts"],"mappings":";;;;;KAIK,iCAAiC,kBAAkB;;UAE9C;WACC;WACA;;;;;;;;iBAQM,iCAAiC,WAAW,wBAAwB,QAAQ,iCAAiC;;;;;;iBAM7G,wBAAwB,eAAe,oCAAoC,0BAA0B;;;;;;;;;;;;iBAYrG,yBAAyB,uBAAuB,oBAAoB,qBAAqB;WAC/F;WACA;WACA,yBAAyB"}
@@ -0,0 +1,88 @@
1
+ import { t as canonicalizeJson } from "./canonicalize-json-ZPawceQR-Dua1VNEB.mjs";
2
+ import { g as isAuthoringFieldPresetDescriptor, m as isAuthoringArgRef, p as instantiateAuthoringTypeConstructor, u as hasRegisteredFieldNamespace, y as isAuthoringTypeConstructorDescriptor } from "./temporal-presets-DABMpaxB-DDEaCwpa.mjs";
3
+ //#region ../../../1-framework/1-core/framework-components/dist/authoring.mjs
4
+ function* typeConstructors(namespace, path = []) {
5
+ for (const [name, value] of Object.entries(namespace)) if (isAuthoringTypeConstructorDescriptor(value)) yield {
6
+ path: [...path, name],
7
+ descriptor: value
8
+ };
9
+ else yield* typeConstructors(value, [...path, name]);
10
+ }
11
+ function produces(produced, wanted) {
12
+ const wantedFields = {
13
+ ...wanted,
14
+ typeParams: wanted.typeParams ?? {}
15
+ };
16
+ return Object.entries({
17
+ ...produced,
18
+ typeParams: produced.typeParams ?? {}
19
+ }).every(([key, value]) => canonicalizeJson(value) === canonicalizeJson(wantedFields[key]));
20
+ }
21
+ /**
22
+ * The arguments that make `descriptor` produce exactly `output`, when each of its type parameters
23
+ * comes straight from one argument; `undefined` when it cannot produce `output`, including when
24
+ * `output` has no value for an argument the constructor requires.
25
+ */
26
+ function argumentsFor(descriptor, output) {
27
+ if (descriptor.entityRefArg !== void 0 || descriptor.output.codecId !== output.codecId) return;
28
+ const args = [];
29
+ for (const [key, template] of Object.entries(descriptor.output.typeParams ?? {})) {
30
+ const value = output.typeParams?.[key];
31
+ if (value !== void 0 && isAuthoringArgRef(template) && template.path === void 0) args[template.index] = value;
32
+ }
33
+ const requiredArgs = (descriptor.args ?? []).filter((arg) => arg.optional !== true).length;
34
+ if (args.length < requiredArgs || Array.from(args).includes(void 0)) return void 0;
35
+ try {
36
+ return produces(instantiateAuthoringTypeConstructor(descriptor, args), output) ? args : void 0;
37
+ } catch {
38
+ return;
39
+ }
40
+ }
41
+ /**
42
+ * The first call, in namespace order, to a type constructor in `namespace` that produces exactly
43
+ * `output`. The inverse of {@link instantiateAuthoringTypeConstructor} for constructors whose type
44
+ * parameters each come straight from one argument. A constructor whose argument names another
45
+ * entity is never chosen. `undefined` when no call produces `output`.
46
+ */
47
+ function findAuthoringTypeConstructorCall(namespace, output) {
48
+ for (const { path, descriptor } of typeConstructors(namespace)) {
49
+ const args = argumentsFor(descriptor, output);
50
+ if (args !== void 0) return {
51
+ path,
52
+ args
53
+ };
54
+ }
55
+ }
56
+ /**
57
+ * Walks `authoringContributions.field` segment by segment and returns the field-preset descriptor at the path, or `undefined` when none is registered there.
58
+ */
59
+ function getAuthoringFieldPreset(contributions, path) {
60
+ let current = contributions?.field;
61
+ for (const segment of path) {
62
+ if (typeof current !== "object" || current === null || "kind" in current) return;
63
+ current = current[segment];
64
+ }
65
+ return current !== void 0 && isAuthoringFieldPresetDescriptor(current) ? current : void 0;
66
+ }
67
+ /**
68
+ * Returns the namespace prefix of `attributeName` when it names an extension namespace that is not composed, otherwise `undefined`. A namespace is recognized when it is:
69
+ *
70
+ * - `db` (native-type spec, always allowed),
71
+ * - the active family id,
72
+ * - the active target id,
73
+ * - a registered field-preset namespace (e.g. `temporal`),
74
+ * - present in `composedExtensions`.
75
+ *
76
+ * Family, target, and field-preset namespaces are exempt so an attribute that does not exist under them surfaces as an unsupported attribute rather than as an uncomposed extension namespace.
77
+ */
78
+ function checkUncomposedNamespace(attributeName, composedExtensions, context) {
79
+ const dotIndex = attributeName.indexOf(".");
80
+ if (dotIndex <= 0 || dotIndex === attributeName.length - 1) return;
81
+ const namespace = attributeName.slice(0, dotIndex);
82
+ if (namespace === "db" || namespace === context?.familyId || namespace === context?.targetId || hasRegisteredFieldNamespace(context?.authoringContributions, namespace) || composedExtensions.has(namespace)) return;
83
+ return namespace;
84
+ }
85
+ //#endregion
86
+ export { findAuthoringTypeConstructorCall as n, getAuthoringFieldPreset as r, checkUncomposedNamespace as t };
87
+
88
+ //# sourceMappingURL=authoring-DbG78eh2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authoring-DbG78eh2.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/authoring.mjs"],"sourcesContent":["import { t as canonicalizeJson } from \"./canonicalize-json-ZPawceQR.mjs\";\nimport { A as resolveEnumCodecId, C as isAuthoringTypeConstructorDescriptor, E as loweringEntryKey, O as mergeAuthoringNamespaces, S as isAuthoringPslBlockDescriptor, T as isLoweringEntryKey, _ as instantiateAuthoringTypeConstructor, a as temporalCodecPreset, b as isAuthoringFieldPresetDescriptor, c as assertNoCrossRegistryCollisions, f as collectScalarTypeConstructors, g as instantiateAuthoringFieldPreset, h as instantiateAuthoringEntityType, i as temporalAuthoringPresets, j as validateAuthoringHelperArguments, k as resolveAuthoringTemplateValue, l as assertResolvableTypeConstructorTemplates, m as hasRegisteredFieldNamespace, n as TEMPORAL_ON_UPDATE_ARG, o as temporalPhaseTemplate, p as flushAuthoringWarnings, r as TIMESTAMP_NOW_GENERATOR_ID, t as TEMPORAL_ON_CREATE_ARG, u as classifyEnumMemberType, v as isAuthoringArgRef, w as isDataTypeLoweringEntry, x as isAuthoringModelAttributeDescriptor, y as isAuthoringEntityTypeDescriptor } from \"./temporal-presets-DABMpaxB.mjs\";\n//#region src/shared/authoring-type-constructor-call.ts\nfunction* typeConstructors(namespace, path = []) {\n\tfor (const [name, value] of Object.entries(namespace)) if (isAuthoringTypeConstructorDescriptor(value)) yield {\n\t\tpath: [...path, name],\n\t\tdescriptor: value\n\t};\n\telse yield* typeConstructors(value, [...path, name]);\n}\nfunction produces(produced, wanted) {\n\tconst wantedFields = {\n\t\t...wanted,\n\t\ttypeParams: wanted.typeParams ?? {}\n\t};\n\treturn Object.entries({\n\t\t...produced,\n\t\ttypeParams: produced.typeParams ?? {}\n\t}).every(([key, value]) => canonicalizeJson(value) === canonicalizeJson(wantedFields[key]));\n}\n/**\n* The arguments that make `descriptor` produce exactly `output`, when each of its type parameters\n* comes straight from one argument; `undefined` when it cannot produce `output`, including when\n* `output` has no value for an argument the constructor requires.\n*/\nfunction argumentsFor(descriptor, output) {\n\tif (descriptor.entityRefArg !== void 0 || descriptor.output.codecId !== output.codecId) return;\n\tconst args = [];\n\tfor (const [key, template] of Object.entries(descriptor.output.typeParams ?? {})) {\n\t\tconst value = output.typeParams?.[key];\n\t\tif (value !== void 0 && isAuthoringArgRef(template) && template.path === void 0) args[template.index] = value;\n\t}\n\tconst requiredArgs = (descriptor.args ?? []).filter((arg) => arg.optional !== true).length;\n\tif (args.length < requiredArgs || Array.from(args).includes(void 0)) return void 0;\n\ttry {\n\t\treturn produces(instantiateAuthoringTypeConstructor(descriptor, args), output) ? args : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* The first call, in namespace order, to a type constructor in `namespace` that produces exactly\n* `output`. The inverse of {@link instantiateAuthoringTypeConstructor} for constructors whose type\n* parameters each come straight from one argument. A constructor whose argument names another\n* entity is never chosen. `undefined` when no call produces `output`.\n*/\nfunction findAuthoringTypeConstructorCall(namespace, output) {\n\tfor (const { path, descriptor } of typeConstructors(namespace)) {\n\t\tconst args = argumentsFor(descriptor, output);\n\t\tif (args !== void 0) return {\n\t\t\tpath,\n\t\t\targs\n\t\t};\n\t}\n}\n//#endregion\n//#region src/shared/field-preset-resolution.ts\n/**\n* Walks `authoringContributions.field` segment by segment and returns the field-preset descriptor at the path, or `undefined` when none is registered there.\n*/\nfunction getAuthoringFieldPreset(contributions, path) {\n\tlet current = contributions?.field;\n\tfor (const segment of path) {\n\t\tif (typeof current !== \"object\" || current === null || \"kind\" in current) return;\n\t\tcurrent = current[segment];\n\t}\n\treturn current !== void 0 && isAuthoringFieldPresetDescriptor(current) ? current : void 0;\n}\n/**\n* Returns the namespace prefix of `attributeName` when it names an extension namespace that is not composed, otherwise `undefined`. A namespace is recognized when it is:\n*\n* - `db` (native-type spec, always allowed),\n* - the active family id,\n* - the active target id,\n* - a registered field-preset namespace (e.g. `temporal`),\n* - present in `composedExtensions`.\n*\n* Family, target, and field-preset namespaces are exempt so an attribute that does not exist under them surfaces as an unsupported attribute rather than as an uncomposed extension namespace.\n*/\nfunction checkUncomposedNamespace(attributeName, composedExtensions, context) {\n\tconst dotIndex = attributeName.indexOf(\".\");\n\tif (dotIndex <= 0 || dotIndex === attributeName.length - 1) return;\n\tconst namespace = attributeName.slice(0, dotIndex);\n\tif (namespace === \"db\" || namespace === context?.familyId || namespace === context?.targetId || hasRegisteredFieldNamespace(context?.authoringContributions, namespace) || composedExtensions.has(namespace)) return;\n\treturn namespace;\n}\n//#endregion\nexport { TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, checkUncomposedNamespace, classifyEnumMemberType, collectScalarTypeConstructors, findAuthoringTypeConstructorCall, flushAuthoringWarnings, getAuthoringFieldPreset, hasRegisteredFieldNamespace, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor, isDataTypeLoweringEntry, isLoweringEntryKey, loweringEntryKey, mergeAuthoringNamespaces, resolveAuthoringTemplateValue, resolveEnumCodecId, temporalAuthoringPresets, temporalCodecPreset, temporalPhaseTemplate, validateAuthoringHelperArguments };\n\n//# sourceMappingURL=authoring.mjs.map"],"mappings":";;;AAGA,UAAU,iBAAiB,WAAW,OAAO,CAAC,GAAG;CAChD,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,SAAS,GAAG,IAAI,qCAAqC,KAAK,GAAG,MAAM;EAC7G,MAAM,CAAC,GAAG,MAAM,IAAI;EACpB,YAAY;CACb;MACK,OAAO,iBAAiB,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC;AACpD;AACA,SAAS,SAAS,UAAU,QAAQ;CACnC,MAAM,eAAe;EACpB,GAAG;EACH,YAAY,OAAO,cAAc,CAAC;CACnC;CACA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AAI,UAAU,KAAK;AACzF;;;;;;;;;;;;AAYA,SAAS,yBAAyB,eAAe,oBAAoB,SAAS;CAC7E,MAAM,WAAW,cAAc,QAAQ,GAAG;CAC1C,IAAI,YAAY,KAAK,aAAa,cAAc,SAAS,GAAG;CAC5D,MAAM,YAAY,cAAc,MAAM,GAAG,QAAQ;CACjD,IAAI,cAAc,QAAQ,cAAc,SAAS,YAAY,cAAc,SAAS,YAAY,4BAA4B,SAAS,wBAAwB,SAAS,KAAK,mBAAmB,IAAI,SAAS,GAAG;CAC9M,OAAO;AACR"}
@@ -1,4 +1,4 @@
1
- //#region ../../../1-framework/1-core/framework-components/dist/utils.mjs
1
+ //#region ../../../1-framework/1-core/framework-components/dist/canonicalize-json-ZPawceQR.mjs
2
2
  function sortKeys(value) {
3
3
  if (value === null || typeof value !== "object") return value;
4
4
  if (Array.isArray(value)) return value.map(sortKeys);
@@ -17,4 +17,4 @@ function canonicalizeJson(value) {
17
17
  //#endregion
18
18
  export { canonicalizeJson as t };
19
19
 
20
- //# sourceMappingURL=utils-DMAM0unR.mjs.map
20
+ //# sourceMappingURL=canonicalize-json-ZPawceQR-Dua1VNEB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalize-json-ZPawceQR-Dua1VNEB.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/canonicalize-json-ZPawceQR.mjs"],"sourcesContent":["//#region src/utils/canonicalize-json.ts\nfunction sortKeys(value) {\n\tif (value === null || typeof value !== \"object\") return value;\n\tif (Array.isArray(value)) return value.map(sortKeys);\n\tconst sorted = Object.create(null);\n\tfor (const key of Object.keys(value).sort()) sorted[key] = sortKeys(value[key]);\n\treturn sorted;\n}\n/**\n* `JSON.stringify` with object keys sorted lexicographically at every level. Two structurally equal values produce the same string regardless of object key insertion order, so the result is a stable cache key for JSON-shaped values.\n*\n* Array order is preserved; primitives serialise as their JSON form. Inputs are expected to be JSON-safe (the typeParams shape on {@link CodecRef} is `JsonValue`-constrained for this reason); callers that need to canonicalise non-JSON-safe values (BigInt, Dates, typed arrays) should use `canonicalStringify` from `@internal/utils/canonical-stringify` instead.\n*/\nfunction canonicalizeJson(value) {\n\treturn JSON.stringify(sortKeys(value));\n}\n//#endregion\nexport { canonicalizeJson as t };\n\n//# sourceMappingURL=canonicalize-json-ZPawceQR.mjs.map"],"mappings":";AACA,SAAS,SAAS,OAAO;CACxB,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU,OAAO;CACxD,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,QAAQ;CACnD,MAAM,SAAS,OAAO,OAAO,IAAI;CACjC,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,CAAC,CAAC,KAAK,GAAG,OAAO,OAAO,SAAS,MAAM,IAAI;CAC9E,OAAO;AACR;;;;;;AAMA,SAAS,iBAAiB,OAAO;CAChC,OAAO,KAAK,UAAU,SAAS,KAAK,CAAC;AACtC"}