@prisma/orm-framework 8.0.0-rc.11-dev.29 → 8.0.0-rc.11-dev.30

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 (65) hide show
  1. package/dist/authoring-SDt_yd7K.d.mts +1 -0
  2. package/dist/{components-DDqd0vap.d.mts → components-CIlPUXgy.d.mts} +2 -2
  3. package/dist/{components-DDqd0vap.d.mts.map → components-CIlPUXgy.d.mts.map} +1 -1
  4. package/dist/components.d.mts +9 -9
  5. package/dist/components.mjs +2 -2
  6. package/dist/components__authoring.d.mts +2 -2
  7. package/dist/components__components.d.mts +2 -2
  8. package/dist/components__control.d.mts +3 -3
  9. package/dist/components__control.mjs +2 -2
  10. package/dist/components__execution.d.mts +1 -1
  11. package/dist/components__psl-ast.d.mts +3 -3
  12. package/dist/{config-types-DrtGQDEz.d.mts → config-types-BiBG9LUM.d.mts} +4 -4
  13. package/dist/{config-types-DrtGQDEz.d.mts.map → config-types-BiBG9LUM.d.mts.map} +1 -1
  14. package/dist/config.d.mts +1 -1
  15. package/dist/config__config-types.d.mts +1 -1
  16. package/dist/contract-authoring.d.mts +2 -2
  17. package/dist/{control-CjjQjy_6.d.mts → control-FO0yGN-e.d.mts} +36 -5
  18. package/dist/{control-CjjQjy_6.d.mts.map → control-FO0yGN-e.d.mts.map} +1 -1
  19. package/dist/{control-DR0zF1b7.mjs → control-LZyLwXWd.mjs} +126 -2
  20. package/dist/control-LZyLwXWd.mjs.map +1 -0
  21. package/dist/{declarations-C8gJnWQp-CnufYOCF.mjs → declarations-ApW55O9s-DmbPATJi.mjs} +47 -5
  22. package/dist/declarations-ApW55O9s-DmbPATJi.mjs.map +1 -0
  23. package/dist/errors.d.mts +1 -1
  24. package/dist/errors__execution.d.mts +1 -1
  25. package/dist/{execution-B2UDS4t7.d.mts → execution-DU2yN6tS.d.mts} +2 -2
  26. package/dist/{execution-B2UDS4t7.d.mts.map → execution-DU2yN6tS.d.mts.map} +1 -1
  27. package/dist/{execution-DEt8KBE9.d.mts → execution-DfMCQMDy.d.mts} +2 -2
  28. package/dist/{execution-DEt8KBE9.d.mts.map → execution-DfMCQMDy.d.mts.map} +1 -1
  29. package/dist/{framework-authoring-Cs5_Ovws-C3gC-7Ln.d.mts → framework-authoring-b__TyQDU-C9cYpYdv.d.mts} +15 -6
  30. package/dist/framework-authoring-b__TyQDU-C9cYpYdv.d.mts.map +1 -0
  31. package/dist/{framework-components-CukAi30h-DMnprolg.d.mts → framework-components-Bu5LfryO-CAg5kbVT.d.mts} +24 -4
  32. package/dist/framework-components-Bu5LfryO-CAg5kbVT.d.mts.map +1 -0
  33. package/dist/{parse-BPOOpARs-COpO0wc7.mjs → parse-BRwiZ0nC-B9AArxQM.mjs} +28 -5
  34. package/dist/parse-BRwiZ0nC-B9AArxQM.mjs.map +1 -0
  35. package/dist/{parse-Di31RMVM-DJPkmFtA.d.mts → parse-D6t27bbJ-CBRfL6kk.d.mts} +27 -7
  36. package/dist/parse-D6t27bbJ-CBRfL6kk.d.mts.map +1 -0
  37. package/dist/{psl-ast-Dv4jFRE5-TV1K0L2x.d.mts → psl-ast-26UDyLzV-D0CaiBMi.d.mts} +3 -3
  38. package/dist/{psl-ast-Dv4jFRE5-TV1K0L2x.d.mts.map → psl-ast-26UDyLzV-D0CaiBMi.d.mts.map} +1 -1
  39. package/dist/{psl-ast-CcBU8yUe.d.mts → psl-ast-Cfiro8sP.d.mts} +3 -3
  40. package/dist/{psl-ast-CcBU8yUe.d.mts.map → psl-ast-Cfiro8sP.d.mts.map} +1 -1
  41. package/dist/psl-parser.d.mts +35 -12
  42. package/dist/psl-parser.d.mts.map +1 -1
  43. package/dist/psl-parser.mjs +23 -2
  44. package/dist/psl-parser.mjs.map +1 -1
  45. package/dist/psl-parser__format.mjs +3 -2
  46. package/dist/psl-parser__format.mjs.map +1 -1
  47. package/dist/psl-parser__interpret.d.mts +3 -3
  48. package/dist/psl-parser__syntax.d.mts +2 -2
  49. package/dist/psl-parser__syntax.mjs +3 -3
  50. package/dist/psl-parser__syntax.mjs.map +1 -1
  51. package/dist/psl-parser__tokenizer.mjs +1 -1
  52. package/dist/psl-printer.d.mts +4 -4
  53. package/dist/{symbol-table-BsJpsMzi-BpjAGtCb.d.mts → symbol-table-C89kknSX-Zd4K4m_B.d.mts} +6 -6
  54. package/dist/{symbol-table-BsJpsMzi-BpjAGtCb.d.mts.map → symbol-table-C89kknSX-Zd4K4m_B.d.mts.map} +1 -1
  55. package/dist/{tokenizer-1hAHZzmp-QGPORvmA.mjs → tokenizer-D4sywyzm-gPsD7tYP.mjs} +40 -6
  56. package/dist/tokenizer-D4sywyzm-gPsD7tYP.mjs.map +1 -0
  57. package/package.json +15 -15
  58. package/dist/authoring-D-YstG17.d.mts +0 -1
  59. package/dist/control-DR0zF1b7.mjs.map +0 -1
  60. package/dist/declarations-C8gJnWQp-CnufYOCF.mjs.map +0 -1
  61. package/dist/framework-authoring-Cs5_Ovws-C3gC-7Ln.d.mts.map +0 -1
  62. package/dist/framework-components-CukAi30h-DMnprolg.d.mts.map +0 -1
  63. package/dist/parse-BPOOpARs-COpO0wc7.mjs.map +0 -1
  64. package/dist/parse-Di31RMVM-DJPkmFtA.d.mts.map +0 -1
  65. package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-LZyLwXWd.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/control.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { n as materializeCodec, r as resolveCodecDescriptorOrThrow, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-BLRGmP1f.mjs\";\nimport { n as aggregateDescriptorKey, r as isAggregateDescriptor, t as mergeCapabilityMatrices } from \"./capabilities-BzwH_XMZ.mjs\";\nimport { _ as mergeAuthoringAttributeSpecs, a as collectScalarTypeConstructors, i as collectContributedDescriptorPaths, n as assertResolvableTypeConstructorTemplates, t as assertNoCrossRegistryCollisions, v as mergeAuthoringNamespaces } from \"./framework-authoring-BvxZnsPY.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/control/contract-snapshot-layout.ts\nconst CONTRACT_SNAPSHOTS_DIRNAME = \"snapshots\";\nconst STORAGE_HASH_PATTERN = /^[0-9a-f]{64}$/;\n/** Validate a storage hash for use as a directory name. */\nfunction storageHashHex(storageHash) {\n\tif (!STORAGE_HASH_PATTERN.test(storageHash)) throw new InternalError(`Invalid storage hash \"${storageHash}\": expected 64 lowercase hex characters`);\n\treturn storageHash;\n}\n/** Module specifier for the store's `contract.json`, POSIX separators. */\nfunction contractSnapshotJsonSpecifier(snapshotsImportPath, storageHash) {\n\treturn `${snapshotsImportPath}/${storageHashHex(storageHash)}/contract.json`;\n}\n/** Type-only module specifier for the store's `contract.d.ts` (no extension). */\nfunction contractSnapshotTypesSpecifier(snapshotsImportPath, storageHash) {\n\treturn `${snapshotsImportPath}/${storageHashHex(storageHash)}/contract`;\n}\n//#endregion\n//#region src/control/control-capabilities.ts\nfunction hasMigrations(target) {\n\treturn \"migrations\" in target && !!target[\"migrations\"];\n}\nfunction hasSchemaView(instance) {\n\treturn \"toSchemaView\" in instance && typeof instance[\"toSchemaView\"] === \"function\";\n}\nfunction hasPslContractInfer(instance) {\n\treturn \"inferPslContract\" in instance && typeof instance[\"inferPslContract\"] === \"function\";\n}\nfunction hasOperationPreview(instance) {\n\treturn \"toOperationPreview\" in instance && typeof instance[\"toOperationPreview\"] === \"function\";\n}\nfunction hasSchemaSubjectClassifier(instance) {\n\treturn \"classifySubjectGranularity\" in instance && typeof instance[\"classifySubjectGranularity\"] === \"function\" && \"classifyEntityKind\" in instance && typeof instance[\"classifyEntityKind\"] === \"function\";\n}\n//#endregion\n//#region src/control/control-operation-results.ts\nconst VERIFY_CODE_MARKER_MISSING = \"CONTRACT.MARKER_MISSING\";\nconst VERIFY_CODE_HASH_MISMATCH = \"CONTRACT.MARKER_MISMATCH\";\nconst VERIFY_CODE_TARGET_MISMATCH = \"CONTRACT.TARGET_MISMATCH\";\nconst VERIFY_CODE_SCHEMA_FAILURE = \"CONTRACT.SCHEMA_VERIFICATION_FAILED\";\n//#endregion\n//#region src/control/control-schema-view.ts\nvar SchemaTreeNode = class {\n\tkind;\n\tid;\n\tlabel;\n\tmeta;\n\tchildren;\n\tconstructor(options) {\n\t\tthis.kind = options.kind;\n\t\tthis.id = options.id;\n\t\tthis.label = options.label;\n\t\tif (options.meta !== void 0) this.meta = options.meta;\n\t\tif (options.children !== void 0) this.children = options.children;\n\t\tObject.freeze(this);\n\t}\n\taccept(visitor) {\n\t\treturn visitor.visit(this);\n\t}\n};\n//#endregion\n//#region src/control/control-spaces.ts\n/**\n* Canonical control-plane identifiers for contract spaces.\n*\n* A contract space is the disjoint `(contract.json, migration-graph)` unit\n* the per-space planner / runner / verifier (project: extension contract\n* spaces, TML-2397) operates on. The application owns one well-known\n* space — the value below — and each loaded extension that contributes\n* schema owns a uniquely-named space.\n*\n* Lives in `framework-components/control` so every layer that has to\n* reason about space identity (the migration tooling, the SQL runtime's\n* marker reader, target-side statement builders, target-side adapters)\n* can import a single value rather than duplicating the literal. Raw\n* `'app'` string literals in framework / target / runtime / adapter\n* source code are forbidden and policed by\n* `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).\n*\n* @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).\n*/\nconst APP_SPACE_ID = \"app\";\n//#endregion\n//#region src/control/control-stack.ts\nfunction addUniqueId(ids, seen, id) {\n\tif (!seen.has(id)) {\n\t\tids.push(id);\n\t\tseen.add(id);\n\t}\n}\nfunction assertUniqueCodecOwner(options) {\n\tconst existingOwner = options.owners.get(options.codecId);\n\tif (existingOwner !== void 0) throw new InternalError(`Duplicate ${options.entityLabel} for codecId \"${options.codecId}\". Descriptor \"${options.descriptorId}\" conflicts with \"${existingOwner}\". Each codecId can only have one ${options.entityOwnershipLabel}.`);\n}\nfunction extractCodecTypeImports(descriptors) {\n\tconst imports = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst codecTypes = descriptor.types?.codecTypes;\n\t\tif (codecTypes?.import) imports.push(codecTypes.import);\n\t\tif (codecTypes?.typeImports) imports.push(...codecTypes.typeImports);\n\t}\n\treturn imports;\n}\nfunction extractQueryOperationTypeImports(descriptors) {\n\tconst imports = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst queryOperationTypes = descriptor.types?.queryOperationTypes;\n\t\tif (queryOperationTypes?.import) imports.push(queryOperationTypes.import);\n\t}\n\treturn imports;\n}\nfunction extractComponentIds(family, target, adapter, extensions) {\n\tconst ids = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\taddUniqueId(ids, seen, family.id);\n\taddUniqueId(ids, seen, target.id);\n\tif (adapter) addUniqueId(ids, seen, adapter.id);\n\tfor (const ext of extensions) addUniqueId(ids, seen, ext.id);\n\treturn ids;\n}\nfunction assembleAuthoringContributions(descriptors) {\n\tconst field = {};\n\tconst type = {};\n\tconst entityTypes = {};\n\tconst pslBlockDescriptors = {};\n\tconst modelAttributes = {};\n\tconst attributeSpecs = {\n\t\tmodel: {},\n\t\tfield: {}\n\t};\n\tconst attributeSpecOwners = /* @__PURE__ */ new Map();\n\tconst pathOwners = /* @__PURE__ */ new Map();\n\tconst claimContributedPaths = (namespace, descriptorKind, label, descriptorId) => {\n\t\tfor (const path of collectContributedDescriptorPaths(namespace, descriptorKind)) {\n\t\t\tconst key = `${label}:${path}`;\n\t\t\tconst existingOwner = pathOwners.get(key);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate authoring ${label} helper \"${path}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tpathOwners.set(key, descriptorId);\n\t\t}\n\t};\n\tlet valueObjectStorageDeclaration;\n\tfor (const descriptor of descriptors) {\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tconst declaredValueObjectStorageType = descriptor.authoring?.valueObjectStorageType;\n\t\tif (declaredValueObjectStorageType !== void 0) {\n\t\t\tif (valueObjectStorageDeclaration !== void 0) throw new InternalError(`Duplicate authoring valueObjectStorageType declaration. Descriptor \"${descriptorId}\" conflicts with \"${valueObjectStorageDeclaration.ownerId}\". Exactly one composed component may declare the value-object storage type.`);\n\t\t\tvalueObjectStorageDeclaration = {\n\t\t\t\tname: declaredValueObjectStorageType,\n\t\t\t\townerId: descriptorId\n\t\t\t};\n\t\t}\n\t\tif (descriptor.authoring?.field) {\n\t\t\tclaimContributedPaths(descriptor.authoring.field, \"fieldPreset\", \"field\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(field, descriptor.authoring.field, [], \"fieldPreset\", \"field\");\n\t\t}\n\t\tif (descriptor.authoring?.type) {\n\t\t\tclaimContributedPaths(descriptor.authoring.type, \"typeConstructor\", \"type\", descriptorId);\n\t\t\tassertResolvableTypeConstructorTemplates(descriptor.authoring.type, descriptorId);\n\t\t\tmergeAuthoringNamespaces(type, descriptor.authoring.type, [], \"typeConstructor\", \"type\");\n\t\t}\n\t\tif (descriptor.authoring?.entityTypes) {\n\t\t\tclaimContributedPaths(descriptor.authoring.entityTypes, \"entity\", \"entity\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(entityTypes, descriptor.authoring.entityTypes, [], \"entity\", \"entity\");\n\t\t}\n\t\tif (descriptor.authoring?.pslBlockDescriptors) {\n\t\t\tclaimContributedPaths(descriptor.authoring.pslBlockDescriptors, \"pslBlock\", \"pslBlock\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(pslBlockDescriptors, descriptor.authoring.pslBlockDescriptors, [], \"pslBlock\", \"pslBlock\");\n\t\t}\n\t\tif (descriptor.authoring?.modelAttributes) mergeAuthoringNamespaces(modelAttributes, descriptor.authoring.modelAttributes, [], \"modelAttribute\", \"modelAttribute\");\n\t\tif (descriptor.authoring?.attributeSpecs) mergeAuthoringAttributeSpecs(attributeSpecs, descriptor.authoring.attributeSpecs, descriptorId, attributeSpecOwners);\n\t}\n\tconst fieldNamespace = field;\n\tconst typeNamespace = type;\n\tconst entityTypeNamespace = entityTypes;\n\tconst pslBlockDescriptorNamespace = blindCast(pslBlockDescriptors);\n\tconst modelAttributeNamespace = blindCast(modelAttributes);\n\tassertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace, pslBlockDescriptorNamespace, modelAttributeNamespace);\n\tif (valueObjectStorageDeclaration !== void 0 && !collectScalarTypeConstructors(typeNamespace).has(valueObjectStorageDeclaration.name)) throw new InternalError(`Invalid authoring valueObjectStorageType \"${valueObjectStorageDeclaration.name}\" declared by descriptor \"${valueObjectStorageDeclaration.ownerId}\". The name must be a top-level bare-eligible type constructor in the assembled authoring namespace.`);\n\treturn {\n\t\tfield: fieldNamespace,\n\t\ttype: typeNamespace,\n\t\tentityTypes: entityTypeNamespace,\n\t\tpslBlockDescriptors: pslBlockDescriptorNamespace,\n\t\tmodelAttributes: modelAttributeNamespace,\n\t\tattributeSpecs,\n\t\t...valueObjectStorageDeclaration !== void 0 ? { valueObjectStorageType: valueObjectStorageDeclaration.name } : {}\n\t};\n}\nfunction assembleControlMutationDefaults(descriptors) {\n\tconst defaultFunctionRegistry = /* @__PURE__ */ new Map();\n\tconst functionOwners = /* @__PURE__ */ new Map();\n\tconst defaultLiteralTagRegistry = /* @__PURE__ */ new Map();\n\tconst tagOwners = /* @__PURE__ */ new Map();\n\tconst generatorMap = /* @__PURE__ */ new Map();\n\tconst generatorOwners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst contributions = descriptor.controlMutationDefaults;\n\t\tif (!contributions) continue;\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tfor (const generatorDescriptor of contributions.generatorDescriptors) {\n\t\t\tconst existingOwner = generatorOwners.get(generatorDescriptor.id);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default generator id \"${generatorDescriptor.id}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tgeneratorMap.set(generatorDescriptor.id, generatorDescriptor);\n\t\t\tgeneratorOwners.set(generatorDescriptor.id, descriptorId);\n\t\t}\n\t\tfor (const [functionName, handler] of contributions.defaultFunctionRegistry) {\n\t\t\tconst existingOwner = functionOwners.get(functionName);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default function \"${functionName}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tdefaultFunctionRegistry.set(functionName, handler);\n\t\t\tfunctionOwners.set(functionName, descriptorId);\n\t\t}\n\t\tfor (const [tag, entry] of contributions.defaultLiteralTagRegistry) {\n\t\t\tconst existingOwner = tagOwners.get(tag);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate default literal tag \"${tag}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tdefaultLiteralTagRegistry.set(tag, entry);\n\t\t\ttagOwners.set(tag, descriptorId);\n\t\t}\n\t}\n\treturn {\n\t\tdefaultFunctionRegistry,\n\t\tdefaultLiteralTagRegistry,\n\t\tgeneratorDescriptors: Array.from(generatorMap.values())\n\t};\n}\n/**\n* Collect every contributed {@link AggregateDescriptor} across the composed components, rejecting malformed shapes and second claims on one `(operation, input)` overload.\n*\n* Both planes read the same contribution slot: emission derives result types from these descriptors, and family runtimes build their resolution registry from them. Rejections are user-facing — an extension author's bad contribution surfaces here first, during `contract emit` — so a malformed shape raises `CONTRACT.AGGREGATE_DESCRIPTOR_INVALID` and a second claim raises `CONTRACT.AGGREGATE_DESCRIPTOR_DUPLICATE`, each naming the contributing component.\n*/\nfunction collectAggregateDescriptors(descriptors) {\n\tconst collected = [];\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tfor (const contributed of descriptor.types?.aggregateDescriptors ?? []) {\n\t\t\tif (!isAggregateDescriptor(contributed)) throw runtimeError(\"CONTRACT.AGGREGATE_DESCRIPTOR_INVALID\", `Malformed aggregate descriptor contributed by \"${descriptorId}\". A descriptor declares a non-empty \\`operation\\`, an \\`input\\` match of kind \\`none\\`/\\`any\\`/\\`codec\\`/\\`trait\\`, an \\`output\\` of kind \\`self\\`/\\`codec\\`, and a boolean \\`nullable\\` — plus \\`emptyResultJson\\`, in the result codec's canonical JSON, where \\`nullable\\` is false; a \\`self\\` output needs an input to reuse.`, {\n\t\t\t\tcontributedBy: descriptorId,\n\t\t\t\tdescriptor: contributed\n\t\t\t});\n\t\t\tconst key = aggregateDescriptorKey(contributed);\n\t\t\tconst existingOwner = owners.get(key);\n\t\t\tif (existingOwner !== void 0) throw runtimeError(\"CONTRACT.AGGREGATE_DESCRIPTOR_DUPLICATE\", `Duplicate aggregate descriptor for \"${key}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\". Each operation/input pair can only have one provider.`, {\n\t\t\t\tkey,\n\t\t\t\tcontributedBy: descriptorId,\n\t\t\t\towner: existingOwner\n\t\t\t});\n\t\t\towners.set(key, descriptorId);\n\t\t\tcollected.push(contributed);\n\t\t}\n\t}\n\treturn collected;\n}\n/**\n* Flatten the codec descriptors the composed components contribute.\n*\n* A component may know a codec and still withhold it — an adapter that cannot name a codec's emitted type contributes the rest without it — so the contributed set is not always the set some component's own registry holds. Consumers whose output must agree with what the runtime resolves read this list rather than any one component's registry.\n*/\nfunction collectCodecDescriptors(descriptors) {\n\treturn descriptors.flatMap((descriptor) => descriptor.types?.codecTypes?.codecDescriptors ?? []);\n}\nfunction extractCodecLookup(descriptors) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tconst descriptorsById = /* @__PURE__ */ new Map();\n\tconst targetTypesById = /* @__PURE__ */ new Map();\n\tconst renderersById = /* @__PURE__ */ new Map();\n\tconst inputRenderersById = /* @__PURE__ */ new Map();\n\tconst valueLiteralRenderersById = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst codecTypes = descriptor.types?.codecTypes;\n\t\tconst descriptorId = descriptor.id;\n\t\tfor (const codecDescriptor of codecTypes?.codecDescriptors ?? []) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId: codecDescriptor.codecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId,\n\t\t\t\tentityLabel: \"codec descriptor\",\n\t\t\t\tentityOwnershipLabel: \"codec descriptor provider\"\n\t\t\t});\n\t\t\towners.set(codecDescriptor.codecId, descriptorId);\n\t\t\tdescriptorsById.set(codecDescriptor.codecId, codecDescriptor);\n\t\t\tif (Array.isArray(codecDescriptor.targetTypes)) targetTypesById.set(codecDescriptor.codecId, codecDescriptor.targetTypes);\n\t\t\tif (typeof codecDescriptor.renderOutputType === \"function\") renderersById.set(codecDescriptor.codecId, codecDescriptor.renderOutputType);\n\t\t\tif (typeof codecDescriptor.renderInputType === \"function\") inputRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderInputType);\n\t\t\tif (typeof codecDescriptor.renderValueLiteral === \"function\") valueLiteralRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderValueLiteral);\n\t\t\tif (!byId.has(codecDescriptor.codecId)) if (codecDescriptor.isParameterized) try {\n\t\t\t\tconst representative = codecDescriptor.factory({})({ name: `<lookup:${codecDescriptor.codecId}>` });\n\t\t\t\tbyId.set(codecDescriptor.codecId, representative);\n\t\t\t} catch {}\n\t\t\telse {\n\t\t\t\tconst representative = codecDescriptor.factory(void 0)({ name: `<lookup:${codecDescriptor.codecId}>` });\n\t\t\t\tbyId.set(codecDescriptor.codecId, representative);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tget: (id) => byId.get(id),\n\t\tforCodecRef(ref) {\n\t\t\treturn materializeCodec(resolveCodecDescriptorOrThrow((id) => descriptorsById.get(id), ref, CONTRACT_CODEC_DESCRIPTOR_MISSING), ref, { name: `<ref:${ref.codecId}>` });\n\t\t},\n\t\tforColumn: () => void 0,\n\t\ttargetTypesFor: (id) => targetTypesById.get(id),\n\t\trenderOutputTypeFor: (id, params) => renderersById.get(id)?.(params),\n\t\trenderInputTypeFor: (id, params) => inputRenderersById.get(id)?.(params),\n\t\trenderValueLiteralFor: (id, value, side) => valueLiteralRenderersById.get(id)?.(value, side),\n\t\tdescriptorFor: (id) => descriptorsById.get(id)\n\t};\n}\nfunction assembleExtensionContracts(extensions) {\n\tconst result = /* @__PURE__ */ new Map();\n\tfor (const ext of extensions) {\n\t\tif (ext.contractSpace === void 0) continue;\n\t\tresult.set(ext.id, ext.contractSpace.contractJson);\n\t}\n\treturn result;\n}\nfunction readDeclaredDependencyIds(descriptor) {\n\tconst packs = descriptor.contractSpace?.contractJson?.extensions;\n\tif (packs === null || typeof packs !== \"object\") return [];\n\treturn Object.keys(packs);\n}\n/**\n* Builds a dependency-respecting load order for the given extension descriptors\n* using Kahn's topological sort algorithm. Dependencies (packs declared in\n* `contractSpace.contractJson.extensions`) are placed before the extensions\n* that depend on them.\n*\n* Throws if the dependency graph contains a cycle, with an error message that\n* names every extension involved in the cycle.\n*\n* Throws if any extension declares a dependency on a pack ID that is not present\n* in the provided list — add the missing pack to the `extensions` list to\n* resolve the error.\n*/\nfunction buildExtensionLoadOrder(extensions) {\n\tif (extensions.length === 0) return [];\n\tconst idSet = new Set(extensions.map((e) => e.id));\n\tconst inDegree = /* @__PURE__ */ new Map();\n\tconst dependents = /* @__PURE__ */ new Map();\n\tfor (const ext of extensions) {\n\t\tif (!inDegree.has(ext.id)) inDegree.set(ext.id, 0);\n\t\tif (!dependents.has(ext.id)) dependents.set(ext.id, []);\n\t}\n\tfor (const ext of extensions) for (const depId of readDeclaredDependencyIds(ext)) {\n\t\tif (!idSet.has(depId)) throw new InternalError(`Extension \"${ext.id}\" declares a dependency on \"${depId}\", but \"${depId}\" is not in the provided extension set. Add the missing space to extensions.`);\n\t\tinDegree.set(ext.id, (inDegree.get(ext.id) ?? 0) + 1);\n\t\tconst list = dependents.get(depId);\n\t\tif (list !== void 0) list.push(ext.id);\n\t}\n\tconst queue = [];\n\tfor (const [id, deg] of inDegree) if (deg === 0) queue.push(id);\n\tqueue.sort();\n\tconst result = [];\n\twhile (queue.length > 0) {\n\t\tconst id = queue.shift();\n\t\tif (id === void 0) break;\n\t\tresult.push(id);\n\t\tconst children = dependents.get(id) ?? [];\n\t\tchildren.sort();\n\t\tfor (const childId of children) {\n\t\t\tconst newDeg = (inDegree.get(childId) ?? 1) - 1;\n\t\t\tinDegree.set(childId, newDeg);\n\t\t\tif (newDeg === 0) queue.push(childId);\n\t\t}\n\t}\n\tif (result.length < extensions.length) throw new InternalError(`Extension dependency cycle detected. Cycle members: ${extensions.map((e) => e.id).filter((id) => !result.includes(id)).sort().map((id) => `\"${id}\"`).join(\", \")}.`);\n\treturn result;\n}\nfunction createControlStack(input) {\n\tconst { family, target, adapter, driver, extensions = [] } = input;\n\tconst orderedIds = buildExtensionLoadOrder(extensions);\n\tconst extensionById = new Map(extensions.map((ext) => [ext.id, ext]));\n\tconst orderedExtensions = orderedIds.map((id) => extensionById.get(id)).filter((ext) => ext !== void 0);\n\tconst allDescriptors = [\n\t\tfamily,\n\t\ttarget,\n\t\t...adapter ? [adapter] : [],\n\t\t...orderedExtensions\n\t];\n\tconst codecLookup = extractCodecLookup(allDescriptors);\n\tconst authoringContributions = assembleAuthoringContributions(allDescriptors);\n\treturn {\n\t\tfamily,\n\t\ttarget,\n\t\tadapter,\n\t\tdriver,\n\t\textensions: orderedExtensions,\n\t\textensionContracts: assembleExtensionContracts(orderedExtensions),\n\t\tcodecTypeImports: extractCodecTypeImports(allDescriptors),\n\t\tqueryOperationTypeImports: extractQueryOperationTypeImports(allDescriptors),\n\t\textensionIds: extractComponentIds(family, target, adapter, orderedExtensions),\n\t\tcodecLookup,\n\t\tcodecDescriptors: collectCodecDescriptors(allDescriptors),\n\t\taggregateDescriptors: collectAggregateDescriptors(allDescriptors),\n\t\tauthoringContributions,\n\t\tscalarTypes: [...collectScalarTypeConstructors(authoringContributions.type).keys()],\n\t\tcontrolMutationDefaults: assembleControlMutationDefaults(allDescriptors),\n\t\tcapabilities: mergeCapabilityMatrices({}, [\n\t\t\ttarget,\n\t\t\t...adapter ? [adapter] : [],\n\t\t\t...orderedExtensions\n\t\t])\n\t};\n}\n//#endregion\n//#region src/control/order-issues-by-dependencies.ts\nconst PATH_DELIMITER = \" \";\nfunction pathKey(path) {\n\treturn path.join(PATH_DELIMITER);\n}\n/**\n* Whether an issue's op builds its subject up (create or alter) rather than\n* only tearing it down. The differ sets `expected` on every create (`not-found`)\n* and alter (`not-equal`) issue and leaves it absent on a pure drop\n* (`not-expected`). This is the single signal the ordering law reads for edge\n* direction — never `reason`.\n*/\nfunction buildsUp(issue) {\n\treturn issue.expected !== void 0;\n}\n/**\n* The nearest strict-ancestor bucket of `path` — the surviving parent entity a\n* child is contained by. Walks the path's proper prefixes from longest to\n* shortest and returns the first prefix that maps to a bucket; a gap (a prefix\n* with no bucket) is skipped so containment always attaches to the closest real\n* parent.\n*\n* Returns a list because a path prefix can be shared by two siblings of\n* different `nodeKind` (a role and a namespace named alike); linking the child\n* to every candidate over-constrains safely (the extra edge points at a same-\n* direction op and never forms a cycle, since a parent never depends on its\n* child) rather than risk picking the wrong one.\n*/\nfunction nearestAncestors(path, byPath) {\n\tfor (let end = path.length - 1; end >= 1; end -= 1) {\n\t\tconst bucket = byPath.get(pathKey(path.slice(0, end)));\n\t\tif (bucket !== void 0) return bucket;\n\t}\n\treturn [];\n}\n/**\n* Orders schema-diff issues so that every dependency's op precedes its\n* dependent on the way up and follows it on the way down, breaking ties\n* deterministically by path.\n*\n* Edges come from two sources:\n* - **`dependsOn` cross-links** — the resolved issue-to-issue paths the differ\n* mirrors onto each issue (a node's declared structural prerequisites). A\n* path that resolves to no issue in this list is skipped (the dependency is\n* satisfied by reality); a path shared by two same-id/different-kind siblings\n* links to every match, over-constraining safely.\n* - **containment** — every issue depends on its nearest strict-ancestor issue\n* (a child entity on the parent entity that owns it). Subtree coalescing has\n* already removed the descendants of a whole create/drop, so this only links\n* the parent/child pairs that legitimately survive together.\n*\n* The ordering law reads each dependent's presence for direction: an issue that\n* builds up (`expected` present — a create or alter) needs its dependency\n* first; a pure drop needs its dependent removed first, so the edge reverses.\n* The graph is a DAG by construction (dependencies point from dependents to\n* their prerequisites, and prerequisites never point back), so a cycle is a\n* derivation or authoring bug: the topological sort asserts acyclicity and\n* throws, naming the issues it could not place.\n*/\nfunction orderIssuesByDependencies(issues) {\n\tif (issues.length <= 1) return issues;\n\tconst nodes = issues.map((issue) => ({\n\t\tissue,\n\t\tkey: pathKey(issue.path),\n\t\tbuildsUp: buildsUp(issue),\n\t\toutgoing: /* @__PURE__ */ new Set(),\n\t\tinDegree: 0\n\t}));\n\tconst nodesByPath = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) {\n\t\tconst bucket = nodesByPath.get(node.key);\n\t\tif (bucket === void 0) nodesByPath.set(node.key, [node]);\n\t\telse bucket.push(node);\n\t}\n\tconst addEdge = (before, after) => {\n\t\tif (before.outgoing.has(after)) return;\n\t\tbefore.outgoing.add(after);\n\t\tafter.inDegree += 1;\n\t};\n\tconst addDependency = (dependent, dependency) => {\n\t\tif (dependent === dependency) return;\n\t\tif (dependent.buildsUp) addEdge(dependency, dependent);\n\t\telse addEdge(dependent, dependency);\n\t};\n\tfor (const node of nodes) {\n\t\tfor (const targetPath of node.issue.dependsOn ?? []) for (const target of nodesByPath.get(pathKey(targetPath)) ?? []) addDependency(node, target);\n\t\tfor (const ancestor of nearestAncestors(node.issue.path, nodesByPath)) addDependency(node, ancestor);\n\t}\n\tconst ready = nodes.filter((node) => node.inDegree === 0);\n\tconst order = [];\n\twhile (ready.length > 0) {\n\t\tlet best;\n\t\tfor (const candidate of ready) if (best === void 0 || candidate.key < best.key) best = candidate;\n\t\tif (best === void 0) break;\n\t\tready.splice(ready.indexOf(best), 1);\n\t\torder.push(best);\n\t\tfor (const next of best.outgoing) {\n\t\t\tnext.inDegree -= 1;\n\t\t\tif (next.inDegree === 0) ready.push(next);\n\t\t}\n\t}\n\tif (order.length !== nodes.length) {\n\t\tconst placed = new Set(order);\n\t\tthrow new InternalError(`orderIssuesByDependencies: dependency cycle among schema-diff issues (unresolved: ${nodes.filter((node) => !placed.has(node)).map((node) => node.issue.path.join(\"/\")).join(\", \")})`);\n\t}\n\treturn order.map((node) => node.issue);\n}\n//#endregion\n//#region src/control/schema-diff.ts\n/**\n* The outcome an issue represents, discriminated by presence rather than any\n* stored field — the single source of truth every consumer reads. An issue\n* always carries at least one side by construction; neither is a malformed\n* issue and throws.\n*/\nfunction issueOutcome(issue) {\n\tconst hasExpected = issue.expected !== void 0;\n\tconst hasActual = issue.actual !== void 0;\n\tif (hasExpected && hasActual) return \"not-equal\";\n\tif (hasExpected) return \"not-found\";\n\tif (hasActual) return \"not-expected\";\n\tthrow new InternalError(`issueOutcome: issue at \"${issue.path.join(\"/\")}\" carries neither an expected nor an actual node`);\n}\n/** Delimiter joining `nodeKind` and `id` into one sibling-map key. Every `nodeKind` is a code-defined literal (kebab-case-style), so a null character can never appear in one. */\nconst SIBLING_KEY_DELIMITER = \"\\0\";\nfunction siblingKey(node) {\n\treturn `${node.nodeKind}${SIBLING_KEY_DELIMITER}${node.id}`;\n}\nfunction insertNode(map, node) {\n\tconst key = siblingKey(node);\n\tif (map.has(key)) throw new InternalError(`diffSchemas: duplicate id among siblings: ${node.nodeKind}/${node.id}`);\n\tmap.set(key, node);\n}\nfunction emitMissingSubtree(node, parentPath) {\n\tconst path = [...parentPath, node.id];\n\treturn [{\n\t\tpath,\n\t\texpected: node\n\t}, ...node.children().flatMap((c) => emitMissingSubtree(c, path))];\n}\nfunction emitExtraSubtree(node, parentPath) {\n\tconst path = [...parentPath, node.id];\n\treturn [{\n\t\tpath,\n\t\tactual: node\n\t}, ...node.children().flatMap((c) => emitExtraSubtree(c, path))];\n}\n/**\n* Diff two schema trees starting from their roots.\n*\n* The differ is **total**: every node-level difference is reported. An unmatched\n* non-leaf node emits its own issue and descends, emitting an issue for every\n* node in the missing/extra subtree. Coalescing a parent change over its\n* children is the planner's responsibility. Ownership filtering (dropping `extra`\n* issues in namespaces a contract doesn't own) is the caller's responsibility.\n*/\nfunction diffSchemas(expected, actual) {\n\treturn mirrorDependsOnOntoIssues(diffPair(expected, actual, []));\n}\nfunction schemaNodeRefKey(ref) {\n\treturn ref.map((step) => step.id).join(SIBLING_KEY_DELIMITER);\n}\nfunction issuePathKey(path) {\n\treturn path.join(SIBLING_KEY_DELIMITER);\n}\nfunction terminalNodeKind(issue) {\n\treturn (issue.expected ?? issue.actual)?.nodeKind;\n}\n/**\n* Copies each issue's node's `dependsOn` refs onto the issue itself, as\n* issue-to-issue path references. A ref is kept only when some emitted issue\n* sits at that exact path AND that issue's node `nodeKind` matches the ref's\n* last step — otherwise the ref is dropped (its target either didn't\n* change, or was never part of either tree; either way the dependency is\n* satisfied by reality, not by an operation this diff will produce).\n*\n* The path index is a multimap: two siblings may share an `id` under\n* different `nodeKind`s (a role and a namespace named alike), so an id-path\n* alone is ambiguous. The ref's terminal `nodeKind` disambiguates — the ref\n* resolves only against a same-path issue whose own node carries that kind.\n*/\nfunction mirrorDependsOnOntoIssues(issues) {\n\tconst issuesByPath = /* @__PURE__ */ new Map();\n\tfor (const issue of issues) {\n\t\tconst key = issuePathKey(issue.path);\n\t\tconst bucket = issuesByPath.get(key);\n\t\tif (bucket === void 0) issuesByPath.set(key, [issue]);\n\t\telse bucket.push(issue);\n\t}\n\treturn issues.map((issue) => {\n\t\tconst refs = (issue.expected ?? issue.actual)?.dependsOn;\n\t\tif (refs === void 0 || refs.length === 0) return issue;\n\t\tconst dependsOn = refs.flatMap((ref) => {\n\t\t\tconst lastStep = ref[ref.length - 1];\n\t\t\tif (lastStep === void 0) return [];\n\t\t\tif (!(issuesByPath.get(schemaNodeRefKey(ref)) ?? []).some((c) => terminalNodeKind(c) === lastStep.nodeKind)) return [];\n\t\t\treturn [ref.map((step) => step.id)];\n\t\t});\n\t\tif (dependsOn.length === 0) return issue;\n\t\treturn {\n\t\t\t...issue,\n\t\t\tdependsOn\n\t\t};\n\t});\n}\nfunction diffPair(expected, actual, parentPath) {\n\tconst path = [...parentPath, expected.id];\n\tconst issues = [];\n\tif (!expected.isEqualTo(actual)) issues.push({\n\t\tpath,\n\t\texpected,\n\t\tactual\n\t});\n\tissues.push(...diffChildren(expected.children(), actual.children(), path));\n\treturn issues;\n}\n/**\n* Align one level of nodes by `(nodeKind, id)`; emit issues in input order\n* and recurse.\n*\n* A missing node emits one issue for itself and one for every node in its\n* subtree (total descent). Same for extra nodes. A matched pair recurses via\n* `diffPair`.\n*/\nfunction diffChildren(expected, actual, parentPath) {\n\tconst expectedMap = /* @__PURE__ */ new Map();\n\tfor (const node of expected) insertNode(expectedMap, node);\n\tconst actualMap = /* @__PURE__ */ new Map();\n\tfor (const node of actual) insertNode(actualMap, node);\n\tconst issues = [];\n\tfor (const [key, expectedNode] of expectedMap) {\n\t\tconst actualNode = actualMap.get(key);\n\t\tif (actualNode === void 0) issues.push(...emitMissingSubtree(expectedNode, parentPath));\n\t\telse issues.push(...diffPair(expectedNode, actualNode, parentPath));\n\t}\n\tfor (const [key, actualNode] of actualMap) if (!expectedMap.has(key)) issues.push(...emitExtraSubtree(actualNode, parentPath));\n\treturn issues;\n}\n/**\n* The result of diffing a contract's expected schema against the introspected\n* actual schema: one node-typed issue list. Carries no verdict, verification\n* tree, or counts — those are the verifier's own presentation, built from the\n* same underlying comparison.\n*\n* `TNode` is the concrete schema-IR node the issues carry; it defaults to\n* `DiffableNode`, so this is purely additive — a caller that wants the\n* concrete node opts in (the Postgres planner uses the concrete node type),\n* everyone else keeps the default unchanged.\n*/\nvar SchemaDiff = class SchemaDiff {\n\tissues;\n\tconstructor(issues) {\n\t\tthis.issues = issues;\n\t}\n\t/** Returns a new `SchemaDiff` narrowed to the issues `keep` returns true for. */\n\tfilter(keep) {\n\t\treturn new SchemaDiff(this.issues.filter(keep));\n\t}\n};\n//#endregion\n//#region src/control/verifier-disposition.ts\n/**\n* Grades a target-neutral issue category against a control policy.\n*\n* - `observed` warns on everything.\n* - `tolerated` suppresses only an extra nested element (everything else fails).\n* - `external` suppresses every extra category and value drift (existence and\n* declared-shape divergences still fail).\n* - `managed` (and any other) fails.\n*/\nfunction dispositionForCategory(controlPolicy, category) {\n\tif (controlPolicy === \"observed\") return \"warn\";\n\tif (controlPolicy === \"tolerated\" && category === \"extraNestedElement\") return \"suppress\";\n\tif (controlPolicy === \"external\") {\n\t\tif (category === \"extraNestedElement\" || category === \"extraAuxiliary\" || category === \"extraTopLevelObject\" || category === \"valueDrift\") return \"suppress\";\n\t}\n\treturn \"fail\";\n}\n//#endregion\n//#region src/shared/tagged-literal.ts\nconst TAGGED_LITERAL_MAX_BYTES = 65536;\n/** The message a tagged literal's canonicalization failure is reported with, in PSL and in TypeScript. */\nfunction describeTaggedLiteralFailure(reason) {\n\tswitch (reason) {\n\t\tcase \"nul\": return \"Tagged literals must not contain NUL characters.\";\n\t\tcase \"too-large\": return `Tagged literal exceeds ${TAGGED_LITERAL_MAX_BYTES} bytes.`;\n\t}\n}\nconst BACKTICK_ESCAPES = /* @__PURE__ */ new Set([\"`\", \"\\\\\"]);\n/**\n* Resolves the escapes a backtick string understands, in PSL and in the TypeScript `sql` tag's raw\n* text: `` \\` `` is a backtick and `\\\\` one backslash. Every other backslash sequence is kept as\n* written, both characters, so a SQL body may contain `E'\\n'` unchanged.\n*/\nfunction resolveBacktickEscapes(raw) {\n\tlet out = \"\";\n\tlet i = 0;\n\twhile (i < raw.length) {\n\t\tconst ch = raw.charAt(i);\n\t\tconst next = raw.charAt(i + 1);\n\t\tif (ch === \"\\\\\" && BACKTICK_ESCAPES.has(next)) {\n\t\t\tout += next;\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tout += ch;\n\t\ti++;\n\t}\n\treturn out;\n}\nconst BLANK_LINE = /^[ \\t]*$/;\nconst LEADING_INDENT = /^[ \\t]*/;\nconst LINE_BREAK = /\\r\\n|\\r|\\n/g;\n/**\n* Turns the escape-resolved text of a tagged literal into its canonical body:\n* newlines become `\\n`, a blank first and last line are dropped, common leading\n* whitespace is removed, internal blank lines become empty, and no trailing\n* newline is added. Fails on a NUL character or when the result is larger than\n* 65536 UTF-8 bytes.\n*/\nfunction canonicalizeTaggedLiteralBody(resolved) {\n\tconst nul = resolved.indexOf(\"\\0\");\n\tif (nul !== -1) return {\n\t\tok: false,\n\t\treason: \"nul\",\n\t\toffset: nul\n\t};\n\tconst lines = splitLines(resolved);\n\tif (lines.length > 0 && BLANK_LINE.test(lines[0]?.text ?? \"\")) lines.shift();\n\tif (lines.length > 0 && BLANK_LINE.test(lines.at(-1)?.text ?? \"\")) lines.pop();\n\tconst indent = commonIndent(lines);\n\tconst bodyLines = lines.map((line) => BLANK_LINE.test(line.text) ? {\n\t\ttext: \"\",\n\t\tstart: line.start\n\t} : {\n\t\ttext: line.text.slice(indent),\n\t\tstart: line.start + indent\n\t});\n\tconst excess = offsetWhereBytesExceed(bodyLines, TAGGED_LITERAL_MAX_BYTES);\n\tif (excess !== void 0) return {\n\t\tok: false,\n\t\treason: \"too-large\",\n\t\toffset: excess\n\t};\n\treturn {\n\t\tok: true,\n\t\tbody: bodyLines.map((line) => line.text).join(\"\\n\")\n\t};\n}\nfunction splitLines(text) {\n\tconst lines = [];\n\tlet start = 0;\n\tfor (const match of text.matchAll(LINE_BREAK)) {\n\t\tlines.push({\n\t\t\ttext: text.slice(start, match.index),\n\t\t\tstart\n\t\t});\n\t\tstart = match.index + match[0].length;\n\t}\n\tlines.push({\n\t\ttext: text.slice(start),\n\t\tstart\n\t});\n\treturn lines;\n}\nfunction commonIndent(lines) {\n\tlet indent = Number.POSITIVE_INFINITY;\n\tfor (const line of lines) {\n\t\tif (BLANK_LINE.test(line.text)) continue;\n\t\tindent = Math.min(indent, LEADING_INDENT.exec(line.text)?.[0].length ?? 0);\n\t}\n\treturn Number.isFinite(indent) ? indent : 0;\n}\n/** The resolved-text offset of the first character that pushes the body past `limit` bytes. */\nfunction offsetWhereBytesExceed(lines, limit) {\n\tlet bytes = 0;\n\tfor (const [index, line] of lines.entries()) {\n\t\tif (index > 0) {\n\t\t\tbytes += 1;\n\t\t\tif (bytes > limit) return line.start;\n\t\t}\n\t\tlet offsetInLine = 0;\n\t\tfor (const char of line.text) {\n\t\t\tbytes += utf8Length(char.codePointAt(0) ?? 0);\n\t\t\tif (bytes > limit) return line.start + offsetInLine;\n\t\t\toffsetInLine += char.length;\n\t\t}\n\t}\n}\nfunction utf8Length(codePoint) {\n\tif (codePoint < 128) return 1;\n\tif (codePoint < 2048) return 2;\n\tif (codePoint < 65536) return 3;\n\treturn 4;\n}\n//#endregion\nexport { APP_SPACE_ID, CONTRACT_SNAPSHOTS_DIRNAME, SchemaDiff, SchemaTreeNode, TAGGED_LITERAL_MAX_BYTES, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assertUniqueCodecOwner, buildExtensionLoadOrder, canonicalizeTaggedLiteralBody, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, createControlStack, describeTaggedLiteralFailure, diffSchemas, dispositionForCategory, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, issueOutcome, orderIssuesByDependencies, resolveBacktickEscapes, storageHashHex };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,6BAA6B;AACnC,MAAM,uBAAuB;;AAE7B,SAAS,eAAe,aAAa;CACpC,IAAI,CAAC,qBAAqB,KAAK,WAAW,GAAG,MAAM,IAAI,cAAc,yBAAyB,YAAY,wCAAwC;CAClJ,OAAO;AACR;;AAEA,SAAS,8BAA8B,qBAAqB,aAAa;CACxE,OAAO,GAA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AAO;CAC7C,IAAI,QAAQ;CACZ,KAAK,MAAM,CAAC,OAAO,SAAS,MAAM,QAAQ,GAAG;EAC5C,IAAI,QAAQ,GAAG;GACd,SAAS;GACT,IAAI,QAAQ,OAAO,OAAO,KAAK;EAChC;EACA,IAAI,eAAe;EACnB,KAAK,MAAM,QAAQ,KAAK,MAAM;GAC7B,SAAS,WAAW,KAAK,YAAY,CAAC,KAAK,CAAC;GAC5C,IAAI,QAAQ,OAAO,OAAO,KAAK,QAAQ;GACvC,gBAAgB,KAAK;EACtB;CACD;AACD;AACA,SAAS,WAAW,WAAW;CAC9B,IAAI,YAAY,KAAK,OAAO;CAC5B,IAAI,YAAY,MAAM,OAAO;CAC7B,IAAI,YAAY,OAAO,OAAO;CAC9B,OAAO;AACR"}
