@gyral/core 0.2.0 → 0.3.1

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 (517) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/NOTICE +19 -0
  3. package/README.md +35 -8
  4. package/dist/call.d.ts +32 -0
  5. package/dist/call.js +63 -0
  6. package/dist/call.js.map +1 -0
  7. package/dist/children.d.ts +30 -5
  8. package/dist/children.js +26 -4
  9. package/dist/children.js.map +1 -1
  10. package/dist/cli/gyral-types.d.ts +2 -0
  11. package/dist/cli/gyral-types.js +23 -0
  12. package/dist/cli/gyral-types.js.map +1 -0
  13. package/dist/command.d.ts +54 -12
  14. package/dist/command.js +31 -11
  15. package/dist/command.js.map +1 -1
  16. package/dist/compiler/ast.d.ts +23 -0
  17. package/dist/compiler/ast.js +149 -0
  18. package/dist/compiler/ast.js.map +1 -0
  19. package/dist/compiler/compile.d.ts +41 -0
  20. package/dist/compiler/compile.js +148 -0
  21. package/dist/compiler/compile.js.map +1 -0
  22. package/dist/compiler/component-entries.d.ts +7 -0
  23. package/dist/compiler/component-entries.js +42 -0
  24. package/dist/compiler/component-entries.js.map +1 -0
  25. package/dist/compiler/components.d.ts +4 -0
  26. package/dist/compiler/components.js +182 -0
  27. package/dist/compiler/components.js.map +1 -0
  28. package/dist/compiler/facts.d.ts +31 -0
  29. package/dist/compiler/facts.js +285 -0
  30. package/dist/compiler/facts.js.map +1 -0
  31. package/dist/compiler/features.d.ts +34 -0
  32. package/dist/compiler/features.js +158 -0
  33. package/dist/compiler/features.js.map +1 -0
  34. package/dist/compiler/hooks.d.ts +22 -0
  35. package/dist/compiler/hooks.js +241 -0
  36. package/dist/compiler/hooks.js.map +1 -0
  37. package/dist/compiler/loader-source.d.ts +14 -0
  38. package/dist/compiler/loader-source.js +86 -0
  39. package/dist/compiler/loader-source.js.map +1 -0
  40. package/dist/compiler/locate.d.ts +14 -0
  41. package/dist/compiler/locate.js +78 -0
  42. package/dist/compiler/locate.js.map +1 -0
  43. package/dist/compiler/parse5-check.d.ts +21 -0
  44. package/dist/compiler/parse5-check.js +60 -0
  45. package/dist/compiler/parse5-check.js.map +1 -0
  46. package/dist/compiler/prop-schemas.d.ts +4 -0
  47. package/dist/compiler/prop-schemas.js +108 -0
  48. package/dist/compiler/prop-schemas.js.map +1 -0
  49. package/dist/compiler/scan.d.ts +41 -0
  50. package/dist/compiler/scan.js +160 -0
  51. package/dist/compiler/scan.js.map +1 -0
  52. package/dist/compiler/scope.d.ts +8 -0
  53. package/dist/compiler/scope.js +116 -0
  54. package/dist/compiler/scope.js.map +1 -0
  55. package/dist/compiler/source.d.ts +34 -0
  56. package/dist/compiler/source.js +114 -0
  57. package/dist/compiler/source.js.map +1 -0
  58. package/dist/compiler/tag-map.d.ts +41 -0
  59. package/dist/compiler/tag-map.js +126 -0
  60. package/dist/compiler/tag-map.js.map +1 -0
  61. package/dist/components-ready.d.ts +7 -0
  62. package/dist/components-ready.js +19 -0
  63. package/dist/components-ready.js.map +1 -0
  64. package/dist/define.d.ts +13 -4
  65. package/dist/define.js +35 -331
  66. package/dist/define.js.map +1 -1
  67. package/dist/devtools-events.d.ts +13 -0
  68. package/dist/devtools-events.js.map +1 -1
  69. package/dist/devtools-off.d.ts +2 -0
  70. package/dist/devtools-off.js +2 -0
  71. package/dist/devtools-off.js.map +1 -1
  72. package/dist/devtools.d.ts +4 -0
  73. package/dist/devtools.js +17 -2
  74. package/dist/devtools.js.map +1 -1
  75. package/dist/drivers-scope.d.ts +1 -1
  76. package/dist/drivers-scope.js +1 -8
  77. package/dist/drivers-scope.js.map +1 -1
  78. package/dist/element-internals.d.ts +1 -0
  79. package/dist/element-internals.js +11 -0
  80. package/dist/element-internals.js.map +1 -0
  81. package/dist/element-types.d.ts +11 -5
  82. package/dist/element-types.js.map +1 -1
  83. package/dist/element.d.ts +3 -0
  84. package/dist/element.js +322 -0
  85. package/dist/element.js.map +1 -0
  86. package/dist/error-view.d.ts +10 -0
  87. package/dist/error-view.js +30 -0
  88. package/dist/error-view.js.map +1 -0
  89. package/dist/errors.d.ts +21 -0
  90. package/dist/errors.js +47 -0
  91. package/dist/errors.js.map +1 -0
  92. package/dist/errors.json +289 -0
  93. package/dist/eslint/imports.d.ts +26 -0
  94. package/dist/eslint/imports.js +78 -0
  95. package/dist/eslint/imports.js.map +1 -0
  96. package/dist/eslint/index.d.ts +16 -0
  97. package/dist/eslint/index.js +23 -0
  98. package/dist/eslint/index.js.map +1 -0
  99. package/dist/eslint/locate.d.ts +33 -0
  100. package/dist/eslint/locate.js +132 -0
  101. package/dist/eslint/locate.js.map +1 -0
  102. package/dist/eslint/row-purity-rule.d.ts +2 -0
  103. package/dist/eslint/row-purity-rule.js +103 -0
  104. package/dist/eslint/row-purity-rule.js.map +1 -0
  105. package/dist/eslint/template-rule.d.ts +6 -0
  106. package/dist/eslint/template-rule.js +76 -0
  107. package/dist/eslint/template-rule.js.map +1 -0
  108. package/dist/eslint/unused-intent-rule.d.ts +2 -0
  109. package/dist/eslint/unused-intent-rule.js +186 -0
  110. package/dist/eslint/unused-intent-rule.js.map +1 -0
  111. package/dist/features.d.ts +39 -0
  112. package/dist/features.js +2 -0
  113. package/dist/features.js.map +1 -0
  114. package/dist/focus.d.ts +13 -12
  115. package/dist/focus.js +44 -11
  116. package/dist/focus.js.map +1 -1
  117. package/dist/form-associated.d.ts +46 -0
  118. package/dist/form-associated.js +77 -0
  119. package/dist/form-associated.js.map +1 -0
  120. package/dist/forms.d.ts +42 -30
  121. package/dist/forms.js +85 -41
  122. package/dist/forms.js.map +1 -1
  123. package/dist/frame-lane.d.ts +11 -0
  124. package/dist/frame-lane.js +28 -0
  125. package/dist/frame-lane.js.map +1 -0
  126. package/dist/head.d.ts +61 -0
  127. package/dist/head.js +85 -0
  128. package/dist/head.js.map +1 -0
  129. package/dist/hooks/invalid.d.ts +14 -0
  130. package/dist/hooks/invalid.js +72 -0
  131. package/dist/hooks/invalid.js.map +1 -0
  132. package/dist/host-model.d.ts +77 -0
  133. package/dist/host-model.js +278 -0
  134. package/dist/host-model.js.map +1 -0
  135. package/dist/hydration-client.d.ts +9 -0
  136. package/dist/hydration-client.js +35 -0
  137. package/dist/hydration-client.js.map +1 -0
  138. package/dist/hydration-loader.d.ts +13 -0
  139. package/dist/hydration-loader.js +58 -0
  140. package/dist/hydration-loader.js.map +1 -0
  141. package/dist/hydration-off.d.ts +8 -0
  142. package/dist/hydration-off.js +25 -0
  143. package/dist/hydration-off.js.map +1 -0
  144. package/dist/hydration.d.ts +3 -21
  145. package/dist/hydration.js +14 -63
  146. package/dist/hydration.js.map +1 -1
  147. package/dist/index.d.ts +24 -36
  148. package/dist/index.js +14 -32
  149. package/dist/index.js.map +1 -1
  150. package/dist/indexeddb-types.d.ts +97 -0
  151. package/dist/indexeddb-types.js +2 -0
  152. package/dist/indexeddb-types.js.map +1 -0
  153. package/dist/indexeddb.d.ts +5 -0
  154. package/dist/indexeddb.js +118 -0
  155. package/dist/indexeddb.js.map +1 -0
  156. package/dist/intent.d.ts +62 -17
  157. package/dist/intent.js +193 -100
  158. package/dist/intent.js.map +1 -1
  159. package/dist/internal/indexeddb-open.d.ts +8 -0
  160. package/dist/internal/indexeddb-open.js +96 -0
  161. package/dist/internal/indexeddb-open.js.map +1 -0
  162. package/dist/internal/indexeddb-transaction.d.ts +4 -0
  163. package/dist/internal/indexeddb-transaction.js +134 -0
  164. package/dist/internal/indexeddb-transaction.js.map +1 -0
  165. package/dist/internal/interpreter.d.ts +15 -1
  166. package/dist/internal/interpreter.js +42 -47
  167. package/dist/internal/interpreter.js.map +1 -1
  168. package/dist/internal/token.d.ts +1 -0
  169. package/dist/internal/token.js +7 -0
  170. package/dist/internal/token.js.map +1 -0
  171. package/dist/internal.d.ts +20 -0
  172. package/dist/internal.js +22 -0
  173. package/dist/internal.js.map +1 -0
  174. package/dist/invoker-fallback-used.d.ts +4 -0
  175. package/dist/invoker-fallback-used.js +10 -0
  176. package/dist/invoker-fallback-used.js.map +1 -0
  177. package/dist/invoker-fallback.d.ts +4 -0
  178. package/dist/invoker-fallback.js +15 -0
  179. package/dist/invoker-fallback.js.map +1 -0
  180. package/dist/invokers-shim.d.ts +6 -0
  181. package/dist/invokers-shim.js +32 -0
  182. package/dist/invokers-shim.js.map +1 -0
  183. package/dist/invokers.d.ts +3 -5
  184. package/dist/invokers.js +11 -51
  185. package/dist/invokers.js.map +1 -1
  186. package/dist/islands.d.ts +0 -2
  187. package/dist/islands.js +4 -11
  188. package/dist/islands.js.map +1 -1
  189. package/dist/light-dom.d.ts +4 -53
  190. package/dist/light-dom.js +5 -100
  191. package/dist/light-dom.js.map +1 -1
  192. package/dist/prop.d.ts +89 -0
  193. package/dist/prop.js +41 -0
  194. package/dist/prop.js.map +1 -0
  195. package/dist/props.d.ts +57 -21
  196. package/dist/props.js +157 -34
  197. package/dist/props.js.map +1 -1
  198. package/dist/retry.d.ts +15 -0
  199. package/dist/retry.js +48 -0
  200. package/dist/retry.js.map +1 -0
  201. package/dist/scheduler.d.ts +43 -0
  202. package/dist/scheduler.js +212 -0
  203. package/dist/scheduler.js.map +1 -0
  204. package/dist/script-json.d.ts +2 -0
  205. package/dist/script-json.js +13 -0
  206. package/dist/script-json.js.map +1 -0
  207. package/dist/server-component.d.ts +10 -0
  208. package/dist/server-component.js +133 -0
  209. package/dist/server-component.js.map +1 -0
  210. package/dist/server-specs.d.ts +6 -0
  211. package/dist/server-specs.js +13 -0
  212. package/dist/server-specs.js.map +1 -0
  213. package/dist/server.d.ts +34 -0
  214. package/dist/server.js +59 -0
  215. package/dist/server.js.map +1 -0
  216. package/dist/settled.d.ts +11 -0
  217. package/dist/settled.js +62 -0
  218. package/dist/settled.js.map +1 -0
  219. package/dist/spec-features-used.d.ts +21 -0
  220. package/dist/spec-features-used.js +50 -0
  221. package/dist/spec-features-used.js.map +1 -0
  222. package/dist/spec-features.d.ts +28 -0
  223. package/dist/spec-features.js +42 -0
  224. package/dist/spec-features.js.map +1 -0
  225. package/dist/states.d.ts +3 -5
  226. package/dist/states.js +22 -11
  227. package/dist/states.js.map +1 -1
  228. package/dist/storage.d.ts +69 -0
  229. package/dist/storage.js +158 -0
  230. package/dist/storage.js.map +1 -0
  231. package/dist/store-binding.d.ts +6 -3
  232. package/dist/store-binding.js +7 -8
  233. package/dist/store-binding.js.map +1 -1
  234. package/dist/store-scope.d.ts +8 -11
  235. package/dist/store-scope.js +15 -40
  236. package/dist/store-scope.js.map +1 -1
  237. package/dist/store.d.ts +3 -0
  238. package/dist/store.js +45 -10
  239. package/dist/store.js.map +1 -1
  240. package/dist/stores-provider.d.ts +2 -6
  241. package/dist/stores-provider.js +21 -55
  242. package/dist/stores-provider.js.map +1 -1
  243. package/dist/subscription.d.ts +35 -0
  244. package/dist/subscription.js +74 -0
  245. package/dist/subscription.js.map +1 -0
  246. package/dist/subscriptions.d.ts +26 -0
  247. package/dist/subscriptions.js +98 -0
  248. package/dist/subscriptions.js.map +1 -0
  249. package/dist/transitions.d.ts +5 -7
  250. package/dist/transitions.js +17 -20
  251. package/dist/transitions.js.map +1 -1
  252. package/dist/types.d.ts +142 -49
  253. package/dist/types.js.map +1 -1
  254. package/dist/use-dialogs.d.ts +2 -0
  255. package/dist/use-dialogs.js +9 -0
  256. package/dist/use-dialogs.js.map +1 -0
  257. package/dist/use-disposal.d.ts +2 -0
  258. package/dist/use-disposal.js +9 -0
  259. package/dist/use-disposal.js.map +1 -0
  260. package/dist/use-error-view.d.ts +2 -0
  261. package/dist/use-error-view.js +9 -0
  262. package/dist/use-error-view.js.map +1 -0
  263. package/dist/use-errored.d.ts +2 -0
  264. package/dist/use-errored.js +9 -0
  265. package/dist/use-errored.js.map +1 -0
  266. package/dist/use-form-associated.d.ts +2 -0
  267. package/dist/use-form-associated.js +7 -0
  268. package/dist/use-form-associated.js.map +1 -0
  269. package/dist/use-frame-lane.d.ts +2 -0
  270. package/dist/use-frame-lane.js +10 -0
  271. package/dist/use-frame-lane.js.map +1 -0
  272. package/dist/use-invokers.d.ts +2 -0
  273. package/dist/use-invokers.js +10 -0
  274. package/dist/use-invokers.js.map +1 -0
  275. package/dist/use-states.d.ts +2 -0
  276. package/dist/use-states.js +10 -0
  277. package/dist/use-states.js.map +1 -0
  278. package/dist/use-subscriptions.d.ts +2 -0
  279. package/dist/use-subscriptions.js +10 -0
  280. package/dist/use-subscriptions.js.map +1 -0
  281. package/dist/use-transitions.d.ts +2 -0
  282. package/dist/use-transitions.js +10 -0
  283. package/dist/use-transitions.js.map +1 -0
  284. package/dist/view/attributes.d.ts +11 -0
  285. package/dist/view/attributes.js +15 -0
  286. package/dist/view/attributes.js.map +1 -0
  287. package/dist/view/compiled.d.ts +1 -0
  288. package/dist/view/compiled.js +6 -0
  289. package/dist/view/compiled.js.map +1 -0
  290. package/dist/view/dev-off.d.ts +1 -0
  291. package/dist/view/dev-off.js +4 -0
  292. package/dist/view/dev-off.js.map +1 -0
  293. package/dist/view/dev.d.ts +1 -0
  294. package/dist/view/dev.js +5 -0
  295. package/dist/view/dev.js.map +1 -0
  296. package/dist/view/flags.d.ts +1 -0
  297. package/dist/view/flags.js +4 -0
  298. package/dist/view/flags.js.map +1 -0
  299. package/dist/view/index.d.ts +26 -0
  300. package/dist/view/index.js +27 -0
  301. package/dist/view/index.js.map +1 -0
  302. package/dist/view/loc.d.ts +9 -0
  303. package/dist/view/loc.js +50 -0
  304. package/dist/view/loc.js.map +1 -0
  305. package/dist/view/message.d.ts +17 -0
  306. package/dist/view/message.js +40 -0
  307. package/dist/view/message.js.map +1 -0
  308. package/dist/view/messages.d.ts +43 -0
  309. package/dist/view/messages.js +84 -0
  310. package/dist/view/messages.js.map +1 -0
  311. package/dist/view/normalize/check.d.ts +23 -0
  312. package/dist/view/normalize/check.js +81 -0
  313. package/dist/view/normalize/check.js.map +1 -0
  314. package/dist/view/normalize/emit.d.ts +15 -0
  315. package/dist/view/normalize/emit.js +165 -0
  316. package/dist/view/normalize/emit.js.map +1 -0
  317. package/dist/view/normalize/entities.d.ts +4 -0
  318. package/dist/view/normalize/entities.js +38 -0
  319. package/dist/view/normalize/entities.js.map +1 -0
  320. package/dist/view/normalize/errors.d.ts +9 -0
  321. package/dist/view/normalize/errors.js +19 -0
  322. package/dist/view/normalize/errors.js.map +1 -0
  323. package/dist/view/normalize/id.d.ts +10 -0
  324. package/dist/view/normalize/id.js +55 -0
  325. package/dist/view/normalize/id.js.map +1 -0
  326. package/dist/view/normalize/normalize.d.ts +18 -0
  327. package/dist/view/normalize/normalize.js +42 -0
  328. package/dist/view/normalize/normalize.js.map +1 -0
  329. package/dist/view/normalize/repairs.d.ts +24 -0
  330. package/dist/view/normalize/repairs.js +166 -0
  331. package/dist/view/normalize/repairs.js.map +1 -0
  332. package/dist/view/normalize/rules.d.ts +39 -0
  333. package/dist/view/normalize/rules.js +120 -0
  334. package/dist/view/normalize/rules.js.map +1 -0
  335. package/dist/view/normalize/shape.d.ts +5 -0
  336. package/dist/view/normalize/shape.js +38 -0
  337. package/dist/view/normalize/shape.js.map +1 -0
  338. package/dist/view/normalize/source.d.ts +13 -0
  339. package/dist/view/normalize/source.js +34 -0
  340. package/dist/view/normalize/source.js.map +1 -0
  341. package/dist/view/normalize/svg.d.ts +14 -0
  342. package/dist/view/normalize/svg.js +40 -0
  343. package/dist/view/normalize/svg.js.map +1 -0
  344. package/dist/view/normalize/tag-states.d.ts +23 -0
  345. package/dist/view/normalize/tag-states.js +192 -0
  346. package/dist/view/normalize/tag-states.js.map +1 -0
  347. package/dist/view/normalize/tokenizer.d.ts +5 -0
  348. package/dist/view/normalize/tokenizer.js +233 -0
  349. package/dist/view/normalize/tokenizer.js.map +1 -0
  350. package/dist/view/normalize/tokens.d.ts +55 -0
  351. package/dist/view/normalize/tokens.js +24 -0
  352. package/dist/view/normalize/tokens.js.map +1 -0
  353. package/dist/view/normalize/tree.d.ts +65 -0
  354. package/dist/view/normalize/tree.js +235 -0
  355. package/dist/view/normalize/tree.js.map +1 -0
  356. package/dist/view/normalize/types.d.ts +146 -0
  357. package/dist/view/normalize/types.js +29 -0
  358. package/dist/view/normalize/types.js.map +1 -0
  359. package/dist/view/normalize/whitespace.d.ts +2 -0
  360. package/dist/{template-whitespace.js → view/normalize/whitespace.js} +27 -36
  361. package/dist/view/normalize/whitespace.js.map +1 -0
  362. package/dist/view/prepare-stub.d.ts +3 -0
  363. package/dist/view/prepare-stub.js +7 -0
  364. package/dist/view/prepare-stub.js.map +1 -0
  365. package/dist/view/prepare.d.ts +11 -0
  366. package/dist/view/prepare.js +63 -0
  367. package/dist/view/prepare.js.map +1 -0
  368. package/dist/view/registry.d.ts +78 -0
  369. package/dist/view/registry.js +27 -0
  370. package/dist/view/registry.js.map +1 -0
  371. package/dist/view/render/adopt-attr.d.ts +14 -0
  372. package/dist/view/render/adopt-attr.js +83 -0
  373. package/dist/view/render/adopt-attr.js.map +1 -0
  374. package/dist/view/render/adopt-plan.d.ts +10 -0
  375. package/dist/view/render/adopt-plan.js +26 -0
  376. package/dist/view/render/adopt-plan.js.map +1 -0
  377. package/dist/view/render/adopt.d.ts +3 -0
  378. package/dist/view/render/adopt.js +286 -0
  379. package/dist/view/render/adopt.js.map +1 -0
  380. package/dist/view/render/attr-parts.d.ts +72 -0
  381. package/dist/view/render/attr-parts.js +262 -0
  382. package/dist/view/render/attr-parts.js.map +1 -0
  383. package/dist/view/render/child-part.d.ts +51 -0
  384. package/dist/view/render/child-part.js +173 -0
  385. package/dist/view/render/child-part.js.map +1 -0
  386. package/dist/view/render/dev-check.d.ts +12 -0
  387. package/dist/view/render/dev-check.js +122 -0
  388. package/dist/view/render/dev-check.js.map +1 -0
  389. package/dist/view/render/dispose.d.ts +3 -0
  390. package/dist/view/render/dispose.js +76 -0
  391. package/dist/view/render/dispose.js.map +1 -0
  392. package/dist/view/render/hook-part.d.ts +5 -0
  393. package/dist/view/render/hook-part.js +36 -0
  394. package/dist/view/render/hook-part.js.map +1 -0
  395. package/dist/view/render/hook-run.d.ts +2 -0
  396. package/dist/view/render/hook-run.js +72 -0
  397. package/dist/view/render/hook-run.js.map +1 -0
  398. package/dist/view/render/hooks.d.ts +108 -0
  399. package/dist/view/render/hooks.js +108 -0
  400. package/dist/view/render/hooks.js.map +1 -0
  401. package/dist/view/render/hydrate.d.ts +10 -0
  402. package/dist/view/render/hydrate.js +33 -0
  403. package/dist/view/render/hydrate.js.map +1 -0
  404. package/dist/view/render/instance.d.ts +33 -0
  405. package/dist/view/render/instance.js +107 -0
  406. package/dist/view/render/instance.js.map +1 -0
  407. package/dist/view/render/keyed.d.ts +6 -0
  408. package/dist/view/render/keyed.js +15 -0
  409. package/dist/view/render/keyed.js.map +1 -0
  410. package/dist/view/render/list.d.ts +20 -0
  411. package/dist/view/render/list.js +156 -0
  412. package/dist/view/render/list.js.map +1 -0
  413. package/dist/view/render/mismatch.d.ts +10 -0
  414. package/dist/view/render/mismatch.js +55 -0
  415. package/dist/view/render/mismatch.js.map +1 -0
  416. package/dist/view/render/modal.d.ts +3 -0
  417. package/dist/view/render/modal.js +39 -0
  418. package/dist/view/render/modal.js.map +1 -0
  419. package/dist/view/render/nodes.d.ts +10 -0
  420. package/dist/view/render/nodes.js +37 -0
  421. package/dist/view/render/nodes.js.map +1 -0
  422. package/dist/view/render/place.d.ts +18 -0
  423. package/dist/view/render/place.js +69 -0
  424. package/dist/view/render/place.js.map +1 -0
  425. package/dist/view/render/plan.d.ts +26 -0
  426. package/dist/view/render/plan.js +124 -0
  427. package/dist/view/render/plan.js.map +1 -0
  428. package/dist/view/render/raw.d.ts +21 -0
  429. package/dist/view/render/raw.js +72 -0
  430. package/dist/view/render/raw.js.map +1 -0
  431. package/dist/view/render/render.d.ts +15 -0
  432. package/dist/view/render/render.js +65 -0
  433. package/dist/view/render/render.js.map +1 -0
  434. package/dist/view/render/reorder.d.ts +4 -0
  435. package/dist/view/render/reorder.js +101 -0
  436. package/dist/view/render/reorder.js.map +1 -0
  437. package/dist/view/render/rows.d.ts +23 -0
  438. package/dist/view/render/rows.js +95 -0
  439. package/dist/view/render/rows.js.map +1 -0
  440. package/dist/view/render/seen.d.ts +11 -0
  441. package/dist/view/render/seen.js +17 -0
  442. package/dist/view/render/seen.js.map +1 -0
  443. package/dist/view/render/toggles.d.ts +6 -0
  444. package/dist/view/render/toggles.js +6 -0
  445. package/dist/view/render/toggles.js.map +1 -0
  446. package/dist/view/render/values.d.ts +29 -0
  447. package/dist/view/render/values.js +13 -0
  448. package/dist/view/render/values.js.map +1 -0
  449. package/dist/view/render/warn.d.ts +28 -0
  450. package/dist/view/render/warn.js +114 -0
  451. package/dist/view/render/warn.js.map +1 -0
  452. package/dist/view/server/component.d.ts +12 -0
  453. package/dist/view/server/component.js +64 -0
  454. package/dist/view/server/component.js.map +1 -0
  455. package/dist/view/server/escape.d.ts +10 -0
  456. package/dist/view/server/escape.js +34 -0
  457. package/dist/view/server/escape.js.map +1 -0
  458. package/dist/view/server/index.d.ts +48 -0
  459. package/dist/view/server/index.js +80 -0
  460. package/dist/view/server/index.js.map +1 -0
  461. package/dist/view/server/sha256.d.ts +2 -0
  462. package/dist/view/server/sha256.js +75 -0
  463. package/dist/view/server/sha256.js.map +1 -0
  464. package/dist/view/server/tags.d.ts +68 -0
  465. package/dist/view/server/tags.js +132 -0
  466. package/dist/view/server/tags.js.map +1 -0
  467. package/dist/view/server/values.d.ts +18 -0
  468. package/dist/view/server/values.js +94 -0
  469. package/dist/view/server/values.js.map +1 -0
  470. package/dist/view/server/writer.d.ts +21 -0
  471. package/dist/view/server/writer.js +170 -0
  472. package/dist/view/server/writer.js.map +1 -0
  473. package/dist/view/styles.d.ts +25 -0
  474. package/dist/view/styles.js +58 -0
  475. package/dist/view/styles.js.map +1 -0
  476. package/dist/view/template-element.d.ts +10 -0
  477. package/dist/view/template-element.js +45 -0
  478. package/dist/view/template-element.js.map +1 -0
  479. package/dist/view/template.d.ts +29 -0
  480. package/dist/view/template.js +84 -0
  481. package/dist/view/template.js.map +1 -0
  482. package/dist/view/trusted-html.d.ts +6 -0
  483. package/dist/view/trusted-html.js +34 -0
  484. package/dist/view/trusted-html.js.map +1 -0
  485. package/dist/vite.d.ts +57 -11
  486. package/dist/vite.js +319 -27
  487. package/dist/vite.js.map +1 -1
  488. package/package.json +70 -4
  489. package/dist/accessible-name.d.ts +0 -19
  490. package/dist/accessible-name.js +0 -56
  491. package/dist/accessible-name.js.map +0 -1
  492. package/dist/element-directive.d.ts +0 -20
  493. package/dist/element-directive.js +0 -31
  494. package/dist/element-directive.js.map +0 -1
  495. package/dist/invalid.d.ts +0 -21
  496. package/dist/invalid.js +0 -70
  497. package/dist/invalid.js.map +0 -1
  498. package/dist/lit-html-check.d.ts +0 -6
  499. package/dist/lit-html-check.js +0 -48
  500. package/dist/lit-html-check.js.map +0 -1
  501. package/dist/live-boolean.d.ts +0 -22
  502. package/dist/live-boolean.js +0 -34
  503. package/dist/live-boolean.js.map +0 -1
  504. package/dist/random.d.ts +0 -13
  505. package/dist/random.js +0 -19
  506. package/dist/random.js.map +0 -1
  507. package/dist/styles.d.ts +0 -12
  508. package/dist/styles.js +0 -11
  509. package/dist/styles.js.map +0 -1
  510. package/dist/template-whitespace.d.ts +0 -7
  511. package/dist/template-whitespace.js.map +0 -1
  512. package/dist/templates.d.ts +0 -5
  513. package/dist/templates.js +0 -15
  514. package/dist/templates.js.map +0 -1
  515. package/dist/textarea.d.ts +0 -26
  516. package/dist/textarea.js +0 -85
  517. package/dist/textarea.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-transitions.js","sourceRoot":"","sources":["../src/use-transitions.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,4FAA4F;AAC5F,sBAAsB;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,oFAAoF;AACpF,MAAM,UAAU,QAAQ;IACtB,kBAAkB,CAAC,eAAe,CAAC,CAAC;AACtC,CAAC","sourcesContent":["// Registers startTransition in a compiled build (gyral-c5d.12). Only the module the build adds for a\n// module that names the spec field imports it (compiler/features.ts), so other builds leave\n// transitions.ts out.\nimport { useViewTransitions } from '#spec-features';\nimport { startTransition } from './transitions.js';\n\n/** Called once by the added module, before any module that names the field runs. */\nexport function register(): void {\n useViewTransitions(startTransition);\n}\n"]}
