@noego/wood 0.4.9 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/README.md +118 -42
  2. package/bin/axe.js +313 -98
  3. package/dist/{loader/__fixtures__/layouts/app.load.cjs → automation/actions.cjs} +3 -13
  4. package/dist/automation/actions.cjs.map +1 -0
  5. package/dist/automation/actions.d.cts +57 -0
  6. package/dist/automation/actions.d.ts +57 -0
  7. package/dist/automation/actions.js +1 -0
  8. package/dist/automation/actions.js.map +1 -0
  9. package/dist/automation/actions_executor.cjs +101 -0
  10. package/dist/automation/actions_executor.cjs.map +1 -0
  11. package/dist/automation/actions_executor.d.cts +16 -0
  12. package/dist/automation/actions_executor.d.ts +16 -0
  13. package/dist/automation/actions_executor.js +76 -0
  14. package/dist/automation/actions_executor.js.map +1 -0
  15. package/dist/automation/connection.cjs +86 -0
  16. package/dist/automation/connection.cjs.map +1 -0
  17. package/dist/automation/connection.d.cts +18 -0
  18. package/dist/automation/connection.d.ts +18 -0
  19. package/dist/automation/connection.js +51 -0
  20. package/dist/automation/connection.js.map +1 -0
  21. package/dist/{middleware/__fixtures__/middleware/sequence.cjs → automation/errors.cjs} +25 -22
  22. package/dist/automation/errors.cjs.map +1 -0
  23. package/dist/automation/errors.d.cts +31 -0
  24. package/dist/automation/errors.d.ts +31 -0
  25. package/dist/automation/errors.js +24 -0
  26. package/dist/automation/errors.js.map +1 -0
  27. package/dist/automation/index.cjs +49 -0
  28. package/dist/automation/index.cjs.map +1 -0
  29. package/dist/automation/index.d.cts +16 -0
  30. package/dist/automation/index.d.ts +16 -0
  31. package/dist/automation/index.js +15 -0
  32. package/dist/automation/index.js.map +1 -0
  33. package/dist/automation/introspection_reader.cjs +75 -0
  34. package/dist/automation/introspection_reader.cjs.map +1 -0
  35. package/dist/automation/introspection_reader.d.cts +20 -0
  36. package/dist/automation/introspection_reader.d.ts +20 -0
  37. package/dist/automation/introspection_reader.js +48 -0
  38. package/dist/automation/introspection_reader.js.map +1 -0
  39. package/dist/automation/locator.cjs +102 -0
  40. package/dist/automation/locator.cjs.map +1 -0
  41. package/dist/automation/locator.d.cts +51 -0
  42. package/dist/automation/locator.d.ts +51 -0
  43. package/dist/automation/locator.js +75 -0
  44. package/dist/automation/locator.js.map +1 -0
  45. package/dist/{loader/__fixtures__/views/test/page.load.cjs → automation/observation.cjs} +3 -13
  46. package/dist/automation/observation.cjs.map +1 -0
  47. package/dist/automation/observation.d.cts +44 -0
  48. package/dist/automation/observation.d.ts +44 -0
  49. package/dist/automation/observation.js +1 -0
  50. package/dist/automation/observation.js.map +1 -0
  51. package/dist/{controller/__fixtures__/controllers/test.cjs → automation/receipts.cjs} +3 -15
  52. package/dist/automation/receipts.cjs.map +1 -0
  53. package/dist/automation/receipts.d.cts +27 -0
  54. package/dist/automation/receipts.d.ts +27 -0
  55. package/dist/automation/receipts.js +1 -0
  56. package/dist/automation/receipts.js.map +1 -0
  57. package/dist/automation/scenario.cjs +696 -0
  58. package/dist/automation/scenario.cjs.map +1 -0
  59. package/dist/automation/scenario.d.cts +89 -0
  60. package/dist/automation/scenario.d.ts +89 -0
  61. package/dist/automation/scenario.js +660 -0
  62. package/dist/automation/scenario.js.map +1 -0
  63. package/dist/automation/scrolling.cjs +17 -0
  64. package/dist/automation/scrolling.cjs.map +1 -0
  65. package/dist/automation/scrolling.d.cts +51 -0
  66. package/dist/automation/scrolling.d.ts +51 -0
  67. package/dist/automation/scrolling.js +1 -0
  68. package/dist/automation/scrolling.js.map +1 -0
  69. package/dist/automation/scrolling_executor.cjs +109 -0
  70. package/dist/automation/scrolling_executor.cjs.map +1 -0
  71. package/dist/automation/scrolling_executor.d.cts +13 -0
  72. package/dist/automation/scrolling_executor.d.ts +13 -0
  73. package/dist/automation/scrolling_executor.js +84 -0
  74. package/dist/automation/scrolling_executor.js.map +1 -0
  75. package/dist/automation/target_identity.cjs +17 -0
  76. package/dist/automation/target_identity.cjs.map +1 -0
  77. package/dist/automation/target_identity.d.cts +28 -0
  78. package/dist/automation/target_identity.d.ts +28 -0
  79. package/dist/automation/target_identity.js +1 -0
  80. package/dist/automation/target_identity.js.map +1 -0
  81. package/dist/automation/target_registry.cjs +148 -0
  82. package/dist/automation/target_registry.cjs.map +1 -0
  83. package/dist/automation/target_registry.d.cts +32 -0
  84. package/dist/automation/target_registry.d.ts +32 -0
  85. package/dist/automation/target_registry.js +122 -0
  86. package/dist/automation/target_registry.js.map +1 -0
  87. package/dist/automation/waits.cjs +17 -0
  88. package/dist/automation/waits.cjs.map +1 -0
  89. package/dist/automation/waits.d.cts +44 -0
  90. package/dist/automation/waits.d.ts +44 -0
  91. package/dist/automation/waits.js +1 -0
  92. package/dist/automation/waits.js.map +1 -0
  93. package/dist/automation/waits_executor.cjs +104 -0
  94. package/dist/automation/waits_executor.cjs.map +1 -0
  95. package/dist/automation/waits_executor.d.cts +14 -0
  96. package/dist/automation/waits_executor.d.ts +14 -0
  97. package/dist/automation/waits_executor.js +79 -0
  98. package/dist/automation/waits_executor.js.map +1 -0
  99. package/dist/bridge/backend_bridge.cjs.map +1 -1
  100. package/dist/bridge/backend_bridge.js.map +1 -1
  101. package/dist/client/index.cjs +78 -21
  102. package/dist/client/index.cjs.map +1 -1
  103. package/dist/client/index.d.cts +19 -3
  104. package/dist/client/index.d.ts +19 -3
  105. package/dist/client/index.js +80 -22
  106. package/dist/client/index.js.map +1 -1
  107. package/dist/client/renderer_log_transport.cjs +151 -0
  108. package/dist/client/renderer_log_transport.cjs.map +1 -0
  109. package/dist/client/renderer_log_transport.d.cts +54 -0
  110. package/dist/client/renderer_log_transport.d.ts +54 -0
  111. package/dist/client/renderer_log_transport.js +123 -0
  112. package/dist/client/renderer_log_transport.js.map +1 -0
  113. package/dist/codegen/controller_registration_generator.cjs +13 -2
  114. package/dist/codegen/controller_registration_generator.cjs.map +1 -1
  115. package/dist/codegen/controller_registration_generator.d.cts +12 -1
  116. package/dist/codegen/controller_registration_generator.d.ts +12 -1
  117. package/dist/codegen/controller_registration_generator.js +10 -1
  118. package/dist/codegen/controller_registration_generator.js.map +1 -1
  119. package/dist/codegen/index.d.cts +1 -0
  120. package/dist/codegen/index.d.ts +1 -0
  121. package/dist/codegen/preload_generator.cjs +13 -6
  122. package/dist/codegen/preload_generator.cjs.map +1 -1
  123. package/dist/codegen/preload_generator.d.cts +11 -2
  124. package/dist/codegen/preload_generator.d.ts +11 -2
  125. package/dist/codegen/preload_generator.js +13 -6
  126. package/dist/codegen/preload_generator.js.map +1 -1
  127. package/dist/codegen/renderer_app_generator.cjs +95 -44
  128. package/dist/codegen/renderer_app_generator.cjs.map +1 -1
  129. package/dist/codegen/renderer_app_generator.js +95 -44
  130. package/dist/codegen/renderer_app_generator.js.map +1 -1
  131. package/dist/codegen/type_generator.cjs +1 -0
  132. package/dist/codegen/type_generator.cjs.map +1 -1
  133. package/dist/codegen/type_generator.js +1 -0
  134. package/dist/codegen/type_generator.js.map +1 -1
  135. package/dist/config/config_parser.cjs +95 -4
  136. package/dist/config/config_parser.cjs.map +1 -1
  137. package/dist/config/config_parser.d.cts +10 -2
  138. package/dist/config/config_parser.d.ts +10 -2
  139. package/dist/config/config_parser.js +92 -3
  140. package/dist/config/config_parser.js.map +1 -1
  141. package/dist/config/index.cjs +6 -2
  142. package/dist/config/index.cjs.map +1 -1
  143. package/dist/config/index.d.cts +2 -2
  144. package/dist/config/index.d.ts +2 -2
  145. package/dist/config/index.js +8 -2
  146. package/dist/config/index.js.map +1 -1
  147. package/dist/controller/controller_resolver.cjs +51 -3
  148. package/dist/controller/controller_resolver.cjs.map +1 -1
  149. package/dist/controller/controller_resolver.d.cts +27 -4
  150. package/dist/controller/controller_resolver.d.ts +27 -4
  151. package/dist/controller/controller_resolver.js +48 -2
  152. package/dist/controller/controller_resolver.js.map +1 -1
  153. package/dist/controller/index.cjs +6 -2
  154. package/dist/controller/index.cjs.map +1 -1
  155. package/dist/controller/index.d.cts +1 -1
  156. package/dist/controller/index.d.ts +1 -1
  157. package/dist/controller/index.js +4 -2
  158. package/dist/controller/index.js.map +1 -1
  159. package/dist/dev/wood_dev_server.cjs +4 -1
  160. package/dist/dev/wood_dev_server.cjs.map +1 -1
  161. package/dist/dev/wood_dev_server.js +5 -2
  162. package/dist/dev/wood_dev_server.js.map +1 -1
  163. package/dist/dev/yaml_watcher.cjs +1 -1
  164. package/dist/dev/yaml_watcher.cjs.map +1 -1
  165. package/dist/dev/yaml_watcher.d.cts +4 -0
  166. package/dist/dev/yaml_watcher.d.ts +4 -0
  167. package/dist/dev/yaml_watcher.js +1 -1
  168. package/dist/dev/yaml_watcher.js.map +1 -1
  169. package/dist/frontend/frontend_lifecycle.cjs +74 -0
  170. package/dist/frontend/frontend_lifecycle.cjs.map +1 -0
  171. package/dist/frontend/frontend_lifecycle.d.cts +50 -0
  172. package/dist/frontend/frontend_lifecycle.d.ts +50 -0
  173. package/dist/frontend/frontend_lifecycle.js +50 -0
  174. package/dist/frontend/frontend_lifecycle.js.map +1 -0
  175. package/dist/frontend/frontend_page.cjs +122 -0
  176. package/dist/frontend/frontend_page.cjs.map +1 -0
  177. package/dist/frontend/frontend_page.d.cts +62 -0
  178. package/dist/frontend/frontend_page.d.ts +62 -0
  179. package/dist/frontend/frontend_page.js +98 -0
  180. package/dist/frontend/frontend_page.js.map +1 -0
  181. package/dist/frontend/frontend_surface.cjs +249 -0
  182. package/dist/frontend/frontend_surface.cjs.map +1 -0
  183. package/dist/frontend/frontend_surface.d.cts +64 -0
  184. package/dist/frontend/frontend_surface.d.ts +64 -0
  185. package/dist/frontend/frontend_surface.js +224 -0
  186. package/dist/frontend/frontend_surface.js.map +1 -0
  187. package/dist/frontend/index.cjs +52 -0
  188. package/dist/frontend/index.cjs.map +1 -0
  189. package/dist/frontend/index.d.cts +10 -0
  190. package/dist/frontend/index.d.ts +10 -0
  191. package/dist/frontend/index.js +19 -0
  192. package/dist/frontend/index.js.map +1 -0
  193. package/dist/frontend/page_catalog.cjs +135 -0
  194. package/dist/frontend/page_catalog.cjs.map +1 -0
  195. package/dist/frontend/page_catalog.d.cts +56 -0
  196. package/dist/frontend/page_catalog.d.ts +56 -0
  197. package/dist/frontend/page_catalog.js +108 -0
  198. package/dist/frontend/page_catalog.js.map +1 -0
  199. package/dist/frontend/tracked_transport.cjs +55 -0
  200. package/dist/frontend/tracked_transport.cjs.map +1 -0
  201. package/dist/frontend/tracked_transport.d.cts +36 -0
  202. package/dist/frontend/tracked_transport.d.ts +36 -0
  203. package/dist/frontend/tracked_transport.js +31 -0
  204. package/dist/frontend/tracked_transport.js.map +1 -0
  205. package/dist/frontend/work_registry.cjs +153 -0
  206. package/dist/frontend/work_registry.cjs.map +1 -0
  207. package/dist/frontend/work_registry.d.cts +70 -0
  208. package/dist/frontend/work_registry.d.ts +70 -0
  209. package/dist/frontend/work_registry.js +128 -0
  210. package/dist/frontend/work_registry.js.map +1 -0
  211. package/dist/index.cjs +24 -0
  212. package/dist/index.cjs.map +1 -1
  213. package/dist/index.d.cts +11 -7
  214. package/dist/index.d.ts +11 -7
  215. package/dist/index.js +27 -4
  216. package/dist/index.js.map +1 -1
  217. package/dist/main/index.cjs +10 -0
  218. package/dist/main/index.cjs.map +1 -1
  219. package/dist/main/index.d.cts +14 -2
  220. package/dist/main/index.d.ts +14 -2
  221. package/dist/main/index.js +16 -0
  222. package/dist/main/index.js.map +1 -1
  223. package/dist/middleware/middleware_resolver.cjs +22 -1
  224. package/dist/middleware/middleware_resolver.cjs.map +1 -1
  225. package/dist/middleware/middleware_resolver.d.cts +13 -1
  226. package/dist/middleware/middleware_resolver.d.ts +13 -1
  227. package/dist/middleware/middleware_resolver.js +22 -1
  228. package/dist/middleware/middleware_resolver.js.map +1 -1
  229. package/dist/navigation/automation_introspection.cjs +110 -0
  230. package/dist/navigation/automation_introspection.cjs.map +1 -0
  231. package/dist/navigation/automation_introspection.d.cts +60 -0
  232. package/dist/navigation/automation_introspection.d.ts +60 -0
  233. package/dist/navigation/automation_introspection.js +85 -0
  234. package/dist/navigation/automation_introspection.js.map +1 -0
  235. package/dist/navigation/index.cjs +10 -2
  236. package/dist/navigation/index.cjs.map +1 -1
  237. package/dist/navigation/index.d.cts +27 -1
  238. package/dist/navigation/index.d.ts +27 -1
  239. package/dist/navigation/index.js +6 -1
  240. package/dist/navigation/index.js.map +1 -1
  241. package/dist/{middleware/__fixtures__/middleware/auth.cjs → navigation/layout_preservation.cjs} +18 -20
  242. package/dist/navigation/layout_preservation.cjs.map +1 -0
  243. package/dist/navigation/layout_preservation.d.cts +2 -0
  244. package/dist/navigation/layout_preservation.d.ts +2 -0
  245. package/dist/navigation/layout_preservation.js +18 -0
  246. package/dist/navigation/layout_preservation.js.map +1 -0
  247. package/dist/parser/index.cjs +2 -0
  248. package/dist/parser/index.cjs.map +1 -1
  249. package/dist/parser/index.d.cts +1 -1
  250. package/dist/parser/index.d.ts +1 -1
  251. package/dist/parser/index.js +2 -1
  252. package/dist/parser/index.js.map +1 -1
  253. package/dist/parser/operations_parser.cjs +6 -0
  254. package/dist/parser/operations_parser.cjs.map +1 -1
  255. package/dist/parser/operations_parser.d.cts +9 -2
  256. package/dist/parser/operations_parser.d.ts +9 -2
  257. package/dist/parser/operations_parser.js +5 -0
  258. package/dist/parser/operations_parser.js.map +1 -1
  259. package/dist/parser/views_parser.cjs.map +1 -1
  260. package/dist/parser/views_parser.js.map +1 -1
  261. package/dist/router/index.d.cts +1 -0
  262. package/dist/router/index.d.ts +1 -0
  263. package/dist/router/wood_router.cjs +35 -3
  264. package/dist/router/wood_router.cjs.map +1 -1
  265. package/dist/router/wood_router.d.cts +15 -0
  266. package/dist/router/wood_router.d.ts +15 -0
  267. package/dist/router/wood_router.js +36 -4
  268. package/dist/router/wood_router.js.map +1 -1
  269. package/dist/runtime/get_container.cjs +9 -34
  270. package/dist/runtime/get_container.cjs.map +1 -1
  271. package/dist/runtime/get_container.d.cts +24 -4
  272. package/dist/runtime/get_container.d.ts +24 -4
  273. package/dist/runtime/get_container.js +8 -23
  274. package/dist/runtime/get_container.js.map +1 -1
  275. package/dist/runtime/index.cjs +9 -0
  276. package/dist/runtime/index.cjs.map +1 -1
  277. package/dist/runtime/index.d.cts +5 -2
  278. package/dist/runtime/index.d.ts +5 -2
  279. package/dist/runtime/index.js +10 -1
  280. package/dist/runtime/index.js.map +1 -1
  281. package/dist/runtime/renderer_config_extension.cjs +50 -0
  282. package/dist/runtime/renderer_config_extension.cjs.map +1 -0
  283. package/dist/runtime/renderer_config_extension.d.cts +19 -0
  284. package/dist/runtime/renderer_config_extension.d.ts +19 -0
  285. package/dist/runtime/renderer_config_extension.js +24 -0
  286. package/dist/runtime/renderer_config_extension.js.map +1 -0
  287. package/dist/runtime/renderer_log_batch_receiver.cjs +73 -0
  288. package/dist/runtime/renderer_log_batch_receiver.cjs.map +1 -0
  289. package/dist/runtime/renderer_log_batch_receiver.d.cts +29 -0
  290. package/dist/runtime/renderer_log_batch_receiver.d.ts +29 -0
  291. package/dist/runtime/renderer_log_batch_receiver.js +48 -0
  292. package/dist/runtime/renderer_log_batch_receiver.js.map +1 -0
  293. package/dist/runtime/renderer_trace_batch_receiver_registry.d.cts +1 -1
  294. package/dist/runtime/renderer_trace_batch_receiver_registry.d.ts +1 -1
  295. package/dist/runtime/runtime.cjs +14 -0
  296. package/dist/runtime/runtime.cjs.map +1 -1
  297. package/dist/runtime/runtime.d.cts +2 -1
  298. package/dist/runtime/runtime.d.ts +2 -1
  299. package/dist/runtime/runtime.js +14 -0
  300. package/dist/runtime/runtime.js.map +1 -1
  301. package/dist/stick/index.cjs.map +1 -1
  302. package/dist/stick/index.js.map +1 -1
  303. package/dist/testing/automation_assertions.cjs +417 -0
  304. package/dist/testing/automation_assertions.cjs.map +1 -0
  305. package/dist/testing/automation_assertions.d.cts +44 -0
  306. package/dist/testing/automation_assertions.d.ts +44 -0
  307. package/dist/testing/automation_assertions.js +385 -0
  308. package/dist/testing/automation_assertions.js.map +1 -0
  309. package/dist/testing/browser.cjs +130 -57
  310. package/dist/testing/browser.cjs.map +1 -1
  311. package/dist/testing/browser.d.cts +10 -4
  312. package/dist/testing/browser.d.ts +10 -4
  313. package/dist/testing/browser.js +132 -53
  314. package/dist/testing/browser.js.map +1 -1
  315. package/dist/testing/create_controller_harness.cjs +28 -8
  316. package/dist/testing/create_controller_harness.cjs.map +1 -1
  317. package/dist/testing/create_controller_harness.d.cts +18 -2
  318. package/dist/testing/create_controller_harness.d.ts +18 -2
  319. package/dist/testing/create_controller_harness.js +28 -8
  320. package/dist/testing/create_controller_harness.js.map +1 -1
  321. package/dist/testing/create_router_bridge.d.cts +1 -0
  322. package/dist/testing/create_router_bridge.d.ts +1 -0
  323. package/dist/testing/create_test_router.d.cts +1 -0
  324. package/dist/testing/create_test_router.d.ts +1 -0
  325. package/dist/testing/geometry.cjs +109 -0
  326. package/dist/testing/geometry.cjs.map +1 -0
  327. package/dist/testing/geometry.d.cts +45 -0
  328. package/dist/testing/geometry.d.ts +45 -0
  329. package/dist/testing/geometry.js +79 -0
  330. package/dist/testing/geometry.js.map +1 -0
  331. package/dist/testing/index.cjs +62 -2
  332. package/dist/testing/index.cjs.map +1 -1
  333. package/dist/testing/index.d.cts +23 -4
  334. package/dist/testing/index.d.ts +23 -4
  335. package/dist/testing/index.js +50 -2
  336. package/dist/testing/index.js.map +1 -1
  337. package/dist/{controller/__fixtures__/controllers/not_a_class.cjs → testing/test_wood.cjs} +15 -7
  338. package/dist/testing/test_wood.cjs.map +1 -0
  339. package/dist/testing/test_wood.d.cts +16 -0
  340. package/dist/testing/test_wood.d.ts +16 -0
  341. package/dist/testing/test_wood.js +12 -0
  342. package/dist/testing/test_wood.js.map +1 -0
  343. package/dist/testing/test_wood_config.cjs +272 -0
  344. package/dist/testing/test_wood_config.cjs.map +1 -0
  345. package/dist/testing/test_wood_config.d.cts +111 -0
  346. package/dist/testing/test_wood_config.d.ts +111 -0
  347. package/dist/testing/test_wood_config.js +247 -0
  348. package/dist/testing/test_wood_config.js.map +1 -0
  349. package/dist/testing/wood_config_source.cjs +146 -0
  350. package/dist/testing/wood_config_source.cjs.map +1 -0
  351. package/dist/testing/wood_config_source.d.cts +36 -0
  352. package/dist/testing/wood_config_source.d.ts +36 -0
  353. package/dist/testing/wood_config_source.js +112 -0
  354. package/dist/testing/wood_config_source.js.map +1 -0
  355. package/dist/testing/wood_env_renderer.cjs +210 -0
  356. package/dist/testing/wood_env_renderer.cjs.map +1 -0
  357. package/dist/testing/wood_env_renderer.d.cts +74 -0
  358. package/dist/testing/wood_env_renderer.d.ts +74 -0
  359. package/dist/testing/wood_env_renderer.js +188 -0
  360. package/dist/testing/wood_env_renderer.js.map +1 -0
  361. package/dist/testing/wood_test_selection.cjs +94 -0
  362. package/dist/testing/wood_test_selection.cjs.map +1 -0
  363. package/dist/testing/wood_test_selection.d.cts +39 -0
  364. package/dist/testing/wood_test_selection.d.ts +39 -0
  365. package/dist/testing/wood_test_selection.js +68 -0
  366. package/dist/testing/wood_test_selection.js.map +1 -0
  367. package/dist/trace-testing/index.d.cts +1 -2
  368. package/dist/trace-testing/index.d.ts +1 -2
  369. package/dist/trace-testing/trace_recorder.cjs +1 -1
  370. package/dist/trace-testing/trace_recorder.cjs.map +1 -1
  371. package/dist/trace-testing/trace_recorder.d.cts +1 -2
  372. package/dist/trace-testing/trace_recorder.d.ts +1 -2
  373. package/dist/trace-testing/trace_recorder.js +1 -1
  374. package/dist/trace-testing/trace_recorder.js.map +1 -1
  375. package/dist/trace-transport/index.d.cts +1 -1
  376. package/dist/trace-transport/index.d.ts +1 -1
  377. package/dist/{trace_hub-Cob54qRx.d.cts → trace_hub-Cpo_nVze.d.cts} +21 -1
  378. package/dist/{trace_hub-Cob54qRx.d.ts → trace_hub-Cpo_nVze.d.ts} +21 -1
  379. package/dist/tracing/index.cjs +9 -2
  380. package/dist/tracing/index.cjs.map +1 -1
  381. package/dist/tracing/index.d.cts +3 -2
  382. package/dist/tracing/index.d.ts +3 -2
  383. package/dist/tracing/index.js +7 -1
  384. package/dist/tracing/index.js.map +1 -1
  385. package/dist/tracing/renderer_trace_batch_host.d.cts +1 -1
  386. package/dist/tracing/renderer_trace_batch_host.d.ts +1 -1
  387. package/dist/tracing/renderer_trace_batch_transport.cjs +48 -6
  388. package/dist/tracing/renderer_trace_batch_transport.cjs.map +1 -1
  389. package/dist/tracing/renderer_trace_batch_transport.d.cts +17 -1
  390. package/dist/tracing/renderer_trace_batch_transport.d.ts +17 -1
  391. package/dist/tracing/renderer_trace_batch_transport.js +48 -6
  392. package/dist/tracing/renderer_trace_batch_transport.js.map +1 -1
  393. package/dist/tracing/trace_batch_adapter.cjs +110 -0
  394. package/dist/tracing/trace_batch_adapter.cjs.map +1 -0
  395. package/dist/tracing/trace_batch_adapter.d.cts +36 -0
  396. package/dist/tracing/trace_batch_adapter.d.ts +36 -0
  397. package/dist/tracing/trace_batch_adapter.js +86 -0
  398. package/dist/tracing/trace_batch_adapter.js.map +1 -0
  399. package/dist/tracing/trace_commit_writer.d.cts +1 -1
  400. package/dist/tracing/trace_commit_writer.d.ts +1 -1
  401. package/dist/tracing/trace_hub.cjs +87 -20
  402. package/dist/tracing/trace_hub.cjs.map +1 -1
  403. package/dist/tracing/trace_hub.d.cts +1 -1
  404. package/dist/tracing/trace_hub.d.ts +1 -1
  405. package/dist/tracing/trace_hub.js +85 -20
  406. package/dist/tracing/trace_hub.js.map +1 -1
  407. package/dist/tracing/trace_provider.cjs +21 -6
  408. package/dist/tracing/trace_provider.cjs.map +1 -1
  409. package/dist/tracing/trace_provider.d.cts +13 -4
  410. package/dist/tracing/trace_provider.d.ts +13 -4
  411. package/dist/tracing/trace_provider.js +22 -7
  412. package/dist/tracing/trace_provider.js.map +1 -1
  413. package/dist/tracing/types/wood_trace_batch.types.cjs.map +1 -1
  414. package/dist/tracing/types/wood_trace_batch.types.d.cts +15 -1
  415. package/dist/tracing/types/wood_trace_batch.types.d.ts +15 -1
  416. package/dist/tracing/types/wood_trace_sink.types.d.cts +1 -1
  417. package/dist/tracing/types/wood_trace_sink.types.d.ts +1 -1
  418. package/dist/tracing/wood_trace_batch_contract.cjs +2 -0
  419. package/dist/tracing/wood_trace_batch_contract.cjs.map +1 -1
  420. package/dist/tracing/wood_trace_batch_contract.d.cts +1 -1
  421. package/dist/tracing/wood_trace_batch_contract.d.ts +1 -1
  422. package/dist/tracing/wood_trace_batch_contract.js +2 -0
  423. package/dist/tracing/wood_trace_batch_contract.js.map +1 -1
  424. package/dist/transport/build_transport_bridge.cjs +4 -2
  425. package/dist/transport/build_transport_bridge.cjs.map +1 -1
  426. package/dist/transport/build_transport_bridge.d.cts +7 -1
  427. package/dist/transport/build_transport_bridge.d.ts +7 -1
  428. package/dist/transport/build_transport_bridge.js +2 -1
  429. package/dist/transport/build_transport_bridge.js.map +1 -1
  430. package/dist/transport/in_process_router_transport.d.cts +1 -0
  431. package/dist/transport/in_process_router_transport.d.ts +1 -0
  432. package/dist/transport/index.d.cts +1 -0
  433. package/dist/transport/index.d.ts +1 -0
  434. package/dist/types/config.cjs.map +1 -1
  435. package/dist/types/config.d.cts +47 -1
  436. package/dist/types/config.d.ts +47 -1
  437. package/dist/types/context.cjs +12 -0
  438. package/dist/types/context.cjs.map +1 -1
  439. package/dist/types/context.d.cts +27 -1
  440. package/dist/types/context.d.ts +27 -1
  441. package/dist/types/context.js +4 -0
  442. package/dist/types/context.js.map +1 -1
  443. package/dist/types/index.d.cts +2 -2
  444. package/dist/types/index.d.ts +2 -2
  445. package/dist/types/operations.cjs.map +1 -1
  446. package/dist/types/operations.d.cts +2 -0
  447. package/dist/types/operations.d.ts +2 -0
  448. package/docs/axe.md +706 -0
  449. package/package.json +19 -5
  450. package/src/components/NavigationShell.scopes.browser.test.ts +363 -0
  451. package/src/components/NavigationShell.svelte +126 -49
  452. package/dist/controller/__fixtures__/controllers/chat.cjs +0 -32
  453. package/dist/controller/__fixtures__/controllers/chat.cjs.map +0 -1
  454. package/dist/controller/__fixtures__/controllers/chat.d.cts +0 -11
  455. package/dist/controller/__fixtures__/controllers/chat.d.ts +0 -11
  456. package/dist/controller/__fixtures__/controllers/chat.js +0 -12
  457. package/dist/controller/__fixtures__/controllers/chat.js.map +0 -1
  458. package/dist/controller/__fixtures__/controllers/not_a_class.cjs.map +0 -1
  459. package/dist/controller/__fixtures__/controllers/not_a_class.d.cts +0 -3
  460. package/dist/controller/__fixtures__/controllers/not_a_class.d.ts +0 -3
  461. package/dist/controller/__fixtures__/controllers/not_a_class.js +0 -5
  462. package/dist/controller/__fixtures__/controllers/not_a_class.js.map +0 -1
  463. package/dist/controller/__fixtures__/controllers/settings.controller.cjs +0 -32
  464. package/dist/controller/__fixtures__/controllers/settings.controller.cjs.map +0 -1
  465. package/dist/controller/__fixtures__/controllers/settings.controller.d.cts +0 -12
  466. package/dist/controller/__fixtures__/controllers/settings.controller.d.ts +0 -12
  467. package/dist/controller/__fixtures__/controllers/settings.controller.js +0 -12
  468. package/dist/controller/__fixtures__/controllers/settings.controller.js.map +0 -1
  469. package/dist/controller/__fixtures__/controllers/test.cjs.map +0 -1
  470. package/dist/controller/__fixtures__/controllers/test.d.cts +0 -7
  471. package/dist/controller/__fixtures__/controllers/test.d.ts +0 -7
  472. package/dist/controller/__fixtures__/controllers/test.js +0 -9
  473. package/dist/controller/__fixtures__/controllers/test.js.map +0 -1
  474. package/dist/loader/__fixtures__/layouts/app.load.cjs.map +0 -1
  475. package/dist/loader/__fixtures__/layouts/app.load.d.cts +0 -5
  476. package/dist/loader/__fixtures__/layouts/app.load.d.ts +0 -5
  477. package/dist/loader/__fixtures__/layouts/app.load.js +0 -7
  478. package/dist/loader/__fixtures__/layouts/app.load.js.map +0 -1
  479. package/dist/loader/__fixtures__/views/test/page.load.cjs.map +0 -1
  480. package/dist/loader/__fixtures__/views/test/page.load.d.cts +0 -6
  481. package/dist/loader/__fixtures__/views/test/page.load.d.ts +0 -6
  482. package/dist/loader/__fixtures__/views/test/page.load.js +0 -7
  483. package/dist/loader/__fixtures__/views/test/page.load.js.map +0 -1
  484. package/dist/middleware/__fixtures__/middleware/auth.cjs.map +0 -1
  485. package/dist/middleware/__fixtures__/middleware/auth.d.cts +0 -6
  486. package/dist/middleware/__fixtures__/middleware/auth.d.ts +0 -6
  487. package/dist/middleware/__fixtures__/middleware/auth.js +0 -19
  488. package/dist/middleware/__fixtures__/middleware/auth.js.map +0 -1
  489. package/dist/middleware/__fixtures__/middleware/sequence.cjs.map +0 -1
  490. package/dist/middleware/__fixtures__/middleware/sequence.d.cts +0 -7
  491. package/dist/middleware/__fixtures__/middleware/sequence.d.ts +0 -7
  492. package/dist/middleware/__fixtures__/middleware/sequence.js +0 -21
  493. package/dist/middleware/__fixtures__/middleware/sequence.js.map +0 -1
