@flanksource/page-runtime 0.0.0 → 0.1.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 (786) hide show
  1. package/README.md +495 -0
  2. package/dist/build/README.md +96 -0
  3. package/{spikes/lib → dist/build}/cjs-export-names.mjs +4 -2
  4. package/dist/build/dependencies.mjs +279 -0
  5. package/dist/build/dependencies.mjs.map +1 -0
  6. package/dist/build/dependency-cache-Zg-FGasE.mjs +2130 -0
  7. package/dist/build/dependency-cache-Zg-FGasE.mjs.map +1 -0
  8. package/dist/build/index.mjs +42 -0
  9. package/dist/build/index.mjs.map +1 -0
  10. package/{builder-package.json → dist/build/package.json} +1 -1
  11. package/dist/build/types/activity-schema.d.ts +62 -0
  12. package/dist/build/types/build/barrels.d.ts +70 -0
  13. package/dist/build/types/build/base.d.ts +2 -0
  14. package/dist/build/types/build/browser-runtime-exports.d.ts +19 -0
  15. package/dist/build/types/build/check-fragment.d.ts +5 -0
  16. package/dist/build/types/build/commonjs-exports.d.ts +5 -0
  17. package/dist/build/types/build/convert-commonjs.d.ts +12 -0
  18. package/dist/build/types/build/dependencies.d.ts +6 -0
  19. package/dist/build/types/build/dependency-barrel-index.d.ts +5 -0
  20. package/dist/build/types/build/dependency-barrels.d.ts +7 -0
  21. package/dist/build/types/build/dependency-cache.d.ts +7 -0
  22. package/dist/build/types/build/dependency-optional.d.ts +4 -0
  23. package/dist/build/types/build/dependency-plugin.d.ts +8 -0
  24. package/dist/build/types/build/dependency-runtime.d.ts +20 -0
  25. package/dist/build/types/build/dependency-workers.d.ts +8 -0
  26. package/dist/build/types/build/errors.d.ts +9 -0
  27. package/dist/build/types/build/fragment.d.ts +13 -0
  28. package/dist/build/types/build/index.d.ts +7 -0
  29. package/dist/build/types/build/library-runtime.d.ts +21 -0
  30. package/dist/build/types/build/module-utils.d.ts +3 -0
  31. package/dist/build/types/build/recipe-dependencies.d.ts +2 -0
  32. package/dist/build/types/build/runtime-entries.d.ts +4 -0
  33. package/dist/build/types/build/runtime-layer.d.ts +17 -0
  34. package/dist/build/types/build/trace.d.ts +140 -0
  35. package/dist/build/types/design-schema.d.ts +98 -0
  36. package/dist/build/types/host/agent-source.d.ts +2 -0
  37. package/dist/build/types/host/agent-validation.d.ts +3 -0
  38. package/dist/build/types/host/design-validation.d.ts +2 -0
  39. package/dist/build/types/host/message-values.d.ts +8 -0
  40. package/dist/build/types/host/review/validation.d.ts +5 -0
  41. package/dist/build/types/host/validation.d.ts +6 -0
  42. package/dist/build/types/link/page-sources.d.ts +31 -0
  43. package/dist/build/types/link/types.d.ts +62 -0
  44. package/dist/build/types/link/validation.d.ts +9 -0
  45. package/dist/build/types/markers.d.ts +10 -0
  46. package/dist/build/types/review-schema.d.ts +60 -0
  47. package/dist/build/types/schema.d.ts +319 -0
  48. package/dist/build/types/sw/barrels.d.ts +9 -0
  49. package/dist/build/types/sw/compiler-plugins.d.ts +6 -0
  50. package/dist/build/types/sw/composition.d.ts +8 -0
  51. package/dist/build/types/sw/module-transform.d.ts +68 -0
  52. package/dist/build/types/sw/profile.d.ts +7 -0
  53. package/dist/build/types/sw/source-provider.d.ts +7 -0
  54. package/dist/build/types/sw/versions.d.ts +10 -0
  55. package/dist/node/catalog.mjs +1 -0
  56. package/dist/node/chunks/publication-RchcQvxD.mjs +229 -0
  57. package/dist/node/chunks/publication-RchcQvxD.mjs.map +1 -0
  58. package/dist/node/chunks/schema-CaRTfg2x.mjs +12 -0
  59. package/dist/node/chunks/schema-CaRTfg2x.mjs.map +1 -0
  60. package/dist/node/dev.mjs +410 -0
  61. package/dist/node/dev.mjs.map +1 -0
  62. package/dist/node/publication/cli.mjs +13 -0
  63. package/dist/node/publication/cli.mjs.map +1 -0
  64. package/dist/node/publication.mjs +1 -0
  65. package/dist/node/schema.mjs +1 -0
  66. package/dist/node/styles.mjs +49 -0
  67. package/dist/node/styles.mjs.map +1 -0
  68. package/dist/static/boot.js +40938 -0
  69. package/dist/static/boot.js.map +1 -0
  70. package/dist/static/bootstrap.html +1 -0
  71. package/dist/static/devtools-hook.js +118 -0
  72. package/dist/static/document-bundle.js +1 -0
  73. package/dist/static/document.js +2621 -0
  74. package/dist/static/editing.js +37 -0
  75. package/dist/static/export-compiler.js +81521 -0
  76. package/dist/static/export-compiler.js.map +1 -0
  77. package/dist/static/page-agent.js +17193 -0
  78. package/dist/static/page-agent.js.map +1 -0
  79. package/dist/static/sw.js +86112 -0
  80. package/dist/static/sw.js.map +1 -0
  81. package/package.json +46 -13
  82. package/scripts/build-node.ts +26 -0
  83. package/scripts/build-static.ts +15 -4
  84. package/scripts/build.ts +1 -0
  85. package/scripts/react-externals.ts +18 -0
  86. package/scripts/release-version.ts +2 -1
  87. package/src/activity-schema.ts +3 -2
  88. package/src/build/README.md +3 -1
  89. package/src/build/browser-runtime-exports.ts +52 -0
  90. package/src/build/dependencies.ts +3 -1
  91. package/src/build/dependency-barrel-index.ts +48 -0
  92. package/src/build/dependency-barrels.ts +26 -5
  93. package/src/build/dependency-cache.ts +1 -1
  94. package/src/build/dependency-optional.ts +15 -0
  95. package/src/build/dependency-plugin.ts +2 -2
  96. package/src/build/dependency-runtime.ts +48 -13
  97. package/src/build/dependency-workers.ts +41 -0
  98. package/src/build/library-runtime.ts +6 -3
  99. package/src/build/runtime-layer.ts +99 -0
  100. package/src/build/trace.ts +12 -10
  101. package/src/dev/README.md +30 -0
  102. package/src/dev/index.ts +4 -1
  103. package/src/dev/runtime-origin.ts +63 -0
  104. package/src/editing.ts +1 -1
  105. package/src/form/entry-source.ts +68 -0
  106. package/src/form/form-page.ts +63 -0
  107. package/src/form/index.ts +2 -0
  108. package/src/form/source-update.ts +17 -0
  109. package/src/frame/activity.ts +4 -2
  110. package/src/frame/agent/README.md +1 -1
  111. package/src/frame/agent/agent.browser.ts +1 -1
  112. package/src/frame/agent/frame-layout.ts +54 -0
  113. package/src/frame/agent/index.ts +11 -8
  114. package/src/frame/agent/overlay.ts +19 -6
  115. package/src/frame/agent/owner.ts +6 -3
  116. package/src/frame/agent/review.ts +3 -2
  117. package/src/frame/agent.ts +1 -0
  118. package/src/frame/boot-styles.ts +3 -3
  119. package/src/frame/boot.ts +98 -34
  120. package/src/frame/bridge.ts +4 -4
  121. package/src/frame/document-assets.ts +76 -0
  122. package/src/frame/document-entry.ts +68 -0
  123. package/src/frame/document-modules.ts +113 -0
  124. package/src/frame/document-mount.ts +32 -0
  125. package/src/frame/export-page.ts +6 -4
  126. package/src/frame/export.ts +5 -6
  127. package/src/frame/index.ts +2 -1
  128. package/src/frame/mount-page.ts +36 -0
  129. package/src/frame/render-job.ts +101 -0
  130. package/src/frame/runtime.browser.ts +20 -1
  131. package/src/frame/tailwind/load.ts +16 -7
  132. package/src/frame/tailwind/recipe.ts +4 -9
  133. package/src/frame/tailwind/runtime.ts +4 -4
  134. package/src/frame/tailwind/stylesheets.ts +12 -7
  135. package/src/frame/tailwind/testing/client.ts +8 -7
  136. package/src/frame/tailwind/testing/server.ts +1 -1
  137. package/src/frame/testing/boot-layout.ts +3 -0
  138. package/src/frame/testing/host.ts +18 -0
  139. package/src/frame/testing/server.ts +18 -3
  140. package/src/host/BuildLog.tsx +2 -1
  141. package/src/host/DEBUG_CONSOLE.md +13 -0
  142. package/src/host/PageForm.tsx +63 -0
  143. package/src/host/PageFrame.tsx +14 -6
  144. package/src/host/RuntimeActivity.tsx +3 -1
  145. package/src/host/RuntimeDebugPanel.tsx +18 -0
  146. package/src/host/activity-state.ts +1 -1
  147. package/src/host/bridge.ts +2 -1
  148. package/src/host/debug-runtime.tsx +17 -0
  149. package/src/host/design-validation.ts +1 -1
  150. package/src/host/index.ts +1 -0
  151. package/src/host/link/transport.ts +2 -1
  152. package/src/host/review/index.ts +6 -5
  153. package/src/host/runtime-diagnostics.ts +41 -0
  154. package/src/host/validation.ts +40 -3
  155. package/src/link/testing/server.ts +10 -7
  156. package/src/link/testing/worker.ts +1 -1
  157. package/src/schema.ts +32 -6
  158. package/src/styles.ts +40 -0
  159. package/src/sw/compile.ts +1 -1
  160. package/src/sw/compiler.ts +14 -7
  161. package/src/sw/converted.browser.ts +1 -1
  162. package/src/sw/errors.ts +15 -2
  163. package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/browser-server.ts +5 -5
  164. package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures.ts +2 -2
  165. package/src/sw/link-compiler.ts +12 -4
  166. package/src/sw/link-route.ts +1 -1
  167. package/src/sw/markers.ts +1 -1
  168. package/src/sw/module-transform.ts +14 -2
  169. package/src/sw/profile.ts +3 -1
  170. package/src/sw/resolver.ts +8 -4
  171. package/src/sw/router.ts +52 -12
  172. package/src/sw/runtime-exports.ts +39 -0
  173. package/src/sw/source-provider.ts +20 -0
  174. package/src/sw/versions.ts +11 -4
  175. package/src/sw/worker.ts +5 -1
  176. package/.vitest/gavel-reporter-3e3dfb64eda19344.mjs +0 -59
  177. package/.vitest/vitest-report-root-1793958008919344000.json +0 -1
  178. package/.vitest/vitest-report-root-1793958052786561000.json +0 -1
  179. package/.vitest/vitest-report-root-1793958143511414000.json +0 -1
  180. package/.vitest/vitest-report-root-1793958185908019000.json +0 -1
  181. package/.vitest/vitest-report-root-1793958252687550000.json +0 -1
  182. package/.vitest/vitest-report-root-1793958260385388000.json +0 -1
  183. package/.vitest/vitest-report-root-1793958312358683000.json +0 -1
  184. package/.vitest/vitest-report-root-1793958386118791000.json +0 -1
  185. package/.vitest/vitest-report-root-1793958388712140000.json +0 -1
  186. package/.vitest/vitest-report-root-1793958429135603000.json +0 -1
  187. package/.vitest/vitest-report-root-1793958433387809000.json +0 -1
  188. package/.vitest/vitest-report-root-1793958517322792000.json +0 -1
  189. package/.vitest/vitest-report-root-1793958542332252000.json +0 -1
  190. package/.vitest/vitest-report-root-1793958617698698000.json +0 -1
  191. package/.vitest/vitest-report-root-1793958676587753000.json +0 -1
  192. package/.vitest/vitest-report-root-1793958707827469000.json +0 -1
  193. package/.vitest/vitest-report-root-1793958729745028000.json +0 -1
  194. package/.vitest/vitest-report-root-1793958736696408000.json +0 -1
  195. package/.vitest/vitest-report-root-1793958740449993000.json +0 -1
  196. package/.vitest/vitest-report-root-1793958841510921000.json +0 -1
  197. package/.vitest/vitest-report-root-1793958847664582000.json +0 -1
  198. package/.vitest/vitest-report-root-1793958900327643000.json +0 -1
  199. package/.vitest/vitest-report-root-1793958950822823000.json +0 -1
  200. package/.vitest/vitest-report-root-1793959013655262000.json +0 -1
  201. package/.vitest/vitest-report-root-1793959017905881000.json +0 -1
  202. package/.vitest/vitest-report-root-1793959093169044000.json +0 -1
  203. package/.vitest/vitest-report-root-1793959093978087000.json +0 -1
  204. package/.vitest/vitest-report-root-1793959101111925000.json +0 -1
  205. package/.vitest/vitest-report-root-1793959145317906000.json +0 -1
  206. package/.vitest/vitest-report-root-1793959190760607000.json +0 -1
  207. package/.vitest/vitest-report-root-1793959249695805000.json +0 -1
  208. package/.vitest/vitest-report-root-1793959323191511000.json +0 -1
  209. package/.vitest/vitest-report-root-1793959453311564000.json +0 -1
  210. package/.vitest/vitest-report-root-1793959495806182000.json +0 -1
  211. package/.vitest/vitest-report-root-1793959499945435000.json +0 -1
  212. package/.vitest/vitest-report-root-1793959546773807000.json +0 -1
  213. package/.vitest/vitest-report-root-1793959583335593000.json +0 -1
  214. package/.vitest/vitest-report-root-1793959621479504000.json +0 -1
  215. package/.vitest/vitest-report-root-1793959651002360000.json +0 -1
  216. package/.vitest/vitest-report-root-1793959655646061000.json +0 -1
  217. package/.vitest/vitest-report-root-1793959741176826000.json +0 -1
  218. package/.vitest/vitest-report-root-1793959744743733000.json +0 -1
  219. package/.vitest/vitest-report-root-1793959833244182000.json +0 -1
  220. package/.vitest/vitest-report-root-1793959882131751000.json +0 -1
  221. package/.vitest/vitest-report-root-1793959887033254000.json +0 -1
  222. package/.vitest/vitest-report-root-1793960000631977000.json +0 -1
  223. package/.vitest/vitest-report-root-1793960011938504000.json +0 -1
  224. package/.vitest/vitest-report-root-1793961370018852000.json +0 -1
  225. package/.vitest/vitest-report-root-1793961745370827000.json +0 -1
  226. package/.vitest/vitest-report-root-1793961764143180000.json +0 -1
  227. package/.vitest/vitest-report-root-1793961835963066000.json +0 -1
  228. package/.vitest/vitest-report-root-1793961890729922000.json +0 -1
  229. package/.vitest/vitest-report-root-1793961968680074000.json +0 -1
  230. package/.vitest/vitest-report-root-1793962066862337000.json +0 -1
  231. package/.vitest/vitest-report-root-1793962087917497000.json +0 -1
  232. package/.vitest/vitest-report-root-1793962157254386000.json +0 -1
  233. package/.vitest/vitest-report-root-1793962171214865000.json +0 -1
  234. package/.vitest/vitest-report-root-1793962183290533000.json +0 -1
  235. package/.vitest/vitest-report-root-1793962184809932000.json +0 -1
  236. package/.vitest/vitest-report-root-1793962197715204000.json +0 -1
  237. package/.vitest/vitest-report-root-1793962244650717000.json +0 -1
  238. package/.vitest/vitest-report-root-1793962259802273000.json +0 -1
  239. package/.vitest/vitest-report-root-1793962278799745000.json +0 -1
  240. package/.vitest/vitest-report-root-1793962304412974000.json +0 -1
  241. package/.vitest/vitest-report-root-1793962328411454000.json +0 -1
  242. package/.vitest/vitest-report-root-1793962355747869000.json +0 -1
  243. package/.vitest/vitest-report-root-1793962381401572000.json +0 -1
  244. package/.vitest/vitest-report-root-1793962393326735000.json +0 -1
  245. package/.vitest/vitest-report-root-1793962393329206000.json +0 -1
  246. package/.vitest/vitest-report-root-1793962437796768000.json +0 -1
  247. package/.vitest/vitest-report-root-1793962444190384000.json +0 -1
  248. package/.vitest/vitest-report-root-1793962445347541000.json +0 -1
  249. package/.vitest/vitest-report-root-1793962473691143000.json +0 -1
  250. package/.vitest/vitest-report-root-1793962474291457000.json +0 -1
  251. package/.vitest/vitest-report-root-1793962499680468000.json +0 -1
  252. package/.vitest/vitest-report-root-1793962504410483000.json +0 -1
  253. package/.vitest/vitest-report-root-1793962516850524000.json +0 -1
  254. package/.vitest/vitest-report-root-1793962536736273000.json +0 -1
  255. package/.vitest/vitest-report-root-1793962551181783000.json +0 -1
  256. package/.vitest/vitest-report-root-1793962553575620000.json +0 -1
  257. package/.vitest/vitest-report-root-1793962555169730000.json +0 -1
  258. package/.vitest/vitest-report-root-1793962572639765000.json +0 -1
  259. package/.vitest/vitest-report-root-1793962597102952000.json +0 -1
  260. package/.vitest/vitest-report-root-1793962637156669000.json +0 -1
  261. package/.vitest/vitest-report-root-1793962653530027000.json +0 -1
  262. package/.vitest/vitest-report-root-1793962665824334000.json +0 -1
  263. package/.vitest/vitest-report-root-1793962682161714000.json +0 -1
  264. package/.vitest/vitest-report-root-1793962719526168000.json +0 -1
  265. package/.vitest/vitest-report-root-1793962723853934000.json +0 -1
  266. package/.vitest/vitest-report-root-1793962741927728000.json +0 -1
  267. package/.vitest/vitest-report-root-1793962794308371000.json +0 -1
  268. package/.vitest/vitest-report-root-1793962796334481000.json +0 -1
  269. package/.vitest/vitest-report-root-1793962798075169000.json +0 -1
  270. package/.vitest/vitest-report-root-1793962836466676000.json +0 -1
  271. package/.vitest/vitest-report-root-1793962846507317000.json +0 -1
  272. package/.vitest/vitest-report-root-1793962876266701000.json +0 -1
  273. package/.vitest/vitest-report-root-1793962922031308000.json +0 -1
  274. package/.vitest/vitest-report-root-1793962932957166000.json +0 -1
  275. package/.vitest/vitest-report-root-1793962946930725000.json +0 -1
  276. package/.vitest/vitest-report-root-1793963027896350000.json +0 -1
  277. package/.vitest/vitest-report-root-1793963036618707000.json +0 -1
  278. package/.vitest/vitest-report-root-1793963067365318000.json +0 -1
  279. package/.vitest/vitest-report-root-1793963077597641000.json +0 -1
  280. package/.vitest/vitest-report-root-1793963126365651000.json +0 -1
  281. package/.vitest/vitest-report-root-1793963208744553000.json +0 -1
  282. package/.vitest/vitest-report-root-1793963232806450000.json +0 -1
  283. package/.vitest/vitest-report-root-1793963325077422000.json +0 -1
  284. package/.vitest/vitest-report-root-1793963392172877000.json +0 -1
  285. package/.vitest/vitest-report-root-1793963398218324000.json +0 -1
  286. package/.vitest/vitest-report-root-1793963410749092000.json +0 -1
  287. package/.vitest/vitest-report-root-1793963437279580000.json +0 -1
  288. package/.vitest/vitest-report-root-1793963450096193000.json +0 -1
  289. package/.vitest/vitest-report-root-1793963478908641000.json +0 -1
  290. package/.vitest/vitest-report-root-1793963507838465000.json +0 -1
  291. package/.vitest/vitest-report-root-1793963528668174000.json +0 -1
  292. package/.vitest/vitest-report-root-1793963601860390000.json +0 -1
  293. package/.vitest/vitest-report-root-1793963611633446000.json +0 -1
  294. package/.vitest/vitest-report-root-1793963624713406000.json +0 -1
  295. package/.vitest/vitest-report-root-1793963680656685000.json +0 -1
  296. package/.vitest/vitest-report-root-1793963705231851000.json +0 -1
  297. package/.vitest/vitest-report-root-1793963708929500000.json +0 -1
  298. package/.vitest/vitest-report-root-1793963710267844000.json +0 -1
  299. package/.vitest/vitest-report-root-1793963713999248000.json +0 -1
  300. package/.vitest/vitest-report-root-1793963786513455000.json +0 -1
  301. package/.vitest/vitest-report-root-1793963792518765000.json +0 -1
  302. package/.vitest/vitest-report-root-1793963804089549000.json +0 -1
  303. package/.vitest/vitest-report-root-1793963840412921000.json +0 -1
  304. package/.vitest/vitest-report-root-1793963880361176000.json +0 -1
  305. package/.vitest/vitest-report-root-1793963935121106000.json +0 -1
  306. package/.vitest/vitest-report-root-1793963937290698000.json +0 -1
  307. package/.vitest/vitest-report-root-1793963977050773000.json +0 -1
  308. package/.vitest/vitest-report-root-1793963981229158000.json +0 -1
  309. package/.vitest/vitest-report-root-1793963989422080000.json +0 -1
  310. package/.vitest/vitest-report-root-1793964025924629000.json +0 -1
  311. package/.vitest/vitest-report-root-1793964027983705000.json +0 -1
  312. package/.vitest/vitest-report-root-1793964059969386000.json +0 -1
  313. package/.vitest/vitest-report-root-1793964071524069000.json +0 -1
  314. package/.vitest/vitest-report-root-1793964076285860000.json +0 -1
  315. package/.vitest/vitest-report-root-1793964077988100000.json +0 -1
  316. package/.vitest/vitest-report-root-1793964093289042000.json +0 -1
  317. package/.vitest/vitest-report-root-1793964102899356000.json +0 -1
  318. package/.vitest/vitest-report-root-1793964128089691000.json +0 -1
  319. package/.vitest/vitest-report-root-1793964129495156000.json +0 -1
  320. package/.vitest/vitest-report-root-1793964182849665000.json +0 -1
  321. package/.vitest/vitest-report-root-1793964223959893000.json +0 -1
  322. package/.vitest/vitest-report-root-1793964253351716000.json +0 -1
  323. package/.vitest/vitest-report-root-1793964290220122000.json +0 -1
  324. package/.vitest/vitest-report-root-1793964318037006000.json +0 -1
  325. package/.vitest/vitest-report-root-1793964334676691000.json +0 -1
  326. package/.vitest/vitest-report-root-1793964378520677000.json +0 -1
  327. package/.vitest/vitest-report-root-1793964383748994000.json +0 -1
  328. package/.vitest/vitest-report-root-1793964394042303000.json +0 -1
  329. package/.vitest/vitest-report-root-1793964466521881000.json +0 -1
  330. package/.vitest/vitest-report-root-1793964470478175000.json +0 -1
  331. package/.vitest/vitest-report-root-1793964484499019000.json +0 -1
  332. package/.vitest/vitest-report-root-1793964527645213000.json +0 -1
  333. package/.vitest/vitest-report-root-1793964608875865000.json +0 -1
  334. package/.vitest/vitest-report-root-1793964623608336000.json +0 -1
  335. package/.vitest/vitest-report-root-1793964629870846000.json +0 -1
  336. package/.vitest/vitest-report-root-1793964674515564000.json +0 -1
  337. package/.vitest/vitest-report-root-1793964706923651000.json +0 -1
  338. package/.vitest/vitest-report-root-1793964712832942000.json +0 -1
  339. package/.vitest/vitest-report-root-1793964714824633000.json +0 -1
  340. package/.vitest/vitest-report-root-1793964755433952000.json +0 -1
  341. package/.vitest/vitest-report-root-1793964783157670000.json +0 -1
  342. package/.vitest/vitest-report-root-1793964818963246000.json +0 -1
  343. package/.vitest/vitest-report-root-1793964843818548000.json +0 -1
  344. package/.vitest/vitest-report-root-1793964929824204000.json +0 -1
  345. package/.vitest/vitest-report-root-1793964973060713000.json +0 -1
  346. package/.vitest/vitest-report-root-1793964983122482000.json +0 -1
  347. package/.vitest/vitest-report-root-1793965107264567000.json +0 -1
  348. package/.vitest/vitest-report-root-1793965258759177000.json +0 -1
  349. package/.vitest/vitest-report-root-1793965277212091000.json +0 -1
  350. package/.vitest/vitest-report-root-1793965420648188000.json +0 -1
  351. package/.vitest/vitest-report-root-1793965611688414000.json +0 -1
  352. package/.vitest/vitest-report-root-1793965753407694000.json +0 -1
  353. package/.vitest/vitest-report-root-1793965766104309000.json +0 -1
  354. package/.vitest/vitest-report-root-1793965766823098000.json +0 -1
  355. package/.vitest/vitest-report-root-1793965806066109000.json +0 -1
  356. package/.vitest/vitest-report-root-1793965824697182000.json +0 -1
  357. package/.vitest/vitest-report-root-1793965904374564000.json +0 -1
  358. package/.vitest/vitest-report-root-1793965920838340000.json +0 -1
  359. package/.vitest/vitest-report-root-1793965932520617000.json +0 -1
  360. package/.vitest/vitest-report-root-1793965971574656000.json +0 -1
  361. package/.vitest/vitest-report-root-1793966049815024000.json +0 -1
  362. package/.vitest/vitest-report-root-1793966057888034000.json +0 -1
  363. package/.vitest/vitest-report-root-1793966066838868000.json +0 -1
  364. package/.vitest/vitest-report-root-1793966160347764000.json +0 -1
  365. package/.vitest/vitest-report-root-1793966196305985000.json +0 -1
  366. package/.vitest/vitest-report-root-1793966221538043000.json +0 -1
  367. package/.vitest/vitest-report-root-1793966251519918000.json +0 -1
  368. package/.vitest/vitest-report-root-1793966447000588000.json +0 -1
  369. package/.vitest/vitest-report-root-1793966463178249000.json +0 -1
  370. package/.vitest/vitest-report-root-1793966486995648000.json +0 -1
  371. package/.vitest/vitest-report-root-1793966726756953000.json +0 -1
  372. package/.vitest/vitest-report-root-1793966763656807000.json +0 -1
  373. package/.vitest/vitest-report-root-1793966979409799000.json +0 -1
  374. package/.vitest/vitest-report-root-1793967385250149000.json +0 -1
  375. package/.vitest/vitest-report-root-1793967617080163000.json +0 -1
  376. package/.vitest/vitest-report-root-1793967649428508000.json +0 -1
  377. package/.vitest/vitest-report-root-1793967773689520000.json +0 -1
  378. package/.vitest/vitest-report-root-1793968743743508000.json +0 -1
  379. package/.vitest/vitest-report-root-1793968846470407000.json +0 -1
  380. package/.vitest/vitest-report-root-1793968880878391000.json +0 -1
  381. package/.vitest/vitest-report-root-1793969027713529000.json +0 -1
  382. package/.vitest/vitest-report-root-1793969041841266000.json +0 -1
  383. package/.vitest/vitest-report-root-1793969142007468000.json +0 -1
  384. package/.vitest/vitest-report-root-1793969164867379000.json +0 -1
  385. package/.vitest/vitest-report-root-1793969193145858000.json +0 -1
  386. package/.vitest/vitest-report-root-1793969246818533000.json +0 -1
  387. package/.vitest/vitest-report-root-1793969270845486000.json +0 -1
  388. package/.vitest/vitest-report-root-1793969272514219000.json +0 -1
  389. package/.vitest/vitest-report-root-1793969302476105000.json +0 -1
  390. package/.vitest/vitest-report-root-1793969401697799000.json +0 -1
  391. package/.vitest/vitest-report-root-1793969433222630000.json +0 -1
  392. package/.vitest/vitest-report-root-1793969453350714000.json +0 -1
  393. package/.vitest/vitest-report-root-1793969567187400000.json +0 -1
  394. package/.vitest/vitest-report-root-1793969602230024000.json +0 -1
  395. package/.vitest/vitest-report-root-1793969633261063000.json +0 -1
  396. package/.vitest/vitest-report-root-1793969673876404000.json +0 -1
  397. package/.vitest/vitest-report-root-1793969702287010000.json +0 -1
  398. package/.vitest/vitest-report-root-1793969745828386000.json +0 -1
  399. package/.vitest/vitest-report-root-1793969893687205000.json +0 -1
  400. package/.vitest/vitest-report-root-1793969949642120000.json +0 -1
  401. package/.vitest/vitest-report-root-1793969981399076000.json +0 -1
  402. package/.vitest/vitest-report-root-1793970027152713000.json +0 -1
  403. package/.vitest/vitest-report-root-1793970030585158000.json +0 -1
  404. package/.vitest/vitest-report-root-1793970160195767000.json +0 -1
  405. package/.vitest/vitest-report-root-1793970215752422000.json +0 -1
  406. package/.vitest/vitest-report-root-1793970217114968000.json +0 -1
  407. package/.vitest/vitest-report-root-1793970329879319000.json +0 -1
  408. package/.vitest/vitest-report-root-1793970590586994000.json +0 -1
  409. package/.vitest/vitest-report-root-1793970625359990000.json +0 -1
  410. package/.vitest/vitest-report-root-1793970672590269000.json +0 -1
  411. package/.vitest/vitest-report-root-1793970796789022000.json +0 -1
  412. package/.vitest/vitest-report-root-1793970825710990000.json +0 -1
  413. package/.vitest/vitest-report-root-1793970884000509000.json +0 -1
  414. package/.vitest/vitest-report-root-1793970900444617000.json +0 -1
  415. package/.vitest/vitest-report-root-1793972186024681000.json +0 -1
  416. package/.vitest/vitest-report-root-1793972227757396000.json +0 -1
  417. package/.vitest/vitest-report-root-1793972736341600000.json +0 -1
  418. package/.vitest/vitest-report-root-1793972769249562000.json +0 -1
  419. package/.vitest/vitest-report-root-1793972859435283000.json +0 -1
  420. package/.vitest/vitest-report-root-1793972915169294000.json +0 -1
  421. package/.vitest/vitest-report-root-1793973081515450000.json +0 -1
  422. package/.vitest/vitest-report-root-1793973111336773000.json +0 -1
  423. package/.vitest/vitest-report-root-1793973253986969000.json +0 -1
  424. package/.vitest/vitest-report-root-1793973561283775000.json +0 -1
  425. package/.vitest/vitest-report-root-1793973593320977000.json +0 -1
  426. package/.vitest/vitest-report-root-1793973648302867000.json +0 -1
  427. package/.vitest/vitest-report-root-1793973819657242000.json +0 -1
  428. package/.vitest/vitest-report-root-1793973952727311000.json +0 -1
  429. package/.vitest/vitest-report-root-1793974334455876000.json +0 -1
  430. package/.vitest/vitest-report-root-1793974437074196000.json +0 -1
  431. package/.vitest/vitest-report-root-1793974437553146000.json +0 -1
  432. package/.vitest/vitest-report-root-1793974461818626000.json +0 -1
  433. package/.vitest/vitest-report-root-1793974515255198000.json +0 -1
  434. package/.vitest/vitest-report-root-1793974516267191000.json +0 -1
  435. package/.vitest/vitest-report-root-1793974621202824000.json +0 -1
  436. package/.vitest/vitest-report-root-1793974718450330000.json +0 -1
  437. package/.vitest/vitest-report-root-1793974834942373000.json +0 -1
  438. package/.vitest/vitest-report-root-1793974921367314000.json +0 -1
  439. package/.vitest/vitest-report-root-1793975019367156000.json +0 -1
  440. package/.vitest/vitest-report-root-1793975048166096000.json +0 -1
  441. package/.vitest/vitest-report-root-1793975133024339000.json +0 -1
  442. package/.vitest/vitest-report-root-1793975159711704000.json +0 -1
  443. package/.vitest/vitest-report-root-1793975517481736000.json +0 -1
  444. package/.vitest/vitest-report-root-1793975680008825000.json +0 -1
  445. package/.vitest/vitest-report-root-1793976067648494000.json +0 -1
  446. package/.vitest/vitest-report-root-1793976314122479000.json +0 -1
  447. package/.vitest/vitest-report-root-1793976513022402000.json +0 -1
  448. package/.vitest/vitest-report-root-1793976540410805000.json +0 -1
  449. package/.vitest/vitest-report-root-1793976555103273000.json +0 -1
  450. package/.vitest/vitest-report-root-1793976702974407000.json +0 -1
  451. package/.vitest/vitest-report-root-1793976721093108000.json +0 -1
  452. package/.vitest/vitest-report-root-1793976955473681000.json +0 -1
  453. package/.vitest/vitest-report-root-1793977049628483000.json +0 -1
  454. package/.vitest/vitest-report-root-1793977098467804000.json +0 -1
  455. package/.vitest/vitest-report-root-1793977132144900000.json +0 -1
  456. package/.vitest/vitest-report-root-1793977279648191000.json +0 -1
  457. package/.vitest/vitest-report-root-1793977365312127000.json +0 -1
  458. package/.vitest/vitest-report-root-1793978227796817000.json +0 -1
  459. package/.vitest/vitest-report-root-1793978255189735000.json +0 -1
  460. package/.vitest/vitest-report-root-1793978306509070000.json +0 -1
  461. package/.vitest/vitest-report-root-1793978418301216000.json +0 -1
  462. package/.vitest/vitest-report-root-1793978445072573000.json +0 -1
  463. package/.vitest/vitest-report-root-1793978546605517000.json +0 -1
  464. package/.vitest/vitest-report-root-1793978576060950000.json +0 -1
  465. package/.vitest/vitest-report-root-1793978590261408000.json +0 -1
  466. package/.vitest/vitest-report-root-1793978674733179000.json +0 -1
  467. package/.vitest/vitest-report-root-1793978718588785000.json +0 -1
  468. package/.vitest/vitest-report-root-1793978725363453000.json +0 -1
  469. package/.vitest/vitest-report-root-1793978729967285000.json +0 -1
  470. package/.vitest/vitest-report-root-1793978755641607000.json +0 -1
  471. package/.vitest/vitest-report-root-1793978782769802000.json +0 -1
  472. package/.vitest/vitest-report-root-1793978784870947000.json +0 -1
  473. package/.vitest/vitest-report-root-1793978806927335000.json +0 -1
  474. package/.vitest/vitest-report-root-1793978822508324000.json +0 -1
  475. package/.vitest/vitest-report-root-1793978836339794000.json +0 -1
  476. package/.vitest/vitest-report-root-1793978837947352000.json +0 -1
  477. package/.vitest/vitest-report-root-1793978891548295000.json +0 -1
  478. package/.vitest/vitest-report-root-1793978946172947000.json +0 -1
  479. package/.vitest/vitest-report-root-1793978947109807000.json +0 -1
  480. package/.vitest/vitest-report-root-1793979034208662000.json +0 -1
  481. package/.vitest/vitest-report-root-1793979070583608000.json +0 -1
  482. package/.vitest/vitest-report-root-1793979081187144000.json +0 -1
  483. package/.vitest/vitest-report-root-1793979085428673000.json +0 -1
  484. package/.vitest/vitest-report-root-1793979155097858000.json +0 -1
  485. package/.vitest/vitest-report-root-1793979233508873000.json +0 -1
  486. package/.vitest/vitest-report-root-1793979268653273000.json +0 -1
  487. package/.vitest/vitest-report-root-1793979341978843000.json +0 -1
  488. package/.vitest/vitest-report-root-1793979345344877000.json +0 -1
  489. package/.vitest/vitest-report-root-1793979389390374000.json +0 -1
  490. package/.vitest/vitest-report-root-1793979400063493000.json +0 -1
  491. package/.vitest/vitest-report-root-1793979432448725000.json +0 -1
  492. package/.vitest/vitest-report-root-1793979459139430000.json +0 -1
  493. package/.vitest/vitest-report-root-1793979480341961000.json +0 -1
  494. package/.vitest/vitest-report-root-1793979510130869000.json +0 -1
  495. package/.vitest/vitest-report-root-1793979524763924000.json +0 -1
  496. package/.vitest/vitest-report-root-1793979571563010000.json +0 -1
  497. package/.vitest/vitest-report-root-1793979627916920000.json +0 -1
  498. package/.vitest/vitest-report-root-1793979726395379000.json +0 -1
  499. package/.vitest/vitest-report-root-1793979752029533000.json +0 -1
  500. package/.vitest/vitest-report-root-1793979753365744000.json +0 -1
  501. package/.vitest/vitest-report-root-1793979759386206000.json +0 -1
  502. package/.vitest/vitest-report-root-1793979787819109000.json +0 -1
  503. package/.vitest/vitest-report-root-1793979827615051000.json +0 -1
  504. package/.vitest/vitest-report-root-1793979927737393000.json +0 -1
  505. package/.vitest/vitest-report-root-1793979929836169000.json +0 -1
  506. package/.vitest/vitest-report-root-1793979955780781000.json +0 -1
  507. package/.vitest/vitest-report-root-1793980200569636000.json +0 -1
  508. package/.vitest/vitest-report-root-1793980206045213000.json +0 -1
  509. package/.vitest/vitest-report-root-1793980285772027000.json +0 -1
  510. package/.vitest/vitest-report-root-1793980459229828000.json +0 -1
  511. package/.vitest/vitest-report-root-1793980460545874000.json +0 -1
  512. package/.vitest/vitest-report-root-1793980554484341000.json +0 -1
  513. package/.vitest/vitest-report-root-1793980674494388000.json +0 -1
  514. package/.vitest/vitest-report-root-1793980683752195000.json +0 -1
  515. package/.vitest/vitest-report-root-1793980947108651000.json +0 -1
  516. package/.vitest/vitest-report-root-1793981129616629000.json +0 -1
  517. package/.vitest/vitest-report-root-1793981196611441000.json +0 -1
  518. package/.vitest/vitest-report-root-1793981226583545000.json +0 -1
  519. package/.vitest/vitest-report-root-1793981294259721000.json +0 -1
  520. package/.vitest/vitest-report-root-1793981353393048000.json +0 -1
  521. package/.vitest/vitest-report-root-1793981424585368000.json +0 -1
  522. package/.vitest/vitest-report-root-1793981513266687000.json +0 -1
  523. package/.vitest/vitest-report-root-1793981526418218000.json +0 -1
  524. package/.vitest/vitest-report-root-1793981540069877000.json +0 -1
  525. package/.vitest/vitest-report-root-1793981761193625000.json +0 -1
  526. package/.vitest/vitest-report-root-1793981868520992000.json +0 -1
  527. package/.vitest/vitest-report-root-1793982048467772000.json +0 -1
  528. package/.vitest/vitest-report-root-1793982119518020000.json +0 -1
  529. package/.vitest/vitest-report-root-1793982243473651000.json +0 -1
  530. package/.vitest/vitest-report-root-1793982406880629000.json +0 -1
  531. package/.vitest/vitest-report-root-1793982433563632000.json +0 -1
  532. package/.vitest/vitest-report-root-1793982496753204000.json +0 -1
  533. package/.vitest/vitest-report-root-1793982500153311000.json +0 -1
  534. package/.vitest/vitest-report-root-1793982542086095000.json +0 -1
  535. package/.vitest/vitest-report-root-1793982659482988000.json +0 -1
  536. package/.vitest/vitest-report-root-1793983799132716000.json +0 -1
  537. package/.vitest/vitest-report-root-1793983822721833000.json +0 -1
  538. package/.vitest/vitest-report-root-1793984998618484000.json +0 -1
  539. package/.vitest/vitest-report-root-1793985050475750000.json +0 -1
  540. package/.vitest/vitest-report-root-1793985095516077000.json +0 -1
  541. package/.vitest/vitest-report-root-1793985130729074000.json +0 -1
  542. package/.vitest/vitest-report-root-1793985177150997000.json +0 -1
  543. package/.vitest/vitest-report-root-1793985267658626000.json +0 -1
  544. package/.vitest/vitest-report-root-1793985412705211000.json +0 -1
  545. package/.vitest/vitest-report-root-1793985433752853000.json +0 -1
  546. package/.vitest/vitest-report-root-1794087938302852000.json +0 -1
  547. package/.vitest/vitest-report-root-1794087978339022000.json +0 -1
  548. package/.vitest/vitest-report-root-1794088095283811000.json +0 -1
  549. package/.vitest/vitest-report-root-1794088129997065000.json +0 -1
  550. package/.vitest/vitest-report-root-1794088147336556000.json +0 -1
  551. package/.vitest/vitest-report-root-1794088173414593000.json +0 -1
  552. package/.vitest/vitest-report-root-1794088221289657000.json +0 -1
  553. package/.vitest/vitest-report-root-1794088250766611000.json +0 -1
  554. package/.vitest/vitest-report-root-1794088365553234000.json +0 -1
  555. package/.vitest/vitest-report-root-1794088395202655000.json +0 -1
  556. package/.vitest/vitest-report-root-1794090028732187000.json +0 -1
  557. package/.vitest/vitest-report-root-1794090054787283000.json +0 -1
  558. package/.vitest/vitest-report-root-1794090153955794000.json +0 -1
  559. package/.vitest/vitest-report-root-1794090161850160000.json +0 -1
  560. package/.vitest/vitest-report-root-1794091755693314000.json +0 -1
  561. package/.vitest/vitest-report-root-1794091765029349000.json +0 -1
  562. package/.vitest/vitest-report-root-1794091975649927000.json +0 -1
  563. package/.vitest/vitest-report-root-1794091994027950000.json +0 -1
  564. package/.vitest/vitest-report-root-1794092005178771000.json +0 -1
  565. package/.vitest/vitest-report-root-1794113295302382000.json +0 -1
  566. package/.vitest/vitest-report-root-1794114156337032000.json +0 -1
  567. package/.vitest/vitest-report-root-1794114198454137000.json +0 -1
  568. package/.vitest/vitest-report-root-1794114254064413000.json +0 -1
  569. package/.vitest/vitest-report-root-1794114280107510000.json +0 -1
  570. package/.vitest/vitest-report-root-1794114495199837000.json +0 -1
  571. package/.vitest/vitest-report-root-1794114646604233000.json +0 -1
  572. package/.vitest/vitest-report-root-1794114666311689000.json +0 -1
  573. package/.vitest/vitest-report-root-1794114974303438000.json +0 -1
  574. package/.vitest/vitest-report-root-1794115037361450000.json +0 -1
  575. package/.vitest/vitest-report-root-1794115097838937000.json +0 -1
  576. package/.vitest/vitest-report-root-1794115604669388000.json +0 -1
  577. package/.vitest/vitest-report-root-1794115633814500000.json +0 -1
  578. package/.vitest/vitest-report-root-1794115648756242000.json +0 -1
  579. package/.vitest/vitest-report-root-1794115873440741000.json +0 -1
  580. package/.vitest/vitest-report-root-1794115952930230000.json +0 -1
  581. package/.vitest/vitest-report-root-1794115963344701000.json +0 -1
  582. package/.vitest/vitest-report-root-1794116196067450000.json +0 -1
  583. package/.vitest/vitest-report-root-1794116254301280000.json +0 -1
  584. package/.vitest/vitest-report-root-1794116259342966000.json +0 -1
  585. package/.vitest/vitest-report-root-1794118178787879000.json +0 -1
  586. package/.vitest/vitest-report-root-1794137087891409000.json +0 -1
  587. package/.vitest/vitest-report-root-1794137100301214000.json +0 -1
  588. package/.vitest/vitest-report-root-1794137107377813000.json +0 -1
  589. package/.vitest/vitest-report-root-1794137171230704000.json +0 -1
  590. package/.vitest/vitest-report-root-1794137317761465000.json +0 -1
  591. package/.vitest/vitest-report-root-1794137320282368000.json +0 -1
  592. package/PACKAGE_PUBLICATIONS.md +0 -26
  593. package/scripts/local-workspaces.test.ts +0 -31
  594. package/scripts/release-version-cli.test.ts +0 -40
  595. package/scripts/release-version.test.ts +0 -29
  596. package/spikes/README.md +0 -70
  597. package/spikes/barrel-rewriting/README.md +0 -97
  598. package/spikes/barrel-rewriting/measure.ts +0 -134
  599. package/spikes/barrel-rewriting/readme.ts +0 -174
  600. package/spikes/barrel-rewriting/results.json +0 -3440
  601. package/spikes/barrel-rewriting/run.ts +0 -330
  602. package/spikes/barrel-rewriting/setup.ts +0 -90
  603. package/spikes/barrel-rewriting/sw.ts +0 -148
  604. package/spikes/barrel-rewriting/tenant.ts +0 -91
  605. package/spikes/barrel-rewriting/worker-config.ts +0 -33
  606. package/spikes/closure-fragments/README.md +0 -157
  607. package/spikes/closure-fragments/results.json +0 -959
  608. package/spikes/closure-fragments/run.ts +0 -298
  609. package/spikes/compiler/README.md +0 -177
  610. package/spikes/compiler/compile.test.ts +0 -78
  611. package/spikes/compiler/compile.ts +0 -82
  612. package/spikes/compiler/facet-redact.d.ts +0 -5
  613. package/spikes/compiler/markers.ts +0 -88
  614. package/spikes/compiler/pages.ts +0 -43
  615. package/spikes/compiler/readme.ts +0 -116
  616. package/spikes/compiler/reference.ts +0 -81
  617. package/spikes/compiler/render.ts +0 -113
  618. package/spikes/compiler/results.json +0 -3310
  619. package/spikes/compiler/run.ts +0 -250
  620. package/spikes/compiler/sucrase-parser.d.ts +0 -8
  621. package/spikes/compiler/sw.ts +0 -62
  622. package/spikes/diagram-readiness/README.md +0 -134
  623. package/spikes/diagram-readiness/analysis.test.ts +0 -52
  624. package/spikes/diagram-readiness/analysis.ts +0 -35
  625. package/spikes/diagram-readiness/browser.ts +0 -209
  626. package/spikes/diagram-readiness/readme.ts +0 -65
  627. package/spikes/diagram-readiness/results.json +0 -30289
  628. package/spikes/diagram-readiness/run.ts +0 -103
  629. package/spikes/diagram-readiness/server.ts +0 -53
  630. package/spikes/esm-sh/README.md +0 -27
  631. package/spikes/frame-commenting/README.md +0 -183
  632. package/spikes/frame-commenting/agent.ts +0 -110
  633. package/spikes/frame-commenting/hook.ts +0 -1
  634. package/spikes/frame-commenting/host.ts +0 -66
  635. package/spikes/frame-commenting/measure.ts +0 -180
  636. package/spikes/frame-commenting/model.test.ts +0 -27
  637. package/spikes/frame-commenting/model.ts +0 -40
  638. package/spikes/frame-commenting/readme.ts +0 -61
  639. package/spikes/frame-commenting/results.json +0 -5320
  640. package/spikes/frame-commenting/run.ts +0 -73
  641. package/spikes/frame-commenting/setup.ts +0 -125
  642. package/spikes/lib/barrels.test.ts +0 -107
  643. package/spikes/lib/barrels.ts +0 -309
  644. package/spikes/lib/content-types.ts +0 -28
  645. package/spikes/lib/convert-commonjs.ts +0 -168
  646. package/spikes/lib/fragment.ts +0 -108
  647. package/spikes/lib/library-set.ts +0 -194
  648. package/spikes/lib/module-transform.test.ts +0 -133
  649. package/spikes/lib/module-transform.ts +0 -351
  650. package/spikes/lib/origin.ts +0 -140
  651. package/spikes/lib/pages.ts +0 -290
  652. package/spikes/lib/report.ts +0 -23
  653. package/spikes/lib/runtime-server.ts +0 -282
  654. package/spikes/lib/static-server.ts +0 -82
  655. package/spikes/lib/trace.ts +0 -384
  656. package/spikes/local-folder-link/README.md +0 -85
  657. package/spikes/local-folder-link/checkout.ts +0 -132
  658. package/spikes/local-folder-link/documents.ts +0 -36
  659. package/spikes/local-folder-link/readme.ts +0 -42
  660. package/spikes/local-folder-link/results.json +0 -12815
  661. package/spikes/local-folder-link/rewrite.test.ts +0 -27
  662. package/spikes/local-folder-link/rewrite.ts +0 -38
  663. package/spikes/local-folder-link/run.ts +0 -123
  664. package/spikes/local-folder-link/server.ts +0 -100
  665. package/spikes/local-folder-link/sw.ts +0 -97
  666. package/spikes/origin-isolation/README.md +0 -426
  667. package/spikes/origin-isolation/browsers.ts +0 -43
  668. package/spikes/origin-isolation/helper.ts +0 -6
  669. package/spikes/origin-isolation/host.ts +0 -25
  670. package/spikes/origin-isolation/measure.ts +0 -118
  671. package/spikes/origin-isolation/model.test.ts +0 -45
  672. package/spikes/origin-isolation/model.ts +0 -49
  673. package/spikes/origin-isolation/proxy.ts +0 -35
  674. package/spikes/origin-isolation/readme.ts +0 -83
  675. package/spikes/origin-isolation/results.json +0 -3242
  676. package/spikes/origin-isolation/run.ts +0 -35
  677. package/spikes/origin-isolation/server.ts +0 -108
  678. package/spikes/origin-isolation/sw.ts +0 -28
  679. package/spikes/origin-isolation/tenant.ts +0 -165
  680. package/spikes/react-runtime-set/README.md +0 -48
  681. package/spikes/react-runtime-set/convert.ts +0 -118
  682. package/spikes/react-runtime-set/export-names.mjs +0 -8
  683. package/spikes/react-runtime-set/page/page.js +0 -46
  684. package/spikes/react-runtime-set/results.json +0 -84
  685. package/spikes/react-runtime-set/run.ts +0 -255
  686. package/spikes/run.ts +0 -15
  687. package/spikes/sw-tenant-frame/README.md +0 -95
  688. package/spikes/sw-tenant-frame/results.json +0 -1348
  689. package/spikes/sw-tenant-frame/run.ts +0 -373
  690. package/spikes/sw-tenant-frame/site/frame.html +0 -113
  691. package/spikes/sw-tenant-frame/site/host.html +0 -25
  692. package/spikes/sw-tenant-frame/site/sw.js +0 -10
  693. package/spikes/tailwind-parity/README.md +0 -78
  694. package/spikes/tailwind-parity/compare.test.ts +0 -70
  695. package/spikes/tailwind-parity/compare.ts +0 -91
  696. package/spikes/tailwind-parity/facet-font-scale.d.ts +0 -6
  697. package/spikes/tailwind-parity/facet-styles.ts +0 -77
  698. package/spikes/tailwind-parity/results.json +0 -885
  699. package/spikes/tailwind-parity/run.ts +0 -385
  700. package/spikes/tailwind-parity/runtime-tailwind.ts +0 -82
  701. package/src/activity.test.ts +0 -57
  702. package/src/build/barrels.test.ts +0 -107
  703. package/src/build/dependency-runtime.test.ts +0 -121
  704. package/src/build/library-runtime.test.ts +0 -343
  705. package/src/dev/cli.test.ts +0 -12
  706. package/src/dev/packages.test.ts +0 -175
  707. package/src/editing.test.tsx +0 -31
  708. package/src/frame/activity.test.ts +0 -27
  709. package/src/frame/agent/overlay.test.ts +0 -42
  710. package/src/frame/agent/owner.test.ts +0 -78
  711. package/src/frame/agent/vocabulary.test.ts +0 -36
  712. package/src/frame/boot-bundle.test.ts +0 -20
  713. package/src/frame/boot-styles.test.ts +0 -102
  714. package/src/frame/boot.test.ts +0 -108
  715. package/src/frame/export-compiler.test.ts +0 -23
  716. package/src/frame/export.test.ts +0 -17
  717. package/src/frame/tailwind/cache.test.ts +0 -53
  718. package/src/frame/tailwind/load.test.ts +0 -74
  719. package/src/frame/tailwind/runtime-cache.test.ts +0 -97
  720. package/src/frame/tailwind/store.test.ts +0 -104
  721. package/src/frame/tailwind/tailwind.test.ts +0 -119
  722. package/src/host/BuildLog.test.tsx +0 -40
  723. package/src/host/PageFrame.test.tsx +0 -39
  724. package/src/host/activity-state.test.ts +0 -37
  725. package/src/host/agent-source.test.ts +0 -9
  726. package/src/host/agent-validation.test.ts +0 -40
  727. package/src/host/bridge-request.test.ts +0 -87
  728. package/src/host/bridge.test.ts +0 -34
  729. package/src/host/build-log.test.ts +0 -47
  730. package/src/host/clear-cache.test.ts +0 -75
  731. package/src/host/design-validation.test.ts +0 -38
  732. package/src/host/link/transport.test.ts +0 -10
  733. package/src/host/origin.test.ts +0 -10
  734. package/src/host/review/remote.test.ts +0 -21
  735. package/src/host/review/source.test.ts +0 -19
  736. package/src/host/review/validation.test.ts +0 -34
  737. package/src/host/runtime-integration.test.ts +0 -29
  738. package/src/host/source-path.test.ts +0 -14
  739. package/src/host/vocabulary-validation.test.ts +0 -60
  740. package/src/link/build.test.ts +0 -25
  741. package/src/link/commonjs.test.ts +0 -34
  742. package/src/link/overrides.test.ts +0 -103
  743. package/src/link/page-sources.test.ts +0 -52
  744. package/src/publication/publication.test.ts +0 -89
  745. package/src/storage/db.test.ts +0 -52
  746. package/src/sw/activity-router.test.ts +0 -53
  747. package/src/sw/candidates.test.ts +0 -9
  748. package/src/sw/compile.test.ts +0 -152
  749. package/src/sw/compiler.test.ts +0 -51
  750. package/src/sw/composition.test.ts +0 -51
  751. package/src/sw/converted-resolver.test.ts +0 -129
  752. package/src/sw/converted-router.test.ts +0 -91
  753. package/src/sw/converted.test.ts +0 -31
  754. package/src/sw/errors.test.ts +0 -8
  755. package/src/sw/link-activity.test.ts +0 -126
  756. package/src/sw/link-cache.test.ts +0 -15
  757. package/src/sw/link-markdown.test.ts +0 -52
  758. package/src/sw/link-route.test.ts +0 -150
  759. package/src/sw/link-source.test.ts +0 -31
  760. package/src/sw/markers.test.ts +0 -33
  761. package/src/sw/module-transform.test.ts +0 -131
  762. package/src/sw/package-generation.test.ts +0 -33
  763. package/src/sw/page-clients.test.ts +0 -37
  764. package/src/sw/profile.test.ts +0 -21
  765. package/src/sw/resolver.test.ts +0 -183
  766. package/src/sw/router-cache.test.ts +0 -78
  767. package/src/sw/runtime-module.test.ts +0 -61
  768. package/src/sw/source-hash.test.ts +0 -7
  769. package/src/sw/storage.test.ts +0 -108
  770. package/tsconfig.json +0 -10
  771. package/vitest.browser.config.ts +0 -4
  772. package/vitest.config.ts +0 -9
  773. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/browser-client.ts +0 -0
  774. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-entry.headers +0 -0
  775. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-entry.mjs.txt +0 -0
  776. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-module.headers +0 -0
  777. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-module.mjs.txt +0 -0
  778. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-entry.headers +0 -0
  779. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-entry.mjs.txt +0 -0
  780. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-module.headers +0 -0
  781. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-module.mjs.txt +0 -0
  782. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-entry.headers +0 -0
  783. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-entry.mjs.txt +0 -0
  784. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-module.headers +0 -0
  785. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-module.mjs.txt +0 -0
  786. /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/redact.ts +0 -0