@@ -1,4 +1,6 @@
1
- //#region ../../../1-framework/2-authoring/psl-parser/dist/declarations-C8gJnWQp.mjs
1
+ import { M as resolveBacktickEscapes, m as canonicalizeTaggedLiteralBody } from "./control-LZyLwXWd.mjs";
2
+ import { n as isTerminatedStringLiteral } from "./tokenizer-D4sywyzm-gPsD7tYP.mjs";
3
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/declarations-ApW55O9s.mjs
2
4
  /**
3
5
  * A token in the red tree. Unlike the green-layer {@link Token} (kind + text
4
6
  * only), a red token also carries its absolute `offset` within the source and a
@@ -580,15 +582,55 @@ var StringLiteralExprAst = class StringLiteralExprAst {
580
582
  token() {
581
583
  return findChildToken(this.syntax, "StringLiteral");
582
584
  }
585
+ quote() {
586
+ const quote = this.token()?.text.charAt(0);
587
+ return quote === "\"" || quote === "'" || quote === "`" ? quote : void 0;
588
+ }
589
+ /**
590
+ * The decoded string. A `"` or `'` string resolves the usual escapes; a backtick string resolves
591
+ * only `` \` `` and `\\`, keeping every other backslash sequence as written.
592
+ */
583
593
  value() {
584
594
  const tok = this.token();
585
595
  if (!tok) return void 0;
586
- return decodeStringLiteral(tok.text.slice(1, -1));
596
+ const raw = isTerminatedStringLiteral(tok.text) ? tok.text.slice(1, -1) : tok.text.slice(1);
597
+ return this.quote() === "`" ? resolveBacktickEscapes(raw) : decodeStringLiteral(raw);
587
598
  }
