@prisma/orm-framework 8.0.0-rc.2-dev.3 → 8.0.0-rc.20

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 (354) hide show
  1. package/README.md +1 -5
  2. package/dist/{apply-specifier-default-control-policy-CAxiXxKg.d.mts → apply-specifier-default-control-policy-Dlz0iwnK.d.mts} +2 -2
  3. package/dist/apply-specifier-default-control-policy-Dlz0iwnK.d.mts.map +1 -0
  4. package/dist/{assertions-Cz-GWH8P.mjs → assertions-Dw1lZz_Q.mjs} +2 -2
  5. package/dist/{assertions-Cz-GWH8P.mjs.map → assertions-Dw1lZz_Q.mjs.map} +1 -1
  6. package/dist/authoring-CNUti739.mjs +764 -0
  7. package/dist/authoring-CNUti739.mjs.map +1 -0
  8. package/dist/authoring-CjwinhU5.d.mts +206 -0
  9. package/dist/authoring-CjwinhU5.d.mts.map +1 -0
  10. package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts +515 -0
  11. package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts.map +1 -0
  12. package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts → canonicalization-CyrrXGmj-CeKUkht1.d.mts} +3 -3
  13. package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts.map → canonicalization-CyrrXGmj-CeKUkht1.d.mts.map} +1 -1
  14. package/dist/{hashing-utils-DQgS3nOe.mjs → canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs} +23 -3
  15. package/dist/canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs.map +1 -0
  16. package/dist/{utils-DMAM0unR.mjs → canonicalize-json-ZPawceQR-Dua1VNEB.mjs} +2 -2
  17. package/dist/canonicalize-json-ZPawceQR-Dua1VNEB.mjs.map +1 -0
  18. package/dist/codec-B4ypaota.d.mts +289 -0
  19. package/dist/codec-B4ypaota.d.mts.map +1 -0
  20. package/dist/codec-Do8tfXqk.mjs +457 -0
  21. package/dist/codec-Do8tfXqk.mjs.map +1 -0
  22. package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs +93 -0
  23. package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs.map +1 -0
  24. package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs +22 -0
  25. package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs.map +1 -0
  26. package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts +384 -0
  27. package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts.map +1 -0
  28. package/dist/{components-dZRz3T5y.mjs → components-BaV9iCkq.mjs} +34 -3
  29. package/dist/components-BaV9iCkq.mjs.map +1 -0
  30. package/dist/components-CRBcIta_.d.mts +86 -0
  31. package/dist/components-CRBcIta_.d.mts.map +1 -0
  32. package/dist/components.d.mts +19 -17
  33. package/dist/components.mjs +16 -12
  34. package/dist/components__authoring.d.mts +4 -3
  35. package/dist/components__authoring.mjs +3 -2
  36. package/dist/components__codec.d.mts +3 -3
  37. package/dist/components__codec.mjs +6 -4
  38. package/dist/components__components.d.mts +6 -4
  39. package/dist/components__components.mjs +4 -3
  40. package/dist/components__control.d.mts +5 -4
  41. package/dist/components__control.mjs +3 -2
  42. package/dist/components__emission.d.mts +4 -4
  43. package/dist/components__execution.d.mts +1 -1
  44. package/dist/components__ir.d.mts +1 -1
  45. package/dist/components__ir.mjs +2 -1
  46. package/dist/components__psl-ast.d.mts +4 -4
  47. package/dist/components__psl-ast.mjs +2 -2
  48. package/dist/components__runtime.d.mts +3 -2
  49. package/dist/components__runtime.mjs +2 -2
  50. package/dist/components__utils.mjs +1 -1
  51. package/dist/{config-types-CW4PDwMC.d.mts → config-types-BTFT7QfJ.d.mts} +73 -41
  52. package/dist/config-types-BTFT7QfJ.d.mts.map +1 -0
  53. package/dist/config-types-D0mYyP62.mjs +61 -0
  54. package/dist/config-types-D0mYyP62.mjs.map +1 -0
  55. package/dist/config.d.mts +2 -3
  56. package/dist/config.mjs +2 -3
  57. package/dist/config__config-types.d.mts +2 -2
  58. package/dist/config__config-types.mjs +2 -2
  59. package/dist/contract-authoring.d.mts +152 -17
  60. package/dist/contract-authoring.d.mts.map +1 -1
  61. package/dist/contract-authoring.mjs +190 -9
  62. package/dist/contract-authoring.mjs.map +1 -1
  63. package/dist/{contract-types-CkdMH7F7-9EHXSwbH.d.mts → contract-types-DEIEpzU_-DvAVuBr5.d.mts} +14 -8
  64. package/dist/contract-types-DEIEpzU_-DvAVuBr5.d.mts.map +1 -0
  65. package/dist/{contract-validation-error-DEiWp_EI-CRwtUgRw.mjs → contract-validation-error-CAnTGhkt-DSnujRaK.mjs} +6 -3
  66. package/dist/contract-validation-error-CAnTGhkt-DSnujRaK.mjs.map +1 -0
  67. package/dist/{contract-validation-error-R7cMoK04.d.mts → contract-validation-error-D1QAeOh5.d.mts} +4 -2
  68. package/dist/contract-validation-error-D1QAeOh5.d.mts.map +1 -0
  69. package/dist/contract.d.mts +13 -12
  70. package/dist/contract.mjs +9 -9
  71. package/dist/contract__apply-specifier-default-control-policy.d.mts +1 -1
  72. package/dist/contract__contract-validation-error.d.mts +1 -1
  73. package/dist/contract__contract-validation-error.mjs +1 -1
  74. package/dist/contract__default-namespace.mjs +1 -1
  75. package/dist/contract__enum-accessor.d.mts +2 -2
  76. package/dist/contract__enum-accessor.mjs +1 -1
  77. package/dist/contract__hashing-utils.d.mts +2 -2
  78. package/dist/contract__hashing-utils.mjs +2 -3
  79. package/dist/contract__hashing.d.mts +3 -3
  80. package/dist/contract__hashing.mjs +2 -2
  81. package/dist/contract__resolve-domain-model.d.mts +1 -1
  82. package/dist/contract__types.d.mts +5 -5
  83. package/dist/contract__types.mjs +3 -3
  84. package/dist/contract__validate-domain.d.mts +1 -1
  85. package/dist/contract__validate-domain.mjs +1 -1
  86. package/dist/contract__validate-once.d.mts +2 -0
  87. package/dist/contract__validate-once.mjs +2 -0
  88. package/dist/{control-ql9N9u4f-r3Vv41kZ.d.mts → control-B5ezUWD2-BIAYxeSk.d.mts} +34 -6
  89. package/dist/control-B5ezUWD2-BIAYxeSk.d.mts.map +1 -0
  90. package/dist/{control-DLEm6u5m.mjs → control-DMJqhnwU.mjs} +309 -36
  91. package/dist/control-DMJqhnwU.mjs.map +1 -0
  92. package/dist/control-DrDTlxCS.d.mts +1 -0
  93. package/dist/{control-BD96JZi8-NUhO5Kkw.mjs → control-KsXr4fYD-D2Ows0NI.mjs} +70 -24
  94. package/dist/control-KsXr4fYD-D2Ows0NI.mjs.map +1 -0
  95. package/dist/{control-BF8qzdnM.d.mts → control-s5ECUABR.d.mts} +635 -156
  96. package/dist/control-s5ECUABR.d.mts.map +1 -0
  97. package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs +275 -0
  98. package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs.map +1 -0
  99. package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs +459 -0
  100. package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs.map +1 -0
  101. package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs → default-namespace-D4vCwkXg-BEZbN38y.mjs} +2 -2
  102. package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs.map → default-namespace-D4vCwkXg-BEZbN38y.mjs.map} +1 -1
  103. package/dist/{dist-Dqbo77p7.mjs → dist-D1f6xr7F.mjs} +51 -24
  104. package/dist/dist-D1f6xr7F.mjs.map +1 -0
  105. package/dist/{domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts → domain-envelope-CN721GnP-4huRt7Wc.d.mts} +27 -13
  106. package/dist/domain-envelope-CN721GnP-4huRt7Wc.d.mts.map +1 -0
  107. package/dist/emission-BtJvV97M.d.mts +2 -0
  108. package/dist/{emission-types-DLXP34Ki-CFms3VrX.d.mts → emission-types-B-jKEbjI-D7BW8Gk1.d.mts} +17 -16
  109. package/dist/emission-types-B-jKEbjI-D7BW8Gk1.d.mts.map +1 -0
  110. package/dist/enum-accessor-2OZgavDX.d.mts +104 -0
  111. package/dist/enum-accessor-2OZgavDX.d.mts.map +1 -0
  112. package/dist/enum-accessor-B-A2wNok.mjs +122 -0
  113. package/dist/enum-accessor-B-A2wNok.mjs.map +1 -0
  114. package/dist/errors.d.mts +5 -4
  115. package/dist/errors.mjs +4 -4
  116. package/dist/errors__control.d.mts +3 -2
  117. package/dist/errors__control.mjs +2 -2
  118. package/dist/errors__execution.d.mts +2 -2
  119. package/dist/errors__execution.mjs +2 -2
  120. package/dist/errors__migration.d.mts +2 -2
  121. package/dist/errors__migration.mjs +2 -2
  122. package/dist/execution-CjX5CCTb.d.mts +76 -0
  123. package/dist/execution-CjX5CCTb.d.mts.map +1 -0
  124. package/dist/{execution-CSnQT8EX.d.mts → execution-lMPVFj5o.d.mts} +2 -2
  125. package/dist/{execution-CSnQT8EX.d.mts.map → execution-lMPVFj5o.d.mts.map} +1 -1
  126. package/dist/execution-vfY4d-SZ.mjs +138 -0
  127. package/dist/execution-vfY4d-SZ.mjs.map +1 -0
  128. package/dist/{declarations-DR6To8_k-BFwkCGeP.mjs → expressions-CMQzbnHk-BL2zN0Iv.mjs} +199 -350
  129. package/dist/expressions-CMQzbnHk-BL2zN0Iv.mjs.map +1 -0
  130. package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts +1096 -0
  131. package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts.map +1 -0
  132. package/dist/{framework-components-hZ2tO-KH-CdRXBOYd.d.mts → framework-components-DKoQnPdB-lax1COaf.d.mts} +28 -91
  133. package/dist/framework-components-DKoQnPdB-lax1COaf.d.mts.map +1 -0
  134. package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs +271 -0
  135. package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs.map +1 -0
  136. package/dist/{hash-content-DwEUh-Rx.d.mts → hash-content-Bde14N2-.d.mts} +2 -2
  137. package/dist/{hash-content-DwEUh-Rx.d.mts.map → hash-content-Bde14N2-.d.mts.map} +1 -1
  138. package/dist/{hash-content-Bugg_nZn.mjs → hash-content-Bdl-HSfq.mjs} +2 -2
  139. package/dist/hash-content-Bdl-HSfq.mjs.map +1 -0
  140. package/dist/{hashing-BtIZVNYX.mjs → hashing-CLRfNAxh.mjs} +28 -9
  141. package/dist/hashing-CLRfNAxh.mjs.map +1 -0
  142. package/dist/hashing-D-DHz0zl.d.mts +36 -0
  143. package/dist/hashing-D-DHz0zl.d.mts.map +1 -0
  144. package/dist/{hashing-utils-qKu59RSC.d.mts → hashing-utils-DiGHKd3b.d.mts} +4 -3
  145. package/dist/{hashing-utils-qKu59RSC.d.mts.map → hashing-utils-DiGHKd3b.d.mts.map} +1 -1
  146. package/dist/ids.d.mts +90 -13
  147. package/dist/ids.d.mts.map +1 -1
  148. package/dist/ids.mjs +45 -59
  149. package/dist/ids.mjs.map +1 -1
  150. package/dist/ids__runtime.d.mts +1 -1
  151. package/dist/ids__runtime.mjs +1 -1
  152. package/dist/{index-CDk9yEbw.d.mts → index-MU-ksXsh.d.mts} +23 -6
  153. package/dist/index-MU-ksXsh.d.mts.map +1 -0
  154. package/dist/{internal-error-kK8QvlDE.d.mts → internal-error-2fJ9fcZX.d.mts} +2 -2
  155. package/dist/{internal-error-kK8QvlDE.d.mts.map → internal-error-2fJ9fcZX.d.mts.map} +1 -1
  156. package/dist/{internal-error-BIc-ehme-ouBQPoEL.mjs → internal-error-ChGYPVpq-DhUD05u0.mjs} +3 -3
  157. package/dist/internal-error-ChGYPVpq-DhUD05u0.mjs.map +1 -0
  158. package/dist/{ir-BvE7L9FK.d.mts → ir-LV4tXsw3.d.mts} +6 -5
  159. package/dist/{ir-BvE7L9FK.d.mts.map → ir-LV4tXsw3.d.mts.map} +1 -1
  160. package/dist/{ir-ChmSSAhX.mjs → ir-uDGU9vaj.mjs} +7 -53
  161. package/dist/ir-uDGU9vaj.mjs.map +1 -0
  162. package/dist/{migration-BvrgDZXw.d.mts → migration-Dluwnqe9.d.mts} +20 -3
  163. package/dist/migration-Dluwnqe9.d.mts.map +1 -0
  164. package/dist/{migration-C57VKLUY.mjs → migration-uC-bSKA4.mjs} +30 -4
  165. package/dist/migration-uC-bSKA4.mjs.map +1 -0
  166. package/dist/namespace-VUH2dgnS-By5y75h9.mjs +53 -0
  167. package/dist/namespace-VUH2dgnS-By5y75h9.mjs.map +1 -0
  168. package/dist/operations.mjs +1 -1
  169. package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs → parse-bZgfjovA-BNgYhylT.mjs} +311 -55
  170. package/dist/parse-bZgfjovA-BNgYhylT.mjs.map +1 -0
  171. package/dist/{parse-0ZJjj_2N-DhQpSVmQ.d.mts → parse-djL5wker-B610mXG4.d.mts} +181 -52
  172. package/dist/parse-djL5wker-B610mXG4.d.mts.map +1 -0
  173. package/dist/psl-ast-COcYtLlz.d.mts +2 -0
  174. package/dist/psl-ast-CyvE6CR-.mjs +116 -0
  175. package/dist/psl-ast-CyvE6CR-.mjs.map +1 -0
  176. package/dist/{psl-ast-CWJQF8LA-Vr5JNPdn.d.mts → psl-ast-rY25o3Ze-ClLY3CYt.d.mts} +10 -40
  177. package/dist/psl-ast-rY25o3Ze-ClLY3CYt.d.mts.map +1 -0
  178. package/dist/psl-parser.d.mts +415 -101
  179. package/dist/psl-parser.d.mts.map +1 -1
  180. package/dist/psl-parser.mjs +2451 -537
  181. package/dist/psl-parser.mjs.map +1 -1
  182. package/dist/psl-parser__format.d.mts +8 -2
  183. package/dist/psl-parser__format.d.mts.map +1 -1
  184. package/dist/psl-parser__format.mjs +65 -34
  185. package/dist/psl-parser__format.mjs.map +1 -1
  186. package/dist/psl-parser__interpret.d.mts +98 -10
  187. package/dist/psl-parser__interpret.d.mts.map +1 -1
  188. package/dist/psl-parser__interpret.mjs +393 -2
  189. package/dist/psl-parser__interpret.mjs.map +1 -1
  190. package/dist/psl-parser__syntax.d.mts +3 -3
  191. package/dist/psl-parser__syntax.mjs +4 -43
  192. package/dist/psl-parser__tokenizer.d.mts +1 -1
  193. package/dist/psl-parser__tokenizer.mjs +1 -1
  194. package/dist/psl-printer.d.mts +7 -17
  195. package/dist/psl-printer.d.mts.map +1 -1
  196. package/dist/psl-printer.mjs +35 -104
  197. package/dist/psl-printer.mjs.map +1 -1
  198. package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs +74 -0
  199. package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs.map +1 -0
  200. package/dist/{resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts → resolve-domain-model-BNr1glea-BLuR-phK.d.mts} +3 -3
  201. package/dist/resolve-domain-model-BNr1glea-BLuR-phK.d.mts.map +1 -0
  202. package/dist/{result-CBZ8X9mU.mjs → result-8OXF26MN.mjs} +14 -3
  203. package/dist/{result-CBZ8X9mU.mjs.map → result-8OXF26MN.mjs.map} +1 -1
  204. package/dist/{result-Bpupv5vO.d.mts → result-BYCOANWy.d.mts} +4 -2
  205. package/dist/result-BYCOANWy.d.mts.map +1 -0
  206. package/dist/runtime-B-YYuWy2.d.mts +899 -0
  207. package/dist/runtime-B-YYuWy2.d.mts.map +1 -0
  208. package/dist/runtime-DSYSc98Y.mjs +1059 -0
  209. package/dist/runtime-DSYSc98Y.mjs.map +1 -0
  210. package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts +19 -0
  211. package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts.map +1 -0
  212. package/dist/{structured-error-CgiSMpdU.mjs → structured-error-BXbihKQ-.mjs} +3 -3
  213. package/dist/{structured-error-CgiSMpdU.mjs.map → structured-error-BXbihKQ-.mjs.map} +1 -1
  214. package/dist/{structured-error-BsNT4Hun.d.mts → structured-error-Cc7AIRsp.d.mts} +19 -5
  215. package/dist/structured-error-Cc7AIRsp.d.mts.map +1 -0
  216. package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts +18 -0
  217. package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts.map +1 -0
  218. package/dist/suppress-idle-connection-errors-DzApeUb3.mjs +22 -0
  219. package/dist/suppress-idle-connection-errors-DzApeUb3.mjs.map +1 -0
  220. package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs +1276 -0
  221. package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs.map +1 -0
  222. package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts +258 -0
  223. package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts.map +1 -0
  224. package/dist/text-C3TTEtgd.mjs +35 -0
  225. package/dist/text-C3TTEtgd.mjs.map +1 -0
  226. package/dist/text-C8_-rheN.d.mts +15 -0
  227. package/dist/text-C8_-rheN.d.mts.map +1 -0
  228. package/dist/{tokenizer-1hAHZzmp-QGPORvmA.mjs → tokenizer-C-GTKKjR-B1vOzJy0.mjs} +54 -10
  229. package/dist/tokenizer-C-GTKKjR-B1vOzJy0.mjs.map +1 -0
  230. package/dist/{tokenizer-DcYI0Xrq-C-nNE9mE.d.mts → tokenizer-i8RaVWVa-7fRwlCPP.d.mts} +9 -4
  231. package/dist/tokenizer-i8RaVWVa-7fRwlCPP.d.mts.map +1 -0
  232. package/dist/ts-render.d.mts +2 -2
  233. package/dist/ts-render.mjs +2 -2
  234. package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs +261 -0
  235. package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs.map +1 -0
  236. package/dist/{types-BnH4zYvN.mjs → types-B8ULzMAX.mjs} +36 -3
  237. package/dist/types-B8ULzMAX.mjs.map +1 -0
  238. package/dist/types-GNXJ7xW2.d.mts +131 -0
  239. package/dist/types-GNXJ7xW2.d.mts.map +1 -0
  240. package/dist/{types-import-spec-3mjbVBhI-DQI6BvKU.d.mts → types-import-spec-DQjfX-gM-zVncuzs0.d.mts} +6 -6
  241. package/dist/types-import-spec-DQjfX-gM-zVncuzs0.d.mts.map +1 -0
  242. package/dist/utils.d.mts +7 -5
  243. package/dist/utils.mjs +9 -7
  244. package/dist/utils__assertions.mjs +1 -1
  245. package/dist/utils__hash-content.d.mts +1 -1
  246. package/dist/utils__hash-content.mjs +1 -1
  247. package/dist/utils__internal-error.d.mts +1 -1
  248. package/dist/utils__internal-error.mjs +1 -1
  249. package/dist/utils__result.d.mts +2 -2
  250. package/dist/utils__result.mjs +2 -2
  251. package/dist/utils__structured-error.d.mts +2 -2
  252. package/dist/utils__structured-error.mjs +1 -1
  253. package/dist/utils__suppress-idle-connection-errors.d.mts +2 -0
  254. package/dist/utils__suppress-idle-connection-errors.mjs +2 -0
  255. package/dist/utils__text.d.mts +2 -0
  256. package/dist/utils__text.mjs +2 -0
  257. package/dist/{validate-domain-BNBs-TVv.d.mts → validate-domain-B5kmlBFB.d.mts} +10 -6
  258. package/dist/validate-domain-B5kmlBFB.d.mts.map +1 -0
  259. package/dist/{validate-domain-BkvFlY3B.mjs → validate-domain-CbXHDYpF.mjs} +43 -22
  260. package/dist/validate-domain-CbXHDYpF.mjs.map +1 -0
  261. package/dist/validate-once-D-IwXHYP.mjs +42 -0
  262. package/dist/validate-once-D-IwXHYP.mjs.map +1 -0
  263. package/dist/validate-once-gfCOHsDh.d.mts +16 -0
  264. package/dist/validate-once-gfCOHsDh.d.mts.map +1 -0
  265. package/package.json +24 -20
  266. package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +0 -1
  267. package/dist/authoring-B2H-9qCv.d.mts +0 -1
  268. package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +0 -25
  269. package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +0 -1
  270. package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs +0 -120
  271. package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs.map +0 -1
  272. package/dist/codec-Cd0QcxAx.mjs +0 -63
  273. package/dist/codec-Cd0QcxAx.mjs.map +0 -1
  274. package/dist/codec-Ce07W3Mz.d.mts +0 -112
  275. package/dist/codec-Ce07W3Mz.d.mts.map +0 -1
  276. package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts +0 -223
  277. package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts.map +0 -1
  278. package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs +0 -30
  279. package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs.map +0 -1
  280. package/dist/components-CGA_WwEG.d.mts +0 -50
  281. package/dist/components-CGA_WwEG.d.mts.map +0 -1
  282. package/dist/components-dZRz3T5y.mjs.map +0 -1
  283. package/dist/config-types-BqhNxw0z.mjs +0 -67
  284. package/dist/config-types-BqhNxw0z.mjs.map +0 -1
  285. package/dist/config-types-CW4PDwMC.d.mts.map +0 -1
  286. package/dist/config-validation-DPt5hwQx.mjs +0 -168
  287. package/dist/config-validation-DPt5hwQx.mjs.map +0 -1
  288. package/dist/config-validation-Wiqew2J9.d.mts +0 -21
  289. package/dist/config-validation-Wiqew2J9.d.mts.map +0 -1
  290. package/dist/config__config-validation.d.mts +0 -2
  291. package/dist/config__config-validation.mjs +0 -2
  292. package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts.map +0 -1
  293. package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs.map +0 -1
  294. package/dist/contract-validation-error-R7cMoK04.d.mts.map +0 -1
  295. package/dist/control-BD96JZi8-NUhO5Kkw.mjs.map +0 -1
  296. package/dist/control-BF8qzdnM.d.mts.map +0 -1
  297. package/dist/control-DLEm6u5m.mjs.map +0 -1
  298. package/dist/control-ql9N9u4f-r3Vv41kZ.d.mts.map +0 -1
  299. package/dist/declarations-DR6To8_k-BFwkCGeP.mjs.map +0 -1
  300. package/dist/dist-Dqbo77p7.mjs.map +0 -1
  301. package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map +0 -1
  302. package/dist/emission-CmUO03gQ.d.mts +0 -2
  303. package/dist/emission-types-DLXP34Ki-CFms3VrX.d.mts.map +0 -1
  304. package/dist/enum-accessor-Db5DaTNX.mjs +0 -35
  305. package/dist/enum-accessor-Db5DaTNX.mjs.map +0 -1
  306. package/dist/enum-accessor-PH5vjghI.d.mts +0 -85
  307. package/dist/enum-accessor-PH5vjghI.d.mts.map +0 -1
  308. package/dist/execution-Crk6IfTs.mjs +0 -218
  309. package/dist/execution-Crk6IfTs.mjs.map +0 -1
  310. package/dist/execution-Cyl2dXxX.d.mts +0 -115
  311. package/dist/execution-Cyl2dXxX.d.mts.map +0 -1
  312. package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts +0 -777
  313. package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts.map +0 -1
  314. package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs +0 -698
  315. package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs.map +0 -1
  316. package/dist/framework-components-hZ2tO-KH-CdRXBOYd.d.mts.map +0 -1
  317. package/dist/hash-content-Bugg_nZn.mjs.map +0 -1
  318. package/dist/hashing-BtIZVNYX.mjs.map +0 -1
  319. package/dist/hashing-CccSPELN.d.mts +0 -25
  320. package/dist/hashing-CccSPELN.d.mts.map +0 -1
  321. package/dist/hashing-utils-DQgS3nOe.mjs.map +0 -1
  322. package/dist/index-CDk9yEbw.d.mts.map +0 -1
  323. package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +0 -1
  324. package/dist/ir-ChmSSAhX.mjs.map +0 -1
  325. package/dist/migration-BvrgDZXw.d.mts.map +0 -1
  326. package/dist/migration-C57VKLUY.mjs.map +0 -1
  327. package/dist/parse-0ZJjj_2N-DhQpSVmQ.d.mts.map +0 -1
  328. package/dist/parse-GbZGfMUj-BFSrD2AN.mjs.map +0 -1
  329. package/dist/psl-ast-BXZoFQBk.d.mts +0 -37
  330. package/dist/psl-ast-BXZoFQBk.d.mts.map +0 -1
  331. package/dist/psl-ast-CWJQF8LA-Vr5JNPdn.d.mts.map +0 -1
  332. package/dist/psl-ast-DUCvVXbB.mjs +0 -239
  333. package/dist/psl-ast-DUCvVXbB.mjs.map +0 -1
  334. package/dist/psl-parser__syntax.mjs.map +0 -1
  335. package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs +0 -59
  336. package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map +0 -1
  337. package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +0 -1
  338. package/dist/result-Bpupv5vO.d.mts.map +0 -1
  339. package/dist/runtime-BqzioOmU.mjs +0 -670
  340. package/dist/runtime-BqzioOmU.mjs.map +0 -1
  341. package/dist/runtime-Cuxw8obj.d.mts +0 -1038
  342. package/dist/runtime-Cuxw8obj.d.mts.map +0 -1
  343. package/dist/structured-error-BsNT4Hun.d.mts.map +0 -1
  344. package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts +0 -125
  345. package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts.map +0 -1
  346. package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +0 -1
  347. package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +0 -1
  348. package/dist/types-BnH4zYvN.mjs.map +0 -1
  349. package/dist/types-ByeQhU9p.d.mts +0 -17
  350. package/dist/types-ByeQhU9p.d.mts.map +0 -1
  351. package/dist/types-import-spec-3mjbVBhI-DQI6BvKU.d.mts.map +0 -1
  352. package/dist/utils-DMAM0unR.mjs.map +0 -1
  353. package/dist/validate-domain-BNBs-TVv.d.mts.map +0 -1
  354. package/dist/validate-domain-BkvFlY3B.mjs.map +0 -1