@@ -0,0 +1,64 @@
1
+ import { Navigation } from '../navigation/index.js';
2
+ import { ViewDef } from '../types/views.js';
3
+ import { PageCatalog } from './page_catalog.js';
4
+ import { WorkRegistry, WorkFailure } from './work_registry.js';
5
+ export { FrontendWorkError } from './work_registry.js';
6
+ export { FrontendLifecycle } from './frontend_lifecycle.js';
7
+ import { FrontendPage } from './frontend_page.js';
8
+ import '../navigation/automation_introspection.js';
9
+
10
+ interface FrontendOpenOptions {
11
+ /** Required production page identity (`window.page`, or unambiguous leaf). */
12
+ page: string;
13
+ params?: Record<string, string>;
14
+ query?: Record<string, string>;
15
+ }
16
+ interface FrontendApplicationSurface {
17
+ open(options: FrontendOpenOptions): Promise<FrontendPage>;
18
+ current(): FrontendPage | null;
19
+ act(action: () => unknown | Promise<unknown>): Promise<void>;
20
+ settle(): Promise<void>;
21
+ readonly errors: readonly WorkFailure[];
22
+ /** The environment-local production Navigation instance. */
23
+ readonly navigation: Navigation;
24
+ /** Internal: dispose the active page and application lifecycles. */
25
+ dispose(): Promise<void>;
26
+ }
27
+ interface ScopeLike {
28
+ extend(): ScopeLike;
29
+ get(token: unknown): Promise<unknown>;
30
+ registerClass?(target: unknown, options?: unknown): void;
31
+ registerFunction?(token: unknown, factory: () => unknown, options?: unknown): void;
32
+ registerValue?(token: unknown, value: unknown): void;
33
+ dispose?(): Promise<void>;
34
+ }
35
+ interface PageScopeContext {
36
+ kind: 'page' | 'layout';
37
+ /** Layout index within the view's layout stack (layout scopes only). */
38
+ layoutIndex?: number;
39
+ /** Controller identity bound to this scope. */
40
+ controller: string;
41
+ }
42
+ interface CreateFrontendSurfaceOptions {
43
+ /** The selected renderer aperture. */
44
+ catalog: PageCatalog;
45
+ /** Fresh renderer root for this environment (separate from the main root). */
46
+ rendererRoot: ScopeLike;
47
+ registry: WorkRegistry;
48
+ /** Environment-local Navigation (also registered on the renderer root). */
49
+ navigation: Navigation;
50
+ /** Resolve a production controller identity to its class. */
51
+ resolveController: (identity: string, view: ViewDef) => Promise<new (...args: never[]) => unknown>;
52
+ /** Per-pass reactive flush hooks from the active runtime adapter (Node: none). */
53
+ flushHooks?: ReadonlyArray<() => void | Promise<void>>;
54
+ /**
55
+ * Register per-scope services on a newly created scope (bridge client,
56
+ * etc.). Called for the page scope, and once for each PRESERVED layout
57
+ * that owns a dedicated scope — `context.kind` says which, so a caller
58
+ * that tracks "the page scope" does not mistake a layout scope for it.
59
+ */
60
+ configurePageScope?: (scope: ScopeLike, view: ViewDef, context: PageScopeContext) => void | Promise<void>;
61
+ }
62
+ declare function createFrontendSurface(options: CreateFrontendSurfaceOptions): FrontendApplicationSurface;
63
+
64
+ export { type CreateFrontendSurfaceOptions, type FrontendApplicationSurface, type FrontendOpenOptions, type PageScopeContext, createFrontendSurface };
@@ -0,0 +1,224 @@
1
+ import { ExecutionContext, LoadAs } from "@noego/ioc";
2
+ import { computePreservedLayoutDepth } from "../navigation/layout_preservation.js";
3
+ import { disposeControllerLifecycle } from "../controller/controller_lifecycle.js";
4
+ import { PageCatalogError, pageIdentity } from "./page_catalog.js";
5
+ import { FrontendWorkError } from "./work_registry.js";
6
+ import { FrontendLifecycleOwner } from "./frontend_lifecycle.js";
7
+ import { createFrontendPage } from "./frontend_page.js";
8
+ function registerControllerUnlessBound(scope, ControllerClass) {
9
+ const registrable = scope;
10
+ if (typeof registrable.isRegistered === "function" && registrable.isRegistered(ControllerClass)) return;
11
+ if (typeof scope.registerClass === "function") scope.registerClass(ControllerClass);
12
+ }
13
+ function guardControllerLifecycleOnce(instance) {
14
+ if (!instance || typeof instance !== "object") return;
15
+ const target = instance;
16
+ for (const hook of ["dispose", "destroy"]) {
17
+ const original = target[hook];
18
+ if (typeof original !== "function") continue;
19
+ if (Object.prototype.hasOwnProperty.call(target, hook)) continue;
20
+ let called = false;
21
+ Object.defineProperty(target, hook, {
22
+ configurable: true,
23
+ writable: true,
24
+ enumerable: false,
25
+ value: function guarded(...args) {
26
+ if (called) return void 0;
27
+ called = true;
28
+ return original.apply(this, args);
29
+ }
30
+ });
31
+ }
32
+ }
33
+ function createFrontendSurface(options) {
34
+ const { catalog, rendererRoot, registry, navigation } = options;
35
+ const flushHooks = options.flushHooks ?? [];
36
+ const application = new FrontendLifecycleOwner(registry, "application");
37
+ let active = null;
38
+ let transitioning = false;
39
+ let disposed = false;
40
+ const currentOwner = () => active ? `page ${active.identity}` : "application";
41
+ async function constructPage(view, params, query, preserved = []) {
42
+ const identity = pageIdentity(view);
43
+ if (!view.controller) {
44
+ throw new PageCatalogError(
45
+ `page "${identity}" declares no controller in its view definition; the Node application slice drives public PageController input and needs one.`
46
+ );
47
+ }
48
+ const ControllerClass = await options.resolveController(view.controller, view);
49
+ const scope = rendererRoot.extend();
50
+ const lifecycle = new FrontendLifecycleOwner(registry, `page ${identity}`);
51
+ scope.registerFunction?.(FrontendLifecycleOwner, () => lifecycle, { loadAs: LoadAs.Scoped });
52
+ await options.configurePageScope?.(scope, view, {
53
+ kind: "page",
54
+ controller: view.controller
55
+ });
56
+ registerControllerUnlessBound(scope, ControllerClass);
57
+ const layouts = [...preserved];
58
+ for (let index = preserved.length; index < view.layouts.length; index += 1) {
59
+ const layoutIdentity = view.layoutControllers?.[index];
60
+ if (!layoutIdentity) continue;
61
+ const preserve = view.layoutPreserve?.[index] === true;
62
+ const LayoutClass = await options.resolveController(layoutIdentity, view);
63
+ const ownScope = preserve ? rendererRoot.extend() : null;
64
+ const ownLifecycle = ownScope ? new FrontendLifecycleOwner(registry, `layout ${layoutIdentity}`) : null;
65
+ const layoutScope = ownScope ?? scope;
66
+ if (ownScope) {
67
+ ownScope.registerFunction?.(FrontendLifecycleOwner, () => ownLifecycle, { loadAs: LoadAs.Scoped });
68
+ await options.configurePageScope?.(ownScope, view, {
69
+ kind: "layout",
70
+ layoutIndex: index,
71
+ controller: layoutIdentity
72
+ });
73
+ }
74
+ registerControllerUnlessBound(layoutScope, LayoutClass);
75
+ const instance = await ExecutionContext.run(
76
+ layoutScope,
77
+ () => layoutScope.get(LayoutClass)
78
+ );
79
+ guardControllerLifecycleOnce(instance);
80
+ layouts.push({
81
+ index,
82
+ path: view.layouts[index],
83
+ controller: layoutIdentity,
84
+ preserve,
85
+ instance,
86
+ scope: layoutScope,
87
+ ownScope,
88
+ ownLifecycle
89
+ });
90
+ }
91
+ const controller = await ExecutionContext.run(
92
+ scope,
93
+ () => scope.get(ControllerClass)
94
+ );
95
+ guardControllerLifecycleOnce(controller);
96
+ if (typeof controller.initialize === "function") {
97
+ await registry.track(
98
+ Promise.resolve(
99
+ ExecutionContext.run(
100
+ scope,
101
+ () => controller.initialize({ params, query })
102
+ )
103
+ ).then(() => void 0),
104
+ { label: `initialize ${identity}`, kind: "initialize", owner: `page ${identity}` }
105
+ );
106
+ }
107
+ const handle = createFrontendPage({
108
+ identity,
109
+ controller,
110
+ scope,
111
+ layouts,
112
+ onClose: async () => {
113
+ await disposePage(identity);
114
+ }
115
+ });
116
+ return { identity, view, scope, lifecycle, handle, controller, layouts };
117
+ }
118
+ async function endPage(page, preservedDepth = 0) {
119
+ page.handle.invalidate();
120
+ await disposeControllerLifecycle(page.controller);
121
+ for (const layout of page.layouts) {
122
+ if (layout.index < preservedDepth) continue;
123
+ await disposeControllerLifecycle(layout.instance);
124
+ }
125
+ await page.lifecycle.dispose();
126
+ if (typeof page.scope.dispose === "function") {
127
+ await page.scope.dispose();
128
+ }
129
+ for (const layout of page.layouts) {
130
+ if (layout.index < preservedDepth) continue;
131
+ await layout.ownLifecycle?.dispose();
132
+ if (layout.ownScope && typeof layout.ownScope.dispose === "function") {
133
+ await layout.ownScope.dispose();
134
+ }
135
+ }
136
+ }
137
+ async function disposePage(identity) {
138
+ if (!active || active.identity !== identity) return;
139
+ const ended = active;
140
+ active = null;
141
+ await endPage(ended);
142
+ }
143
+ async function transitionTo(entry) {
144
+ const view = catalog.resolve(entry.page);
145
+ const previous = active;
146
+ const depth = previous ? computePreservedLayoutDepth(
147
+ { layoutPaths: previous.view.layouts, layoutControllers: previous.view.layoutControllers, layoutPreserve: previous.view.layoutPreserve },
148
+ { layoutPaths: view.layouts, layoutControllers: view.layoutControllers, layoutPreserve: view.layoutPreserve },
149
+ entry.options ?? {}
150
+ ) : 0;
151
+ const carried = previous ? previous.layouts.filter((layout) => layout.index < depth) : [];
152
+ const next = await constructPage(view, entry.params, entry.query, carried);
153
+ active = next;
154
+ if (previous) {
155
+ await endPage(previous, depth);
156
+ }
157
+ }
158
+ navigation.subscribe((entry) => {
159
+ if (!entry || transitioning || disposed) return;
160
+ if (active && entry.page === active.identity) return;
161
+ if (!active) return;
162
+ registry.track(transitionTo(entry), {
163
+ label: `navigate ${active.identity} -> ${entry.page}`,
164
+ kind: "navigation",
165
+ owner: currentOwner()
166
+ });
167
+ });
168
+ return {
169
+ navigation,
170
+ async open(openOptions) {
171
+ if (!openOptions || typeof openOptions.page !== "string" || !openOptions.page.length) {
172
+ throw new PageCatalogError("frontend.open() requires an explicit { page } identity");
173
+ }
174
+ if (active) {
175
+ throw new PageCatalogError(
176
+ `frontend.open() is test bootstrap; page "${active.identity}" is already open. Drive production navigation for subsequent route changes, or close() the page first.`
177
+ );
178
+ }
179
+ const view = catalog.resolve(openOptions.page);
180
+ const params = openOptions.params ?? {};
181
+ const query = openOptions.query ?? {};
182
+ transitioning = true;
183
+ try {
184
+ navigation.replace(pageIdentity(view), params, query);
185
+ active = await constructPage(view, params, query);
186
+ } finally {
187
+ transitioning = false;
188
+ }
189
+ return active.handle.page;
190
+ },
191
+ current() {
192
+ return active ? active.handle.page : null;
193
+ },
194
+ async act(action) {
195
+ await registry.track(
196
+ Promise.resolve().then(() => action()).then(() => void 0),
197
+ { label: "act()", kind: "tracked", owner: currentOwner() }
198
+ ).catch(() => {
199
+ });
200
+ await registry.drain(flushHooks);
201
+ },
202
+ async settle() {
203
+ await registry.drain(flushHooks);
204
+ },
205
+ get errors() {
206
+ return registry.errors();
207
+ },
208
+ async dispose() {
209
+ if (disposed) return;
210
+ disposed = true;
211
+ if (active) {
212
+ const ended = active;
213
+ active = null;
214
+ await endPage(ended);
215
+ }
216
+ await application.dispose();
217
+ }
218
+ };
219
+ }
220
+ export {
221
+ FrontendWorkError,
222
+ createFrontendSurface
223
+ };
224
+ //# sourceMappingURL=frontend_surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frontend/frontend_surface.ts"],"sourcesContent":["/**\n * The Node frontend application surface (spec 18 §12–13, 18A D-FAS-01/02).\n *\n * frontend.open({ page, params, query }) — explicit initial page\n * frontend.current() — production navigation result\n * frontend.act(fn) / frontend.settle() — owned-work fixed-point drains\n * frontend.errors — observed owned-work failures\n *\n * Runtime honesty (D-FAS-02): this is the plain-Node tier. It proves\n * explicit PageController behavior, $state/$derived reachable through it,\n * backend calls, events, and navigation identity/lifecycle. It does not\n * create a Svelte component/root context and therefore proves no $effect,\n * mount/unmount, or DOM behavior — those belong to the happy-dom tier.\n *\n * Isolation: every environment owns its own Navigation instance, renderer\n * root, transport, and work registry. Nothing here writes globalThis and\n * nothing calls the production client getters — two environments run\n * concurrently without cross-talk. A controller that calls the module-level\n * `go()`/`getNavigation()` free functions bypasses its environment; this\n * tier requires constructor-injected `Navigation`.\n */\nimport { ExecutionContext, LoadAs } from '@noego/ioc';\nimport { Navigation, type NavigationEntry } from '../navigation/index.js';\nimport { computePreservedLayoutDepth } from '../navigation/layout_preservation.js';\nimport { disposeControllerLifecycle } from '../controller/controller_lifecycle.js';\nimport type { ViewDef } from '../types/index.js';\nimport { PageCatalog, PageCatalogError, pageIdentity } from './page_catalog.js';\nimport { WorkRegistry, FrontendWorkError, type WorkFailure } from './work_registry.js';\nimport { FrontendLifecycleOwner, type FrontendLifecycle } from './frontend_lifecycle.js';\nimport { createFrontendPage, type FrontendPage, type FrontendPageHandle, type MountedLayout } from './frontend_page.js';\n\nexport interface FrontendOpenOptions {\n /** Required production page identity (`window.page`, or unambiguous leaf). */\n page: string;\n params?: Record<string, string>;\n query?: Record<string, string>;\n}\n\nexport interface FrontendApplicationSurface {\n open(options: FrontendOpenOptions): Promise<FrontendPage>;\n current(): FrontendPage | null;\n act(action: () => unknown | Promise<unknown>): Promise<void>;\n settle(): Promise<void>;\n readonly errors: readonly WorkFailure[];\n /** The environment-local production Navigation instance. */\n readonly navigation: Navigation;\n /** Internal: dispose the active page and application lifecycles. */\n dispose(): Promise<void>;\n}\n\ninterface ScopeLike {\n extend(): ScopeLike;\n get(token: unknown): Promise<unknown>;\n registerClass?(target: unknown, options?: unknown): void;\n registerFunction?(token: unknown, factory: () => unknown, options?: unknown): void;\n registerValue?(token: unknown, value: unknown): void;\n dispose?(): Promise<void>;\n}\n\n/**\n * A mounted layout controller and the scope that owns it. A layout declared\n * `preserve: true` owns a DEDICATED scope that survives page transitions\n * (production parity: `createControllerSet`); every other layout shares the\n * page scope and dies with the page.\n */\ninterface ActiveLayout extends MountedLayout {\n index: number;\n /** Non-null only for a preserved layout that owns its scope. */\n ownScope: ScopeLike | null;\n /**\n * A preserved layout outlives the page that built it, so it cannot borrow\n * that page's lifecycle owner — it owns one, disposed when the layout is\n * finally dropped.\n */\n ownLifecycle: FrontendLifecycleOwner | null;\n}\n\ninterface ActivePage {\n identity: string;\n view: ViewDef;\n scope: ScopeLike;\n lifecycle: FrontendLifecycleOwner;\n handle: FrontendPageHandle;\n controller: unknown;\n layouts: ActiveLayout[];\n}\n\nexport interface PageScopeContext {\n kind: 'page' | 'layout';\n /** Layout index within the view's layout stack (layout scopes only). */\n layoutIndex?: number;\n /** Controller identity bound to this scope. */\n controller: string;\n}\n\nexport interface CreateFrontendSurfaceOptions {\n /** The selected renderer aperture. */\n catalog: PageCatalog;\n /** Fresh renderer root for this environment (separate from the main root). */\n rendererRoot: ScopeLike;\n registry: WorkRegistry;\n /** Environment-local Navigation (also registered on the renderer root). */\n navigation: Navigation;\n /** Resolve a production controller identity to its class. */\n resolveController: (identity: string, view: ViewDef) => Promise<new (...args: never[]) => unknown>;\n /** Per-pass reactive flush hooks from the active runtime adapter (Node: none). */\n flushHooks?: ReadonlyArray<() => void | Promise<void>>;\n /**\n * Register per-scope services on a newly created scope (bridge client,\n * etc.). Called for the page scope, and once for each PRESERVED layout\n * that owns a dedicated scope — `context.kind` says which, so a caller\n * that tracks \"the page scope\" does not mistake a layout scope for it.\n */\n configurePageScope?: (\n scope: ScopeLike,\n view: ViewDef,\n context: PageScopeContext,\n ) => void | Promise<void>;\n}\n\n/**\n * Plain (undecorated) controller classes are registered on their scope so\n * they resolve — unless the hierarchy already decided how the token resolves\n * (a renderer-root substitution of the controller class), which keeps\n * winning inside the page scope.\n */\nfunction registerControllerUnlessBound(scope: ScopeLike, ControllerClass: unknown): void {\n const registrable = scope as { isRegistered?(token: unknown): boolean };\n if (typeof registrable.isRegistered === 'function' && registrable.isRegistered(ControllerClass)) return;\n if (typeof scope.registerClass === 'function') scope.registerClass(ControllerClass);\n}\n\n/**\n * Make a controller's production teardown hook run at most once.\n *\n * Two owners legitimately end a controller: this surface (production\n * parity — the renderer's NavigationShell calls the hook explicitly, and\n * for a Transient controller that is the ONLY call) and IoC scope\n * disposal (which calls `dispose()`/`destroy()` on the scoped instances it\n * owns). Shadowing the hook with a once-guard means a controller sees the\n * same single teardown whichever way it was registered.\n */\nfunction guardControllerLifecycleOnce(instance: unknown): void {\n if (!instance || typeof instance !== 'object') return;\n const target = instance as Record<string, unknown>;\n for (const hook of ['dispose', 'destroy'] as const) {\n const original = target[hook];\n if (typeof original !== 'function') continue;\n if (Object.prototype.hasOwnProperty.call(target, hook)) continue;\n let called = false;\n Object.defineProperty(target, hook, {\n configurable: true,\n writable: true,\n enumerable: false,\n value: function guarded(this: unknown, ...args: unknown[]) {\n if (called) return undefined;\n called = true;\n return (original as (...rest: unknown[]) => unknown).apply(this, args);\n },\n });\n }\n}\n\nexport function createFrontendSurface(options: CreateFrontendSurfaceOptions): FrontendApplicationSurface {\n const { catalog, rendererRoot, registry, navigation } = options;\n const flushHooks = options.flushHooks ?? [];\n const application = new FrontendLifecycleOwner(registry, 'application');\n\n let active: ActivePage | null = null;\n let transitioning = false;\n let disposed = false;\n\n const currentOwner = (): string => (active ? `page ${active.identity}` : 'application');\n\n async function constructPage(\n view: ViewDef,\n params: Record<string, string>,\n query: Record<string, string>,\n preserved: ActiveLayout[] = [],\n ): Promise<ActivePage> {\n const identity = pageIdentity(view);\n if (!view.controller) {\n throw new PageCatalogError(\n `page \"${identity}\" declares no controller in its view definition; ` +\n 'the Node application slice drives public PageController input and needs one.',\n );\n }\n\n const ControllerClass = await options.resolveController(view.controller, view);\n const scope = rendererRoot.extend();\n const lifecycle = new FrontendLifecycleOwner(registry, `page ${identity}`);\n\n // The page lifecycle is injectable so controllers can register\n // deliberately detached finite work (D-FAS-01 §2.2). Scoped, not\n // Singleton: the lifecycle belongs to this page scope alone — a\n // Singleton would store at the hierarchy root and leak the first\n // page's lifecycle into every later page.\n scope.registerFunction?.(FrontendLifecycleOwner, () => lifecycle, { loadAs: LoadAs.Scoped });\n await options.configurePageScope?.(scope, view, {\n kind: 'page',\n controller: view.controller,\n });\n registerControllerUnlessBound(scope, ControllerClass);\n\n // Layout controllers mount BEFORE the view controller (production\n // ordering in `createControllerSet`): a page controller may legitimately\n // read state a layout controller published during construction.\n const layouts: ActiveLayout[] = [...preserved];\n for (let index = preserved.length; index < view.layouts.length; index += 1) {\n const layoutIdentity = view.layoutControllers?.[index];\n if (!layoutIdentity) continue;\n const preserve = view.layoutPreserve?.[index] === true;\n const LayoutClass = await options.resolveController(layoutIdentity, view);\n const ownScope = preserve ? rendererRoot.extend() : null;\n const ownLifecycle = ownScope\n ? new FrontendLifecycleOwner(registry, `layout ${layoutIdentity}`)\n : null;\n const layoutScope = ownScope ?? scope;\n if (ownScope) {\n ownScope.registerFunction?.(FrontendLifecycleOwner, () => ownLifecycle!, { loadAs: LoadAs.Scoped });\n await options.configurePageScope?.(ownScope, view, {\n kind: 'layout',\n layoutIndex: index,\n controller: layoutIdentity,\n });\n }\n registerControllerUnlessBound(layoutScope, LayoutClass);\n const instance = (await ExecutionContext.run(layoutScope as never, () =>\n layoutScope.get(LayoutClass),\n )) as Record<string, unknown>;\n guardControllerLifecycleOnce(instance);\n layouts.push({\n index,\n path: view.layouts[index],\n controller: layoutIdentity,\n preserve,\n instance,\n scope: layoutScope,\n ownScope,\n ownLifecycle,\n });\n }\n\n const controller = (await ExecutionContext.run(scope as never, () =>\n scope.get(ControllerClass),\n )) as Record<string, unknown>;\n\n guardControllerLifecycleOnce(controller);\n\n if (typeof controller.initialize === 'function') {\n await registry.track(\n Promise.resolve(\n ExecutionContext.run(scope as never, () =>\n (controller.initialize as (load: unknown) => unknown)({ params, query }),\n ),\n ).then(() => undefined),\n { label: `initialize ${identity}`, kind: 'initialize', owner: `page ${identity}` },\n );\n }\n\n const handle = createFrontendPage({\n identity,\n controller,\n scope,\n layouts,\n onClose: async () => {\n await disposePage(identity);\n },\n });\n\n return { identity, view, scope, lifecycle, handle, controller, layouts };\n }\n\n /**\n * End a page: the page lifecycle owner first (abort signal, owned\n * resources), then the IoC scopes — scope disposal is what runs each\n * controller's production `dispose()`/`destroy()` hook, so nothing here\n * calls those directly. Layouts in the preserved prefix keep running:\n * they belong to the next page now.\n */\n async function endPage(page: ActivePage, preservedDepth = 0): Promise<void> {\n page.handle.invalidate();\n // Production teardown order (NavigationShell.disposeControllerSet): the\n // page controller's hook, then each ending layout's, then the lifecycle\n // owner and the IoC scopes. The hooks are once-guarded, so the scope\n // disposal below does not run them a second time.\n await disposeControllerLifecycle(page.controller);\n for (const layout of page.layouts) {\n if (layout.index < preservedDepth) continue;\n await disposeControllerLifecycle(layout.instance);\n }\n await page.lifecycle.dispose();\n // Page scope first, then dropped preserved layouts — production's\n // disposeControllerSet order (view controller, then layouts).\n if (typeof page.scope.dispose === 'function') {\n await page.scope.dispose();\n }\n for (const layout of page.layouts) {\n if (layout.index < preservedDepth) continue;\n await layout.ownLifecycle?.dispose();\n if (layout.ownScope && typeof layout.ownScope.dispose === 'function') {\n await layout.ownScope.dispose();\n }\n }\n }\n\n async function disposePage(identity: string): Promise<void> {\n if (!active || active.identity !== identity) return;\n const ended = active;\n active = null;\n await endPage(ended);\n }\n\n async function transitionTo(entry: NavigationEntry): Promise<void> {\n // Resolve the destination through the selected aperture — navigation\n // outside it fails without widening the environment.\n const view = catalog.resolve(entry.page);\n const previous = active;\n // Preserved layouts carry over as live instances — the transition never\n // reconstructs them (production `preserve: true` semantics).\n // Same preservation rule the renderer's NavigationShell applies.\n const depth = previous\n ? computePreservedLayoutDepth(\n { layoutPaths: previous.view.layouts, layoutControllers: previous.view.layoutControllers, layoutPreserve: previous.view.layoutPreserve },\n { layoutPaths: view.layouts, layoutControllers: view.layoutControllers, layoutPreserve: view.layoutPreserve },\n entry.options ?? {},\n )\n : 0;\n const carried = previous ? previous.layouts.filter((layout) => layout.index < depth) : [];\n const next = await constructPage(view, entry.params, entry.query, carried);\n active = next;\n if (previous) {\n await endPage(previous, depth);\n }\n }\n\n // Production navigation drives page transitions: a controller calling its\n // injected Navigation.go()/replace() inside the aperture triggers one\n // tracked finite navigation transition (18A D-FAS-01 §2.2).\n navigation.subscribe((entry) => {\n if (!entry || transitioning || disposed) return;\n if (active && entry.page === active.identity) return;\n if (!active) return; // initial open() seeds navigation itself\n registry.track(transitionTo(entry), {\n label: `navigate ${active.identity} -> ${entry.page}`,\n kind: 'navigation',\n owner: currentOwner(),\n });\n });\n\n return {\n navigation,\n\n async open(openOptions: FrontendOpenOptions): Promise<FrontendPage> {\n if (!openOptions || typeof openOptions.page !== 'string' || !openOptions.page.length) {\n throw new PageCatalogError('frontend.open() requires an explicit { page } identity');\n }\n if (active) {\n throw new PageCatalogError(\n `frontend.open() is test bootstrap; page \"${active.identity}\" is already open. ` +\n 'Drive production navigation for subsequent route changes, or close() the page first.',\n );\n }\n const view = catalog.resolve(openOptions.page);\n const params = openOptions.params ?? {};\n const query = openOptions.query ?? {};\n\n transitioning = true;\n try {\n // Seed production navigation state BEFORE construction: controllers\n // and their services legitimately read the current route (params,\n // query) during construction/initialize, exactly as in production\n // where the route exists before the page loads.\n navigation.replace(pageIdentity(view), params, query);\n active = await constructPage(view, params, query);\n } finally {\n transitioning = false;\n }\n return active.handle.page;\n },\n\n current(): FrontendPage | null {\n return active ? active.handle.page : null;\n },\n\n async act(action: () => unknown | Promise<unknown>): Promise<void> {\n await registry.track(\n Promise.resolve().then(() => action()).then(() => undefined),\n { label: 'act()', kind: 'tracked', owner: currentOwner() },\n ).catch(() => {\n // The failure is recorded by the registry; drain reports it with\n // its owner rather than losing the aggregate view.\n });\n await registry.drain(flushHooks);\n },\n\n async settle(): Promise<void> {\n await registry.drain(flushHooks);\n },\n\n get errors(): readonly WorkFailure[] {\n return registry.errors();\n },\n\n async dispose(): Promise<void> {\n if (disposed) return;\n disposed = true;\n if (active) {\n const ended = active;\n active = null;\n // Environment teardown ends everything, preserved layouts included.\n await endPage(ended);\n }\n await application.dispose();\n },\n };\n}\n\nexport type { FrontendLifecycle };\nexport { FrontendWorkError };\n"],"mappings":"AAqBA,SAAS,kBAAkB,cAAc;AAEzC,SAAS,mCAAmC;AAC5C,SAAS,kCAAkC;AAE3C,SAAsB,kBAAkB,oBAAoB;AAC5D,SAAuB,yBAA2C;AAClE,SAAS,8BAAsD;AAC/D,SAAS,0BAA0F;AAiGnG,SAAS,8BAA8B,OAAkB,iBAAgC;AACvF,QAAM,cAAc;AACpB,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AACtC,YAAM,QAAQ,YAAY,SAAS,CAAC;AAEpC,sBAAgB;AAChB,UAAI;AAKF,mBAAW,QAAQ,aAAa,IAAI,GAAG,QAAQ,KAAK;AACpD,iBAAS,MAAM,cAAc,MAAM,QAAQ,KAAK;AAAA,MAClD,UAAE;AACA,wBAAgB;AAAA,MAClB;AACA,aAAO,OAAO,OAAO;AAAA,IACvB;AAAA,IAEA,UAA+B;AAC7B,aAAO,SAAS,OAAO,OAAO,OAAO;AAAA,IACvC;AAAA,IAEA,MAAM,IAAI,QAAyD;AACjE,YAAM,SAAS;AAAA,QACb,QAAQ,QAAQ,EAAE,KAAK,MAAM,OAAO,CAAC,EAAE,KAAK,MAAM,MAAS;AAAA,QAC3D,EAAE,OAAO,SAAS,MAAM,WAAW,OAAO,aAAa,EAAE;AAAA,MAC3D,EAAE,MAAM,MAAM;AAAA,MAGd,CAAC;AACD,YAAM,SAAS,MAAM,UAAU;AAAA,IACjC;AAAA,IAEA,MAAM,SAAwB;AAC5B,YAAM,SAAS,MAAM,UAAU;AAAA,IACjC;AAAA,IAEA,IAAI,SAAiC;AACnC,aAAO,SAAS,OAAO;AAAA,IACzB;AAAA,IAEA,MAAM,UAAyB;AAC7B,UAAI,SAAU;AACd,iBAAW;AACX,UAAI,QAAQ;AACV,cAAM,QAAQ;AACd,iBAAS;AAET,cAAM,QAAQ,KAAK;AAAA,MACrB;AACA,YAAM,YAAY,QAAQ;AAAA,IAC5B;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var frontend_exports = {};
20
+ __export(frontend_exports, {
21
+ FrontendLifecycleOwner: () => import_frontend_lifecycle.FrontendLifecycleOwner,
22
+ FrontendWorkError: () => import_work_registry.FrontendWorkError,
23
+ PageCatalog: () => import_page_catalog.PageCatalog,
24
+ PageCatalogError: () => import_page_catalog.PageCatalogError,
25
+ TrackedTransport: () => import_tracked_transport.TrackedTransport,
26
+ WorkRegistry: () => import_work_registry.WorkRegistry,
27
+ createFrontendPage: () => import_frontend_page.createFrontendPage,
28
+ createFrontendSurface: () => import_frontend_surface.createFrontendSurface,
29
+ pageIdentity: () => import_page_catalog.pageIdentity,
30
+ parseViewsSource: () => import_page_catalog.parseViewsSource
31
+ });
32
+ module.exports = __toCommonJS(frontend_exports);
33
+ var import_work_registry = require("./work_registry.cjs");
34
+ var import_frontend_lifecycle = require("./frontend_lifecycle.cjs");
35
+ var import_page_catalog = require("./page_catalog.cjs");
36
+ var import_tracked_transport = require("./tracked_transport.cjs");
37
+ var import_frontend_page = require("./frontend_page.cjs");
38
+ var import_frontend_surface = require("./frontend_surface.cjs");
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ FrontendLifecycleOwner,
42
+ FrontendWorkError,
43
+ PageCatalog,
44
+ PageCatalogError,
45
+ TrackedTransport,
46
+ WorkRegistry,
47
+ createFrontendPage,
48
+ createFrontendSurface,
49
+ pageIdentity,
50
+ parseViewsSource
51
+ });
52
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frontend/index.ts"],"sourcesContent":["/**\n * Frontend application slice (spec 18 / 18A) — plain-Node tier.\n *\n * NOTE: keep re-exports single-line — the tsup extension-rewrite plugin\n * only rewrites single-line import/export specifiers.\n */\nexport { WorkRegistry, FrontendWorkError } from './work_registry.cjs';\nexport type { WorkDescriptor, WorkFailure, WorkKind, WorkOptions } from './work_registry.cjs';\nexport { FrontendLifecycleOwner } from './frontend_lifecycle.cjs';\nexport type { FrontendLifecycle } from './frontend_lifecycle.cjs';\nexport { PageCatalog, PageCatalogError, pageIdentity, parseViewsSource } from './page_catalog.cjs';\nexport type { RendererSelection, ViewsSource } from './page_catalog.cjs';\nexport { TrackedTransport } from './tracked_transport.cjs';\nexport { createFrontendPage } from './frontend_page.cjs';\nexport type { FrontendPage, FrontendPageHandle, FrontendLayout, MountedLayout } from './frontend_page.cjs';\nexport { createFrontendSurface } from './frontend_surface.cjs';\nexport type { FrontendApplicationSurface, FrontendOpenOptions, CreateFrontendSurfaceOptions, PageScopeContext } from './frontend_surface.cjs';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,2BAAgD;AAEhD,gCAAuC;AAEvC,0BAA8E;AAE9E,+BAAiC;AACjC,2BAAmC;AAEnC,8BAAsC;","names":[]}
@@ -0,0 +1,10 @@
1
+ export { FrontendWorkError, WorkDescriptor, WorkFailure, WorkKind, WorkOptions, WorkRegistry } from './work_registry.cjs';
2
+ export { FrontendLifecycle, FrontendLifecycleOwner } from './frontend_lifecycle.cjs';
3
+ export { PageCatalog, PageCatalogError, RendererSelection, ViewsSource, pageIdentity, parseViewsSource } from './page_catalog.cjs';
4
+ export { TrackedTransport } from './tracked_transport.cjs';
5
+ export { FrontendLayout, FrontendPage, FrontendPageHandle, MountedLayout, createFrontendPage } from './frontend_page.cjs';
6
+ export { CreateFrontendSurfaceOptions, FrontendApplicationSurface, FrontendOpenOptions, PageScopeContext, createFrontendSurface } from './frontend_surface.cjs';
7
+ import '../types/views.cjs';
8
+ import '../transport/wood_rpc_transport.cjs';
9
+ import '../navigation/index.cjs';
10
+ import '../navigation/automation_introspection.cjs';
@@ -0,0 +1,10 @@
1
+ export { FrontendWorkError, WorkDescriptor, WorkFailure, WorkKind, WorkOptions, WorkRegistry } from './work_registry.js';
2
+ export { FrontendLifecycle, FrontendLifecycleOwner } from './frontend_lifecycle.js';
3
+ export { PageCatalog, PageCatalogError, RendererSelection, ViewsSource, pageIdentity, parseViewsSource } from './page_catalog.js';
4
+ export { TrackedTransport } from './tracked_transport.js';
5
+ export { FrontendLayout, FrontendPage, FrontendPageHandle, MountedLayout, createFrontendPage } from './frontend_page.js';
6
+ export { CreateFrontendSurfaceOptions, FrontendApplicationSurface, FrontendOpenOptions, PageScopeContext, createFrontendSurface } from './frontend_surface.js';
7
+ import '../types/views.js';
8
+ import '../transport/wood_rpc_transport.js';
9
+ import '../navigation/index.js';
10
+ import '../navigation/automation_introspection.js';
@@ -0,0 +1,19 @@
1
+ import { WorkRegistry, FrontendWorkError } from "./work_registry.js";
2
+ import { FrontendLifecycleOwner } from "./frontend_lifecycle.js";
3
+ import { PageCatalog, PageCatalogError, pageIdentity, parseViewsSource } from "./page_catalog.js";
4
+ import { TrackedTransport } from "./tracked_transport.js";
5
+ import { createFrontendPage } from "./frontend_page.js";
6
+ import { createFrontendSurface } from "./frontend_surface.js";
7
+ export {
8
+ FrontendLifecycleOwner,
9
+ FrontendWorkError,
10
+ PageCatalog,
11
+ PageCatalogError,
12
+ TrackedTransport,
13
+ WorkRegistry,
14
+ createFrontendPage,
15
+ createFrontendSurface,
16
+ pageIdentity,
17
+ parseViewsSource
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frontend/index.ts"],"sourcesContent":["/**\n * Frontend application slice (spec 18 / 18A) — plain-Node tier.\n *\n * NOTE: keep re-exports single-line — the tsup extension-rewrite plugin\n * only rewrites single-line import/export specifiers.\n */\nexport { WorkRegistry, FrontendWorkError } from './work_registry.js';\nexport type { WorkDescriptor, WorkFailure, WorkKind, WorkOptions } from './work_registry.js';\nexport { FrontendLifecycleOwner } from './frontend_lifecycle.js';\nexport type { FrontendLifecycle } from './frontend_lifecycle.js';\nexport { PageCatalog, PageCatalogError, pageIdentity, parseViewsSource } from './page_catalog.js';\nexport type { RendererSelection, ViewsSource } from './page_catalog.js';\nexport { TrackedTransport } from './tracked_transport.js';\nexport { createFrontendPage } from './frontend_page.js';\nexport type { FrontendPage, FrontendPageHandle, FrontendLayout, MountedLayout } from './frontend_page.js';\nexport { createFrontendSurface } from './frontend_surface.js';\nexport type { FrontendApplicationSurface, FrontendOpenOptions, CreateFrontendSurfaceOptions, PageScopeContext } from './frontend_surface.js';\n"],"mappings":"AAMA,SAAS,cAAc,yBAAyB;AAEhD,SAAS,8BAA8B;AAEvC,SAAS,aAAa,kBAAkB,cAAc,wBAAwB;AAE9E,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AAEnC,SAAS,6BAA6B;","names":[]}
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var page_catalog_exports = {};
20
+ __export(page_catalog_exports, {
21
+ PageCatalog: () => PageCatalog,
22
+ PageCatalogError: () => PageCatalogError,
23
+ pageIdentity: () => pageIdentity,
24
+ parseViewsSource: () => parseViewsSource
25
+ });
26
+ module.exports = __toCommonJS(page_catalog_exports);
27
+ var import_views_parser = require("../parser/views_parser.cjs");
28
+ class PageCatalogError extends Error {
29
+ constructor(message) {
30
+ super(message);
31
+ this.name = "PageCatalogError";
32
+ }
33
+ }
34
+ function pageIdentity(view) {
35
+ return `${view.windowName}.${view.pageName}`;
36
+ }
37
+ function listIdentities(views) {
38
+ const identities = [...views].map(pageIdentity);
39
+ if (!identities.length) return "the source defines no views";
40
+ return `available pages:
41
+ ${identities.join("\n ")}`;
42
+ }
43
+ function parseViewsSource(source) {
44
+ if (Array.isArray(source)) return source;
45
+ if (typeof source === "string") return (0, import_views_parser.parseViews)(source);
46
+ throw new PageCatalogError("views must be YAML content or parsed ViewDef[]");
47
+ }
48
+ class PageCatalog {
49
+ constructor(views) {
50
+ this.byIdentity = /* @__PURE__ */ new Map();
51
+ for (const view of views) {
52
+ const identity = pageIdentity(view);
53
+ if (this.byIdentity.has(identity)) {
54
+ throw new PageCatalogError(`duplicate page identity "${identity}" in views source`);
55
+ }
56
+ this.byIdentity.set(identity, view);
57
+ }
58
+ }
59
+ get size() {
60
+ return this.byIdentity.size;
61
+ }
62
+ all() {
63
+ return [...this.byIdentity.values()];
64
+ }
65
+ /**
66
+ * Apply a renderer aperture selection. Exactly one of `window`, `page`,
67
+ * `pages` must be supplied (they are mutually exclusive in the final
68
+ * effective selection).
69
+ */
70
+ select(selection) {
71
+ const forms = ["window", "page", "pages"].filter(
72
+ (key) => selection[key] !== void 0
73
+ );
74
+ if (forms.length !== 1) {
75
+ throw new PageCatalogError(
76
+ "renderer selection requires exactly one of { window }, { page }, or { pages }" + (forms.length ? `; got: ${forms.join(", ")}` : "")
77
+ );
78
+ }
79
+ if (selection.window !== void 0) {
80
+ const matched2 = this.all().filter((view) => view.windowName === selection.window);
81
+ if (!matched2.length) {
82
+ const windows = [...new Set(this.all().map((view) => view.windowName))];
83
+ throw new PageCatalogError(
84
+ `unknown window "${selection.window}"; ` + (windows.length ? `available windows: ${windows.join(", ")}` : "the source defines no views")
85
+ );
86
+ }
87
+ return new PageCatalog(matched2);
88
+ }
89
+ const requested = selection.page !== void 0 ? [selection.page] : selection.pages;
90
+ if (!requested.length) {
91
+ throw new PageCatalogError("renderer selection { pages } requires at least one page identity");
92
+ }
93
+ const matched = requested.map((identity) => {
94
+ const view = this.byIdentity.get(identity);
95
+ if (!view) {
96
+ throw new PageCatalogError(
97
+ `unknown page "${identity}"; ${listIdentities(this.byIdentity.values())}`
98
+ );
99
+ }
100
+ return view;
101
+ });
102
+ return new PageCatalog(matched);
103
+ }
104
+ /**
105
+ * Resolve a page identity for `frontend.open()` or navigation. The
106
+ * canonical `window.page` identity is always accepted; a short leaf name
107
+ * is accepted only when exactly one selected page has that leaf.
108
+ */
109
+ resolve(page) {
110
+ const exact = this.byIdentity.get(page);
111
+ if (exact) return exact;
112
+ const leafMatches = this.all().filter((view) => view.pageName === page);
113
+ if (leafMatches.length === 1) return leafMatches[0];
114
+ if (leafMatches.length > 1) {
115
+ throw new PageCatalogError(
116
+ `page "${page}" is ambiguous in the selected aperture; use a fully qualified identity: ` + leafMatches.map(pageIdentity).join(", ")
117
+ );
118
+ }
119
+ throw new PageCatalogError(
120
+ `page "${page}" is not in the selected aperture; ${listIdentities(this.byIdentity.values())}
121
+ Widen the selection with select({ renderer: { window | pages } }) if this navigation is intentional.`
122
+ );
123
+ }
124
+ has(identity) {
125
+ return this.byIdentity.has(identity);
126
+ }
127
+ }
128
+ // Annotate the CommonJS export names for ESM import in node:
129
+ 0 && (module.exports = {
130
+ PageCatalog,
131
+ PageCatalogError,
132
+ pageIdentity,
133
+ parseViewsSource
134
+ });
135
+ //# sourceMappingURL=page_catalog.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frontend/page_catalog.ts"],"sourcesContent":["/**\n * Renderer page catalog and aperture selection (18A D-FAS-04).\n *\n * Wood's canonical page identity is the existing `window.page` view key\n * (`main.chat_dom`) — the first segment of the views YAML dot path is the\n * window name, the rest the page name. No renderer \"module\" concept is\n * invented; renderer grouping uses its natural window identity.\n *\n * Selection defines the allowed production page graph. It never chooses\n * the currently open page (`frontend.open` does, explicitly) and it never\n * widens itself: opening or navigating outside the aperture fails with a\n * diagnostic naming the aperture and the fix.\n */\nimport type { ViewDef } from '../types/index.cjs';\nimport { parseViews } from '../parser/views_parser.cjs';\n\nexport interface RendererSelection {\n /** Every page belonging to one production window catalog. */\n window?: string;\n /** Exactly one renderer page (canonical `window.page` identity). */\n page?: string;\n /** Explicit pages needed by one flow. */\n pages?: string[];\n}\n\nexport class PageCatalogError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'PageCatalogError';\n }\n}\n\nexport function pageIdentity(view: ViewDef): string {\n return `${view.windowName}.${view.pageName}`;\n}\n\nfunction listIdentities(views: Iterable<ViewDef>): string {\n const identities = [...views].map(pageIdentity);\n if (!identities.length) return 'the source defines no views';\n return `available pages:\\n ${identities.join('\\n ')}`;\n}\n\nexport type ViewsSource = string | ViewDef[];\n\nexport function parseViewsSource(source: ViewsSource): ViewDef[] {\n if (Array.isArray(source)) return source;\n if (typeof source === 'string') return parseViews(source);\n throw new PageCatalogError('views must be YAML content or parsed ViewDef[]');\n}\n\n/**\n * The production renderer page catalog: every view keyed by its canonical\n * `window.page` identity, with aperture selection and open/navigation\n * resolution (short leaf names accepted only when unambiguous).\n */\nexport class PageCatalog {\n private readonly byIdentity = new Map<string, ViewDef>();\n\n constructor(views: ViewDef[]) {\n for (const view of views) {\n const identity = pageIdentity(view);\n if (this.byIdentity.has(identity)) {\n throw new PageCatalogError(`duplicate page identity \"${identity}\" in views source`);\n }\n this.byIdentity.set(identity, view);\n }\n }\n\n get size(): number {\n return this.byIdentity.size;\n }\n\n all(): ViewDef[] {\n return [...this.byIdentity.values()];\n }\n\n /**\n * Apply a renderer aperture selection. Exactly one of `window`, `page`,\n * `pages` must be supplied (they are mutually exclusive in the final\n * effective selection).\n */\n select(selection: RendererSelection): PageCatalog {\n const forms = (['window', 'page', 'pages'] as const).filter(\n (key) => selection[key] !== undefined,\n );\n if (forms.length !== 1) {\n throw new PageCatalogError(\n 'renderer selection requires exactly one of { window }, { page }, or { pages }' +\n (forms.length ? `; got: ${forms.join(', ')}` : ''),\n );\n }\n\n if (selection.window !== undefined) {\n const matched = this.all().filter((view) => view.windowName === selection.window);\n if (!matched.length) {\n const windows = [...new Set(this.all().map((view) => view.windowName))];\n throw new PageCatalogError(\n `unknown window \"${selection.window}\"; ` +\n (windows.length ? `available windows: ${windows.join(', ')}` : 'the source defines no views'),\n );\n }\n return new PageCatalog(matched);\n }\n\n const requested = selection.page !== undefined ? [selection.page] : selection.pages!;\n if (!requested.length) {\n throw new PageCatalogError('renderer selection { pages } requires at least one page identity');\n }\n const matched = requested.map((identity) => {\n const view = this.byIdentity.get(identity);\n if (!view) {\n throw new PageCatalogError(\n `unknown page \"${identity}\"; ${listIdentities(this.byIdentity.values())}`,\n );\n }\n return view;\n });\n return new PageCatalog(matched);\n }\n\n /**\n * Resolve a page identity for `frontend.open()` or navigation. The\n * canonical `window.page` identity is always accepted; a short leaf name\n * is accepted only when exactly one selected page has that leaf.\n */\n resolve(page: string): ViewDef {\n const exact = this.byIdentity.get(page);\n if (exact) return exact;\n\n const leafMatches = this.all().filter((view) => view.pageName === page);\n if (leafMatches.length === 1) return leafMatches[0];\n if (leafMatches.length > 1) {\n throw new PageCatalogError(\n `page \"${page}\" is ambiguous in the selected aperture; use a fully qualified identity: ` +\n leafMatches.map(pageIdentity).join(', '),\n );\n }\n\n throw new PageCatalogError(\n `page \"${page}\" is not in the selected aperture; ${listIdentities(this.byIdentity.values())}\\n` +\n 'Widen the selection with select({ renderer: { window | pages } }) if this navigation is intentional.',\n );\n }\n\n has(identity: string): boolean {\n return this.byIdentity.has(identity);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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