@m0saic/templates 0.2.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/LICENSE +13 -0
- package/README.md +7 -0
- package/dist/freeze.d.ts +406 -0
- package/dist/freeze.js +855 -0
- package/dist/gen-geometry-matrix.d.ts +1 -0
- package/dist/gen-geometry-matrix.js +177 -0
- package/dist/gen-geometry-proof.d.ts +1 -0
- package/dist/gen-geometry-proof.js +259 -0
- package/dist/gen-layout-envelope.d.ts +1 -0
- package/dist/gen-layout-envelope.js +120 -0
- package/dist/gen-precision-sweep.d.ts +1 -0
- package/dist/gen-precision-sweep.js +219 -0
- package/dist/gen-props-shape.d.ts +1 -0
- package/dist/gen-props-shape.js +269 -0
- package/dist/gen-template-audit.d.ts +1 -0
- package/dist/gen-template-audit.js +379 -0
- package/dist/gen-template-manifest.d.ts +1 -0
- package/dist/gen-template-manifest.js +162 -0
- package/dist/gen-web-template-ids.d.ts +1 -0
- package/dist/gen-web-template-ids.js +65 -0
- package/dist/geometry-audit.d.ts +149 -0
- package/dist/geometry-audit.js +368 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +29 -0
- package/dist/m0saic/_shared/onboarding-cover.d.ts +95 -0
- package/dist/m0saic/_shared/onboarding-cover.js +247 -0
- package/dist/m0saic/_shared/raster.d.ts +28 -0
- package/dist/m0saic/_shared/raster.js +146 -0
- package/dist/m0saic/_shared/svgRaster.d.ts +40 -0
- package/dist/m0saic/_shared/svgRaster.js +142 -0
- package/dist/m0saic/agents/commit-feed/index.d.ts +1 -0
- package/dist/m0saic/agents/commit-feed/index.js +17 -0
- package/dist/m0saic/agents/commit-feed/v1/commit-feed.d.ts +68 -0
- package/dist/m0saic/agents/commit-feed/v1/commit-feed.js +293 -0
- package/dist/m0saic/agents/commit-feed/v1/index.d.ts +2 -0
- package/dist/m0saic/agents/commit-feed/v1/index.js +11 -0
- package/dist/m0saic/agents/index.d.ts +7 -0
- package/dist/m0saic/agents/index.js +25 -0
- package/dist/m0saic/agents/trace-timeline/index.d.ts +1 -0
- package/dist/m0saic/agents/trace-timeline/index.js +17 -0
- package/dist/m0saic/agents/trace-timeline/v1/index.d.ts +2 -0
- package/dist/m0saic/agents/trace-timeline/v1/index.js +15 -0
- package/dist/m0saic/agents/trace-timeline/v1/trace-timeline.d.ts +73 -0
- package/dist/m0saic/agents/trace-timeline/v1/trace-timeline.js +356 -0
- package/dist/m0saic/alpine/_shared/alpine-anim.d.ts +65 -0
- package/dist/m0saic/alpine/_shared/alpine-anim.js +142 -0
- package/dist/m0saic/alpine/_shared/alpine-card.d.ts +114 -0
- package/dist/m0saic/alpine/_shared/alpine-card.js +193 -0
- package/dist/m0saic/alpine/_shared/alpine-glyphs.d.ts +23 -0
- package/dist/m0saic/alpine/_shared/alpine-glyphs.js +46 -0
- package/dist/m0saic/alpine/_shared/alpine-theme.d.ts +84 -0
- package/dist/m0saic/alpine/_shared/alpine-theme.js +155 -0
- package/dist/m0saic/alpine/bar-graph/v1/bar-graph.d.ts +85 -0
- package/dist/m0saic/alpine/bar-graph/v1/bar-graph.js +558 -0
- package/dist/m0saic/alpine/bar-graph/v1/index.d.ts +5 -0
- package/dist/m0saic/alpine/bar-graph/v1/index.js +9 -0
- package/dist/m0saic/alpine/commit-feed/v1/commit-feed.d.ts +64 -0
- package/dist/m0saic/alpine/commit-feed/v1/commit-feed.js +261 -0
- package/dist/m0saic/alpine/commit-feed/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/commit-feed/v1/index.js +5 -0
- package/dist/m0saic/alpine/commit-feed/v2/commit-feed.d.ts +78 -0
- package/dist/m0saic/alpine/commit-feed/v2/commit-feed.js +509 -0
- package/dist/m0saic/alpine/commit-feed/v2/index.d.ts +1 -0
- package/dist/m0saic/alpine/commit-feed/v2/index.js +5 -0
- package/dist/m0saic/alpine/contributor-table/v1/assets/README.md +13 -0
- package/dist/m0saic/alpine/contributor-table/v1/assets/layout-lite.m0 +9 -0
- package/dist/m0saic/alpine/contributor-table/v1/assets/layout-standard.m0 +9 -0
- package/dist/m0saic/alpine/contributor-table/v1/contributor-table.d.ts +76 -0
- package/dist/m0saic/alpine/contributor-table/v1/contributor-table.js +651 -0
- package/dist/m0saic/alpine/contributor-table/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/contributor-table/v1/index.js +5 -0
- package/dist/m0saic/alpine/donut/v1/donut.d.ts +55 -0
- package/dist/m0saic/alpine/donut/v1/donut.js +322 -0
- package/dist/m0saic/alpine/donut/v1/index.d.ts +5 -0
- package/dist/m0saic/alpine/donut/v1/index.js +9 -0
- package/dist/m0saic/alpine/donut/v2/donut.d.ts +58 -0
- package/dist/m0saic/alpine/donut/v2/donut.js +268 -0
- package/dist/m0saic/alpine/donut/v2/index.d.ts +1 -0
- package/dist/m0saic/alpine/donut/v2/index.js +5 -0
- package/dist/m0saic/alpine/donut/v3/donut.d.ts +65 -0
- package/dist/m0saic/alpine/donut/v3/donut.js +428 -0
- package/dist/m0saic/alpine/donut/v3/index.d.ts +1 -0
- package/dist/m0saic/alpine/donut/v3/index.js +5 -0
- package/dist/m0saic/alpine/heatmap/v1/heatmap.d.ts +68 -0
- package/dist/m0saic/alpine/heatmap/v1/heatmap.js +370 -0
- package/dist/m0saic/alpine/heatmap/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/heatmap/v1/index.js +5 -0
- package/dist/m0saic/alpine/heatmap/v2/heatmap.d.ts +73 -0
- package/dist/m0saic/alpine/heatmap/v2/heatmap.js +582 -0
- package/dist/m0saic/alpine/heatmap/v2/index.d.ts +1 -0
- package/dist/m0saic/alpine/heatmap/v2/index.js +5 -0
- package/dist/m0saic/alpine/index.d.ts +20 -0
- package/dist/m0saic/alpine/index.js +37 -0
- package/dist/m0saic/alpine/kpi-card/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/kpi-card/v1/index.js +5 -0
- package/dist/m0saic/alpine/kpi-card/v1/kpi-card.d.ts +54 -0
- package/dist/m0saic/alpine/kpi-card/v1/kpi-card.js +311 -0
- package/dist/m0saic/alpine/kpi-card/v2/index.d.ts +1 -0
- package/dist/m0saic/alpine/kpi-card/v2/index.js +5 -0
- package/dist/m0saic/alpine/kpi-card/v2/kpi-card.d.ts +60 -0
- package/dist/m0saic/alpine/kpi-card/v2/kpi-card.js +362 -0
- package/dist/m0saic/alpine/leaderboard/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/leaderboard/v1/index.js +5 -0
- package/dist/m0saic/alpine/leaderboard/v1/leaderboard.d.ts +58 -0
- package/dist/m0saic/alpine/leaderboard/v1/leaderboard.js +313 -0
- package/dist/m0saic/alpine/line-chart/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/line-chart/v1/index.js +5 -0
- package/dist/m0saic/alpine/line-chart/v1/line-chart.d.ts +70 -0
- package/dist/m0saic/alpine/line-chart/v1/line-chart.js +408 -0
- package/dist/m0saic/alpine/line-chart/v2/index.d.ts +1 -0
- package/dist/m0saic/alpine/line-chart/v2/index.js +5 -0
- package/dist/m0saic/alpine/line-chart/v2/line-chart.d.ts +72 -0
- package/dist/m0saic/alpine/line-chart/v2/line-chart.js +434 -0
- package/dist/m0saic/alpine/progress-card/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/progress-card/v1/index.js +5 -0
- package/dist/m0saic/alpine/progress-card/v1/progress-card.d.ts +53 -0
- package/dist/m0saic/alpine/progress-card/v1/progress-card.js +333 -0
- package/dist/m0saic/alpine/stat-card/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/stat-card/v1/index.js +5 -0
- package/dist/m0saic/alpine/stat-card/v1/stat-card.d.ts +76 -0
- package/dist/m0saic/alpine/stat-card/v1/stat-card.js +295 -0
- package/dist/m0saic/alpine/timeline/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/timeline/v1/index.js +5 -0
- package/dist/m0saic/alpine/timeline/v1/timeline.d.ts +55 -0
- package/dist/m0saic/alpine/timeline/v1/timeline.js +266 -0
- package/dist/m0saic/alpine/timeline/v2/index.d.ts +1 -0
- package/dist/m0saic/alpine/timeline/v2/index.js +5 -0
- package/dist/m0saic/alpine/timeline/v2/timeline.d.ts +61 -0
- package/dist/m0saic/alpine/timeline/v2/timeline.js +371 -0
- package/dist/m0saic/alpine/treemap/v1/index.d.ts +1 -0
- package/dist/m0saic/alpine/treemap/v1/index.js +5 -0
- package/dist/m0saic/alpine/treemap/v1/treemap.d.ts +56 -0
- package/dist/m0saic/alpine/treemap/v1/treemap.js +326 -0
- package/dist/m0saic/alpine/treemap/v2/index.d.ts +1 -0
- package/dist/m0saic/alpine/treemap/v2/index.js +5 -0
- package/dist/m0saic/alpine/treemap/v2/treemap.d.ts +59 -0
- package/dist/m0saic/alpine/treemap/v2/treemap.js +323 -0
- package/dist/m0saic/benchmark/battery/assets/media/README.md +16 -0
- package/dist/m0saic/benchmark/battery/assets/media/bbb-av.mp4 +0 -0
- package/dist/m0saic/benchmark/battery/assets/media/bbb-clip-01.mp4 +0 -0
- package/dist/m0saic/benchmark/battery/assets/media/bbb-clip-02.mp4 +0 -0
- package/dist/m0saic/benchmark/battery/assets/media/bbb-clip-03.mp4 +0 -0
- package/dist/m0saic/benchmark/battery/assets/media/bbb-clip-04.mp4 +0 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/duration-long.mosaic +80 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/encoders-base.mosaic +32 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/geometry-grid.mosaic +592 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/lifetime-window-fade.mosaic +28 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/real-bar-graph.mosaic +1980 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/real-donut.mosaic +797 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/real-screencap-grid.mosaic +4591 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/real-stat-card.mosaic +187 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/sources-audio.mosaic +31 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/sources-lavfi.mosaic +32 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/sources-media.mosaic +73 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/sources-nested.mosaic +48 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/sources-ref.mosaic +24 -0
- package/dist/m0saic/benchmark/battery/assets/scenarios/sources-text.mosaic +120 -0
- package/dist/m0saic/benchmark/battery/manifest.d.ts +65 -0
- package/dist/m0saic/benchmark/battery/manifest.js +97 -0
- package/dist/m0saic/benchmark/index.d.ts +2 -0
- package/dist/m0saic/benchmark/index.js +22 -0
- package/dist/m0saic/benchmark/report/v1/assets/m-logo.png +0 -0
- package/dist/m0saic/benchmark/report/v1/assets/sample-session/benchmark.json +41 -0
- package/dist/m0saic/benchmark/report/v1/index.d.ts +1 -0
- package/dist/m0saic/benchmark/report/v1/index.js +17 -0
- package/dist/m0saic/benchmark/report/v1/report.d.ts +23 -0
- package/dist/m0saic/benchmark/report/v1/report.js +242 -0
- package/dist/m0saic/benchmark/run/v1/benchmarkRun.d.ts +57 -0
- package/dist/m0saic/benchmark/run/v1/benchmarkRun.js +151 -0
- package/dist/m0saic/benchmark/run/v1/confirmation.d.ts +11 -0
- package/dist/m0saic/benchmark/run/v1/confirmation.js +48 -0
- package/dist/m0saic/benchmark/run/v1/index.d.ts +1 -0
- package/dist/m0saic/benchmark/run/v1/index.js +17 -0
- package/dist/m0saic/benchmark/run/v1/renderScenario.d.ts +12 -0
- package/dist/m0saic/benchmark/run/v1/renderScenario.js +122 -0
- package/dist/m0saic/benchmark/run/v1/runner.d.ts +10 -0
- package/dist/m0saic/benchmark/run/v1/runner.js +208 -0
- package/dist/m0saic/brand/business-card/v1/back-catalog.d.ts +68 -0
- package/dist/m0saic/brand/business-card/v1/back-catalog.js +121 -0
- package/dist/m0saic/brand/business-card/v1/business-card.d.ts +82 -0
- package/dist/m0saic/brand/business-card/v1/business-card.js +517 -0
- package/dist/m0saic/brand/business-card/v1/index.d.ts +4 -0
- package/dist/m0saic/brand/business-card/v1/index.js +16 -0
- package/dist/m0saic/brand/business-card/v1/layout.d.ts +163 -0
- package/dist/m0saic/brand/business-card/v1/layout.js +369 -0
- package/dist/m0saic/brand/community-m/v1/camera.d.ts +45 -0
- package/dist/m0saic/brand/community-m/v1/camera.js +44 -0
- package/dist/m0saic/brand/community-m/v1/caption.d.ts +5 -0
- package/dist/m0saic/brand/community-m/v1/caption.js +18 -0
- package/dist/m0saic/brand/community-m/v1/community-m.d.ts +25 -0
- package/dist/m0saic/brand/community-m/v1/community-m.js +117 -0
- package/dist/m0saic/brand/community-m/v1/community-m.web.d.ts +3 -0
- package/dist/m0saic/brand/community-m/v1/community-m.web.js +172 -0
- package/dist/m0saic/brand/community-m/v1/gen-seed-piece.d.ts +1 -0
- package/dist/m0saic/brand/community-m/v1/gen-seed-piece.js +59 -0
- package/dist/m0saic/brand/community-m/v1/geometry.d.ts +44 -0
- package/dist/m0saic/brand/community-m/v1/geometry.js +68 -0
- package/dist/m0saic/brand/community-m/v1/imageSize.node.d.ts +3 -0
- package/dist/m0saic/brand/community-m/v1/imageSize.node.js +60 -0
- package/dist/m0saic/brand/community-m/v1/index.d.ts +1 -0
- package/dist/m0saic/brand/community-m/v1/index.js +5 -0
- package/dist/m0saic/brand/community-m/v1/loadPiece.node.d.ts +14 -0
- package/dist/m0saic/brand/community-m/v1/loadPiece.node.js +69 -0
- package/dist/m0saic/brand/community-m/v1/manifest.d.ts +22 -0
- package/dist/m0saic/brand/community-m/v1/manifest.js +81 -0
- package/dist/m0saic/brand/community-m/v1/mark.d.ts +76 -0
- package/dist/m0saic/brand/community-m/v1/mark.js +136 -0
- package/dist/m0saic/brand/community-m/v1/paths.d.ts +14 -0
- package/dist/m0saic/brand/community-m/v1/paths.js +61 -0
- package/dist/m0saic/brand/community-m/v1/piece.d.ts +28 -0
- package/dist/m0saic/brand/community-m/v1/piece.js +35 -0
- package/dist/m0saic/brand/community-m/v1/pipeline.d.ts +122 -0
- package/dist/m0saic/brand/community-m/v1/pipeline.js +461 -0
- package/dist/m0saic/brand/community-m/v1/preview.d.ts +75 -0
- package/dist/m0saic/brand/community-m/v1/preview.js +214 -0
- package/dist/m0saic/brand/community-m/v1/props.d.ts +101 -0
- package/dist/m0saic/brand/community-m/v1/props.js +178 -0
- package/dist/m0saic/brand/community-m/v1/reveal.d.ts +129 -0
- package/dist/m0saic/brand/community-m/v1/reveal.js +155 -0
- package/dist/m0saic/brand/community-m/v1/seedPiece.d.ts +57 -0
- package/dist/m0saic/brand/community-m/v1/seedPiece.js +153 -0
- package/dist/m0saic/brand/community-m/v1/target.d.ts +88 -0
- package/dist/m0saic/brand/community-m/v1/target.js +132 -0
- package/dist/m0saic/brand/community-m/v1/timing.d.ts +32 -0
- package/dist/m0saic/brand/community-m/v1/timing.js +57 -0
- package/dist/m0saic/brand/community-m/v1/webPiece.d.ts +23 -0
- package/dist/m0saic/brand/community-m/v1/webPiece.js +42 -0
- package/dist/m0saic/brand/community-m/v1/wordmark.d.ts +34 -0
- package/dist/m0saic/brand/community-m/v1/wordmark.js +62 -0
- package/dist/m0saic/brand/index.d.ts +7 -0
- package/dist/m0saic/brand/index.js +17 -0
- package/dist/m0saic/brand/logo/v1/index.d.ts +1 -0
- package/dist/m0saic/brand/logo/v1/index.js +5 -0
- package/dist/m0saic/brand/logo/v1/logo.d.ts +30 -0
- package/dist/m0saic/brand/logo/v1/logo.js +471 -0
- package/dist/m0saic/brand/logo/v2/index.d.ts +1 -0
- package/dist/m0saic/brand/logo/v2/index.js +5 -0
- package/dist/m0saic/brand/logo/v2/logo.d.ts +30 -0
- package/dist/m0saic/brand/logo/v2/logo.js +615 -0
- package/dist/m0saic/brand/logo/v3/index.d.ts +1 -0
- package/dist/m0saic/brand/logo/v3/index.js +5 -0
- package/dist/m0saic/brand/logo/v3/logo.d.ts +36 -0
- package/dist/m0saic/brand/logo/v3/logo.js +666 -0
- package/dist/m0saic/brand/logo/v3/logo_runner.d.ts +36 -0
- package/dist/m0saic/brand/logo/v3/logo_runner.js +216 -0
- package/dist/m0saic/brand/qr-stamp/assets/brand-qr-with-logo.svg +8 -0
- package/dist/m0saic/brand/qr-stamp/assets/qr-animate.dark.mp4 +0 -0
- package/dist/m0saic/brand/qr-stamp/assets/qr-animate.dark.static.png +0 -0
- package/dist/m0saic/brand/qr-stamp/assets/qr-animate.light.mp4 +0 -0
- package/dist/m0saic/brand/qr-stamp/assets/qr-animate.light.static.png +0 -0
- package/dist/m0saic/brand/qr-stamp/still/v1/index.d.ts +2 -0
- package/dist/m0saic/brand/qr-stamp/still/v1/index.js +10 -0
- package/dist/m0saic/brand/qr-stamp/still/v1/qr-stamp-still.d.ts +45 -0
- package/dist/m0saic/brand/qr-stamp/still/v1/qr-stamp-still.js +347 -0
- package/dist/m0saic/brand/qr-stamp/video/v2/index.d.ts +2 -0
- package/dist/m0saic/brand/qr-stamp/video/v2/index.js +9 -0
- package/dist/m0saic/brand/qr-stamp/video/v2/qr-stamp.d.ts +43 -0
- package/dist/m0saic/brand/qr-stamp/video/v2/qr-stamp.js +447 -0
- package/dist/m0saic/brand/qr-stamp/video/v2/windows.d.ts +19 -0
- package/dist/m0saic/brand/qr-stamp/video/v2/windows.js +24 -0
- package/dist/m0saic/charts/_shared/index.d.ts +8 -0
- package/dist/m0saic/charts/_shared/index.js +24 -0
- package/dist/m0saic/charts/_shared/line.d.ts +100 -0
- package/dist/m0saic/charts/_shared/line.js +134 -0
- package/dist/m0saic/charts/_shared/scale.d.ts +9 -0
- package/dist/m0saic/charts/_shared/scale.js +17 -0
- package/dist/m0saic/charts/bar-graph/v1/anim.d.ts +83 -0
- package/dist/m0saic/charts/bar-graph/v1/anim.js +104 -0
- package/dist/m0saic/charts/bar-graph/v1/axis.d.ts +51 -0
- package/dist/m0saic/charts/bar-graph/v1/axis.js +73 -0
- package/dist/m0saic/charts/bar-graph/v1/bar-graph.d.ts +44 -0
- package/dist/m0saic/charts/bar-graph/v1/bar-graph.js +316 -0
- package/dist/m0saic/charts/bar-graph/v1/defaults.d.ts +88 -0
- package/dist/m0saic/charts/bar-graph/v1/defaults.js +157 -0
- package/dist/m0saic/charts/bar-graph/v1/format.d.ts +46 -0
- package/dist/m0saic/charts/bar-graph/v1/format.js +95 -0
- package/dist/m0saic/charts/bar-graph/v1/index.d.ts +31 -0
- package/dist/m0saic/charts/bar-graph/v1/index.js +36 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/bar-cell.d.ts +53 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/bar-cell.js +198 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/bar-fill.d.ts +4 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/bar-fill.js +154 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/bars-stack.d.ts +41 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/bars-stack.js +208 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/chart-frame.d.ts +32 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/chart-frame.js +124 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/labels.d.ts +52 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/labels.js +504 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/plot-area.d.ts +24 -0
- package/dist/m0saic/charts/bar-graph/v1/internal/plot-area.js +180 -0
- package/dist/m0saic/charts/bar-graph/v1/types.d.ts +326 -0
- package/dist/m0saic/charts/bar-graph/v1/types.js +36 -0
- package/dist/m0saic/charts/bar-graph/v2/bar-graph.d.ts +131 -0
- package/dist/m0saic/charts/bar-graph/v2/bar-graph.js +768 -0
- package/dist/m0saic/charts/bar-graph/v2/index.d.ts +10 -0
- package/dist/m0saic/charts/bar-graph/v2/index.js +14 -0
- package/dist/m0saic/charts/donut/v1/anim.d.ts +54 -0
- package/dist/m0saic/charts/donut/v1/anim.js +84 -0
- package/dist/m0saic/charts/donut/v1/donut.d.ts +87 -0
- package/dist/m0saic/charts/donut/v1/donut.js +400 -0
- package/dist/m0saic/charts/donut/v1/geometry.d.ts +55 -0
- package/dist/m0saic/charts/donut/v1/geometry.js +115 -0
- package/dist/m0saic/charts/donut/v1/index.d.ts +11 -0
- package/dist/m0saic/charts/donut/v1/index.js +17 -0
- package/dist/m0saic/charts/donut/v2/donut.d.ts +67 -0
- package/dist/m0saic/charts/donut/v2/donut.js +307 -0
- package/dist/m0saic/charts/donut/v2/index.d.ts +10 -0
- package/dist/m0saic/charts/donut/v2/index.js +14 -0
- package/dist/m0saic/charts/donut/v3/anim.d.ts +47 -0
- package/dist/m0saic/charts/donut/v3/anim.js +77 -0
- package/dist/m0saic/charts/donut/v3/donut.d.ts +54 -0
- package/dist/m0saic/charts/donut/v3/donut.js +531 -0
- package/dist/m0saic/charts/donut/v3/geometry.d.ts +74 -0
- package/dist/m0saic/charts/donut/v3/geometry.js +152 -0
- package/dist/m0saic/charts/donut/v3/index.d.ts +10 -0
- package/dist/m0saic/charts/donut/v3/index.js +14 -0
- package/dist/m0saic/charts/donut/v4/donut.d.ts +63 -0
- package/dist/m0saic/charts/donut/v4/donut.js +546 -0
- package/dist/m0saic/charts/donut/v4/index.d.ts +10 -0
- package/dist/m0saic/charts/donut/v4/index.js +14 -0
- package/dist/m0saic/charts/index.d.ts +8 -0
- package/dist/m0saic/charts/index.js +25 -0
- package/dist/m0saic/charts/line-chart/v1/anim.d.ts +78 -0
- package/dist/m0saic/charts/line-chart/v1/anim.js +119 -0
- package/dist/m0saic/charts/line-chart/v1/axis.d.ts +48 -0
- package/dist/m0saic/charts/line-chart/v1/axis.js +55 -0
- package/dist/m0saic/charts/line-chart/v1/card.d.ts +27 -0
- package/dist/m0saic/charts/line-chart/v1/card.js +44 -0
- package/dist/m0saic/charts/line-chart/v1/chrome-spec.d.ts +110 -0
- package/dist/m0saic/charts/line-chart/v1/chrome-spec.js +208 -0
- package/dist/m0saic/charts/line-chart/v1/chrome.d.ts +30 -0
- package/dist/m0saic/charts/line-chart/v1/chrome.js +335 -0
- package/dist/m0saic/charts/line-chart/v1/defaults.d.ts +65 -0
- package/dist/m0saic/charts/line-chart/v1/defaults.js +151 -0
- package/dist/m0saic/charts/line-chart/v1/format.d.ts +26 -0
- package/dist/m0saic/charts/line-chart/v1/format.js +76 -0
- package/dist/m0saic/charts/line-chart/v1/frame.d.ts +50 -0
- package/dist/m0saic/charts/line-chart/v1/frame.js +62 -0
- package/dist/m0saic/charts/line-chart/v1/geometry.d.ts +15 -0
- package/dist/m0saic/charts/line-chart/v1/geometry.js +34 -0
- package/dist/m0saic/charts/line-chart/v1/index.d.ts +16 -0
- package/dist/m0saic/charts/line-chart/v1/index.js +21 -0
- package/dist/m0saic/charts/line-chart/v1/line-chart.d.ts +26 -0
- package/dist/m0saic/charts/line-chart/v1/line-chart.js +634 -0
- package/dist/m0saic/charts/line-chart/v1/line-series.d.ts +69 -0
- package/dist/m0saic/charts/line-chart/v1/line-series.js +259 -0
- package/dist/m0saic/charts/line-chart/v1/types.d.ts +328 -0
- package/dist/m0saic/charts/line-chart/v1/types.js +24 -0
- package/dist/m0saic/charts/stat-card/v1/index.d.ts +10 -0
- package/dist/m0saic/charts/stat-card/v1/index.js +15 -0
- package/dist/m0saic/charts/stat-card/v1/stat-card.d.ts +78 -0
- package/dist/m0saic/charts/stat-card/v1/stat-card.js +475 -0
- package/dist/m0saic/code/_shared/code-diff.d.ts +73 -0
- package/dist/m0saic/code/_shared/code-diff.js +220 -0
- package/dist/m0saic/code/_shared/code-lexer.d.ts +28 -0
- package/dist/m0saic/code/_shared/code-lexer.js +226 -0
- package/dist/m0saic/code/_shared/code-metrics.d.ts +58 -0
- package/dist/m0saic/code/_shared/code-metrics.js +140 -0
- package/dist/m0saic/code/_shared/code-theme.d.ts +30 -0
- package/dist/m0saic/code/_shared/code-theme.js +141 -0
- package/dist/m0saic/code/index.d.ts +1 -0
- package/dist/m0saic/code/index.js +17 -0
- package/dist/m0saic/code/snippet-morph/v1/internal/chrome.d.ts +60 -0
- package/dist/m0saic/code/snippet-morph/v1/internal/chrome.js +252 -0
- package/dist/m0saic/code/snippet-morph/v1/internal/plan.d.ts +90 -0
- package/dist/m0saic/code/snippet-morph/v1/internal/plan.js +226 -0
- package/dist/m0saic/code/snippet-morph/v1/internal/steps.d.ts +103 -0
- package/dist/m0saic/code/snippet-morph/v1/internal/steps.js +313 -0
- package/dist/m0saic/code/snippet-morph/v1/snippet-morph.d.ts +61 -0
- package/dist/m0saic/code/snippet-morph/v1/snippet-morph.js +462 -0
- package/dist/m0saic/collage/image-collage/v1/demo-fixture.d.ts +18 -0
- package/dist/m0saic/collage/image-collage/v1/demo-fixture.js +30 -0
- package/dist/m0saic/collage/image-collage/v1/emit.d.ts +81 -0
- package/dist/m0saic/collage/image-collage/v1/emit.js +163 -0
- package/dist/m0saic/collage/image-collage/v1/image-collage.d.ts +63 -0
- package/dist/m0saic/collage/image-collage/v1/image-collage.js +386 -0
- package/dist/m0saic/collage/image-collage/v1/index.d.ts +2 -0
- package/dist/m0saic/collage/image-collage/v1/index.js +5 -0
- package/dist/m0saic/collage/image-collage/v1/packer/candidates.d.ts +71 -0
- package/dist/m0saic/collage/image-collage/v1/packer/candidates.js +211 -0
- package/dist/m0saic/collage/image-collage/v1/packer/classify.d.ts +26 -0
- package/dist/m0saic/collage/image-collage/v1/packer/classify.js +70 -0
- package/dist/m0saic/collage/image-collage/v1/packer/index.d.ts +7 -0
- package/dist/m0saic/collage/image-collage/v1/packer/index.js +23 -0
- package/dist/m0saic/collage/image-collage/v1/packer/paging.d.ts +39 -0
- package/dist/m0saic/collage/image-collage/v1/packer/paging.js +139 -0
- package/dist/m0saic/collage/image-collage/v1/packer/score.d.ts +25 -0
- package/dist/m0saic/collage/image-collage/v1/packer/score.js +69 -0
- package/dist/m0saic/collage/image-collage/v1/packer/solve.d.ts +27 -0
- package/dist/m0saic/collage/image-collage/v1/packer/solve.js +84 -0
- package/dist/m0saic/collage/image-collage/v1/packer/tiler.d.ts +65 -0
- package/dist/m0saic/collage/image-collage/v1/packer/tiler.js +607 -0
- package/dist/m0saic/collage/image-collage/v1/packer/types.d.ts +99 -0
- package/dist/m0saic/collage/image-collage/v1/packer/types.js +10 -0
- package/dist/m0saic/collage/image-collage/v1/tutorial.d.ts +17 -0
- package/dist/m0saic/collage/image-collage/v1/tutorial.js +269 -0
- package/dist/m0saic/collage/index.d.ts +2 -0
- package/dist/m0saic/collage/index.js +18 -0
- package/dist/m0saic/collage/spread-grid-mock/v1/grid-fixture.d.ts +7 -0
- package/dist/m0saic/collage/spread-grid-mock/v1/grid-fixture.js +11 -0
- package/dist/m0saic/collage/spread-grid-mock/v1/index.d.ts +1 -0
- package/dist/m0saic/collage/spread-grid-mock/v1/index.js +5 -0
- package/dist/m0saic/collage/spread-grid-mock/v1/spread-grid-mock.d.ts +29 -0
- package/dist/m0saic/collage/spread-grid-mock/v1/spread-grid-mock.js +78 -0
- package/dist/m0saic/dsl-tutorial/index.d.ts +1 -0
- package/dist/m0saic/dsl-tutorial/index.js +18 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/brand-glyphs.d.ts +24 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/brand-glyphs.js +17 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/m0saic-logo.d.ts +6 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/m0saic-logo.js +9 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/node-kit.d.ts +57 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/node-kit.js +156 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/text-fit.d.ts +76 -0
- package/dist/m0saic/dsl-tutorial/v1/_shared/text-fit.js +127 -0
- package/dist/m0saic/dsl-tutorial/v1/dsl-tutorial.d.ts +124 -0
- package/dist/m0saic/dsl-tutorial/v1/dsl-tutorial.js +675 -0
- package/dist/m0saic/dsl-tutorial/v1/index.d.ts +24 -0
- package/dist/m0saic/dsl-tutorial/v1/index.js +35 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/canvas/v1/dsl-canvas.d.ts +113 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/canvas/v1/dsl-canvas.js +573 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/chrome/v1/dsl-chrome.d.ts +83 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/chrome/v1/dsl-chrome.js +373 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/dsl-string/v1/dsl-string.d.ts +48 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/dsl-string/v1/dsl-string.js +366 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/inspector/v1/dsl-inspector.d.ts +54 -0
- package/dist/m0saic/dsl-tutorial/v1/panels/inspector/v1/dsl-inspector.js +304 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/buildSteps.d.ts +110 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/buildSteps.js +443 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/camera.d.ts +64 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/camera.js +177 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/cursor.d.ts +47 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/cursor.js +64 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/dslString.d.ts +61 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/dslString.js +135 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/inspector.d.ts +62 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/inspector.js +197 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/timing.d.ts +117 -0
- package/dist/m0saic/dsl-tutorial/v1/pipeline/timing.js +180 -0
- package/dist/m0saic/dsl-tutorial/v1/theme/tokens.d.ts +87 -0
- package/dist/m0saic/dsl-tutorial/v1/theme/tokens.js +96 -0
- package/dist/m0saic/forensic/index.d.ts +1 -0
- package/dist/m0saic/forensic/index.js +17 -0
- package/dist/m0saic/forensic/watermark/_shared/cellLuminance.d.ts +37 -0
- package/dist/m0saic/forensic/watermark/_shared/cellLuminance.js +62 -0
- package/dist/m0saic/forensic/watermark/index.d.ts +2 -0
- package/dist/m0saic/forensic/watermark/index.js +18 -0
- package/dist/m0saic/forensic/watermark/verify/index.d.ts +1 -0
- package/dist/m0saic/forensic/watermark/verify/index.js +17 -0
- package/dist/m0saic/forensic/watermark/verify/v1/decode.d.ts +83 -0
- package/dist/m0saic/forensic/watermark/verify/v1/decode.js +270 -0
- package/dist/m0saic/forensic/watermark/verify/v1/index.d.ts +2 -0
- package/dist/m0saic/forensic/watermark/verify/v1/index.js +23 -0
- package/dist/m0saic/forensic/watermark/verify/v1/report.d.ts +71 -0
- package/dist/m0saic/forensic/watermark/verify/v1/report.js +428 -0
- package/dist/m0saic/forensic/watermark/verify/v1/verify.d.ts +55 -0
- package/dist/m0saic/forensic/watermark/verify/v1/verify.js +286 -0
- package/dist/m0saic/forensic/watermark/video/index.d.ts +1 -0
- package/dist/m0saic/forensic/watermark/video/index.js +17 -0
- package/dist/m0saic/forensic/watermark/video/v1/forensic-watermark.d.ts +119 -0
- package/dist/m0saic/forensic/watermark/video/v1/forensic-watermark.js +629 -0
- package/dist/m0saic/forensic/watermark/video/v1/index.d.ts +2 -0
- package/dist/m0saic/forensic/watermark/video/v1/index.js +9 -0
- package/dist/m0saic/forensic/watermark/video/v1/maskAsset.d.ts +67 -0
- package/dist/m0saic/forensic/watermark/video/v1/maskAsset.js +125 -0
- package/dist/m0saic/forensic/watermark/video/v1/probeHost.d.ts +69 -0
- package/dist/m0saic/forensic/watermark/video/v1/probeHost.js +83 -0
- package/dist/m0saic/github/client.d.ts +200 -0
- package/dist/m0saic/github/client.js +161 -0
- package/dist/m0saic/github/connection.d.ts +24 -0
- package/dist/m0saic/github/connection.js +91 -0
- package/dist/m0saic/github/index.d.ts +20 -0
- package/dist/m0saic/github/index.js +42 -0
- package/dist/m0saic/github/repo-facts-fetcher/index.d.ts +4 -0
- package/dist/m0saic/github/repo-facts-fetcher/index.js +20 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/build-facts.d.ts +54 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/build-facts.js +238 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/facts.d.ts +112 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/facts.js +12 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/repo-facts-fetcher.d.ts +67 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/repo-facts-fetcher.js +210 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/sample-facts.d.ts +16 -0
- package/dist/m0saic/github/repo-facts-fetcher/v1/sample-facts.js +175 -0
- package/dist/m0saic/github/week-math.d.ts +50 -0
- package/dist/m0saic/github/week-math.js +96 -0
- package/dist/m0saic/github/weekly-pulse/index.d.ts +1 -0
- package/dist/m0saic/github/weekly-pulse/index.js +17 -0
- package/dist/m0saic/github/weekly-pulse/v1/weekly-pulse.d.ts +51 -0
- package/dist/m0saic/github/weekly-pulse/v1/weekly-pulse.js +153 -0
- package/dist/m0saic/github/weekly-pulse-adapter/index.d.ts +2 -0
- package/dist/m0saic/github/weekly-pulse-adapter/index.js +18 -0
- package/dist/m0saic/github/weekly-pulse-adapter/v1/derive-pulse.d.ts +24 -0
- package/dist/m0saic/github/weekly-pulse-adapter/v1/derive-pulse.js +257 -0
- package/dist/m0saic/github/weekly-pulse-adapter/v1/weekly-pulse-adapter.d.ts +35 -0
- package/dist/m0saic/github/weekly-pulse-adapter/v1/weekly-pulse-adapter.js +131 -0
- package/dist/m0saic/github/year-card/index.d.ts +1 -0
- package/dist/m0saic/github/year-card/index.js +17 -0
- package/dist/m0saic/github/year-card/v1/index.d.ts +2 -0
- package/dist/m0saic/github/year-card/v1/index.js +16 -0
- package/dist/m0saic/github/year-card/v1/year-card.d.ts +90 -0
- package/dist/m0saic/github/year-card/v1/year-card.js +476 -0
- package/dist/m0saic/hello-world/index.d.ts +1 -0
- package/dist/m0saic/hello-world/index.js +18 -0
- package/dist/m0saic/hello-world/v1/hello-world.d.ts +4 -0
- package/dist/m0saic/hello-world/v1/hello-world.js +36 -0
- package/dist/m0saic/hello-world/v1/index.d.ts +5 -0
- package/dist/m0saic/hello-world/v1/index.js +9 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/bake-fin-qr.sh +11 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/ffmpeg-logo.png +0 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/ffmpeg_logo_480x480.svg +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/m-hero.png +0 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/qr-fin.mp4 +0 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/scatter-desktop.mp4 +0 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/scatter-layout.m0p +5146 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/scatter-mobile.mp4 +0 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/scatter-square.mp4 +0 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/assets/title-layout.m0p +130 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-chrome.d.ts +151 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-chrome.js +305 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-data.d.ts +178 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-data.js +238 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-glyphs.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-glyphs.js +12 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-theme.d.ts +67 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/pulse-theme.js +59 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/scatter.d.ts +54 -0
- package/dist/m0saic/hero/ffmpeg-pulse/_shared/scatter.js +173 -0
- package/dist/m0saic/hero/ffmpeg-pulse/activity-trend/v1/activity-trend.d.ts +37 -0
- package/dist/m0saic/hero/ffmpeg-pulse/activity-trend/v1/activity-trend.js +178 -0
- package/dist/m0saic/hero/ffmpeg-pulse/activity-trend/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/activity-trend/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/changes-breakdown/v1/changes-breakdown.d.ts +37 -0
- package/dist/m0saic/hero/ffmpeg-pulse/changes-breakdown/v1/changes-breakdown.js +164 -0
- package/dist/m0saic/hero/ffmpeg-pulse/changes-breakdown/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/changes-breakdown/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/contributions/v1/contributions.d.ts +37 -0
- package/dist/m0saic/hero/ffmpeg-pulse/contributions/v1/contributions.js +159 -0
- package/dist/m0saic/hero/ffmpeg-pulse/contributions/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/contributions/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/fin/v1/fin.d.ts +31 -0
- package/dist/m0saic/hero/ffmpeg-pulse/fin/v1/fin.js +154 -0
- package/dist/m0saic/hero/ffmpeg-pulse/fin/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/fin/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/index.d.ts +10 -0
- package/dist/m0saic/hero/ffmpeg-pulse/index.js +24 -0
- package/dist/m0saic/hero/ffmpeg-pulse/kpi-overview/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/kpi-overview/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/kpi-overview/v1/kpi-overview.d.ts +38 -0
- package/dist/m0saic/hero/ffmpeg-pulse/kpi-overview/v1/kpi-overview.js +161 -0
- package/dist/m0saic/hero/ffmpeg-pulse/notable-commits/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/notable-commits/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/notable-commits/v1/notable-commits.d.ts +36 -0
- package/dist/m0saic/hero/ffmpeg-pulse/notable-commits/v1/notable-commits.js +151 -0
- package/dist/m0saic/hero/ffmpeg-pulse/runner/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/runner/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/runner/v1/runner.d.ts +54 -0
- package/dist/m0saic/hero/ffmpeg-pulse/runner/v1/runner.js +128 -0
- package/dist/m0saic/hero/ffmpeg-pulse/scatter-bake/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/scatter-bake/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/scatter-bake/v1/scatter-bake.d.ts +29 -0
- package/dist/m0saic/hero/ffmpeg-pulse/scatter-bake/v1/scatter-bake.js +47 -0
- package/dist/m0saic/hero/ffmpeg-pulse/title/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/title/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/title/v1/title.d.ts +20 -0
- package/dist/m0saic/hero/ffmpeg-pulse/title/v1/title.js +365 -0
- package/dist/m0saic/hero/ffmpeg-pulse/top-contributors/v1/index.d.ts +1 -0
- package/dist/m0saic/hero/ffmpeg-pulse/top-contributors/v1/index.js +5 -0
- package/dist/m0saic/hero/ffmpeg-pulse/top-contributors/v1/top-contributors.d.ts +38 -0
- package/dist/m0saic/hero/ffmpeg-pulse/top-contributors/v1/top-contributors.js +174 -0
- package/dist/m0saic/hero/index.d.ts +1 -0
- package/dist/m0saic/hero/index.js +18 -0
- package/dist/m0saic/index.d.ts +20 -0
- package/dist/m0saic/index.js +56 -0
- package/dist/m0saic/media/barcode/v1/barcode.d.ts +22 -0
- package/dist/m0saic/media/barcode/v1/barcode.js +218 -0
- package/dist/m0saic/media/barcode/v1/index.d.ts +1 -0
- package/dist/m0saic/media/barcode/v1/index.js +9 -0
- package/dist/m0saic/media/blur-regions/index.d.ts +1 -0
- package/dist/m0saic/media/blur-regions/index.js +17 -0
- package/dist/m0saic/media/blur-regions/v1/blur-regions.d.ts +58 -0
- package/dist/m0saic/media/blur-regions/v1/blur-regions.js +303 -0
- package/dist/m0saic/media/blur-regions/v1/index.d.ts +2 -0
- package/dist/m0saic/media/blur-regions/v1/index.js +20 -0
- package/dist/m0saic/media/blur-regions/v1/plan.d.ts +125 -0
- package/dist/m0saic/media/blur-regions/v1/plan.js +204 -0
- package/dist/m0saic/media/blur-regions/v1/tutorial.d.ts +18 -0
- package/dist/m0saic/media/blur-regions/v1/tutorial.js +428 -0
- package/dist/m0saic/media/highlights/index.d.ts +1 -0
- package/dist/m0saic/media/highlights/index.js +17 -0
- package/dist/m0saic/media/highlights/v1/assets/cover-ranges.jpg +0 -0
- package/dist/m0saic/media/highlights/v1/highlights.d.ts +49 -0
- package/dist/m0saic/media/highlights/v1/highlights.js +222 -0
- package/dist/m0saic/media/highlights/v1/index.d.ts +3 -0
- package/dist/m0saic/media/highlights/v1/index.js +19 -0
- package/dist/m0saic/media/highlights/v1/pipeline.d.ts +35 -0
- package/dist/m0saic/media/highlights/v1/pipeline.js +91 -0
- package/dist/m0saic/media/highlights/v1/plan.d.ts +46 -0
- package/dist/m0saic/media/highlights/v1/plan.js +68 -0
- package/dist/m0saic/media/index.d.ts +13 -0
- package/dist/m0saic/media/index.js +31 -0
- package/dist/m0saic/media/logo-animate/index.d.ts +1 -0
- package/dist/m0saic/media/logo-animate/index.js +17 -0
- package/dist/m0saic/media/logo-animate/v1/default-logo.d.ts +12 -0
- package/dist/m0saic/media/logo-animate/v1/default-logo.js +49 -0
- package/dist/m0saic/media/logo-animate/v1/expressions.d.ts +66 -0
- package/dist/m0saic/media/logo-animate/v1/expressions.js +107 -0
- package/dist/m0saic/media/logo-animate/v1/index.d.ts +2 -0
- package/dist/m0saic/media/logo-animate/v1/index.js +5 -0
- package/dist/m0saic/media/logo-animate/v1/layout.d.ts +29 -0
- package/dist/m0saic/media/logo-animate/v1/layout.js +43 -0
- package/dist/m0saic/media/logo-animate/v1/logo-animate.d.ts +106 -0
- package/dist/m0saic/media/logo-animate/v1/logo-animate.js +732 -0
- package/dist/m0saic/media/logo-animate/v1/svg-source.d.ts +63 -0
- package/dist/m0saic/media/logo-animate/v1/svg-source.js +127 -0
- package/dist/m0saic/media/logo-animate/v1/tutorial.d.ts +16 -0
- package/dist/m0saic/media/logo-animate/v1/tutorial.js +378 -0
- package/dist/m0saic/media/metadata-stamp/index.d.ts +1 -0
- package/dist/m0saic/media/metadata-stamp/index.js +17 -0
- package/dist/m0saic/media/metadata-stamp/v1/assets/cover-frame.jpg +0 -0
- package/dist/m0saic/media/metadata-stamp/v1/format-date.d.ts +52 -0
- package/dist/m0saic/media/metadata-stamp/v1/format-date.js +128 -0
- package/dist/m0saic/media/metadata-stamp/v1/index.d.ts +4 -0
- package/dist/m0saic/media/metadata-stamp/v1/index.js +10 -0
- package/dist/m0saic/media/metadata-stamp/v1/metadata-stamp.d.ts +58 -0
- package/dist/m0saic/media/metadata-stamp/v1/metadata-stamp.js +534 -0
- package/dist/m0saic/media/qr/_shared/brandMCenter.d.ts +28 -0
- package/dist/m0saic/media/qr/_shared/brandMCenter.js +52 -0
- package/dist/m0saic/media/qr/animate/v1/expressions.d.ts +164 -0
- package/dist/m0saic/media/qr/animate/v1/expressions.js +251 -0
- package/dist/m0saic/media/qr/animate/v1/index.d.ts +2 -0
- package/dist/m0saic/media/qr/animate/v1/index.js +9 -0
- package/dist/m0saic/media/qr/animate/v1/qr-animate.d.ts +171 -0
- package/dist/m0saic/media/qr/animate/v1/qr-animate.js +775 -0
- package/dist/m0saic/media/qr/animate/v2/index.d.ts +2 -0
- package/dist/m0saic/media/qr/animate/v2/index.js +9 -0
- package/dist/m0saic/media/qr/animate/v2/qr-animate.d.ts +64 -0
- package/dist/m0saic/media/qr/animate/v2/qr-animate.js +341 -0
- package/dist/m0saic/media/qr/basic/v1/index.d.ts +1 -0
- package/dist/m0saic/media/qr/basic/v1/index.js +10 -0
- package/dist/m0saic/media/qr/basic/v1/qr.d.ts +24 -0
- package/dist/m0saic/media/qr/basic/v1/qr.js +132 -0
- package/dist/m0saic/media/qr/code/v1/index.d.ts +2 -0
- package/dist/m0saic/media/qr/code/v1/index.js +9 -0
- package/dist/m0saic/media/qr/code/v1/qr-code.d.ts +135 -0
- package/dist/m0saic/media/qr/code/v1/qr-code.js +611 -0
- package/dist/m0saic/media/qr/index.d.ts +7 -0
- package/dist/m0saic/media/qr/index.js +19 -0
- package/dist/m0saic/media/qr/rounded/v1/index.d.ts +1 -0
- package/dist/m0saic/media/qr/rounded/v1/index.js +9 -0
- package/dist/m0saic/media/qr/rounded/v1/qr-rounded.d.ts +68 -0
- package/dist/m0saic/media/qr/rounded/v1/qr-rounded.js +338 -0
- package/dist/m0saic/media/qr/stamp/v1/assets/cover-frame.jpg +0 -0
- package/dist/m0saic/media/qr/stamp/v1/qr-stamp-custom.d.ts +44 -0
- package/dist/m0saic/media/qr/stamp/v1/qr-stamp-custom.js +389 -0
- package/dist/m0saic/media/qr/stamp-video/v1/expressions.d.ts +10 -0
- package/dist/m0saic/media/qr/stamp-video/v1/expressions.js +18 -0
- package/dist/m0saic/media/qr/stamp-video/v1/gleamBand.d.ts +115 -0
- package/dist/m0saic/media/qr/stamp-video/v1/gleamBand.js +206 -0
- package/dist/m0saic/media/qr/stamp-video/v1/index.d.ts +2 -0
- package/dist/m0saic/media/qr/stamp-video/v1/index.js +9 -0
- package/dist/m0saic/media/qr/stamp-video/v1/qr-stamp.d.ts +82 -0
- package/dist/m0saic/media/qr/stamp-video/v1/qr-stamp.js +424 -0
- package/dist/m0saic/media/screencap_grid/index.d.ts +3 -0
- package/dist/m0saic/media/screencap_grid/index.js +9 -0
- package/dist/m0saic/media/screencap_grid/internal/index.d.ts +1 -0
- package/dist/m0saic/media/screencap_grid/internal/index.js +5 -0
- package/dist/m0saic/media/screencap_grid/internal/info_pane.d.ts +13 -0
- package/dist/m0saic/media/screencap_grid/internal/info_pane.js +130 -0
- package/dist/m0saic/media/screencap_grid/v1/index.d.ts +1 -0
- package/dist/m0saic/media/screencap_grid/v1/index.js +5 -0
- package/dist/m0saic/media/screencap_grid/v1/screencap-grid.d.ts +162 -0
- package/dist/m0saic/media/screencap_grid/v1/screencap-grid.js +690 -0
- package/dist/m0saic/media/screencap_grid/v2/assets/tutorial-sheet.jpg +0 -0
- package/dist/m0saic/media/screencap_grid/v2/index.d.ts +1 -0
- package/dist/m0saic/media/screencap_grid/v2/index.js +5 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid-cover-assets.d.ts +9 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid-cover-assets.js +12 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid-cover.d.ts +97 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid-cover.js +367 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid-tutorial.d.ts +38 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid-tutorial.js +530 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid.d.ts +194 -0
- package/dist/m0saic/media/screencap_grid/v2/screencap-grid.js +615 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/index.d.ts +1 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/index.js +5 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/assets/pair-sheet.jpg +0 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/index.d.ts +1 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/index.js +5 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/screencap-grid-aspect-safe-cover.d.ts +18 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/screencap-grid-aspect-safe-cover.js +191 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/screencap-grid-aspect-safe-tutorial.d.ts +13 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/screencap-grid-aspect-safe-tutorial.js +355 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/screencap-grid-aspect-safe.d.ts +179 -0
- package/dist/m0saic/media/screencap_grid_aspect_safe/v1/screencap-grid-aspect-safe.js +544 -0
- package/dist/m0saic/media/scroll_wall/index.d.ts +1 -0
- package/dist/m0saic/media/scroll_wall/index.js +5 -0
- package/dist/m0saic/media/scroll_wall/v1/geometry.d.ts +131 -0
- package/dist/m0saic/media/scroll_wall/v1/geometry.js +172 -0
- package/dist/m0saic/media/scroll_wall/v1/index.d.ts +1 -0
- package/dist/m0saic/media/scroll_wall/v1/index.js +5 -0
- package/dist/m0saic/media/scroll_wall/v1/motion.d.ts +114 -0
- package/dist/m0saic/media/scroll_wall/v1/motion.js +141 -0
- package/dist/m0saic/media/scroll_wall/v1/scroll-wall.d.ts +182 -0
- package/dist/m0saic/media/scroll_wall/v1/scroll-wall.js +432 -0
- package/dist/m0saic/media/subtitle-burn/index.d.ts +1 -0
- package/dist/m0saic/media/subtitle-burn/index.js +17 -0
- package/dist/m0saic/media/subtitle-burn/v1/assets/cover-frame.jpg +0 -0
- package/dist/m0saic/media/subtitle-burn/v1/index.d.ts +1 -0
- package/dist/m0saic/media/subtitle-burn/v1/index.js +6 -0
- package/dist/m0saic/media/subtitle-burn/v1/subtitle-burn-cover.d.ts +13 -0
- package/dist/m0saic/media/subtitle-burn/v1/subtitle-burn-cover.js +196 -0
- package/dist/m0saic/media/subtitle-burn/v1/subtitle-burn.d.ts +137 -0
- package/dist/m0saic/media/subtitle-burn/v1/subtitle-burn.js +603 -0
- package/dist/m0saic/media/trickplay/index.d.ts +1 -0
- package/dist/m0saic/media/trickplay/index.js +17 -0
- package/dist/m0saic/media/trickplay/v1/index.d.ts +4 -0
- package/dist/m0saic/media/trickplay/v1/index.js +18 -0
- package/dist/m0saic/media/trickplay/v1/pipeline.d.ts +51 -0
- package/dist/m0saic/media/trickplay/v1/pipeline.js +180 -0
- package/dist/m0saic/media/trickplay/v1/plan.d.ts +65 -0
- package/dist/m0saic/media/trickplay/v1/plan.js +76 -0
- package/dist/m0saic/media/trickplay/v1/sidecars.d.ts +79 -0
- package/dist/m0saic/media/trickplay/v1/sidecars.js +89 -0
- package/dist/m0saic/media/trickplay/v1/trickplay.d.ts +40 -0
- package/dist/m0saic/media/trickplay/v1/trickplay.js +123 -0
- package/dist/m0saic/media/video_to_png_sequence/index.d.ts +1 -0
- package/dist/m0saic/media/video_to_png_sequence/index.js +5 -0
- package/dist/m0saic/media/video_to_png_sequence/v1/index.d.ts +1 -0
- package/dist/m0saic/media/video_to_png_sequence/v1/index.js +5 -0
- package/dist/m0saic/media/video_to_png_sequence/v1/video-to-png-sequence.d.ts +37 -0
- package/dist/m0saic/media/video_to_png_sequence/v1/video-to-png-sequence.js +234 -0
- package/dist/m0saic/media/watermark/index.d.ts +1 -0
- package/dist/m0saic/media/watermark/index.js +17 -0
- package/dist/m0saic/media/watermark/v1/adaptive.d.ts +85 -0
- package/dist/m0saic/media/watermark/v1/adaptive.js +162 -0
- package/dist/m0saic/media/watermark/v1/content.d.ts +56 -0
- package/dist/m0saic/media/watermark/v1/content.js +160 -0
- package/dist/m0saic/media/watermark/v1/geometry.d.ts +138 -0
- package/dist/m0saic/media/watermark/v1/geometry.js +247 -0
- package/dist/m0saic/media/watermark/v1/index.d.ts +3 -0
- package/dist/m0saic/media/watermark/v1/index.js +5 -0
- package/dist/m0saic/media/watermark/v1/pageGrid.d.ts +105 -0
- package/dist/m0saic/media/watermark/v1/pageGrid.js +203 -0
- package/dist/m0saic/media/watermark/v1/pipeline.d.ts +68 -0
- package/dist/m0saic/media/watermark/v1/pipeline.js +324 -0
- package/dist/m0saic/media/watermark/v1/watermark.d.ts +88 -0
- package/dist/m0saic/media/watermark/v1/watermark.js +452 -0
- package/dist/m0saic/meta/camera-debug/index.d.ts +1 -0
- package/dist/m0saic/meta/camera-debug/index.js +17 -0
- package/dist/m0saic/meta/camera-debug/v1/camera-debug.d.ts +98 -0
- package/dist/m0saic/meta/camera-debug/v1/camera-debug.js +490 -0
- package/dist/m0saic/meta/fixture-fetcher/index.d.ts +1 -0
- package/dist/m0saic/meta/fixture-fetcher/index.js +17 -0
- package/dist/m0saic/meta/fixture-fetcher/v1/fixture-fetcher.d.ts +76 -0
- package/dist/m0saic/meta/fixture-fetcher/v1/fixture-fetcher.js +159 -0
- package/dist/m0saic/meta/hot-reload-smoke/index.d.ts +1 -0
- package/dist/m0saic/meta/hot-reload-smoke/index.js +17 -0
- package/dist/m0saic/meta/hot-reload-smoke/v1/hot-reload-smoke.d.ts +50 -0
- package/dist/m0saic/meta/hot-reload-smoke/v1/hot-reload-smoke.js +131 -0
- package/dist/m0saic/meta/index.d.ts +13 -0
- package/dist/m0saic/meta/index.js +29 -0
- package/dist/m0saic/meta/post-mortem/index.d.ts +1 -0
- package/dist/m0saic/meta/post-mortem/index.js +17 -0
- package/dist/m0saic/meta/post-mortem/v1/assets/human.png +0 -0
- package/dist/m0saic/meta/post-mortem/v1/assets/robot.png +0 -0
- package/dist/m0saic/meta/post-mortem/v1/post-mortem.d.ts +47 -0
- package/dist/m0saic/meta/post-mortem/v1/post-mortem.js +634 -0
- package/dist/m0saic/meta/upstream-echo/index.d.ts +1 -0
- package/dist/m0saic/meta/upstream-echo/index.js +17 -0
- package/dist/m0saic/meta/upstream-echo/v1/upstream-echo.d.ts +52 -0
- package/dist/m0saic/meta/upstream-echo/v1/upstream-echo.js +138 -0
- package/dist/m0saic/primitives/grid/index.d.ts +2 -0
- package/dist/m0saic/primitives/grid/index.js +7 -0
- package/dist/m0saic/primitives/grid/v1/grid.d.ts +85 -0
- package/dist/m0saic/primitives/grid/v1/grid.js +217 -0
- package/dist/m0saic/primitives/grid/v2/grid.d.ts +80 -0
- package/dist/m0saic/primitives/grid/v2/grid.js +150 -0
- package/dist/m0saic/primitives/index.d.ts +1 -0
- package/dist/m0saic/primitives/index.js +17 -0
- package/dist/m0saic/social/index.d.ts +1 -0
- package/dist/m0saic/social/index.js +17 -0
- package/dist/m0saic/social/quote-card/index.d.ts +1 -0
- package/dist/m0saic/social/quote-card/index.js +17 -0
- package/dist/m0saic/social/quote-card/v1/index.d.ts +2 -0
- package/dist/m0saic/social/quote-card/v1/index.js +5 -0
- package/dist/m0saic/social/quote-card/v1/layout.d.ts +119 -0
- package/dist/m0saic/social/quote-card/v1/layout.js +323 -0
- package/dist/m0saic/social/quote-card/v1/quote-card.d.ts +51 -0
- package/dist/m0saic/social/quote-card/v1/quote-card.js +310 -0
- package/dist/m0saic/story/index.d.ts +2 -0
- package/dist/m0saic/story/index.js +20 -0
- package/dist/m0saic/story/narrated-chapters/index.d.ts +1 -0
- package/dist/m0saic/story/narrated-chapters/index.js +17 -0
- package/dist/m0saic/story/narrated-chapters/v1/captions.d.ts +42 -0
- package/dist/m0saic/story/narrated-chapters/v1/captions.js +200 -0
- package/dist/m0saic/story/narrated-chapters/v1/demo-fixture.d.ts +13 -0
- package/dist/m0saic/story/narrated-chapters/v1/demo-fixture.js +52 -0
- package/dist/m0saic/story/narrated-chapters/v1/index.d.ts +2 -0
- package/dist/m0saic/story/narrated-chapters/v1/index.js +5 -0
- package/dist/m0saic/story/narrated-chapters/v1/kenburns.d.ts +50 -0
- package/dist/m0saic/story/narrated-chapters/v1/kenburns.js +0 -0
- package/dist/m0saic/story/narrated-chapters/v1/layout.d.ts +103 -0
- package/dist/m0saic/story/narrated-chapters/v1/layout.js +162 -0
- package/dist/m0saic/story/narrated-chapters/v1/narrated-chapters.d.ts +22 -0
- package/dist/m0saic/story/narrated-chapters/v1/narrated-chapters.js +160 -0
- package/dist/m0saic/story/narrated-chapters/v1/pipeline.d.ts +43 -0
- package/dist/m0saic/story/narrated-chapters/v1/pipeline.js +94 -0
- package/dist/m0saic/story/narrated-chapters/v1/plan.d.ts +144 -0
- package/dist/m0saic/story/narrated-chapters/v1/plan.js +372 -0
- package/dist/m0saic/story/narrated-chapters/v1/props.d.ts +147 -0
- package/dist/m0saic/story/narrated-chapters/v1/props.js +205 -0
- package/dist/m0saic/story/narrated-chapters/v1/scenes/body.d.ts +64 -0
- package/dist/m0saic/story/narrated-chapters/v1/scenes/body.js +253 -0
- package/dist/m0saic/story/narrated-chapters/v1/scenes/card.d.ts +40 -0
- package/dist/m0saic/story/narrated-chapters/v1/scenes/card.js +201 -0
- package/dist/m0saic/story/narrated-chapters/v1/theme.d.ts +25 -0
- package/dist/m0saic/story/narrated-chapters/v1/theme.js +38 -0
- package/dist/m0saic/story/scrapbook/v1/document.d.ts +41 -0
- package/dist/m0saic/story/scrapbook/v1/document.js +124 -0
- package/dist/m0saic/story/scrapbook/v1/index.d.ts +1 -0
- package/dist/m0saic/story/scrapbook/v1/index.js +9 -0
- package/dist/m0saic/story/scrapbook/v1/page.d.ts +34 -0
- package/dist/m0saic/story/scrapbook/v1/page.js +121 -0
- package/dist/m0saic/story/scrapbook/v1/pages.d.ts +29 -0
- package/dist/m0saic/story/scrapbook/v1/pages.js +37 -0
- package/dist/m0saic/story/scrapbook/v1/pipeline.d.ts +44 -0
- package/dist/m0saic/story/scrapbook/v1/pipeline.js +130 -0
- package/dist/m0saic/story/scrapbook/v1/placeholder.d.ts +22 -0
- package/dist/m0saic/story/scrapbook/v1/placeholder.js +51 -0
- package/dist/m0saic/story/scrapbook/v1/props.d.ts +66 -0
- package/dist/m0saic/story/scrapbook/v1/props.js +80 -0
- package/dist/m0saic/story/scrapbook/v1/scrapbook.d.ts +23 -0
- package/dist/m0saic/story/scrapbook/v1/scrapbook.js +77 -0
- package/dist/m0saic/theming/index.d.ts +1 -0
- package/dist/m0saic/theming/index.js +17 -0
- package/dist/m0saic/theming/v1/brand-m-glyph.d.ts +14 -0
- package/dist/m0saic/theming/v1/brand-m-glyph.js +12 -0
- package/dist/m0saic/theming/v1/index.d.ts +2 -0
- package/dist/m0saic/theming/v1/index.js +16 -0
- package/dist/m0saic/theming/v1/theme-tokens.d.ts +71 -0
- package/dist/m0saic/theming/v1/theme-tokens.js +111 -0
- package/dist/m0saic/theming/v1/theming.d.ts +18 -0
- package/dist/m0saic/theming/v1/theming.js +94 -0
- package/dist/m0saic/theming/v1/token-sheet.d.ts +23 -0
- package/dist/m0saic/theming/v1/token-sheet.js +191 -0
- package/dist/m0saic/web/index.d.ts +1 -0
- package/dist/m0saic/web/index.js +17 -0
- package/dist/m0saic/web/page-skeleton/v1/capture/capture-snippet-source.d.ts +1 -0
- package/dist/m0saic/web/page-skeleton/v1/capture/capture-snippet-source.js +528 -0
- package/dist/m0saic/web/page-skeleton/v1/index.d.ts +1 -0
- package/dist/m0saic/web/page-skeleton/v1/index.js +5 -0
- package/dist/m0saic/web/page-skeleton/v1/layout.d.ts +107 -0
- package/dist/m0saic/web/page-skeleton/v1/layout.js +246 -0
- package/dist/m0saic/web/page-skeleton/v1/page-skeleton.d.ts +148 -0
- package/dist/m0saic/web/page-skeleton/v1/page-skeleton.js +787 -0
- package/dist/m0saic/web/page-skeleton/v1/sample-capture.d.ts +7 -0
- package/dist/m0saic/web/page-skeleton/v1/sample-capture.js +50 -0
- package/dist/m0saic/web/page-skeleton/v1/schema.d.ts +35 -0
- package/dist/m0saic/web/page-skeleton/v1/schema.js +132 -0
- package/dist/m0saic/wireframe/animated/v1/animated-wireframe.d.ts +93 -0
- package/dist/m0saic/wireframe/animated/v1/animated-wireframe.js +580 -0
- package/dist/m0saic/wireframe/animated/v1/index.d.ts +1 -0
- package/dist/m0saic/wireframe/animated/v1/index.js +5 -0
- package/dist/m0saic/wireframe/base/v1/index.d.ts +1 -0
- package/dist/m0saic/wireframe/base/v1/index.js +5 -0
- package/dist/m0saic/wireframe/base/v1/wireframe.d.ts +68 -0
- package/dist/m0saic/wireframe/base/v1/wireframe.js +372 -0
- package/dist/m0saic/wireframe/base/v2/index.d.ts +2 -0
- package/dist/m0saic/wireframe/base/v2/index.js +9 -0
- package/dist/m0saic/wireframe/base/v2/wireframe.d.ts +166 -0
- package/dist/m0saic/wireframe/base/v2/wireframe.js +1181 -0
- package/dist/m0saic/wireframe/index.d.ts +4 -0
- package/dist/m0saic/wireframe/index.js +16 -0
- package/dist/m0saic/wireframe/utils/paperGrid.d.ts +53 -0
- package/dist/m0saic/wireframe/utils/paperGrid.js +91 -0
- package/dist/m0saic/wireframe/utils/wireframeCell.d.ts +35 -0
- package/dist/m0saic/wireframe/utils/wireframeCell.js +278 -0
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +7 -0
- package/dist/repo.d.ts +11 -0
- package/dist/repo.js +39 -0
- package/dist/template-registry.d.ts +18 -0
- package/dist/template-registry.js +888 -0
- package/dist/web.d.ts +35 -0
- package/dist/web.js +88 -0
- package/dist/webTemplateIds.d.ts +6 -0
- package/dist/webTemplateIds.js +80 -0
- package/package.json +52 -0
- package/template-manifest.json +1635 -0
- package/web-template-ids.json +84 -0
package/dist/freeze.js
ADDED
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ============================================================================
|
|
4
|
+
* FREEZE GATE — every template shipped in m0saic 0.2.0 is immutable
|
|
5
|
+
* ============================================================================
|
|
6
|
+
*
|
|
7
|
+
* `packages/templates` was cut for 0.2.0 on 2026-09-17 (release/0.2.0 = dev;
|
|
8
|
+
* the manifest was minted at the cut, founder ruling: hard lock at the cut,
|
|
9
|
+
* not at the tag — `tag` reads `v0.2.0 (pending …)` until npm publish). Someone
|
|
10
|
+
* out there holds the bytes: a shared `/make?t=…` link, a committed `.mosaic`,
|
|
11
|
+
* a rendered deliverable. A frozen template must not change meaning under
|
|
12
|
+
* them. Contract: the agent contract §10. (0.1.0 was withdrawn on 2026-09-14.)
|
|
13
|
+
*
|
|
14
|
+
* THE RULE. Comments only. Any behavioural change requires a new `vN+1/`
|
|
15
|
+
* folder beside the old one. Brand-new templates are not frozen at all —
|
|
16
|
+
* freedom is the default, the freeze is earned by shipping.
|
|
17
|
+
*
|
|
18
|
+
* ⭐ WHY `_shared/` IS IN SCOPE. Dozens of template files import from one of
|
|
19
|
+
* the eight `_shared/` directories. One edit to `alpine/_shared/alpine-theme.ts`
|
|
20
|
+
* moves every alpine template without touching a single `vN/` file, so a
|
|
21
|
+
* freeze that covered only version folders would be theatre. Shared helpers
|
|
22
|
+
* are frozen on the same terms; to change one, copy it into the new version's
|
|
23
|
+
* folder.
|
|
24
|
+
*
|
|
25
|
+
* ⭐ WHY THE FROZEN SET IS AN IMPORT CLOSURE. The same argument applies to a
|
|
26
|
+
* helper that happens to live OUTSIDE a `vN/` or `_shared/` folder — a pack's
|
|
27
|
+
* `utils/`, `internal/`, or a module at the pack root. At the 0.2.0 cut seven
|
|
28
|
+
* such files shaped shipped output (two of them even REGISTER shipped web
|
|
29
|
+
* ids), unfrozen. So {@link collectFrozenFiles} seeds the set with the
|
|
30
|
+
* `vN/` + `_shared/` rule and then follows every relative import (`./`, `../`)
|
|
31
|
+
* from a frozen file to any non-test `.ts` under `src/`, transitively. What a
|
|
32
|
+
* frozen template can reach is frozen. Pack barrels stay out — nothing frozen
|
|
33
|
+
* imports them — so a new template can still register itself.
|
|
34
|
+
*
|
|
35
|
+
* ⭐ WHY THE HASH KEEPS NEWLINES (hash v2). Automatic semicolon insertion
|
|
36
|
+
* makes a line break a TOKEN in JavaScript: `return path;` and
|
|
37
|
+
* `return\n path;` are different programs (the second returns undefined).
|
|
38
|
+
* Hash v1 collapsed EVERY whitespace run — newlines included — to one space,
|
|
39
|
+
* so that edit to a frozen `_shared` helper hashed identically and slipped
|
|
40
|
+
* through (adversary 2026-09-17). v2 keeps a newline where the source had
|
|
41
|
+
* one, collapses horizontal whitespace, trims each line and folds blank lines:
|
|
42
|
+
* re-indentation and blank-line churn still hash alike; moving a token to the
|
|
43
|
+
* next line does not. The LINE TERMINATORS are the spec's four — LF, CR, and
|
|
44
|
+
* the Unicode LS (U+2028) / PS (U+2029): each ends a `//` comment, makes a
|
|
45
|
+
* block comment span lines, and is a line break for ASI, so the scanner treats
|
|
46
|
+
* them exactly like `\n` (a `// …<U+2028>evil()` would otherwise hash as a
|
|
47
|
+
* comment while Node executes `evil()`). `FREEZE_HASH_VERSION` rides in the
|
|
48
|
+
* manifest so a manifest minted under one hasher is refused by another
|
|
49
|
+
* OUTRIGHT rather than reported as "everything changed".
|
|
50
|
+
*
|
|
51
|
+
* ⭐ WHY THE MANIFEST ALSO PINS THE REGISTRY. Hashing frozen FILES cannot see
|
|
52
|
+
* a NEW file (not in the manifest) registering a shipped id with different
|
|
53
|
+
* defaults, or a pack barrel repointed at a different registering module
|
|
54
|
+
* while the original stays byte-identical. The registry now refuses a second
|
|
55
|
+
* first-party registration of an id (TEMPLATE_ID_ALREADY_REGISTERED) and
|
|
56
|
+
* records the registering module; the manifest's `registry` section pins,
|
|
57
|
+
* per shipped id, that file and a hash of the definition fields that decide
|
|
58
|
+
* shipped behaviour. check-registry Stage 0c holds the live registry to it.
|
|
59
|
+
*
|
|
60
|
+
* ⭐ WHY THE PIN ALSO COVERS THE RENDER BODY. The definition fields (defaults,
|
|
61
|
+
* schema, hints, flags) decide what `/make?t=<id>` renders — but so does the
|
|
62
|
+
* render function, and a registered template used to be mutable: an unfrozen
|
|
63
|
+
* file could reassign `getTemplate("<shipped id>").render` after registration
|
|
64
|
+
* with the file hash, the field pin and the gate all green (adversary
|
|
65
|
+
* 2026-09-17, bypass 3). The registry now deep-freezes every registration,
|
|
66
|
+
* and the pin covers the canonical source text (comments stripped, hash v2
|
|
67
|
+
* form) of the COMPILED `render` / `renderLite` / `renderCover` /
|
|
68
|
+
* `resolveOutputHints` — the dist functions the registry actually runs,
|
|
69
|
+
* reached through the wrapper link `defineMosaicTemplate` leaves
|
|
70
|
+
* (Symbol.for("m0saic.templateWrappedFrom")). Over compiled output,
|
|
71
|
+
* deliberately: it is deterministic for a build, and it means a TypeScript /
|
|
72
|
+
* tsconfig / template-utils change that alters the emitted body of a frozen
|
|
73
|
+
* render legitimately moves the pin and REQUIRES a re-mint at a release — that
|
|
74
|
+
* is the desired signal, not noise. Stage 0c says "redefined (render body)"
|
|
75
|
+
* when only the function text moved.
|
|
76
|
+
*
|
|
77
|
+
* ⭐ WHY THE WEB REGISTRY IS PINNED TOO. Mosaic Web bundles `src/web.ts`, not
|
|
78
|
+
* `src/index.ts`, and the two entries reach a template through different
|
|
79
|
+
* import paths (pack barrels, cherry-picked slugs, one `.web.ts` stand-in).
|
|
80
|
+
* A pin held only against the node registry would let a new unfrozen file
|
|
81
|
+
* register a shipped `web: true` id on the WEB side with different defaults
|
|
82
|
+
* — Stage 0 green (new file), 0b green (id still on web), 0c green (node
|
|
83
|
+
* untouched) — and every `/make?t=` link the 0.2.0 CLI prints would render
|
|
84
|
+
* something else. So a `web: true` pin is ALSO held against the registry the
|
|
85
|
+
* browser entry builds (loaded in a fresh child process, exactly as
|
|
86
|
+
* `gen-web-template-ids` does); where the web side legitimately differs from
|
|
87
|
+
* node at mint (`brand/community-m/v1` registers from `community-m.web.ts`),
|
|
88
|
+
* the pin records `webFile` / `webDefinitionSha256` beside the node values.
|
|
89
|
+
*
|
|
90
|
+
* ⭐ WHY THIS FILE HAS NO IMPORTS BEYOND NODE BUILTINS. `@m0saic/templates` is
|
|
91
|
+
* vendored into the published `m0saic` tarball, and `verifyStagedRequires` in
|
|
92
|
+
* scripts/build-publish-artifact.mjs scans every staged file for non-builtin
|
|
93
|
+
* `require(` / `from "…"`. Reaching for the TypeScript compiler here — the
|
|
94
|
+
* obvious way to strip comments — would put a `typescript` require inside the
|
|
95
|
+
* artifact and fail publish:audit, the same gate that proves `sharp` cannot
|
|
96
|
+
* reach it. Hence the hand-rolled scanner below.
|
|
97
|
+
*/
|
|
98
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
99
|
+
if (k2 === undefined) k2 = k;
|
|
100
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
101
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
102
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
103
|
+
}
|
|
104
|
+
Object.defineProperty(o, k2, desc);
|
|
105
|
+
}) : (function(o, m, k, k2) {
|
|
106
|
+
if (k2 === undefined) k2 = k;
|
|
107
|
+
o[k2] = m[k];
|
|
108
|
+
}));
|
|
109
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
110
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
111
|
+
}) : function(o, v) {
|
|
112
|
+
o["default"] = v;
|
|
113
|
+
});
|
|
114
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
115
|
+
var ownKeys = function(o) {
|
|
116
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
117
|
+
var ar = [];
|
|
118
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
119
|
+
return ar;
|
|
120
|
+
};
|
|
121
|
+
return ownKeys(o);
|
|
122
|
+
};
|
|
123
|
+
return function (mod) {
|
|
124
|
+
if (mod && mod.__esModule) return mod;
|
|
125
|
+
var result = {};
|
|
126
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
127
|
+
__setModuleDefault(result, mod);
|
|
128
|
+
return result;
|
|
129
|
+
};
|
|
130
|
+
})();
|
|
131
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
132
|
+
exports.TEMPLATE_WRAPPED_FROM_KEY = exports.RENDER_PIN_FIELDS = exports.DEFINITION_PIN_FIELDS = exports.FREEZE_HASH_VERSION = exports.FROZEN_SRC_ROOT = exports.FREEZE_MANIFEST_FILE = void 0;
|
|
133
|
+
exports.stripComments = stripComments;
|
|
134
|
+
exports.hashSource = hashSource;
|
|
135
|
+
exports.manifestHashVersion = manifestHashVersion;
|
|
136
|
+
exports.describeHashVersionMismatch = describeHashVersionMismatch;
|
|
137
|
+
exports.canonicalJson = canonicalJson;
|
|
138
|
+
exports.renderSourceText = renderSourceText;
|
|
139
|
+
exports.definitionFieldsSha256 = definitionFieldsSha256;
|
|
140
|
+
exports.definitionSha256 = definitionSha256;
|
|
141
|
+
exports.registeringSourcePath = registeringSourcePath;
|
|
142
|
+
exports.liveRegistrationOf = liveRegistrationOf;
|
|
143
|
+
exports.checkRegistryPins = checkRegistryPins;
|
|
144
|
+
exports.pinnedWebIds = pinnedWebIds;
|
|
145
|
+
exports.webRegistryPins = webRegistryPins;
|
|
146
|
+
exports.unfrozenPinFiles = unfrozenPinFiles;
|
|
147
|
+
exports.isFrozenPath = isFrozenPath;
|
|
148
|
+
exports.relativeImportSpecifiers = relativeImportSpecifiers;
|
|
149
|
+
exports.collectFrozenFiles = collectFrozenFiles;
|
|
150
|
+
exports.readFreezeManifest = readFreezeManifest;
|
|
151
|
+
exports.checkFreeze = checkFreeze;
|
|
152
|
+
exports.mintFreezeManifest = mintFreezeManifest;
|
|
153
|
+
const fs = __importStar(require("fs"));
|
|
154
|
+
const path = __importStar(require("path"));
|
|
155
|
+
const crypto_1 = require("crypto");
|
|
156
|
+
/** Committed at the package root; the diff IS the review of a freeze change. */
|
|
157
|
+
exports.FREEZE_MANIFEST_FILE = "frozen.manifest.json";
|
|
158
|
+
/** Where frozen sources live, relative to the package root. */
|
|
159
|
+
exports.FROZEN_SRC_ROOT = "src/m0saic";
|
|
160
|
+
/**
|
|
161
|
+
* Version of the canonical form `hashSource` produces. Recorded in the
|
|
162
|
+
* manifest at mint; `checkFreeze` refuses a manifest minted under a different
|
|
163
|
+
* version instead of comparing hashes that cannot match. Bump it whenever the
|
|
164
|
+
* canonical form changes (and re-mint at a release).
|
|
165
|
+
*
|
|
166
|
+
* 1 — comments stripped, every whitespace run (newlines too) → one space.
|
|
167
|
+
* 2 — newlines preserved as tokens (ASI), horizontal runs → one space,
|
|
168
|
+
* lines trimmed, blank lines folded; LF / CR / U+2028 / U+2029 are all
|
|
169
|
+
* line terminators. Manifests without the field are v1.
|
|
170
|
+
*/
|
|
171
|
+
exports.FREEZE_HASH_VERSION = 2;
|
|
172
|
+
/* ── canonical form ──────────────────────────────────────────────────────── */
|
|
173
|
+
/** ECMAScript LineTerminator: LF, CR, LS (U+2028), PS (U+2029). */
|
|
174
|
+
const LINE_TERMINATOR_RE = /[\n\r\u2028\u2029]/;
|
|
175
|
+
const isLineTerminator = (ch) => ch === "\n" || ch === "\r" || ch === "\u2028" || ch === "\u2029";
|
|
176
|
+
const REGEX_MAY_FOLLOW = new Set("(,=:[!&|?{};+-*%<>~^".split(""));
|
|
177
|
+
const REGEX_MAY_FOLLOW_WORDS = new Set([
|
|
178
|
+
"return", "typeof", "case", "in", "of", "new", "delete", "void", "throw",
|
|
179
|
+
"do", "else", "yield", "await",
|
|
180
|
+
]);
|
|
181
|
+
/**
|
|
182
|
+
* Strip comments, leaving string and template-literal interiors byte-for-byte
|
|
183
|
+
* intact.
|
|
184
|
+
*
|
|
185
|
+
* Whitespace BETWEEN tokens is collapsed, not removed — so `const a={x:1}`
|
|
186
|
+
* and `const a = { x: 1 }` hash DIFFERENTLY. That is deliberate: the rule is
|
|
187
|
+
* "comments only", and reformatting a frozen file is not a comment. Running a
|
|
188
|
+
* formatter over frozen sources SHOULD trip this gate.
|
|
189
|
+
*
|
|
190
|
+
* Newlines are kept (hash v2): a run of whitespace that contains a line break
|
|
191
|
+
* becomes exactly one `\n`, a run without one becomes one space, and a line
|
|
192
|
+
* never starts or ends with a space. So indentation and blank lines are free
|
|
193
|
+
* to change, while `return\n path;` (which ASI reads as `return;`) hashes
|
|
194
|
+
* differently from `return path;`. A block comment that spans lines counts as
|
|
195
|
+
* a line break too — the spec treats it as a LineTerminator for ASI.
|
|
196
|
+
*
|
|
197
|
+
* "Line break" means every ECMAScript LineTerminator — LF, CR, U+2028 (LS)
|
|
198
|
+
* and U+2029 (PS). The last two are invisible in most editors, and each one
|
|
199
|
+
* ENDS a `//` comment and splits a block comment across lines for ASI, so a
|
|
200
|
+
* scanner that only knew `\n` would hash `// c<U+2028>evil()` as a comment
|
|
201
|
+
* while the engine runs `evil()`. Inside string and template literals they
|
|
202
|
+
* are copied verbatim like every other character (a raw LS in a template
|
|
203
|
+
* literal is a different value from a raw LF).
|
|
204
|
+
*
|
|
205
|
+
* Returns `confident: false` when the source ends inside a string, comment or
|
|
206
|
+
* regex — i.e. the scanner lost its place. Callers MUST then fall back to
|
|
207
|
+
* hashing the raw text: being over-strict (flagging a comment edit) is a safe
|
|
208
|
+
* failure for a freeze; being under-strict (missing a code edit) is not.
|
|
209
|
+
*/
|
|
210
|
+
function stripComments(src) {
|
|
211
|
+
const out = [];
|
|
212
|
+
// Last significant CODE character emitted — decides `/` = regex vs division.
|
|
213
|
+
let lastCode = "";
|
|
214
|
+
let lastWord = "";
|
|
215
|
+
let i = 0;
|
|
216
|
+
const n = src.length;
|
|
217
|
+
// ⭐ Dedup spaces AS WE GO. A global `.replace(/ +/g," ")` at the end would
|
|
218
|
+
// also collapse whitespace INSIDE string literals, so `"a b"` and `"a b"`
|
|
219
|
+
// would hash alike — a real behavioural change going undetected.
|
|
220
|
+
// A space never follows a newline (lines are trimmed at the start) and a
|
|
221
|
+
// newline pops a trailing space (trimmed at the end); two newlines never
|
|
222
|
+
// meet (blank lines fold). Nothing precedes the first token either.
|
|
223
|
+
const pushSpace = () => {
|
|
224
|
+
const last = out[out.length - 1];
|
|
225
|
+
if (out.length && last !== " " && last !== "\n")
|
|
226
|
+
out.push(" ");
|
|
227
|
+
};
|
|
228
|
+
const pushNewline = () => {
|
|
229
|
+
if (out[out.length - 1] === " ")
|
|
230
|
+
out.pop();
|
|
231
|
+
if (out.length && out[out.length - 1] !== "\n")
|
|
232
|
+
out.push("\n");
|
|
233
|
+
};
|
|
234
|
+
const pushCode = (s) => {
|
|
235
|
+
out.push(s);
|
|
236
|
+
const t = s.trim();
|
|
237
|
+
if (t) {
|
|
238
|
+
lastCode = t[t.length - 1];
|
|
239
|
+
lastWord = /[A-Za-z_$]/.test(t[0]) ? t : "";
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
while (i < n) {
|
|
243
|
+
const c = src[i];
|
|
244
|
+
const c2 = src[i + 1];
|
|
245
|
+
// ── comments → one space, so `a/**/b` never becomes `ab` ──
|
|
246
|
+
if (c === "/" && c2 === "/") {
|
|
247
|
+
while (i < n && !isLineTerminator(src[i]))
|
|
248
|
+
i++;
|
|
249
|
+
pushSpace();
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
if (c === "/" && c2 === "*") {
|
|
253
|
+
const end = src.indexOf("*/", i + 2);
|
|
254
|
+
if (end === -1)
|
|
255
|
+
return { text: src, confident: false }; // unterminated
|
|
256
|
+
const spansLines = LINE_TERMINATOR_RE.test(src.slice(i + 2, end));
|
|
257
|
+
i = end + 2;
|
|
258
|
+
if (spansLines)
|
|
259
|
+
pushNewline();
|
|
260
|
+
else
|
|
261
|
+
pushSpace();
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
// ── strings and template literals → verbatim ──
|
|
265
|
+
if (c === '"' || c === "'" || c === "`") {
|
|
266
|
+
const start = i;
|
|
267
|
+
const quote = c;
|
|
268
|
+
i++;
|
|
269
|
+
let closed = false;
|
|
270
|
+
while (i < n) {
|
|
271
|
+
const d = src[i];
|
|
272
|
+
if (d === "\\") {
|
|
273
|
+
i += 2;
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
if (quote === "`" && d === "$" && src[i + 1] === "{") {
|
|
277
|
+
// Nested `${…}` can contain anything, including strings and braces.
|
|
278
|
+
let depth = 1;
|
|
279
|
+
i += 2;
|
|
280
|
+
while (i < n && depth > 0) {
|
|
281
|
+
const e = src[i];
|
|
282
|
+
if (e === "{")
|
|
283
|
+
depth++;
|
|
284
|
+
else if (e === "}")
|
|
285
|
+
depth--;
|
|
286
|
+
else if (e === '"' || e === "'" || e === "`") {
|
|
287
|
+
const q = e;
|
|
288
|
+
i++;
|
|
289
|
+
while (i < n && src[i] !== q) {
|
|
290
|
+
if (src[i] === "\\")
|
|
291
|
+
i++;
|
|
292
|
+
i++;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
i++;
|
|
296
|
+
}
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
if (d === quote) {
|
|
300
|
+
i++;
|
|
301
|
+
closed = true;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
i++;
|
|
305
|
+
}
|
|
306
|
+
if (!closed)
|
|
307
|
+
return { text: src, confident: false };
|
|
308
|
+
pushCode(src.slice(start, i));
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
// ── regex literal vs division ──
|
|
312
|
+
if (c === "/") {
|
|
313
|
+
const regexOk = lastCode === "" || REGEX_MAY_FOLLOW.has(lastCode) || REGEX_MAY_FOLLOW_WORDS.has(lastWord);
|
|
314
|
+
if (regexOk) {
|
|
315
|
+
const start = i;
|
|
316
|
+
i++;
|
|
317
|
+
let inClass = false;
|
|
318
|
+
let closed = false;
|
|
319
|
+
while (i < n) {
|
|
320
|
+
const d = src[i];
|
|
321
|
+
if (d === "\\") {
|
|
322
|
+
i += 2;
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
if (isLineTerminator(d))
|
|
326
|
+
break; // regexes cannot span lines — it was division
|
|
327
|
+
if (d === "[")
|
|
328
|
+
inClass = true;
|
|
329
|
+
else if (d === "]")
|
|
330
|
+
inClass = false;
|
|
331
|
+
else if (d === "/" && !inClass) {
|
|
332
|
+
i++;
|
|
333
|
+
closed = true;
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
i++;
|
|
337
|
+
}
|
|
338
|
+
if (!closed)
|
|
339
|
+
return { text: src, confident: false };
|
|
340
|
+
while (i < n && /[gimsuyd]/.test(src[i]))
|
|
341
|
+
i++; // flags
|
|
342
|
+
pushCode(src.slice(start, i));
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
pushCode(c);
|
|
346
|
+
i++;
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
// ── whitespace → one newline if the run had a line break, else one space ──
|
|
350
|
+
if (c === " " || c === "\t" || isLineTerminator(c)) {
|
|
351
|
+
let sawNewline = false;
|
|
352
|
+
while (i < n && (src[i] === " " || src[i] === "\t" || isLineTerminator(src[i]))) {
|
|
353
|
+
if (isLineTerminator(src[i]))
|
|
354
|
+
sawNewline = true;
|
|
355
|
+
i++;
|
|
356
|
+
}
|
|
357
|
+
if (sawNewline)
|
|
358
|
+
pushNewline();
|
|
359
|
+
else
|
|
360
|
+
pushSpace();
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
// Whole identifiers in one push — otherwise `lastWord` only ever holds a
|
|
364
|
+
// single character and `return /x+/` is misread as division.
|
|
365
|
+
if (/[A-Za-z_$]/.test(c)) {
|
|
366
|
+
const start = i;
|
|
367
|
+
while (i < n && /[A-Za-z0-9_$]/.test(src[i]))
|
|
368
|
+
i++;
|
|
369
|
+
pushCode(src.slice(start, i));
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
pushCode(c);
|
|
373
|
+
i++;
|
|
374
|
+
}
|
|
375
|
+
return { text: out.join("").trim(), confident: true };
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* sha256 of the canonical (comment- and format-insensitive) form.
|
|
379
|
+
*
|
|
380
|
+
* ⭐ LINE ENDINGS ARE NORMALIZED FIRST. A Windows clone (core.autocrlf=true)
|
|
381
|
+
* checks sources out as CRLF. `stripComments` collapses `\r` between tokens,
|
|
382
|
+
* but copies template-literal interiors verbatim — so every multi-line template
|
|
383
|
+
* literal would hash differently on Windows and trip the gate on untouched
|
|
384
|
+
* files. Normalizing is not a loosening: JS itself turns CRLF/CR inside a
|
|
385
|
+
* template literal into LF, so the two checkouts are the same program. Escaped
|
|
386
|
+
* `\r` (a backslash in the source) is untouched and still hashes as code.
|
|
387
|
+
*/
|
|
388
|
+
function hashSource(src) {
|
|
389
|
+
const { text, confident } = stripComments(src.replace(/\r\n?/g, "\n"));
|
|
390
|
+
return { hash: (0, crypto_1.createHash)("sha256").update(text, "utf8").digest("hex"), confident };
|
|
391
|
+
}
|
|
392
|
+
/** The hasher version a manifest was minted with (absent field = v1). */
|
|
393
|
+
function manifestHashVersion(manifest) {
|
|
394
|
+
return typeof manifest.hashVersion === "number" ? manifest.hashVersion : 1;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* One line for every gate to print when the versions differ. The fix depends
|
|
398
|
+
* on the DIRECTION: a manifest OLDER than the checker needs a release re-mint;
|
|
399
|
+
* a manifest NEWER than the checker means this clone's `dist/freeze.js` is a
|
|
400
|
+
* stale build (branch switched, never rebuilt) — rebuild, never re-mint.
|
|
401
|
+
*/
|
|
402
|
+
function describeHashVersionMismatch(manifestVersion) {
|
|
403
|
+
const head = `manifest minted with hash v${manifestVersion}, checker is v${exports.FREEZE_HASH_VERSION} — the hashes are incomparable.`;
|
|
404
|
+
if (manifestVersion > exports.FREEZE_HASH_VERSION) {
|
|
405
|
+
return `${head} The manifest is NEWER than this build of dist/freeze.js: rebuild the package ` +
|
|
406
|
+
`(npm run build --workspace packages/templates); do NOT re-mint.`;
|
|
407
|
+
}
|
|
408
|
+
return `${head} Re-mint at a release (node tools/check-registry.mjs --update-freeze); ` +
|
|
409
|
+
`this is never fixed by editing a frozen file.`;
|
|
410
|
+
}
|
|
411
|
+
/* ── registry pins ───────────────────────────────────────────────────────── */
|
|
412
|
+
/**
|
|
413
|
+
* The template DATA fields whose values decide what a shipped id RENDERS at
|
|
414
|
+
* its defaults and how a host treats it. Browse metadata (label, description,
|
|
415
|
+
* tags, preview) is left out on purpose: it changes what a gallery shows, not
|
|
416
|
+
* what `/make?t=<id>` produces — and it lives in the frozen file anyway. The
|
|
417
|
+
* render functions are pinned beside these — see {@link RENDER_PIN_FIELDS}.
|
|
418
|
+
*/
|
|
419
|
+
exports.DEFINITION_PIN_FIELDS = [
|
|
420
|
+
"version", "capabilities", "role", "primitive", "internal", "deprecated",
|
|
421
|
+
"aspectRatio", "outputHints", "lattice", "defaultFinalizeOpts", "skipAutoCompact",
|
|
422
|
+
"propsSchema", "defaultProps", "outputsSchema", "upstreamVariablesSchema",
|
|
423
|
+
"upstreamDataSchema", "sidecarsSchema", "defaultOutputs",
|
|
424
|
+
];
|
|
425
|
+
/**
|
|
426
|
+
* Deterministic JSON: object keys sorted at every depth, arrays in order,
|
|
427
|
+
* `undefined` members dropped (like JSON.stringify), functions rendered as
|
|
428
|
+
* "[Function]" (a schema's `validate` callback is code, and code is what the
|
|
429
|
+
* FILE hash guards), non-finite numbers as null.
|
|
430
|
+
*/
|
|
431
|
+
function canonicalJson(value) {
|
|
432
|
+
const walk = (v) => {
|
|
433
|
+
if (v === null || v === undefined)
|
|
434
|
+
return v;
|
|
435
|
+
if (typeof v === "function")
|
|
436
|
+
return "[Function]";
|
|
437
|
+
if (typeof v === "bigint")
|
|
438
|
+
return `${v}n`;
|
|
439
|
+
if (typeof v === "number")
|
|
440
|
+
return Number.isFinite(v) ? v : null;
|
|
441
|
+
if (typeof v !== "object")
|
|
442
|
+
return v;
|
|
443
|
+
if (Array.isArray(v))
|
|
444
|
+
return v.map((x) => (x === undefined ? null : walk(x)));
|
|
445
|
+
if (v instanceof Date)
|
|
446
|
+
return v.toISOString();
|
|
447
|
+
const o = v;
|
|
448
|
+
const out = {};
|
|
449
|
+
for (const k of Object.keys(o).sort()) {
|
|
450
|
+
const w = walk(o[k]);
|
|
451
|
+
if (w !== undefined)
|
|
452
|
+
out[k] = w;
|
|
453
|
+
}
|
|
454
|
+
return out;
|
|
455
|
+
};
|
|
456
|
+
return JSON.stringify(walk(value));
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* The template functions whose COMPILED source text the pin covers — what a
|
|
460
|
+
* shipped id actually runs, plus `resolveOutputHints`, which hosts call before
|
|
461
|
+
* rendering to seed the canvas (width / height / fps / duration / format) from
|
|
462
|
+
* the props. `renderTutorial` is left out: it is "?"-panel material, never a
|
|
463
|
+
* `/make` output.
|
|
464
|
+
*/
|
|
465
|
+
exports.RENDER_PIN_FIELDS = ["render", "renderLite", "renderCover", "resolveOutputHints"];
|
|
466
|
+
/**
|
|
467
|
+
* The link `defineMosaicTemplate` leaves on each wrapper function, pointing at
|
|
468
|
+
* the function it wraps (`TEMPLATE_WRAPPED_FROM` in template-utils). Named by
|
|
469
|
+
* `Symbol.for` so this file needs no import to follow it.
|
|
470
|
+
*/
|
|
471
|
+
exports.TEMPLATE_WRAPPED_FROM_KEY = Symbol.for("m0saic.templateWrappedFrom");
|
|
472
|
+
/**
|
|
473
|
+
* Canonical source text of a template function: the innermost function under
|
|
474
|
+
* the wrapper chain, `toString()`-ed, in the hash-v2 canonical form (comments
|
|
475
|
+
* stripped, horizontal whitespace collapsed, newlines kept) — so a comment-only
|
|
476
|
+
* edit to a frozen file moves neither the file hash nor the pin. `undefined`
|
|
477
|
+
* for a non-function (an absent `renderLite`).
|
|
478
|
+
*/
|
|
479
|
+
function renderSourceText(fn) {
|
|
480
|
+
if (typeof fn !== "function")
|
|
481
|
+
return undefined;
|
|
482
|
+
let cur = fn;
|
|
483
|
+
const seen = new Set();
|
|
484
|
+
for (;;) {
|
|
485
|
+
const inner = cur[exports.TEMPLATE_WRAPPED_FROM_KEY];
|
|
486
|
+
if (typeof inner !== "function" || seen.has(inner))
|
|
487
|
+
break;
|
|
488
|
+
seen.add(cur);
|
|
489
|
+
cur = inner;
|
|
490
|
+
}
|
|
491
|
+
return stripComments(Function.prototype.toString.call(cur).replace(/\r\n?/g, "\n")).text;
|
|
492
|
+
}
|
|
493
|
+
function pickDefinitionFields(template) {
|
|
494
|
+
const picked = {};
|
|
495
|
+
for (const f of exports.DEFINITION_PIN_FIELDS)
|
|
496
|
+
picked[f] = template[f];
|
|
497
|
+
return picked;
|
|
498
|
+
}
|
|
499
|
+
/** sha256 of the canonical JSON of a template's {@link DEFINITION_PIN_FIELDS} alone (no render bodies). */
|
|
500
|
+
function definitionFieldsSha256(template) {
|
|
501
|
+
return (0, crypto_1.createHash)("sha256").update(canonicalJson(pickDefinitionFields(template)), "utf8").digest("hex");
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* sha256 of the canonical JSON of a template's {@link DEFINITION_PIN_FIELDS}
|
|
505
|
+
* plus the canonical source text of its {@link RENDER_PIN_FIELDS} — the
|
|
506
|
+
* whole of what decides what a shipped id renders. See the header on why the
|
|
507
|
+
* render bodies are pinned over COMPILED output.
|
|
508
|
+
*/
|
|
509
|
+
function definitionSha256(template) {
|
|
510
|
+
const picked = pickDefinitionFields(template);
|
|
511
|
+
for (const f of exports.RENDER_PIN_FIELDS)
|
|
512
|
+
picked[f] = renderSourceText(template[f]);
|
|
513
|
+
return (0, crypto_1.createHash)("sha256").update(canonicalJson(picked), "utf8").digest("hex");
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Map a registering module (as `getTemplateMeta().registeredFrom` reports it:
|
|
517
|
+
* repo-relative `packages/templates/dist/…/x.js`, or absolute) to the
|
|
518
|
+
* package-relative SOURCE path the pin stores (`src/…/x.ts`). Anything not
|
|
519
|
+
* under this package's dist/src is returned as given — it still pins.
|
|
520
|
+
*/
|
|
521
|
+
function registeringSourcePath(packageRoot, registeredFrom) {
|
|
522
|
+
let rel = registeredFrom.split(path.sep).join("/");
|
|
523
|
+
if (path.isAbsolute(registeredFrom))
|
|
524
|
+
rel = path.relative(packageRoot, registeredFrom).split(path.sep).join("/");
|
|
525
|
+
else if (rel.startsWith("packages/templates/"))
|
|
526
|
+
rel = rel.slice("packages/templates/".length);
|
|
527
|
+
if (rel.startsWith("dist/") && rel.endsWith(".js"))
|
|
528
|
+
rel = `src/${rel.slice("dist/".length, -".js".length)}.ts`;
|
|
529
|
+
return rel;
|
|
530
|
+
}
|
|
531
|
+
/** Gather one live registration from a registered template and its registering source file. */
|
|
532
|
+
function liveRegistrationOf(id, file, template) {
|
|
533
|
+
return { id, file, definitionSha256: definitionSha256(template), fieldsSha256: definitionFieldsSha256(template) };
|
|
534
|
+
}
|
|
535
|
+
/** Hold the live registry to the manifest's pins (Stage 0c). */
|
|
536
|
+
function checkRegistryPins(manifest, live) {
|
|
537
|
+
var _a, _b;
|
|
538
|
+
const pins = (_a = manifest.registry) !== null && _a !== void 0 ? _a : {};
|
|
539
|
+
const byId = new Map(live.map((l) => [l.id, l]));
|
|
540
|
+
const report = {
|
|
541
|
+
ok: true, pinned: Object.keys(pins).length, held: [], missing: [], moved: [], redefined: [], unpinned: [],
|
|
542
|
+
};
|
|
543
|
+
for (const id of Object.keys(pins).sort()) {
|
|
544
|
+
const pin = pins[id];
|
|
545
|
+
const now = byId.get(id);
|
|
546
|
+
if (!now) {
|
|
547
|
+
report.missing.push({ id, file: pin.file });
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
if (now.file !== pin.file) {
|
|
551
|
+
report.moved.push({ id, pinnedFile: pin.file, file: now.file });
|
|
552
|
+
continue;
|
|
553
|
+
}
|
|
554
|
+
if (now.definitionSha256 !== pin.definitionSha256) {
|
|
555
|
+
// A pin minted before render bodies joined stored the fields-only hash
|
|
556
|
+
// as `definitionSha256`; either way, unchanged fields mean the render
|
|
557
|
+
// body is what moved.
|
|
558
|
+
const pinnedFields = (_b = pin.fieldsSha256) !== null && _b !== void 0 ? _b : pin.definitionSha256;
|
|
559
|
+
const reason = now.fieldsSha256 !== undefined && now.fieldsSha256 === pinnedFields ? "render body" : "fields";
|
|
560
|
+
report.redefined.push({ id, file: now.file, reason });
|
|
561
|
+
continue;
|
|
562
|
+
}
|
|
563
|
+
report.held.push(id);
|
|
564
|
+
}
|
|
565
|
+
for (const l of live)
|
|
566
|
+
if (!(l.id in pins))
|
|
567
|
+
report.unpinned.push(l.id);
|
|
568
|
+
report.unpinned.sort();
|
|
569
|
+
report.ok = report.missing.length === 0 && report.moved.length === 0 && report.redefined.length === 0;
|
|
570
|
+
return report;
|
|
571
|
+
}
|
|
572
|
+
/** Ids the manifest pinned as being on web at mint (sorted). */
|
|
573
|
+
function pinnedWebIds(manifest) {
|
|
574
|
+
var _a;
|
|
575
|
+
const pins = (_a = manifest.registry) !== null && _a !== void 0 ? _a : {};
|
|
576
|
+
return Object.keys(pins).filter((id) => pins[id].web === true).sort();
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* The `web: true` pins as the BROWSER registry must satisfy them: the web
|
|
580
|
+
* values where the mint recorded a divergence, the node values otherwise.
|
|
581
|
+
* Feed the result to {@link checkRegistryPins} together with the live
|
|
582
|
+
* registrations of `src/web.ts` (gathered in a fresh process — see
|
|
583
|
+
* check-registry Stage 0c). Ids the web entry added since the mint show up
|
|
584
|
+
* as `unpinned` there: new work.
|
|
585
|
+
*/
|
|
586
|
+
function webRegistryPins(manifest) {
|
|
587
|
+
var _a, _b, _c, _d;
|
|
588
|
+
const pins = (_a = manifest.registry) !== null && _a !== void 0 ? _a : {};
|
|
589
|
+
const web = {};
|
|
590
|
+
for (const id of pinnedWebIds(manifest)) {
|
|
591
|
+
const p = pins[id];
|
|
592
|
+
const pin = { file: (_b = p.webFile) !== null && _b !== void 0 ? _b : p.file, definitionSha256: (_c = p.webDefinitionSha256) !== null && _c !== void 0 ? _c : p.definitionSha256 };
|
|
593
|
+
const fields = (_d = p.webFieldsSha256) !== null && _d !== void 0 ? _d : (p.webDefinitionSha256 === undefined ? p.fieldsSha256 : undefined);
|
|
594
|
+
if (fields !== undefined)
|
|
595
|
+
pin.fieldsSha256 = fields;
|
|
596
|
+
web[id] = pin;
|
|
597
|
+
}
|
|
598
|
+
return { registry: web };
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Pins whose registering file is NOT itself in `files`. A pin over an unhashed
|
|
602
|
+
* module holds the definition but not the code it runs — at the 0.2.0 cut two
|
|
603
|
+
* shipped web ids registered from helpers outside every `vN/` folder. The
|
|
604
|
+
* import closure freezes them now; this is the invariant that keeps it so.
|
|
605
|
+
* `(unknown)` provenance (no usable stack frame) counts as unfrozen.
|
|
606
|
+
*/
|
|
607
|
+
function unfrozenPinFiles(manifest) {
|
|
608
|
+
var _a;
|
|
609
|
+
const out = [];
|
|
610
|
+
const pins = (_a = manifest.registry) !== null && _a !== void 0 ? _a : {};
|
|
611
|
+
for (const id of Object.keys(pins).sort()) {
|
|
612
|
+
const p = pins[id];
|
|
613
|
+
for (const file of [p.file, p.webFile]) {
|
|
614
|
+
if (file !== undefined && manifest.files[file] === undefined)
|
|
615
|
+
out.push({ id, file });
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
return out;
|
|
619
|
+
}
|
|
620
|
+
/* ── which files are frozen ──────────────────────────────────────────────── */
|
|
621
|
+
/**
|
|
622
|
+
* A path is a frozen SEED when it is a non-test `.ts` under `src/m0saic/` that
|
|
623
|
+
* sits in a version folder (`…/v3/…`) or a shared folder (`…/_shared/…`).
|
|
624
|
+
* The full frozen set is the relative-import closure of the seeds — see
|
|
625
|
+
* {@link collectFrozenFiles}; a file reached that way is frozen although this
|
|
626
|
+
* predicate says false for it, so the gate and the hook ask the MANIFEST
|
|
627
|
+
* (`files[rel] !== undefined`), never this predicate alone, whether a path is
|
|
628
|
+
* held. This predicate decides what is NEW WORK: a seed-shaped path absent
|
|
629
|
+
* from the manifest.
|
|
630
|
+
*
|
|
631
|
+
* Deliberately NOT seeds: `*.test.ts` (adding tests to a frozen template is
|
|
632
|
+
* the one way to improve it without moving it), `*.d.ts`, and the PACK-level
|
|
633
|
+
* barrels (`src/m0saic/<pack>/index.ts`) — a new template has to register
|
|
634
|
+
* itself. Barrels inside a version folder ARE frozen. (`gen-*.ts` tooling
|
|
635
|
+
* inside a version folder is a seed like any other file there.)
|
|
636
|
+
*/
|
|
637
|
+
function isFrozenPath(relPath) {
|
|
638
|
+
const p = relPath.split(path.sep).join("/");
|
|
639
|
+
if (!p.startsWith(`${exports.FROZEN_SRC_ROOT}/`))
|
|
640
|
+
return false;
|
|
641
|
+
if (!isFreezableSource(p))
|
|
642
|
+
return false;
|
|
643
|
+
// NOTE: no special case for `index.ts`. A pack-level barrel
|
|
644
|
+
// (`src/m0saic/alpine/index.ts`) is already excluded by the rule below — it
|
|
645
|
+
// sits in neither a version nor a shared folder. A barrel INSIDE a frozen
|
|
646
|
+
// version (`…/v1/index.ts`, 79 of them) IS frozen: repointing
|
|
647
|
+
// `export { default } from "./theming"` at another module, or dropping an
|
|
648
|
+
// export, changes shipped behaviour just as surely as editing the logic.
|
|
649
|
+
const segments = p.split("/");
|
|
650
|
+
return segments.some((s) => /^v\d+$/.test(s) || s === "_shared");
|
|
651
|
+
}
|
|
652
|
+
/** Non-test, non-declaration TypeScript source — the only thing the freeze hashes. */
|
|
653
|
+
function isFreezableSource(p) {
|
|
654
|
+
return p.endsWith(".ts") && !p.endsWith(".test.ts") && !p.endsWith(".d.ts");
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Relative module specifiers (`./x`, `../x`) a source file imports, read off
|
|
658
|
+
* its comment-stripped text so a commented-out import is not a dependency.
|
|
659
|
+
* Covers `import … from`, bare `import "…"`, `export … from`, `import("…")`
|
|
660
|
+
* and `require("…")`. Package imports (`@m0saic/…`) are not returned — those
|
|
661
|
+
* are Tier 2 by the launch plan, vendored beside this package.
|
|
662
|
+
*/
|
|
663
|
+
function relativeImportSpecifiers(src) {
|
|
664
|
+
const { text } = stripComments(src.replace(/\r\n?/g, "\n"));
|
|
665
|
+
const re = /(?:\bfrom\s*|\bimport\s*\(?\s*|\brequire\s*\(\s*)["']([^"']+)["']/g;
|
|
666
|
+
const out = [];
|
|
667
|
+
let m;
|
|
668
|
+
while ((m = re.exec(text))) {
|
|
669
|
+
const spec = m[1];
|
|
670
|
+
if (spec.startsWith("./") || spec.startsWith("../"))
|
|
671
|
+
out.push(spec);
|
|
672
|
+
}
|
|
673
|
+
return out;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Resolve one relative specifier from `fromAbs` to a freezable `.ts` file
|
|
677
|
+
* under `<packageRoot>/src`, TypeScript-style (`x` → `x.ts` | `x/index.ts`;
|
|
678
|
+
* a `.js` specifier maps to its `.ts` source). Returns the package-relative
|
|
679
|
+
* path, or undefined for anything else (an asset, a test, a path outside
|
|
680
|
+
* `src/`, a module that does not exist).
|
|
681
|
+
*/
|
|
682
|
+
function resolveFrozenImport(packageRoot, fromAbs, spec) {
|
|
683
|
+
const srcRoot = path.join(packageRoot, "src");
|
|
684
|
+
const target = path.resolve(path.dirname(fromAbs), spec);
|
|
685
|
+
const candidates = target.endsWith(".ts")
|
|
686
|
+
? [target]
|
|
687
|
+
: target.endsWith(".js")
|
|
688
|
+
? [`${target.slice(0, -".js".length)}.ts`]
|
|
689
|
+
: [`${target}.ts`, path.join(target, "index.ts")];
|
|
690
|
+
for (const abs of candidates) {
|
|
691
|
+
if (!abs.startsWith(srcRoot + path.sep))
|
|
692
|
+
continue;
|
|
693
|
+
let isFile = false;
|
|
694
|
+
try {
|
|
695
|
+
isFile = fs.statSync(abs).isFile();
|
|
696
|
+
}
|
|
697
|
+
catch { /* not there */ }
|
|
698
|
+
if (!isFile)
|
|
699
|
+
continue;
|
|
700
|
+
const rel = path.relative(packageRoot, abs).split(path.sep).join("/");
|
|
701
|
+
return isFreezableSource(rel) ? rel : undefined;
|
|
702
|
+
}
|
|
703
|
+
return undefined;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Every currently-frozen file, package-relative and sorted: the
|
|
707
|
+
* {@link isFrozenPath} seeds plus every freezable `.ts` under `src/` they
|
|
708
|
+
* reach through relative imports, transitively. What a frozen template can
|
|
709
|
+
* run is frozen — a helper in `utils/` or at a pack root is shipped behaviour
|
|
710
|
+
* exactly as a `_shared/` one is (see the header).
|
|
711
|
+
*/
|
|
712
|
+
function collectFrozenFiles(packageRoot) {
|
|
713
|
+
const seeds = [];
|
|
714
|
+
const walk = (dir) => {
|
|
715
|
+
let entries;
|
|
716
|
+
try {
|
|
717
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
718
|
+
}
|
|
719
|
+
catch {
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
for (const e of entries) {
|
|
723
|
+
const abs = path.join(dir, e.name);
|
|
724
|
+
if (e.isDirectory()) {
|
|
725
|
+
walk(abs);
|
|
726
|
+
continue;
|
|
727
|
+
}
|
|
728
|
+
const rel = path.relative(packageRoot, abs).split(path.sep).join("/");
|
|
729
|
+
if (isFrozenPath(rel))
|
|
730
|
+
seeds.push(rel);
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
walk(path.join(packageRoot, exports.FROZEN_SRC_ROOT));
|
|
734
|
+
const frozen = new Set(seeds);
|
|
735
|
+
const queue = [...seeds];
|
|
736
|
+
while (queue.length) {
|
|
737
|
+
const rel = queue.pop();
|
|
738
|
+
const abs = path.join(packageRoot, rel);
|
|
739
|
+
let src;
|
|
740
|
+
try {
|
|
741
|
+
src = fs.readFileSync(abs, "utf8");
|
|
742
|
+
}
|
|
743
|
+
catch {
|
|
744
|
+
continue;
|
|
745
|
+
}
|
|
746
|
+
for (const spec of relativeImportSpecifiers(src)) {
|
|
747
|
+
const dep = resolveFrozenImport(packageRoot, abs, spec);
|
|
748
|
+
if (dep !== undefined && !frozen.has(dep)) {
|
|
749
|
+
frozen.add(dep);
|
|
750
|
+
queue.push(dep);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
return [...frozen].sort();
|
|
755
|
+
}
|
|
756
|
+
/* ── the gate ────────────────────────────────────────────────────────────── */
|
|
757
|
+
function readFreezeManifest(packageRoot) {
|
|
758
|
+
const p = path.join(packageRoot, exports.FREEZE_MANIFEST_FILE);
|
|
759
|
+
if (!fs.existsSync(p))
|
|
760
|
+
return null;
|
|
761
|
+
return JSON.parse(fs.readFileSync(p, "utf8"));
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Compare the working tree against the committed manifest.
|
|
765
|
+
* `changed` and `deleted` are build errors; `unfrozen` is new work.
|
|
766
|
+
*/
|
|
767
|
+
function checkFreeze(packageRoot, manifest) {
|
|
768
|
+
const report = {
|
|
769
|
+
ok: true, unchanged: [], changed: [], deleted: [], unfrozen: [], lowConfidence: [],
|
|
770
|
+
};
|
|
771
|
+
const minted = manifestHashVersion(manifest);
|
|
772
|
+
if (minted !== exports.FREEZE_HASH_VERSION) {
|
|
773
|
+
report.ok = false;
|
|
774
|
+
report.hashVersionMismatch = { manifest: minted, checker: exports.FREEZE_HASH_VERSION, message: describeHashVersionMismatch(minted) };
|
|
775
|
+
return report;
|
|
776
|
+
}
|
|
777
|
+
// The manifest is the law: a file it lists is held while it exists on disk,
|
|
778
|
+
// even if it fell out of the import closure (which only happens when a
|
|
779
|
+
// frozen importer changed — itself a failure). The closure adds new work.
|
|
780
|
+
const present = new Set(collectFrozenFiles(packageRoot));
|
|
781
|
+
for (const rel of Object.keys(manifest.files)) {
|
|
782
|
+
if (!present.has(rel) && fs.existsSync(path.join(packageRoot, rel)))
|
|
783
|
+
present.add(rel);
|
|
784
|
+
}
|
|
785
|
+
for (const rel of [...present].sort()) {
|
|
786
|
+
const expected = manifest.files[rel];
|
|
787
|
+
if (expected === undefined) {
|
|
788
|
+
report.unfrozen.push(rel);
|
|
789
|
+
continue;
|
|
790
|
+
}
|
|
791
|
+
const { hash, confident } = hashSource(fs.readFileSync(path.join(packageRoot, rel), "utf8"));
|
|
792
|
+
if (!confident)
|
|
793
|
+
report.lowConfidence.push(rel);
|
|
794
|
+
if (hash === expected)
|
|
795
|
+
report.unchanged.push(rel);
|
|
796
|
+
else
|
|
797
|
+
report.changed.push(rel);
|
|
798
|
+
}
|
|
799
|
+
for (const rel of Object.keys(manifest.files)) {
|
|
800
|
+
if (!present.has(rel))
|
|
801
|
+
report.deleted.push(rel);
|
|
802
|
+
}
|
|
803
|
+
report.ok = report.changed.length === 0 && report.deleted.length === 0;
|
|
804
|
+
return report;
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Mint a manifest from the current tree — the deliberate act at a release.
|
|
808
|
+
* `registry` is every live registration of the NODE entry (the caller loads
|
|
809
|
+
* the registry; this file stays free of it), which ids the browser entry
|
|
810
|
+
* registered, and — when given — the browser entry's own live registrations
|
|
811
|
+
* (`webLive`, gathered in a fresh process): a `web: true` pin records
|
|
812
|
+
* `webFile` / `webDefinitionSha256` / `webFieldsSha256` only where the web
|
|
813
|
+
* side differs from node.
|
|
814
|
+
*
|
|
815
|
+
* Throws when a pin would name a file the manifest does not hash (an
|
|
816
|
+
* `(unknown)` provenance, or a registering module outside the frozen set):
|
|
817
|
+
* a pin over unhashed code is not a lock, and a mint must never produce one.
|
|
818
|
+
*/
|
|
819
|
+
function mintFreezeManifest(packageRoot, meta, registry) {
|
|
820
|
+
var _a, _b;
|
|
821
|
+
const files = {};
|
|
822
|
+
for (const rel of collectFrozenFiles(packageRoot)) {
|
|
823
|
+
files[rel] = hashSource(fs.readFileSync(path.join(packageRoot, rel), "utf8")).hash;
|
|
824
|
+
}
|
|
825
|
+
const manifest = { ...meta, hashVersion: exports.FREEZE_HASH_VERSION, files };
|
|
826
|
+
if (registry) {
|
|
827
|
+
const web = new Set((_a = registry.webIds) !== null && _a !== void 0 ? _a : []);
|
|
828
|
+
const webById = new Map(((_b = registry.webLive) !== null && _b !== void 0 ? _b : []).map((l) => [l.id, l]));
|
|
829
|
+
const pins = {};
|
|
830
|
+
for (const l of [...registry.live].sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0))) {
|
|
831
|
+
const pin = { file: l.file, definitionSha256: l.definitionSha256 };
|
|
832
|
+
if (l.fieldsSha256 !== undefined)
|
|
833
|
+
pin.fieldsSha256 = l.fieldsSha256;
|
|
834
|
+
if (web.has(l.id)) {
|
|
835
|
+
pin.web = true;
|
|
836
|
+
const w = webById.get(l.id);
|
|
837
|
+
if (w && (w.file !== l.file || w.definitionSha256 !== l.definitionSha256)) {
|
|
838
|
+
pin.webFile = w.file;
|
|
839
|
+
pin.webDefinitionSha256 = w.definitionSha256;
|
|
840
|
+
if (w.fieldsSha256 !== undefined)
|
|
841
|
+
pin.webFieldsSha256 = w.fieldsSha256;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
pins[l.id] = pin;
|
|
845
|
+
}
|
|
846
|
+
manifest.registry = pins;
|
|
847
|
+
const unfrozen = unfrozenPinFiles(manifest);
|
|
848
|
+
if (unfrozen.length) {
|
|
849
|
+
throw new Error(`refusing to mint: ${unfrozen.length} registry pin(s) name a file the manifest does not hash — ` +
|
|
850
|
+
unfrozen.map((u) => `${u.id} ← ${u.file}`).join("; ") +
|
|
851
|
+
`. A pin over unhashed code is not a lock; the frozen set is the import closure of every vN/ and _shared/ file, so this means the registering module was not reached from a frozen file (or its provenance is unknown).`);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
return manifest;
|
|
855
|
+
}
|