588
599
  static cast(node) {
589
600
  return node.kind === "StringLiteralExpr" ? new StringLiteralExprAst(node) : void 0;
590
601
  }
591
602
  };
603
+ /** `` tag`body` ``, `tag"body"`, or `tag'body'`: a qualified-name tag followed by a string literal. */
604
+ var TaggedLiteralExprAst = class TaggedLiteralExprAst {
605
+ syntax;
606
+ constructor(syntax) {
607
+ this.syntax = syntax;
608
+ }
609
+ tag() {
610
+ return findFirstChild(this.syntax, QualifiedNameAst.cast);
611
+ }
612
+ /** The tag without trivia, e.g. `pg.sql`. */
613
+ tagName() {
614
+ const tag = this.tag();
615
+ const space = tag?.space()?.name();
616
+ const namespace = tag?.namespace()?.name();
617
+ return (space === void 0 ? "" : `${space}:`) + (namespace === void 0 ? "" : `${namespace}.`) + (tag?.identifier()?.name() ?? "");
618
+ }
619
+ literal() {
620
+ return findFirstChild(this.syntax, StringLiteralExprAst.cast);
621
+ }
622
+ canonicalization() {
623
+ return canonicalizeTaggedLiteralBody(this.literal()?.value() ?? "");
624
+ }
625
+ /** The canonical body shared with the TypeScript `sql` tag, or `undefined` when canonicalization fails. */
626
+ body() {
627
+ const result = this.canonicalization();
628
+ return result.ok ? result.body : void 0;
629
+ }
630
+ static cast(node) {
631
+ return node.kind === "TaggedLiteral" ? new TaggedLiteralExprAst(node) : void 0;
632
+ }
633
+ };
592
634
  var NumberLiteralExprAst = class NumberLiteralExprAst {
593
635
  syntax;
594
636
  constructor(syntax) {
@@ -699,7 +741,7 @@ var ObjectFieldAst = class ObjectFieldAst {
699
741
  }
700
742
  };
701
743
  function castExpression(node) {
702
- return FunctionCallAst.cast(node) ?? ArrayLiteralAst.cast(node) ?? StringLiteralExprAst.cast(node) ?? NumberLiteralExprAst.cast(node) ?? BooleanLiteralExprAst.cast(node) ?? ObjectLiteralExprAst.cast(node) ?? IdentifierAst.cast(node);
744
+ return FunctionCallAst.cast(node) ?? ArrayLiteralAst.cast(node) ?? StringLiteralExprAst.cast(node) ?? TaggedLiteralExprAst.cast(node) ?? NumberLiteralExprAst.cast(node) ?? BooleanLiteralExprAst.cast(node) ?? ObjectLiteralExprAst.cast(node) ?? IdentifierAst.cast(node);
703
745
  }
704
746
  var AttributeArgAst = class AttributeArgAst {
705
747
  syntax;
@@ -1049,6 +1091,6 @@ var NamedTypeDeclarationAst = class NamedTypeDeclarationAst {
1049
1091
  }
1050
1092
  };
1051
1093
  //#endregion
1052
- export { filterChildren as A, SyntaxToken as C, any as D, TypesBlockAst as E, findFirstChild as M, printSyntax as N, castExpression as O, SyntaxNode as S, TypeAnnotationAst as T, NumberLiteralExprAst as _, CompositeTypeDeclarationAst as a, QualifiedNameAst as b, FieldDeclarationAst as c, IdentifierAst as d, KeyValuePairAst as f, NamespaceDeclarationAst as g, NamedTypeDeclarationAst as h, BooleanLiteralExprAst as i, findChildToken as j, createSyntaxTree as k, FunctionCallAst as l, ModelDeclarationAst as m, AttributeArgAst as n, DocumentAst as o, ModelAttributeAst as p, AttributeArgListAst as r, FieldAttributeAst as s, ArrayLiteralAst as t, GenericBlockDeclarationAst as u, ObjectFieldAst as v, TokenAtOffset as w, StringLiteralExprAst as x, ObjectLiteralExprAst as y };
1094
+ export { createSyntaxTree as A, SyntaxToken as C, TypesBlockAst as D, TypeAnnotationAst as E, findChildToken as M, findFirstChild as N, any as O, printSyntax as P, SyntaxNode as S, TokenAtOffset as T, NumberLiteralExprAst as _, CompositeTypeDeclarationAst as a, QualifiedNameAst as b, FieldDeclarationAst as c, IdentifierAst as d, KeyValuePairAst as f, NamespaceDeclarationAst as g, NamedTypeDeclarationAst as h, BooleanLiteralExprAst as i, filterChildren as j, castExpression as k, FunctionCallAst as l, ModelDeclarationAst as m, AttributeArgAst as n, DocumentAst as o, ModelAttributeAst as p, AttributeArgListAst as r, FieldAttributeAst as s, ArrayLiteralAst as t, GenericBlockDeclarationAst as u, ObjectFieldAst as v, TaggedLiteralExprAst as w, StringLiteralExprAst as x, ObjectLiteralExprAst as y };
1053
1095
 
1054
- //# sourceMappingURL=declarations-C8gJnWQp-CnufYOCF.mjs.map
1096
+ //# sourceMappingURL=declarations-ApW55O9s-DmbPATJi.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declarations-ApW55O9s-DmbPATJi.mjs","names":["#state","#segmentBefore","#segmentAfter","#separatorCount"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/declarations-ApW55O9s.mjs"],"sourcesContent":["import { n as isTerminatedStringLiteral } from \"./tokenizer-D4sywyzm.mjs\";\nimport { canonicalizeTaggedLiteralBody, resolveBacktickEscapes } from \"@internal/framework-components/control\";\n//#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 childAt(this.parent, this.index + 1);\n\t}\n\t/** The sibling element immediately before this token within its parent. */\n\tget prevSiblingOrToken() {\n\t\treturn childAt(this.parent, 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\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\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 childAt(this, 0);\n\t}\n\tget lastChild() {\n\t\tconst len = this.green.children.length;\n\t\tif (len === 0) return void 0;\n\t\treturn childAt(this, len - 1);\n\t}\n\tget nextSibling() {\n\t\treturn this.parent === void 0 ? void 0 : childAt(this.parent, this.index + 1);\n\t}\n\tget prevSibling() {\n\t\treturn this.parent === void 0 ? void 0 : childAt(this.parent, 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\tlet offset = this.offset;\n\t\tlet index = 0;\n\t\tfor (const child of this.green.children) {\n\t\t\tyield wrapElement(child, offset, this, index);\n\t\t\toffset += elementTextLength(child);\n\t\t\tindex++;\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\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 = childAt(parent, 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 = childAt(parent, 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 childAt(node, index) {\n\tconst children = node.green.children;\n\tconst target = children[index];\n\tif (target === void 0) return void 0;\n\tlet offset = node.offset;\n\tfor (let i = 0; i < index; i++) {\n\t\tconst child = children[i];\n\t\tif (child !== void 0) offset += elementTextLength(child);\n\t}\n\treturn wrapElement(target, offset, node, 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\n//#region src/syntax/ast/identifier.ts\nvar IdentifierAst = class IdentifierAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn this.token()?.text;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"Identifier\" ? new IdentifierAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/qualified-name.ts\n/** A namespace-qualified name, e.g. `pgvector.Vector` or `supabase:auth.User`. */\nvar QualifiedNameAst = class QualifiedNameAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t#segmentBefore(boundary) {\n\t\tlet found;\n\t\tfor (const segment of filterChildren(this.syntax, IdentifierAst.cast)) {\n\t\t\tif (segment.syntax.offset >= boundary) break;\n\t\t\tfound = segment;\n\t\t}\n\t\treturn found;\n\t}\n\t#segmentAfter(boundary) {\n\t\tfor (const segment of filterChildren(this.syntax, IdentifierAst.cast)) if (segment.syntax.offset > boundary) return segment;\n\t}\n\t#separatorCount(kind) {\n\t\tlet count = 0;\n\t\tfor (const child of this.syntax.children()) if (!(child instanceof SyntaxNode) && child.kind === kind) count++;\n\t\treturn count;\n\t}\n\tcolon() {\n\t\treturn findChildToken(this.syntax, \"Colon\");\n\t}\n\tdot() {\n\t\treturn findChildToken(this.syntax, \"Dot\");\n\t}\n\tspace() {\n\t\tconst colon = this.colon();\n\t\tif (!colon) return void 0;\n\t\treturn this.#segmentBefore(colon.offset);\n\t}\n\tnamespace() {\n\t\tconst dot = this.dot();\n\t\tif (!dot) return void 0;\n\t\treturn this.#segmentBefore(dot.offset);\n\t}\n\tidentifier() {\n\t\tconst dot = this.dot();\n\t\tif (dot) return this.#segmentAfter(dot.offset);\n\t\tconst colon = this.colon();\n\t\tif (colon) return this.#segmentAfter(colon.offset);\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\t/**\n\t* Every identifier segment, in source order. A bare `Vector` yields\n\t* `['Vector']`; a qualified `pgvector.Vector` yields `['pgvector', 'Vector']`.\n\t*/\n\tpath() {\n\t\tconst segments = [];\n\t\tfor (const segment of filterChildren(this.syntax, IdentifierAst.cast)) {\n\t\t\tconst text = segment.token()?.text;\n\t\t\tif (text !== void 0) segments.push(text);\n\t\t}\n\t\treturn segments;\n\t}\n\t/** True iff this is a single unqualified identifier whose text equals `name`. */\n\tisSimpleName(name) {\n\t\tif (this.dot() !== void 0 || this.colon() !== void 0) return false;\n\t\treturn this.identifier()?.token()?.text === name;\n\t}\n\t/**\n\t* Flags a malformed name with more qualifier segments than allowed (a second\n\t* `:`-space or a second `.`-namespace).\n\t*/\n\tisOverQualified() {\n\t\treturn this.#separatorCount(\"Dot\") > 1 || this.#separatorCount(\"Colon\") > 1;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"QualifiedName\" ? new QualifiedNameAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/expressions.ts\nvar FunctionCallAst = class FunctionCallAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t/** The qualified-name callee, or `undefined` when identifier segments sit directly under the node. */\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\t/**\n\t* The dotted call path, in source order. A bare `Vector(…)` yields\n\t* `['Vector']`; a namespace-qualified `pgvector.Vector(…)` yields\n\t* `['pgvector', 'Vector']`. Empty when the call carries no identifier.\n\t*/\n\tpath() {\n\t\tconst qualified = this.name();\n\t\tconst segments = [];\n\t\tfor (const segment of filterChildren(qualified?.syntax ?? this.syntax, IdentifierAst.cast)) {\n\t\t\tconst text = segment.token()?.text;\n\t\t\tif (text !== void 0) segments.push(text);\n\t\t}\n\t\treturn segments;\n\t}\n\tlparen() {\n\t\treturn findChildToken(this.syntax, \"LParen\");\n\t}\n\trparen() {\n\t\treturn findChildToken(this.syntax, \"RParen\");\n\t}\n\t*args() {\n\t\tyield* filterChildren(this.syntax, AttributeArgAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"FunctionCall\" ? new FunctionCallAst(node) : void 0;\n\t}\n};\nvar ArrayLiteralAst = class ArrayLiteralAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tlbracket() {\n\t\treturn findChildToken(this.syntax, \"LBracket\");\n\t}\n\trbracket() {\n\t\treturn findChildToken(this.syntax, \"RBracket\");\n\t}\n\t*elements() {\n\t\tyield* filterChildren(this.syntax, castExpression);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ArrayLiteral\" ? new ArrayLiteralAst(node) : void 0;\n\t}\n};\nconst HEX = /^[0-9a-fA-F]+$/;\nfunction decodeFixedHex(raw, start, width) {\n\tif (start + width > raw.length) return void 0;\n\tconst hex = raw.slice(start, start + width);\n\tif (!HEX.test(hex)) return void 0;\n\treturn String.fromCharCode(Number.parseInt(hex, 16));\n}\nfunction decodeStringLiteral(raw) {\n\tlet out = \"\";\n\tlet i = 0;\n\twhile (i < raw.length) {\n\t\tconst ch = raw.charAt(i);\n\t\tif (ch !== \"\\\\\" || i + 1 >= raw.length) {\n\t\t\tout += ch;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tconst next = raw.charAt(i + 1);\n\t\tswitch (next) {\n\t\t\tcase \"n\":\n\t\t\t\tout += \"\\n\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"r\":\n\t\t\t\tout += \"\\r\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"t\":\n\t\t\t\tout += \"\t\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"\\\"\":\n\t\t\t\tout += \"\\\"\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"'\":\n\t\t\t\tout += \"'\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"\\\\\":\n\t\t\t\tout += \"\\\\\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"x\": {\n\t\t\t\tconst decoded = decodeFixedHex(raw, i + 2, 2);\n\t\t\t\tif (decoded === void 0) {\n\t\t\t\t\tout += \"\\\\x\";\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tout += decoded;\n\t\t\t\ti += 4;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcase \"u\": {\n\t\t\t\tconst decoded = decodeFixedHex(raw, i + 2, 4);\n\t\t\t\tif (decoded === void 0) {\n\t\t\t\t\tout += \"\\\\u\";\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tout += decoded;\n\t\t\t\ti += 6;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tout += `\\\\${next}`;\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t}\n\t}\n\treturn out;\n}\nvar StringLiteralExprAst = class StringLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"StringLiteral\");\n\t}\n\tquote() {\n\t\tconst quote = this.token()?.text.charAt(0);\n\t\treturn quote === \"\\\"\" || quote === \"'\" || quote === \"`\" ? quote : void 0;\n\t}\n\t/**\n\t* The decoded string. A `\"` or `'` string resolves the usual escapes; a backtick string resolves\n\t* only `` \\` `` and `\\\\`, keeping every other backslash sequence as written.\n\t*/\n\tvalue() {\n\t\tconst tok = this.token();\n\t\tif (!tok) return void 0;\n\t\tconst raw = isTerminatedStringLiteral(tok.text) ? tok.text.slice(1, -1) : tok.text.slice(1);\n\t\treturn this.quote() === \"`\" ? resolveBacktickEscapes(raw) : decodeStringLiteral(raw);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"StringLiteralExpr\" ? new StringLiteralExprAst(node) : void 0;\n\t}\n};\n/** `` tag`body` ``, `tag\"body\"`, or `tag'body'`: a qualified-name tag followed by a string literal. */\nvar TaggedLiteralExprAst = class TaggedLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttag() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\t/** The tag without trivia, e.g. `pg.sql`. */\n\ttagName() {\n\t\tconst tag = this.tag();\n\t\tconst space = tag?.space()?.name();\n\t\tconst namespace = tag?.namespace()?.name();\n\t\treturn (space === void 0 ? \"\" : `${space}:`) + (namespace === void 0 ? \"\" : `${namespace}.`) + (tag?.identifier()?.name() ?? \"\");\n\t}\n\tliteral() {\n\t\treturn findFirstChild(this.syntax, StringLiteralExprAst.cast);\n\t}\n\tcanonicalization() {\n\t\treturn canonicalizeTaggedLiteralBody(this.literal()?.value() ?? \"\");\n\t}\n\t/** The canonical body shared with the TypeScript `sql` tag, or `undefined` when canonicalization fails. */\n\tbody() {\n\t\tconst result = this.canonicalization();\n\t\treturn result.ok ? result.body : void 0;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"TaggedLiteral\" ? new TaggedLiteralExprAst(node) : void 0;\n\t}\n};\nvar NumberLiteralExprAst = class NumberLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"NumberLiteral\");\n\t}\n\tvalue() {\n\t\tconst tok = this.token();\n\t\tif (!tok) return void 0;\n\t\treturn Number(tok.text);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"NumberLiteralExpr\" ? new NumberLiteralExprAst(node) : void 0;\n\t}\n};\nvar BooleanLiteralExprAst = class BooleanLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tvalue() {\n\t\tconst tok = this.token();\n\t\tif (!tok) return void 0;\n\t\tif (tok.text === \"true\") return true;\n\t\tif (tok.text === \"false\") return false;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"BooleanLiteralExpr\" ? new BooleanLiteralExprAst(node) : void 0;\n\t}\n};\nvar ObjectLiteralExprAst = class ObjectLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*fields() {\n\t\tyield* filterChildren(this.syntax, ObjectFieldAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ObjectLiteralExpr\" ? new ObjectLiteralExprAst(node) : void 0;\n\t}\n};\nvar ObjectFieldAst = class ObjectFieldAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkey() {\n\t\tfor (const child of this.syntax.children()) {\n\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\tif (child.kind === \"Colon\") break;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn IdentifierAst.cast(child);\n\t\t}\n\t}\n\t/**\n\t* The field's logical key name, unquoted. An identifier key (`length:`) yields\n\t* its text; a string-literal key (`\"length\":`) yields the decoded string.\n\t* `undefined` when the field carries no key node.\n\t*/\n\tkeyName() {\n\t\tfor (const child of this.syntax.children()) {\n\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\tif (child.kind === \"Colon\") break;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst identifier = IdentifierAst.cast(child);\n\t\t\tif (identifier) return identifier.token()?.text;\n\t\t\tconst stringKey = StringLiteralExprAst.cast(child);\n\t\t\tif (stringKey) return stringKey.value();\n\t\t\treturn;\n\t\t}\n\t}\n\tcolon() {\n\t\treturn findChildToken(this.syntax, \"Colon\");\n\t}\n\tvalue() {\n\t\tif (this.colon()) {\n\t\t\tlet pastColon = false;\n\t\t\tfor (const child of this.syntax.children()) {\n\t\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\t\tif (child.kind === \"Colon\") pastColon = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (pastColon) {\n\t\t\t\t\tconst expr = castExpression(child);\n\t\t\t\t\tif (expr) return expr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn findFirstChild(this.syntax, castExpression);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ObjectField\" ? new ObjectFieldAst(node) : void 0;\n\t}\n};\nfunction castExpression(node) {\n\treturn FunctionCallAst.cast(node) ?? ArrayLiteralAst.cast(node) ?? StringLiteralExprAst.cast(node) ?? TaggedLiteralExprAst.cast(node) ?? NumberLiteralExprAst.cast(node) ?? BooleanLiteralExprAst.cast(node) ?? ObjectLiteralExprAst.cast(node) ?? IdentifierAst.cast(node);\n}\nvar AttributeArgAst = class AttributeArgAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tname() {\n\t\tif (!this.colon()) return void 0;\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tcolon() {\n\t\treturn findChildToken(this.syntax, \"Colon\");\n\t}\n\tvalue() {\n\t\tif (this.colon()) {\n\t\t\tlet pastColon = false;\n\t\t\tfor (const child of this.syntax.children()) {\n\t\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\t\tif (child.kind === \"Colon\") pastColon = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (pastColon) {\n\t\t\t\t\tconst expr = castExpression(child);\n\t\t\t\t\tif (expr) return expr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn findFirstChild(this.syntax, castExpression);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"AttributeArg\" ? new AttributeArgAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/attributes.ts\nvar AttributeArgListAst = class AttributeArgListAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tlparen() {\n\t\treturn findChildToken(this.syntax, \"LParen\");\n\t}\n\trparen() {\n\t\treturn findChildToken(this.syntax, \"RParen\");\n\t}\n\t*args() {\n\t\tyield* filterChildren(this.syntax, AttributeArgAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"AttributeArgList\" ? new AttributeArgListAst(node) : void 0;\n\t}\n};\nvar FieldAttributeAst = class FieldAttributeAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tat() {\n\t\treturn findChildToken(this.syntax, \"At\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\targList() {\n\t\treturn findFirstChild(this.syntax, AttributeArgListAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"FieldAttribute\" ? new FieldAttributeAst(node) : void 0;\n\t}\n};\nvar ModelAttributeAst = class ModelAttributeAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tdoubleAt() {\n\t\treturn findChildToken(this.syntax, \"DoubleAt\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\targList() {\n\t\treturn findFirstChild(this.syntax, AttributeArgListAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ModelAttribute\" ? new ModelAttributeAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/type-annotation.ts\nvar TypeAnnotationAst = class TypeAnnotationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t/** The annotation's reference, doubling as the constructor callee when an {@link argList} follows. */\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\t/** Present when the annotation is a constructor (`Vector(1536)`) rather than a plain reference. */\n\targList() {\n\t\treturn findFirstChild(this.syntax, AttributeArgListAst.cast);\n\t}\n\tisConstructor() {\n\t\treturn this.argList() !== void 0;\n\t}\n\tlbracket() {\n\t\treturn findChildToken(this.syntax, \"LBracket\");\n\t}\n\trbracket() {\n\t\treturn findChildToken(this.syntax, \"RBracket\");\n\t}\n\tquestionMark() {\n\t\treturn findChildToken(this.syntax, \"Question\");\n\t}\n\tisList() {\n\t\treturn this.lbracket() !== void 0;\n\t}\n\tisOptional() {\n\t\treturn this.questionMark() !== void 0;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"TypeAnnotation\" ? new TypeAnnotationAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/declarations.ts\nfunction castNamespaceMember(node) {\n\treturn ModelDeclarationAst.cast(node) ?? CompositeTypeDeclarationAst.cast(node) ?? GenericBlockDeclarationAst.cast(node);\n}\nvar DocumentAst = class DocumentAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t*declarations() {\n\t\tyield* filterChildren(this.syntax, (node) => castNamespaceMember(node) ?? TypesBlockAst.cast(node) ?? NamespaceDeclarationAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"Document\" ? new DocumentAst(node) : void 0;\n\t}\n};\nvar ModelDeclarationAst = class ModelDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*fields() {\n\t\tyield* filterChildren(this.syntax, FieldDeclarationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, ModelAttributeAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ModelDeclaration\" ? new ModelDeclarationAst(node) : void 0;\n\t}\n};\nvar CompositeTypeDeclarationAst = class CompositeTypeDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*fields() {\n\t\tyield* filterChildren(this.syntax, FieldDeclarationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, ModelAttributeAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"CompositeTypeDeclaration\" ? new CompositeTypeDeclarationAst(node) : void 0;\n\t}\n};\nvar NamespaceDeclarationAst = class NamespaceDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*declarations() {\n\t\tyield* filterChildren(this.syntax, castNamespaceMember);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"Namespace\" ? new NamespaceDeclarationAst(node) : void 0;\n\t}\n};\nvar TypesBlockAst = class TypesBlockAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*declarations() {\n\t\tyield* filterChildren(this.syntax, NamedTypeDeclarationAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"TypesBlock\" ? new TypesBlockAst(node) : void 0;\n\t}\n};\nvar GenericBlockDeclarationAst = class GenericBlockDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*entries() {\n\t\tyield* filterChildren(this.syntax, KeyValuePairAst.cast);\n\t}\n\t/** Field lines of a block parsed with the model-member grammar (a Prisma 7 `view`). Empty for every other generic block. */\n\t*fields() {\n\t\tyield* filterChildren(this.syntax, FieldDeclarationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, ModelAttributeAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => KeyValuePairAst.cast(node) ?? ModelAttributeAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"GenericBlockDeclaration\" ? new GenericBlockDeclarationAst(node) : void 0;\n\t}\n};\nvar KeyValuePairAst = class KeyValuePairAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkey() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tequals() {\n\t\treturn findChildToken(this.syntax, \"Equals\");\n\t}\n\tvalue() {\n\t\tlet pastEquals = false;\n\t\tfor (const child of this.syntax.children()) {\n\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\tif (child.kind === \"Equals\") pastEquals = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (pastEquals) {\n\t\t\t\tconst expr = castExpression(child);\n\t\t\t\tif (expr) return expr;\n\t\t\t}\n\t\t}\n\t}\n\t/** `@` attributes after the key or value (a Prisma 7 enum member's `@map`). */\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, FieldAttributeAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"KeyValuePair\" ? new KeyValuePairAst(node) : void 0;\n\t}\n};\nvar FieldDeclarationAst = class FieldDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\ttypeAnnotation() {\n\t\treturn findFirstChild(this.syntax, TypeAnnotationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, FieldAttributeAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"FieldDeclaration\" ? new FieldDeclarationAst(node) : void 0;\n\t}\n};\nvar NamedTypeDeclarationAst = class NamedTypeDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tequals() {\n\t\treturn findChildToken(this.syntax, \"Equals\");\n\t}\n\ttypeAnnotation() {\n\t\treturn findFirstChild(this.syntax, TypeAnnotationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, FieldAttributeAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"NamedTypeDeclaration\" ? new NamedTypeDeclarationAst(node) : void 0;\n\t}\n};\n//#endregion\nexport { printSyntax as A, castExpression as C, filterChildren as D, any as E, SyntaxToken as M, TokenAtOffset as N, findChildToken as O, createSyntaxTree as P, TaggedLiteralExprAst as S, IdentifierAst as T, FunctionCallAst as _, KeyValuePairAst as a, ObjectLiteralExprAst as b, NamespaceDeclarationAst as c, AttributeArgListAst as d, FieldAttributeAst as f, BooleanLiteralExprAst as g, AttributeArgAst as h, GenericBlockDeclarationAst as i, SyntaxNode as j, findFirstChild as k, TypesBlockAst as l, ArrayLiteralAst as m, DocumentAst as n, ModelDeclarationAst as o, ModelAttributeAst as p, FieldDeclarationAst as r, NamedTypeDeclarationAst as s, CompositeTypeDeclarationAst as t, TypeAnnotationAst as u, NumberLiteralExprAst as v, Qualif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ChF;AACD;AACA,IAAI,0BAA0B,MAAM,wBAAwB;CAC3D;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;CACA,OAAO;EACN,OAAO,eAAe,KAAK,QAAQ,cAAc,IAAI;CACtD;CACA,SAAS;EACR,OAAO,eAAe,KAAK,QAAQ,QAAQ;CAC5C;CACA,iBAAiB;EAChB,OAAO,eAAe,KAAK,QAAQ,kBAAkB,IAAI;CAC1D;CACA,CAAC,aAAa;EACb,OAAO,eAAe,KAAK,QAAQ,kBAAkB,IAAI;CAC1D;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK,SAAS,yBAAyB,IAAI,wBAAwB,IAAI,IAAI,KAAK;CACxF;AACD"}
package/dist/errors.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { C as errorTargetMigrationNotSupported, S as errorQueryRunnerFactoryRequired, _ as errorJsonFormatNotSupported, a as errorConfigFileNotFound, b as errorMigrationPlanningFailed, c as errorContractConfigMissing, d as errorDatabaseConnectionRequired, f as errorDriverRequired, g as errorInvalidOutputFormat, h as errorFileNotFound, i as errorConfigEvaluationFailed, l as errorContractMissingExtensions, m as errorFamilyReadMarkerSqlRequired, n as CliErrorEnvelope, o as errorConfigValidation, p as errorEnumCodecNotInPackStack, r as CliStructuredError, s as errorConfigVersionMarkerMissing, t as CliErrorConflict, u as errorContractValidationFailed, v as errorMigrationCliInvalidConfigArg, w as errorUnexpected, x as errorOutputFormatMutex, y as errorMigrationCliUnknownFlag } from "./control-tJzRbhcm-FZPs7pf9.mjs";
2
- import { a as errorHashMismatch, c as errorMarkerRequired, d as errorRuntime, f as errorSchemaVerificationFailed, g as withMarkerReadErrorHandling, h as rethrowMarkerReadError, i as errorDestructiveChanges, l as errorMarkerRowCorrupt, m as parseMarkerRowSafely, n as ERROR_CODE_DESTRUCTIVE_CHANGES, o as errorMarkerMissing, p as errorTargetMismatch, r as errorConsentPlanMismatch, s as errorMarkerReadFailed, t as ERROR_CODE_CONSENT_PLAN_MISMATCH, u as errorRunnerFailed } from "./execution-B2UDS4t7.mjs";
2
+ import { a as errorHashMismatch, c as errorMarkerRequired, d as errorRuntime, f as errorSchemaVerificationFailed, g as withMarkerReadErrorHandling, h as rethrowMarkerReadError, i as errorDestructiveChanges, l as errorMarkerRowCorrupt, m as parseMarkerRowSafely, n as ERROR_CODE_DESTRUCTIVE_CHANGES, o as errorMarkerMissing, p as errorTargetMismatch, r as errorConsentPlanMismatch, s as errorMarkerReadFailed, t as ERROR_CODE_CONSENT_PLAN_MISMATCH, u as errorRunnerFailed } from "./execution-DU2yN6tS.mjs";
3
3
  import { a as errorMigrationTargetMismatch, i as errorMigrationPlanNotArray, n as errorMigrationFileMissing, o as errorUnfilledPlaceholder, r as errorMigrationInvalidDefaultExport, s as placeholder, t as errorDataTransformContractMismatch } from "./migration-BLWAkEWP.mjs";
4
4
  export { type CliErrorConflict, type CliErrorEnvelope, CliStructuredError, ERROR_CODE_CONSENT_PLAN_MISMATCH, ERROR_CODE_DESTRUCTIVE_CHANGES, errorConfigEvaluationFailed, errorConfigFileNotFound, errorConfigValidation, errorConfigVersionMarkerMissing, errorConsentPlanMismatch, errorContractConfigMissing, errorContractMissingExtensions, errorContractValidationFailed, errorDataTransformContractMismatch, errorDatabaseConnectionRequired, errorDestructiveChanges, errorDriverRequired, errorEnumCodecNotInPackStack, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorHashMismatch, errorInvalidOutputFormat, errorJsonFormatNotSupported, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationPlanNotArray, errorMigrationPlanningFailed, errorMigrationTargetMismatch, errorOutputFormatMutex, errorQueryRunnerFactoryRequired, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMigrationNotSupported, errorTargetMismatch, errorUnexpected, errorUnfilledPlaceholder, parseMarkerRowSafely, placeholder, rethrowMarkerReadError, withMarkerReadErrorHandling };
@@ -1,2 +1,2 @@
1
- import { a as errorHashMismatch, c as errorMarkerRequired, d as errorRuntime, f as errorSchemaVerificationFailed, g as withMarkerReadErrorHandling, h as rethrowMarkerReadError, i as errorDestructiveChanges, l as errorMarkerRowCorrupt, m as parseMarkerRowSafely, n as ERROR_CODE_DESTRUCTIVE_CHANGES, o as errorMarkerMissing, p as errorTargetMismatch, r as errorConsentPlanMismatch, s as errorMarkerReadFailed, t as ERROR_CODE_CONSENT_PLAN_MISMATCH, u as errorRunnerFailed } from "./execution-B2UDS4t7.mjs";
1
+ import { a as errorHashMismatch, c as errorMarkerRequired, d as errorRuntime, f as errorSchemaVerificationFailed, g as withMarkerReadErrorHandling, h as rethrowMarkerReadError, i as errorDestructiveChanges, l as errorMarkerRowCorrupt, m as parseMarkerRowSafely, n as ERROR_CODE_DESTRUCTIVE_CHANGES, o as errorMarkerMissing, p as errorTargetMismatch, r as errorConsentPlanMismatch, s as errorMarkerReadFailed, t as ERROR_CODE_CONSENT_PLAN_MISMATCH, u as errorRunnerFailed } from "./execution-DU2yN6tS.mjs";
2
2
  export { ERROR_CODE_CONSENT_PLAN_MISMATCH, ERROR_CODE_DESTRUCTIVE_CHANGES, errorConsentPlanMismatch, errorDestructiveChanges, errorHashMismatch, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMismatch, parseMarkerRowSafely, rethrowMarkerReadError, withMarkerReadErrorHandling };
@@ -1,4 +1,4 @@
1
- import { $ as SchemaDiffIssue, St as VerifyDatabaseSchemaResult } from "./control-CjjQjy_6.mjs";
1
+ import { $ as SchemaDiffIssue, wt as VerifyDatabaseSchemaResult } from "./control-FO0yGN-e.mjs";
2
2
  import { i as NextAction, r as Diagnostic } from "./structured-error-Cc7AIRsp.mjs";
3
3
  import { r as CliStructuredError } from "./control-tJzRbhcm-FZPs7pf9.mjs";
4
4
  //#region ../../../1-framework/1-core/errors/dist/execution.d.mts
@@ -113,4 +113,4 @@ declare function errorRuntime(code: `${string}.${string}`, summary: string, opti
113
113
  }): CliStructuredError;
