@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
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WireframeV2 = exports.WireframeUnlabeledCells = exports.WireframeNullFrames = exports.WireframeBackground = exports.WireframeLabelOverflow = exports.WireframeLabelContent = void 0;
|
|
4
|
+
const types_1 = require("@m0saic/types");
|
|
5
|
+
const dsl_stdlib_1 = require("@m0saic/dsl-stdlib");
|
|
6
|
+
const template_utils_1 = require("@m0saic/template-utils");
|
|
7
|
+
const wireframe_1 = require("../v1/wireframe");
|
|
8
|
+
const dsl_1 = require("@m0saic/dsl");
|
|
9
|
+
const paperGrid_1 = require("../../utils/paperGrid");
|
|
10
|
+
/**
|
|
11
|
+
* Wireframe v2 — same look as v1, rendered in a single pass.
|
|
12
|
+
*
|
|
13
|
+
* # Why v2 exists (living documentation)
|
|
14
|
+
*
|
|
15
|
+
* v1 builds the wireframe out of N nested `@m0saic/wireframe/cell/v1`
|
|
16
|
+
* documents — one per frame. The engine renders each nested mosaic as its own
|
|
17
|
+
* ffmpeg command, and in **debug mode** each of those commands runs a
|
|
18
|
+
* `drawtext` filter (cold ffmpeg spawn + font init). For a 22-frame layout
|
|
19
|
+
* that's ~23 serial ffmpeg processes; render time grows linearly with the
|
|
20
|
+
* frame count (a high-fan-out layout is brutal).
|
|
21
|
+
*
|
|
22
|
+
* v2 collapses the whole thing into ONE flat document:
|
|
23
|
+
* - Every m0 frame is a real source already, so each frame becomes a single
|
|
24
|
+
* {@link makeColorTile} (lavfi `color=`) — these inline into one
|
|
25
|
+
* filtergraph; no nested documents, no per-cell commands.
|
|
26
|
+
* - In debug mode the per-cell text + border are baked into that tile's
|
|
27
|
+
* **inline-mask** as glyph OUTLINES via {@link textToPath} — so a single
|
|
28
|
+
* flat ink color shows through as the index / dimensions / label and the
|
|
29
|
+
* frame outline. Zero `drawtext` passes. The masks for the whole document
|
|
30
|
+
* rasterize in one batched child process.
|
|
31
|
+
*
|
|
32
|
+
* Net effect: the render is one ffmpeg command + one mask raster, flat in the
|
|
33
|
+
* frame count, instead of N serial spawns. Glyphs are vector outlines from a
|
|
34
|
+
* bundled font, so output is deterministic across platforms (no fontconfig).
|
|
35
|
+
*/
|
|
36
|
+
// ── Label content / overflow API (mirrors the editor's view-frame) ──
|
|
37
|
+
//
|
|
38
|
+
// Two orthogonal knobs, both string enums so they read nicely in the UI:
|
|
39
|
+
//
|
|
40
|
+
// 1. labelContent — the *most* you want to show in a tile, as a cumulative
|
|
41
|
+
// ladder. Each level includes the ones below it:
|
|
42
|
+
// none → number → dimensions (number + W×H) → aspect (+ ratio).
|
|
43
|
+
// 2. labelOverflow — what to do when the requested content can't fit a tile.
|
|
44
|
+
// Tiles in a real layout vary wildly in size, so a fixed request can't
|
|
45
|
+
// always be honoured. This says how to back off (see the enum docs).
|
|
46
|
+
//
|
|
47
|
+
// The fit math mirrors `apps/mosaic/web/src/components/viewframe/FrameInfo.tsx`
|
|
48
|
+
// (the editor's per-tile annotation), so the wireframe export looks like what
|
|
49
|
+
// you see while editing: a centered vertical stack — number (primary), W×H
|
|
50
|
+
// (secondary), ratio (tertiary) — that grows the font when fewer items show.
|
|
51
|
+
/** What to show in a tile. Cumulative: each value includes the ones above it. */
|
|
52
|
+
var WireframeLabelContent;
|
|
53
|
+
(function (WireframeLabelContent) {
|
|
54
|
+
/** Draw nothing inside the tile (just the frame outline). */
|
|
55
|
+
WireframeLabelContent["None"] = "none";
|
|
56
|
+
/** The tile's 1-based number only. */
|
|
57
|
+
WireframeLabelContent["Number"] = "number";
|
|
58
|
+
/** Number + pixel dimensions (W × H). */
|
|
59
|
+
WireframeLabelContent["Dimensions"] = "dimensions";
|
|
60
|
+
/** Number + dimensions + aspect ratio (e.g. `16:9 · 1.78`). */
|
|
61
|
+
WireframeLabelContent["AspectRatio"] = "aspect";
|
|
62
|
+
})(WireframeLabelContent || (exports.WireframeLabelContent = WireframeLabelContent = {}));
|
|
63
|
+
/** How to back off when {@link WireframeLabelContent} won't fit a tile. */
|
|
64
|
+
var WireframeLabelOverflow;
|
|
65
|
+
(function (WireframeLabelOverflow) {
|
|
66
|
+
/** All-or-nothing — show the full requested content, or leave the tile blank. */
|
|
67
|
+
WireframeLabelOverflow["Hide"] = "hide";
|
|
68
|
+
/** Drop the richest line at a time (aspect → dimensions → number) until what
|
|
69
|
+
* remains fits. Small tiles still show at least their number when it fits. */
|
|
70
|
+
WireframeLabelOverflow["Degrade"] = "degrade";
|
|
71
|
+
/** Show the full content if it fits, otherwise fall straight back to just the
|
|
72
|
+
* number (skipping the in-between levels) — the smallest always-useful label. */
|
|
73
|
+
WireframeLabelOverflow["NumberFloor"] = "number-floor";
|
|
74
|
+
})(WireframeLabelOverflow || (exports.WireframeLabelOverflow = WireframeLabelOverflow = {}));
|
|
75
|
+
/** Canvas backing for the wireframe (debug mode). */
|
|
76
|
+
var WireframeBackground;
|
|
77
|
+
(function (WireframeBackground) {
|
|
78
|
+
/** No fill — the canvas and every null / empty region stay transparent, so
|
|
79
|
+
* the wireframe is just lines + labels and composites over anything. */
|
|
80
|
+
WireframeBackground["Transparent"] = "transparent";
|
|
81
|
+
/** Bake an opaque white fill behind everything — null / empty regions read
|
|
82
|
+
* as solid white instead of transparent. */
|
|
83
|
+
WireframeBackground["White"] = "white";
|
|
84
|
+
})(WireframeBackground || (exports.WireframeBackground = WireframeBackground = {}));
|
|
85
|
+
/**
|
|
86
|
+
* Dev diagram knob (gate 29, founder). The final composite is every overlay
|
|
87
|
+
* LAYER stacked; "show" explodes it — an emit:multi pipeline with ONE still
|
|
88
|
+
* per overlay depth, each printing that depth's cells plus its `-` null
|
|
89
|
+
* holes (which the engine never paints) as dashed, muted cells.
|
|
90
|
+
*/
|
|
91
|
+
var WireframeNullFrames;
|
|
92
|
+
(function (WireframeNullFrames) {
|
|
93
|
+
/** Normal single composite, null tiles skipped (the shipped default). */
|
|
94
|
+
WireframeNullFrames["Hide"] = "hide";
|
|
95
|
+
/** Layer explode: one PNG per overlay depth, null tiles drawn dashed + muted. */
|
|
96
|
+
WireframeNullFrames["Show"] = "show";
|
|
97
|
+
})(WireframeNullFrames || (exports.WireframeNullFrames = WireframeNullFrames = {}));
|
|
98
|
+
/** What an UNLABELED cell shows once some cells carry custom labels. */
|
|
99
|
+
var WireframeUnlabeledCells;
|
|
100
|
+
(function (WireframeUnlabeledCells) {
|
|
101
|
+
/** Keep the debug marks (number / dims / aspect) — label a few frames, the
|
|
102
|
+
* rest still read their geometry. The default. */
|
|
103
|
+
WireframeUnlabeledCells["Marks"] = "marks";
|
|
104
|
+
/** Leave it blank — labels are the only text on the board (the pre-gate-30
|
|
105
|
+
* behaviour; opt-in). */
|
|
106
|
+
WireframeUnlabeledCells["Empty"] = "empty";
|
|
107
|
+
})(WireframeUnlabeledCells || (exports.WireframeUnlabeledCells = WireframeUnlabeledCells = {}));
|
|
108
|
+
const DEFAULT_UNLABELED_CELLS = "marks";
|
|
109
|
+
/** Per-cell label decision shared by the composite and the layer-explode
|
|
110
|
+
* paths: a non-blank custom label wins; otherwise the cell falls back to its
|
|
111
|
+
* debug marks (`undefined`) unless `unlabeledCells: "empty"` asks for a blank
|
|
112
|
+
* cell (`""`) while ANY custom label is in play. */
|
|
113
|
+
function cellLabelFor(labels, order, unlabeledCells) {
|
|
114
|
+
var _a;
|
|
115
|
+
const custom = labels === null || labels === void 0 ? void 0 : labels[order - 1];
|
|
116
|
+
if (custom && custom.trim())
|
|
117
|
+
return custom;
|
|
118
|
+
const anyCustom = ((_a = labels === null || labels === void 0 ? void 0 : labels.length) !== null && _a !== void 0 ? _a : 0) > 0;
|
|
119
|
+
return anyCustom && unlabeledCells === "empty" ? "" : undefined;
|
|
120
|
+
}
|
|
121
|
+
// Default matches the wireframe's historical behaviour — number + dimensions,
|
|
122
|
+
// degrading to just the number on tiles too small for both. Aspect ratio is
|
|
123
|
+
// opt-in via `labelContent: "aspect"`.
|
|
124
|
+
const DEFAULT_LABEL_CONTENT = "dimensions";
|
|
125
|
+
const DEFAULT_LABEL_OVERFLOW = "degrade";
|
|
126
|
+
// White by default (founder ruling, gate 29 take 4: "transparent bg is poor
|
|
127
|
+
// when the background is also black" — black ink on the editor's dark
|
|
128
|
+
// stage read as an empty canvas). Opt into a transparent canvas — lines +
|
|
129
|
+
// labels that composite over anything, null regions empty — with
|
|
130
|
+
// `background: "transparent"` (the Layout page's trace styles do).
|
|
131
|
+
const DEFAULT_BACKGROUND = "white";
|
|
132
|
+
const DEFAULT_NULL_FRAMES = "hide";
|
|
133
|
+
const DEFAULT_NULL_LABEL = "null";
|
|
134
|
+
// Null-frame treatment: muted ink + a dashed ring so a hole never reads as a
|
|
135
|
+
// painted cell. Dash/gap scale with the pen so the rhythm holds at any size.
|
|
136
|
+
const NULL_FRAME_ALPHA = 0.55;
|
|
137
|
+
// Each layer still is a 1s image step (emit:multi needs a step length).
|
|
138
|
+
const LAYER_STILL_MS = 1000;
|
|
139
|
+
const NULL_DASH_PER_PEN = 6;
|
|
140
|
+
// Default layout: a basic 2×2 grid (founder ruling, gate 29 take 3 — a dev
|
|
141
|
+
// template gets no cover; the default face is a real grid, not a bare cell).
|
|
142
|
+
const DEFAULT_LAYOUT = "2(2[1,1],2[1,1])";
|
|
143
|
+
// Sub-readable glyphs are noise in a baked export — a candidate that would draw
|
|
144
|
+
// any line below this px size is treated as "doesn't fit" and backs off.
|
|
145
|
+
const MIN_LEGIBLE_PX = 9;
|
|
146
|
+
// Debug frame outlines use ONE uniform pen width across every tile (a wireframe
|
|
147
|
+
// wants a single line weight, not a border that thins out on smaller tiles).
|
|
148
|
+
// The weight is a fraction of the CANVAS's smaller side, so it scales with
|
|
149
|
+
// render resolution but stays identical from tile to tile. 0.0015 ≈ 3px at
|
|
150
|
+
// 2160p / 2px at 1080p, matching the thumb presets' line weight.
|
|
151
|
+
const DEBUG_BORDER_FRAC = 0.0015;
|
|
152
|
+
// resolveTheme's debug *baseline* borderWidthFrac (0.005) is a legacy
|
|
153
|
+
// tile-relative value — far too heavy read canvas-relative — so we ignore it and
|
|
154
|
+
// only honour preset/explicit fracs at or below this sane canvas-relative cap.
|
|
155
|
+
const MAX_CANVAS_BORDER_FRAC = 0.003;
|
|
156
|
+
// FrameInfo line-size ratios (kept identical so the proportions match the
|
|
157
|
+
// editor): the number is the primary, dimensions ride at 65%, aspect at 55%,
|
|
158
|
+
// with a gap of 25% of the number size between stacked lines.
|
|
159
|
+
const SECONDARY_RATIO = 0.65; // dimensions size = numPx * this
|
|
160
|
+
const TERTIARY_RATIO = 0.55; // aspect size = numPx * this
|
|
161
|
+
const STACK_GAP_RATIO = 0.25; // gap between lines = numPx * this
|
|
162
|
+
// Fraction of tile HEIGHT the stack aims to fill. Unlike FrameInfo (a subtle
|
|
163
|
+
// DOM overlay sized off a screen-space constant), a baked wireframe wants the
|
|
164
|
+
// label to read at a glance, so we size to fill the tile and then shrink to fit
|
|
165
|
+
// width. Fewer requested lines ⇒ the number divides the fill among fewer items
|
|
166
|
+
// ⇒ it grows — the same "boost when less is shown" behaviour FrameInfo gets
|
|
167
|
+
// from its numBoost constant.
|
|
168
|
+
const STACK_FILL_FRAC = 0.6;
|
|
169
|
+
// Absolute ceiling so huge canvases don't produce monster glyphs.
|
|
170
|
+
const MAX_NUM_PX = 240;
|
|
171
|
+
function gcd(a, b) {
|
|
172
|
+
a = Math.abs(Math.round(a));
|
|
173
|
+
b = Math.abs(Math.round(b));
|
|
174
|
+
while (b) {
|
|
175
|
+
[a, b] = [b, a % b];
|
|
176
|
+
}
|
|
177
|
+
return a || 1;
|
|
178
|
+
}
|
|
179
|
+
function simplifyRatio(w, h) {
|
|
180
|
+
const g = gcd(w, h);
|
|
181
|
+
return [Math.round(w) / g, Math.round(h) / g];
|
|
182
|
+
}
|
|
183
|
+
function fmtDec(n) {
|
|
184
|
+
return parseFloat(n.toFixed(2)).toString();
|
|
185
|
+
}
|
|
186
|
+
/** Numeric rung for a content level (0 = none). Higher = more detail. */
|
|
187
|
+
function contentLevel(c) {
|
|
188
|
+
return c === "aspect" ? 3 : c === "dimensions" ? 2 : c === "number" ? 1 : 0;
|
|
189
|
+
}
|
|
190
|
+
/** The lines a given level wants, richest item last. `order` is 1-based. */
|
|
191
|
+
function linesForLevel(level, order, cellW, cellH) {
|
|
192
|
+
const out = [];
|
|
193
|
+
if (level >= 1)
|
|
194
|
+
out.push({ key: "num", text: String(order) });
|
|
195
|
+
if (level >= 2)
|
|
196
|
+
out.push({ key: "dims", text: `${cellW} × ${cellH}` });
|
|
197
|
+
if (level >= 3) {
|
|
198
|
+
const [rw, rh] = simplifyRatio(cellW, cellH);
|
|
199
|
+
out.push({ key: "aspect", text: `${rw}:${rh} · ${fmtDec(cellW / cellH)}` });
|
|
200
|
+
}
|
|
201
|
+
return out;
|
|
202
|
+
}
|
|
203
|
+
/** Ladder of content levels to try, richest first, per overflow policy. */
|
|
204
|
+
function candidateLevels(target, overflow) {
|
|
205
|
+
if (target <= 0)
|
|
206
|
+
return [];
|
|
207
|
+
if (overflow === "hide")
|
|
208
|
+
return [target];
|
|
209
|
+
if (overflow === "number-floor")
|
|
210
|
+
return target > 1 ? [target, 1] : [1];
|
|
211
|
+
// degrade: every rung from target down to 1
|
|
212
|
+
const out = [];
|
|
213
|
+
for (let l = target; l >= 1; l--)
|
|
214
|
+
out.push(l);
|
|
215
|
+
return out;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Try to fit `items` in a `cellW`×`cellH` tile using FrameInfo's sizing math.
|
|
219
|
+
* Returns sized lines (+ stacking gap/pad) if every line is legible and the
|
|
220
|
+
* stack fits both axes, else `null` so the caller can back off to fewer lines.
|
|
221
|
+
*/
|
|
222
|
+
function fitLines(items, cellW, cellH, minTextSize) {
|
|
223
|
+
const count = items.length;
|
|
224
|
+
if (count === 0)
|
|
225
|
+
return null;
|
|
226
|
+
const minSide = Math.min(cellW, cellH);
|
|
227
|
+
const pad = Math.max(4, Math.round(minSide * 0.04));
|
|
228
|
+
const availW = cellW - 2 * pad;
|
|
229
|
+
if (availW <= 0)
|
|
230
|
+
return null;
|
|
231
|
+
const relOf = (key) => key === "num" ? 1.0 : key === "dims" ? SECONDARY_RATIO : TERTIARY_RATIO;
|
|
232
|
+
// 1) Size to fill the tile height. The number divides the fill budget among
|
|
233
|
+
// all lines (weighted) + the inter-line gaps, so fewer lines ⇒ bigger
|
|
234
|
+
// number (the boost effect).
|
|
235
|
+
const sumRel = items.reduce((a, it) => a + relOf(it.key), 0);
|
|
236
|
+
const gapUnits = STACK_GAP_RATIO * (count - 1);
|
|
237
|
+
let numPx = Math.min(MAX_NUM_PX, (cellH * STACK_FILL_FRAC) / (sumRel + gapUnits));
|
|
238
|
+
// 2) Shrink to fit width — scale the whole stack down by the tightest line.
|
|
239
|
+
let scale = 1;
|
|
240
|
+
for (const it of items) {
|
|
241
|
+
const w = (0, template_utils_1.measureText)(it.text, { fontSize: numPx * relOf(it.key) }).width;
|
|
242
|
+
if (w > availW)
|
|
243
|
+
scale = Math.min(scale, availW / w);
|
|
244
|
+
}
|
|
245
|
+
numPx *= scale;
|
|
246
|
+
// 3) Legibility floors — primary clears minTextSize, nothing is sub-legible.
|
|
247
|
+
// Failing here backs the caller off to fewer (hence larger) lines.
|
|
248
|
+
if (numPx < minTextSize)
|
|
249
|
+
return null;
|
|
250
|
+
const sized = items.map((it) => ({ ...it, size: numPx * relOf(it.key) }));
|
|
251
|
+
if (sized.some((s) => s.size < MIN_LEGIBLE_PX))
|
|
252
|
+
return null;
|
|
253
|
+
return { lines: sized, gap: numPx * STACK_GAP_RATIO, pad };
|
|
254
|
+
}
|
|
255
|
+
/** Resolve the label that fits this tile, walking the overflow ladder. */
|
|
256
|
+
function resolveLabel(content, overflow, order, cellW, cellH, minTextSize) {
|
|
257
|
+
const target = contentLevel(content);
|
|
258
|
+
for (const level of candidateLevels(target, overflow)) {
|
|
259
|
+
const fitted = fitLines(linesForLevel(level, order, cellW, cellH), cellW, cellH, minTextSize);
|
|
260
|
+
if (fitted)
|
|
261
|
+
return fitted;
|
|
262
|
+
}
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* The per-LINE rects (in the cell's local coords) the label this cell WOULD draw
|
|
267
|
+
* actually inks — each line centered exactly as {@link buildDebugCellMaskPath}
|
|
268
|
+
* lays it out. Testing these (not their union bounding box) against higher-z
|
|
269
|
+
* tiles is what makes a small corner overlay leave a big hero label alone: the
|
|
270
|
+
* dead space between the centered number and the wide dimensions line isn't part
|
|
271
|
+
* of any line rect, so only a tile that truly covers a glyph row suppresses it.
|
|
272
|
+
* Returns [] when the cell draws no label.
|
|
273
|
+
*/
|
|
274
|
+
function labelLineRects(opts) {
|
|
275
|
+
const { cellW, cellH, order, label, content, overflow, minTextSize } = opts;
|
|
276
|
+
const smallerDim = Math.min(cellW, cellH);
|
|
277
|
+
const pad = Math.max(4, Math.round(smallerDim * 0.04));
|
|
278
|
+
if (label != null) {
|
|
279
|
+
const t = label.trim();
|
|
280
|
+
if (!t)
|
|
281
|
+
return [];
|
|
282
|
+
const availW = Math.max(1, cellW - 2 * pad);
|
|
283
|
+
let size = clampSize(minTextSize, smallerDim * 0.16, 72);
|
|
284
|
+
let w = (0, template_utils_1.measureText)(t, { fontSize: size }).width;
|
|
285
|
+
if (w > availW) {
|
|
286
|
+
size = Math.max(MIN_LEGIBLE_PX, Math.floor((size * availW) / w));
|
|
287
|
+
w = (0, template_utils_1.measureText)(t, { fontSize: size }).width;
|
|
288
|
+
}
|
|
289
|
+
// Custom label is vertically centered (vAlign "middle").
|
|
290
|
+
return [{ x: (cellW - w) / 2, y: (cellH - size) / 2, w, h: size }];
|
|
291
|
+
}
|
|
292
|
+
const fitted = resolveLabel(content, overflow, order, cellW, cellH, minTextSize);
|
|
293
|
+
if (!fitted)
|
|
294
|
+
return [];
|
|
295
|
+
let totalH = 0;
|
|
296
|
+
fitted.lines.forEach((l, i) => {
|
|
297
|
+
totalH += l.size;
|
|
298
|
+
if (i > 0)
|
|
299
|
+
totalH += fitted.gap;
|
|
300
|
+
});
|
|
301
|
+
const rects = [];
|
|
302
|
+
let cursor = (cellH - totalH) / 2;
|
|
303
|
+
for (const line of fitted.lines) {
|
|
304
|
+
const w = (0, template_utils_1.measureText)(line.text, { fontSize: line.size }).width;
|
|
305
|
+
rects.push({ x: (cellW - w) / 2, y: cursor, w, h: line.size });
|
|
306
|
+
cursor += line.size + fitted.gap;
|
|
307
|
+
}
|
|
308
|
+
return rects;
|
|
309
|
+
}
|
|
310
|
+
/** Axis-aligned rect overlap (strict: edge-touching is not an overlap). */
|
|
311
|
+
function rectsIntersect(ax, ay, aw, ah, bx, by, bw, bh) {
|
|
312
|
+
return ax < bx + bw && bx < ax + aw && ay < by + bh && by < ay + ah;
|
|
313
|
+
}
|
|
314
|
+
// ── Debug-mode geometry helpers ──
|
|
315
|
+
/**
|
|
316
|
+
* SVG path for a rectangular border ring (frame outline) of stroke width `t`
|
|
317
|
+
* inside a `w`×`h` cell. Outer contour clockwise + inner counter-clockwise so
|
|
318
|
+
* the non-zero fill rule punches the center out, leaving just the border. Baked
|
|
319
|
+
* into the cell's inline-mask so the outline is the SAME ink as the text — one
|
|
320
|
+
* masked color source draws both.
|
|
321
|
+
*/
|
|
322
|
+
function rectRingPath(w, h, t) {
|
|
323
|
+
const ti = Math.min(t, w / 2, h / 2);
|
|
324
|
+
const outer = `M0 0 L${w} 0 L${w} ${h} L0 ${h} Z`;
|
|
325
|
+
const inner = `M${ti} ${ti} L${ti} ${h - ti} L${w - ti} ${h - ti} L${w - ti} ${ti} Z`;
|
|
326
|
+
return `${outer} ${inner}`;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Dashed rectangular ring of pen `t` inside a `w`×`h` cell: `dash`-long
|
|
330
|
+
* strokes separated by `gap` along each edge (corners always inked so the
|
|
331
|
+
* rectangle reads). Same ink path as the solid ring — one masked tile.
|
|
332
|
+
*/
|
|
333
|
+
function dashedRingPath(w, h, t, dash, gap) {
|
|
334
|
+
const ti = Math.max(1, Math.min(t, w / 2, h / 2));
|
|
335
|
+
const step = Math.max(2, dash + gap);
|
|
336
|
+
const parts = [];
|
|
337
|
+
// top + bottom edges
|
|
338
|
+
for (let x = 0; x < w; x += step) {
|
|
339
|
+
const x1 = Math.min(w, x + dash);
|
|
340
|
+
parts.push(`M${x} 0 L${x1} 0 L${x1} ${ti} L${x} ${ti} Z`);
|
|
341
|
+
parts.push(`M${x} ${h - ti} L${x1} ${h - ti} L${x1} ${h} L${x} ${h} Z`);
|
|
342
|
+
}
|
|
343
|
+
// left + right edges
|
|
344
|
+
for (let y = 0; y < h; y += step) {
|
|
345
|
+
const y1 = Math.min(h, y + dash);
|
|
346
|
+
parts.push(`M0 ${y} L${ti} ${y} L${ti} ${y1} L0 ${y1} Z`);
|
|
347
|
+
parts.push(`M${w - ti} ${y} L${w} ${y} L${w} ${y1} L${w - ti} ${y1} Z`);
|
|
348
|
+
}
|
|
349
|
+
return parts.join(" ");
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* ONE null tile's inline-mask path: a dashed ring + a centered `null` /
|
|
353
|
+
* `W × H` stack (the same FrameInfo sizing math as painted cells, degrading
|
|
354
|
+
* to just `null` on small holes). Drawn muted via the tile's overlay alpha.
|
|
355
|
+
*/
|
|
356
|
+
function buildNullCellMaskPath(opts) {
|
|
357
|
+
var _a, _b;
|
|
358
|
+
const { cellW, cellH, borderPx, minTextSize, ringOnly } = opts;
|
|
359
|
+
const nullText = (_a = opts.label) !== null && _a !== void 0 ? _a : DEFAULT_NULL_LABEL;
|
|
360
|
+
const dash = Math.max(6, borderPx * NULL_DASH_PER_PEN);
|
|
361
|
+
const parts = [dashedRingPath(cellW, cellH, borderPx, dash, dash)];
|
|
362
|
+
if (ringOnly)
|
|
363
|
+
return parts.join(" ");
|
|
364
|
+
const canvas = { width: cellW, height: cellH };
|
|
365
|
+
const items = [
|
|
366
|
+
{ key: "num", text: nullText },
|
|
367
|
+
{ key: "dims", text: `${cellW} × ${cellH}` },
|
|
368
|
+
];
|
|
369
|
+
const fitted = (_b = fitLines(items, cellW, cellH, minTextSize)) !== null && _b !== void 0 ? _b : fitLines(items.slice(0, 1), cellW, cellH, minTextSize);
|
|
370
|
+
if (fitted) {
|
|
371
|
+
let totalH = 0;
|
|
372
|
+
fitted.lines.forEach((l, i) => {
|
|
373
|
+
totalH += l.size;
|
|
374
|
+
if (i > 0)
|
|
375
|
+
totalH += fitted.gap;
|
|
376
|
+
});
|
|
377
|
+
let cursor = (cellH - totalH) / 2;
|
|
378
|
+
for (const line of fitted.lines) {
|
|
379
|
+
parts.push((0, template_utils_1.textToPath)(line.text, { fontSize: line.size, hAlign: "center", vAlign: "top", padding: { x: fitted.pad, y: cursor } }, canvas));
|
|
380
|
+
cursor += line.size + fitted.gap;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return parts.filter(Boolean).join(" ");
|
|
384
|
+
}
|
|
385
|
+
/** Alpha-0 tile: occupies a leaf slot, paints nothing (a leaf on another layer). */
|
|
386
|
+
function ghostTile(ink) {
|
|
387
|
+
return (0, template_utils_1.makeColorTile)(ink, { overlay: { alpha: "0" } });
|
|
388
|
+
}
|
|
389
|
+
/** The dashed, muted `null` + size cell for one hole. */
|
|
390
|
+
function nullTile(opts) {
|
|
391
|
+
return (0, template_utils_1.makeColorTile)(opts.ink, {
|
|
392
|
+
mask: {
|
|
393
|
+
kind: "inline-mask",
|
|
394
|
+
localPath: buildNullCellMaskPath(opts),
|
|
395
|
+
bounds: { x: 0, y: 0, width: opts.cellW, height: opts.cellH },
|
|
396
|
+
},
|
|
397
|
+
overlay: { alpha: String(NULL_FRAME_ALPHA) },
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* One painted cell — thumb: a flat colour tile with rounding/stroke effects;
|
|
402
|
+
* debug: one ink tile masked to border ring + label glyphs. Shared by the
|
|
403
|
+
* single composite and the layer explode so a cell looks identical in both.
|
|
404
|
+
*/
|
|
405
|
+
function paintedTile(opts) {
|
|
406
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
407
|
+
const { cellW, cellH, order, useThumb, resolved } = opts;
|
|
408
|
+
if (useThumb) {
|
|
409
|
+
let tileColor = (_a = resolved === null || resolved === void 0 ? void 0 : resolved.tileColor) !== null && _a !== void 0 ? _a : "#141824";
|
|
410
|
+
if (((_b = resolved === null || resolved === void 0 ? void 0 : resolved.heatmap) === null || _b === void 0 ? void 0 : _b.enabled) && resolved.heatmap.shades.length > 0) {
|
|
411
|
+
tileColor = resolved.heatmap.shades[(order - 1) % resolved.heatmap.shades.length];
|
|
412
|
+
}
|
|
413
|
+
else if (resolved && order % 2 === 0) {
|
|
414
|
+
tileColor = resolved.tileColorAlt;
|
|
415
|
+
}
|
|
416
|
+
const effects = {
|
|
417
|
+
rounding: (_c = resolved === null || resolved === void 0 ? void 0 : resolved.rounding) !== null && _c !== void 0 ? _c : { borderRadius: 0.04, cornerStyle: "rounded" },
|
|
418
|
+
stroke: {
|
|
419
|
+
width: (_d = resolved === null || resolved === void 0 ? void 0 : resolved.borderWidthFrac) !== null && _d !== void 0 ? _d : 0.0015,
|
|
420
|
+
color: ((_e = resolved === null || resolved === void 0 ? void 0 : resolved.borderColor) !== null && _e !== void 0 ? _e : "#ffffff"),
|
|
421
|
+
alpha: (_f = resolved === null || resolved === void 0 ? void 0 : resolved.borderAlpha) !== null && _f !== void 0 ? _f : 0.1,
|
|
422
|
+
position: "inner",
|
|
423
|
+
},
|
|
424
|
+
};
|
|
425
|
+
if (resolved === null || resolved === void 0 ? void 0 : resolved.dropShadow)
|
|
426
|
+
effects.dropShadow = resolved.dropShadow;
|
|
427
|
+
return (0, template_utils_1.makeColorTile)(tileColor, { effects });
|
|
428
|
+
}
|
|
429
|
+
const ink = ((_g = resolved === null || resolved === void 0 ? void 0 : resolved.borderColor) !== null && _g !== void 0 ? _g : "#000000");
|
|
430
|
+
const localPath = buildDebugCellMaskPath({
|
|
431
|
+
cellW,
|
|
432
|
+
cellH,
|
|
433
|
+
order,
|
|
434
|
+
label: opts.label,
|
|
435
|
+
content: opts.labelContent,
|
|
436
|
+
overflow: opts.labelOverflow,
|
|
437
|
+
borderPx: opts.borderPx,
|
|
438
|
+
minTextSize: opts.minTextSize,
|
|
439
|
+
suppressLabel: opts.suppressLabel,
|
|
440
|
+
});
|
|
441
|
+
return (0, template_utils_1.makeColorTile)(ink, {
|
|
442
|
+
mask: {
|
|
443
|
+
kind: "inline-mask",
|
|
444
|
+
localPath,
|
|
445
|
+
bounds: { x: 0, y: 0, width: cellW, height: cellH },
|
|
446
|
+
...(opts.fillAlpha > 0 ? { matte: opts.fillAlpha } : {}),
|
|
447
|
+
},
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* LAYER EXPLODE (dev diagram, gate 29): the composite is every overlay depth
|
|
452
|
+
* stacked, so emit ONE still per depth. Every still carries the SAME m0
|
|
453
|
+
* geometry (so a cell keeps its number and position across the set) — leaves
|
|
454
|
+
* at the requested depth paint (cells as usual, `-` holes as dashed muted
|
|
455
|
+
* `null` cells, their `-` swapped to `1` positionally via the parse span so
|
|
456
|
+
* the engine binds a source), painted leaves at other depths ride as alpha-0
|
|
457
|
+
* ghosts, and other depths' holes stay `-` (no source). Returns null when
|
|
458
|
+
* the full parse fails (caller falls back to the composite).
|
|
459
|
+
*/
|
|
460
|
+
function buildLayerExplode(args) {
|
|
461
|
+
var _a, _b, _c, _d, _e, _f;
|
|
462
|
+
const canon = String((0, dsl_1.toCanonicalM0String)(args.m0));
|
|
463
|
+
const full = (0, dsl_1.parseM0StringComplete)(canon, args.canvasW, args.canvasH);
|
|
464
|
+
if (!full.ok)
|
|
465
|
+
return null;
|
|
466
|
+
const nodes = ((_b = (_a = full.ir) === null || _a === void 0 ? void 0 : _a.editorFrames) !== null && _b !== void 0 ? _b : [])
|
|
467
|
+
.filter((n) => n.kind === "frame" || n.kind === "null")
|
|
468
|
+
.slice()
|
|
469
|
+
.sort((a, b) => { var _a, _b, _c, _d; return ((_b = (_a = a.meta.span) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = b.meta.span) === null || _c === void 0 ? void 0 : _c.start) !== null && _d !== void 0 ? _d : 0); });
|
|
470
|
+
if (nodes.length === 0)
|
|
471
|
+
return null;
|
|
472
|
+
// A hole must be addressable in the canonical string to become a slot.
|
|
473
|
+
if (nodes.some((n) => n.kind === "null" && (n.meta.span == null || canon[n.meta.span.start] !== "-"))) {
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
const maxDepth = nodes.reduce((m, n) => Math.max(m, n.overlayDepth), 0);
|
|
477
|
+
const ink = ((_d = (_c = args.resolved) === null || _c === void 0 ? void 0 : _c.borderColor) !== null && _d !== void 0 ? _d : "#000000");
|
|
478
|
+
const steps = [];
|
|
479
|
+
for (let depth = 0; depth <= maxDepth; depth++) {
|
|
480
|
+
const chars = canon.split("");
|
|
481
|
+
const sources = [];
|
|
482
|
+
let order = 0;
|
|
483
|
+
for (const n of nodes) {
|
|
484
|
+
if (n.kind === "frame") {
|
|
485
|
+
order += 1; // composite numbering — identical on every still
|
|
486
|
+
if (n.overlayDepth !== depth) {
|
|
487
|
+
sources.push(ghostTile(ink));
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
490
|
+
sources.push(paintedTile({
|
|
491
|
+
cellW: n.width,
|
|
492
|
+
cellH: n.height,
|
|
493
|
+
order,
|
|
494
|
+
useThumb: args.useThumb,
|
|
495
|
+
resolved: args.resolved,
|
|
496
|
+
label: cellLabelFor(args.labels, order, args.unlabeledCells),
|
|
497
|
+
labelContent: args.labelContent,
|
|
498
|
+
labelOverflow: args.labelOverflow,
|
|
499
|
+
borderPx: args.borderPx,
|
|
500
|
+
minTextSize: args.minTextSize,
|
|
501
|
+
fillAlpha: args.fillAlpha,
|
|
502
|
+
// one depth per still — nothing on this still covers a label
|
|
503
|
+
suppressLabel: false,
|
|
504
|
+
}));
|
|
505
|
+
}
|
|
506
|
+
else if (n.overlayDepth === depth && n.meta.span) {
|
|
507
|
+
chars[n.meta.span.start] = "1";
|
|
508
|
+
sources.push(nullTile({
|
|
509
|
+
ink,
|
|
510
|
+
cellW: n.width,
|
|
511
|
+
cellH: n.height,
|
|
512
|
+
borderPx: args.borderPx,
|
|
513
|
+
minTextSize: args.minTextSize,
|
|
514
|
+
ringOnly: args.useThumb,
|
|
515
|
+
label: args.nullLabel,
|
|
516
|
+
}));
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
let layerM0 = chars.join("");
|
|
520
|
+
if (depth === 0 && ((_f = (_e = args.resolved) === null || _e === void 0 ? void 0 : _e.paperGrid) === null || _f === void 0 ? void 0 : _f.enabled)) {
|
|
521
|
+
sources.push((0, paperGrid_1.makePaperGridSource)({
|
|
522
|
+
width: args.canvasW,
|
|
523
|
+
height: args.canvasH,
|
|
524
|
+
ink,
|
|
525
|
+
stepFrac: args.resolved.paperGrid.stepFrac,
|
|
526
|
+
alpha: args.resolved.paperGrid.alpha,
|
|
527
|
+
}));
|
|
528
|
+
layerM0 = (0, paperGrid_1.appendTopOverlay)(layerM0);
|
|
529
|
+
}
|
|
530
|
+
const file = {
|
|
531
|
+
kind: "mosaic_document",
|
|
532
|
+
version: 1,
|
|
533
|
+
assets: args.assets,
|
|
534
|
+
m0: (0, dsl_stdlib_1.toM0String)(layerM0, `Wireframe layer ${depth}`),
|
|
535
|
+
sources,
|
|
536
|
+
size: { width: args.canvasW, height: args.canvasH },
|
|
537
|
+
fps: args.fps,
|
|
538
|
+
durationMs: LAYER_STILL_MS,
|
|
539
|
+
format: { kind: "image", container: "png", pixelFormat: "rgba" },
|
|
540
|
+
...(args.bg != null ? { backgroundColor: (0, template_utils_1.solidBackground)(args.bg) } : {}),
|
|
541
|
+
...(args.backgroundImage ? { backgroundImage: args.backgroundImage } : {}),
|
|
542
|
+
};
|
|
543
|
+
steps.push({
|
|
544
|
+
name: `layer-${depth}`,
|
|
545
|
+
label: `Layer ${depth} of ${maxDepth + 1}`,
|
|
546
|
+
durationMs: LAYER_STILL_MS,
|
|
547
|
+
file,
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
return { kind: "mosaic_pipeline", version: 1, emit: "multi", steps };
|
|
551
|
+
}
|
|
552
|
+
function clampSize(min, value, max) {
|
|
553
|
+
return Math.max(min, Math.min(max, Math.round(value)));
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Build ONE cell's inline-mask path — border ring + the centered label stack —
|
|
557
|
+
* all as glyph/vector outlines authored in the cell's local pixel box. The
|
|
558
|
+
* consuming `makeColorTile` paints a single flat ink color through this mask.
|
|
559
|
+
*
|
|
560
|
+
* A custom `label` (from the `labels` prop) bypasses the content/overflow ladder
|
|
561
|
+
* and is drawn centered, shrunk to fit the tile width. Otherwise the label is
|
|
562
|
+
* resolved from `content` + `overflow` and laid out as a centered vertical stack
|
|
563
|
+
* (number / dimensions / aspect), mirroring the editor's FrameInfo.
|
|
564
|
+
*/
|
|
565
|
+
function buildDebugCellMaskPath(opts) {
|
|
566
|
+
const { cellW, cellH, order, label, content, overflow, borderPx, minTextSize, suppressLabel } = opts;
|
|
567
|
+
const canvas = { width: cellW, height: cellH };
|
|
568
|
+
const smallerDim = Math.min(cellW, cellH);
|
|
569
|
+
const pad = Math.max(4, Math.round(smallerDim * 0.04));
|
|
570
|
+
const parts = [];
|
|
571
|
+
// Border ring — same ink as the text, one uniform pen width across all tiles.
|
|
572
|
+
// Always drawn (it reads the structure even where the label is suppressed).
|
|
573
|
+
parts.push(rectRingPath(cellW, cellH, borderPx));
|
|
574
|
+
if (suppressLabel) {
|
|
575
|
+
return parts.filter(Boolean).join(" ");
|
|
576
|
+
}
|
|
577
|
+
if (label != null) {
|
|
578
|
+
// Custom label: one centered line, shrunk so it fits the padded width.
|
|
579
|
+
const t = label.trim();
|
|
580
|
+
if (t) {
|
|
581
|
+
const availW = Math.max(1, cellW - 2 * pad);
|
|
582
|
+
let size = clampSize(minTextSize, smallerDim * 0.16, 72);
|
|
583
|
+
const w = (0, template_utils_1.measureText)(t, { fontSize: size }).width;
|
|
584
|
+
if (w > availW)
|
|
585
|
+
size = Math.max(MIN_LEGIBLE_PX, Math.floor((size * availW) / w));
|
|
586
|
+
parts.push((0, template_utils_1.textToPath)(t, { fontSize: size, hAlign: "center", vAlign: "middle", padding: pad }, canvas));
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
// Adaptive stack: pick the richest content level that fits, then center it.
|
|
591
|
+
const fitted = resolveLabel(content, overflow, order, cellW, cellH, minTextSize);
|
|
592
|
+
if (fitted) {
|
|
593
|
+
let totalH = 0;
|
|
594
|
+
fitted.lines.forEach((l, i) => {
|
|
595
|
+
totalH += l.size;
|
|
596
|
+
if (i > 0)
|
|
597
|
+
totalH += fitted.gap;
|
|
598
|
+
});
|
|
599
|
+
let cursor = (cellH - totalH) / 2;
|
|
600
|
+
for (const line of fitted.lines) {
|
|
601
|
+
// vAlign "top" + padding.y = cursor places this line's top at `cursor`.
|
|
602
|
+
parts.push((0, template_utils_1.textToPath)(line.text, { fontSize: line.size, hAlign: "center", vAlign: "top", padding: { x: pad, y: cursor } }, canvas));
|
|
603
|
+
cursor += line.size + fitted.gap;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
return parts.filter(Boolean).join(" ");
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Resolve a stableKey-keyed labels map (Record<StableKey, M0Label>, same shape
|
|
611
|
+
* as `M0cFile.labels`) to the positional `labels` array the debug labeler
|
|
612
|
+
* consumes (1-based source order). REAL stableKeys require the full parse — the
|
|
613
|
+
* logical frames used for rendering carry only synthetic placeholder keys — so
|
|
614
|
+
* this parses with `parseM0StringComplete`. Folded in from the old
|
|
615
|
+
* `@m0saic/meta/m0-snapshot` wrapper (which existed solely for this conversion).
|
|
616
|
+
* Keys that don't match a frame are dropped; returns `undefined` when nothing
|
|
617
|
+
* resolves, so callers fall back to the default dim/AR text.
|
|
618
|
+
*/
|
|
619
|
+
function stableKeyLabelsToPositional(labels, m0, width, height) {
|
|
620
|
+
var _a, _b;
|
|
621
|
+
const result = (0, dsl_1.parseM0StringComplete)(m0, width, height);
|
|
622
|
+
if (!result.ok)
|
|
623
|
+
return undefined;
|
|
624
|
+
const frames = ((_b = (_a = result.ir) === null || _a === void 0 ? void 0 : _a.renderFrames) !== null && _b !== void 0 ? _b : [])
|
|
625
|
+
.slice()
|
|
626
|
+
.sort((a, b) => a.logicalIndex - b.logicalIndex);
|
|
627
|
+
const out = new Array(frames.length).fill("");
|
|
628
|
+
let anyHit = false;
|
|
629
|
+
for (let i = 0; i < frames.length; i++) {
|
|
630
|
+
const sk = frames[i].meta.stableKey;
|
|
631
|
+
const entry = labels[sk];
|
|
632
|
+
if (entry && typeof entry.text === "string" && entry.text.trim() !== "") {
|
|
633
|
+
out[i] = entry.text;
|
|
634
|
+
anyHit = true;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return anyHit ? out : undefined;
|
|
638
|
+
}
|
|
639
|
+
const propsSchema = (0, template_utils_1.definePropsSchema)({
|
|
640
|
+
M0String: {
|
|
641
|
+
type: "m0",
|
|
642
|
+
required: true,
|
|
643
|
+
description: "m0 string to generate layout of",
|
|
644
|
+
meta: {
|
|
645
|
+
control: { placeholder: "e.g., F, 2(1,1), 3[1,0,1]" },
|
|
646
|
+
ui: { label: "Mosaic Layout String" },
|
|
647
|
+
},
|
|
648
|
+
},
|
|
649
|
+
labels: {
|
|
650
|
+
type: "string[]",
|
|
651
|
+
required: false,
|
|
652
|
+
description: "Optional labels for wireframe cells (1-based order). A labeled cell shows its label; cells without one keep their number and pixel size (see Label Content / Unlabeled Cells).",
|
|
653
|
+
meta: { ui: { label: "Cell Labels" } },
|
|
654
|
+
},
|
|
655
|
+
unlabeledCells: {
|
|
656
|
+
type: "string",
|
|
657
|
+
required: false,
|
|
658
|
+
description: 'What a cell without a custom label shows once some cells are labeled: "marks" (default — its number / dims per Label Content) or "empty" (blank — labels are the only text on the board).',
|
|
659
|
+
meta: {
|
|
660
|
+
constraints: { oneOf: ["marks", "empty"] },
|
|
661
|
+
control: {
|
|
662
|
+
options: [
|
|
663
|
+
{ value: "marks", label: "Keep marks" },
|
|
664
|
+
{ value: "empty", label: "Leave empty" },
|
|
665
|
+
],
|
|
666
|
+
},
|
|
667
|
+
ui: { label: "Unlabeled Cells" },
|
|
668
|
+
},
|
|
669
|
+
},
|
|
670
|
+
labelsByStableKey: {
|
|
671
|
+
type: "group",
|
|
672
|
+
required: false,
|
|
673
|
+
description: "Per-cell labels keyed by stableKey (Record<StableKey, {text, color?}>, same shape as M0cFile.labels). Resolved to positional labels internally; overrides `labels`. Agent/programmatic prop.",
|
|
674
|
+
meta: { ui: { label: "Labels by stableKey", collapsedByDefault: true, consumer: "agent" } },
|
|
675
|
+
},
|
|
676
|
+
cellColors: {
|
|
677
|
+
type: "string[]",
|
|
678
|
+
required: false,
|
|
679
|
+
description: "Optional per-cell body fill colors (1-based order, parallel to labels). Cell N's body is painted cellColors[N-1] beneath the border/label ink; an empty string leaves it transparent. Used by the perf heatmap. Debug mode only.",
|
|
680
|
+
meta: { constraints: { isColor: true }, control: { colorPicker: true }, ui: { label: "Cell Colors", consumer: "agent" } },
|
|
681
|
+
},
|
|
682
|
+
mode: {
|
|
683
|
+
type: "string",
|
|
684
|
+
required: false,
|
|
685
|
+
description: 'Render mode. "debug" (default) shows numbers/dims/AR. "thumb" shows clean tiles only.',
|
|
686
|
+
meta: {
|
|
687
|
+
constraints: { oneOf: ["debug", "thumb"] },
|
|
688
|
+
control: {
|
|
689
|
+
options: [
|
|
690
|
+
{ value: "debug", label: "Debug" },
|
|
691
|
+
{ value: "thumb", label: "Thumbnail" },
|
|
692
|
+
],
|
|
693
|
+
},
|
|
694
|
+
ui: { label: "Mode" },
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
labelContent: {
|
|
698
|
+
type: "string",
|
|
699
|
+
required: false,
|
|
700
|
+
description: "Most detail to show per tile (cumulative): none → number → dimensions → aspect. Default dimensions.",
|
|
701
|
+
meta: {
|
|
702
|
+
constraints: { oneOf: ["none", "number", "dimensions", "aspect"] },
|
|
703
|
+
control: {
|
|
704
|
+
options: [
|
|
705
|
+
{ value: "none", label: "None" },
|
|
706
|
+
{ value: "number", label: "Number" },
|
|
707
|
+
{ value: "dimensions", label: "Dimensions" },
|
|
708
|
+
{ value: "aspect", label: "Aspect ratio" },
|
|
709
|
+
],
|
|
710
|
+
},
|
|
711
|
+
ui: { label: "Label Content" },
|
|
712
|
+
},
|
|
713
|
+
},
|
|
714
|
+
labelOverflow: {
|
|
715
|
+
type: "string",
|
|
716
|
+
required: false,
|
|
717
|
+
description: "How to back off when the content won't fit a tile: hide (all-or-nothing), degrade (drop richest lines), number-floor (fall back to just the number). Default degrade.",
|
|
718
|
+
meta: {
|
|
719
|
+
constraints: { oneOf: ["hide", "degrade", "number-floor"] },
|
|
720
|
+
control: {
|
|
721
|
+
options: [
|
|
722
|
+
{ value: "hide", label: "Hide" },
|
|
723
|
+
{ value: "degrade", label: "Degrade" },
|
|
724
|
+
{ value: "number-floor", label: "Number floor" },
|
|
725
|
+
],
|
|
726
|
+
},
|
|
727
|
+
ui: { label: "Label Overflow" },
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
background: {
|
|
731
|
+
type: "string",
|
|
732
|
+
required: false,
|
|
733
|
+
description: 'Canvas backing: "white" (default — an opaque white fill) or "transparent" (lines/labels only, null regions empty — composites over anything). Ignored when a theme/preset sets its own background.',
|
|
734
|
+
meta: {
|
|
735
|
+
constraints: { oneOf: ["transparent", "white"] },
|
|
736
|
+
control: {
|
|
737
|
+
options: [
|
|
738
|
+
{ value: "transparent", label: "Transparent" },
|
|
739
|
+
{ value: "white", label: "White" },
|
|
740
|
+
],
|
|
741
|
+
},
|
|
742
|
+
ui: { label: "Background" },
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
nullFrames: {
|
|
746
|
+
type: "string",
|
|
747
|
+
required: false,
|
|
748
|
+
description: 'Dev: "show" explodes the layout into LAYERS — one PNG per overlay depth (emit:multi), each printing that depth\'s cells plus its null (-) holes as dashed, muted cells labelled "null" + size. "hide" (default) renders the normal single composite.',
|
|
749
|
+
meta: {
|
|
750
|
+
constraints: { oneOf: ["hide", "show"] },
|
|
751
|
+
control: {
|
|
752
|
+
options: [
|
|
753
|
+
{ value: "hide", label: "Hide" },
|
|
754
|
+
{ value: "show", label: "Show" },
|
|
755
|
+
],
|
|
756
|
+
},
|
|
757
|
+
ui: { label: "Null Frames" },
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
nullLabel: {
|
|
761
|
+
type: "string",
|
|
762
|
+
required: false,
|
|
763
|
+
description: 'Dev: the text drawn inside a hole cell when null frames show — the word "null" (default) or the m0 token "-".',
|
|
764
|
+
meta: {
|
|
765
|
+
constraints: { oneOf: ["null", "-"] },
|
|
766
|
+
control: {
|
|
767
|
+
options: [
|
|
768
|
+
{ value: "null", label: "null" },
|
|
769
|
+
{ value: "-", label: "- (m0 token)" },
|
|
770
|
+
],
|
|
771
|
+
},
|
|
772
|
+
ui: { label: "Null Label" },
|
|
773
|
+
},
|
|
774
|
+
},
|
|
775
|
+
fill: {
|
|
776
|
+
type: "number",
|
|
777
|
+
required: false,
|
|
778
|
+
description: "Translucent rect fill (debug mode), 0..1. Body wash beneath the borders/labels so rects read as filled regions over a traced image. 0 = lines only.",
|
|
779
|
+
meta: {
|
|
780
|
+
constraints: { min: 0, max: 1 },
|
|
781
|
+
ui: { label: "Rect Fill" },
|
|
782
|
+
},
|
|
783
|
+
},
|
|
784
|
+
backgroundImage: {
|
|
785
|
+
type: "media",
|
|
786
|
+
required: false,
|
|
787
|
+
description: "Image baked beneath the wireframe — lines/labels render on top. A file path or an inline base64 data: URI. Drop a reference screenshot here to trace a layout over it.",
|
|
788
|
+
meta: {
|
|
789
|
+
control: { picker: "file", accept: ["image"] },
|
|
790
|
+
ui: { label: "Background Image" },
|
|
791
|
+
},
|
|
792
|
+
},
|
|
793
|
+
backgroundImageOpacity: {
|
|
794
|
+
type: "number",
|
|
795
|
+
required: false,
|
|
796
|
+
description: "Background-image opacity, 0..1. Default 1 (fully opaque).",
|
|
797
|
+
meta: {
|
|
798
|
+
control: { placeholder: "1 (opaque)" },
|
|
799
|
+
constraints: { min: 0, max: 1 },
|
|
800
|
+
ui: { label: "Background Image Opacity" },
|
|
801
|
+
},
|
|
802
|
+
},
|
|
803
|
+
backgroundImageFit: {
|
|
804
|
+
type: "string",
|
|
805
|
+
required: false,
|
|
806
|
+
description: 'How the background image fills the canvas: "cover" (default, fill + crop) or "contain" (letterbox, pad reveals the canvas background).',
|
|
807
|
+
meta: {
|
|
808
|
+
constraints: { oneOf: ["cover", "contain"] },
|
|
809
|
+
control: {
|
|
810
|
+
options: [
|
|
811
|
+
{ value: "cover", label: "Cover" },
|
|
812
|
+
{ value: "contain", label: "Contain" },
|
|
813
|
+
],
|
|
814
|
+
},
|
|
815
|
+
ui: { label: "Background Image Fit" },
|
|
816
|
+
},
|
|
817
|
+
},
|
|
818
|
+
preset: {
|
|
819
|
+
type: "string",
|
|
820
|
+
required: false,
|
|
821
|
+
description: "Named theme preset. Sets mode, colors, borders, and effects. Explicit mode/theme override preset values.",
|
|
822
|
+
meta: {
|
|
823
|
+
constraints: {
|
|
824
|
+
oneOf: ["none", "thumb-dark", "thumb-light", "debug-contrast", "heatmap-depth", "grid-paper"],
|
|
825
|
+
},
|
|
826
|
+
control: {
|
|
827
|
+
options: [
|
|
828
|
+
{ value: "none", label: "None (mode-driven)" },
|
|
829
|
+
{ value: "thumb-dark", label: "Thumb Dark" },
|
|
830
|
+
{ value: "thumb-light", label: "Thumb Light" },
|
|
831
|
+
{ value: "debug-contrast", label: "Debug Contrast" },
|
|
832
|
+
{ value: "heatmap-depth", label: "Heatmap Depth" },
|
|
833
|
+
{ value: "grid-paper", label: "Grid Paper" },
|
|
834
|
+
],
|
|
835
|
+
},
|
|
836
|
+
ui: { label: "Preset" },
|
|
837
|
+
},
|
|
838
|
+
},
|
|
839
|
+
theme: {
|
|
840
|
+
type: "group",
|
|
841
|
+
required: false,
|
|
842
|
+
description: "Theme overrides applied on top of preset defaults. Colors, borders, rounding, shadows.",
|
|
843
|
+
meta: { ui: { label: "Theme", collapsedByDefault: true } },
|
|
844
|
+
},
|
|
845
|
+
});
|
|
846
|
+
// ── Template ──
|
|
847
|
+
exports.WireframeV2 = {
|
|
848
|
+
id: (0, types_1.asTemplateId)("@m0saic/wireframe/base/v2"),
|
|
849
|
+
label: "Wireframe v2",
|
|
850
|
+
version: 2,
|
|
851
|
+
description: "Wireframe of any m0 layout string: every cell drawn as an outlined rectangle with its number, pixel size and aspect ratio on a white canvas. Switch the background to transparent to composite over anything or trace a reference screenshot, or pick the thumb, heatmap or paper presets for clean tiles.",
|
|
852
|
+
capabilities: { tier: "core" },
|
|
853
|
+
tags: ["wireframe", "docs-only", "designers", "developers", "layout", "blueprint"],
|
|
854
|
+
outputHints: {
|
|
855
|
+
width: 1920,
|
|
856
|
+
height: 1080,
|
|
857
|
+
fps: 30,
|
|
858
|
+
durationMs: 1000,
|
|
859
|
+
note: "Wireframe for documentation (layout visualization)",
|
|
860
|
+
format: { kind: "image", container: "png", pixelFormat: "rgba" },
|
|
861
|
+
},
|
|
862
|
+
propsSchema,
|
|
863
|
+
// Explicit debug style (gate 29, founder: "we need the props to default
|
|
864
|
+
// to this style of debug. other forms dont read as obvious in editor"):
|
|
865
|
+
// every knob the default look depends on is spelled out so the Make
|
|
866
|
+
// form shows the state it renders. Byte-identical to the implicit
|
|
867
|
+
// defaults; a chosen `preset` still decides thumb-vs-debug (v1
|
|
868
|
+
// resolveTheme, layer 3).
|
|
869
|
+
defaultProps: {
|
|
870
|
+
preset: "none",
|
|
871
|
+
backgroundImageFit: "cover",
|
|
872
|
+
M0String: DEFAULT_LAYOUT,
|
|
873
|
+
mode: "debug",
|
|
874
|
+
labelContent: "dimensions",
|
|
875
|
+
labelOverflow: "degrade",
|
|
876
|
+
unlabeledCells: "marks",
|
|
877
|
+
background: "white",
|
|
878
|
+
nullFrames: "hide",
|
|
879
|
+
nullLabel: "null",
|
|
880
|
+
fill: 0,
|
|
881
|
+
},
|
|
882
|
+
render(props, ctx) {
|
|
883
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
884
|
+
// "none" is the visible unset state of the preset picker — identical to omitting it.
|
|
885
|
+
if (props.preset === "none") {
|
|
886
|
+
const { preset: _none, ...rest } = props;
|
|
887
|
+
props = rest;
|
|
888
|
+
}
|
|
889
|
+
const { M0String, labels, cellColors } = props;
|
|
890
|
+
// stableKey-keyed labels (folded in from the old m0-snapshot wrapper)
|
|
891
|
+
// resolve to the same positional array and take precedence over the
|
|
892
|
+
// positional `labels` prop when supplied.
|
|
893
|
+
const positionalFromStableKeys = props.labelsByStableKey
|
|
894
|
+
? stableKeyLabelsToPositional(props.labelsByStableKey, M0String, ctx.target.width, ctx.target.height)
|
|
895
|
+
: undefined;
|
|
896
|
+
const effectiveLabels = positionalFromStableKeys !== null && positionalFromStableKeys !== void 0 ? positionalFromStableKeys : labels;
|
|
897
|
+
const unlabeledCells = (_a = props.unlabeledCells) !== null && _a !== void 0 ? _a : DEFAULT_UNLABELED_CELLS;
|
|
898
|
+
const hasTheming = !!props.preset || !!props.theme || props.mode === "thumb";
|
|
899
|
+
const resolved = hasTheming ? (0, wireframe_1.resolveTheme)(props) : null;
|
|
900
|
+
const useThumb = (_b = resolved === null || resolved === void 0 ? void 0 : resolved.useThumb) !== null && _b !== void 0 ? _b : false;
|
|
901
|
+
const frames = (0, template_utils_1.parseMosaicFrames)(M0String, ctx);
|
|
902
|
+
const sources = [];
|
|
903
|
+
// Nested child docs for heat-coloured cells (see the `cellColors` branch
|
|
904
|
+
// in the debug path below). Empty unless `cellColors` is supplied — so
|
|
905
|
+
// the default wireframe stays one flat single-command document.
|
|
906
|
+
const childDocs = {};
|
|
907
|
+
const useCellColors = ((_c = cellColors === null || cellColors === void 0 ? void 0 : cellColors.length) !== null && _c !== void 0 ? _c : 0) > 0;
|
|
908
|
+
// Paint-order (z) + global geometry per tile, so a tile whose label is
|
|
909
|
+
// covered by a higher-z tile (an overlay) can suppress that label — the
|
|
910
|
+
// wireframe is built from transparent-body masks, so without this a base
|
|
911
|
+
// tile's glyphs bleed straight through whatever overlays it. Joined to
|
|
912
|
+
// the logical frames below by logicalIndex.
|
|
913
|
+
const renderFrames = (0, template_utils_1.parseMosaicRenderFrames)(M0String, ctx);
|
|
914
|
+
const zByLogical = new Map();
|
|
915
|
+
const zRects = [];
|
|
916
|
+
for (const rf of renderFrames) {
|
|
917
|
+
const li = rf.logicalIndex;
|
|
918
|
+
if (li != null)
|
|
919
|
+
zByLogical.set(li, rf.paintOrder);
|
|
920
|
+
zRects.push({ z: rf.paintOrder, x: rf.x, y: rf.y, w: rf.width, h: rf.height });
|
|
921
|
+
}
|
|
922
|
+
const minTextSize = props.preset === "debug-contrast" ? 18 : 14;
|
|
923
|
+
const labelContent = (_d = props.labelContent) !== null && _d !== void 0 ? _d : DEFAULT_LABEL_CONTENT;
|
|
924
|
+
const labelOverflow = (_e = props.labelOverflow) !== null && _e !== void 0 ? _e : DEFAULT_LABEL_OVERFLOW;
|
|
925
|
+
const showNullFrames = ((_f = props.nullFrames) !== null && _f !== void 0 ? _f : DEFAULT_NULL_FRAMES) === "show";
|
|
926
|
+
// Translucent rect fill (debug mode): a body wash beneath the opaque
|
|
927
|
+
// border/labels so the rects read as filled regions over a traced
|
|
928
|
+
// image. Clamped 0..1; 0 (default) = transparent body (lines only).
|
|
929
|
+
const fillAlpha = Math.max(0, Math.min(1, (_g = props.fill) !== null && _g !== void 0 ? _g : 0));
|
|
930
|
+
// Canvas size from the frame bounds (frames tile the whole canvas), used
|
|
931
|
+
// for ONE uniform debug border weight across every tile — see
|
|
932
|
+
// DEBUG_BORDER_FRAC. Honour a preset/explicit borderWidthFrac only when
|
|
933
|
+
// it's a sane canvas-relative value (≤ MAX_CANVAS_BORDER_FRAC); the
|
|
934
|
+
// legacy 0.005 tile-relative baseline falls back to the v2 default.
|
|
935
|
+
let canvasW = 0;
|
|
936
|
+
let canvasH = 0;
|
|
937
|
+
for (const f of frames) {
|
|
938
|
+
canvasW = Math.max(canvasW, f.x + f.width);
|
|
939
|
+
canvasH = Math.max(canvasH, f.y + f.height);
|
|
940
|
+
}
|
|
941
|
+
const themedFrac = resolved === null || resolved === void 0 ? void 0 : resolved.borderWidthFrac;
|
|
942
|
+
const borderFrac = themedFrac != null && themedFrac <= MAX_CANVAS_BORDER_FRAC ? themedFrac : DEBUG_BORDER_FRAC;
|
|
943
|
+
const uniformBorderPx = Math.max(1, Math.round(Math.min(canvasW, canvasH) * borderFrac));
|
|
944
|
+
let order = 0;
|
|
945
|
+
for (const frame of frames) {
|
|
946
|
+
if (frame.nullRender)
|
|
947
|
+
continue;
|
|
948
|
+
order += 1;
|
|
949
|
+
const cellW = frame.width;
|
|
950
|
+
const cellH = frame.height;
|
|
951
|
+
if (useThumb) {
|
|
952
|
+
// ── Thumb: flat color tile, border/rounding via effects. ──
|
|
953
|
+
let tileColor = (_h = resolved === null || resolved === void 0 ? void 0 : resolved.tileColor) !== null && _h !== void 0 ? _h : "#141824";
|
|
954
|
+
if (((_j = resolved === null || resolved === void 0 ? void 0 : resolved.heatmap) === null || _j === void 0 ? void 0 : _j.enabled) && resolved.heatmap.shades.length > 0) {
|
|
955
|
+
tileColor = resolved.heatmap.shades[(order - 1) % resolved.heatmap.shades.length];
|
|
956
|
+
}
|
|
957
|
+
else if (resolved && order % 2 === 0) {
|
|
958
|
+
tileColor = resolved.tileColorAlt;
|
|
959
|
+
}
|
|
960
|
+
const effects = {
|
|
961
|
+
rounding: (_k = resolved === null || resolved === void 0 ? void 0 : resolved.rounding) !== null && _k !== void 0 ? _k : { borderRadius: 0.04, cornerStyle: "rounded" },
|
|
962
|
+
stroke: {
|
|
963
|
+
width: (_l = resolved === null || resolved === void 0 ? void 0 : resolved.borderWidthFrac) !== null && _l !== void 0 ? _l : 0.0015,
|
|
964
|
+
color: ((_m = resolved === null || resolved === void 0 ? void 0 : resolved.borderColor) !== null && _m !== void 0 ? _m : "#ffffff"),
|
|
965
|
+
alpha: (_o = resolved === null || resolved === void 0 ? void 0 : resolved.borderAlpha) !== null && _o !== void 0 ? _o : 0.1,
|
|
966
|
+
position: "inner",
|
|
967
|
+
},
|
|
968
|
+
};
|
|
969
|
+
if (resolved === null || resolved === void 0 ? void 0 : resolved.dropShadow)
|
|
970
|
+
effects.dropShadow = resolved.dropShadow;
|
|
971
|
+
sources.push((0, template_utils_1.makeColorTile)(tileColor, { effects }));
|
|
972
|
+
}
|
|
973
|
+
else {
|
|
974
|
+
// ── Debug: one ink tile masked to border + glyph outlines. ──
|
|
975
|
+
// Every debug cell is bound to `labels[order-1]` (Make's
|
|
976
|
+
// double-click → inline edit) — the same positional mapping
|
|
977
|
+
// the labeler reads, so a cell with no custom label yet is
|
|
978
|
+
// still a handle to ADD one. Thumb tiles carry no labels and
|
|
979
|
+
// stay unbound.
|
|
980
|
+
const ink = ((_p = resolved === null || resolved === void 0 ? void 0 : resolved.borderColor) !== null && _p !== void 0 ? _p : "#000000");
|
|
981
|
+
const label = cellLabelFor(effectiveLabels, order, unlabeledCells);
|
|
982
|
+
// Suppress this tile's label if a higher-z tile covers where the
|
|
983
|
+
// label would sit — so overlaid tiles don't bleed their numbers
|
|
984
|
+
// through (closer to a real composited render).
|
|
985
|
+
const myZ = (_r = zByLogical.get((_q = frame.logicalIndex) !== null && _q !== void 0 ? _q : -1)) !== null && _r !== void 0 ? _r : -1;
|
|
986
|
+
let suppressLabel = false;
|
|
987
|
+
if (myZ >= 0) {
|
|
988
|
+
const lineRects = labelLineRects({
|
|
989
|
+
cellW,
|
|
990
|
+
cellH,
|
|
991
|
+
order,
|
|
992
|
+
label,
|
|
993
|
+
content: labelContent,
|
|
994
|
+
overflow: labelOverflow,
|
|
995
|
+
minTextSize,
|
|
996
|
+
});
|
|
997
|
+
outer: for (const lr of lineRects) {
|
|
998
|
+
const gx = frame.x + lr.x;
|
|
999
|
+
const gy = frame.y + lr.y;
|
|
1000
|
+
for (const r of zRects) {
|
|
1001
|
+
if (r.z <= myZ)
|
|
1002
|
+
continue;
|
|
1003
|
+
if (rectsIntersect(gx, gy, lr.w, lr.h, r.x, r.y, r.w, r.h)) {
|
|
1004
|
+
suppressLabel = true;
|
|
1005
|
+
break outer;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
const localPath = buildDebugCellMaskPath({
|
|
1011
|
+
cellW,
|
|
1012
|
+
cellH,
|
|
1013
|
+
order,
|
|
1014
|
+
label,
|
|
1015
|
+
content: labelContent,
|
|
1016
|
+
overflow: labelOverflow,
|
|
1017
|
+
borderPx: uniformBorderPx,
|
|
1018
|
+
minTextSize,
|
|
1019
|
+
suppressLabel,
|
|
1020
|
+
});
|
|
1021
|
+
const maskedInk = (0, template_utils_1.makeColorTile)(ink, {
|
|
1022
|
+
mask: {
|
|
1023
|
+
kind: "inline-mask",
|
|
1024
|
+
localPath,
|
|
1025
|
+
bounds: { x: 0, y: 0, width: cellW, height: cellH },
|
|
1026
|
+
// Translucent ink wash over the whole cell (the rect
|
|
1027
|
+
// "fill") beneath the opaque border/labels — lets the
|
|
1028
|
+
// rects read as filled regions when tracing over an
|
|
1029
|
+
// image. 0 (default) keeps the body fully transparent.
|
|
1030
|
+
...(fillAlpha > 0 ? { matte: fillAlpha } : {}),
|
|
1031
|
+
},
|
|
1032
|
+
});
|
|
1033
|
+
// Per-cell heat colour (perf heatmap): paint an opaque body in
|
|
1034
|
+
// `cellColors[order-1]` BENEATH the masked border/label ink so the
|
|
1035
|
+
// label reads on top of the heat colour. A flat two-tile-per-cell
|
|
1036
|
+
// push is impossible — the engine binds sources 1:1 with m0 leaves,
|
|
1037
|
+
// and alphamerge is single-colour, so one masked tile can't carry a
|
|
1038
|
+
// contrasting body + ink. Compose the two colours in a nested child
|
|
1039
|
+
// mosaic instead: `F{F}` = body tile (beneath) + masked ink tile
|
|
1040
|
+
// (border/label, on top). The child declares its own `size` so the
|
|
1041
|
+
// engine renders it at the cell resolution (exact-fit, no stretch)
|
|
1042
|
+
// and the inline-mask bounds line up. Absent/empty `cellColors[i]`
|
|
1043
|
+
// keeps the original flat single-source path (no golden regression).
|
|
1044
|
+
const heatColor = useCellColors ? ((_s = cellColors === null || cellColors === void 0 ? void 0 : cellColors[order - 1]) !== null && _s !== void 0 ? _s : "") : "";
|
|
1045
|
+
const heatHasLabel = !!(label && label.trim());
|
|
1046
|
+
if (heatColor && heatColor.trim() && !heatHasLabel) {
|
|
1047
|
+
// Heat-only cell (colours-only mode — the flattened perf image):
|
|
1048
|
+
// a single flat colour tile with the frame border as a stroke
|
|
1049
|
+
// effect. NO nested child + NO inline-mask, so a ~500-cell
|
|
1050
|
+
// flattened heatmap renders in ONE cheap pass instead of ~500
|
|
1051
|
+
// nested mosaics (which choked the flattened image entirely).
|
|
1052
|
+
sources.push((0, template_utils_1.bindProp)((0, template_utils_1.makeColorTile)(heatColor, {
|
|
1053
|
+
effects: {
|
|
1054
|
+
stroke: { width: borderFrac, color: ink, alpha: 0.5, position: "inner" },
|
|
1055
|
+
},
|
|
1056
|
+
}), "labels", order - 1));
|
|
1057
|
+
}
|
|
1058
|
+
else if (heatColor && heatColor.trim()) {
|
|
1059
|
+
// Body colour + label (the top perf image, few big cells): the
|
|
1060
|
+
// two colours can't share one masked tile (alphamerge is
|
|
1061
|
+
// single-colour), so compose them in a nested child `F{F}` =
|
|
1062
|
+
// body tile (beneath) + masked border/label ink (on top). The
|
|
1063
|
+
// child declares its own `size` so it renders at cell resolution
|
|
1064
|
+
// (exact-fit) and the mask bounds line up.
|
|
1065
|
+
const childRef = `heatcell${order}`;
|
|
1066
|
+
childDocs[childRef] = {
|
|
1067
|
+
kind: "mosaic_document",
|
|
1068
|
+
version: 1,
|
|
1069
|
+
assets: {},
|
|
1070
|
+
m0: "F{F}",
|
|
1071
|
+
size: {
|
|
1072
|
+
width: Math.max(1, Math.round(cellW)),
|
|
1073
|
+
height: Math.max(1, Math.round(cellH)),
|
|
1074
|
+
},
|
|
1075
|
+
sources: [(0, template_utils_1.makeColorTile)(heatColor), maskedInk],
|
|
1076
|
+
durationMs: 1000,
|
|
1077
|
+
};
|
|
1078
|
+
sources.push((0, template_utils_1.bindProp)({ type: "mosaic", ref: childRef }, "labels", order - 1));
|
|
1079
|
+
}
|
|
1080
|
+
else {
|
|
1081
|
+
sources.push((0, template_utils_1.bindProp)(maskedInk, "labels", order - 1));
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
// Background resolution, in priority order:
|
|
1086
|
+
// 1. an explicit theme/preset backgroundColor, else
|
|
1087
|
+
// 2. the `background` prop: "white" (default) bakes an opaque white
|
|
1088
|
+
// fill, "transparent" leaves it unfilled.
|
|
1089
|
+
// A transparent wireframe is just lines + labels — it composites over
|
|
1090
|
+
// anything and null tiles render *nothing* — but on a dark stage black
|
|
1091
|
+
// ink reads as an empty canvas, hence the white default (take 4).
|
|
1092
|
+
const background = (_t = props.background) !== null && _t !== void 0 ? _t : DEFAULT_BACKGROUND;
|
|
1093
|
+
const bg = (_u = resolved === null || resolved === void 0 ? void 0 : resolved.backgroundColor) !== null && _u !== void 0 ? _u : (background === "white" ? "#ffffff" : null);
|
|
1094
|
+
// Optional baked background image: register it as a file asset and point
|
|
1095
|
+
// the document's `backgroundImage` at it. The engine composites it once,
|
|
1096
|
+
// beneath every tile — so the wireframe lines/labels draw on top.
|
|
1097
|
+
const assets = {};
|
|
1098
|
+
let backgroundImage;
|
|
1099
|
+
if (props.backgroundImage) {
|
|
1100
|
+
const bgAssetId = (0, types_1.asAssetId)("wireframe_background_image");
|
|
1101
|
+
// Accept either a filesystem path or an inline base64 `data:` URI —
|
|
1102
|
+
// the latter keeps the document self-contained (e.g. an agent baking
|
|
1103
|
+
// a reference image inline, no external file dependency).
|
|
1104
|
+
assets[bgAssetId] = props.backgroundImage.startsWith("data:")
|
|
1105
|
+
? { kind: "data-uri", uri: props.backgroundImage, mediaType: "image" }
|
|
1106
|
+
: { kind: "file", path: props.backgroundImage, mediaType: "image" };
|
|
1107
|
+
const opacity = props.backgroundImageOpacity;
|
|
1108
|
+
backgroundImage = {
|
|
1109
|
+
assetId: bgAssetId,
|
|
1110
|
+
...(opacity != null ? { opacity } : {}),
|
|
1111
|
+
...(props.backgroundImageFit ? { fit: props.backgroundImageFit } : {}),
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
// Dev diagram: layer explode — one still per overlay depth, as a
|
|
1115
|
+
// pipeline (founder: "layers must be emitted as separate files").
|
|
1116
|
+
// Falls through to the composite only if the full parse fails.
|
|
1117
|
+
if (showNullFrames) {
|
|
1118
|
+
// The composite derives its canvas from the PAINTED frames' bounds; a
|
|
1119
|
+
// hole on the canvas edge would shrink that (a null right column →
|
|
1120
|
+
// 960 wide). The explode paints holes too, so it takes the real canvas.
|
|
1121
|
+
const explodeW = ctx.output.width;
|
|
1122
|
+
const explodeH = ctx.output.height;
|
|
1123
|
+
const exploded = buildLayerExplode({
|
|
1124
|
+
m0: M0String,
|
|
1125
|
+
canvasW: explodeW,
|
|
1126
|
+
canvasH: explodeH,
|
|
1127
|
+
fps: ctx.output.fps,
|
|
1128
|
+
useThumb,
|
|
1129
|
+
resolved,
|
|
1130
|
+
labels: effectiveLabels,
|
|
1131
|
+
unlabeledCells,
|
|
1132
|
+
labelContent,
|
|
1133
|
+
labelOverflow,
|
|
1134
|
+
borderPx: Math.max(1, Math.round(Math.min(explodeW, explodeH) * borderFrac)),
|
|
1135
|
+
minTextSize,
|
|
1136
|
+
fillAlpha,
|
|
1137
|
+
bg,
|
|
1138
|
+
assets,
|
|
1139
|
+
backgroundImage,
|
|
1140
|
+
nullLabel: (_v = props.nullLabel) !== null && _v !== void 0 ? _v : DEFAULT_NULL_LABEL,
|
|
1141
|
+
});
|
|
1142
|
+
if (exploded)
|
|
1143
|
+
return Promise.resolve(exploded);
|
|
1144
|
+
}
|
|
1145
|
+
// Paper grid (the `grid-paper` preset / `theme.paperGrid`): ONE extra
|
|
1146
|
+
// lattice source appended as a full-canvas TOP overlay leaf so the
|
|
1147
|
+
// graph-paper reads over the opaque, rounded thumb tiles. Off → the
|
|
1148
|
+
// m0 is the caller's string verbatim (consumers read it back).
|
|
1149
|
+
let finalM0 = M0String;
|
|
1150
|
+
if ((_w = resolved === null || resolved === void 0 ? void 0 : resolved.paperGrid) === null || _w === void 0 ? void 0 : _w.enabled) {
|
|
1151
|
+
sources.push((0, paperGrid_1.makePaperGridSource)({
|
|
1152
|
+
width: canvasW,
|
|
1153
|
+
height: canvasH,
|
|
1154
|
+
ink: ((_x = resolved.borderColor) !== null && _x !== void 0 ? _x : "#000000"),
|
|
1155
|
+
stepFrac: resolved.paperGrid.stepFrac,
|
|
1156
|
+
alpha: resolved.paperGrid.alpha,
|
|
1157
|
+
}));
|
|
1158
|
+
finalM0 = (0, paperGrid_1.appendTopOverlay)(finalM0);
|
|
1159
|
+
}
|
|
1160
|
+
const doc = {
|
|
1161
|
+
kind: "mosaic_document",
|
|
1162
|
+
version: 1,
|
|
1163
|
+
assets: assets,
|
|
1164
|
+
m0: (0, dsl_stdlib_1.toM0String)(finalM0, "Wireframe"),
|
|
1165
|
+
sources,
|
|
1166
|
+
// Gate-26 convention: every rendered doc declares its format. A
|
|
1167
|
+
// wireframe is a still, alpha-carrying PNG (the transparent default
|
|
1168
|
+
// is the whole point) — the same values outputHints seeds.
|
|
1169
|
+
format: { kind: "image", container: "png", pixelFormat: "rgba" },
|
|
1170
|
+
// No authored durationMs: the registry stamp owns it (gate 26 —
|
|
1171
|
+
// authored doc durations now SURVIVE the stamp, and this 1000
|
|
1172
|
+
// was a stale value that had silently relied on being clobbered;
|
|
1173
|
+
// keeping it would pin every wireframe video render to 1s).
|
|
1174
|
+
...(Object.keys(childDocs).length ? { children: childDocs } : {}),
|
|
1175
|
+
...(bg != null ? { backgroundColor: (0, template_utils_1.solidBackground)(bg) } : {}),
|
|
1176
|
+
...(backgroundImage ? { backgroundImage } : {}),
|
|
1177
|
+
};
|
|
1178
|
+
return Promise.resolve(doc);
|
|
1179
|
+
},
|
|
1180
|
+
};
|
|
1181
|
+
(0, template_utils_1.registerTemplate)(exports.WireframeV2);
|