@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.
- package/README.md +495 -0
- package/dist/build/README.md +96 -0
- package/{spikes/lib → dist/build}/cjs-export-names.mjs +4 -2
- package/dist/build/dependencies.mjs +279 -0
- package/dist/build/dependencies.mjs.map +1 -0
- package/dist/build/dependency-cache-Zg-FGasE.mjs +2130 -0
- package/dist/build/dependency-cache-Zg-FGasE.mjs.map +1 -0
- package/dist/build/index.mjs +42 -0
- package/dist/build/index.mjs.map +1 -0
- package/{builder-package.json → dist/build/package.json} +1 -1
- package/dist/build/types/activity-schema.d.ts +62 -0
- package/dist/build/types/build/barrels.d.ts +70 -0
- package/dist/build/types/build/base.d.ts +2 -0
- package/dist/build/types/build/browser-runtime-exports.d.ts +19 -0
- package/dist/build/types/build/check-fragment.d.ts +5 -0
- package/dist/build/types/build/commonjs-exports.d.ts +5 -0
- package/dist/build/types/build/convert-commonjs.d.ts +12 -0
- package/dist/build/types/build/dependencies.d.ts +6 -0
- package/dist/build/types/build/dependency-barrel-index.d.ts +5 -0
- package/dist/build/types/build/dependency-barrels.d.ts +7 -0
- package/dist/build/types/build/dependency-cache.d.ts +7 -0
- package/dist/build/types/build/dependency-optional.d.ts +4 -0
- package/dist/build/types/build/dependency-plugin.d.ts +8 -0
- package/dist/build/types/build/dependency-runtime.d.ts +20 -0
- package/dist/build/types/build/dependency-workers.d.ts +8 -0
- package/dist/build/types/build/errors.d.ts +9 -0
- package/dist/build/types/build/fragment.d.ts +13 -0
- package/dist/build/types/build/index.d.ts +7 -0
- package/dist/build/types/build/library-runtime.d.ts +21 -0
- package/dist/build/types/build/module-utils.d.ts +3 -0
- package/dist/build/types/build/recipe-dependencies.d.ts +2 -0
- package/dist/build/types/build/runtime-entries.d.ts +4 -0
- package/dist/build/types/build/runtime-layer.d.ts +17 -0
- package/dist/build/types/build/trace.d.ts +140 -0
- package/dist/build/types/design-schema.d.ts +98 -0
- package/dist/build/types/host/agent-source.d.ts +2 -0
- package/dist/build/types/host/agent-validation.d.ts +3 -0
- package/dist/build/types/host/design-validation.d.ts +2 -0
- package/dist/build/types/host/message-values.d.ts +8 -0
- package/dist/build/types/host/review/validation.d.ts +5 -0
- package/dist/build/types/host/validation.d.ts +6 -0
- package/dist/build/types/link/page-sources.d.ts +31 -0
- package/dist/build/types/link/types.d.ts +62 -0
- package/dist/build/types/link/validation.d.ts +9 -0
- package/dist/build/types/markers.d.ts +10 -0
- package/dist/build/types/review-schema.d.ts +60 -0
- package/dist/build/types/schema.d.ts +319 -0
- package/dist/build/types/sw/barrels.d.ts +9 -0
- package/dist/build/types/sw/compiler-plugins.d.ts +6 -0
- package/dist/build/types/sw/composition.d.ts +8 -0
- package/dist/build/types/sw/module-transform.d.ts +68 -0
- package/dist/build/types/sw/profile.d.ts +7 -0
- package/dist/build/types/sw/source-provider.d.ts +7 -0
- package/dist/build/types/sw/versions.d.ts +10 -0
- package/dist/node/catalog.mjs +1 -0
- package/dist/node/chunks/publication-RchcQvxD.mjs +229 -0
- package/dist/node/chunks/publication-RchcQvxD.mjs.map +1 -0
- package/dist/node/chunks/schema-CaRTfg2x.mjs +12 -0
- package/dist/node/chunks/schema-CaRTfg2x.mjs.map +1 -0
- package/dist/node/dev.mjs +410 -0
- package/dist/node/dev.mjs.map +1 -0
- package/dist/node/publication/cli.mjs +13 -0
- package/dist/node/publication/cli.mjs.map +1 -0
- package/dist/node/publication.mjs +1 -0
- package/dist/node/schema.mjs +1 -0
- package/dist/node/styles.mjs +49 -0
- package/dist/node/styles.mjs.map +1 -0
- package/dist/static/boot.js +40938 -0
- package/dist/static/boot.js.map +1 -0
- package/dist/static/bootstrap.html +1 -0
- package/dist/static/devtools-hook.js +118 -0
- package/dist/static/document-bundle.js +1 -0
- package/dist/static/document.js +2621 -0
- package/dist/static/editing.js +37 -0
- package/dist/static/export-compiler.js +81521 -0
- package/dist/static/export-compiler.js.map +1 -0
- package/dist/static/page-agent.js +17193 -0
- package/dist/static/page-agent.js.map +1 -0
- package/dist/static/sw.js +86112 -0
- package/dist/static/sw.js.map +1 -0
- package/package.json +46 -13
- package/scripts/build-node.ts +26 -0
- package/scripts/build-static.ts +15 -4
- package/scripts/build.ts +1 -0
- package/scripts/react-externals.ts +18 -0
- package/scripts/release-version.ts +2 -1
- package/src/activity-schema.ts +3 -2
- package/src/build/README.md +3 -1
- package/src/build/browser-runtime-exports.ts +52 -0
- package/src/build/dependencies.ts +3 -1
- package/src/build/dependency-barrel-index.ts +48 -0
- package/src/build/dependency-barrels.ts +26 -5
- package/src/build/dependency-cache.ts +1 -1
- package/src/build/dependency-optional.ts +15 -0
- package/src/build/dependency-plugin.ts +2 -2
- package/src/build/dependency-runtime.ts +48 -13
- package/src/build/dependency-workers.ts +41 -0
- package/src/build/library-runtime.ts +6 -3
- package/src/build/runtime-layer.ts +99 -0
- package/src/build/trace.ts +12 -10
- package/src/dev/README.md +30 -0
- package/src/dev/index.ts +4 -1
- package/src/dev/runtime-origin.ts +63 -0
- package/src/editing.ts +1 -1
- package/src/form/entry-source.ts +68 -0
- package/src/form/form-page.ts +63 -0
- package/src/form/index.ts +2 -0
- package/src/form/source-update.ts +17 -0
- package/src/frame/activity.ts +4 -2
- package/src/frame/agent/README.md +1 -1
- package/src/frame/agent/agent.browser.ts +1 -1
- package/src/frame/agent/frame-layout.ts +54 -0
- package/src/frame/agent/index.ts +11 -8
- package/src/frame/agent/overlay.ts +19 -6
- package/src/frame/agent/owner.ts +6 -3
- package/src/frame/agent/review.ts +3 -2
- package/src/frame/agent.ts +1 -0
- package/src/frame/boot-styles.ts +3 -3
- package/src/frame/boot.ts +98 -34
- package/src/frame/bridge.ts +4 -4
- package/src/frame/document-assets.ts +76 -0
- package/src/frame/document-entry.ts +68 -0
- package/src/frame/document-modules.ts +113 -0
- package/src/frame/document-mount.ts +32 -0
- package/src/frame/export-page.ts +6 -4
- package/src/frame/export.ts +5 -6
- package/src/frame/index.ts +2 -1
- package/src/frame/mount-page.ts +36 -0
- package/src/frame/render-job.ts +101 -0
- package/src/frame/runtime.browser.ts +20 -1
- package/src/frame/tailwind/load.ts +16 -7
- package/src/frame/tailwind/recipe.ts +4 -9
- package/src/frame/tailwind/runtime.ts +4 -4
- package/src/frame/tailwind/stylesheets.ts +12 -7
- package/src/frame/tailwind/testing/client.ts +8 -7
- package/src/frame/tailwind/testing/server.ts +1 -1
- package/src/frame/testing/boot-layout.ts +3 -0
- package/src/frame/testing/host.ts +18 -0
- package/src/frame/testing/server.ts +18 -3
- package/src/host/BuildLog.tsx +2 -1
- package/src/host/DEBUG_CONSOLE.md +13 -0
- package/src/host/PageForm.tsx +63 -0
- package/src/host/PageFrame.tsx +14 -6
- package/src/host/RuntimeActivity.tsx +3 -1
- package/src/host/RuntimeDebugPanel.tsx +18 -0
- package/src/host/activity-state.ts +1 -1
- package/src/host/bridge.ts +2 -1
- package/src/host/debug-runtime.tsx +17 -0
- package/src/host/design-validation.ts +1 -1
- package/src/host/index.ts +1 -0
- package/src/host/link/transport.ts +2 -1
- package/src/host/review/index.ts +6 -5
- package/src/host/runtime-diagnostics.ts +41 -0
- package/src/host/validation.ts +40 -3
- package/src/link/testing/server.ts +10 -7
- package/src/link/testing/worker.ts +1 -1
- package/src/schema.ts +32 -6
- package/src/styles.ts +40 -0
- package/src/sw/compile.ts +1 -1
- package/src/sw/compiler.ts +14 -7
- package/src/sw/converted.browser.ts +1 -1
- package/src/sw/errors.ts +15 -2
- package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/browser-server.ts +5 -5
- package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures.ts +2 -2
- package/src/sw/link-compiler.ts +12 -4
- package/src/sw/link-route.ts +1 -1
- package/src/sw/markers.ts +1 -1
- package/src/sw/module-transform.ts +14 -2
- package/src/sw/profile.ts +3 -1
- package/src/sw/resolver.ts +8 -4
- package/src/sw/router.ts +52 -12
- package/src/sw/runtime-exports.ts +39 -0
- package/src/sw/source-provider.ts +20 -0
- package/src/sw/versions.ts +11 -4
- package/src/sw/worker.ts +5 -1
- package/.vitest/gavel-reporter-3e3dfb64eda19344.mjs +0 -59
- package/.vitest/vitest-report-root-1793958008919344000.json +0 -1
- package/.vitest/vitest-report-root-1793958052786561000.json +0 -1
- package/.vitest/vitest-report-root-1793958143511414000.json +0 -1
- package/.vitest/vitest-report-root-1793958185908019000.json +0 -1
- package/.vitest/vitest-report-root-1793958252687550000.json +0 -1
- package/.vitest/vitest-report-root-1793958260385388000.json +0 -1
- package/.vitest/vitest-report-root-1793958312358683000.json +0 -1
- package/.vitest/vitest-report-root-1793958386118791000.json +0 -1
- package/.vitest/vitest-report-root-1793958388712140000.json +0 -1
- package/.vitest/vitest-report-root-1793958429135603000.json +0 -1
- package/.vitest/vitest-report-root-1793958433387809000.json +0 -1
- package/.vitest/vitest-report-root-1793958517322792000.json +0 -1
- package/.vitest/vitest-report-root-1793958542332252000.json +0 -1
- package/.vitest/vitest-report-root-1793958617698698000.json +0 -1
- package/.vitest/vitest-report-root-1793958676587753000.json +0 -1
- package/.vitest/vitest-report-root-1793958707827469000.json +0 -1
- package/.vitest/vitest-report-root-1793958729745028000.json +0 -1
- package/.vitest/vitest-report-root-1793958736696408000.json +0 -1
- package/.vitest/vitest-report-root-1793958740449993000.json +0 -1
- package/.vitest/vitest-report-root-1793958841510921000.json +0 -1
- package/.vitest/vitest-report-root-1793958847664582000.json +0 -1
- package/.vitest/vitest-report-root-1793958900327643000.json +0 -1
- package/.vitest/vitest-report-root-1793958950822823000.json +0 -1
- package/.vitest/vitest-report-root-1793959013655262000.json +0 -1
- package/.vitest/vitest-report-root-1793959017905881000.json +0 -1
- package/.vitest/vitest-report-root-1793959093169044000.json +0 -1
- package/.vitest/vitest-report-root-1793959093978087000.json +0 -1
- package/.vitest/vitest-report-root-1793959101111925000.json +0 -1
- package/.vitest/vitest-report-root-1793959145317906000.json +0 -1
- package/.vitest/vitest-report-root-1793959190760607000.json +0 -1
- package/.vitest/vitest-report-root-1793959249695805000.json +0 -1
- package/.vitest/vitest-report-root-1793959323191511000.json +0 -1
- package/.vitest/vitest-report-root-1793959453311564000.json +0 -1
- package/.vitest/vitest-report-root-1793959495806182000.json +0 -1
- package/.vitest/vitest-report-root-1793959499945435000.json +0 -1
- package/.vitest/vitest-report-root-1793959546773807000.json +0 -1
- package/.vitest/vitest-report-root-1793959583335593000.json +0 -1
- package/.vitest/vitest-report-root-1793959621479504000.json +0 -1
- package/.vitest/vitest-report-root-1793959651002360000.json +0 -1
- package/.vitest/vitest-report-root-1793959655646061000.json +0 -1
- package/.vitest/vitest-report-root-1793959741176826000.json +0 -1
- package/.vitest/vitest-report-root-1793959744743733000.json +0 -1
- package/.vitest/vitest-report-root-1793959833244182000.json +0 -1
- package/.vitest/vitest-report-root-1793959882131751000.json +0 -1
- package/.vitest/vitest-report-root-1793959887033254000.json +0 -1
- package/.vitest/vitest-report-root-1793960000631977000.json +0 -1
- package/.vitest/vitest-report-root-1793960011938504000.json +0 -1
- package/.vitest/vitest-report-root-1793961370018852000.json +0 -1
- package/.vitest/vitest-report-root-1793961745370827000.json +0 -1
- package/.vitest/vitest-report-root-1793961764143180000.json +0 -1
- package/.vitest/vitest-report-root-1793961835963066000.json +0 -1
- package/.vitest/vitest-report-root-1793961890729922000.json +0 -1
- package/.vitest/vitest-report-root-1793961968680074000.json +0 -1
- package/.vitest/vitest-report-root-1793962066862337000.json +0 -1
- package/.vitest/vitest-report-root-1793962087917497000.json +0 -1
- package/.vitest/vitest-report-root-1793962157254386000.json +0 -1
- package/.vitest/vitest-report-root-1793962171214865000.json +0 -1
- package/.vitest/vitest-report-root-1793962183290533000.json +0 -1
- package/.vitest/vitest-report-root-1793962184809932000.json +0 -1
- package/.vitest/vitest-report-root-1793962197715204000.json +0 -1
- package/.vitest/vitest-report-root-1793962244650717000.json +0 -1
- package/.vitest/vitest-report-root-1793962259802273000.json +0 -1
- package/.vitest/vitest-report-root-1793962278799745000.json +0 -1
- package/.vitest/vitest-report-root-1793962304412974000.json +0 -1
- package/.vitest/vitest-report-root-1793962328411454000.json +0 -1
- package/.vitest/vitest-report-root-1793962355747869000.json +0 -1
- package/.vitest/vitest-report-root-1793962381401572000.json +0 -1
- package/.vitest/vitest-report-root-1793962393326735000.json +0 -1
- package/.vitest/vitest-report-root-1793962393329206000.json +0 -1
- package/.vitest/vitest-report-root-1793962437796768000.json +0 -1
- package/.vitest/vitest-report-root-1793962444190384000.json +0 -1
- package/.vitest/vitest-report-root-1793962445347541000.json +0 -1
- package/.vitest/vitest-report-root-1793962473691143000.json +0 -1
- package/.vitest/vitest-report-root-1793962474291457000.json +0 -1
- package/.vitest/vitest-report-root-1793962499680468000.json +0 -1
- package/.vitest/vitest-report-root-1793962504410483000.json +0 -1
- package/.vitest/vitest-report-root-1793962516850524000.json +0 -1
- package/.vitest/vitest-report-root-1793962536736273000.json +0 -1
- package/.vitest/vitest-report-root-1793962551181783000.json +0 -1
- package/.vitest/vitest-report-root-1793962553575620000.json +0 -1
- package/.vitest/vitest-report-root-1793962555169730000.json +0 -1
- package/.vitest/vitest-report-root-1793962572639765000.json +0 -1
- package/.vitest/vitest-report-root-1793962597102952000.json +0 -1
- package/.vitest/vitest-report-root-1793962637156669000.json +0 -1
- package/.vitest/vitest-report-root-1793962653530027000.json +0 -1
- package/.vitest/vitest-report-root-1793962665824334000.json +0 -1
- package/.vitest/vitest-report-root-1793962682161714000.json +0 -1
- package/.vitest/vitest-report-root-1793962719526168000.json +0 -1
- package/.vitest/vitest-report-root-1793962723853934000.json +0 -1
- package/.vitest/vitest-report-root-1793962741927728000.json +0 -1
- package/.vitest/vitest-report-root-1793962794308371000.json +0 -1
- package/.vitest/vitest-report-root-1793962796334481000.json +0 -1
- package/.vitest/vitest-report-root-1793962798075169000.json +0 -1
- package/.vitest/vitest-report-root-1793962836466676000.json +0 -1
- package/.vitest/vitest-report-root-1793962846507317000.json +0 -1
- package/.vitest/vitest-report-root-1793962876266701000.json +0 -1
- package/.vitest/vitest-report-root-1793962922031308000.json +0 -1
- package/.vitest/vitest-report-root-1793962932957166000.json +0 -1
- package/.vitest/vitest-report-root-1793962946930725000.json +0 -1
- package/.vitest/vitest-report-root-1793963027896350000.json +0 -1
- package/.vitest/vitest-report-root-1793963036618707000.json +0 -1
- package/.vitest/vitest-report-root-1793963067365318000.json +0 -1
- package/.vitest/vitest-report-root-1793963077597641000.json +0 -1
- package/.vitest/vitest-report-root-1793963126365651000.json +0 -1
- package/.vitest/vitest-report-root-1793963208744553000.json +0 -1
- package/.vitest/vitest-report-root-1793963232806450000.json +0 -1
- package/.vitest/vitest-report-root-1793963325077422000.json +0 -1
- package/.vitest/vitest-report-root-1793963392172877000.json +0 -1
- package/.vitest/vitest-report-root-1793963398218324000.json +0 -1
- package/.vitest/vitest-report-root-1793963410749092000.json +0 -1
- package/.vitest/vitest-report-root-1793963437279580000.json +0 -1
- package/.vitest/vitest-report-root-1793963450096193000.json +0 -1
- package/.vitest/vitest-report-root-1793963478908641000.json +0 -1
- package/.vitest/vitest-report-root-1793963507838465000.json +0 -1
- package/.vitest/vitest-report-root-1793963528668174000.json +0 -1
- package/.vitest/vitest-report-root-1793963601860390000.json +0 -1
- package/.vitest/vitest-report-root-1793963611633446000.json +0 -1
- package/.vitest/vitest-report-root-1793963624713406000.json +0 -1
- package/.vitest/vitest-report-root-1793963680656685000.json +0 -1
- package/.vitest/vitest-report-root-1793963705231851000.json +0 -1
- package/.vitest/vitest-report-root-1793963708929500000.json +0 -1
- package/.vitest/vitest-report-root-1793963710267844000.json +0 -1
- package/.vitest/vitest-report-root-1793963713999248000.json +0 -1
- package/.vitest/vitest-report-root-1793963786513455000.json +0 -1
- package/.vitest/vitest-report-root-1793963792518765000.json +0 -1
- package/.vitest/vitest-report-root-1793963804089549000.json +0 -1
- package/.vitest/vitest-report-root-1793963840412921000.json +0 -1
- package/.vitest/vitest-report-root-1793963880361176000.json +0 -1
- package/.vitest/vitest-report-root-1793963935121106000.json +0 -1
- package/.vitest/vitest-report-root-1793963937290698000.json +0 -1
- package/.vitest/vitest-report-root-1793963977050773000.json +0 -1
- package/.vitest/vitest-report-root-1793963981229158000.json +0 -1
- package/.vitest/vitest-report-root-1793963989422080000.json +0 -1
- package/.vitest/vitest-report-root-1793964025924629000.json +0 -1
- package/.vitest/vitest-report-root-1793964027983705000.json +0 -1
- package/.vitest/vitest-report-root-1793964059969386000.json +0 -1
- package/.vitest/vitest-report-root-1793964071524069000.json +0 -1
- package/.vitest/vitest-report-root-1793964076285860000.json +0 -1
- package/.vitest/vitest-report-root-1793964077988100000.json +0 -1
- package/.vitest/vitest-report-root-1793964093289042000.json +0 -1
- package/.vitest/vitest-report-root-1793964102899356000.json +0 -1
- package/.vitest/vitest-report-root-1793964128089691000.json +0 -1
- package/.vitest/vitest-report-root-1793964129495156000.json +0 -1
- package/.vitest/vitest-report-root-1793964182849665000.json +0 -1
- package/.vitest/vitest-report-root-1793964223959893000.json +0 -1
- package/.vitest/vitest-report-root-1793964253351716000.json +0 -1
- package/.vitest/vitest-report-root-1793964290220122000.json +0 -1
- package/.vitest/vitest-report-root-1793964318037006000.json +0 -1
- package/.vitest/vitest-report-root-1793964334676691000.json +0 -1
- package/.vitest/vitest-report-root-1793964378520677000.json +0 -1
- package/.vitest/vitest-report-root-1793964383748994000.json +0 -1
- package/.vitest/vitest-report-root-1793964394042303000.json +0 -1
- package/.vitest/vitest-report-root-1793964466521881000.json +0 -1
- package/.vitest/vitest-report-root-1793964470478175000.json +0 -1
- package/.vitest/vitest-report-root-1793964484499019000.json +0 -1
- package/.vitest/vitest-report-root-1793964527645213000.json +0 -1
- package/.vitest/vitest-report-root-1793964608875865000.json +0 -1
- package/.vitest/vitest-report-root-1793964623608336000.json +0 -1
- package/.vitest/vitest-report-root-1793964629870846000.json +0 -1
- package/.vitest/vitest-report-root-1793964674515564000.json +0 -1
- package/.vitest/vitest-report-root-1793964706923651000.json +0 -1
- package/.vitest/vitest-report-root-1793964712832942000.json +0 -1
- package/.vitest/vitest-report-root-1793964714824633000.json +0 -1
- package/.vitest/vitest-report-root-1793964755433952000.json +0 -1
- package/.vitest/vitest-report-root-1793964783157670000.json +0 -1
- package/.vitest/vitest-report-root-1793964818963246000.json +0 -1
- package/.vitest/vitest-report-root-1793964843818548000.json +0 -1
- package/.vitest/vitest-report-root-1793964929824204000.json +0 -1
- package/.vitest/vitest-report-root-1793964973060713000.json +0 -1
- package/.vitest/vitest-report-root-1793964983122482000.json +0 -1
- package/.vitest/vitest-report-root-1793965107264567000.json +0 -1
- package/.vitest/vitest-report-root-1793965258759177000.json +0 -1
- package/.vitest/vitest-report-root-1793965277212091000.json +0 -1
- package/.vitest/vitest-report-root-1793965420648188000.json +0 -1
- package/.vitest/vitest-report-root-1793965611688414000.json +0 -1
- package/.vitest/vitest-report-root-1793965753407694000.json +0 -1
- package/.vitest/vitest-report-root-1793965766104309000.json +0 -1
- package/.vitest/vitest-report-root-1793965766823098000.json +0 -1
- package/.vitest/vitest-report-root-1793965806066109000.json +0 -1
- package/.vitest/vitest-report-root-1793965824697182000.json +0 -1
- package/.vitest/vitest-report-root-1793965904374564000.json +0 -1
- package/.vitest/vitest-report-root-1793965920838340000.json +0 -1
- package/.vitest/vitest-report-root-1793965932520617000.json +0 -1
- package/.vitest/vitest-report-root-1793965971574656000.json +0 -1
- package/.vitest/vitest-report-root-1793966049815024000.json +0 -1
- package/.vitest/vitest-report-root-1793966057888034000.json +0 -1
- package/.vitest/vitest-report-root-1793966066838868000.json +0 -1
- package/.vitest/vitest-report-root-1793966160347764000.json +0 -1
- package/.vitest/vitest-report-root-1793966196305985000.json +0 -1
- package/.vitest/vitest-report-root-1793966221538043000.json +0 -1
- package/.vitest/vitest-report-root-1793966251519918000.json +0 -1
- package/.vitest/vitest-report-root-1793966447000588000.json +0 -1
- package/.vitest/vitest-report-root-1793966463178249000.json +0 -1
- package/.vitest/vitest-report-root-1793966486995648000.json +0 -1
- package/.vitest/vitest-report-root-1793966726756953000.json +0 -1
- package/.vitest/vitest-report-root-1793966763656807000.json +0 -1
- package/.vitest/vitest-report-root-1793966979409799000.json +0 -1
- package/.vitest/vitest-report-root-1793967385250149000.json +0 -1
- package/.vitest/vitest-report-root-1793967617080163000.json +0 -1
- package/.vitest/vitest-report-root-1793967649428508000.json +0 -1
- package/.vitest/vitest-report-root-1793967773689520000.json +0 -1
- package/.vitest/vitest-report-root-1793968743743508000.json +0 -1
- package/.vitest/vitest-report-root-1793968846470407000.json +0 -1
- package/.vitest/vitest-report-root-1793968880878391000.json +0 -1
- package/.vitest/vitest-report-root-1793969027713529000.json +0 -1
- package/.vitest/vitest-report-root-1793969041841266000.json +0 -1
- package/.vitest/vitest-report-root-1793969142007468000.json +0 -1
- package/.vitest/vitest-report-root-1793969164867379000.json +0 -1
- package/.vitest/vitest-report-root-1793969193145858000.json +0 -1
- package/.vitest/vitest-report-root-1793969246818533000.json +0 -1
- package/.vitest/vitest-report-root-1793969270845486000.json +0 -1
- package/.vitest/vitest-report-root-1793969272514219000.json +0 -1
- package/.vitest/vitest-report-root-1793969302476105000.json +0 -1
- package/.vitest/vitest-report-root-1793969401697799000.json +0 -1
- package/.vitest/vitest-report-root-1793969433222630000.json +0 -1
- package/.vitest/vitest-report-root-1793969453350714000.json +0 -1
- package/.vitest/vitest-report-root-1793969567187400000.json +0 -1
- package/.vitest/vitest-report-root-1793969602230024000.json +0 -1
- package/.vitest/vitest-report-root-1793969633261063000.json +0 -1
- package/.vitest/vitest-report-root-1793969673876404000.json +0 -1
- package/.vitest/vitest-report-root-1793969702287010000.json +0 -1
- package/.vitest/vitest-report-root-1793969745828386000.json +0 -1
- package/.vitest/vitest-report-root-1793969893687205000.json +0 -1
- package/.vitest/vitest-report-root-1793969949642120000.json +0 -1
- package/.vitest/vitest-report-root-1793969981399076000.json +0 -1
- package/.vitest/vitest-report-root-1793970027152713000.json +0 -1
- package/.vitest/vitest-report-root-1793970030585158000.json +0 -1
- package/.vitest/vitest-report-root-1793970160195767000.json +0 -1
- package/.vitest/vitest-report-root-1793970215752422000.json +0 -1
- package/.vitest/vitest-report-root-1793970217114968000.json +0 -1
- package/.vitest/vitest-report-root-1793970329879319000.json +0 -1
- package/.vitest/vitest-report-root-1793970590586994000.json +0 -1
- package/.vitest/vitest-report-root-1793970625359990000.json +0 -1
- package/.vitest/vitest-report-root-1793970672590269000.json +0 -1
- package/.vitest/vitest-report-root-1793970796789022000.json +0 -1
- package/.vitest/vitest-report-root-1793970825710990000.json +0 -1
- package/.vitest/vitest-report-root-1793970884000509000.json +0 -1
- package/.vitest/vitest-report-root-1793970900444617000.json +0 -1
- package/.vitest/vitest-report-root-1793972186024681000.json +0 -1
- package/.vitest/vitest-report-root-1793972227757396000.json +0 -1
- package/.vitest/vitest-report-root-1793972736341600000.json +0 -1
- package/.vitest/vitest-report-root-1793972769249562000.json +0 -1
- package/.vitest/vitest-report-root-1793972859435283000.json +0 -1
- package/.vitest/vitest-report-root-1793972915169294000.json +0 -1
- package/.vitest/vitest-report-root-1793973081515450000.json +0 -1
- package/.vitest/vitest-report-root-1793973111336773000.json +0 -1
- package/.vitest/vitest-report-root-1793973253986969000.json +0 -1
- package/.vitest/vitest-report-root-1793973561283775000.json +0 -1
- package/.vitest/vitest-report-root-1793973593320977000.json +0 -1
- package/.vitest/vitest-report-root-1793973648302867000.json +0 -1
- package/.vitest/vitest-report-root-1793973819657242000.json +0 -1
- package/.vitest/vitest-report-root-1793973952727311000.json +0 -1
- package/.vitest/vitest-report-root-1793974334455876000.json +0 -1
- package/.vitest/vitest-report-root-1793974437074196000.json +0 -1
- package/.vitest/vitest-report-root-1793974437553146000.json +0 -1
- package/.vitest/vitest-report-root-1793974461818626000.json +0 -1
- package/.vitest/vitest-report-root-1793974515255198000.json +0 -1
- package/.vitest/vitest-report-root-1793974516267191000.json +0 -1
- package/.vitest/vitest-report-root-1793974621202824000.json +0 -1
- package/.vitest/vitest-report-root-1793974718450330000.json +0 -1
- package/.vitest/vitest-report-root-1793974834942373000.json +0 -1
- package/.vitest/vitest-report-root-1793974921367314000.json +0 -1
- package/.vitest/vitest-report-root-1793975019367156000.json +0 -1
- package/.vitest/vitest-report-root-1793975048166096000.json +0 -1
- package/.vitest/vitest-report-root-1793975133024339000.json +0 -1
- package/.vitest/vitest-report-root-1793975159711704000.json +0 -1
- package/.vitest/vitest-report-root-1793975517481736000.json +0 -1
- package/.vitest/vitest-report-root-1793975680008825000.json +0 -1
- package/.vitest/vitest-report-root-1793976067648494000.json +0 -1
- package/.vitest/vitest-report-root-1793976314122479000.json +0 -1
- package/.vitest/vitest-report-root-1793976513022402000.json +0 -1
- package/.vitest/vitest-report-root-1793976540410805000.json +0 -1
- package/.vitest/vitest-report-root-1793976555103273000.json +0 -1
- package/.vitest/vitest-report-root-1793976702974407000.json +0 -1
- package/.vitest/vitest-report-root-1793976721093108000.json +0 -1
- package/.vitest/vitest-report-root-1793976955473681000.json +0 -1
- package/.vitest/vitest-report-root-1793977049628483000.json +0 -1
- package/.vitest/vitest-report-root-1793977098467804000.json +0 -1
- package/.vitest/vitest-report-root-1793977132144900000.json +0 -1
- package/.vitest/vitest-report-root-1793977279648191000.json +0 -1
- package/.vitest/vitest-report-root-1793977365312127000.json +0 -1
- package/.vitest/vitest-report-root-1793978227796817000.json +0 -1
- package/.vitest/vitest-report-root-1793978255189735000.json +0 -1
- package/.vitest/vitest-report-root-1793978306509070000.json +0 -1
- package/.vitest/vitest-report-root-1793978418301216000.json +0 -1
- package/.vitest/vitest-report-root-1793978445072573000.json +0 -1
- package/.vitest/vitest-report-root-1793978546605517000.json +0 -1
- package/.vitest/vitest-report-root-1793978576060950000.json +0 -1
- package/.vitest/vitest-report-root-1793978590261408000.json +0 -1
- package/.vitest/vitest-report-root-1793978674733179000.json +0 -1
- package/.vitest/vitest-report-root-1793978718588785000.json +0 -1
- package/.vitest/vitest-report-root-1793978725363453000.json +0 -1
- package/.vitest/vitest-report-root-1793978729967285000.json +0 -1
- package/.vitest/vitest-report-root-1793978755641607000.json +0 -1
- package/.vitest/vitest-report-root-1793978782769802000.json +0 -1
- package/.vitest/vitest-report-root-1793978784870947000.json +0 -1
- package/.vitest/vitest-report-root-1793978806927335000.json +0 -1
- package/.vitest/vitest-report-root-1793978822508324000.json +0 -1
- package/.vitest/vitest-report-root-1793978836339794000.json +0 -1
- package/.vitest/vitest-report-root-1793978837947352000.json +0 -1
- package/.vitest/vitest-report-root-1793978891548295000.json +0 -1
- package/.vitest/vitest-report-root-1793978946172947000.json +0 -1
- package/.vitest/vitest-report-root-1793978947109807000.json +0 -1
- package/.vitest/vitest-report-root-1793979034208662000.json +0 -1
- package/.vitest/vitest-report-root-1793979070583608000.json +0 -1
- package/.vitest/vitest-report-root-1793979081187144000.json +0 -1
- package/.vitest/vitest-report-root-1793979085428673000.json +0 -1
- package/.vitest/vitest-report-root-1793979155097858000.json +0 -1
- package/.vitest/vitest-report-root-1793979233508873000.json +0 -1
- package/.vitest/vitest-report-root-1793979268653273000.json +0 -1
- package/.vitest/vitest-report-root-1793979341978843000.json +0 -1
- package/.vitest/vitest-report-root-1793979345344877000.json +0 -1
- package/.vitest/vitest-report-root-1793979389390374000.json +0 -1
- package/.vitest/vitest-report-root-1793979400063493000.json +0 -1
- package/.vitest/vitest-report-root-1793979432448725000.json +0 -1
- package/.vitest/vitest-report-root-1793979459139430000.json +0 -1
- package/.vitest/vitest-report-root-1793979480341961000.json +0 -1
- package/.vitest/vitest-report-root-1793979510130869000.json +0 -1
- package/.vitest/vitest-report-root-1793979524763924000.json +0 -1
- package/.vitest/vitest-report-root-1793979571563010000.json +0 -1
- package/.vitest/vitest-report-root-1793979627916920000.json +0 -1
- package/.vitest/vitest-report-root-1793979726395379000.json +0 -1
- package/.vitest/vitest-report-root-1793979752029533000.json +0 -1
- package/.vitest/vitest-report-root-1793979753365744000.json +0 -1
- package/.vitest/vitest-report-root-1793979759386206000.json +0 -1
- package/.vitest/vitest-report-root-1793979787819109000.json +0 -1
- package/.vitest/vitest-report-root-1793979827615051000.json +0 -1
- package/.vitest/vitest-report-root-1793979927737393000.json +0 -1
- package/.vitest/vitest-report-root-1793979929836169000.json +0 -1
- package/.vitest/vitest-report-root-1793979955780781000.json +0 -1
- package/.vitest/vitest-report-root-1793980200569636000.json +0 -1
- package/.vitest/vitest-report-root-1793980206045213000.json +0 -1
- package/.vitest/vitest-report-root-1793980285772027000.json +0 -1
- package/.vitest/vitest-report-root-1793980459229828000.json +0 -1
- package/.vitest/vitest-report-root-1793980460545874000.json +0 -1
- package/.vitest/vitest-report-root-1793980554484341000.json +0 -1
- package/.vitest/vitest-report-root-1793980674494388000.json +0 -1
- package/.vitest/vitest-report-root-1793980683752195000.json +0 -1
- package/.vitest/vitest-report-root-1793980947108651000.json +0 -1
- package/.vitest/vitest-report-root-1793981129616629000.json +0 -1
- package/.vitest/vitest-report-root-1793981196611441000.json +0 -1
- package/.vitest/vitest-report-root-1793981226583545000.json +0 -1
- package/.vitest/vitest-report-root-1793981294259721000.json +0 -1
- package/.vitest/vitest-report-root-1793981353393048000.json +0 -1
- package/.vitest/vitest-report-root-1793981424585368000.json +0 -1
- package/.vitest/vitest-report-root-1793981513266687000.json +0 -1
- package/.vitest/vitest-report-root-1793981526418218000.json +0 -1
- package/.vitest/vitest-report-root-1793981540069877000.json +0 -1
- package/.vitest/vitest-report-root-1793981761193625000.json +0 -1
- package/.vitest/vitest-report-root-1793981868520992000.json +0 -1
- package/.vitest/vitest-report-root-1793982048467772000.json +0 -1
- package/.vitest/vitest-report-root-1793982119518020000.json +0 -1
- package/.vitest/vitest-report-root-1793982243473651000.json +0 -1
- package/.vitest/vitest-report-root-1793982406880629000.json +0 -1
- package/.vitest/vitest-report-root-1793982433563632000.json +0 -1
- package/.vitest/vitest-report-root-1793982496753204000.json +0 -1
- package/.vitest/vitest-report-root-1793982500153311000.json +0 -1
- package/.vitest/vitest-report-root-1793982542086095000.json +0 -1
- package/.vitest/vitest-report-root-1793982659482988000.json +0 -1
- package/.vitest/vitest-report-root-1793983799132716000.json +0 -1
- package/.vitest/vitest-report-root-1793983822721833000.json +0 -1
- package/.vitest/vitest-report-root-1793984998618484000.json +0 -1
- package/.vitest/vitest-report-root-1793985050475750000.json +0 -1
- package/.vitest/vitest-report-root-1793985095516077000.json +0 -1
- package/.vitest/vitest-report-root-1793985130729074000.json +0 -1
- package/.vitest/vitest-report-root-1793985177150997000.json +0 -1
- package/.vitest/vitest-report-root-1793985267658626000.json +0 -1
- package/.vitest/vitest-report-root-1793985412705211000.json +0 -1
- package/.vitest/vitest-report-root-1793985433752853000.json +0 -1
- package/.vitest/vitest-report-root-1794087938302852000.json +0 -1
- package/.vitest/vitest-report-root-1794087978339022000.json +0 -1
- package/.vitest/vitest-report-root-1794088095283811000.json +0 -1
- package/.vitest/vitest-report-root-1794088129997065000.json +0 -1
- package/.vitest/vitest-report-root-1794088147336556000.json +0 -1
- package/.vitest/vitest-report-root-1794088173414593000.json +0 -1
- package/.vitest/vitest-report-root-1794088221289657000.json +0 -1
- package/.vitest/vitest-report-root-1794088250766611000.json +0 -1
- package/.vitest/vitest-report-root-1794088365553234000.json +0 -1
- package/.vitest/vitest-report-root-1794088395202655000.json +0 -1
- package/.vitest/vitest-report-root-1794090028732187000.json +0 -1
- package/.vitest/vitest-report-root-1794090054787283000.json +0 -1
- package/.vitest/vitest-report-root-1794090153955794000.json +0 -1
- package/.vitest/vitest-report-root-1794090161850160000.json +0 -1
- package/.vitest/vitest-report-root-1794091755693314000.json +0 -1
- package/.vitest/vitest-report-root-1794091765029349000.json +0 -1
- package/.vitest/vitest-report-root-1794091975649927000.json +0 -1
- package/.vitest/vitest-report-root-1794091994027950000.json +0 -1
- package/.vitest/vitest-report-root-1794092005178771000.json +0 -1
- package/.vitest/vitest-report-root-1794113295302382000.json +0 -1
- package/.vitest/vitest-report-root-1794114156337032000.json +0 -1
- package/.vitest/vitest-report-root-1794114198454137000.json +0 -1
- package/.vitest/vitest-report-root-1794114254064413000.json +0 -1
- package/.vitest/vitest-report-root-1794114280107510000.json +0 -1
- package/.vitest/vitest-report-root-1794114495199837000.json +0 -1
- package/.vitest/vitest-report-root-1794114646604233000.json +0 -1
- package/.vitest/vitest-report-root-1794114666311689000.json +0 -1
- package/.vitest/vitest-report-root-1794114974303438000.json +0 -1
- package/.vitest/vitest-report-root-1794115037361450000.json +0 -1
- package/.vitest/vitest-report-root-1794115097838937000.json +0 -1
- package/.vitest/vitest-report-root-1794115604669388000.json +0 -1
- package/.vitest/vitest-report-root-1794115633814500000.json +0 -1
- package/.vitest/vitest-report-root-1794115648756242000.json +0 -1
- package/.vitest/vitest-report-root-1794115873440741000.json +0 -1
- package/.vitest/vitest-report-root-1794115952930230000.json +0 -1
- package/.vitest/vitest-report-root-1794115963344701000.json +0 -1
- package/.vitest/vitest-report-root-1794116196067450000.json +0 -1
- package/.vitest/vitest-report-root-1794116254301280000.json +0 -1
- package/.vitest/vitest-report-root-1794116259342966000.json +0 -1
- package/.vitest/vitest-report-root-1794118178787879000.json +0 -1
- package/.vitest/vitest-report-root-1794137087891409000.json +0 -1
- package/.vitest/vitest-report-root-1794137100301214000.json +0 -1
- package/.vitest/vitest-report-root-1794137107377813000.json +0 -1
- package/.vitest/vitest-report-root-1794137171230704000.json +0 -1
- package/.vitest/vitest-report-root-1794137317761465000.json +0 -1
- package/.vitest/vitest-report-root-1794137320282368000.json +0 -1
- package/PACKAGE_PUBLICATIONS.md +0 -26
- package/scripts/local-workspaces.test.ts +0 -31
- package/scripts/release-version-cli.test.ts +0 -40
- package/scripts/release-version.test.ts +0 -29
- package/spikes/README.md +0 -70
- package/spikes/barrel-rewriting/README.md +0 -97
- package/spikes/barrel-rewriting/measure.ts +0 -134
- package/spikes/barrel-rewriting/readme.ts +0 -174
- package/spikes/barrel-rewriting/results.json +0 -3440
- package/spikes/barrel-rewriting/run.ts +0 -330
- package/spikes/barrel-rewriting/setup.ts +0 -90
- package/spikes/barrel-rewriting/sw.ts +0 -148
- package/spikes/barrel-rewriting/tenant.ts +0 -91
- package/spikes/barrel-rewriting/worker-config.ts +0 -33
- package/spikes/closure-fragments/README.md +0 -157
- package/spikes/closure-fragments/results.json +0 -959
- package/spikes/closure-fragments/run.ts +0 -298
- package/spikes/compiler/README.md +0 -177
- package/spikes/compiler/compile.test.ts +0 -78
- package/spikes/compiler/compile.ts +0 -82
- package/spikes/compiler/facet-redact.d.ts +0 -5
- package/spikes/compiler/markers.ts +0 -88
- package/spikes/compiler/pages.ts +0 -43
- package/spikes/compiler/readme.ts +0 -116
- package/spikes/compiler/reference.ts +0 -81
- package/spikes/compiler/render.ts +0 -113
- package/spikes/compiler/results.json +0 -3310
- package/spikes/compiler/run.ts +0 -250
- package/spikes/compiler/sucrase-parser.d.ts +0 -8
- package/spikes/compiler/sw.ts +0 -62
- package/spikes/diagram-readiness/README.md +0 -134
- package/spikes/diagram-readiness/analysis.test.ts +0 -52
- package/spikes/diagram-readiness/analysis.ts +0 -35
- package/spikes/diagram-readiness/browser.ts +0 -209
- package/spikes/diagram-readiness/readme.ts +0 -65
- package/spikes/diagram-readiness/results.json +0 -30289
- package/spikes/diagram-readiness/run.ts +0 -103
- package/spikes/diagram-readiness/server.ts +0 -53
- package/spikes/esm-sh/README.md +0 -27
- package/spikes/frame-commenting/README.md +0 -183
- package/spikes/frame-commenting/agent.ts +0 -110
- package/spikes/frame-commenting/hook.ts +0 -1
- package/spikes/frame-commenting/host.ts +0 -66
- package/spikes/frame-commenting/measure.ts +0 -180
- package/spikes/frame-commenting/model.test.ts +0 -27
- package/spikes/frame-commenting/model.ts +0 -40
- package/spikes/frame-commenting/readme.ts +0 -61
- package/spikes/frame-commenting/results.json +0 -5320
- package/spikes/frame-commenting/run.ts +0 -73
- package/spikes/frame-commenting/setup.ts +0 -125
- package/spikes/lib/barrels.test.ts +0 -107
- package/spikes/lib/barrels.ts +0 -309
- package/spikes/lib/content-types.ts +0 -28
- package/spikes/lib/convert-commonjs.ts +0 -168
- package/spikes/lib/fragment.ts +0 -108
- package/spikes/lib/library-set.ts +0 -194
- package/spikes/lib/module-transform.test.ts +0 -133
- package/spikes/lib/module-transform.ts +0 -351
- package/spikes/lib/origin.ts +0 -140
- package/spikes/lib/pages.ts +0 -290
- package/spikes/lib/report.ts +0 -23
- package/spikes/lib/runtime-server.ts +0 -282
- package/spikes/lib/static-server.ts +0 -82
- package/spikes/lib/trace.ts +0 -384
- package/spikes/local-folder-link/README.md +0 -85
- package/spikes/local-folder-link/checkout.ts +0 -132
- package/spikes/local-folder-link/documents.ts +0 -36
- package/spikes/local-folder-link/readme.ts +0 -42
- package/spikes/local-folder-link/results.json +0 -12815
- package/spikes/local-folder-link/rewrite.test.ts +0 -27
- package/spikes/local-folder-link/rewrite.ts +0 -38
- package/spikes/local-folder-link/run.ts +0 -123
- package/spikes/local-folder-link/server.ts +0 -100
- package/spikes/local-folder-link/sw.ts +0 -97
- package/spikes/origin-isolation/README.md +0 -426
- package/spikes/origin-isolation/browsers.ts +0 -43
- package/spikes/origin-isolation/helper.ts +0 -6
- package/spikes/origin-isolation/host.ts +0 -25
- package/spikes/origin-isolation/measure.ts +0 -118
- package/spikes/origin-isolation/model.test.ts +0 -45
- package/spikes/origin-isolation/model.ts +0 -49
- package/spikes/origin-isolation/proxy.ts +0 -35
- package/spikes/origin-isolation/readme.ts +0 -83
- package/spikes/origin-isolation/results.json +0 -3242
- package/spikes/origin-isolation/run.ts +0 -35
- package/spikes/origin-isolation/server.ts +0 -108
- package/spikes/origin-isolation/sw.ts +0 -28
- package/spikes/origin-isolation/tenant.ts +0 -165
- package/spikes/react-runtime-set/README.md +0 -48
- package/spikes/react-runtime-set/convert.ts +0 -118
- package/spikes/react-runtime-set/export-names.mjs +0 -8
- package/spikes/react-runtime-set/page/page.js +0 -46
- package/spikes/react-runtime-set/results.json +0 -84
- package/spikes/react-runtime-set/run.ts +0 -255
- package/spikes/run.ts +0 -15
- package/spikes/sw-tenant-frame/README.md +0 -95
- package/spikes/sw-tenant-frame/results.json +0 -1348
- package/spikes/sw-tenant-frame/run.ts +0 -373
- package/spikes/sw-tenant-frame/site/frame.html +0 -113
- package/spikes/sw-tenant-frame/site/host.html +0 -25
- package/spikes/sw-tenant-frame/site/sw.js +0 -10
- package/spikes/tailwind-parity/README.md +0 -78
- package/spikes/tailwind-parity/compare.test.ts +0 -70
- package/spikes/tailwind-parity/compare.ts +0 -91
- package/spikes/tailwind-parity/facet-font-scale.d.ts +0 -6
- package/spikes/tailwind-parity/facet-styles.ts +0 -77
- package/spikes/tailwind-parity/results.json +0 -885
- package/spikes/tailwind-parity/run.ts +0 -385
- package/spikes/tailwind-parity/runtime-tailwind.ts +0 -82
- package/src/activity.test.ts +0 -57
- package/src/build/barrels.test.ts +0 -107
- package/src/build/dependency-runtime.test.ts +0 -121
- package/src/build/library-runtime.test.ts +0 -343
- package/src/dev/cli.test.ts +0 -12
- package/src/dev/packages.test.ts +0 -175
- package/src/editing.test.tsx +0 -31
- package/src/frame/activity.test.ts +0 -27
- package/src/frame/agent/overlay.test.ts +0 -42
- package/src/frame/agent/owner.test.ts +0 -78
- package/src/frame/agent/vocabulary.test.ts +0 -36
- package/src/frame/boot-bundle.test.ts +0 -20
- package/src/frame/boot-styles.test.ts +0 -102
- package/src/frame/boot.test.ts +0 -108
- package/src/frame/export-compiler.test.ts +0 -23
- package/src/frame/export.test.ts +0 -17
- package/src/frame/tailwind/cache.test.ts +0 -53
- package/src/frame/tailwind/load.test.ts +0 -74
- package/src/frame/tailwind/runtime-cache.test.ts +0 -97
- package/src/frame/tailwind/store.test.ts +0 -104
- package/src/frame/tailwind/tailwind.test.ts +0 -119
- package/src/host/BuildLog.test.tsx +0 -40
- package/src/host/PageFrame.test.tsx +0 -39
- package/src/host/activity-state.test.ts +0 -37
- package/src/host/agent-source.test.ts +0 -9
- package/src/host/agent-validation.test.ts +0 -40
- package/src/host/bridge-request.test.ts +0 -87
- package/src/host/bridge.test.ts +0 -34
- package/src/host/build-log.test.ts +0 -47
- package/src/host/clear-cache.test.ts +0 -75
- package/src/host/design-validation.test.ts +0 -38
- package/src/host/link/transport.test.ts +0 -10
- package/src/host/origin.test.ts +0 -10
- package/src/host/review/remote.test.ts +0 -21
- package/src/host/review/source.test.ts +0 -19
- package/src/host/review/validation.test.ts +0 -34
- package/src/host/runtime-integration.test.ts +0 -29
- package/src/host/source-path.test.ts +0 -14
- package/src/host/vocabulary-validation.test.ts +0 -60
- package/src/link/build.test.ts +0 -25
- package/src/link/commonjs.test.ts +0 -34
- package/src/link/overrides.test.ts +0 -103
- package/src/link/page-sources.test.ts +0 -52
- package/src/publication/publication.test.ts +0 -89
- package/src/storage/db.test.ts +0 -52
- package/src/sw/activity-router.test.ts +0 -53
- package/src/sw/candidates.test.ts +0 -9
- package/src/sw/compile.test.ts +0 -152
- package/src/sw/compiler.test.ts +0 -51
- package/src/sw/composition.test.ts +0 -51
- package/src/sw/converted-resolver.test.ts +0 -129
- package/src/sw/converted-router.test.ts +0 -91
- package/src/sw/converted.test.ts +0 -31
- package/src/sw/errors.test.ts +0 -8
- package/src/sw/link-activity.test.ts +0 -126
- package/src/sw/link-cache.test.ts +0 -15
- package/src/sw/link-markdown.test.ts +0 -52
- package/src/sw/link-route.test.ts +0 -150
- package/src/sw/link-source.test.ts +0 -31
- package/src/sw/markers.test.ts +0 -33
- package/src/sw/module-transform.test.ts +0 -131
- package/src/sw/package-generation.test.ts +0 -33
- package/src/sw/page-clients.test.ts +0 -37
- package/src/sw/profile.test.ts +0 -21
- package/src/sw/resolver.test.ts +0 -183
- package/src/sw/router-cache.test.ts +0 -78
- package/src/sw/runtime-module.test.ts +0 -61
- package/src/sw/source-hash.test.ts +0 -7
- package/src/sw/storage.test.ts +0 -108
- package/tsconfig.json +0 -10
- package/vitest.browser.config.ts +0 -4
- package/vitest.config.ts +0 -9
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/browser-client.ts +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-entry.headers +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-entry.mjs.txt +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-module.headers +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/copy-to-clipboard-module.mjs.txt +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-entry.headers +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-entry.mjs.txt +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-module.headers +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/react-copy-to-clipboard-module.mjs.txt +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-entry.headers +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-entry.mjs.txt +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-module.headers +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/fixtures/toggle-selection-module.mjs.txt +0 -0
- /package/{spikes/esm-sh → src/sw/esm-sh-fixtures}/redact.ts +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { execFile, execFileSync } from "node:child_process";
|
|
2
|
-
import { mkdir } from "node:fs/promises";
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { promisify } from "node:util";
|
|
6
|
-
import { setTimeout as delay } from "node:timers/promises";
|
|
7
|
-
import { buildLibrarySet, packageVersion } from "../lib/library-set.ts";
|
|
8
|
-
import { writeSpikeOutput } from "../lib/report.ts";
|
|
9
|
-
import { RuntimeServer } from "../lib/runtime-server.ts";
|
|
10
|
-
import { loadFacetStyles } from "../tailwind-parity/facet-styles.ts";
|
|
11
|
-
import { changedElements, summarize, type Measurement } from "./analysis.ts";
|
|
12
|
-
import type { BrowserResult, Mode } from "./browser.ts";
|
|
13
|
-
import { readme } from "./readme.ts";
|
|
14
|
-
import { documents, MODES, PAGES } from "./server.ts";
|
|
15
|
-
|
|
16
|
-
export type Run = { page: string; file: string; mode: Mode; viewport: string; result: BrowserResult | null; failure: string | null; measurement: Measurement };
|
|
17
|
-
const here = dirname(fileURLToPath(import.meta.url));
|
|
18
|
-
const repo = join(here, "../../../..");
|
|
19
|
-
const scratch = join(repo, ".tmp/diagram-readiness");
|
|
20
|
-
const execute = promisify(execFile);
|
|
21
|
-
|
|
22
|
-
async function browser<T>(session: string, args: string[]): Promise<T> {
|
|
23
|
-
const { stdout } = await execute("agent-browser", ["--engine", "chrome", "--session", session, "--json", ...args], { maxBuffer: 32 * 1024 * 1024, timeout: 90_000 });
|
|
24
|
-
const response = JSON.parse(stdout) as { success: boolean; data: T; error: unknown };
|
|
25
|
-
if (!response.success) throw new Error(`agent-browser ${args[0]}: ${JSON.stringify(response.error)}`);
|
|
26
|
-
return response.data;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async function measure({ session, url, page, mode, viewport }: { session: string; url: string; page: typeof PAGES[number]; mode: Mode; viewport: string }): Promise<Run> {
|
|
30
|
-
await browser(session, ["open", `${url}/host/${mode}/${page.id}`]);
|
|
31
|
-
const deadline = Date.now() + 65_000;
|
|
32
|
-
let result: BrowserResult | null = null;
|
|
33
|
-
let failure: string | null = null;
|
|
34
|
-
while (Date.now() < deadline) {
|
|
35
|
-
const state = await browser<{ result: { result: BrowserResult | null; failure: string | null } }>(session, ["eval", "({result: document.querySelector('#frame').contentWindow.__DIAGRAM_RESULT__ ?? null, failure: document.querySelector('#frame').contentWindow.__DIAGRAM_FAILURE__ ?? null})"]);
|
|
36
|
-
({ result, failure } = state.result);
|
|
37
|
-
if (result || failure) break;
|
|
38
|
-
await delay(250);
|
|
39
|
-
}
|
|
40
|
-
if (!result && !failure) failure = "frame did not return a result within 65 seconds";
|
|
41
|
-
const measurement: Measurement = result ?? { ready: false, errors: [failure!], atReady: null, afterWindow: { at: 0, layout: [] }, changes: [], activity: [] };
|
|
42
|
-
await browser(session, ["screenshot", join(scratch, `${viewport}-${mode}-${page.id}.png`)]);
|
|
43
|
-
return { page: page.id, file: page.file, mode, viewport, result, failure, measurement };
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export async function run(args: string[]): Promise<void> {
|
|
47
|
-
if (args.length > 0) throw new Error(`diagram-readiness takes no arguments: ${args.join(" ")}`);
|
|
48
|
-
await mkdir(scratch, { recursive: true });
|
|
49
|
-
const set = await buildLibrarySet({ outDir: join(scratch, "library"), pages: PAGES, log: (message) => console.log(`diagram-readiness: ${message}`) });
|
|
50
|
-
if (set.failures.length > 0) throw new Error(`library-set failures: ${JSON.stringify(set.failures)}`);
|
|
51
|
-
const styles = await loadFacetStyles(join(repo, "../facet"));
|
|
52
|
-
const server = new RuntimeServer({ ...set, flavor: "production", documents: await documents({ here, set, styles }) });
|
|
53
|
-
const session = `diagram-readiness-${process.pid}`;
|
|
54
|
-
const runs: Run[] = [];
|
|
55
|
-
let browserStarted = false;
|
|
56
|
-
await server.start();
|
|
57
|
-
try {
|
|
58
|
-
await browser(session, ["open", "about:blank"]);
|
|
59
|
-
browserStarted = true;
|
|
60
|
-
for (const [width, height] of [[1920, 1080], [2560, 1440]]) {
|
|
61
|
-
await browser(session, ["set", "viewport", String(width), String(height)]);
|
|
62
|
-
for (const page of PAGES) for (const mode of MODES) {
|
|
63
|
-
const run = await measure({ session, url: server.url, page, mode, viewport: `${width}x${height}` });
|
|
64
|
-
runs.push(run);
|
|
65
|
-
const metrics = summarize([run.measurement]);
|
|
66
|
-
console.log(`diagram-readiness: ${run.viewport} ${mode} ${page.id}: ${JSON.stringify(metrics)} ${run.failure ?? run.measurement.errors.join(" / ")}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
} finally {
|
|
70
|
-
try { if (browserStarted) await browser(session, ["close"]); }
|
|
71
|
-
finally { await server.close(); }
|
|
72
|
-
}
|
|
73
|
-
const primary = runs.filter((run) => run.mode === "before-render");
|
|
74
|
-
const summarized = summarize(primary.map((run) => run.measurement));
|
|
75
|
-
const unique = (pick: (run: Run) => boolean) => new Set(primary.filter(pick).map((run) => run.page)).size;
|
|
76
|
-
const metrics = {
|
|
77
|
-
pages: unique((run) => run.measurement.ready && run.measurement.errors.length === 0),
|
|
78
|
-
unstableLayouts: unique((run) => summarize([run.measurement]).unstableLayouts > 0),
|
|
79
|
-
remeasureLoops: unique((run) => summarize([run.measurement]).remeasureLoops > 0),
|
|
80
|
-
failedReadiness: unique((run) => !run.measurement.ready || run.measurement.errors.length > 0),
|
|
81
|
-
attemptedPages: PAGES.length,
|
|
82
|
-
primaryRuns: primary.length,
|
|
83
|
-
control: summarize(runs.filter((run) => run.mode === "after-mount").map((run) => run.measurement)),
|
|
84
|
-
geometryDiffersFromControl: primary.flatMap((run) => {
|
|
85
|
-
const control = runs.find((item) => item.page === run.page && item.viewport === run.viewport && item.mode === "after-mount");
|
|
86
|
-
if (!run.result?.atReady || !control?.result?.atReady) return [];
|
|
87
|
-
return [{ page: run.page, viewport: run.viewport, changedElements: changedElements(run.result.atReady.layout, control.result.atReady.layout).length }];
|
|
88
|
-
}),
|
|
89
|
-
};
|
|
90
|
-
const results = {
|
|
91
|
-
spike: "diagram-readiness", verdict: summarized.verdict, metrics,
|
|
92
|
-
environment: {
|
|
93
|
-
node: process.version, chrome: runs.find((run) => run.result)?.result?.userAgent ?? "no page completed",
|
|
94
|
-
"agent-browser": execFileSync("agent-browser", ["--version"], { encoding: "utf8" }).trim(),
|
|
95
|
-
facet: set.facet.version, "facet checkout": execFileSync("git", ["-C", join(repo, "../facet"), "rev-parse", "--short", "HEAD"], { encoding: "utf8" }).trim(),
|
|
96
|
-
"clicky-ui": set.clicky.version, react: packageVersion("react"), tailwindcss: packageVersion("tailwindcss"),
|
|
97
|
-
viewport: "1920x1080 and 2560x1440, device scale factor 1", flavor: "production", observation: "2000 ms after readiness; 200 ms quiet before readiness",
|
|
98
|
-
timestamp: new Date().toISOString(),
|
|
99
|
-
}, runs,
|
|
100
|
-
};
|
|
101
|
-
await writeSpikeOutput(here, results, readme(results, runs));
|
|
102
|
-
console.log(`diagram-readiness: verdict ${results.verdict}: ${JSON.stringify(metrics)}`);
|
|
103
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { rolldown } from "rolldown";
|
|
4
|
-
import type { LibrarySet } from "../lib/library-set.ts";
|
|
5
|
-
import { entryModule, pageDocument, pageModules, type PageSpec } from "../lib/pages.ts";
|
|
6
|
-
import type { Served } from "../lib/static-server.ts";
|
|
7
|
-
import type { FacetStyles } from "../tailwind-parity/facet-styles.ts";
|
|
8
|
-
import type { Config, Mode } from "./browser.ts";
|
|
9
|
-
|
|
10
|
-
export const MODES: Mode[] = ["before-render", "after-mount"];
|
|
11
|
-
export const PAGES: PageSpec[] = [
|
|
12
|
-
{ id: "LiveDiagram", library: "facet", root: "facet-examples", file: "office/LiveDiagram.tsx", exportName: "default" },
|
|
13
|
-
{ id: "DataFlowDiagram", library: "facet", root: "facet-examples", file: "kitchen-sink/DataFlowDiagram.tsx", exportName: "default" },
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
/** Diagram examples left out, as in the other spikes: they need a facet version that is not published. */
|
|
17
|
-
export const EXCLUDED_PAGES = [
|
|
18
|
-
{ file: "brand-diagrams/SingleBrand.tsx", reason: "imports `BrandBox`, `BrandContainer` and `loadBrand`, which only facet's unreleased source exports; published facet 0.1.74 does not" },
|
|
19
|
-
{ file: "brand-diagrams/MixedBrands.tsx", reason: "same as SingleBrand" },
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
async function bundle(input: string, styles: FacetStyles): Promise<string> {
|
|
23
|
-
const build = await rolldown({
|
|
24
|
-
input, platform: "browser", resolve: { alias: { "facet-font-scale": styles.fontScalePath } },
|
|
25
|
-
transform: { define: { "process.env.NODE_ENV": JSON.stringify("production"), "process.env": "{}" } },
|
|
26
|
-
});
|
|
27
|
-
try {
|
|
28
|
-
const { output } = await build.generate({ format: "iife", minify: true });
|
|
29
|
-
if (output.length !== 1 || output[0]?.type !== "chunk") throw new Error(`expected one browser chunk for ${input}`);
|
|
30
|
-
return output[0].code;
|
|
31
|
-
} finally { await build.close(); }
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export async function documents({ here, set, styles }: { here: string; set: LibrarySet; styles: FacetStyles }): Promise<Map<string, Served>> {
|
|
35
|
-
const served = new Map<string, Served>();
|
|
36
|
-
const javascript = (path: string, body: string) => served.set(path, { type: "text/javascript; charset=utf-8", body });
|
|
37
|
-
javascript("/tailwind.js", await bundle(join(here, "../tailwind-parity/runtime-tailwind.ts"), styles));
|
|
38
|
-
javascript("/diagram-probe.js", await bundle(join(here, "browser.ts"), styles));
|
|
39
|
-
for (const page of PAGES) {
|
|
40
|
-
javascript(`/entry/${page.id}.js`, `${entryModule(page)}\nexport { pageModule };`);
|
|
41
|
-
const sources = pageModules(page, set.pageRoots).map(({ file }) => readFileSync(file, "utf8"));
|
|
42
|
-
for (const mode of MODES) {
|
|
43
|
-
const config: Config = { mode, entry: `/entry/${page.id}.js`, tailwind: { entry: styles.entry, stylesheets: styles.stylesheets, sources } };
|
|
44
|
-
const entry = `<script type="application/json" id="diagram-config">${JSON.stringify(config).replaceAll("<", "\\u003c")}</script><script src="/tailwind.js"></script><script src="/diagram-probe.js"></script>`;
|
|
45
|
-
served.set(`/frame/${mode}/${page.id}`, { type: "text/html; charset=utf-8", body: pageDocument({ title: `${mode}/${page.id}`, map: set.maps.production, entry }) });
|
|
46
|
-
served.set(`/host/${mode}/${page.id}`, {
|
|
47
|
-
type: "text/html; charset=utf-8",
|
|
48
|
-
body: `<!doctype html><html><head><meta charset="utf-8"><link rel="icon" href="data:,"><title>${mode}/${page.id}</title><style>html,body{margin:0;height:100%}iframe{display:block;border:0;width:100%;height:100%}</style></head><body><iframe id="frame" sandbox="allow-scripts allow-same-origin allow-modals" src="/frame/${mode}/${page.id}"></iframe></body></html>`,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return served;
|
|
53
|
-
}
|
package/spikes/esm-sh/README.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# esm.sh additional-package conversion spike
|
|
2
|
-
|
|
3
|
-
Captured from the real public esm.sh on 2026-11-07 using `Origin: https://tenant.pages.example.com`. This spike required only HTTP fetches and source/header inspection. No test, build, type check, lint, Gavel command, development server or browser was run.
|
|
4
|
-
|
|
5
|
-
Decision: proceed with Decision 10. The `*` prefix preserves bare dependency imports for the sampled CommonJS package and its CommonJS dependency chain.
|
|
6
|
-
|
|
7
|
-
| Package | Entry request | Internal module | Bare imports in converted module |
|
|
8
|
-
| --- | --- | --- | --- |
|
|
9
|
-
| `react-copy-to-clipboard@5.1.1` | `https://esm.sh/*react-copy-to-clipboard@5.1.1?dev&target=es2022` | `/*react-copy-to-clipboard@5.1.1/es2022/react-copy-to-clipboard.development.mjs` | `copy-to-clipboard`, `react` |
|
|
10
|
-
| `copy-to-clipboard@3.3.3` | `https://esm.sh/*copy-to-clipboard@3.3.3?dev&target=es2022` | `/*copy-to-clipboard@3.3.3/es2022/copy-to-clipboard.development.mjs` | `toggle-selection` |
|
|
11
|
-
| `toggle-selection@1.0.6` | `https://esm.sh/*toggle-selection@1.0.6?dev&target=es2022` | `/*toggle-selection@1.0.6/es2022/toggle-selection.development.mjs` | none |
|
|
12
|
-
|
|
13
|
-
Every entry re-exports its internal development module using an absolute path beginning `/*<name>@<version>/`. That leading `*` also appears on the internal module request. Every sampled entry and internal module returned HTTP 200 and `Access-Control-Allow-Origin: *`, allowing the credential-free tenant request. The entry's `X-ESM-Path` header also names its internal module. None of these modules imports `/node/` polyfills. Source-map comments refer to adjacent `.map` files; those are debugging resources rather than module imports and are not part of the module crawl.
|
|
14
|
-
|
|
15
|
-
The original bodies are saved unmodified as text fixtures under `fixtures/<package>-{entry,module}.mjs.txt`, alongside their `.headers` response headers. These files are captured converter input data; the fixture server supplies them as JavaScript responses. For each package, record the bodies with these two commands, substituting the exact name, version and path from the table:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
curl --fail --silent --show-error --location --header 'Origin: https://tenant.pages.example.com' --dump-header packages/page-runtime/spikes/esm-sh/fixtures/react-copy-to-clipboard-entry.headers --output packages/page-runtime/spikes/esm-sh/fixtures/react-copy-to-clipboard-entry.mjs.txt 'https://esm.sh/*react-copy-to-clipboard@5.1.1?dev&target=es2022'
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
curl --fail --silent --show-error --location --header 'Origin: https://tenant.pages.example.com' --dump-header packages/page-runtime/spikes/esm-sh/fixtures/react-copy-to-clipboard-module.headers --output packages/page-runtime/spikes/esm-sh/fixtures/react-copy-to-clipboard-module.mjs.txt 'https://esm.sh/*react-copy-to-clipboard@5.1.1/es2022/react-copy-to-clipboard.development.mjs'
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
`fixtures.ts` supplies reduced registry manifests and recorded converter responses to unit tests. The manifests are test inputs, not captured registry responses. `browser-server.ts` serves the same unchanged converter bodies over a local CORS origin, bundles the real service worker, and provides a local React runtime set. `browser-client.ts` asks the worker to resolve the page without a prebuilt lock and imports its page module. The page renders the recorded `CopyToClipboard` component, checking its `PureComponent` prototype against the same React used by the page and managed library. The Chromium test uses agent-browser because service-worker control and browser module instantiation require Chromium here.
|
|
26
|
-
|
|
27
|
-
These fixtures do not establish that all esm.sh packages are usable. Runtime resolution rejects Node polyfills, internal imports leaving the converted package's own prefix, nonliteral dynamic imports, converter HTTP errors and later byte changes. Bare dependencies continue through registry resolution, peer checks and the page's import map.
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
# Spike: commenting in a frame
|
|
2
|
-
|
|
3
|
-
Verdict: no-go
|
|
4
|
-
|
|
5
|
-
## Method
|
|
6
|
-
|
|
7
|
-
Run `pnpm --filter @flanksource/page-runtime spike frame-commenting`. `--serve` leaves the same local harness running for agent-browser inspection (URL in `.tmp/frame-commenting/live-url.txt`).
|
|
8
|
-
|
|
9
|
-
Two source pages from the compiler/runtime-set corpus: kitchen-sink PropertiesDemo and facet StatCardExamples. The harness copies their relative source closures into `.tmp/frame-commenting/`, serves those copies as their own roots through RuntimeServer, and uses the compiler spike's actual service-worker compiler and development data-source markers. The runtime set supplies React and the published library modules; the frame runs the Tailwind spike's runtime compiler and facet recipe plus clicky-ui's stylesheet.
|
|
10
|
-
|
|
11
|
-
The tenant is a different loopback origin (port) from the host. The iframe uses `allow-scripts allow-same-origin allow-modals`. Its first classic script bundles `bippy/install-hook-only`, before the import map, embedded react-grab/core and React. Picks use React Grab's actual activated picker, physical mouse clicks and onElementSelect hook, then its getSource and getDisplayName APIs. The report records both compiler markers and React Grab's source independently. Missing author source from both paths, or missing component, counts as unresolved. A generated /entry/ wrapper is not an author source. The published facet build's component names can be minified; the table records the actual API name without inventing one.
|
|
12
|
-
|
|
13
|
-
The page agent bundles the playground's existing dom-anchor.ts unchanged, including its finder, role/text/heading/landmark and markdown locators. It uses commentAnchor, captureLocators and resolveComment directly. The bridge uses `{bridge: "page-runtime-v1", session, id?, re?, message}` and validates origin, source window and session on both ends. The frame draws fixed pins in a shadow root outside the observed page root, re-resolving on mutations, scroll and resize. The host stores selections and requests pins; it owns capture and cropping.
|
|
14
|
-
|
|
15
|
-
Each page gets three tracked existing h3 headings (one opts into data-comment-anchor) and an existing h2, all retained through edits. The nonempty data-spike-key attribute is an independent measurement identity: the existing locator builder does not use it. Chromium applies all 20 real saved source revisions per page; Firefox and WebKit apply revisions 1, 10 and 20 (the first insert, the first deletion and the final state), which keeps the harness inside gavel's 5-minute fixture limit. Each revision is saved, explicitly reloading the frame each time and asserting the new revision's inserted text and deletion appear in the DOM: wrap/reposition a heading, add a same-tag preceding sibling, change padding and width, and from revision 10 remove another heading. The original anchors/locators are never recaptured. Every saved anchor is checked against that identity and its original text; a missing report, false orphan or attachment to the wrong element counts as lost, even if the resolver labels it found. Orphans are successful retention outcomes only when the target was actually removed.
|
|
16
|
-
|
|
17
|
-
Pins are checked before scroll, after scrolling the frame by 160px, and after resizing it from 1000×650 to 720×480. Reported pin geometry is compared with element geometry and the stable pin is also measured independently from the shadow DOM. Source edits and anchor outcomes below include all measured browsers; timing targets are not part of this spike.
|
|
18
|
-
|
|
19
|
-
Capture: in a dedicated final capture phase (`capture=1`), the host calls getDisplayMedia immediately on the first selection message and records transient activation and the actual outcome. Ordinary source/anchor picks do not request a screenshot. No chooser is auto-accepted or capture permission pregranted. Chromium additionally uses the explicitly permitted automation stand-in, CDP Page.captureScreenshot on the host tab, because unattended capture cannot approve the browser/OS share chooser. The host canvas crops at iframe offset + frame-reported element rectangle. The crop is pixel-compared against an independent element-locator screenshot, including fractional-edge rounding. Firefox uses Mozilla's stock build already downloaded by sw-tenant-frame (moz-firefox/BiDi), rather than Playwright's patched Firefox with altered frame storage behavior. That existing macOS browser binary must be present at sw-tenant-frame/out/firefox/Firefox.app. WebKit is Playwright WebKit, not Safari. A capture API or pending chooser alone never counts as a working crop; screenshotBrowsers includes only verified matching crops. pickedElements includes the three additional capture selections; the page table below counts the source/anchor selections.
|
|
20
|
-
|
|
21
|
-
## Source resolution
|
|
22
|
-
|
|
23
|
-
| Browser | Page | Picked | Unresolved | Hook first | Renderers |
|
|
24
|
-
| --- | --- | --- | --- | --- | --- |
|
|
25
|
-
| chromium | clicky-ui/PropertiesDemo | 4 | 0 | true | 1 |
|
|
26
|
-
| chromium | facet/StatCardExamples | 4 | 1 | true | 1 |
|
|
27
|
-
| firefox | clicky-ui/PropertiesDemo | 4 | 0 | true | 1 |
|
|
28
|
-
| firefox | facet/StatCardExamples | 4 | 1 | true | 1 |
|
|
29
|
-
| webkit | clicky-ui/PropertiesDemo | 4 | 0 | true | 1 |
|
|
30
|
-
| webkit | facet/StatCardExamples | 4 | 1 | true | 1 |
|
|
31
|
-
|
|
32
|
-
| Browser | Page | Element | Compiler source | React Grab source | Component |
|
|
33
|
-
| --- | --- | --- | --- | --- | --- |
|
|
34
|
-
| chromium | clicky-ui/PropertiesDemo | Click-to-edit form | kitchen-sink/demos/PropertiesDemo.tsx:123:11 | kitchen-sink/demos/PropertiesDemo.tsx:123:null | DemoSection |
|
|
35
|
-
| chromium | clicky-ui/PropertiesDemo | Default | kitchen-sink/demos/PropertiesDemo.tsx:151:11 | kitchen-sink/demos/PropertiesDemo.tsx:151:null | DemoSection |
|
|
36
|
-
| chromium | clicky-ui/PropertiesDemo | Label icons + subtitles | kitchen-sink/demos/PropertiesDemo.tsx:158:11 | kitchen-sink/demos/PropertiesDemo.tsx:158:null | DemoSection |
|
|
37
|
-
| chromium | clicky-ui/PropertiesDemo | Properties | kitchen-sink/demos/Section.tsx:14:9 | kitchen-sink/demos/Section.tsx:14:null | DemoSection |
|
|
38
|
-
| chromium | facet/StatCardExamples | card (sm / md / lg) | facet-examples/kitchen-sink/StatCardExamples.tsx:27:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:27:null | j |
|
|
39
|
-
| chromium | facet/StatCardExamples | badge | facet-examples/kitchen-sink/StatCardExamples.tsx:35:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:35:null | j |
|
|
40
|
-
| chromium | facet/StatCardExamples | hero | facet-examples/kitchen-sink/StatCardExamples.tsx:44:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:44:null | j |
|
|
41
|
-
| chromium | facet/StatCardExamples | StatCard Variants | unresolved | /entry/facet/StatCardExamples.js:7:24 | j |
|
|
42
|
-
| firefox | clicky-ui/PropertiesDemo | Click-to-edit form | kitchen-sink/demos/PropertiesDemo.tsx:123:11 | kitchen-sink/demos/PropertiesDemo.tsx:123:null | DemoSection |
|
|
43
|
-
| firefox | clicky-ui/PropertiesDemo | Default | kitchen-sink/demos/PropertiesDemo.tsx:151:11 | kitchen-sink/demos/PropertiesDemo.tsx:151:null | DemoSection |
|
|
44
|
-
| firefox | clicky-ui/PropertiesDemo | Label icons + subtitles | kitchen-sink/demos/PropertiesDemo.tsx:158:11 | kitchen-sink/demos/PropertiesDemo.tsx:158:null | DemoSection |
|
|
45
|
-
| firefox | clicky-ui/PropertiesDemo | Properties | kitchen-sink/demos/Section.tsx:14:9 | kitchen-sink/demos/Section.tsx:14:null | DemoSection |
|
|
46
|
-
| firefox | facet/StatCardExamples | card (sm / md / lg) | facet-examples/kitchen-sink/StatCardExamples.tsx:27:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:27:null | j |
|
|
47
|
-
| firefox | facet/StatCardExamples | badge | facet-examples/kitchen-sink/StatCardExamples.tsx:35:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:35:null | j |
|
|
48
|
-
| firefox | facet/StatCardExamples | hero | facet-examples/kitchen-sink/StatCardExamples.tsx:44:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:44:null | j |
|
|
49
|
-
| firefox | facet/StatCardExamples | StatCard Variants | unresolved | /entry/facet/StatCardExamples.js:7:24 | j |
|
|
50
|
-
| webkit | clicky-ui/PropertiesDemo | Click-to-edit form | kitchen-sink/demos/PropertiesDemo.tsx:123:11 | kitchen-sink/demos/PropertiesDemo.tsx:123:null | DemoSection |
|
|
51
|
-
| webkit | clicky-ui/PropertiesDemo | Default | kitchen-sink/demos/PropertiesDemo.tsx:151:11 | kitchen-sink/demos/PropertiesDemo.tsx:151:null | DemoSection |
|
|
52
|
-
| webkit | clicky-ui/PropertiesDemo | Label icons + subtitles | kitchen-sink/demos/PropertiesDemo.tsx:158:11 | kitchen-sink/demos/PropertiesDemo.tsx:158:null | DemoSection |
|
|
53
|
-
| webkit | clicky-ui/PropertiesDemo | Properties | kitchen-sink/demos/Section.tsx:14:9 | kitchen-sink/demos/Section.tsx:14:null | DemoSection |
|
|
54
|
-
| webkit | facet/StatCardExamples | card (sm / md / lg) | facet-examples/kitchen-sink/StatCardExamples.tsx:27:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:27:null | j |
|
|
55
|
-
| webkit | facet/StatCardExamples | badge | facet-examples/kitchen-sink/StatCardExamples.tsx:35:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:35:null | j |
|
|
56
|
-
| webkit | facet/StatCardExamples | hero | facet-examples/kitchen-sink/StatCardExamples.tsx:44:13 | facet-examples/kitchen-sink/StatCardExamples.tsx:44:null | j |
|
|
57
|
-
| webkit | facet/StatCardExamples | StatCard Variants | unresolved | /entry/facet/StatCardExamples.js:7:29 | j |
|
|
58
|
-
|
|
59
|
-
## Pin tracking
|
|
60
|
-
|
|
61
|
-
| Browser | Page | Phase | Scroll Y | Frame width | Max error px |
|
|
62
|
-
| --- | --- | --- | --- | --- | --- |
|
|
63
|
-
| chromium | clicky-ui/PropertiesDemo | initial | 0 | 1000 | 0 |
|
|
64
|
-
| chromium | clicky-ui/PropertiesDemo | frame scroll | 160 | 1000 | 0 |
|
|
65
|
-
| chromium | clicky-ui/PropertiesDemo | frame resize | 160 | 720 | 0 |
|
|
66
|
-
| chromium | facet/StatCardExamples | initial | 0 | 1000 | 0 |
|
|
67
|
-
| chromium | facet/StatCardExamples | frame scroll | 160 | 1000 | 0 |
|
|
68
|
-
| chromium | facet/StatCardExamples | frame resize | 160 | 720 | 0 |
|
|
69
|
-
| firefox | clicky-ui/PropertiesDemo | initial | 0 | 1000 | 0 |
|
|
70
|
-
| firefox | clicky-ui/PropertiesDemo | frame scroll | 160 | 1000 | 0 |
|
|
71
|
-
| firefox | clicky-ui/PropertiesDemo | frame resize | 160 | 720 | 0 |
|
|
72
|
-
| firefox | facet/StatCardExamples | initial | 0 | 1000 | 0 |
|
|
73
|
-
| firefox | facet/StatCardExamples | frame scroll | 160 | 1000 | 0 |
|
|
74
|
-
| firefox | facet/StatCardExamples | frame resize | 160 | 720 | 0 |
|
|
75
|
-
| webkit | clicky-ui/PropertiesDemo | initial | 0 | 1000 | 0 |
|
|
76
|
-
| webkit | clicky-ui/PropertiesDemo | frame scroll | 160 | 1000 | 0 |
|
|
77
|
-
| webkit | clicky-ui/PropertiesDemo | frame resize | 160 | 720 | 0 |
|
|
78
|
-
| webkit | facet/StatCardExamples | initial | 0 | 1000 | 0 |
|
|
79
|
-
| webkit | facet/StatCardExamples | frame scroll | 160 | 1000 | 0 |
|
|
80
|
-
| webkit | facet/StatCardExamples | frame resize | 160 | 720 | 0 |
|
|
81
|
-
|
|
82
|
-
## Anchor outcomes per edit
|
|
83
|
-
|
|
84
|
-
| Browser | Page | Edit | Re-found | Moved | Orphaned | Lost |
|
|
85
|
-
| --- | --- | --- | --- | --- | --- | --- |
|
|
86
|
-
| chromium | clicky-ui/PropertiesDemo | 1 | 2 | 2 | 0 | 0 |
|
|
87
|
-
| chromium | clicky-ui/PropertiesDemo | 2 | 2 | 2 | 0 | 0 |
|
|
88
|
-
| chromium | clicky-ui/PropertiesDemo | 3 | 2 | 2 | 0 | 0 |
|
|
89
|
-
| chromium | clicky-ui/PropertiesDemo | 4 | 2 | 2 | 0 | 0 |
|
|
90
|
-
| chromium | clicky-ui/PropertiesDemo | 5 | 2 | 2 | 0 | 0 |
|
|
91
|
-
| chromium | clicky-ui/PropertiesDemo | 6 | 2 | 2 | 0 | 0 |
|
|
92
|
-
| chromium | clicky-ui/PropertiesDemo | 7 | 2 | 2 | 0 | 0 |
|
|
93
|
-
| chromium | clicky-ui/PropertiesDemo | 8 | 2 | 2 | 0 | 0 |
|
|
94
|
-
| chromium | clicky-ui/PropertiesDemo | 9 | 2 | 2 | 0 | 0 |
|
|
95
|
-
| chromium | clicky-ui/PropertiesDemo | 10 | 2 | 1 | 1 | 0 |
|
|
96
|
-
| chromium | clicky-ui/PropertiesDemo | 11 | 2 | 1 | 1 | 0 |
|
|
97
|
-
| chromium | clicky-ui/PropertiesDemo | 12 | 2 | 1 | 1 | 0 |
|
|
98
|
-
| chromium | clicky-ui/PropertiesDemo | 13 | 2 | 1 | 1 | 0 |
|
|
99
|
-
| chromium | clicky-ui/PropertiesDemo | 14 | 2 | 1 | 1 | 0 |
|
|
100
|
-
| chromium | clicky-ui/PropertiesDemo | 15 | 2 | 1 | 1 | 0 |
|
|
101
|
-
| chromium | clicky-ui/PropertiesDemo | 16 | 2 | 1 | 1 | 0 |
|
|
102
|
-
| chromium | clicky-ui/PropertiesDemo | 17 | 2 | 1 | 1 | 0 |
|
|
103
|
-
| chromium | clicky-ui/PropertiesDemo | 18 | 2 | 1 | 1 | 0 |
|
|
104
|
-
| chromium | clicky-ui/PropertiesDemo | 19 | 2 | 1 | 1 | 0 |
|
|
105
|
-
| chromium | clicky-ui/PropertiesDemo | 20 | 2 | 1 | 1 | 0 |
|
|
106
|
-
| chromium | facet/StatCardExamples | 1 | 2 | 2 | 0 | 0 |
|
|
107
|
-
| chromium | facet/StatCardExamples | 2 | 2 | 2 | 0 | 0 |
|
|
108
|
-
| chromium | facet/StatCardExamples | 3 | 2 | 2 | 0 | 0 |
|
|
109
|
-
| chromium | facet/StatCardExamples | 4 | 2 | 2 | 0 | 0 |
|
|
110
|
-
| chromium | facet/StatCardExamples | 5 | 2 | 2 | 0 | 0 |
|
|
111
|
-
| chromium | facet/StatCardExamples | 6 | 2 | 2 | 0 | 0 |
|
|
112
|
-
| chromium | facet/StatCardExamples | 7 | 2 | 2 | 0 | 0 |
|
|
113
|
-
| chromium | facet/StatCardExamples | 8 | 2 | 2 | 0 | 0 |
|
|
114
|
-
| chromium | facet/StatCardExamples | 9 | 2 | 2 | 0 | 0 |
|
|
115
|
-
| chromium | facet/StatCardExamples | 10 | 2 | 1 | 1 | 0 |
|
|
116
|
-
| chromium | facet/StatCardExamples | 11 | 2 | 1 | 1 | 0 |
|
|
117
|
-
| chromium | facet/StatCardExamples | 12 | 2 | 1 | 1 | 0 |
|
|
118
|
-
| chromium | facet/StatCardExamples | 13 | 2 | 1 | 1 | 0 |
|
|
119
|
-
| chromium | facet/StatCardExamples | 14 | 2 | 1 | 1 | 0 |
|
|
120
|
-
| chromium | facet/StatCardExamples | 15 | 2 | 1 | 1 | 0 |
|
|
121
|
-
| chromium | facet/StatCardExamples | 16 | 2 | 1 | 1 | 0 |
|
|
122
|
-
| chromium | facet/StatCardExamples | 17 | 2 | 1 | 1 | 0 |
|
|
123
|
-
| chromium | facet/StatCardExamples | 18 | 2 | 1 | 1 | 0 |
|
|
124
|
-
| chromium | facet/StatCardExamples | 19 | 2 | 1 | 1 | 0 |
|
|
125
|
-
| chromium | facet/StatCardExamples | 20 | 2 | 1 | 1 | 0 |
|
|
126
|
-
| firefox | clicky-ui/PropertiesDemo | 1 | 2 | 2 | 0 | 0 |
|
|
127
|
-
| firefox | clicky-ui/PropertiesDemo | 10 | 2 | 1 | 1 | 0 |
|
|
128
|
-
| firefox | clicky-ui/PropertiesDemo | 20 | 2 | 1 | 1 | 0 |
|
|
129
|
-
| firefox | facet/StatCardExamples | 1 | 2 | 2 | 0 | 0 |
|
|
130
|
-
| firefox | facet/StatCardExamples | 10 | 2 | 1 | 1 | 0 |
|
|
131
|
-
| firefox | facet/StatCardExamples | 20 | 2 | 1 | 1 | 0 |
|
|
132
|
-
| webkit | clicky-ui/PropertiesDemo | 1 | 2 | 2 | 0 | 0 |
|
|
133
|
-
| webkit | clicky-ui/PropertiesDemo | 10 | 2 | 1 | 1 | 0 |
|
|
134
|
-
| webkit | clicky-ui/PropertiesDemo | 20 | 2 | 1 | 1 | 0 |
|
|
135
|
-
| webkit | facet/StatCardExamples | 1 | 2 | 2 | 0 | 0 |
|
|
136
|
-
| webkit | facet/StatCardExamples | 10 | 2 | 1 | 1 | 0 |
|
|
137
|
-
| webkit | facet/StatCardExamples | 20 | 2 | 1 | 1 | 0 |
|
|
138
|
-
|
|
139
|
-
## Screenshot support
|
|
140
|
-
|
|
141
|
-
| Browser | Method | Host activation | Native result | Matching crop | Pixel differences |
|
|
142
|
-
| --- | --- | --- | --- | --- | --- |
|
|
143
|
-
| chromium | Chromium CDP Page.captureScreenshot, host canvas crop | true | capture chooser pending (no automatic permission) | true | 0 |
|
|
144
|
-
| firefox | host getDisplayMedia | true | capture chooser pending (no automatic permission) | false | unverified |
|
|
145
|
-
| webkit | host getDisplayMedia | true | capture chooser pending (no automatic permission) | false | unverified |
|
|
146
|
-
|
|
147
|
-
Chromium crop and full-tab PNGs are in `.tmp/frame-commenting/`. Native Firefox/WebKit capture without an acquired stream and matching crop remains unverified; an automation screenshot would not prove the host can capture in those browsers.
|
|
148
|
-
|
|
149
|
-
## Go criteria
|
|
150
|
-
|
|
151
|
-
| Criterion | Measured | Met |
|
|
152
|
-
| --- | --- | --- |
|
|
153
|
-
| unresolvedSources == 0 | 3 | false |
|
|
154
|
-
| lostAnchors == 0 | 0 | true |
|
|
155
|
-
| edits >= 20 | 52 | true |
|
|
156
|
-
| Chromium in screenshotBrowsers | chromium | true |
|
|
157
|
-
| pins track scroll and resize (<= 1px) | 0 | true |
|
|
158
|
-
| both libraries measured in all three browsers | complete | true |
|
|
159
|
-
| real picker and early hook | 27 | true |
|
|
160
|
-
|
|
161
|
-
## Plan impact
|
|
162
|
-
|
|
163
|
-
P5 must address each failing criterion below before shipping frame comments. Source resolution must distinguish author source from a generated entry wrapper; library-rendered elements need useful owner/source metadata rather than accepting /entry/... as a successful source lookup. Any lost anchors require preserving the stored comment as an explicit orphan when target identity cannot be established, and exposing conflicting matches as moved/review-needed rather than silently attaching to unrelated content. This spike leaves shared implementations unchanged. P5 must also keep capture support explicit per browser; Chromium CDP is an automation stand-in and does not prove a host-only getDisplayMedia gesture/permission flow. A user-facing host capture gesture and browser/OS chooser test are still needed for native capture.
|
|
164
|
-
|
|
165
|
-
- Failing: unresolvedSources == 0: 3.
|
|
166
|
-
|
|
167
|
-
Measurement corrections: navigating to the exact same frame URL with its bridge fragment can be a same-document navigation. An earlier diagnostic therefore kept the old DOM despite changed files. This harness uses location.reload(), waits for navigation and mount, and checks each rendered revision. React Grab's toolbar enabled flag controls the picker itself; the harness sets only defaultAction instead of disabling that flag. Physical clicks explicitly convert a hittable frame-local point to host coordinates before picker activation. A pending native capture chooser prevented later Chromium pointer events during early diagnostics, so native capture now runs last and is requested only for the capture phase. Browser canvas comparison lives in the bundled host, avoiding tsx/esbuild helper references in serialized page.evaluate functions.
|
|
168
|
-
|
|
169
|
-
No shared file, sibling checkout or dependency was changed. This is a development-flavor commenting corpus, not a production-flavor, isolation, markdown-edit or complete P5 implementation. The resolver's existing markdown support is reused but markdown edit survival is not independently measured here.
|
|
170
|
-
|
|
171
|
-
## Environment
|
|
172
|
-
|
|
173
|
-
| Component | Version |
|
|
174
|
-
| --- | --- |
|
|
175
|
-
| node | v24.15.0 |
|
|
176
|
-
| react-grab | 0.1.50 |
|
|
177
|
-
| bippy | 0.6.1 |
|
|
178
|
-
| clicky-ui | 0.3.57 |
|
|
179
|
-
| react | 18.3.1 |
|
|
180
|
-
| facet | 0.1.74 |
|
|
181
|
-
| chromium | 156.0.8078.80 |
|
|
182
|
-
| firefox | 159.0.1 |
|
|
183
|
-
| webkit | 26.4 |
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { init } from "react-grab/core";
|
|
2
|
-
import type { ReactGrabAPI } from "react-grab";
|
|
3
|
-
import { accepts, type AnchorState, type Envelope, type Message, type Rect, type SavedAnchor, type Selection } from "./model.ts";
|
|
4
|
-
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
__REACT_GRAB__?: ReactGrabAPI;
|
|
8
|
-
FrameLocators: {
|
|
9
|
-
commentAnchor(element: Element, root: Element): string | null;
|
|
10
|
-
captureLocators(element: Element, root: Element): unknown[];
|
|
11
|
-
resolveComment(root: Element, anchor: string, locators: unknown[]): { element: Element; matchedBy: unknown } | null;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const params = new URLSearchParams(location.hash.slice(1));
|
|
17
|
-
const host = params.get("host");
|
|
18
|
-
const session = params.get("session");
|
|
19
|
-
if (!host || !session) throw new Error("frame bridge requires host origin and session");
|
|
20
|
-
const root = document.getElementById("root");
|
|
21
|
-
if (!root) throw new Error("frame has no page root");
|
|
22
|
-
const api = init({ enabled: true, telemetry: false, freezeReactUpdates: false });
|
|
23
|
-
window.__REACT_GRAB__ = api;
|
|
24
|
-
const overlay = document.createElement("div");
|
|
25
|
-
overlay.dataset["reactGrabIgnore"] = "";
|
|
26
|
-
overlay.id = "frame-pins";
|
|
27
|
-
document.body.append(overlay);
|
|
28
|
-
const shadow = overlay.attachShadow({ mode: "open" });
|
|
29
|
-
let anchors: SavedAnchor[] = [];
|
|
30
|
-
let picking = false;
|
|
31
|
-
let sequence = 0;
|
|
32
|
-
|
|
33
|
-
function send(message: Message, re?: string): void {
|
|
34
|
-
parent.postMessage({ bridge: "page-runtime-v1", session, ...(re ? { re } : {}), message }, host!);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function rect(element: Element): Rect {
|
|
38
|
-
const { left, top, width, height } = element.getBoundingClientRect();
|
|
39
|
-
return { left, top, width, height };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async function select(element: Element): Promise<void> {
|
|
43
|
-
if (!root!.contains(element)) throw new Error("picker selected outside the page root");
|
|
44
|
-
const anchor = window.FrameLocators.commentAnchor(element, root!);
|
|
45
|
-
if (!anchor) throw new Error("picker returned an unanchorable element");
|
|
46
|
-
const marker = element.closest("[data-source]")?.getAttribute("data-source") ?? null;
|
|
47
|
-
const locators = window.FrameLocators.captureLocators(element, root!);
|
|
48
|
-
const box = rect(element);
|
|
49
|
-
const source = await api.getSource(element);
|
|
50
|
-
api.reset();
|
|
51
|
-
await new Promise<void>((resolve) => requestAnimationFrame(() => requestAnimationFrame(() => resolve())));
|
|
52
|
-
const grabSource = source ? `${source.filePath}:${source.lineNumber}:${source.columnNumber}` : null;
|
|
53
|
-
const selection: Selection = {
|
|
54
|
-
id: String(++sequence), anchor, locators, text: element.textContent?.trim() ?? "",
|
|
55
|
-
source: marker, grabSource, component: api.getDisplayName(element), rect: box, html: element.outerHTML,
|
|
56
|
-
};
|
|
57
|
-
send({ type: "selection", selection });
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
api.registerPlugin({
|
|
61
|
-
name: "frame-commenting",
|
|
62
|
-
hooks: {
|
|
63
|
-
onElementSelect(element) {
|
|
64
|
-
if (!picking) return;
|
|
65
|
-
picking = false;
|
|
66
|
-
void select(element).catch((error: unknown) => send({ type: "error", error: String(error) }));
|
|
67
|
-
return true;
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
api.setToolbarState({ defaultAction: "comment" });
|
|
72
|
-
|
|
73
|
-
function update(re?: string): void {
|
|
74
|
-
shadow.replaceChildren();
|
|
75
|
-
const states: AnchorState[] = anchors.map((saved, index) => {
|
|
76
|
-
const match = window.FrameLocators.resolveComment(root!, saved.anchor, saved.locators);
|
|
77
|
-
if (!match) return { id: saved.id, identity: null, state: "orphaned", text: null, rect: null, pin: null };
|
|
78
|
-
const box = rect(match.element);
|
|
79
|
-
const pin = document.createElement("button");
|
|
80
|
-
pin.textContent = String(index + 1);
|
|
81
|
-
pin.style.cssText = `position:fixed;left:${box.left}px;top:${box.top}px;width:18px;height:18px;padding:0;border:0;background:#b91c1c;color:white;pointer-events:auto;z-index:2147483647`;
|
|
82
|
-
shadow.append(pin);
|
|
83
|
-
return { id: saved.id, identity: match.element.getAttribute("data-spike-key"), state: match.matchedBy === "anchor" ? "found" : "moved", text: match.element.textContent?.trim() ?? "", rect: box, pin: rect(pin) };
|
|
84
|
-
});
|
|
85
|
-
send({ type: "anchors", anchors: states }, re);
|
|
86
|
-
send({ type: "geometry", scroll: scrollY, width: innerWidth, height: innerHeight });
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
window.addEventListener("message", (event: MessageEvent<Envelope>) => {
|
|
90
|
-
if (!accepts(event, { origin: host!, source: parent, session: session! })) return;
|
|
91
|
-
if (event.data.message.type === "pick") {
|
|
92
|
-
picking = true;
|
|
93
|
-
window.focus();
|
|
94
|
-
api.activate();
|
|
95
|
-
} else if (event.data.message.type === "pins") {
|
|
96
|
-
anchors = event.data.message.anchors;
|
|
97
|
-
update(event.data.id);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
let scheduled = false;
|
|
101
|
-
function schedule(): void {
|
|
102
|
-
if (scheduled) return;
|
|
103
|
-
scheduled = true;
|
|
104
|
-
requestAnimationFrame(() => { scheduled = false; update(); });
|
|
105
|
-
}
|
|
106
|
-
addEventListener("scroll", schedule, true);
|
|
107
|
-
addEventListener("resize", schedule);
|
|
108
|
-
new ResizeObserver(schedule).observe(root);
|
|
109
|
-
new MutationObserver(schedule).observe(root, { subtree: true, childList: true, attributes: true, characterData: true });
|
|
110
|
-
send({ type: "status", phase: "agent-ready" });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "bippy/install-hook-only";
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { accepts, cropRect, type Envelope, type Message, type Rect, type Selection } from "./model.ts";
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
__FRAME_HOST__: {
|
|
6
|
-
messages: Envelope[];
|
|
7
|
-
selections: Selection[];
|
|
8
|
-
native: { attempted: boolean; activation: boolean; result: string };
|
|
9
|
-
send(message: Message, id?: string): void;
|
|
10
|
-
compareCapture(input: { png: string; reference: string; rect: Rect }): Promise<{ crop: string; differences: number; sameDimensions: boolean }>;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const params = new URLSearchParams(location.search);
|
|
16
|
-
const target = params.get("frame");
|
|
17
|
-
if (!target) throw new Error("host needs a frame URL");
|
|
18
|
-
const frame = document.querySelector("iframe");
|
|
19
|
-
if (!frame) throw new Error("host has no frame element");
|
|
20
|
-
const session = crypto.randomUUID();
|
|
21
|
-
const url = new URL(target);
|
|
22
|
-
url.hash = new URLSearchParams({ host: location.origin, session }).toString();
|
|
23
|
-
const messages: Envelope[] = [];
|
|
24
|
-
const selections: Selection[] = [];
|
|
25
|
-
const native = { attempted: false, activation: false, result: "not attempted" };
|
|
26
|
-
window.__FRAME_HOST__ = {
|
|
27
|
-
messages, selections, native,
|
|
28
|
-
send(message, id) {
|
|
29
|
-
frame.contentWindow!.postMessage({ bridge: "page-runtime-v1", session, ...(id ? { id } : {}), message }, url.origin);
|
|
30
|
-
},
|
|
31
|
-
async compareCapture({ png, reference, rect }) {
|
|
32
|
-
const clip = cropRect(frame.getBoundingClientRect(), rect);
|
|
33
|
-
const load = (data: string) => new Promise<HTMLImageElement>((resolve, reject) => {
|
|
34
|
-
const image = new Image(); image.onload = () => resolve(image); image.onerror = () => reject(new Error("invalid screenshot PNG")); image.src = `data:image/png;base64,${data}`;
|
|
35
|
-
});
|
|
36
|
-
const [full, expected] = await Promise.all([load(png), load(reference)]);
|
|
37
|
-
const canvas = document.createElement("canvas"); canvas.width = clip.width; canvas.height = clip.height;
|
|
38
|
-
const context = canvas.getContext("2d");
|
|
39
|
-
if (!context) throw new Error("host canvas unavailable");
|
|
40
|
-
context.drawImage(full, clip.x, clip.y, clip.width, clip.height, 0, 0, clip.width, clip.height);
|
|
41
|
-
const crop = canvas.toDataURL("image/png");
|
|
42
|
-
const ours = context.getImageData(0, 0, clip.width, clip.height).data;
|
|
43
|
-
context.clearRect(0, 0, clip.width, clip.height); context.drawImage(expected, 0, 0);
|
|
44
|
-
const theirs = context.getImageData(0, 0, clip.width, clip.height).data;
|
|
45
|
-
let differences = 0;
|
|
46
|
-
for (let index = 0; index < ours.length; index += 4) if (ours[index] !== theirs[index] || ours[index + 1] !== theirs[index + 1] || ours[index + 2] !== theirs[index + 2] || ours[index + 3] !== theirs[index + 3]) differences++;
|
|
47
|
-
return { crop, differences, sameDimensions: expected.width === clip.width && expected.height === clip.height };
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
addEventListener("message", (event: MessageEvent<Envelope>) => {
|
|
51
|
-
if (!accepts(event, { origin: url.origin, source: frame.contentWindow, session })) return;
|
|
52
|
-
messages.push(event.data);
|
|
53
|
-
if (event.data.message.type !== "selection") return;
|
|
54
|
-
selections.push(event.data.message.selection);
|
|
55
|
-
if (params.get("capture") !== "1" || native.attempted) return;
|
|
56
|
-
native.attempted = true;
|
|
57
|
-
native.activation = navigator.userActivation.isActive;
|
|
58
|
-
if (!navigator.mediaDevices?.getDisplayMedia) { native.result = "getDisplayMedia unavailable"; return; }
|
|
59
|
-
native.result = "capture chooser pending (no automatic permission)";
|
|
60
|
-
void navigator.mediaDevices.getDisplayMedia({ video: true }).then(
|
|
61
|
-
(stream) => { native.result = "stream acquired"; stream.getTracks().forEach((track) => track.stop()); },
|
|
62
|
-
(error: unknown) => { native.result = String(error); },
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
document.querySelector("button")!.addEventListener("click", () => window.__FRAME_HOST__.send({ type: "pick" }));
|
|
66
|
-
frame.src = url.href;
|