114
114
  //#endregion
115
115
  export { errorHashMismatch as a, errorMarkerRequired as c, errorRuntime as d, errorSchemaVerificationFailed as f, withMarkerReadErrorHandling as g, rethrowMarkerReadError as h, errorDestructiveChanges as i, errorMarkerRowCorrupt as l, parseMarkerRowSafely as m, ERROR_CODE_DESTRUCTIVE_CHANGES as n, errorMarkerMissing as o, errorTargetMismatch as p, errorConsentPlanMismatch as r, errorMarkerReadFailed as s, ERROR_CODE_CONSENT_PLAN_MISMATCH as t, errorRunnerFailed as u };
116
- //# sourceMappingURL=execution-B2UDS4t7.d.mts.map
116
+ //# sourceMappingURL=execution-DU2yN6tS.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execution-B2UDS4t7.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.d.mts"],"mappings":";;;;;;;;iBAOiB,mBAAmB;WACzB;IACP;;;;iBAIa,kBAAkB;WACxB;WACA;WACA;IACP;;;;iBAIa,oBAAoB,kBAAkB,gBAAgB;WAC5D;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;iBACa,uBAAuB,cAAc;WAC3C;WACA;;iBAEM,4BAA4B,GAAG,iBAAiB,QAAQ,IAAI;WAClE;WACA;IACP,QAAQ;iBACK,qBAAqB,GAAG,cAAc,QAAQ,mBAAmB,GAAG;WAC1E;WACA;IACP;;;;;iBAKa,oBAAoB;WAC1B;WACA;WACA,uBAAuB;IAC9B;;;;;iBAKa,8BAA8B;WACpC;WACA,oBAAoB;WACpB,kBAAkB;IACzB;;;;iBAIa,kBAAkB,iBAAiB;WACzC;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP;;cAEU;;;;iBAIG,wBAAwB,iBAAiB;WAC/C;WACA;WACA,OAAO;IACd;cACU;;;;;iBAKG,yBAAyB;WAC/B;WACA;WACA;IACP;;;;iBAIa,aAAa,6BAA6B,iBAAiB;WACjE;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP"}
1
+ {"version":3,"file":"execution-DU2yN6tS.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.d.mts"],"mappings":";;;;;;;;iBAOiB,mBAAmB;WACzB;IACP;;;;iBAIa,kBAAkB;WACxB;WACA;WACA;IACP;;;;iBAIa,oBAAoB,kBAAkB,gBAAgB;WAC5D;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;iBACa,uBAAuB,cAAc;WAC3C;WACA;;iBAEM,4BAA4B,GAAG,iBAAiB,QAAQ,IAAI;WAClE;WACA;IACP,QAAQ;iBACK,qBAAqB,GAAG,cAAc,QAAQ,mBAAmB,GAAG;WAC1E;WACA;IACP;;;;;iBAKa,oBAAoB;WAC1B;WACA;WACA,uBAAuB;IAC9B;;;;;iBAKa,8BAA8B;WACpC;WACA,oBAAoB;WACpB,kBAAkB;IACzB;;;;iBAIa,kBAAkB,iBAAiB;WACzC;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP;;cAEU;;;;iBAIG,wBAAwB,iBAAiB;WAC/C;WACA;WACA,OAAO;IACd;cACU;;;;;iBAKG,yBAAyB;WAC/B;WACA;WACA;IACP;;;;iBAIa,aAAa,6BAA6B,iBAAiB;WACjE;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP"}
@@ -1,4 +1,4 @@
1
- import { O as TargetDescriptor, f as DriverDescriptor, g as ExtensionInstance, h as ExtensionDescriptor, k as TargetInstance, n as AdapterInstance, p as DriverInstance, t as AdapterDescriptor, v as FamilyDescriptor, y as FamilyInstance } from "./framework-components-CukAi30h-DMnprolg.mjs";
1
+ import { M as TargetDescriptor, N as TargetInstance, S as FamilyInstance, g as DriverInstance, h as DriverDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as ExtensionDescriptor, x as FamilyDescriptor, y as ExtensionInstance } from "./framework-components-Bu5LfryO-CAg5kbVT.mjs";
2
2
  //#region ../../../1-framework/1-core/framework-components/dist/execution.d.mts