@@ -0,0 +1,11 @@
1
+ /** Host attribute holding a component's JSON seed (ADR 0012); the client removes it. */
2
+ export declare const SEED_ATTRIBUTE = "data-gyral-seed";
3
+ /** Marks a server-rendered light-DOM host (ADR 0014), so hydration knows its own content. */
4
+ export declare const LIGHT_ATTRIBUTE = "data-gyral-light";
5
+ /** A deferred island's strategy (07 "Islands"), next to `defer-hydration`. */
6
+ export declare const ISLAND_ATTRIBUTE = "data-gyral-hydrate";
7
+ /**
8
+ * Marks a host whose `init` or view threw on the server (ADR 0024): it carries its error view
9
+ * (or nothing) and no seed, and the client starts it fresh instead of hydrating.
10
+ */
11
+ export declare const ERROR_ATTRIBUTE = "data-gyral-error";
@@ -0,0 +1,15 @@
1
+ // Host attributes the server renderer writes (view/06-server.md "Components") and the client
2
+ // reads (07). Core's hydration.ts, light-dom.ts and islands.ts declare the same names for the
3
+ // client; server-components.node.test.ts checks that they match.
4
+ /** Host attribute holding a component's JSON seed (ADR 0012); the client removes it. */
5
+ export const SEED_ATTRIBUTE = 'data-gyral-seed';
6
+ /** Marks a server-rendered light-DOM host (ADR 0014), so hydration knows its own content. */
7
+ export const LIGHT_ATTRIBUTE = 'data-gyral-light';
8
+ /** A deferred island's strategy (07 "Islands"), next to `defer-hydration`. */
9
+ export const ISLAND_ATTRIBUTE = 'data-gyral-hydrate';
10
+ /**
11
+ * Marks a host whose `init` or view threw on the server (ADR 0024): it carries its error view
12
+ * (or nothing) and no seed, and the client starts it fresh instead of hydrating.
13
+ */
14
+ export const ERROR_ATTRIBUTE = 'data-gyral-error';
15
+ //# sourceMappingURL=attributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../src/view/attributes.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,8FAA8F;AAC9F,iEAAiE;AACjE,wFAAwF;AACxF,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAChD,6FAA6F;AAC7F,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAClD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AACrD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC","sourcesContent":["// Host attributes the server renderer writes (view/06-server.md \"Components\") and the client\n// reads (07). Core's hydration.ts, light-dom.ts and islands.ts declare the same names for the\n// client; server-components.node.test.ts checks that they match.\n/** Host attribute holding a component's JSON seed (ADR 0012); the client removes it. */\nexport const SEED_ATTRIBUTE = 'data-gyral-seed';\n/** Marks a server-rendered light-DOM host (ADR 0014), so hydration knows its own content. */\nexport const LIGHT_ATTRIBUTE = 'data-gyral-light';\n/** A deferred island's strategy (07 \"Islands\"), next to `defer-hydration`. */\nexport const ISLAND_ATTRIBUTE = 'data-gyral-hydrate';\n/**\n * Marks a host whose `init` or view threw on the server (ADR 0024): it carries its error view\n * (or nothing) and no seed, and the client starts it fresh instead of hydrating.\n */\nexport const ERROR_ATTRIBUTE = 'data-gyral-error';\n"]}
@@ -0,0 +1 @@
1
+ export { compiled, compiledSvg } from './template.js';
@@ -0,0 +1,6 @@
1
+ // `@gyral/core/compiled`: the entry the Vite template compiler's output imports `compiled`
2
+ // from (view/01-templates.md "Compiled"). Internal: apps never import it themselves, and it is
3
+ // not documented as API. A subpath of its own, so the main entry's API stays as documented
4
+ // and compiled code still shares the one template module with `html` (same package copy).
5
+ export { compiled, compiledSvg } from './template.js';
6
+ //# sourceMappingURL=compiled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiled.js","sourceRoot":"","sources":["../../src/view/compiled.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,+FAA+F;AAC/F,2FAA2F;AAC3F,0FAA0F;AAC1F,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["// `@gyral/core/compiled`: the entry the Vite template compiler's output imports `compiled`\n// from (view/01-templates.md \"Compiled\"). Internal: apps never import it themselves, and it is\n// not documented as API. A subpath of its own, so the main entry's API stays as documented\n// and compiled code still shares the one template module with `html` (same package copy).\nexport { compiled, compiledSvg } from './template.js';\n"]}
@@ -0,0 +1 @@
1
+ export declare const DEV: boolean;
@@ -0,0 +1,4 @@
1
+ // Production build of the view layer's flag (`#view-dev` without the `development` condition):
2
+ // a literal `false`, so bundlers drop every `if (DEV)` check and warning. See dev.ts.
3
+ export const DEV = false;
4
+ //# sourceMappingURL=dev-off.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-off.js","sourceRoot":"","sources":["../../src/view/dev-off.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,sFAAsF;AACtF,MAAM,CAAC,MAAM,GAAG,GAAY,KAAK,CAAC","sourcesContent":["// Production build of the view layer's flag (`#view-dev` without the `development` condition):\n// a literal `false`, so bundlers drop every `if (DEV)` check and warning. See dev.ts.\nexport const DEV: boolean = false;\n"]}
@@ -0,0 +1 @@
1
+ export declare const DEV: boolean;
@@ -0,0 +1,5 @@
1
+ // Development build of the view layer's flag, resolved through core's `#view-dev` import with
2
+ // the `development` condition (view/09-template-rules.md "One rule set, three places"). Checks
3
+ // and warnings are guarded with `if (DEV)`; production builds get dev-off.ts, so they vanish.
4
+ export const DEV = true;
5
+ //# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/view/dev.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+FAA+F;AAC/F,8FAA8F;AAC9F,MAAM,CAAC,MAAM,GAAG,GAAY,IAAI,CAAC","sourcesContent":["// Development build of the view layer's flag, resolved through core's `#view-dev` import with\n// the `development` condition (view/09-template-rules.md \"One rule set, three places\"). Checks\n// and warnings are guarded with `if (DEV)`; production builds get dev-off.ts, so they vanish.\nexport const DEV: boolean = true;\n"]}
@@ -0,0 +1 @@
1
+ export { DEV } from '#view-dev';
@@ -0,0 +1,4 @@
1
+ // The development flag for view/ modules that may not use `#` imports themselves (view/server/,
2
+ // ADR 0018 "Where it lives"): core's `#view-dev`, resolved by the `development` condition.
3
+ export { DEV } from '#view-dev';
4
+ //# sourceMappingURL=flags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/view/flags.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,2FAA2F;AAC3F,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// The development flag for view/ modules that may not use `#` imports themselves (view/server/,\n// ADR 0018 \"Where it lives\"): core's `#view-dev`, resolved by the `development` condition.\nexport { DEV } from '#view-dev';\n"]}
@@ -0,0 +1,26 @@
1
+ export { DEV } from '#view-dev';
2
+ export { codeName, docsLink, message, type MessageCode } from './message.js';
3
+ export { html, svg, compiled, compiledSvg, isTemplateResult, templateOf, type TemplateResult, } from './template.js';
4
+ export { templateElement } from './template-element.js';
5
+ export { normalize, analyze, type Analysis } from './normalize/normalize.js';
6
+ export { checkTemplate, type TemplateIssue } from './normalize/check.js';
7
+ export { templateId } from './normalize/id.js';
8
+ export { TemplateError } from './normalize/errors.js';
9
+ export { shapeMismatch, repairError } from './normalize/shape.js';
10
+ export type { NormalizedTemplate, PartSpec, Path, Segment, Shape, ShapeNode, TemplateObject, } from './normalize/types.js';
11
+ export { hydrate } from './render/hydrate.js';
12
+ export { render, renderBatch } from './render/render.js';
13
+ export type { Markup, SeenMarkup } from './render/seen.js';
14
+ export { HydrationMismatch } from './render/mismatch.js';
15
+ export { each } from './render/list.js';
16
+ export { keyed } from './render/keyed.js';
17
+ export { raw } from './render/raw.js';
18
+ export { nothing, type ChildValue, type ListResult, type RawResult } from './render/values.js';
19
+ export { defineHook } from './render/hook-part.js';
20
+ export { useToggles } from './render/toggles.js';
21
+ export { applyToggle } from './render/modal.js';
22
+ export { commitTracked } from './render/dispose.js';
23
+ export { flushHooks, onHookFailure, suspendHooks, useDisposableHooks, type HookAttributes, type HookResult, type HookSpec, } from './render/hooks.js';
24
+ export { css, isStyleSource, sheetsFor, styleTexts, type CssValue, type StyleSource, type Styles, } from './styles.js';
25
+ export { ERROR_ATTRIBUTE, ISLAND_ATTRIBUTE, LIGHT_ATTRIBUTE, SEED_ATTRIBUTE, } from './attributes.js';
26
+ export { registerServerComponent, registerServerProvider, serverComponent, serverComponents, serverProvider, serverRegistryVersion, type ServerComponent, type ServerProvider, type ServerRenderInput, type ServerRendering, } from './registry.js';
@@ -0,0 +1,27 @@
1
+ // The view layer's entry point for the rest of core (ADR 0018 "Where it lives"): code outside
2
+ // view/ imports only this module. @gyral/core's index re-exports the public part of it.
3
+ export { DEV } from '#view-dev';
4
+ export { codeName, docsLink, message } from './message.js';
5
+ export { html, svg, compiled, compiledSvg, isTemplateResult, templateOf, } from './template.js';
6
+ export { templateElement } from './template-element.js';
7
+ export { normalize, analyze } from './normalize/normalize.js';
8
+ export { checkTemplate } from './normalize/check.js';
9
+ export { templateId } from './normalize/id.js';
10
+ export { TemplateError } from './normalize/errors.js';
11
+ export { shapeMismatch, repairError } from './normalize/shape.js';
12
+ export { hydrate } from './render/hydrate.js';
13
+ export { render, renderBatch } from './render/render.js';
14
+ export { HydrationMismatch } from './render/mismatch.js';
15
+ export { each } from './render/list.js';
16
+ export { keyed } from './render/keyed.js';
17
+ export { raw } from './render/raw.js';
18
+ export { nothing } from './render/values.js';
19
+ export { defineHook } from './render/hook-part.js';
20
+ export { useToggles } from './render/toggles.js';
21
+ export { applyToggle } from './render/modal.js';
22
+ export { commitTracked } from './render/dispose.js';
23
+ export { flushHooks, onHookFailure, suspendHooks, useDisposableHooks, } from './render/hooks.js';
24
+ export { css, isStyleSource, sheetsFor, styleTexts, } from './styles.js';
25
+ export { ERROR_ATTRIBUTE, ISLAND_ATTRIBUTE, LIGHT_ATTRIBUTE, SEED_ATTRIBUTE, } from './attributes.js';
26
+ export { registerServerComponent, registerServerProvider, serverComponent, serverComponents, serverProvider, serverRegistryVersion, } from './registry.js';
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wFAAwF;AACxF,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAoB,MAAM,cAAc,CAAC;AAC7E,OAAO,EACL,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,UAAU,GAEX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAiB,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAsB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAWlE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,OAAO,EAAoD,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,GAInB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,GAAG,EACH,aAAa,EACb,SAAS,EACT,UAAU,GAIX,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,qBAAqB,GAKtB,MAAM,eAAe,CAAC","sourcesContent":["// The view layer's entry point for the rest of core (ADR 0018 \"Where it lives\"): code outside\n// view/ imports only this module. @gyral/core's index re-exports the public part of it.\nexport { DEV } from '#view-dev';\nexport { codeName, docsLink, message, type MessageCode } from './message.js';\nexport {\n html,\n svg,\n compiled,\n compiledSvg,\n isTemplateResult,\n templateOf,\n type TemplateResult,\n} from './template.js';\nexport { templateElement } from './template-element.js';\nexport { normalize, analyze, type Analysis } from './normalize/normalize.js';\nexport { checkTemplate, type TemplateIssue } from './normalize/check.js';\nexport { templateId } from './normalize/id.js';\nexport { TemplateError } from './normalize/errors.js';\nexport { shapeMismatch, repairError } from './normalize/shape.js';\nexport type {\n NormalizedTemplate,\n PartSpec,\n Path,\n Segment,\n Shape,\n ShapeNode,\n TemplateObject,\n} from './normalize/types.js';\n\nexport { hydrate } from './render/hydrate.js';\nexport { render, renderBatch } from './render/render.js';\nexport type { Markup, SeenMarkup } from './render/seen.js';\nexport { HydrationMismatch } from './render/mismatch.js';\nexport { each } from './render/list.js';\nexport { keyed } from './render/keyed.js';\nexport { raw } from './render/raw.js';\nexport { nothing, type ChildValue, type ListResult, type RawResult } from './render/values.js';\nexport { defineHook } from './render/hook-part.js';\nexport { useToggles } from './render/toggles.js';\nexport { applyToggle } from './render/modal.js';\nexport { commitTracked } from './render/dispose.js';\nexport {\n flushHooks,\n onHookFailure,\n suspendHooks,\n useDisposableHooks,\n type HookAttributes,\n type HookResult,\n type HookSpec,\n} from './render/hooks.js';\nexport {\n css,\n isStyleSource,\n sheetsFor,\n styleTexts,\n type CssValue,\n type StyleSource,\n type Styles,\n} from './styles.js';\nexport {\n ERROR_ATTRIBUTE,\n ISLAND_ATTRIBUTE,\n LIGHT_ATTRIBUTE,\n SEED_ATTRIBUTE,\n} from './attributes.js';\nexport {\n registerServerComponent,\n registerServerProvider,\n serverComponent,\n serverComponents,\n serverProvider,\n serverRegistryVersion,\n type ServerComponent,\n type ServerProvider,\n type ServerRenderInput,\n type ServerRendering,\n} from './registry.js';\n"]}
@@ -0,0 +1,9 @@
1
+ /** The call site recorded for a template's strings. */
2
+ export declare const locOf: (strings: readonly string[]) => string | undefined;
3
+ /** Records `loc` for `strings` unless one is known. */
4
+ export declare function setLoc(strings: readonly string[], loc: string | undefined): void;
5
+ /**
6
+ * `path:line:col` of the frame that called the function which created `stack` (the second
7
+ * frame: the first is that function itself), or undefined when the stack has none.
8
+ */
9
+ export declare function callSite(stack: string | undefined): string | undefined;
@@ -0,0 +1,50 @@
1
+ // Development: where each runtime template was written (view/01-templates.md "Source
2
+ // locations", gyral-g1r.24), so TemplateError and HydrationMismatch can name `file:line:col`.
3
+ // Recorded once per call site (strings array): by the Vite preset's development transform
4
+ // (`html.at(loc)`, exact source positions), or else from a stack trace at the first `html`
5
+ // call. Stack positions are those of the code the browser runs: exact without a build step,
6
+ // shifted by any transform that doesn't keep lines. Only reached from `if (DEV)` code, so
7
+ // production bundles leave this module out.
8
+ const locs = new WeakMap();
9
+ /** The call site recorded for a template's strings. */
10
+ export const locOf = (strings) => locs.get(strings);
11
+ /** Records `loc` for `strings` unless one is known. */
12
+ export function setLoc(strings, loc) {
13
+ if (loc !== undefined && !locs.has(strings))
14
+ locs.set(strings, loc);
15
+ }
16
+ /** A frame's position: `url:line:col`. */
17
+ const POSITION = /^(.+):(\d+):(\d+)$/;
18
+ /** The `url:line:col` of a stack line: V8 `at f (…)` / `at …`, Firefox and Safari `f@…`. */
19
+ function frameOf(line) {
20
+ const text = line.trim();
21
+ if (text.startsWith('at ')) {
22
+ const rest = text.slice(3);
23
+ const open = rest.lastIndexOf('(');
24
+ return rest.endsWith(')') && open !== -1 ? rest.slice(open + 1, -1) : rest;
25
+ }
26
+ const at = text.indexOf('@');
27
+ return at === -1 ? undefined : text.slice(at + 1);
28
+ }
29
+ /** A frame's URL as a path: no scheme and host, query, hash, or Vite's `/@fs` prefix. */
30
+ const pathOf = (url) => url
31
+ .replace(/[?#].*$/, '')
32
+ .replace(/^[a-z][\w+.-]*:\/\/[^/]*/i, '')
33
+ .replace(/^\/@fs\//, '/');
34
+ /**
35
+ * `path:line:col` of the frame that called the function which created `stack` (the second
36
+ * frame: the first is that function itself), or undefined when the stack has none.
37
+ */
38
+ export function callSite(stack) {
39
+ let seen = 0;
40
+ for (const line of (stack ?? '').split('\n')) {
41
+ const m = POSITION.exec(frameOf(line) ?? '');
42
+ if (m === null)
43
+ continue;
44
+ if (seen++ === 0)
45
+ continue;
46
+ return `${pathOf(m[1] ?? '')}:${m[2] ?? ''}:${m[3] ?? ''}`;
47
+ }
48
+ return undefined;
49
+ }
50
+ //# sourceMappingURL=loc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loc.js","sourceRoot":"","sources":["../../src/view/loc.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,8FAA8F;AAC9F,0FAA0F;AAC1F,2FAA2F;AAC3F,4FAA4F;AAC5F,0FAA0F;AAC1F,4CAA4C;AAE5C,MAAM,IAAI,GAAG,IAAI,OAAO,EAA6B,CAAC;AAEtD,uDAAuD;AACvD,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAA0B,EAAsB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAE3F,uDAAuD;AACvD,MAAM,UAAU,MAAM,CAAC,OAA0B,EAAE,GAAuB;IACxE,IAAI,GAAG,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,0CAA0C;AAC1C,MAAM,QAAQ,GAAG,oBAAoB,CAAC;AAEtC,4FAA4F;AAC5F,SAAS,OAAO,CAAC,IAAY;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IACzB,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,CAAC;IACD,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,yFAAyF;AACzF,MAAM,MAAM,GAAG,CAAC,GAAW,EAAU,EAAE,CACrC,GAAG;KACA,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;KACtB,OAAO,CAAC,2BAA2B,EAAE,EAAE,CAAC;KACxC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAyB;IAChD,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,MAAM,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7C,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,IAAI;YAAE,SAAS;QACzB,IAAI,IAAI,EAAE,KAAK,CAAC;YAAE,SAAS;QAC3B,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;IAC7D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Development: where each runtime template was written (view/01-templates.md \"Source\n// locations\", gyral-g1r.24), so TemplateError and HydrationMismatch can name `file:line:col`.\n// Recorded once per call site (strings array): by the Vite preset's development transform\n// (`html.at(loc)`, exact source positions), or else from a stack trace at the first `html`\n// call. Stack positions are those of the code the browser runs: exact without a build step,\n// shifted by any transform that doesn't keep lines. Only reached from `if (DEV)` code, so\n// production bundles leave this module out.\n\nconst locs = new WeakMap<readonly string[], string>();\n\n/** The call site recorded for a template's strings. */\nexport const locOf = (strings: readonly string[]): string | undefined => locs.get(strings);\n\n/** Records `loc` for `strings` unless one is known. */\nexport function setLoc(strings: readonly string[], loc: string | undefined): void {\n if (loc !== undefined && !locs.has(strings)) locs.set(strings, loc);\n}\n\n/** A frame's position: `url:line:col`. */\nconst POSITION = /^(.+):(\\d+):(\\d+)$/;\n\n/** The `url:line:col` of a stack line: V8 `at f (…)` / `at …`, Firefox and Safari `f@…`. */\nfunction frameOf(line: string): string | undefined {\n const text = line.trim();\n if (text.startsWith('at ')) {\n const rest = text.slice(3);\n const open = rest.lastIndexOf('(');\n return rest.endsWith(')') && open !== -1 ? rest.slice(open + 1, -1) : rest;\n }\n const at = text.indexOf('@');\n return at === -1 ? undefined : text.slice(at + 1);\n}\n\n/** A frame's URL as a path: no scheme and host, query, hash, or Vite's `/@fs` prefix. */\nconst pathOf = (url: string): string =>\n url\n .replace(/[?#].*$/, '')\n .replace(/^[a-z][\\w+.-]*:\\/\\/[^/]*/i, '')\n .replace(/^\\/@fs\\//, '/');\n\n/**\n * `path:line:col` of the frame that called the function which created `stack` (the second\n * frame: the first is that function itself), or undefined when the stack has none.\n */\nexport function callSite(stack: string | undefined): string | undefined {\n let seen = 0;\n for (const line of (stack ?? '').split('\\n')) {\n const m = POSITION.exec(frameOf(line) ?? '');\n if (m === null) continue;\n if (seen++ === 0) continue;\n return `${pathOf(m[1] ?? '')}:${m[2] ?? ''}:${m[3] ?? ''}`;\n }\n return undefined;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { MESSAGES } from './messages.js';
2
+ /** A diagnostic's code (messages.ts). */
3
+ export type MessageCode = keyof typeof MESSAGES;
4
+ /** Where production messages point: the docs page generated from messages.ts. */
5
+ export declare const ERRORS_URL = "https://gyral.dev/errors/#";
6
+ /** `G0010` for code 10. */
7
+ export declare const codeName: (code: number) => string;
8
+ /**
9
+ * `Gyral G0062 https://gyral.dev/errors/#G0062`, for a message that keeps a sentence of its own
10
+ * in production (a hydration mismatch names the node in words) and points to the docs there.
11
+ */
12
+ export declare const docsLink: (code: MessageCode) => string;
13
+ /**
14
+ * The text of diagnostic `code` with its arguments: in development the full message, in
15
+ * production `Gyral G0010 <args…> https://gyral.dev/errors/#G0010`.
16
+ */
17
+ export declare function message(code: MessageCode, ...args: readonly unknown[]): string;
@@ -0,0 +1,40 @@
1
+ // Diagnostic text (gyral-c5d.13): the full message in development, a code and the docs URL in
2
+ // production, so production bundles carry no message table. Every error and warning core can
3
+ // raise in production goes through `message()` (or, for a hydration mismatch, which keeps its
4
+ // sentence, `docsLink()`); development-only checks keep their own text behind `DEV`. The codes
5
+ // and texts are in messages.ts.
6
+ import { DEV } from '#view-dev';
7
+ import { MESSAGES } from './messages.js';
8
+ /** Where production messages point: the docs page generated from messages.ts. */
9
+ export const ERRORS_URL = 'https://gyral.dev/errors/#';
10
+ /** `G0010` for code 10. */
11
+ export const codeName = (code) => `G${String(code).padStart(4, '0')}`;
12
+ /** Development: the table's text with `args` in its placeholders. */
13
+ function fullText(code, args) {
14
+ const names = [];
15
+ return MESSAGES[code].replace(/\{(\w+)\}/g, (_, name) => {
16
+ let at = names.indexOf(name);
17
+ if (at < 0)
18
+ at = names.push(name) - 1;
19
+ return String(args[at]);
20
+ });
21
+ }
22
+ /**
23
+ * `Gyral G0062 https://gyral.dev/errors/#G0062`, for a message that keeps a sentence of its own
24
+ * in production (a hydration mismatch names the node in words) and points to the docs there.
25
+ */
26
+ export const docsLink = (code) => {
27
+ const id = codeName(code);
28
+ return `Gyral ${id} ${ERRORS_URL}${id}`;
29
+ };
30
+ /**
31
+ * The text of diagnostic `code` with its arguments: in development the full message, in
32
+ * production `Gyral G0010 <args…> https://gyral.dev/errors/#G0010`.
33
+ */
34
+ export function message(code, ...args) {
35
+ if (DEV)
36
+ return fullText(code, args);
37
+ const id = codeName(code);
38
+ return [`Gyral ${id}`, ...args, ERRORS_URL + id].join(' ');
39
+ }
40
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/view/message.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6FAA6F;AAC7F,8FAA8F;AAC9F,+FAA+F;AAC/F,gCAAgC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,iFAAiF;AACjF,MAAM,CAAC,MAAM,UAAU,GAAG,4BAA4B,CAAC;AAEvD,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AAEtF,qEAAqE;AACrE,SAAS,QAAQ,CAAC,IAAiB,EAAE,IAAwB;IAC3D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,IAAY,EAAE,EAAE;QAC9D,IAAI,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,EAAE,GAAG,CAAC;YAAE,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAiB,EAAU,EAAE;IACpD,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,SAAS,EAAE,IAAI,UAAU,GAAG,EAAE,EAAE,CAAC;AAC1C,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,IAAiB,EAAE,GAAG,IAAwB;IACpE,IAAI,GAAG;QAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,CAAC,SAAS,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,UAAU,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["// Diagnostic text (gyral-c5d.13): the full message in development, a code and the docs URL in\n// production, so production bundles carry no message table. Every error and warning core can\n// raise in production goes through `message()` (or, for a hydration mismatch, which keeps its\n// sentence, `docsLink()`); development-only checks keep their own text behind `DEV`. The codes\n// and texts are in messages.ts.\nimport { DEV } from '#view-dev';\nimport { MESSAGES } from './messages.js';\n\n/** A diagnostic's code (messages.ts). */\nexport type MessageCode = keyof typeof MESSAGES;\n\n/** Where production messages point: the docs page generated from messages.ts. */\nexport const ERRORS_URL = 'https://gyral.dev/errors/#';\n\n/** `G0010` for code 10. */\nexport const codeName = (code: number): string => `G${String(code).padStart(4, '0')}`;\n\n/** Development: the table's text with `args` in its placeholders. */\nfunction fullText(code: MessageCode, args: readonly unknown[]): string {\n const names: string[] = [];\n return MESSAGES[code].replace(/\\{(\\w+)\\}/g, (_, name: string) => {\n let at = names.indexOf(name);\n if (at < 0) at = names.push(name) - 1;\n return String(args[at]);\n });\n}\n\n/**\n * `Gyral G0062 https://gyral.dev/errors/#G0062`, for a message that keeps a sentence of its own\n * in production (a hydration mismatch names the node in words) and points to the docs there.\n */\nexport const docsLink = (code: MessageCode): string => {\n const id = codeName(code);\n return `Gyral ${id} ${ERRORS_URL}${id}`;\n};\n\n/**\n * The text of diagnostic `code` with its arguments: in development the full message, in\n * production `Gyral G0010 <args…> https://gyral.dev/errors/#G0010`.\n */\nexport function message(code: MessageCode, ...args: readonly unknown[]): string {\n if (DEV) return fullText(code, args);\n const id = codeName(code);\n return [`Gyral ${id}`, ...args, ERRORS_URL + id].join(' ');\n}\n"]}
@@ -0,0 +1,43 @@
1
+ export declare const MESSAGES: {
2
+ readonly 1: "<{tag}> is a browser element (render it on the server with @gyral/ssr).";
3
+ readonly 10: "<{tag}> has no update for message \"{message}\".";
4
+ readonly 11: "<{tag}> has no intent parser for data-intent=\"{intent}\".";
5
+ readonly 12: "<{tag}> intent parser for \"{intent}\" failed";
6
+ readonly 13: "<{tag}> focus(\"{selector}\") matched no focusable element.";
7
+ readonly 20: "<{tag}> prop \"{prop}\" has an asynchronous schema; it must be synchronous.";
8
+ readonly 21: "<{tag}> prop \"{prop}\" got an invalid value from {source}, so it is treated as missing: {issues}";
9
+ readonly 22: "<{tag}> is missing required prop(s): {props}.";
10
+ readonly 23: string;
11
+ readonly 30: "gyral: a deferred callback failed";
12
+ readonly 31: "<{tag}> view failed; it shows its error view, or its previous DOM stays.";
13
+ readonly 32: "gyral: post-render work failed";
14
+ readonly 33: string;
15
+ readonly 34: string;
16
+ readonly 40: "{owner}: the onSuccess or onFailure mapper for driver \"{driver}\" threw; no message was sent.";
17
+ readonly 41: "{owner}: driver \"{driver}\" failed and the command has no onFailure.";
18
+ readonly 42: "gyral: subscription \"{name}\" failed to unsubscribe";
19
+ readonly 43: string;
20
+ readonly 50: string;
21
+ readonly 51: "store \"{store}\": the server's seed failed its schema, so it starts from init. Issues: {issues}";
22
+ readonly 52: "unreadable {attribute} seed on {where}";
23
+ readonly 53: string;
24
+ readonly 54: string;
25
+ readonly 55: "store \"{store}\" has no update for message \"{message}\".";
26
+ readonly 60: "<{tag}> has an unreadable {attribute}";
27
+ readonly 61: "gyral: hydration code failed to load; rendering fresh";
28
+ readonly 62: string;
29
+ readonly 63: "<{tag}> was rendered fresh after a hydration mismatch:";
30
+ readonly 70: string;
31
+ readonly 71: "gyral: template rule 11: a page shell rendered in the browser.";
32
+ readonly 72: string;
33
+ readonly 73: "<{tag}> update for \"{message}\" failed; the state is unchanged.";
34
+ readonly 74: "<{tag}> init failed; it shows its error view, or stays empty.";
35
+ readonly 75: "<{tag}> element hook failed; the other hooks still ran.";
36
+ readonly 76: "store \"{store}\": update for \"{message}\" failed; the state is unchanged.";
37
+ readonly 77: "store \"{store}\": a subscriber failed; the other subscribers were still notified.";
38
+ readonly 78: string;
39
+ readonly 79: string;
40
+ readonly 80: string;
41
+ readonly 85: "<{tag}> call(\"{selector}\", \"{method}\") failed";
42
+ readonly 86: "call(\"{selector}\", \"{method}\"): arguments must be plain data.";
43
+ };
@@ -0,0 +1,84 @@
1
+ // Core's diagnostics, by code (gyral-c5d.13, docs/references/errors.md). Development
2
+ // builds print the full text, production builds `Gyral G0010 <arguments…> <docs URL>`
3
+ // (message.ts), so this table stays out of production bundles. `{name}` placeholders take the
4
+ // call's arguments in order of first appearance; a name used twice repeats its argument.
5
+ // docs/references/errors.md and errors.json are generated from this table (`node
6
+ // scripts/errors.mjs`); `pnpm invariants` checks that they are current, that codes are unique
7
+ // and that every `message(code, …)` call names a code here with as many arguments as its text
8
+ // has placeholders (`docsLink(code)` marks a message that keeps its own sentence in
9
+ // production). Codes are never reused: a retired message keeps its code out of use.
10
+ // Plain data, no TypeScript beyond `as const`, so Node scripts import it as is.
11
+ export const MESSAGES = {
12
+ // Components
13
+ 1: '<{tag}> is a browser element (render it on the server with @gyral/ssr).',
14
+ 10: '<{tag}> has no update for message "{message}".',
15
+ 11: '<{tag}> has no intent parser for data-intent="{intent}".',
16
+ 12: '<{tag}> intent parser for "{intent}" failed',
17
+ 13: '<{tag}> focus("{selector}") matched no focusable element.',
18
+ // Props
19
+ 20: '<{tag}> prop "{prop}" has an asynchronous schema; it must be synchronous.',
20
+ 21: '<{tag}> prop "{prop}" got an invalid value from {source}, so it is treated as missing: {issues}',
21
+ 22: '<{tag}> is missing required prop(s): {props}.',
22
+ 23: '<{tag}> declares prop(s) that shadow built-in element properties: {props}. Setting them ' +
23
+ 'changes platform behaviour (a prop named "hidden" hides the element). Rename them ' +
24
+ '(view/05-element.md).',
25
+ // Scheduling
26
+ 30: 'gyral: a deferred callback failed',
27
+ 31: '<{tag}> view failed; it shows its error view, or its previous DOM stays.',
28
+ 32: 'gyral: post-render work failed',
29
+ 33: 'gyral: rendering did not settle in one flush (a cycle between {tags}). Components are ' +
30
+ 'probably feeding each other props or messages; break the cycle with a condition in update ' +
31
+ '(docs/design-docs/view/04-scheduler.md "Loop guard").',
32
+ 34: 'settled(): the page did not settle after {rounds} flushes or busy turns. A stream is ' +
33
+ 'emitting without pause, or components (or drivers) are feeding each other messages in a ' +
34
+ 'cycle.',
35
+ // Commands
36
+ 40: '{owner}: the onSuccess or onFailure mapper for driver "{driver}" threw; no message was sent.',
37
+ 41: '{owner}: driver "{driver}" failed and the command has no onFailure.',
38
+ 42: 'gyral: subscription "{name}" failed to unsubscribe',
39
+ 43: '{owner}: no driver provides "{driver}". It is a driver token: provide an implementation ' +
40
+ 'by name with provideDrivers(root, { {driver}: … }) or el.drivers (ADR 0006 "Driver tokens").',
41
+ // Stores
42
+ 50: '<{tag}> uses store "{store}" without declaring it. Add it to the spec: stores: [{store}] ' +
43
+ '(ADR 0013), so the component subscribes to its changes.',
44
+ 51: 'store "{store}": the server\'s seed failed its schema, so it starts from init. Issues: {issues}',
45
+ 52: 'unreadable {attribute} seed on {where}',
46
+ 53: '<{tag}> reads store "{store}" during a server render without a store scope. Pass the ' +
47
+ "request's store instances to renderPage({ stores }) or renderToString(value, { stores }).",
48
+ 54: 'store "{store}" sends to "{target}" but is not held by a store scope (a registry, ' +
49
+ '<gyral-stores> or the page default), so the message is dropped.',
50
+ 55: 'store "{store}" has no update for message "{message}".',
51
+ // Hydration
52
+ 60: '<{tag}> has an unreadable {attribute}',
53
+ 61: 'gyral: hydration code failed to load; rendering fresh',
54
+ 62: "gyral: hydration mismatch in {host} at {path}: expected {expected}, found {found}. The server's " +
55
+ "HTML differs from the first client render: a view that isn't deterministic (Date.now(), " +
56
+ 'locale), a third party that changed the DOM before scripts ran, or a stale cached page ' +
57
+ '(docs/design-docs/view/07-hydration.md "Mismatches").',
58
+ 63: '<{tag}> was rendered fresh after a hydration mismatch:',
59
+ // Templates
60
+ 70: 'gyral: an html template was not compiled: `{start}`. Under the gyral-compiled condition ' +
61
+ 'every html`…` must be compiled by the Gyral Vite preset (view/01-templates.md).',
62
+ 71: 'gyral: template rule 11: a page shell rendered in the browser.',
63
+ 72: 'gyral: this page\'s Trusted Types policy list does not allow the policy "gyral", so ' +
64
+ 'templates are parsed from plain strings, which works only while Trusted Types are not ' +
65
+ 'enforced. Add `trusted-types gyral` to the Content-Security-Policy.',
66
+ // Errors (ADR 0024)
67
+ 73: '<{tag}> update for "{message}" failed; the state is unchanged.',
68
+ 74: '<{tag}> init failed; it shows its error view, or stays empty.',
69
+ 75: '<{tag}> element hook failed; the other hooks still ran.',
70
+ 76: 'store "{store}": update for "{message}" failed; the state is unchanged.',
71
+ 77: 'store "{store}": a subscriber failed; the other subscribers were still notified.',
72
+ 78: '<{tag}> failed to render on the server; it renders its error view (or nothing) and ' +
73
+ 'starts fresh in the browser.',
74
+ // Subscriptions (ADR 0025)
75
+ 79: '<{tag}> subscriptions returned two commands for lane "{lane}"; only the first runs. ' +
76
+ 'Give each its own `key`.',
77
+ 80: "<{tag}> subscriptions kept restarting: a subscription's input data changes with every " +
78
+ 'message it sends (for example a timestamp or a counter in the input). Keep inputs to what ' +
79
+ 'should restart it; functions are ignored, so to restart on a new selector, change the key.',
80
+ // Element calls (gyral-1zd.27)
81
+ 85: '<{tag}> call("{selector}", "{method}") failed',
82
+ 86: 'call("{selector}", "{method}"): arguments must be plain data.',
83
+ };
84
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/view/messages.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,sFAAsF;AACtF,8FAA8F;AAC9F,yFAAyF;AACzF,iFAAiF;AACjF,8FAA8F;AAC9F,8FAA8F;AAC9F,oFAAoF;AACpF,oFAAoF;AACpF,gFAAgF;AAChF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,aAAa;IACb,CAAC,EAAE,yEAAyE;IAC5E,EAAE,EAAE,gDAAgD;IACpD,EAAE,EAAE,0DAA0D;IAC9D,EAAE,EAAE,6CAA6C;IACjD,EAAE,EAAE,2DAA2D;IAC/D,QAAQ;IACR,EAAE,EAAE,2EAA2E;IAC/E,EAAE,EAAE,iGAAiG;IACrG,EAAE,EAAE,+CAA+C;IACnD,EAAE,EACA,0FAA0F;QAC1F,oFAAoF;QACpF,uBAAuB;IACzB,aAAa;IACb,EAAE,EAAE,mCAAmC;IACvC,EAAE,EAAE,0EAA0E;IAC9E,EAAE,EAAE,gCAAgC;IACpC,EAAE,EACA,wFAAwF;QACxF,4FAA4F;QAC5F,uDAAuD;IACzD,EAAE,EACA,uFAAuF;QACvF,0FAA0F;QAC1F,QAAQ;IACV,WAAW;IACX,EAAE,EAAE,8FAA8F;IAClG,EAAE,EAAE,qEAAqE;IACzE,EAAE,EAAE,oDAAoD;IACxD,EAAE,EACA,0FAA0F;QAC1F,8FAA8F;IAChG,SAAS;IACT,EAAE,EACA,2FAA2F;QAC3F,yDAAyD;IAC3D,EAAE,EAAE,iGAAiG;IACrG,EAAE,EAAE,wCAAwC;IAC5C,EAAE,EACA,uFAAuF;QACvF,2FAA2F;IAC7F,EAAE,EACA,oFAAoF;QACpF,iEAAiE;IACnE,EAAE,EAAE,wDAAwD;IAC5D,YAAY;IACZ,EAAE,EAAE,uCAAuC;IAC3C,EAAE,EAAE,uDAAuD;IAC3D,EAAE,EACA,kGAAkG;QAClG,0FAA0F;QAC1F,yFAAyF;QACzF,uDAAuD;IACzD,EAAE,EAAE,wDAAwD;IAC5D,YAAY;IACZ,EAAE,EACA,0FAA0F;QAC1F,iFAAiF;IACnF,EAAE,EAAE,gEAAgE;IACpE,EAAE,EACA,sFAAsF;QACtF,wFAAwF;QACxF,qEAAqE;IACvE,oBAAoB;IACpB,EAAE,EAAE,gEAAgE;IACpE,EAAE,EAAE,+DAA+D;IACnE,EAAE,EAAE,yDAAyD;IAC7D,EAAE,EAAE,yEAAyE;IAC7E,EAAE,EAAE,kFAAkF;IACtF,EAAE,EACA,qFAAqF;QACrF,8BAA8B;IAChC,2BAA2B;IAC3B,EAAE,EACA,sFAAsF;QACtF,0BAA0B;IAC5B,EAAE,EACA,wFAAwF;QACxF,4FAA4F;QAC5F,4FAA4F;IAC9F,+BAA+B;IAC/B,EAAE,EAAE,+CAA+C;IACnD,EAAE,EAAE,+DAA+D;CAC3D,CAAC","sourcesContent":["// Core's diagnostics, by code (gyral-c5d.13, docs/references/errors.md). Development\n// builds print the full text, production builds `Gyral G0010 <arguments…> <docs URL>`\n// (message.ts), so this table stays out of production bundles. `{name}` placeholders take the\n// call's arguments in order of first appearance; a name used twice repeats its argument.\n// docs/references/errors.md and errors.json are generated from this table (`node\n// scripts/errors.mjs`); `pnpm invariants` checks that they are current, that codes are unique\n// and that every `message(code, …)` call names a code here with as many arguments as its text\n// has placeholders (`docsLink(code)` marks a message that keeps its own sentence in\n// production). Codes are never reused: a retired message keeps its code out of use.\n// Plain data, no TypeScript beyond `as const`, so Node scripts import it as is.\nexport const MESSAGES = {\n // Components\n 1: '<{tag}> is a browser element (render it on the server with @gyral/ssr).',\n 10: '<{tag}> has no update for message \"{message}\".',\n 11: '<{tag}> has no intent parser for data-intent=\"{intent}\".',\n 12: '<{tag}> intent parser for \"{intent}\" failed',\n 13: '<{tag}> focus(\"{selector}\") matched no focusable element.',\n // Props\n 20: '<{tag}> prop \"{prop}\" has an asynchronous schema; it must be synchronous.',\n 21: '<{tag}> prop \"{prop}\" got an invalid value from {source}, so it is treated as missing: {issues}',\n 22: '<{tag}> is missing required prop(s): {props}.',\n 23:\n '<{tag}> declares prop(s) that shadow built-in element properties: {props}. Setting them ' +\n 'changes platform behaviour (a prop named \"hidden\" hides the element). Rename them ' +\n '(view/05-element.md).',\n // Scheduling\n 30: 'gyral: a deferred callback failed',\n 31: '<{tag}> view failed; it shows its error view, or its previous DOM stays.',\n 32: 'gyral: post-render work failed',\n 33:\n 'gyral: rendering did not settle in one flush (a cycle between {tags}). Components are ' +\n 'probably feeding each other props or messages; break the cycle with a condition in update ' +\n '(docs/design-docs/view/04-scheduler.md \"Loop guard\").',\n 34:\n 'settled(): the page did not settle after {rounds} flushes or busy turns. A stream is ' +\n 'emitting without pause, or components (or drivers) are feeding each other messages in a ' +\n 'cycle.',\n // Commands\n 40: '{owner}: the onSuccess or onFailure mapper for driver \"{driver}\" threw; no message was sent.',\n 41: '{owner}: driver \"{driver}\" failed and the command has no onFailure.',\n 42: 'gyral: subscription \"{name}\" failed to unsubscribe',\n 43:\n '{owner}: no driver provides \"{driver}\". It is a driver token: provide an implementation ' +\n 'by name with provideDrivers(root, { {driver}: … }) or el.drivers (ADR 0006 \"Driver tokens\").',\n // Stores\n 50:\n '<{tag}> uses store \"{store}\" without declaring it. Add it to the spec: stores: [{store}] ' +\n '(ADR 0013), so the component subscribes to its changes.',\n 51: 'store \"{store}\": the server\\'s seed failed its schema, so it starts from init. Issues: {issues}',\n 52: 'unreadable {attribute} seed on {where}',\n 53:\n '<{tag}> reads store \"{store}\" during a server render without a store scope. Pass the ' +\n \"request's store instances to renderPage({ stores }) or renderToString(value, { stores }).\",\n 54:\n 'store \"{store}\" sends to \"{target}\" but is not held by a store scope (a registry, ' +\n '<gyral-stores> or the page default), so the message is dropped.',\n 55: 'store \"{store}\" has no update for message \"{message}\".',\n // Hydration\n 60: '<{tag}> has an unreadable {attribute}',\n 61: 'gyral: hydration code failed to load; rendering fresh',\n 62:\n \"gyral: hydration mismatch in {host} at {path}: expected {expected}, found {found}. The server's \" +\n \"HTML differs from the first client render: a view that isn't deterministic (Date.now(), \" +\n 'locale), a third party that changed the DOM before scripts ran, or a stale cached page ' +\n '(docs/design-docs/view/07-hydration.md \"Mismatches\").',\n 63: '<{tag}> was rendered fresh after a hydration mismatch:',\n // Templates\n 70:\n 'gyral: an html template was not compiled: `{start}`. Under the gyral-compiled condition ' +\n 'every html`…` must be compiled by the Gyral Vite preset (view/01-templates.md).',\n 71: 'gyral: template rule 11: a page shell rendered in the browser.',\n 72:\n 'gyral: this page\\'s Trusted Types policy list does not allow the policy \"gyral\", so ' +\n 'templates are parsed from plain strings, which works only while Trusted Types are not ' +\n 'enforced. Add `trusted-types gyral` to the Content-Security-Policy.',\n // Errors (ADR 0024)\n 73: '<{tag}> update for \"{message}\" failed; the state is unchanged.',\n 74: '<{tag}> init failed; it shows its error view, or stays empty.',\n 75: '<{tag}> element hook failed; the other hooks still ran.',\n 76: 'store \"{store}\": update for \"{message}\" failed; the state is unchanged.',\n 77: 'store \"{store}\": a subscriber failed; the other subscribers were still notified.',\n 78:\n '<{tag}> failed to render on the server; it renders its error view (or nothing) and ' +\n 'starts fresh in the browser.',\n // Subscriptions (ADR 0025)\n 79:\n '<{tag}> subscriptions returned two commands for lane \"{lane}\"; only the first runs. ' +\n 'Give each its own `key`.',\n 80:\n \"<{tag}> subscriptions kept restarting: a subscription's input data changes with every \" +\n 'message it sends (for example a timestamp or a counter in the input). Keep inputs to what ' +\n 'should restart it; functions are ignored, so to restart on a new selector, change the key.',\n // Element calls (gyral-1zd.27)\n 85: '<{tag}> call(\"{selector}\", \"{method}\") failed',\n 86: 'call(\"{selector}\", \"{method}\"): arguments must be plain data.',\n} as const;\n"]}
@@ -0,0 +1,23 @@
1
+ import { TemplateError } from './errors.js';
2
+ /** A position in the minified strings: string index, offset in that string. */
3
+ export type At = readonly [index: number, offset: number];
4
+ /** A template's first rule violation, and where the normalizer was when it found it. */
5
+ export interface TemplateIssue {
6
+ /** The same error `normalize(strings)` throws. */
7
+ readonly error: TemplateError;
8
+ /** The whitespace-minified strings the rules read (as many as the input). */
9
+ readonly strings: readonly string[];
10
+ /** Where reading stopped. */
11
+ readonly at: At;
12
+ /**
13
+ * Where the token the error is about starts, when the tree builder found it in a tag, an end
14
+ * tag or a run of text (the token ends at `at`). Undefined when the tokenizer found it at
15
+ * `at` itself, or at a child hole (then `at` is the end of the string before the hole).
16
+ */
17
+ readonly from: At | undefined;
18
+ }
19
+ /**
20
+ * The template's first rule violation, or undefined when `normalize` would accept it. `svg`: an
21
+ * svg template's strings (`` svg`…` ``).
22
+ */
23
+ export declare function checkTemplate(strings: readonly string[], svg?: boolean): TemplateIssue | undefined;
@@ -0,0 +1,81 @@
1
+ // The template rules (view/09-template-rules.md) as a check that reports where it stopped, for
2
+ // tools that point at the markup (the ESLint plugin, @gyral/core/eslint). It runs the same
3
+ // steps as `analyze` (normalize.ts) up to the last one that can fail: minify whitespace, then
4
+ // tokenize and build the tree (emit and the id never throw). Like the compiler and the runtime,
5
+ // it stops at a template's first error: the tokenizer can't recover from one.
6
+ import { TemplateError } from './errors.js';
7
+ import { Source } from './source.js';
8
+ import { tokenize } from './tokenizer.js';
9
+ import { TreeBuilder } from './tree.js';
10
+ import { minifyStrings } from './whitespace.js';
11
+ /** Forwards tokens to the tree builder, remembering where the current token started. */
12
+ class Tracker {
13
+ constructor(src, tree) {
14
+ this.src = src;
15
+ this.tree = tree;
16
+ this.mark = [0, 0];
17
+ }
18
+ /** A token starts at `mark`; an error before `after` is about it (a child hole: the hole). */
19
+ before(about = true) {
20
+ this.from = about ? this.mark : undefined;
21
+ }
22
+ after() {
23
+ this.from = undefined;
24
+ this.mark = [this.src.i, this.src.pos];
25
+ }
26
+ text(raw) {
27
+ this.before();
28
+ this.tree.text(raw);
29
+ this.after();
30
+ }
31
+ comment(raw) {
32
+ this.before();
33
+ this.tree.comment(raw);
34
+ this.after();
35
+ }
36
+ doctype(raw) {
37
+ this.before();
38
+ this.tree.doctype(raw);
39
+ this.after();
40
+ }
41
+ start(tag) {
42
+ this.before();
43
+ const mode = this.tree.start(tag);
44
+ this.after();
45
+ return mode;
46
+ }
47
+ end(name) {
48
+ this.before();
49
+ this.tree.end(name);
50
+ this.after();
51
+ }
52
+ hole(kind) {
53
+ this.before(false);
54
+ this.tree.hole(kind);
55
+ this.after();
56
+ }
57
+ finish() {
58
+ this.before();
59
+ this.tree.finish();
60
+ this.after();
61
+ }
62
+ }
63
+ /**
64
+ * The template's first rule violation, or undefined when `normalize` would accept it. `svg`: an
65
+ * svg template's strings (`` svg`…` ``).
66
+ */
67
+ export function checkTemplate(strings, svg = false) {
68
+ const normalized = minifyStrings(strings);
69
+ const src = new Source(normalized, undefined);
70
+ const tracker = new Tracker(src, new TreeBuilder(src, svg));
71
+ try {
72
+ tokenize(src, tracker);
73
+ }
74
+ catch (error) {
75
+ if (!(error instanceof TemplateError))
76
+ throw error;
77
+ return { error, strings: normalized, at: [src.i, src.pos], from: tracker.from };
78
+ }
79
+ return undefined;
80
+ }
81
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/view/normalize/check.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,2FAA2F;AAC3F,8FAA8F;AAC9F,gGAAgG;AAChG,8EAA8E;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAA8C,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqBhD,wFAAwF;AACxF,MAAM,OAAO;IAIX,YACmB,GAAW,EACX,IAAiB;QADjB,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAa;QALpC,SAAI,GAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAMf,CAAC;IAEJ,8FAA8F;IACtF,MAAM,CAAC,KAAK,GAAG,IAAI;QACzB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5C,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAC,GAAW;QACd,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IACD,OAAO,CAAC,GAAW;QACjB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IACD,OAAO,CAAC,GAAW;QACjB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IACD,KAAK,CAAC,GAAa;QACjB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IACD,GAAG,CAAC,IAAY;QACd,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IACD,IAAI,CAAC,IAAsB;QACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IACD,MAAM;QACJ,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACnB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,OAA0B,EAAE,GAAG,GAAG,KAAK;IACnE,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,IAAI,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5D,IAAI,CAAC;QACH,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,aAAa,CAAC;YAAE,MAAM,KAAK,CAAC;QACnD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;IAClF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// The template rules (view/09-template-rules.md) as a check that reports where it stopped, for\n// tools that point at the markup (the ESLint plugin, @gyral/core/eslint). It runs the same\n// steps as `analyze` (normalize.ts) up to the last one that can fail: minify whitespace, then\n// tokenize and build the tree (emit and the id never throw). Like the compiler and the runtime,\n// it stops at a template's first error: the tokenizer can't recover from one.\nimport { TemplateError } from './errors.js';\nimport { Source } from './source.js';\nimport { tokenize, type ContentMode, type Sink, type StartTag } from './tokenizer.js';\nimport { TreeBuilder } from './tree.js';\nimport { minifyStrings } from './whitespace.js';\n\n/** A position in the minified strings: string index, offset in that string. */\nexport type At = readonly [index: number, offset: number];\n\n/** A template's first rule violation, and where the normalizer was when it found it. */\nexport interface TemplateIssue {\n /** The same error `normalize(strings)` throws. */\n readonly error: TemplateError;\n /** The whitespace-minified strings the rules read (as many as the input). */\n readonly strings: readonly string[];\n /** Where reading stopped. */\n readonly at: At;\n /**\n * Where the token the error is about starts, when the tree builder found it in a tag, an end\n * tag or a run of text (the token ends at `at`). Undefined when the tokenizer found it at\n * `at` itself, or at a child hole (then `at` is the end of the string before the hole).\n */\n readonly from: At | undefined;\n}\n\n/** Forwards tokens to the tree builder, remembering where the current token started. */\nclass Tracker implements Sink {\n mark: At = [0, 0];\n from: At | undefined;\n\n constructor(\n private readonly src: Source,\n private readonly tree: TreeBuilder,\n ) {}\n\n /** A token starts at `mark`; an error before `after` is about it (a child hole: the hole). */\n private before(about = true): void {\n this.from = about ? this.mark : undefined;\n }\n\n private after(): void {\n this.from = undefined;\n this.mark = [this.src.i, this.src.pos];\n }\n\n text(raw: string): void {\n this.before();\n this.tree.text(raw);\n this.after();\n }\n comment(raw: string): void {\n this.before();\n this.tree.comment(raw);\n this.after();\n }\n doctype(raw: string): void {\n this.before();\n this.tree.doctype(raw);\n this.after();\n }\n start(tag: StartTag): ContentMode {\n this.before();\n const mode = this.tree.start(tag);\n this.after();\n return mode;\n }\n end(name: string): void {\n this.before();\n this.tree.end(name);\n this.after();\n }\n hole(kind: 'child' | 'text'): void {\n this.before(false);\n this.tree.hole(kind);\n this.after();\n }\n finish(): void {\n this.before();\n this.tree.finish();\n this.after();\n }\n}\n\n/**\n * The template's first rule violation, or undefined when `normalize` would accept it. `svg`: an\n * svg template's strings (`` svg`…` ``).\n */\nexport function checkTemplate(strings: readonly string[], svg = false): TemplateIssue | undefined {\n const normalized = minifyStrings(strings);\n const src = new Source(normalized, undefined);\n const tracker = new Tracker(src, new TreeBuilder(src, svg));\n try {\n tokenize(src, tracker);\n } catch (error) {\n if (!(error instanceof TemplateError)) throw error;\n return { error, strings: normalized, at: [src.i, src.pos], from: tracker.from };\n }\n return undefined;\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import type { TreeNode } from './tree.js';
2
+ import { type PartSpec, type Segment, type Shape } from './types.js';
3
+ export interface Emitted {
4
+ readonly html: string;
5
+ readonly parts: PartSpec[];
6
+ readonly segments: Segment[];
7
+ readonly shape: Shape;
8
+ /** The decoded values of the template's non-empty static `style` attributes (types.ts). */
9
+ readonly staticStyles: string[];
10
+ }
11
+ /**
12
+ * Emits the HTML, part table, segments and shape for a template's tree. A `server` template
13
+ * (a page shell) gets no anchors: hydration never walks it, and the browser never renders it.
14
+ */
15
+ export declare function emit(root: readonly TreeNode[], server: boolean): Emitted;