@@ -0,0 +1,459 @@
1
+ import { S as findFirstChild, _ as castExpression, a as IdentifierAst, b as filterChildren, f as SyntaxNode, n as AttributeArgAst, p as SyntaxToken, u as QualifiedNameAst, w as readDocComment, x as findChildToken } from "./expressions-CMQzbnHk-BL2zN0Iv.mjs";
2
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/declarations-BgUAq1RG.mjs
3
+ var AttributeArgListAst = class AttributeArgListAst {
4
+ syntax;
5
+ constructor(syntax) {
6
+ this.syntax = syntax;
7
+ }
8
+ lparen() {
9
+ return findChildToken(this.syntax, "LParen");
10
+ }
11
+ rparen() {
12
+ return findChildToken(this.syntax, "RParen");
13
+ }
14
+ *args() {
15
+ yield* filterChildren(this.syntax, AttributeArgAst.cast);
16
+ }
17
+ static cast(node) {
18
+ return node.kind === "AttributeArgList" ? new AttributeArgListAst(node) : void 0;
19
+ }
20
+ };
21
+ var FieldAttributeAst = class FieldAttributeAst {
22
+ syntax;
23
+ constructor(syntax) {
24
+ this.syntax = syntax;
25
+ }
26
+ at() {
27
+ return findChildToken(this.syntax, "At");
28
+ }
29
+ name() {
30
+ return findFirstChild(this.syntax, QualifiedNameAst.cast);
31
+ }
32
+ argList() {
33
+ return findFirstChild(this.syntax, AttributeArgListAst.cast);
34
+ }
35
+ static cast(node) {
36
+ return node.kind === "FieldAttribute" ? new FieldAttributeAst(node) : void 0;
37
+ }
38
+ };
39
+ var ModelAttributeAst = class ModelAttributeAst {
40
+ syntax;
41
+ constructor(syntax) {
42
+ this.syntax = syntax;
43
+ }
44
+ doubleAt() {
45
+ return findChildToken(this.syntax, "DoubleAt");
46
+ }
47
+ name() {
48
+ return findFirstChild(this.syntax, QualifiedNameAst.cast);
49
+ }
50
+ argList() {
51
+ return findFirstChild(this.syntax, AttributeArgListAst.cast);
52
+ }
53
+ static cast(node) {
54
+ return node.kind === "ModelAttribute" ? new ModelAttributeAst(node) : void 0;
55
+ }
56
+ };
57
+ const TRIVIA_KINDS = /* @__PURE__ */ new Set([
58
+ "Whitespace",
59
+ "Newline",
60
+ "Comment"
61
+ ]);
62
+ /** Whether a token kind is trivia (whitespace, newline, or comment). */
63
+ function isTriviaKind(kind) {
64
+ return TRIVIA_KINDS.has(kind);
65
+ }
66
+ /** Whether a token is trivia. */
67
+ function isTrivia(token) {
68
+ return isTriviaKind(token.kind);
69
+ }
70
+ /**
71
+ * The first non-trivia token at or beyond `token` in `direction`. Returns
72
+ * `token` itself when it is already significant.
73
+ */
74
+ function skipTriviaToken(token, direction) {
75
+ let current = token;
76
+ while (current !== void 0 && isTrivia(current)) current = direction === "next" ? current.nextToken : current.prevToken;
77
+ return current;
78
+ }
79
+ /**
80
+ * The nearest sibling of `element` (within the same parent) in `direction` that
81
+ * is not a trivia token. Nodes are always significant.
82
+ */
83
+ function nonTriviaSibling(element, direction) {
84
+ let sibling = step(element, direction);
85
+ while (sibling !== void 0) {
86
+ if (!(sibling instanceof SyntaxToken) || !isTrivia(sibling)) return sibling;
87
+ sibling = step(sibling, direction);
88
+ }
89
+ }
90
+ function step(element, direction) {
91
+ return direction === "next" ? element.nextSiblingOrToken : element.prevSiblingOrToken;
92
+ }
93
+ var TypeAnnotationAst = class TypeAnnotationAst {
94
+ syntax;
95
+ constructor(syntax) {
96
+ this.syntax = syntax;
97
+ }
98
+ /** The annotation's reference, doubling as the constructor callee when an {@link argList} follows. */
99
+ name() {
100
+ return findFirstChild(this.syntax, QualifiedNameAst.cast);
101
+ }
102
+ /** Present when the annotation is a constructor (`Vector(1536)`) rather than a plain reference. */
103
+ argList() {
104
+ return findFirstChild(this.syntax, AttributeArgListAst.cast);
105
+ }
106
+ isConstructor() {
107
+ return this.argList() !== void 0;
108
+ }
109
+ lbracket() {
110
+ return findChildToken(this.syntax, "LBracket");
111
+ }
112
+ rbracket() {
113
+ return findChildToken(this.syntax, "RBracket");
114
+ }
115
+ questionMark() {
116
+ return findChildToken(this.syntax, "Question");
117
+ }
118
+ isList() {
119
+ return this.lbracket() !== void 0;
120
+ }
121
+ /**
122
+ * The list/field axis: a `?` after `]` (list nullable) or, when this is not a
123
+ * list, the sole field-level `?`. A `?` before `[` is the element axis and
124
+ * does not count here.
125
+ */
126
+ isOptional() {
127
+ const lbracket = this.lbracket();
128
+ if (lbracket === void 0) return this.questionMark() !== void 0;
129
+ const anchor = this.rbracket() ?? lbracket;
130
+ return this.#questionTokens().some((question) => question.index > anchor.index);
131
+ }
132
+ /** The element axis: a `?` positioned before `[`, meaningful only for lists. */
133
+ isElementOptional() {
134
+ const lbracket = this.lbracket();
135
+ if (lbracket === void 0) return false;
136
+ return this.#questionTokens().some((question) => question.index < lbracket.index);
137
+ }
138
+ #questionTokens() {
139
+ const result = [];
140
+ for (const child of this.syntax.children()) if (!(child instanceof SyntaxNode) && child.kind === "Question") result.push(child);
141
+ return result;
142
+ }
143
+ static cast(node) {
144
+ return node.kind === "TypeAnnotation" ? new TypeAnnotationAst(node) : void 0;
145
+ }
146
+ };
147
+ function castNamespaceMember(node) {
148
+ return ModelDeclarationAst.cast(node) ?? CompositeTypeDeclarationAst.cast(node) ?? GenericBlockDeclarationAst.cast(node) ?? MixinDeclarationAst.cast(node);
149
+ }
150
+ var DocumentAst = class DocumentAst {
151
+ syntax;
152
+ constructor(syntax) {
153
+ this.syntax = syntax;
154
+ }
155
+ *declarations() {
156
+ yield* filterChildren(this.syntax, (node) => castNamespaceMember(node) ?? TypesBlockAst.cast(node) ?? NamespaceDeclarationAst.cast(node));
157
+ }
158
+ static cast(node) {
159
+ return node.kind === "Document" ? new DocumentAst(node) : void 0;
160
+ }
161
+ };
162
+ var ModelDeclarationAst = class ModelDeclarationAst {
163
+ syntax;
164
+ constructor(syntax) {
165
+ this.syntax = syntax;
166
+ }
167
+ keyword() {
168
+ return findChildToken(this.syntax, "Ident");
169
+ }
170
+ name() {
171
+ return findFirstChild(this.syntax, IdentifierAst.cast);
172
+ }
173
+ lbrace() {
174
+ return findChildToken(this.syntax, "LBrace");
175
+ }
176
+ rbrace() {
177
+ return findChildToken(this.syntax, "RBrace");
178
+ }
179
+ *fields() {
180
+ yield* filterChildren(this.syntax, FieldDeclarationAst.cast);
181
+ }
182
+ *attributes() {
183
+ yield* filterChildren(this.syntax, ModelAttributeAst.cast);
184
+ }
185
+ *inclusions() {
186
+ yield* filterChildren(this.syntax, MixinInclusionAst.cast);
187
+ }
188
+ *members() {
189
+ yield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));
190
+ }
191
+ docComment() {
192
+ return readDocComment(this.syntax);
193
+ }
194
+ static cast(node) {
195
+ return node.kind === "ModelDeclaration" ? new ModelDeclarationAst(node) : void 0;
196
+ }
197
+ };
198
+ var CompositeTypeDeclarationAst = class CompositeTypeDeclarationAst {
199
+ syntax;
200
+ constructor(syntax) {
201
+ this.syntax = syntax;
202
+ }
203
+ keyword() {
204
+ return findChildToken(this.syntax, "Ident");
205
+ }
206
+ name() {
207
+ return findFirstChild(this.syntax, IdentifierAst.cast);
208
+ }
209
+ lbrace() {
210
+ return findChildToken(this.syntax, "LBrace");
211
+ }
212
+ rbrace() {
213
+ return findChildToken(this.syntax, "RBrace");
214
+ }
215
+ *fields() {
216
+ yield* filterChildren(this.syntax, FieldDeclarationAst.cast);
217
+ }
218
+ *attributes() {
219
+ yield* filterChildren(this.syntax, ModelAttributeAst.cast);
220
+ }
221
+ *inclusions() {
222
+ yield* filterChildren(this.syntax, MixinInclusionAst.cast);
223
+ }
224
+ *members() {
225
+ yield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));
226
+ }
227
+ docComment() {
228
+ return readDocComment(this.syntax);
229
+ }
230
+ static cast(node) {
231
+ return node.kind === "CompositeTypeDeclaration" ? new CompositeTypeDeclarationAst(node) : void 0;
232
+ }
233
+ };
234
+ var NamespaceDeclarationAst = class NamespaceDeclarationAst {
235
+ syntax;
236
+ constructor(syntax) {
237
+ this.syntax = syntax;
238
+ }
239
+ keyword() {
240
+ return findChildToken(this.syntax, "Ident");
241
+ }
242
+ name() {
243
+ return findFirstChild(this.syntax, IdentifierAst.cast);
244
+ }
245
+ lbrace() {
246
+ return findChildToken(this.syntax, "LBrace");
247
+ }
248
+ rbrace() {
249
+ return findChildToken(this.syntax, "RBrace");
250
+ }
251
+ *declarations() {
252
+ yield* filterChildren(this.syntax, castNamespaceMember);
253
+ }
254
+ static cast(node) {
255
+ return node.kind === "Namespace" ? new NamespaceDeclarationAst(node) : void 0;
256
+ }
257
+ };
258
+ var TypesBlockAst = class TypesBlockAst {
259
+ syntax;
260
+ constructor(syntax) {
261
+ this.syntax = syntax;
262
+ }
263
+ keyword() {
264
+ return findChildToken(this.syntax, "Ident");
265
+ }
266
+ lbrace() {
267
+ return findChildToken(this.syntax, "LBrace");
268
+ }
269
+ rbrace() {
270
+ return findChildToken(this.syntax, "RBrace");
271
+ }
272
+ *declarations() {
273
+ yield* filterChildren(this.syntax, NamedTypeDeclarationAst.cast);
274
+ }
275
+ static cast(node) {
276
+ return node.kind === "TypesBlock" ? new TypesBlockAst(node) : void 0;
277
+ }
278
+ };
279
+ var GenericBlockDeclarationAst = class GenericBlockDeclarationAst {
280
+ syntax;
281
+ constructor(syntax) {
282
+ this.syntax = syntax;
283
+ }
284
+ keyword() {
285
+ return findChildToken(this.syntax, "Ident");
286
+ }
287
+ name() {
288
+ return findFirstChild(this.syntax, IdentifierAst.cast);
289
+ }
290
+ lbrace() {
291
+ return findChildToken(this.syntax, "LBrace");
292
+ }
293
+ rbrace() {
294
+ return findChildToken(this.syntax, "RBrace");
295
+ }
296
+ *entries() {
297
+ yield* filterChildren(this.syntax, KeyValuePairAst.cast);
298
+ }
299
+ /** Field lines of a `view` body. Empty for every other generic block. */
300
+ *fields() {
301
+ yield* filterChildren(this.syntax, FieldDeclarationAst.cast);
302
+ }
303
+ *attributes() {
304
+ yield* filterChildren(this.syntax, ModelAttributeAst.cast);
305
+ }
306
+ *inclusions() {
307
+ yield* filterChildren(this.syntax, MixinInclusionAst.cast);
308
+ }
309
+ *members() {
310
+ yield* filterChildren(this.syntax, (node) => KeyValuePairAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));
311
+ }
312
+ docComment() {
313
+ return readDocComment(this.syntax);
314
+ }
315
+ static cast(node) {
316
+ return node.kind === "GenericBlockDeclaration" ? new GenericBlockDeclarationAst(node) : void 0;
317
+ }
318
+ };
319
+ var MixinDeclarationAst = class MixinDeclarationAst {
320
+ syntax;
321
+ constructor(syntax) {
322
+ this.syntax = syntax;
323
+ }
324
+ keyword() {
325
+ return findChildToken(this.syntax, "Ident");
326
+ }
327
+ mixinKeyword() {
328
+ const next = this.keyword()?.nextToken;
329
+ const token = next === void 0 ? void 0 : skipTriviaToken(next, "next");
330
+ return token?.kind === "Ident" && token.parent === this.syntax ? token : void 0;
331
+ }
332
+ name() {
333
+ return findFirstChild(this.syntax, IdentifierAst.cast);
334
+ }
335
+ lbrace() {
336
+ return findChildToken(this.syntax, "LBrace");
337
+ }
338
+ rbrace() {
339
+ return findChildToken(this.syntax, "RBrace");
340
+ }
341
+ *fields() {
342
+ yield* filterChildren(this.syntax, FieldDeclarationAst.cast);
343
+ }
344
+ *entries() {
345
+ yield* filterChildren(this.syntax, KeyValuePairAst.cast);
346
+ }
347
+ *attributes() {
348
+ yield* filterChildren(this.syntax, ModelAttributeAst.cast);
349
+ }
350
+ /** A mixin cannot include a mixin, but the parser still reads an inclusion written in a mixin body, so that it can be reported as an error at that inclusion. */
351
+ *inclusions() {
352
+ yield* filterChildren(this.syntax, MixinInclusionAst.cast);
353
+ }
354
+ *members() {
355
+ yield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? KeyValuePairAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));
356
+ }
357
+ docComment() {
358
+ return readDocComment(this.syntax);
359
+ }
360
+ static cast(node) {
361
+ return node.kind === "MixinDeclaration" ? new MixinDeclarationAst(node) : void 0;
362
+ }
363
+ };
364
+ var MixinInclusionAst = class MixinInclusionAst {
365
+ syntax;
366
+ constructor(syntax) {
367
+ this.syntax = syntax;
368
+ }
369
+ plus() {
370
+ return findChildToken(this.syntax, "Plus");
371
+ }
372
+ name() {
373
+ return findFirstChild(this.syntax, QualifiedNameAst.cast);
374
+ }
375
+ static cast(node) {
376
+ return node.kind === "MixinInclusion" ? new MixinInclusionAst(node) : void 0;
377
+ }
378
+ };
379
+ var KeyValuePairAst = class KeyValuePairAst {
380
+ syntax;
381
+ constructor(syntax) {
382
+ this.syntax = syntax;
383
+ }
384
+ key() {
385
+ return findFirstChild(this.syntax, IdentifierAst.cast);
386
+ }
387
+ equals() {
388
+ return findChildToken(this.syntax, "Equals");
389
+ }
390
+ value() {
391
+ let pastEquals = false;
392
+ for (const child of this.syntax.children()) {
393
+ if (!(child instanceof SyntaxNode)) {
394
+ if (child.kind === "Equals") pastEquals = true;
395
+ continue;
396
+ }
397
+ if (pastEquals) {
398
+ const expr = castExpression(child);
399
+ if (expr) return expr;
400
+ }
401
+ }
402
+ }
403
+ /** `@` attributes after the key or value, as in `USER @map("user")`. */
404
+ *attributes() {
405
+ yield* filterChildren(this.syntax, FieldAttributeAst.cast);
406
+ }
407
+ static cast(node) {
408
+ return node.kind === "KeyValuePair" ? new KeyValuePairAst(node) : void 0;
409
+ }
410
+ };
411
+ var FieldDeclarationAst = class FieldDeclarationAst {
412
+ syntax;
413
+ constructor(syntax) {
414
+ this.syntax = syntax;
415
+ }
416
+ name() {
417
+ return findFirstChild(this.syntax, IdentifierAst.cast);
418
+ }
419
+ typeAnnotation() {
420
+ return findFirstChild(this.syntax, TypeAnnotationAst.cast);
421
+ }
422
+ *attributes() {
423
+ yield* filterChildren(this.syntax, FieldAttributeAst.cast);
424
+ }
425
+ docComment() {
426
+ return readDocComment(this.syntax);
427
+ }
428
+ static cast(node) {
429
+ return node.kind === "FieldDeclaration" ? new FieldDeclarationAst(node) : void 0;
430
+ }
431
+ };
432
+ var NamedTypeDeclarationAst = class NamedTypeDeclarationAst {
433
+ syntax;
434
+ constructor(syntax) {
435
+ this.syntax = syntax;
436
+ }
437
+ name() {
438
+ return findFirstChild(this.syntax, IdentifierAst.cast);
439
+ }
440
+ equals() {
441
+ return findChildToken(this.syntax, "Equals");
442
+ }
443
+ typeAnnotation() {
444
+ return findFirstChild(this.syntax, TypeAnnotationAst.cast);
445
+ }
446
+ *attributes() {
447
+ yield* filterChildren(this.syntax, FieldAttributeAst.cast);
448
+ }
449
+ docComment() {
450
+ return readDocComment(this.syntax);
451
+ }
452
+ static cast(node) {
453
+ return node.kind === "NamedTypeDeclaration" ? new NamedTypeDeclarationAst(node) : void 0;
454
+ }
455
+ };
456
+ //#endregion
457
+ export { isTriviaKind as _, FieldDeclarationAst as a, MixinDeclarationAst as c, ModelDeclarationAst as d, NamedTypeDeclarationAst as f, isTrivia as g, TypesBlockAst as h, FieldAttributeAst as i, MixinInclusionAst as l, TypeAnnotationAst as m, CompositeTypeDeclarationAst as n, GenericBlockDeclarationAst as o, NamespaceDeclarationAst as p, DocumentAst as r, KeyValuePairAst as s, AttributeArgListAst as t, ModelAttributeAst as u, nonTriviaSibling as v, skipTriviaToken as y };
458
+
459
+ //# sourceMappingURL=declarations-BgUAq1RG-Dz_-EI1Q.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declarations-BgUAq1RG-Dz_-EI1Q.mjs","names":["#questionTokens"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/declarations-BgUAq1RG.mjs"],"sourcesContent":["import { S as SyntaxToken, _ as findChildToken, b as readDocComment, d as castExpression, g as filterChildren, m as IdentifierAst, n as AttributeArgAst, p as QualifiedNameAst, v as findFirstChild, x as SyntaxNode } from \"./expressions-CMQzbnHk.mjs\";\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/navigation.ts\nconst TRIVIA_KINDS = /* @__PURE__ */ new Set([\n\t\"Whitespace\",\n\t\"Newline\",\n\t\"Comment\"\n]);\n/** Whether a token kind is trivia (whitespace, newline, or comment). */\nfunction isTriviaKind(kind) {\n\treturn TRIVIA_KINDS.has(kind);\n}\n/** Whether a token is trivia. */\nfunction isTrivia(token) {\n\treturn isTriviaKind(token.kind);\n}\n/**\n* The first non-trivia token at or beyond `token` in `direction`. Returns\n* `token` itself when it is already significant.\n*/\nfunction skipTriviaToken(token, direction) {\n\tlet current = token;\n\twhile (current !== void 0 && isTrivia(current)) current = direction === \"next\" ? current.nextToken : current.prevToken;\n\treturn current;\n}\n/**\n* The nearest sibling of `element` (within the same parent) in `direction` that\n* is not a trivia token. Nodes are always significant.\n*/\nfunction nonTriviaSibling(element, direction) {\n\tlet sibling = step(element, direction);\n\twhile (sibling !== void 0) {\n\t\tif (!(sibling instanceof SyntaxToken) || !isTrivia(sibling)) return sibling;\n\t\tsibling = step(sibling, direction);\n\t}\n}\nfunction step(element, direction) {\n\treturn direction === \"next\" ? element.nextSiblingOrToken : element.prevSiblingOrToken;\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\t/**\n\t* The list/field axis: a `?` after `]` (list nullable) or, when this is not a\n\t* list, the sole field-level `?`. A `?` before `[` is the element axis and\n\t* does not count here.\n\t*/\n\tisOptional() {\n\t\tconst lbracket = this.lbracket();\n\t\tif (lbracket === void 0) return this.questionMark() !== void 0;\n\t\tconst anchor = this.rbracket() ?? lbracket;\n\t\treturn this.#questionTokens().some((question) => question.index > anchor.index);\n\t}\n\t/** The element axis: a `?` positioned before `[`, meaningful only for lists. */\n\tisElementOptional() {\n\t\tconst lbracket = this.lbracket();\n\t\tif (lbracket === void 0) return false;\n\t\treturn this.#questionTokens().some((question) => question.index < lbracket.index);\n\t}\n\t#questionTokens() {\n\t\tconst result = [];\n\t\tfor (const child of this.syntax.children()) if (!(child instanceof SyntaxNode) && child.kind === \"Question\") result.push(child);\n\t\treturn result;\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) ?? MixinDeclarationAst.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*inclusions() {\n\t\tyield* filterChildren(this.syntax, MixinInclusionAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));\n\t}\n\tdocComment() {\n\t\treturn readDocComment(this.syntax);\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*inclusions() {\n\t\tyield* filterChildren(this.syntax, MixinInclusionAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));\n\t}\n\tdocComment() {\n\t\treturn readDocComment(this.syntax);\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 `view` body. 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*inclusions() {\n\t\tyield* filterChildren(this.syntax, MixinInclusionAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => KeyValuePairAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));\n\t}\n\tdocComment() {\n\t\treturn readDocComment(this.syntax);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"GenericBlockDeclaration\" ? new GenericBlockDeclarationAst(node) : void 0;\n\t}\n};\nvar MixinDeclarationAst = class MixinDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tmixinKeyword() {\n\t\tconst next = this.keyword()?.nextToken;\n\t\tconst token = next === void 0 ? void 0 : skipTriviaToken(next, \"next\");\n\t\treturn token?.kind === \"Ident\" && token.parent === this.syntax ? token : void 0;\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*entries() {\n\t\tyield* filterChildren(this.syntax, KeyValuePairAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, ModelAttributeAst.cast);\n\t}\n\t/** A mixin cannot include a mixin, but the parser still reads an inclusion written in a mixin body, so that it can be reported as an error at that inclusion. */\n\t*inclusions() {\n\t\tyield* filterChildren(this.syntax, MixinInclusionAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? KeyValuePairAst.cast(node) ?? ModelAttributeAst.cast(node) ?? MixinInclusionAst.cast(node));\n\t}\n\tdocComment() {\n\t\treturn readDocComment(this.syntax);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"MixinDeclaration\" ? new MixinDeclarationAst(node) : void 0;\n\t}\n};\nvar MixinInclusionAst = class MixinInclusionAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tplus() {\n\t\treturn findChildToken(this.syntax, \"Plus\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"MixinInclusion\" ? new MixinInclusionAst(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, as in `USER @map(\"user\")`. */\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\tdocComment() {\n\t\treturn readDocComment(this.syntax);\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\tdocComment() {\n\t\treturn readDocComment(this.syntax);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"NamedTypeDeclaration\" ? new NamedTypeDeclarationAst(node) : void 0;\n\t}\n};\n//#endregion\nexport { AttributeArgListAst as _, KeyValuePairAst as a, ModelDeclarationAst as c, TypesBlockAst as d, TypeAnnotationAst as f, skipTriviaToken as g, nonTriviaSibling as h, GenericBlockDeclarationAst as i, NamedTypeDeclarationAst as l, isTriviaKind as m, DocumentAst as n, MixinDeclarationAst as o, isTrivia as p, FieldDeclarationAst as r, MixinInclusionAst as s, CompositeTypeDeclarationAst as t, NamespaceDeclarationAst as u, FieldAttributeAst as v, ModelAttributeAst as y };\n\n//# sourceMappingURL=declarations-BgUAq1RG.mjs.map"],"mappings":";;AAEA,IAAI,sBAAsB,MAAM,oBAAoB;CACnD;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;CACA,SAAS;EACR,OAAO,eAAe,KAAK,QAAQ,QAAQ;CAC5C;CACA,SAAS;EACR,OAAO,eAAe,KAAK,QAAQ,QAAQ;CAC5C;CACA,CAAC,OAAO;EACP,OAAO,eAAe,KAAK,QAAQ,gBAAgB,IAAI;CACxD;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK,SAAS,qBAAqB,IAAI,oBAAoB,IAAI,IAAI,KAAK;CAChF;AACD;AACA,IAAI,oBAAoB,MAAM,kBAAkB;CAC/C;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;CACA,KAAK;EACJ,OAAO,eAAe,KAAK,QAAQ,IAAI;CACxC;CACA,OAAO;EACN,OAAO,eAAe,KAAK,QAAQ,iBAAiB,IAAI;CACzD;CACA,UAAU;EACT,OAAO,eAAe,KAAK,QAAQ,oBAAoB,IAAI;CAC5D;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK,SAAS,mBAAmB,IAAI,kBAAkB,IAAI,IAAI,KAAK;CAC5E;AACD;AACA,IAAI,oBAAoB,MAAM,kBAAkB;CAC/C;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;CACA,WAAW;EACV,OAAO,eAAe,KAAK,QAAQ,UAAU;CAC9C;CACA,OAAO;EACN,OAAO,eAAe,KAAK,QAAQ,iBAAiB,IAAI;CACzD;CACA,UAAU;EACT,OAAO,eAAe,KAAK,QAAQ,oBAAoB,IAAI;CAC5D;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK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K;IACjC,IAAI,MAAM,OAAO;GAClB;EACD;CACD;;CAEA,CAAC,aAAa;EACb,OAAO,eAAe,KAAK,QAAQ,kBAAkB,IAAI;CAC1D;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK,SAAS,iBAAiB,IAAI,gBAAgB,IAAI,IAAI,KAAK;CACxE;AACD;AACA,IAAI,sBAAsB,MAAM,oBAAoB;CACnD;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;CACA,OAAO;EACN,OAAO,eAAe,KAAK,QAAQ,cAAc,IAAI;CACtD;CACA,iBAAiB;EAChB,OAAO,eAAe,KAAK,QAAQ,kBAAkB,IAAI;CAC1D;CACA,CAAC,aAAa;EACb,OAAO,eAAe,KAAK,QAAQ,kBAAkB,IAAI;CAC1D;CACA,aAAa;EACZ,OAAO,eAAe,KAAK,MAAM;CAClC;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK,SAAS,qBAAqB,IAAI,oBAAoB,IAAI,IAAI,KAAK;CAChF;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,aAAa;EACZ,OAAO,eAAe,KAAK,MAAM;CAClC;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK,SAAS,yBAAyB,IAAI,wBAAwB,IAAI,IAAI,KAAK;CACxF;AACD"}
@@ -1,4 +1,4 @@
1
- import { o as structuredError } from "./structured-error-CgiSMpdU.mjs";
1
+ import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
2
2
  //#region ../../../1-framework/0-foundation/contract/dist/default-namespace-D4vCwkXg.mjs