3
3
  //#region src/execution/execution-instances.d.ts
4
4
  interface RuntimeFamilyInstance<TFamilyId extends string> extends FamilyInstance<TFamilyId> {}
@@ -76,4 +76,4 @@ declare function assertRuntimeContractRequirementsSatisfied<TFamilyId extends st
76
76
  }): void;
77
77
  //#endregion
78
78
  export { RuntimeDriverDescriptor as a, RuntimeExtensionInstance as c, RuntimeTargetDescriptor as d, RuntimeTargetInstance as f, instantiateExecutionStack as h, RuntimeAdapterInstance as i, RuntimeFamilyDescriptor as l, createExecutionStack as m, ExecutionStackInstance as n, RuntimeDriverInstance as o, assertRuntimeContractRequirementsSatisfied as p, RuntimeAdapterDescriptor as r, RuntimeExtensionDescriptor as s, ExecutionStack as t, RuntimeFamilyInstance as u };
79
- //# sourceMappingURL=execution-DEt8KBE9.d.mts.map
79
+ //# sourceMappingURL=execution-DfMCQMDy.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execution-DEt8KBE9.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/execution.d.mts"],"mappings":";;;UAEU,sBAAsB,kCAAkC,eAAe;UACvE,sBAAsB,0BAA0B,kCAAkC,eAAe,WAAW;UAC5G,uBAAuB,0BAA0B,kCAAkC,gBAAgB,WAAW;UAC9G,sBAAsB,0BAA0B,kCAAkC,eAAe,WAAW;UAC5G,yBAAyB,0BAA0B,kCAAkC,kBAAkB,WAAW;;;UAGlH,eAAe,0BAA0B,0BAA0B,yBAAyB,uBAAuB,WAAW,aAAa,uBAAuB,WAAW,YAAY,wBAAwB,sBAAsB,WAAW,aAAa,sBAAsB,WAAW,YAAY,2BAA2B,yBAAyB,WAAW,aAAa,yBAAyB,WAAW;WAC3Z,QAAQ,wBAAwB,WAAW;WAC3C,SAAS,y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;aAC3C,SAAS,yBAAyB,WAAW;aAC7C,QAAQ,wBAAwB,WAAW;aAC3C,qBAAqB,2BAA2B,WAAW;MAClE;;UAEI,wBAAwB,0BAA0B,0BAA0B,wBAAwB,sBAAsB,WAAW,aAAa,sBAAsB,WAAW,oBAAoB,iBAAiB,WAAW;EAC3O,UAAU;;UAEF,yBAAyB,0BAA0B,0BAA0B,yBAAyB,uBAAuB,WAAW,aAAa,uBAAuB,WAAW,oBAAoB,kBAAkB,WAAW;;;;;;;;EAQhP,OAAO,OAAO,eAAe,WAAW,aAAa;;UAE7C,wBAAwB,0BAA0B,0BAA0B,uBAAuB,wBAAwB,sBAAsB,WAAW,aAAa,sBAAsB,WAAW,oBAAoB,iBAAiB,WAAW;EAClQ,OAAO,UAAU,iBAAiB;;UAE1B,2BAA2B,0BAA0B,0BAA0B,2BAA2B,yBAAyB,WAAW,aAAa,yBAAyB,WAAW,oBAAoB,oBAAoB,WAAW;EAC1P,UAAU;;;;iBAIK,2CAA2C,0BAA0B,4BAA4B,UAAU,QAAQ,QAAQ,SAAS;WAC1I;aACE;aACA,aAAa;;WAEf,QAAQ,wBAAwB;WAChC,QAAQ,wBAAwB,WAAW;WAC3C,SAAS,yBAAyB,WAAW;WAC7C,qBAAqB,2BAA2B,WAAW"}
@@ -1,7 +1,7 @@
1
1
  import { P as ExecutionMutationDefaultPhases, a as ColumnDefault } from "./domain-envelope-CENjHN4U-BIIt9bl4.mjs";