@@ -1,384 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
3
- import { isBuiltin } from "node:module";
4
- import { dirname, extname, join, relative, sep } from "node:path";
5
- import { ResolverFactory } from "rolldown/experimental";
6
- import { parseSync } from "rolldown/utils";
7
- import { specifierKind } from "./module-transform.ts";
8
-
9
- export type FileKind = "esm" | "commonjs" | "css" | "json" | "asset";
10
-
11
- export type PackageId = { name: string; version: string; dir: string };
12
-
13
- export type TracedFile = {
14
- /** Package-relative URL, `<name>@<version>/<path>`, as the package origin serves it. */
15
- url: string;
16
- path: string;
17
- kind: FileKind;
18
- integrity: string;
19
- /** Bare specifiers the file imports, as written. */
20
- bareImports: string[];
21
- };
22
-
23
- /** A CommonJS-only package entry reached from ESM. It is converted into the owning library's runtime set. */
24
- export type CommonJsEntry = { specifier: string; path: string; pkg: PackageId; name: string; url: string };
25
-
26
- export type Failure = { name: string; detail: string };
27
-
28
- export type FragmentSpec = {
29
- name: string;
30
- /** Directory that top-level packages resolve from. */
31
- resolveFrom: string;
32
- /**
33
- * URL prefix of converted CommonJS files, `<library>@<version>/runtime/`. A fragment without one (additional
34
- * packages) cannot convert, so a CommonJS-only package there is a failure.
35
- */
36
- runtimeBase?: string;
37
- /** Top-level specifiers and the files they map to. */
38
- entries: Array<{ specifier: string; path: string }>;
39
- /** Packages mapped at the top level wherever they are imported: the base set, in the fragment that provides it. */
40
- topLevel: string[];
41
- /** Packages left to other fragments' top-level entries. */
42
- inherits: string[];
43
- };
44
-
45
- export const IMPORT_CONDITIONS = ["browser", "import", "module", "default"];
46
- export const REQUIRE_CONDITIONS = ["browser", "require", "default"];
47
- const JS_EXTENSIONS = new Set([".js", ".mjs", ".cjs"]);
48
- const NEW_URL = /new URL\(\s*(['"])(\.{1,2}\/[^'"]+)\1\s*,\s*import\.meta\.url\s*\)/g;
49
- // A quoted reference runs to its closing quote: font URLs carry `;` (wght@400;600).
50
- const CSS_IMPORT = /@import\s+(?:url\(\s*)?(?:(['"])(.*?)\1|([^'")\s;]+))/g;
51
- const CSS_URL = /url\(\s*(['"]?)([^'")]+)\1\s*\)/g;
52
-
53
- export function createResolver(conditionNames: string[]): ResolverFactory {
54
- return new ResolverFactory({
55
- conditionNames,
56
- mainFields: ["browser", "module", "main"],
57
- aliasFields: [["browser"]],
58
- extensions: [".mjs", ".js", ".cjs", ".json"],
59
- symlinks: true,
60
- });
61
- }
62
-
63
- export function integrityOf(bytes: Uint8Array | string): string {
64
- return `sha384-${createHash("sha384").update(bytes).digest("base64")}`;
65
- }
66
-
67
- export function packageName(specifier: string): string {
68
- const parts = specifier.split("/");
69
- return (specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0]) ?? specifier;
70
- }
71
-
72
- /** The string value of a dynamic import's argument, or null when it is computed. */
73
- function stringLiteral(expression: string): string | null {
74
- const text = expression.trim();
75
- const quoted = /^(['"])([^'"\\]*)\1$/.exec(text);
76
- if (quoted) return quoted[2] ?? null;
77
- const template = /^`([^`$\\]*)`$/.exec(text);
78
- return template ? (template[1] ?? null) : null;
79
- }
80
-
81
- const formats = new Map<string, { format: "esm" | "commonjs"; code: string; module: ReturnType<typeof parseSync>["module"] }>();
82
-
83
- /** Parses a JavaScript file once and classifies it by its syntax, which is what a browser cares about. */
84
- export function moduleFormat(path: string) {
85
- const known = formats.get(path);
86
- if (known) return known;
87
- const code = readFileSync(path, "utf8");
88
- const parsed = parseSync(path, code, { lang: "js", sourceType: "unambiguous" });
89
- const commonJsSyntax = /\brequire\s*\(|\bmodule\.exports\b|\bexports\.[\w$]+\s*=|\bexports\[/.test(code);
90
- const format = !parsed.module.hasModuleSyntax && commonJsSyntax ? "commonjs" : "esm";
91
- const result = { format, code, module: parsed.module } as const;
92
- formats.set(path, result);
93
- return result;
94
- }
95
-
96
- const manifests = new Map<string, PackageId | null>();
97
-
98
- function manifestAt(dir: string): PackageId | null {
99
- if (manifests.has(dir)) return manifests.get(dir) ?? null;
100
- const file = join(dir, "package.json");
101
- const manifest = existsSync(file) ? (JSON.parse(readFileSync(file, "utf8")) as { name?: string; version?: string }) : {};
102
- const id = manifest.name && manifest.version ? { name: manifest.name, version: manifest.version, dir } : null;
103
- manifests.set(dir, id);
104
- return id;
105
- }
106
-
107
- /**
108
- * The package that contains `path`: the nearest directory with a named, versioned package.json. Nested
109
- * manifests without a version (subpath shims) and dependencies a library bundled into its own dist (no
110
- * manifest at all) belong to the enclosing package.
111
- */
112
- export function packageOf(path: string): PackageId {
113
- for (let dir = dirname(path); dir !== dirname(dir); dir = dirname(dir)) {
114
- const manifest = manifestAt(dir);
115
- if (manifest) return manifest;
116
- }
117
- throw new Error(`${path} is not inside a package`);
118
- }
119
-
120
- function urlOf(pkg: PackageId, path: string): string {
121
- return `${pkg.name}@${pkg.version}/${relative(pkg.dir, path).split(sep).join("/")}`;
122
- }
123
-
124
- /** Picks an `exports` target for the browser, honouring the package's own condition order. */
125
- function exportTarget(value: unknown): string | null {
126
- if (typeof value === "string") return value;
127
- if (Array.isArray(value)) {
128
- for (const item of value) {
129
- const target = exportTarget(item);
130
- if (target) return target;
131
- }
132
- return null;
133
- }
134
- if (value && typeof value === "object") {
135
- for (const [condition, nested] of Object.entries(value)) {
136
- if (!IMPORT_CONDITIONS.includes(condition)) continue;
137
- const target = exportTarget(nested);
138
- if (target) return target;
139
- }
140
- }
141
- return null;
142
- }
143
-
144
- function filesUnder(dir: string): string[] {
145
- if (!existsSync(dir)) return [];
146
- return readdirSync(dir, { recursive: true, encoding: "utf8" })
147
- .map((entry) => join(dir, entry))
148
- .filter((path) => statSync(path).isFile());
149
- }
150
-
151
- /** Every entry point a package's `exports` declares for the browser, with `*` patterns expanded. */
152
- export function exportEntries(dir: string): Array<{ specifier: string; path: string }> {
153
- const manifest = JSON.parse(readFileSync(join(dir, "package.json"), "utf8")) as { name: string; exports?: unknown };
154
- const exportsField = manifest.exports;
155
- if (!exportsField || typeof exportsField !== "object" || Array.isArray(exportsField)) {
156
- throw new Error(`${manifest.name} has no subpath exports map`);
157
- }
158
- const entries: Array<{ specifier: string; path: string }> = [];
159
- for (const [key, value] of Object.entries(exportsField)) {
160
- const target = exportTarget(value);
161
- if (!target) continue;
162
- const specifier = key === "." ? manifest.name : `${manifest.name}${key.slice(1)}`;
163
- if (!key.includes("*")) {
164
- entries.push({ specifier, path: join(dir, target) });
165
- continue;
166
- }
167
- const [targetPrefix = "", targetSuffix = ""] = target.split("*");
168
- const base = join(dir, targetPrefix);
169
- for (const path of filesUnder(dirname(base))) {
170
- if (!path.startsWith(base) || !path.endsWith(targetSuffix) || path.endsWith(".d.ts")) continue;
171
- const captured = path.slice(base.length, path.length - targetSuffix.length).split(sep).join("/");
172
- entries.push({ specifier: specifier.replace("*", captured), path });
173
- }
174
- }
175
- return entries;
176
- }
177
-
178
- export function resolveEntry(resolver: ResolverFactory, fromDir: string, specifier: string): { specifier: string; path: string } {
179
- const result = resolver.sync(fromDir, specifier);
180
- if (!result.path) throw new Error(`cannot resolve ${specifier} from ${fromDir}: ${result.error}`);
181
- return { specifier, path: result.path };
182
- }
183
-
184
- type Pending = { file: TracedFile; code: string; module: ReturnType<typeof parseSync>["module"]; pkg: PackageId };
185
-
186
- /**
187
- * Traces a fragment's dependency closure: every file a browser loads from the fragment's entries, the bare
188
- * imports each package needs mapped, and the CommonJS-only entries that must be converted.
189
- */
190
- export class ClosureTracer {
191
- readonly imports: Record<string, string> = {};
192
- readonly scopes: Record<string, Record<string, string>> = {};
193
- /** URL remaps: CommonJS files that ESM code imports by a relative path, redirected to their converted file. */
194
- readonly remaps: Record<string, string> = {};
195
- /** Relative imports without a file name, by package: the runtime rewrites them to canonical URLs. */
196
- readonly canonicalRewrites = new Map<string, number>();
197
- readonly inherited = new Map<string, Set<string>>();
198
- readonly files = new Map<string, TracedFile>();
199
- readonly packages = new Map<string, string>();
200
- readonly commonJs = new Map<string, CommonJsEntry>();
201
- readonly failures: Failure[] = [];
202
- readonly untraced: Array<{ url: string; expression: string }> = [];
203
- /** Resources on other origins that traced files load, which the frame's CSP and egress allowlist must permit. */
204
- readonly external: Array<{ url: string; reference: string }> = [];
205
- readonly resolver = createResolver(IMPORT_CONDITIONS);
206
- private readonly targets = new Map<string, string | null>();
207
- private readonly queue: Pending[] = [];
208
-
209
- constructor(readonly spec: FragmentSpec) {}
210
-
211
- trace(): this {
212
- for (const entry of this.spec.entries) {
213
- const url = this.target(entry.path, entry.specifier, "bare");
214
- if (url) this.mapTopLevel(entry.specifier, url);
215
- }
216
- this.drain();
217
- return this;
218
- }
219
-
220
- /** Traces files queued after `trace`, such as ESM packages that converted CommonJS code imports. */
221
- drain(): void {
222
- for (let next = this.queue.shift(); next; next = this.queue.shift()) this.visit(next);
223
- }
224
-
225
- fail(name: string, detail: string): void {
226
- if (!this.failures.some((failure) => failure.name === name && failure.detail === detail)) this.failures.push({ name, detail });
227
- }
228
-
229
- inherit(specifier: string, importer: string): void {
230
- const importers = this.inherited.get(specifier) ?? new Set<string>();
231
- importers.add(importer);
232
- this.inherited.set(specifier, importers);
233
- }
234
-
235
- mapTopLevel(specifier: string, url: string): void {
236
- const existing = this.imports[specifier];
237
- if (existing && existing !== url) this.fail(specifier, `top-level conflict: ${existing} and ${url}`);
238
- else this.imports[specifier] = url;
239
- }
240
-
241
- mapInScope(scope: string, specifier: string, url: string): void {
242
- const table = (this.scopes[scope] ??= {});
243
- const existing = table[specifier];
244
- if (existing && existing !== url) this.fail(packageName(specifier), `scope ${scope} maps ${specifier} to both ${existing} and ${url}`);
245
- else table[specifier] = url;
246
- }
247
-
248
- /** Maps a base-set specifier at the top level, resolved from the fragment root so every importer shares one copy. */
249
- provideTopLevel(specifier: string): string | null {
250
- const known = this.imports[specifier];
251
- if (known) return known;
252
- const resolved = this.resolver.sync(this.spec.resolveFrom, specifier);
253
- if (!resolved.path) {
254
- this.fail(packageName(specifier), `cannot resolve base-set specifier ${specifier}: ${resolved.error}`);
255
- return null;
256
- }
257
- const url = this.target(resolved.path, specifier, "bare");
258
- if (url) this.mapTopLevel(specifier, url);
259
- return url;
260
- }
261
-
262
- /**
263
- * Registers a file and returns the URL an import of it maps to: the file itself, or, for a CommonJS-only
264
- * package entry, its converted file in the runtime set.
265
- */
266
- target(path: string, specifier: string, via: "bare" | "relative"): string | null {
267
- if (this.targets.has(path)) return this.targets.get(path) ?? null;
268
- const pkg = packageOf(path);
269
- this.packages.set(`${pkg.name}@${pkg.version}`, pkg.dir);
270
- const extension = extname(path);
271
- let url: string | null = urlOf(pkg, path);
272
- if (JS_EXTENSIONS.has(extension)) {
273
- const parsed = moduleFormat(path);
274
- if (parsed.format === "esm") this.addFile({ url, path, kind: "esm", integrity: integrityOf(parsed.code), bareImports: [] }, parsed, pkg);
275
- else if (via === "bare") url = this.commonJsEntry(path, specifier, pkg);
276
- else {
277
- // An ESM wrapper importing its own CommonJS build: the import map redirects the file's URL to its conversion.
278
- const converted = this.commonJsEntry(path, `${pkg.name}/${relative(pkg.dir, path).split(sep).join("/")}`, pkg);
279
- if (converted) this.remaps[url] = converted;
280
- }
281
- } else if (extension === ".css") {
282
- this.addCss(path, url, pkg);
283
- } else {
284
- const kind = extension === ".json" ? "json" : "asset";
285
- this.addFile({ url, path, kind, integrity: integrityOf(readFileSync(path)), bareImports: [] }, null, pkg);
286
- }
287
- this.targets.set(path, url);
288
- return url;
289
- }
290
-
291
- private commonJsEntry(path: string, specifier: string, pkg: PackageId): string | null {
292
- if (!this.spec.runtimeBase) {
293
- this.fail(pkg.name, `${pkg.name}@${pkg.version} is CommonJS-only; additional packages must ship ESM`);
294
- return null;
295
- }
296
- const subpath = specifier === pkg.name ? "index" : specifier.slice(pkg.name.length + 1).replace(/\.(c|m)?js$/, "");
297
- const name = `${pkg.name}@${pkg.version}/${subpath}`;
298
- const url = `${this.spec.runtimeBase}{flavor}/${name}.js`;
299
- this.commonJs.set(name, { specifier, path, pkg, name, url });
300
- return url;
301
- }
302
-
303
- private addFile(file: TracedFile, parsed: ReturnType<typeof moduleFormat> | null, pkg: PackageId): void {
304
- this.files.set(file.url, file);
305
- if (parsed && file.kind === "esm") this.queue.push({ file, code: parsed.code, module: parsed.module, pkg });
306
- }
307
-
308
- private addCss(path: string, url: string, pkg: PackageId): void {
309
- const code = readFileSync(path, "utf8");
310
- this.files.set(url, { url, path, kind: "css", integrity: integrityOf(code), bareImports: [] });
311
- const imports = new Set([...code.matchAll(CSS_IMPORT)].map((match) => match[2] ?? match[3] ?? ""));
312
- for (const reference of imports) {
313
- if (/^https?:/.test(reference)) this.external.push({ url, reference });
314
- else this.fail(pkg.name, `${url} imports ${reference} with @import, which a stylesheet module ignores; the runtime must inline it`);
315
- }
316
- for (const match of code.matchAll(CSS_URL)) {
317
- const value = match[2] ?? "";
318
- if (imports.has(value) || !value || /^(data:|#|\/)/.test(value)) continue;
319
- if (/^https?:/.test(value)) {
320
- this.external.push({ url, reference: value });
321
- continue;
322
- }
323
- const asset = join(dirname(path), value.split(/[?#]/)[0] ?? value);
324
- if (existsSync(asset)) this.target(asset, value, "relative");
325
- else this.fail(pkg.name, `${url} references missing asset ${value}`);
326
- }
327
- }
328
-
329
- private visit({ file, code, module, pkg }: Pending): void {
330
- const specifiers = new Set<string>();
331
- for (const item of module.staticImports) specifiers.add(item.moduleRequest.value);
332
- for (const item of module.staticExports) {
333
- for (const entry of item.entries) if (entry.moduleRequest) specifiers.add(entry.moduleRequest.value);
334
- }
335
- for (const item of module.dynamicImports) {
336
- const expression = code.slice(item.moduleRequest.start, item.moduleRequest.end);
337
- const literal = stringLiteral(expression);
338
- if (literal === null) this.untraced.push({ url: file.url, expression: expression.replace(/\s+/g, " ").slice(0, 120) });
339
- else specifiers.add(literal);
340
- }
341
- for (const match of code.matchAll(NEW_URL)) if (match[2]) specifiers.add(match[2]);
342
- for (const specifier of specifiers) this.follow(specifier, file, pkg);
343
- }
344
-
345
- private follow(specifier: string, file: TracedFile, pkg: PackageId): void {
346
- const kind = specifierKind(specifier);
347
- if (kind === "url") return;
348
- if (kind === "builtin") {
349
- this.fail(pkg.name, `${file.url} imports Node built-in ${specifier}`);
350
- return;
351
- }
352
- if (kind === "relative") {
353
- const resolved = this.resolver.sync(dirname(file.path), specifier);
354
- if (!resolved.path) {
355
- this.fail(pkg.name, `${file.url} imports missing ${specifier}`);
356
- return;
357
- }
358
- const written = specifier.split(/[?#]/)[0] ?? specifier;
359
- if (!resolved.path.endsWith(written.replace(/^(\.{1,2}\/)+/, "").split("/").join(sep))) {
360
- this.canonicalRewrites.set(pkg.name, (this.canonicalRewrites.get(pkg.name) ?? 0) + 1);
361
- }
362
- this.target(resolved.path, specifier, "relative");
363
- return;
364
- }
365
- file.bareImports.push(specifier);
366
- const name = packageName(specifier);
367
- if (this.spec.inherits.includes(name)) {
368
- this.inherit(specifier, file.url);
369
- return;
370
- }
371
- if (this.spec.topLevel.includes(name)) {
372
- this.provideTopLevel(specifier);
373
- return;
374
- }
375
- const resolved = this.resolver.sync(dirname(file.path), specifier);
376
- if (!resolved.path) {
377
- const reason = isBuiltin(specifier) ? `imports Node built-in ${specifier}` : `cannot resolve ${specifier} (${resolved.error})`;
378
- this.fail(name, `${file.url} ${reason}`);
379
- return;
380
- }
381
- const url = this.target(resolved.path, specifier, "bare");
382
- if (url) this.mapInScope(`${pkg.name}@${pkg.version}/`, specifier, url);
383
- }
384
- }
@@ -1,85 +0,0 @@
1
- # Spike: local-folder link
2
-
3
- Verdict: go
4
-
5
- ## Method
6
-
7
- Copied the checkout's src (including generated src/icons), package.json, tsconfig and lockfile into `.tmp/local-folder-link/checkout/`. Captured the original checkout's commit, tag, dirty state and build date into the copy's build-inputs.json; the worker loads those inputs from the copy. Only the copy is edited. Its installed dependencies are linked without installing anything. Traced the source page's closure and built both flavors of the checkout's own CommonJS runtime set, React included, with the existing ClosureTracer, convertCommonJs and fragment tools. Its importmap.json is written inside the copied checkout. Source parsing for the barrel index is setup work; the browser receives original source, never that analysis output.
8
-
9
- The developer host serves original checkout files over a separate CORS-enabled static origin. A bundled service worker reuses the compiler spike's Sucrase compileScript on fetch, rewrites named data/icon barrels using the checkout's sideEffects declaration, canonicalizes URLs and injects constants loaded from the checkout's build-inputs.json. The page renders DataTable with two rows and Version, and verifies the real checkout commit is visible and only one React is evaluated.
10
-
11
- Chrome is driven exclusively through agent-browser because this probe needs a real service worker, Cache Storage and paint scheduling. A unique session and fresh runtime origin provide empty browser caches. Cold time runs from the controlled frame's first navigation until two requestAnimationFrame callbacks after the table and both library probes render. Worker installation is outside this interval. Warm reload retains Cache Storage and recompiles zero modules. Timings include source fetch, module compile/rewrite, cache operations, dependency loading and frame rendering.
12
-
13
- Twelve real source edits alternate between DataTable.tsx and Version.tsx, replacing visible probe text within their rendered JSX. Each write uses atomic rename like an editor save. A filesystem watcher reports changes; the host polls every 25 ms, invalidates only the changed module and reloads the linked frame. An unlinked control frame must retain its single load. Edit time starts before writing the file and ends two animation frames after the new text renders. Node and browser timestamps use performance.timeOrigin + performance.now(). The harness checks new text, one recompile per edit and no control-frame reload.
14
-
15
- **Local-folder link:** Chromium's File System Access directory picker requires an interactive user grant and cannot be automated headlessly. This run measures the CORS file-server link over a real copied local folder; it does not claim a direct FileSystemDirectoryHandle run. P6 still needs a manual folder-picker/permission/change-detection check. Both link kinds share the worker compilation path; transport-specific latency for the direct folder provider remains unmeasured.
16
-
17
- The page uses minimal static CSS to make the data visible; runtime Tailwind parity is a separate spike. This experiment measures the linked source graph of this DataTable/Version page, not every module exported by clicky-ui. Local runtime-set and barrel-index setup time is reported separately from the requested first source load. CPU is contended and targets remain unchanged.
18
-
19
- The developer override is stored in browser localStorage. Compiled entries are addressed by runtime version and a SHA-256 of source plus its path, resolution metadata and checkout constants; invalidation removes only the changed URL's pointer. Published dependency responses are cached separately. This spike precomputes resolution metadata while building the local closure: edits that add imports or change barrel exports require rebuilding that metadata; it measures implementation edits within the existing graph.
20
-
21
- ## Measured results
22
-
23
- | Metric | Value |
24
- | --- | --- |
25
- | coldCompileMs | 455.60009765625 |
26
- | warmReloadMs | 3064.4000000059605 |
27
- | editP50Ms | 150.8388671875 |
28
- | editP95Ms | 3047.7392578125 |
29
- | edits | 12 |
30
- | linkedModules | 127 |
31
- | setupMs | 2099.594583 |
32
- | coldModulesCompiled | 127 |
33
- | warmModulesCompiled | 0 |
34
- | oneModulePerEdit | true |
35
- | unlinkedFrameUnaffected | true |
36
- | checkoutConstantsVisible | true |
37
- | reactInstances | 1 |
38
- | folderPickerAutomated | false |
39
-
40
- | Load | Edit to visible ms | Write to watcher ms | Poll ms | Invalidate ms | Frame ms | Compiled / cached | Fetch sum ms | Compile sum ms | Cache sum ms |
41
- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
42
- | 0: cold | — | — | — | — | 455.5 | 127 / 0 | 2844.3 | 103.4 | 2331.1 |
43
- | 1: warm | — | — | — | — | 3064.4 | 0 / 127 | 0.0 | 0.0 | 915.3 |
44
- | 2: edit | 3047.7 | 11.9 | 16.1 | 0.8 | 3018.9 | 1 / 126 | 1.4 | 13.0 | 770.2 |
45
- | 3: edit | 3039.4 | 11.6 | 9.8 | 1.3 | 3016.5 | 1 / 126 | 1.3 | 0.5 | 1161.6 |
46
- | 4: edit | 165.6 | 12.6 | 0.8 | 1.1 | 151.0 | 1 / 126 | 1.5 | 15.7 | 923.3 |
47
- | 5: edit | 150.8 | 11.6 | 19.2 | 0.6 | 119.4 | 1 / 126 | 1.2 | 0.4 | 936.3 |
48
- | 6: edit | 145.2 | 12.1 | 14.9 | 1.0 | 117.2 | 1 / 126 | 1.4 | 12.2 | 781.1 |
49
- | 7: edit | 139.1 | 11.6 | 7.7 | 0.7 | 119.0 | 1 / 126 | 1.0 | 0.5 | 946.7 |
50
- | 8: edit | 151.5 | 12.4 | 3.2 | 0.8 | 135.1 | 1 / 126 | 1.4 | 14.5 | 713.5 |
51
- | 9: edit | 145.7 | 11.1 | 23.7 | 0.9 | 110.0 | 1 / 126 | 1.4 | 0.4 | 1015.9 |
52
- | 10: edit | 157.1 | 12.4 | 17.1 | 0.9 | 126.6 | 1 / 126 | 1.3 | 13.9 | 756.1 |
53
- | 11: edit | 125.2 | 11.6 | 10.2 | 0.6 | 102.7 | 1 / 126 | 1.3 | 0.4 | 872.5 |
54
- | 12: edit | 147.2 | 12.2 | 7.7 | 0.7 | 126.5 | 1 / 126 | 1.2 | 11.2 | 760.0 |
55
- | 13: edit | 157.0 | 12.0 | 25.1 | 0.7 | 119.2 | 1 / 126 | 1.2 | 0.3 | 892.7 |
56
-
57
- Module sums overlap across concurrent requests; they are work totals, not additive wall-clock stages. Detection includes the disk write, filesystem notification and polling delay. Frame time includes cache reads, dependency requests, React mount and two paint boundaries. Raw per-module observations are in results.json.
58
-
59
- ## Go criteria
60
-
61
- | Criterion | Measured | Met |
62
- | --- | --- | --- |
63
- | Cold source load <= 15000 ms | 455.60009765625 | true |
64
- | Edit to visible p50 <= 300 ms | 150.8388671875 | true |
65
- | At least 10 edits | 12 | true |
66
-
67
- ## Findings for the plan
68
-
69
- P6 can retain compile-on-fetch source links for this measured data page using a locally built closure, precise cache invalidation and per-link frame reloads. The direct folder provider still requires the manual Chromium check described above.
70
-
71
- No shared files, dependency declarations or packages/ui source were modified. Screenshot: `.tmp/local-folder-link/linked-page.png`.
72
-
73
- ## Environment
74
-
75
- | Component | Value |
76
- | --- | --- |
77
- | node | v24.15.0 |
78
- | browser | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/153.0.0.0 Safari/537.36 |
79
- | os | darwin/arm64 |
80
- | transport | CORS static checkout over loopback; 25 ms change polling |
81
- | checkout | 0.3.57 |
82
- | commit | ba452b68f |
83
- | agent-browser | agent-browser 0.38.1 |
84
- | flavor | production |
85
- | concurrency | shared worktree; other spikes may contend for CPU |
@@ -1,132 +0,0 @@
1
- import { execFile } from "node:child_process";
2
- import { existsSync, readFileSync, realpathSync } from "node:fs";
3
- import { cp, mkdir, rm, symlink, writeFile } from "node:fs/promises";
4
- import { dirname, extname, join, relative } from "node:path";
5
- import { promisify } from "node:util";
6
- import { init, parse } from "es-module-lexer";
7
- import { ResolverFactory } from "rolldown/experimental";
8
- import { parseSync } from "rolldown/utils";
9
- import { compileScript } from "../compiler/compile.ts";
10
- import { buildBarrelIndex, shapeOf, sideEffectsRule } from "../lib/barrels.ts";
11
- import { convertCommonJs } from "../lib/convert-commonjs.ts";
12
- import { composeImportMap, fragmentOf } from "../lib/fragment.ts";
13
- import { BASE_PACKAGES, manifestOf } from "../lib/library-set.ts";
14
- import type { BarrelIndex } from "../lib/module-transform.ts";
15
- import { ClosureTracer, createResolver, IMPORT_CONDITIONS, resolveEntry } from "../lib/trace.ts";
16
- import { rewriteLinked } from "./rewrite.ts";
17
-
18
- export type SourceModule = { path: string; resolutions: Record<string, string> };
19
- export type LinkConfig = {
20
- sourceOrigin: string;
21
- modules: Record<string, SourceModule>;
22
- barrels: BarrelIndex;
23
- defines: Record<string, string | boolean>;
24
- };
25
-
26
- const execute = promisify(execFile);
27
- export const LINK = "/link/checkout/";
28
- export const EDITS = ["src/data/DataTable.tsx", "src/data/Version.tsx"];
29
-
30
- export async function copyCheckout({ root, checkout }: { root: string; checkout: string }): Promise<Record<string, string | boolean>> {
31
- await rm(checkout, { recursive: true, force: true });
32
- await mkdir(checkout, { recursive: true });
33
- for (const file of ["src", "package.json", "tsconfig.json", "scripts/git-info.mjs"]) {
34
- await cp(join(root, "packages/ui", file), join(checkout, file), { recursive: true });
35
- }
36
- await cp(join(root, "pnpm-lock.yaml"), join(checkout, "pnpm-lock.yaml"));
37
- await symlink(realpathSync(join(root, "packages/ui/node_modules")), join(checkout, "node_modules"), "dir");
38
- if (!existsSync(join(checkout, "src/icons/components/UiClose.tsx"))) {
39
- throw new Error("checkout generated icons missing; run `pnpm --filter @flanksource/clicky-ui build:icons`");
40
- }
41
- const git = async (args: string[]) => (await execute("git", args, { cwd: root })).stdout.trim();
42
- const defines = {
43
- __CLICKY_COMMIT__: await git(["rev-parse", "--short", "HEAD"]),
44
- __CLICKY_TAG__: await git(["describe", "--tags", "--abbrev=0"]),
45
- __CLICKY_DATE__: new Date().toISOString(),
46
- __CLICKY_DIRTY__: (await git(["status", "--porcelain"])).length > 0,
47
- };
48
- await writeFile(join(checkout, "build-inputs.json"), JSON.stringify(defines));
49
- return defines;
50
- }
51
-
52
- export async function buildCheckout({ checkout, out }: { checkout: string; out: string }) {
53
- await init();
54
- checkout = realpathSync(checkout);
55
- const pkg = manifestOf(checkout);
56
- const localResolver = new ResolverFactory({ conditionNames: IMPORT_CONDITIONS, extensions: [".tsx", ".ts", ".jsx", ".js", ".json"], symlinks: true });
57
- const depResolver = createResolver(IMPORT_CONDITIONS);
58
- const bases = ["react", "react/jsx-runtime", "react/jsx-dev-runtime", "react-dom", "react-dom/client", "@tanstack/react-query", "jotai"];
59
- const tracer = new ClosureTracer({ name: pkg.name, resolveFrom: checkout, runtimeBase: `${pkg.name}@${pkg.version}/runtime/`, entries: bases.map((id) => resolveEntry(depResolver, checkout, id)), topLevel: BASE_PACKAGES, inherits: [] });
60
- const urlOf = (file: string) => {
61
- const path = relative(checkout, file);
62
- if (path.startsWith("../")) throw new Error(`linked source escapes checkout: ${file}`);
63
- return `${LINK}${path}`;
64
- };
65
- const fileOf = (url: string) => join(checkout, url.slice(LINK.length));
66
- const compiled = new Map<string, string>();
67
- const resolutions: Record<string, Record<string, string>> = {};
68
- const source = (url: string) => {
69
- let code = compiled.get(url);
70
- if (code === undefined) {
71
- const file = fileOf(url);
72
- code = compileScript({ path: url, extension: extname(file), code: readFileSync(file, "utf8"), flavor: "production" });
73
- compiled.set(url, code);
74
- }
75
- return code;
76
- };
77
- const resolve = (url: string, specifier: string): string => {
78
- const table = (resolutions[url] ??= {});
79
- if (table[specifier]) return table[specifier];
80
- if (specifier.startsWith(".") || specifier.startsWith("@flanksource/clicky-ui")) {
81
- const request = specifier.startsWith(".") ? specifier : `./src/${specifier === pkg.name ? "index" : specifier.slice(pkg.name.length + 1)}`;
82
- const resolved = localResolver.sync(specifier.startsWith(".") ? dirname(fileOf(url)) : checkout, request);
83
- if (!resolved.path) throw new Error(`${url}: missing ${specifier}; ${url.includes("/icons") || specifier.includes("icons") ? "run `pnpm --filter @flanksource/clicky-ui build:icons`" : resolved.error}`);
84
- return (table[specifier] = urlOf(resolved.path));
85
- }
86
- const resolved = resolveEntry(depResolver, checkout, specifier);
87
- const target = tracer.target(resolved.path, specifier, "bare");
88
- if (!target) throw new Error(`${url}: cannot trace ${specifier}`);
89
- if (BASE_PACKAGES.some((name) => specifier === name || specifier.startsWith(`${name}/`))) tracer.mapTopLevel(specifier, target);
90
- return (table[specifier] = `/npm/${target.replaceAll("{flavor}", "production")}`);
91
- };
92
- const sideEffects = sideEffectsRule((JSON.parse(readFileSync(join(checkout, "package.json"), "utf8")) as { sideEffects: unknown }).sideEffects, pkg.name);
93
- const shapes = new Map<string, ReturnType<typeof shapeOf>>();
94
- const shape = (url: string) => {
95
- if (!url.startsWith(LINK)) return null;
96
- let value = shapes.get(url);
97
- if (!value) {
98
- value = shapeOf(parseSync("module.js", source(url)).module);
99
- shapes.set(url, value);
100
- }
101
- return value;
102
- };
103
- const barrels = buildBarrelIndex({
104
- urls: [`${LINK}src/data.ts`, `${LINK}src/icons.ts`],
105
- shape,
106
- resolve,
107
- sideEffectFree: (url) => url.startsWith(LINK) && sideEffects(url.slice(LINK.length)),
108
- }).index;
109
- const modules: Record<string, SourceModule> = {};
110
- await mkdir(out, { recursive: true });
111
- await writeFile(join(out, "source-barrels.json"), JSON.stringify(barrels, null, 2));
112
- const pending = [`${LINK}page.tsx`];
113
- for (let url = pending.shift(); url; url = pending.shift()) {
114
- if (modules[url]) continue;
115
- const code = source(url);
116
- for (const item of parse(code)[0]) if (typeof item.specifier === "string") resolve(url, item.specifier);
117
- const rewritten = await rewriteLinked({ code, resolutions: resolutions[url] ?? {}, barrels });
118
- modules[url] = { path: url.slice(LINK.length), resolutions: resolutions[url] ?? {} };
119
- for (const item of parse(rewritten)[0]) if (item.specifier?.startsWith(LINK)) pending.push(item.specifier);
120
- }
121
- tracer.trace();
122
- await mkdir(out, { recursive: true });
123
- const conversion = await convertCommonJs(tracer, out, true);
124
- if (tracer.failures.length > 0) throw new Error(JSON.stringify(tracer.failures));
125
- const fragment = fragmentOf(tracer);
126
- fragment.imports[`${pkg.name}/data`] = `${pkg.name}@${pkg.version}/src/data.ts`;
127
- await writeFile(join(out, "importmap.json"), JSON.stringify(fragment, null, 2));
128
- const composed = composeImportMap([fragment], "production", "/npm/");
129
- if (composed.failures.length > 0) throw new Error(JSON.stringify(composed.failures));
130
- composed.map.imports[`${pkg.name}/data`] = `${LINK}src/data.ts`;
131
- return { tracer, fragment, map: composed.map, modules, barrels, conversion, pkg };
132
- }
@@ -1,36 +0,0 @@
1
- import type { ImportMap } from "../lib/fragment.ts";
2
-
3
- export const PAGE = `import React from "react";
4
- import { createRoot } from "react-dom/client";
5
- import { DataTable, Version } from "@flanksource/clicky-ui/data";
6
- const rows = [{name:"alpha", status:"ready"}, {name:"beta", status:"ready"}];
7
- createRoot(document.getElementById("root")!).render(<main><h1>Linked checkout</h1><Version /><div style={{height:400}}><DataTable data={rows} columns={[{key:"name",label:"Name"},{key:"status",label:"Status"}]} /></div></main>);
8
- `;
9
-
10
- export function frame(map: ImportMap): string {
11
- return `<!doctype html><html><head><link rel="icon" href="data:,">
12
- <script>window.addEventListener("error",e=>parent.postMessage({kind:"failure",error:e.message},location.origin));window.addEventListener("unhandledrejection",e=>parent.postMessage({kind:"failure",error:String(e.reason)},location.origin));</script>
13
- <script type="importmap">${JSON.stringify(map)}</script>
14
- <style>body{font:14px system-ui;margin:24px}table{border-collapse:collapse;width:100%}td,th{padding:8px;border:1px solid #ccc;text-align:left}button{padding:4px}svg{width:1em;height:1em}span[data-link-edit]{color:green}</style>
15
- </head><body><div id="root"></div><script type="module">
16
- await import("/link/checkout/page.tsx");
17
- const deadline=performance.now()+30000;
18
- function ready(){const markers=[...document.querySelectorAll("[data-link-edit]")].map(x=>x.textContent);if(markers.length===2 && document.querySelectorAll("tbody tr").length===2){requestAnimationFrame(()=>requestAnimationFrame(()=>parent.postMessage({kind:"ready",markers,at:performance.timeOrigin+performance.now(),loadMs:performance.now(),commit:document.querySelector("main")?.textContent,reactInstances:(globalThis.__PAGE_RUNTIME_REACT_INSTANCES__??[]).length},location.origin)));}else if(performance.now()>deadline)throw Error("linked page did not render table and both probes");else requestAnimationFrame(ready);}ready();
19
- </script></body></html>`;
20
- }
21
-
22
- export function host(sourceOrigin: string, recordsOrigin: string): string {
23
- return `<!doctype html><html><head><link rel="icon" href="data:,"><title>Local-folder link spike</title></head><body>
24
- <h1>Developer link host</h1><p id="status">Registering worker</p><iframe id="linked" style="width:1100px;height:650px"></iframe><iframe id="control" src="/control.html"></iframe>
25
- <script type="module">
26
- const state=window.linkState={runs:[],errors:[],controlLoads:0,done:false};
27
- const recordOrigin=${JSON.stringify(recordsOrigin)};async function record(payload){const response=await fetch(recordOrigin,{method:"POST",body:JSON.stringify(payload)});if(!response.ok)throw Error("record HTTP "+response.status);}
28
- const linked=document.querySelector("#linked");let phase="cold",change=null,seen=0;const origin=${JSON.stringify(sourceOrigin)};
29
- localStorage.setItem("page-runtime-developer-link",JSON.stringify({id:"checkout",origin,library:"@flanksource/clicky-ui",enabled:true}));
30
- async function rpc(action,paths){const channel=new MessageChannel();return new Promise((resolve,reject)=>{const timer=setTimeout(()=>reject(Error("worker RPC timeout")),30000);channel.port1.onmessage=e=>{clearTimeout(timer);e.data.error?reject(Error(e.data.error)):resolve(e.data)};navigator.serviceWorker.controller.postMessage({action,paths},[channel.port2]);});}
31
- window.addEventListener("message",async e=>{if(e.origin!==location.origin)return;if(e.source===document.querySelector("#control").contentWindow){state.controlLoads++;return;}if(e.source!==linked.contentWindow)return;if(e.data.kind==="failure"){state.errors.push(e.data.error);await record({error:e.data.error});return;}if(e.data.kind!=="ready")return;try{const stats=await rpc("stats");const ready=e.data;const run={phase,...ready,change,timings:stats.timings,controlLoads:state.controlLoads,coldStart:state.coldStart,userAgent:navigator.userAgent};state.runs.push(run);document.querySelector("#status").textContent=phase+": "+ready.markers.join(", ");if(phase==="cold"){phase="warm";await rpc("reset");linked.src="/frame.html?warm";}else{phase="edit";state.done=true;}await record({record:run});}catch(error){state.errors.push(String(error));await record({error:String(error)});}});
32
- try{await navigator.serviceWorker.register("/worker.js",{scope:"/"});await navigator.serviceWorker.ready;if(!navigator.serviceWorker.controller)await new Promise(resolve=>navigator.serviceWorker.addEventListener("controllerchange",resolve,{once:true}));state.coldStart=performance.timeOrigin+performance.now();linked.src="/frame.html";
33
- setInterval(async()=>{try{if(!state.done)return;const response=await fetch(origin+"/changes?after="+seen);if(!response.ok)throw Error("changes HTTP "+response.status);const next=await response.json();if(next.revision<=seen)return;seen=next.revision;state.done=false;change={...next,detectedAt:performance.timeOrigin+performance.now()};await rpc("reset");await rpc("invalidate",["/link/checkout/"+next.path]);change.invalidatedAt=performance.timeOrigin+performance.now();linked.src="/frame.html?revision="+seen;}catch(error){state.errors.push(String(error));await record({error:String(error)});}},25);
34
- }catch(error){state.errors.push(String(error));await record({error:String(error)});}
35
- </script></body></html>`;
36
- }