3
3
  function contractError(code, message, options) {
4
4
  return structuredError(code, message, options);
@@ -36,4 +36,4 @@ function soleDomainNamespaceId(domain) {
36
36
  //#endregion
37
37
  export { contractError as n, soleDomainNamespaceId as r, UNBOUND_DOMAIN_NAMESPACE_ID as t };
38
38
 
39
- //# sourceMappingURL=default-namespace-D4vCwkXg-lzVN7gSc.mjs.map
39
+ //# sourceMappingURL=default-namespace-D4vCwkXg-BEZbN38y.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-namespace-D4vCwkXg-lzVN7gSc.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/default-namespace-D4vCwkXg.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\n//#region src/contract-errors.ts\nfunction contractError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/default-namespace.ts\n/**\n* Reserved sentinel domain namespace id for the late-bound application-domain\n* slot — the namespace a model lands in when it is authored without an explicit\n* namespace. This is target-agnostic: targets that allow un-namespaced\n* authoring (e.g. Mongo, SQLite) declare this id as their default on the target\n* descriptor; the framework names the sentinel, never a target. Mirrors\n* storage's `UNBOUND_NAMESPACE_ID` on the domain plane.\n*/\nconst UNBOUND_DOMAIN_NAMESPACE_ID = \"__unbound__\";\n/**\n* Resolve the single domain namespace of a single-namespace contract.\n*\n* Bare-name access (`db.User`) reads \"the contract's one namespace\". Every\n* contract in scope today declares exactly one domain namespace, so this is\n* exact — there is nothing to infer. A contract that declares more than one\n* namespace is ambiguous for a bare name, so rather than silently pick one this\n* throws; cross-namespace selection is made explicit (TML-2550).\n*/\nfunction soleDomainNamespaceId(domain) {\n\tconst [soleNamespaceId, ...rest] = Object.keys(domain.namespaces);\n\tif (soleNamespaceId === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", \"domain has no namespaces\", { meta: { reason: \"no-domain-namespaces\" } });\n\tif (rest.length > 0) {\n\t\tconst all = [soleNamespaceId, ...rest];\n\t\tthrow contractError(\"CONTRACT.NAMESPACE_INVALID\", `bare-name resolution requires exactly one domain namespace, found ${all.length} (${all.join(\", \")}); select a namespace explicitly`, { meta: {\n\t\t\treason: \"multiple-domain-namespaces\",\n\t\t\tnamespaceIds: all\n\t\t} });\n\t}\n\treturn soleNamespaceId;\n}\n//#endregion\nexport { soleDomainNamespaceId as n, contractError as r, UNBOUND_DOMAIN_NAMESPACE_ID as t };\n\n//# sourceMappingURL=default-namespace-D4vCwkXg.mjs.map"],"mappings":";;AAEA,SAAS,cAAc,MAAM,SAAS,SAAS;CAC9C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;;;;;;;;;AAWA,MAAM,8BAA8B;;;;;;;;;;AAUpC,SAAS,sBAAsB,QAAQ;CACtC,MAAM,CAAC,iBAAiB,GAAG,QAAQ,OAAO,KAAK,OAAO,UAAU;CAChE,IAAI,oBAAoB,KAAK,GAAG,MAAM,cAAc,8BAA8B,4BAA4B,EAAE,MAAM,EAAE,QAAQ,uBAAuB,EAAE,CAAC;CAC1J,IAAI,KAAK,SAAS,GAAG;EACpB,MAAM,MAAM,CAAC,iBAAiB,GAAG,IAAI;EACrC,MAAM,cAAc,8BAA8B,qEAAqE,IAAI,OAAO,IAAI,IAAI,KAAK,IAAI,EAAE,mCAAmC,EAAE,MAAM;GAC/L,QAAQ;GACR,cAAc;EACf,EAAE,CAAC;CACJ;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"default-namespace-D4vCwkXg-BEZbN38y.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/default-namespace-D4vCwkXg.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\n//#region src/contract-errors.ts\nfunction contractError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/default-namespace.ts\n/**\n* Reserved sentinel domain namespace id for the late-bound application-domain\n* slot — the namespace a model lands in when it is authored without an explicit\n* namespace. This is target-agnostic: targets that allow un-namespaced\n* authoring (e.g. Mongo, SQLite) declare this id as their default on the target\n* descriptor; the framework names the sentinel, never a target. Mirrors\n* storage's `UNBOUND_NAMESPACE_ID` on the domain plane.\n*/\nconst UNBOUND_DOMAIN_NAMESPACE_ID = \"__unbound__\";\n/**\n* Resolve the single domain namespace of a single-namespace contract.\n*\n* Bare-name access (`db.User`) reads \"the contract's one namespace\". Every\n* contract in scope today declares exactly one domain namespace, so this is\n* exact — there is nothing to infer. A contract that declares more than one\n* namespace is ambiguous for a bare name, so rather than silently pick one this\n* throws; cross-namespace selection is made explicit (TML-2550).\n*/\nfunction soleDomainNamespaceId(domain) {\n\tconst [soleNamespaceId, ...rest] = Object.keys(domain.namespaces);\n\tif (soleNamespaceId === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", \"domain has no namespaces\", { meta: { reason: \"no-domain-namespaces\" } });\n\tif (rest.length > 0) {\n\t\tconst all = [soleNamespaceId, ...rest];\n\t\tthrow contractError(\"CONTRACT.NAMESPACE_INVALID\", `bare-name resolution requires exactly one domain namespace, found ${all.length} (${all.join(\", \")}); select a namespace explicitly`, { meta: {\n\t\t\treason: \"multiple-domain-namespaces\",\n\t\t\tnamespaceIds: all\n\t\t} });\n\t}\n\treturn soleNamespaceId;\n}\n//#endregion\nexport { soleDomainNamespaceId as n, contractError as r, UNBOUND_DOMAIN_NAMESPACE_ID as t };\n\n//# sourceMappingURL=default-namespace-D4vCwkXg.mjs.map"],"mappings":";;AAEA,SAAS,cAAc,MAAM,SAAS,SAAS;CAC9C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;;;;;;;;;AAWA,MAAM,8BAA8B;;;;;;;;;;AAUpC,SAAS,sBAAsB,QAAQ;CACtC,MAAM,CAAC,iBAAiB,GAAG,QAAQ,OAAO,KAAK,OAAO,UAAU;CAChE,IAAI,oBAAoB,KAAK,GAAG,MAAM,cAAc,8BAA8B,4BAA4B,EAAE,MAAM,EAAE,QAAQ,uBAAuB,EAAE,CAAC;CAC1J,IAAI,KAAK,SAAS,GAAG;EACpB,MAAM,MAAM,CAAC,iBAAiB,GAAG,IAAI;EACrC,MAAM,cAAc,8BAA8B,qEAAqE,IAAI,OAAO,IAAI,IAAI,KAAK,IAAI,EAAE,mCAAmC,EAAE,MAAM;GAC/L,QAAQ;GACR,cAAc;EACf,EAAE,CAAC;CACJ;CACA,OAAO;AACR"}
@@ -1,12 +1,13 @@
1
- import { o as structuredError } from "./structured-error-CgiSMpdU.mjs";
2
- import { t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
1
+ import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
2
+ import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
3
3
  //#region ../../../1-framework/1-core/ts-render/dist/index.mjs
4
4
  /**
5
5
  * Renders a string as a TypeScript source-text literal.
6
6
  *
7
7
  * `JSON.stringify` already escapes quotes, backslashes, and control characters
8
8
  * exactly as TypeScript needs; it leaves U+2028/U+2029 unescaped, which legacy
9
- * parsers treat as line terminators, so those are escaped explicitly.
9
+ * parsers treat as line terminators, and DEL (U+007F), which is invisible, so
10
+ * those are escaped explicitly.
10
11
  *
11
12
  * Used for both value literals (`jsonToTsSource`) and type-level literals /
12
13
  * property keys (the contract emitter), so a physical name that a store admits
@@ -14,23 +15,47 @@ import { t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
14
15
  * way everywhere.
15
16
  */
16
17
  function tsStringLiteral(value) {
17
- return JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
18
+ return JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u007f/g, "\\x7f");
19
+ }
20
+ /**
21
+ * TypeScript source for a string: an untagged template literal when the text holds both quote kinds, so neither quote
22
+ * is escaped; otherwise `tsStringLiteral(text)`. Text holding a control character (below U+0020, or U+007F), U+2028,
23
+ * U+2029 or a lone surrogate is always `tsStringLiteral(text)`.
24
+ */
25
+ function tsQuotedTextSource(text) {
26
+ if (!(text.includes("'") && text.includes("\"")) || needsEscapeSequence(text)) return tsStringLiteral(text);
27
+ return `\`${tsTemplateText(text)}\``;
28
+ }
29
+ /** `text` escaped for the inside of a TypeScript template literal: `\`, a backtick and `${` are escaped; nothing else is. */
30
+ function tsTemplateText(text) {
31
+ return text.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
32
+ }
33
+ function needsEscapeSequence(text) {
34
+ for (const char of text) {
35
+ const code = char.codePointAt(0) ?? 0;
36
+ if (code < 32 || code === 127 || code === 8232 || code === 8233 || code >= 55296 && code <= 57343) return true;
37
+ }
38
+ return false;
18
39
  }
19
40
  /**
20
41
  * Pure JSON-to-TypeScript-source printer.
21
42
  *
22
43
  * This module is the second stage of the codec → TS pipeline:
23
44
  *
24
- * jsValue → codec.encodeJson → JsonValue → jsonToTsSource → TS source text
45
+ * jsValue → codec.toDataTypeValue → JsonValue → jsonToTsSource → TS source text
25
46
  *
26
- * Stage 1 (`codec.encodeJson`) is a codec responsibility — date serialization,
47
+ * Stage 1 (`codec.toDataTypeValue`, whose value holds the stored JSON) is a codec and data type responsibility — date serialization,
27
48
  * opaque domain types (vector, bigint, uuid), JSON canonicalization. Stage 2
28
49
  * (this module) is a pure JSON-to-TS printer that must never grow type-specific
29
50
  * branches.
30
51
  *
31
52
  * To render a non-JSON JS value (Date, Vector, BigInt, Buffer, …), encode it
32
- * through the relevant codec's `encodeJson` first. Adding special cases to
53
+ * through the relevant codec's `toDataTypeValue` first. Adding special cases to
33
54
  * this file is not the answer — that's what codecs are for.
55
+ *
56
+ * The file also exports `tsObjectSource` and `tsArraySource`, the object and
57
+ * array layouts `jsonToTsSource` uses, for callers that render some values
58
+ * themselves.
34
59
  */
35
60
  /**
36
61
  * Render a JSON-compatible value as a TypeScript source-text literal.
@@ -45,23 +70,25 @@ function jsonToTsSource(value) {
45
70
  if (value === null) return "null";
46
71
  if (typeof value === "string") return tsStringLiteral(value);
47
72
  if (typeof value === "number" || typeof value === "boolean") return String(value);
48
- if (Array.isArray(value)) {
49
- if (value.length === 0) return "[]";
50
- const items = value.map((v) => jsonToTsSource(v));
51
- const singleLine = `[${items.join(", ")}]`;
52
- if (singleLine.length <= 80) return singleLine;
53
- return `[\n${items.map((i) => ` ${i}`).join(",\n")},\n]`;
54
- }
55
- if (typeof value === "object") {
56
- const entries = Object.entries(value).filter(([, v]) => v !== void 0);
57
- if (entries.length === 0) return "{}";
58
- const items = entries.map(([k, v]) => `${renderKey(k)}: ${jsonToTsSource(v)}`);
59
- const singleLine = `{ ${items.join(", ")} }`;
60
- if (singleLine.length <= 80) return singleLine;
61
- return `{\n${items.map((i) => ` ${i}`).join(",\n")},\n}`;
62
- }
73
+ if (Array.isArray(value)) return tsArraySource(value.map((v) => jsonToTsSource(v)));
74
+ if (typeof value === "object") return tsObjectSource(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, jsonToTsSource(v)]));
63
75
  throw new InternalError(`jsonToTsSource: unsupported value type "${typeof value}"`);
64
76
  }
77
+ /** An object literal from entries whose values are already TypeScript source, laid out as `jsonToTsSource` lays out objects. */
78
+ function tsObjectSource(entries) {
79
+ if (entries.length === 0) return "{}";
80
+ const items = entries.map(([key, source]) => `${renderKey(key)}: ${source}`);
81
+ const singleLine = `{ ${items.join(", ")} }`;
82
+ if (singleLine.length <= 80 && !singleLine.includes("\n")) return singleLine;
83
+ return `{\n${items.map((i) => ` ${i}`).join(",\n")},\n}`;
84
+ }
85
+ /** An array literal from items that are already TypeScript source, laid out as `jsonToTsSource` lays out arrays. */
86
+ function tsArraySource(items) {
87
+ if (items.length === 0) return "[]";
88
+ const singleLine = `[${items.join(", ")}]`;
89
+ if (singleLine.length <= 80 && !singleLine.includes("\n")) return singleLine;
90
+ return `[\n${items.map((i) => ` ${i}`).join(",\n")},\n]`;
91
+ }
65
92
  function renderKey(key) {
66
93
  if (key === "__proto__") return tsStringLiteral(key);
67
94
  return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key) ? key : tsStringLiteral(key);
@@ -247,6 +274,6 @@ function buildAttributesClause(attrs) {
247
274
  */
248
275
  var TsExpression = class {};
249
276
  //#endregion
250
- export { tsStringLiteral as i, jsonToTsSource as n, renderImports as r, TsExpression as t };
277
+ export { tsObjectSource as a, tsTemplateText as c, tsArraySource as i, jsonToTsSource as n, tsQuotedTextSource as o, renderImports as r, tsStringLiteral as s, TsExpression as t };
251
278
 
252
- //# sourceMappingURL=dist-Dqbo77p7.mjs.map
279
+ //# sourceMappingURL=dist-D1f6xr7F.mjs.map