2
2
  import { c as CodecLookup } from "./codec-types-kYJyrqbr-Svq8WsGL.mjs";
3
3
  import { Type } from "arktype";
4
- //#region ../../../1-framework/1-core/framework-components/dist/framework-authoring-Cs5_Ovws.d.mts
4
+ //#region ../../../1-framework/1-core/framework-components/dist/framework-authoring-b__TyQDU.d.mts
5
5
  //#region src/shared/option-descriptor.d.ts
6
6
  /**
7
7
  * An enumerated-value parameter: the author supplies one of `values`, spelled
@@ -60,12 +60,21 @@ type PslDiagnosticCode = 'PSL_UNTERMINATED_BLOCK' | 'PSL_UNSUPPORTED_TOP_LEVEL_B
60
60
  */
61
61
  'PSL_INVALID_OBJECT_LITERAL' |
62
62
  /**
63
- * A string literal with no closing quote — the tokenizer stops the literal at
64
- * a newline or at EOF when no terminating `"` is found, and the
65
- * recursive-descent parser still consumes the token (preserving the lossless
66
- * round-trip) but reports this code anchored on the string token's span.
63
+ * A string literal with no closing quote — the tokenizer stops a `"` or `'`
64
+ * literal at a newline or at EOF, and a backtick literal before the next line
65
+ * that opens with `}` or at EOF. The recursive-descent parser still consumes
66
+ * the token (preserving the lossless round-trip) but reports this code
67
+ * anchored on the string token's span.
67
68
  */
68
69
  'PSL_UNTERMINATED_STRING' |
70
+ /** A backtick string that is not the string literal of a tagged literal; anchored on the string. */
71
+ 'PSL_BACKTICK_STRING_REQUIRES_TAG' |
72
+ /** A `@default` tagged literal whose tag no pack in the stack registered. */
73
+ 'PSL_UNKNOWN_DEFAULT_LITERAL_TAG' |
74
+ /** A tagged literal body contains a NUL character. */
75
+ 'PSL_TAGGED_LITERAL_NUL' |
76
+ /** A tagged literal body is larger than 65536 UTF-8 bytes. */
77
+ 'PSL_TAGGED_LITERAL_TOO_LARGE' |
69
78
  /**
70
79
  * An unknown parameter key in an extension-contributed block — a key present
71
80
  * in the source block but absent from the descriptor's `parameters` map.
@@ -785,4 +794,4 @@ declare function instantiateAuthoringFieldPreset(descriptor: AuthoringFieldPrese
785
794
  };
786
795
  //#endregion
787
796
  export { collectScalarTypeConstructors as $, ContributedPslDiagnosticCode as A, PslExtensionBlockParamBare as B, AuthoringStorageTypeTemplate as C, AuthoringTypeNamespace as D, AuthoringTypeConstructorEntityRef as E, PslBlockParamValue as F, PslExtensionBlockParamValue as G, PslExtensionBlockParamOption as H, PslDiagnosticCode as I, PslSpan as J, PslExtensionBlockParsedAttribute as K, PslExtensionBlock as L, PslBlockParamList as M, PslBlockParamOption as N, AuthoringWarning as O, PslBlockParamRef as P, classifyEnumMemberType as Q, PslExtensionBlockAttribute as R, AuthoringSelectRef as S, AuthoringTypeConstructorDescriptor as T, PslExtensionBlockParamRef as U, PslExtensionBlockParamList as V, PslExtensionBlockParamScalarValue as W, assertNoCrossRegistryCollisions as X, ScalarTypeConstructorOutput as Y, assertResolvableTypeConstructorTemplates as Z, AuthoringModelAttributeDescriptorNamespace as _, AuthoringContributions as a, isAuthoringArgRef as at, AuthoringPslBlockDescriptor as b, AuthoringEntityTypeDescriptor as c, isAuthoringModelAttributeDescriptor as ct, AuthoringEntityTypeTemplateOutput as d, mergeAuthoringNamespaces as dt, flushAuthoringWarnings as et, AuthoringFieldNamespace as f, resolveAuthoringTemplateValue as ft, AuthoringModelAttributeDescriptor as g, AuthoringModelAttributeContext as h, AuthoringColumnDefaultTemplate as i, instantiateAuthoringTypeConstructor as it, PslBlockParam as j, AuthoringWarningSink as k, AuthoringEntityTypeFactoryOutput as l, isAuthoringPslBlockDescriptor as lt, AuthoringFieldPresetOutput as m, validateAuthoringHelperArguments as mt, AuthoringArgumentDescriptor as n, instantiateAuthoringEntityType as nt, AuthoringDiagnosticSink as o, isAuthoringEntityTypeDescriptor as ot, AuthoringFieldPresetDescriptor as p, resolveEnumCodecId as pt, PslPosition as q, AuthoringAttributeSpecContributions as r, instantiateAuthoringFieldPreset as rt, AuthoringEntityContext as s, isAuthoringFieldPresetDescriptor as st, AuthoringArgRef as t, hasRegisteredFieldNamespace as tt, AuthoringEntityTypeNamespace as u, isAuthoringTypeConstructorDescriptor as ut, AuthoringModelAttributeLoweringOutput as v, AuthoringTemplateValue as w, AuthoringPslBlockDescriptorNamespace as x, AuthoringOption as y, PslExtensionBlockAttributeArg as z };
788
- //# sourceMappingURL=framework-authoring-Cs5_Ovws-C3gC-7Ln.d.mts.map
797
+ //# sourceMappingURL=framework-authoring-b__TyQDU-C9cYpYdv.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framework-authoring-b__TyQDU-C9cYpYdv.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-authoring-b__TyQDU.d.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AAO,SAAS;WAChB,OAAO,SAAS;;UAEjB;WACC,OAAO;WACP,QAAQ;WACR,cAAc;;;;;;;;;;;;WAYd,sBAAsB;;;;;;;;;WAStB,kBAAkB;WAClB,iBAAiB;;;;;;;;;;;;WAYjB;;iBAEM,kBAAkB,iBAAiB,SAAS;iBAC5C,qCAAqC,OAAO,qCAAqC,yBAAyB,SAAS;iBACnH,iCAAiC,OAAO,iCAAiC,0BAA0B,SAAS;iBAC5G,gCAAgC,OAAO,gCAAgC,+BAA+B,SAAS;iBAC/G,8BAA8B,OAAO,8BAA8B,uCAAuC,SAAS;iBACnH,oCAAoC,OAAO,oCAAoC,6CAA6C,SAAS;;;;;;;;;iBASrI,4BAA4B,eAAe,oCAAoC;;;;;;;;;;;;;;;;;;;;iBAoB/E,yBAAyB,QAAQ,yBAAyB,QAAQ,yBAAyB,yBAAyB,wBAAwB;UACnJ;WACC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;;iBAiBP,8BAA8B,WAAW,yBAAyB,oBAAoB;;;;;;;;;;iBAUtF,yCAAyC,WAAW,wBAAwB,uBAAuB;iBACnG,gCAAgC,eAAe,wBAAwB,gBAAgB,yBAAyB,sBAAsB,8BAA8B,oBAAoB,sCAAsC,0BAA0B;iBACxP,8BAA8B,UAAU,oCAAoC;iBAC5E,iCAAiC,oBAAoB,sBAAsB,2CAA2C;iBACtH,oCAAoC,YAAY,oCAAoC;WAC1F;WACA;WACA,aAAa;;iBAEP,+BAA+B,mBAAmB,oBAAoB,YAAY,+BAA+B,0BAA0B,KAAK,yBAAyB;iBACzK,gCAAgC,YAAY,gCAAgC;WAClF;aACE;aACA;aACA,aAAa;;WAEf;WACA,UAAU;WACV,oBAAoB;WACpB;WACA"}
@@ -1,8 +1,8 @@
1
1
  import { F as ExecutionMutationDefaultValue, P as ExecutionMutationDefaultPhases, a as ColumnDefault } from "./domain-envelope-CENjHN4U-BIIt9bl4.mjs";
2
2
  import { t as AnyCodecDescriptor } from "./codec-types-kYJyrqbr-Svq8WsGL.mjs";
3
- import { a as AuthoringContributions } from "./framework-authoring-Cs5_Ovws-C3gC-7Ln.mjs";
3
+ import { a as AuthoringContributions } from "./framework-authoring-b__TyQDU-C9cYpYdv.mjs";
4
4
  import { l as TypesImportSpec, t as AggregateDescriptor } from "./types-import-spec-CzOtW57G-C3xwIiiM.mjs";
5
- //#region ../../../1-framework/1-core/framework-components/dist/framework-components-CukAi30h.d.mts
5
+ //#region ../../../1-framework/1-core/framework-components/dist/framework-components-Bu5LfryO.d.mts
6
6
  //#region src/shared/mutation-default-types.d.ts
7
7
  interface SourcePosition {
8
8
  readonly offset: number;
@@ -74,10 +74,30 @@ interface ControlMutationDefaultEntry {
74
74
  readonly usageSignatures?: readonly string[];
75
75
  }
76
76
  type ControlMutationDefaultRegistry = ReadonlyMap<string, ControlMutationDefaultEntry>;
77
+ /** A `` tag`body` `` default literal as the attribute spec accepted it: tag, canonical body, and span. */
78
+ interface TaggedLiteralValue {
79
+ readonly tag: string;
80
+ readonly body: string;
81
+ readonly span: SourceSpan;
82
+ }
83
+ interface ControlDefaultLiteralTagEntry {
84
+ /** How the tag is written, for messages: `` sql`...` ``. */
85
+ readonly usage: string;
86
+ /** What the literal does, shown as signature help. */
87
+ readonly documentation: string;
88
+ readonly lower: (input: {
89
+ readonly literal: TaggedLiteralValue;
90
+ readonly context: DefaultFunctionLoweringContext;
91
+ }) => LoweredDefaultResult;
92
+ }
93
+ type ControlDefaultLiteralTagRegistry = ReadonlyMap<string, ControlDefaultLiteralTagEntry>;
77
94
  interface ControlMutationDefaults {
78
95
  readonly defaultFunctionRegistry: ControlMutationDefaultRegistry;
96
+ readonly defaultLiteralTagRegistry: ControlDefaultLiteralTagRegistry;
79
97
  readonly generatorDescriptors: readonly MutationDefaultGeneratorDescriptor[];
80
98
  }
99
+ /** The two registries an attribute spec needs to build its `@default` arms. */
100
+ type ControlDefaultRegistries = Pick<ControlMutationDefaults, 'defaultFunctionRegistry' | 'defaultLiteralTagRegistry'>;
81
101
  //#endregion
82
102
  //#region src/shared/framework-components.d.ts
83
103
  /**
@@ -391,5 +411,5 @@ interface ExtensionInstance<TFamilyId extends string, TTargetId extends string>
391
411
  readonly targetId: TTargetId;
392
412
  }
393
413
  //#endregion
394
- export { TargetPackRef as A, MutationDefaultGeneratorDescriptor as C, TargetBoundComponentDescriptor as D, SourceSpan as E, checkContractComponentRequirements as M, TargetDescriptor as O, LoweredDefaultValue as S, SourceDiagnostic as T, ExtensionPackRef as _, ComponentMetadata as a, FamilyPackRef as b, ControlMutationDefaultEntry as c, DefaultFunctionLoweringContext as d, DriverDescriptor as f, ExtensionInstance as g, ExtensionDescriptor as h, ComponentDescriptor as i, TypedDefaultFunctionCall as j, TargetInstance as k, ControlMutationDefaultRegistry as l, DriverPackRef as m, AdapterInstance as n, ContractComponentRequirementsCheckInput as o, DriverInstance as p, AdapterPackRef as r, ContractComponentRequirementsCheckResult as s, AdapterDescriptor as t, ControlMutationDefaults as u, FamilyDescriptor as v, PackRefBase as w, LoweredDefaultResult as x, FamilyInstance as y };
395
- //# sourceMappingURL=framework-components-CukAi30h-DMnprolg.d.mts.map
414
+ export { TaggedLiteralValue as A, FamilyPackRef as C, PackRefBase as D, MutationDefaultGeneratorDescriptor as E, TypedDefaultFunctionCall as F, checkContractComponentRequirements as I, TargetDescriptor as M, TargetInstance as N, SourceDiagnostic as O, TargetPackRef as P, FamilyInstance as S, LoweredDefaultValue as T, DriverPackRef as _, ComponentMetadata as a, ExtensionPackRef as b, ControlDefaultLiteralTagEntry as c, ControlMutationDefaultEntry as d, ControlMutationDefaultRegistry as f, DriverInstance as g, DriverDescriptor as h, ComponentDescriptor as i, TargetBoundComponentDescriptor as j, SourceSpan as k, ControlDefaultLiteralTagRegistry as l, DefaultFunctionLoweringContext as m, AdapterInstance as n, ContractComponentRequirementsCheckInput as o, ControlMutationDefaults as p, AdapterPackRef as r, ContractComponentRequirementsCheckResult as s, AdapterDescriptor as t, ControlDefaultRegistries as u, ExtensionDescriptor as v, LoweredDefaultResult as w, FamilyDescriptor as x, ExtensionInstance as y };
415
+ //# sourceMappingURL=framework-components-Bu5LfryO-CAg5kbVT.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framework-components-Bu5LfryO-CAg5kbVT.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-components-Bu5LfryO.d.mts"],"mappings":";;;;;;UAKU;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;UAEN;WACC;WACA;WACA;WACA,OAAO;WACP,OAAO,SAAS;;UAEjB;WACC;WACA;WACA;WACA;;KAEN;WACM;WACA,cAAc;;WAEd;WACA,WAAW;;KAEjB;WACM;WACA,OAAO;;WAEP;WACA,YAAY;;UAEb;WACC;;;;;;;;;;WAUA;;;;;;;WAOA,eAAe,OAAO,4BAA4B;;UAEnD;WACC;WACA,MAAM;WACN,MAAM,SAAS;;UAEhB;WACC;WACA,QAAQ;aACN,MAAM;aACN,SAAS;QACd;WACG;;KAEN,iCAAiC,oBAAoB;;UAEhD;WACC;WACA;WACA,MAAM;;UAEP;;WAEC;;WAEA;WACA,QAAQ;aACN,SAAS;aACT,SAAS;QACd;;KAEH,mCAAmC,oBAAoB;UAClD;WACC,yBAAyB;WACzB,2BAA2B;WAC3B,+BAA+B;;;KAGrC,2BAA2B,KAAK;;;;;;UAM3B;;WAEC;;;;;;WAMA,eAAe;;WAEf;aACE;;;;eAIE,SAAS;;;;;;;;eAQT,cAAc,cAAc;;;;eAI5B,oBAAoB;;;;eAIpB,mBAAmB,cAAc;;;;;aAKnC,uBAAuB,cAAc;aACrC;eACE,QAAQ;;aAEV,UAAU;eACR;eACA;eACA;eACA;;;;;;;;WAQJ,YAAY;;;;WAIZ,0BAA0B;;;;;;;;;;;;;;;;;UAiB3B,oBAAoB,6BAA6B;;WAEhD,MAAM;;WAEN;;UAED;WACC;aACE;aACA;aACA,aAAa;;WAEf;WACA;WACA,sBAAsB;;UAEvB;WACC;aACE;aACA;;WAEF;aACE;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PSL_NAMESPACE_ID } from "./psl-ast-DUCvVXbB.mjs";
3
- import { k as createSyntaxTree, o as DocumentAst } from "./declarations-C8gJnWQp-CnufYOCF.mjs";
4
- import { n as isTerminatedStringLiteral, t as Tokenizer } from "./tokenizer-1hAHZzmp-QGPORvmA.mjs";
5
- //#region ../../../1-framework/2-authoring/psl-parser/dist/parse-BPOOpARs.mjs
3
+ import { n as isTerminatedStringLiteral, t as Tokenizer } from "./tokenizer-D4sywyzm-gPsD7tYP.mjs";
4
+ import { A as createSyntaxTree, o as DocumentAst } from "./declarations-ApW55O9s-DmbPATJi.mjs";
5
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/parse-BRwiZ0nC.mjs
6
6
  const CARRIAGE_RETURN = 13;
7
7
  const LINE_FEED = 10;
8
8
  var SourceFile = class {
@@ -248,10 +248,15 @@ function parseIdentifier(cursor) {
248
248
  * recognised expression, leaving recovery to the caller.
249
249
  */
250
250
  function parseExpression(cursor) {
251
- return parseStringLiteralExpr(cursor) ?? parseNumberLiteralExpr(cursor) ?? parseArrayLiteral(cursor) ?? parseObjectLiteralExpr(cursor) ?? parseFunctionCall(cursor) ?? parseBooleanLiteralExpr(cursor) ?? parseIdentifierExpr(cursor);
251
+ return parseStringLiteralExpr(cursor) ?? parseNumberLiteralExpr(cursor) ?? parseArrayLiteral(cursor) ?? parseObjectLiteralExpr(cursor) ?? parseTaggedLiteral(cursor) ?? parseFunctionCall(cursor) ?? parseBooleanLiteralExpr(cursor) ?? parseIdentifierExpr(cursor);
252
252
  }
253
+ /** A string literal outside a tagged literal, where a backtick string is refused. */
253
254
  function parseStringLiteralExpr(cursor) {
254
255
  if (cursor.peekKind() !== "StringLiteral") return void 0;
256
+ if (cursor.peekToken().text.startsWith("`")) cursor.diagnostic("PSL_BACKTICK_STRING_REQUIRES_TAG", "A backtick string must follow a tag, as in tag`...`.", cursor.mark());
257
+ return parseStringLiteral(cursor);
258
+ }
259
+ function parseStringLiteral(cursor) {
255
260
  const stringMark = cursor.mark();
256
261
  const text = cursor.peekToken().text;
257
262
  cursor.startNode("StringLiteralExpr");
@@ -296,6 +301,24 @@ function parseQualifiedSegments(cursor, separator) {
296
301
  else cursor.diagnostic("PSL_INVALID_QUALIFIED_NAME", "Qualified name is missing a name after the separator", cursor.mark());
297
302
  }
298
303
  }
304
+ /**
305
+ * Whether the next tokens open a tagged literal: a bare `Ident` or a
306
+ * namespace-qualified `Ident.Ident`, then a string. Trivia may sit anywhere
307
+ * between them. Bounded like {@link isCallAhead}.
308
+ */
309
+ function isTaggedLiteralAhead(cursor) {
310
+ if (cursor.peekKind() !== "Ident") return false;
311
+ if (cursor.peekKind(1) === "StringLiteral") return true;
312
+ return cursor.peekKind(1) === "Dot" && cursor.peekKind(2) === "Ident" && cursor.peekKind(3) === "StringLiteral";
313
+ }
314
+ /** Parses `` tag`body` ``, `tag"body"`, or `tag'body'`: a qualified name, then a string literal. */
315
+ function parseTaggedLiteral(cursor) {
316
+ if (!isTaggedLiteralAhead(cursor)) return void 0;
317
+ cursor.startNode("TaggedLiteral");
318
+ parseQualifiedName(cursor);
319
+ parseStringLiteral(cursor);
320
+ return cursor.finishNode();
321
+ }
299
322
  function parseBooleanLiteralExpr(cursor) {
300
323
  if (cursor.peekKind() !== "Ident") return void 0;
301
324
  const text = cursor.peekToken().text;
@@ -637,4 +660,4 @@ function parseKeyValue(cursor, options = { memberAttributes: false }) {
637
660
  //#endregion
638
661
  export { parse as a, greenToken as i, SourceFile as n, greenNode as r, GreenNodeBuilder as t };
639
662
 
640
- //# sourceMappingURL=parse-BPOOpARs-COpO0wc7.mjs.map
663
+ //# sourceMappingURL=parse-BRwiZ0nC-B9AArxQM.mjs.map