@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,768 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChartsBarGraphV2 = void 0;
|
|
4
|
+
const types_1 = require("@m0saic/types");
|
|
5
|
+
const template_utils_1 = require("@m0saic/template-utils");
|
|
6
|
+
const dsl_stdlib_1 = require("@m0saic/dsl-stdlib");
|
|
7
|
+
const onboarding_cover_1 = require("../../../_shared/onboarding-cover");
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
// Defaults (code-level defaults are ALSO surfaced in defaultProps so the Make
|
|
10
|
+
// fields show the value that's actually rendered).
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
const DEFAULT_RENDER_MODE = "premium";
|
|
13
|
+
const DEFAULT_ORIENTATION = "vertical";
|
|
14
|
+
const DEFAULT_PRESET = "neutral";
|
|
15
|
+
const DEFAULT_GAP = 0.18; // gap as a fraction of bar width (slider, resolution-independent)
|
|
16
|
+
const DEFAULT_PADDING = 72;
|
|
17
|
+
const DEFAULT_CORNER_RADIUS = 0.15;
|
|
18
|
+
const DEFAULT_BAR_COLOR = "#f97316";
|
|
19
|
+
const DEFAULT_GRID = { show: true, count: 5 };
|
|
20
|
+
const DEFAULT_BASELINE = { show: true };
|
|
21
|
+
const DEFAULT_VALUE_AXIS = { show: true };
|
|
22
|
+
const DEFAULT_VALUE_LABELS = { show: true, format: "compact", decimals: 0, suffix: "" };
|
|
23
|
+
const DEFAULT_ANIM = {
|
|
24
|
+
intro: { durationSec: 1.1, delaySec: 0.1, staggerSec: 0.06, ease: "smoothstep" },
|
|
25
|
+
reduceMotion: false,
|
|
26
|
+
};
|
|
27
|
+
// Vertical quantization for bar heights. Per-bar height units are rounded to a
|
|
28
|
+
// multiple of HEIGHT_STEP so each column's `[empty, bar]` split GCD-collapses
|
|
29
|
+
// (Q and HEIGHT_STEP share factors) — the DSL count stays small.
|
|
30
|
+
const Q = 100;
|
|
31
|
+
const HEIGHT_STEP = 4;
|
|
32
|
+
function tokensFor(preset) {
|
|
33
|
+
switch (preset) {
|
|
34
|
+
case "dark":
|
|
35
|
+
return { bg: "#0b0f14", card: "#0f172a", border: "#ffffff", borderAlpha: 0.10, bar: "#f97316",
|
|
36
|
+
title: "#f1f5f9", subtitle: "#94a3b8", category: "#cbd5e1", tick: "#94a3b8",
|
|
37
|
+
grid: "#ffffff", gridOpacity: 0.12, axis: "#ffffff", axisOpacity: 0.45 };
|
|
38
|
+
case "terminal":
|
|
39
|
+
return { bg: "#050505", card: "#0b0b0b", border: "#22c55e", borderAlpha: 0.18, bar: "#22c55e",
|
|
40
|
+
title: "#22c55e", subtitle: "#15803d", category: "#22c55e", tick: "#15803d",
|
|
41
|
+
grid: "#22c55e", gridOpacity: 0.12, axis: "#22c55e", axisOpacity: 0.4 };
|
|
42
|
+
case "glass":
|
|
43
|
+
return { bg: "#0b0f14", card: "#111827", border: "#ffffff", borderAlpha: 0.12, bar: "#60a5fa",
|
|
44
|
+
title: "#f1f5f9", subtitle: "#cbd5e1", category: "#cbd5e1", tick: "#94a3b8",
|
|
45
|
+
grid: "#ffffff", gridOpacity: 0.12, axis: "#ffffff", axisOpacity: 0.45 };
|
|
46
|
+
case "paper":
|
|
47
|
+
return { bg: "#f8fafc", card: "#ffffff", border: "#0f172a", borderAlpha: 0.10, bar: "#f97316",
|
|
48
|
+
title: "#0f172a", subtitle: "#475569", category: "#334155", tick: "#64748b",
|
|
49
|
+
grid: "#0f172a", gridOpacity: 0.10, axis: "#0f172a", axisOpacity: 0.4 };
|
|
50
|
+
case "neutral":
|
|
51
|
+
default:
|
|
52
|
+
return { bg: "#0b0f14", card: "#0f172a", border: "#ffffff", borderAlpha: 0.10, bar: "#f97316",
|
|
53
|
+
title: "#f1f5f9", subtitle: "#94a3b8", category: "#cbd5e1", tick: "#94a3b8",
|
|
54
|
+
grid: "#ffffff", gridOpacity: 0.12, axis: "#ffffff", axisOpacity: 0.45 };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Map the selected preset's flat `Tokens` onto the 21-key `MosaicThemeTokens`
|
|
59
|
+
* (the `resolveThemeTokens` fallback), mirroring line-chart/v1's
|
|
60
|
+
* `localThemeFromPreset`. Keys bar-graph actually READS carry their exact preset
|
|
61
|
+
* value verbatim (marked ✓ — so an unthemed render is byte-identical); the rest
|
|
62
|
+
* are defensible locals never read. `borderAlpha` stays a local (no theme key for
|
|
63
|
+
* a border opacity); `props.cornerRadius` owns the card radius (so `radius` is a
|
|
64
|
+
* placeholder). Do NOT import the producer's resolver into the fallback — that
|
|
65
|
+
* couples to a preset and risks drift breaking byte-identity.
|
|
66
|
+
*/
|
|
67
|
+
function localThemeFromTokens(tk) {
|
|
68
|
+
return {
|
|
69
|
+
surfaceApp: tk.bg, // ✓ canvas behind the card (doc backgroundColor)
|
|
70
|
+
surface: tk.card, // ✓ card surface
|
|
71
|
+
surfaceRaised: tk.card, // ✗
|
|
72
|
+
surfaceInset: tk.bg, // ✗
|
|
73
|
+
border: tk.border, // ✓ card inner stroke color
|
|
74
|
+
borderStrong: tk.border, // ✗
|
|
75
|
+
textPrimary: tk.title, // ✓ title + value labels
|
|
76
|
+
textSecondary: tk.subtitle, // ✓ subtitle
|
|
77
|
+
textMuted: tk.category, // ✓ category (axis) labels
|
|
78
|
+
eyebrow: tk.tick, // ✓ tick-rail numbers
|
|
79
|
+
accent: tk.bar, // ✓ bar fill (== dataPalette[0])
|
|
80
|
+
accentSoft: tk.bar, // ✗
|
|
81
|
+
accentGlow: tk.bar, // ✗
|
|
82
|
+
positive: "#16a34a", // ✗ defensible local (unused)
|
|
83
|
+
negative: "#dc2626", // ✗ defensible local (unused)
|
|
84
|
+
grid: tk.grid, // ✓ gridlines
|
|
85
|
+
gridAlpha: tk.gridOpacity, // ✓ gridline opacity
|
|
86
|
+
axis: tk.axis, // ✓ value-axis + baseline strips
|
|
87
|
+
axisAlpha: tk.axisOpacity, // ✓ axis/baseline opacity
|
|
88
|
+
radius: DEFAULT_CORNER_RADIUS, // ✗ (props.cornerRadius owns it)
|
|
89
|
+
dataPalette: [tk.bar], // ✓ bars (explicit barColor prop wins)
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function niceAxis(min, max, targetTicks) {
|
|
93
|
+
if (max === min)
|
|
94
|
+
return { min, max: max + 1, step: 1, ticks: [min, max + 1] };
|
|
95
|
+
const range = Math.abs(max - min);
|
|
96
|
+
const rawStep = range / Math.max(1, targetTicks - 1);
|
|
97
|
+
const step = !Number.isFinite(rawStep) || rawStep <= 0 ? 1 : (0, dsl_stdlib_1.niceNum)(rawStep, [1, 2, 2.5, 5]);
|
|
98
|
+
const niceMin = Math.floor(min / step) * step;
|
|
99
|
+
const niceMax = Math.ceil(max / step) * step;
|
|
100
|
+
const ticks = [];
|
|
101
|
+
const eps = step * 1e-6;
|
|
102
|
+
for (let v = niceMin; v <= niceMax + eps; v += step)
|
|
103
|
+
ticks.push(Number(v.toFixed(6)));
|
|
104
|
+
return { min: niceMin, max: niceMax, step, ticks };
|
|
105
|
+
}
|
|
106
|
+
function formatCompact(n, decimals) {
|
|
107
|
+
const abs = Math.abs(n);
|
|
108
|
+
const sign = n < 0 ? "-" : "";
|
|
109
|
+
if (abs >= 1e12)
|
|
110
|
+
return sign + (abs / 1e12).toFixed(decimals) + "T";
|
|
111
|
+
if (abs >= 1e9)
|
|
112
|
+
return sign + (abs / 1e9).toFixed(decimals) + "B";
|
|
113
|
+
if (abs >= 1e6)
|
|
114
|
+
return sign + (abs / 1e6).toFixed(decimals) + "M";
|
|
115
|
+
if (abs >= 1e3)
|
|
116
|
+
return sign + (abs / 1e3).toFixed(decimals) + "K";
|
|
117
|
+
return sign + abs.toFixed(decimals);
|
|
118
|
+
}
|
|
119
|
+
function formatValue(value, cfg, max) {
|
|
120
|
+
let base;
|
|
121
|
+
switch (cfg.format) {
|
|
122
|
+
case "raw":
|
|
123
|
+
base = value.toFixed(cfg.decimals);
|
|
124
|
+
break;
|
|
125
|
+
case "percent":
|
|
126
|
+
base = max === 0 ? (0).toFixed(cfg.decimals) + "%" : ((value / max) * 100).toFixed(cfg.decimals) + "%";
|
|
127
|
+
break;
|
|
128
|
+
case "compact":
|
|
129
|
+
default:
|
|
130
|
+
base = formatCompact(value, cfg.decimals);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
return cfg.suffix ? `${base}${cfg.suffix}` : base;
|
|
134
|
+
}
|
|
135
|
+
const EMPTY = { m0: "-", sources: [] };
|
|
136
|
+
const paint = (source) => ({ m0: "F", sources: [source] });
|
|
137
|
+
// Cap on a single split's cell count. weightedSplit expands a weight `w` into
|
|
138
|
+
// `w` cells, so coprime pixel weights (GCD 1) would expand to their pixel sum.
|
|
139
|
+
// Scaling down to a small basis before weightedSplit bounds the DSL count AND
|
|
140
|
+
// tends to introduce a shared factor that GCD-collapses it further.
|
|
141
|
+
const SPLIT_BASIS_CAP = 120;
|
|
142
|
+
/** Weighted split along an axis; drops zero/neg-weight bands, collapses singletons. */
|
|
143
|
+
function split(axis, bands) {
|
|
144
|
+
const bs = bands.filter((b) => b.weight > 0);
|
|
145
|
+
if (bs.length === 0)
|
|
146
|
+
return EMPTY;
|
|
147
|
+
if (bs.length === 1)
|
|
148
|
+
return bs[0].node;
|
|
149
|
+
const weights = bs.map((b) => Math.max(1, Math.round(b.weight)));
|
|
150
|
+
// Basis on the 5-smooth lattice (latticeWeights, @m0saic/template-utils):
|
|
151
|
+
// over the cap the bands are Hamilton-scaled to EXACTLY the cap (GCD ⇒ a
|
|
152
|
+
// divisor of it); a rough pixel sum under the cap drifts ≤ 1 px onto the
|
|
153
|
+
// nearest smooth basis; a symmetric inset or an item/gutter list is rewritten
|
|
154
|
+
// as the same pattern on a smooth total (every item stays equal to its
|
|
155
|
+
// siblings); smooth, tiny and equal-weight splits keep their basis.
|
|
156
|
+
const m0 = String((0, dsl_stdlib_1.weightedSplit)((0, template_utils_1.latticeWeights)(weights, { cap: SPLIT_BASIS_CAP }), axis, { claimants: bs.map((b) => b.node.m0) }));
|
|
157
|
+
return { m0, sources: bs.flatMap((b) => b.node.sources) };
|
|
158
|
+
}
|
|
159
|
+
const rowSplit = (bands) => split("row", bands);
|
|
160
|
+
const colSplit = (bands) => split("col", bands);
|
|
161
|
+
/** Overlay layers as nested overlays: base{l1{l2{…}}}. Sources concat in order. */
|
|
162
|
+
function overlay(layers) {
|
|
163
|
+
const ls = layers.filter((l) => l.sources.length > 0 || l.m0 !== "-");
|
|
164
|
+
if (ls.length === 0)
|
|
165
|
+
return EMPTY;
|
|
166
|
+
if (ls.length === 1)
|
|
167
|
+
return ls[0];
|
|
168
|
+
let m0 = ls[ls.length - 1].m0;
|
|
169
|
+
for (let i = ls.length - 2; i >= 0; i--)
|
|
170
|
+
m0 = `${ls[i].m0}{${m0}}`;
|
|
171
|
+
return { m0, sources: ls.flatMap((l) => l.sources) };
|
|
172
|
+
}
|
|
173
|
+
/** Wrap a node in empty margins so it occupies an inset rect of the parent. */
|
|
174
|
+
function insetNode(node, top, right, bottom, left, W, H) {
|
|
175
|
+
const mid = colSplit([{ weight: left, node: EMPTY }, { weight: W - left - right, node }, { weight: right, node: EMPTY }]);
|
|
176
|
+
return rowSplit([{ weight: top, node: EMPTY }, { weight: H - top - bottom, node: mid }, { weight: bottom, node: EMPTY }]);
|
|
177
|
+
}
|
|
178
|
+
function textCell(text, fontSize, color, hAlign = "center", vAlign = "middle", padding, overlay) {
|
|
179
|
+
const placement = { fit: "contain", hAlign, vAlign };
|
|
180
|
+
if (padding)
|
|
181
|
+
placement.padding = padding;
|
|
182
|
+
const src = { type: "text", visual: { backgroundColor: "black@0" }, layers: [{ content: { kind: "literal", text: text || " " }, style: { fontSize, fontColor: color }, placement }] };
|
|
183
|
+
if (overlay)
|
|
184
|
+
src.overlay = overlay;
|
|
185
|
+
return src;
|
|
186
|
+
}
|
|
187
|
+
function titleSubtitleCell(opts) {
|
|
188
|
+
const layers = [];
|
|
189
|
+
if (opts.title)
|
|
190
|
+
layers.push({ content: { kind: "literal", text: opts.title }, style: { fontSize: opts.titleFont, fontColor: opts.titleColor }, placement: { fit: "contain", hAlign: "center", vAlign: opts.subtitle ? "top" : "middle" } });
|
|
191
|
+
if (opts.subtitle)
|
|
192
|
+
layers.push({ content: { kind: "literal", text: opts.subtitle }, style: { fontSize: opts.subFont, fontColor: opts.subColor }, placement: { fit: "contain", hAlign: "center", vAlign: opts.title ? "bottom" : "middle" } });
|
|
193
|
+
// Each layer binds its own prop; with both present Make opens the header
|
|
194
|
+
// as a stacked Title / Subtitle form.
|
|
195
|
+
const src = (0, template_utils_1.tag)({ type: "text", visual: { backgroundColor: "black@0" }, layers }, "chart-header");
|
|
196
|
+
if (opts.title && opts.subtitle)
|
|
197
|
+
return (0, template_utils_1.bindProps)(src, [{ propKey: "titles.title", layer: 0 }, { propKey: "titles.subtitle", layer: 1 }]);
|
|
198
|
+
return (0, template_utils_1.bindProp)(src, opts.title ? "titles.title" : "titles.subtitle");
|
|
199
|
+
}
|
|
200
|
+
function easeExpr(ease, u) {
|
|
201
|
+
if (ease === "linear")
|
|
202
|
+
return u;
|
|
203
|
+
return `(${u})*(${u})*(3-2*(${u}))`; // smoothstep / easeInOut
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* One grow-in bar — a single `color=` source that slides in from the baseline
|
|
207
|
+
* edge to fill its rect. ffmpeg `overlay` composites onto the full canvas (no
|
|
208
|
+
* frame clip), so the still-growing tile WOULD spill past the baseline — the
|
|
209
|
+
* PLOT is wrapped in a nested child doc whose cell-sized buffer clips that
|
|
210
|
+
* overflow at the baseline (see `wrapAsChild`). The not-yet-filled region
|
|
211
|
+
* reveals the card beneath. Static (reduceMotion) → a plain fill, no overlay.
|
|
212
|
+
* The gap between bars is structural (empty bands), NOT a placement inset — the
|
|
213
|
+
* grow overlay positions the tile in the full cell and would ignore an inset.
|
|
214
|
+
*
|
|
215
|
+
* The grow SLIDE (`x/yExpr`) is a free scalar position expression either way.
|
|
216
|
+
* `fade` (renderMode `premium`) adds a time-varying `overlay.alpha` on top — a
|
|
217
|
+
* softer reveal, but a per-pixel geq with no active window (see `RenderMode`);
|
|
218
|
+
* `light` omits it (opaque grow), leaving the slide only.
|
|
219
|
+
*/
|
|
220
|
+
function barNode(color, index, startAtSec, durSec, ease, reduceMotion, fade, fillAxis = "y", insetFrac = 0) {
|
|
221
|
+
// Half-gap carved INSIDE each equal band (gap-as-inset, the alpine-proven
|
|
222
|
+
// rung 3/5): the tile paints only the bar's slice of its band, so bar
|
|
223
|
+
// thickness = band × one shared fraction — equal everywhere the equal split
|
|
224
|
+
// is. (The old "the grow overlay would ignore an inset" comment was wrong:
|
|
225
|
+
// alpine/bar-graph/v1 ships grow+inset through the full production gate.)
|
|
226
|
+
const placement = insetFrac > 0
|
|
227
|
+
? { placement: { inset: fillAxis === "y" ? { x: insetFrac } : { y: insetFrac } } }
|
|
228
|
+
: {};
|
|
229
|
+
// The bar itself binds `values[index]` — tall bars give up their value-label
|
|
230
|
+
// band, so the bar is the double-click handle for the value.
|
|
231
|
+
if (reduceMotion)
|
|
232
|
+
return paint((0, template_utils_1.bindProp)((0, template_utils_1.tag)((0, template_utils_1.makeColorTile)(color, { ...placement }), "bar"), "values", index));
|
|
233
|
+
const eased = easeExpr(ease, (0, template_utils_1.u01)(durSec));
|
|
234
|
+
let overlay;
|
|
235
|
+
if (fade) {
|
|
236
|
+
overlay = fillAxis === "y"
|
|
237
|
+
? { startAtSec, alpha: eased, yExpr: `h*(1-(${eased}))` } // grow up + fade
|
|
238
|
+
: { startAtSec, alpha: eased, xExpr: `-(w*(1-(${eased})))` }; // grow right + fade
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
overlay = fillAxis === "y"
|
|
242
|
+
? { startAtSec, yExpr: `h*(1-(${eased}))` } // grow up (opaque)
|
|
243
|
+
: { startAtSec, xExpr: `-(w*(1-(${eased})))` }; // grow right (opaque)
|
|
244
|
+
}
|
|
245
|
+
return paint((0, template_utils_1.bindProp)((0, template_utils_1.tag)((0, template_utils_1.makeColorTile)(color, { overlay, ...placement }), "bar"), "values", index));
|
|
246
|
+
}
|
|
247
|
+
/** Per-side inset fraction that carves `gapRatio` (gap : bar thickness) out of
|
|
248
|
+
* an equal band: pitch = barW·(1+g) ⇒ half-gap each side = g/(2(1+g)). */
|
|
249
|
+
const gapInsetFrac = (gapRatio) => gapRatio / (2 * (1 + gapRatio));
|
|
250
|
+
/** Thin full-cell overlay strip pinned to one edge (baseline / value-axis). */
|
|
251
|
+
function edgeStrip(color, opacity, edge) {
|
|
252
|
+
const horizontal = edge === "top" || edge === "bottom";
|
|
253
|
+
return {
|
|
254
|
+
type: "lavfi", color, fitMode: "content", visual: { opacity },
|
|
255
|
+
size: horizontal ? { wExpr: "TW", hExpr: "max(1,TH*0.004)" } : { wExpr: "max(1,TW*0.004)", hExpr: "TH" },
|
|
256
|
+
placement: { fit: "contain", hAlign: edge === "left" ? "left" : edge === "right" ? "right" : "center", vAlign: edge === "top" ? "top" : edge === "bottom" ? "bottom" : "middle" },
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/** Round to a multiple of `step` (>= step). */
|
|
260
|
+
const snap = (v, step) => Math.max(step, Math.round(v / step) * step);
|
|
261
|
+
/**
|
|
262
|
+
* Left value-axis tick rail: M formatted numbers top→bottom, evenly spaced so
|
|
263
|
+
* their centers line up (approximately) with the gridlines. Small tick bands
|
|
264
|
+
* separated by large gaps — right-aligned with a touch of right padding so the
|
|
265
|
+
* numbers sit just inside the plot's left edge.
|
|
266
|
+
*/
|
|
267
|
+
function tickRailNode(labels, fontSize, color, axis, tickWeight = 3) {
|
|
268
|
+
var _a;
|
|
269
|
+
// axis "row" = vertical rail (left of plot): right-aligned, small right pad.
|
|
270
|
+
// axis "col" = horizontal rail (below plot): centered, pinned to the top edge.
|
|
271
|
+
const mk = (t) => axis === "row"
|
|
272
|
+
? paint((0, template_utils_1.tag)(textCell(t, fontSize, color, "right", "middle", { right: 0.18 }), "axis-tick"))
|
|
273
|
+
: paint((0, template_utils_1.tag)(textCell(t, fontSize, color, "center", "top"), "axis-tick"));
|
|
274
|
+
const M = labels.length;
|
|
275
|
+
if (M <= 1)
|
|
276
|
+
return mk((_a = labels[0]) !== null && _a !== void 0 ? _a : "");
|
|
277
|
+
const GAP = 20;
|
|
278
|
+
const bands = [];
|
|
279
|
+
for (let i = 0; i < M; i++) {
|
|
280
|
+
bands.push({ weight: tickWeight, node: mk(labels[i]) });
|
|
281
|
+
if (i < M - 1)
|
|
282
|
+
bands.push({ weight: GAP, node: EMPTY });
|
|
283
|
+
}
|
|
284
|
+
return split(axis, bands);
|
|
285
|
+
}
|
|
286
|
+
// ---------------------------------------------------------------------------
|
|
287
|
+
// Template
|
|
288
|
+
// ---------------------------------------------------------------------------
|
|
289
|
+
// Schema-field helpers for grouped sub-fields (mirrors the theme-consumer chart pack).
|
|
290
|
+
const fBool = (label, description = "") => ({ type: "boolean", required: false, description, meta: { ui: { label } } });
|
|
291
|
+
const fStr = (label, description = "", placeholder) => ({ type: "string", required: false, description, meta: { ui: { label }, ...(placeholder ? { control: { placeholder } } : {}) } });
|
|
292
|
+
const fNum = (label, description = "", control, constraints) => ({ type: "number", required: false, description, meta: { ...(constraints ? { constraints } : {}), ...(control ? { control } : {}), ui: { label } } });
|
|
293
|
+
const fFrac = (label, description = "", placeholder) => fNum(label, description, { flavor: "slider", step: 0.01, ...(placeholder ? { placeholder } : {}) }, { min: 0, max: 1 });
|
|
294
|
+
const fEnum = (label, options, description = "") => ({ type: "string", required: false, description, meta: { constraints: { oneOf: options }, ui: { label } } });
|
|
295
|
+
const propsSchema = (0, template_utils_1.definePropsSchema)({
|
|
296
|
+
// Primary data — always visible up top.
|
|
297
|
+
values: { type: "number[]", required: true, description: "Numeric data values driving the chart bars.", meta: { constraints: { minItems: 1 }, control: { flavor: "numberList" }, ui: { label: "Values", order: 1 } } },
|
|
298
|
+
labels: { type: "string[]", required: false, description: "Category labels (index-aligned to values).", meta: { ui: { label: "Category Labels", order: 2, primary: true } } },
|
|
299
|
+
// Everything else grouped into collapsible sections (declaration order = display order).
|
|
300
|
+
domain: {
|
|
301
|
+
type: "group", required: false, description: "Value-axis domain overrides — leave unset to auto-fit to nice round numbers.",
|
|
302
|
+
meta: { ui: { label: "Domain", order: 3, collapsedByDefault: true } },
|
|
303
|
+
fields: {
|
|
304
|
+
minValue: fNum("Min Value", "Explicit domain minimum. Auto (0 / nice) when unset."),
|
|
305
|
+
maxValue: fNum("Max Value", "Explicit domain maximum. Auto (nice max) when unset.", { placeholder: "data max" }),
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
layout: {
|
|
309
|
+
type: "group", required: false, description: "Bar geometry: orientation, spacing, thickness, corner radius.",
|
|
310
|
+
meta: { ui: { label: "Layout", order: 4, collapsedByDefault: true } },
|
|
311
|
+
fields: {
|
|
312
|
+
orientation: fEnum("Orientation", ["vertical", "horizontal"], "Vertical bars grow up; horizontal bars grow right."),
|
|
313
|
+
gap: fFrac("Gap", "Gap between bars as a fraction of bar width (0 = flush, 1 = gap as wide as a bar)."),
|
|
314
|
+
padding: fNum("Padding (px)", "Outer padding in pixels (symmetric).", undefined, { min: 0, max: 512 }),
|
|
315
|
+
barThickness: fNum("Bar Thickness (px)", "Optional fixed bar thickness in px. Bars share space evenly when unset.", { placeholder: "auto (from gap)" }, { min: 1, max: 4096 }),
|
|
316
|
+
cornerRadius: fFrac("Corner Radius", "Card corner-radius fraction (0..1)."),
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
appearance: {
|
|
320
|
+
type: "group", required: false, description: "Color scheme (preset) + bar fill color(s).",
|
|
321
|
+
meta: { ui: { label: "Appearance", order: 5, collapsedByDefault: true } },
|
|
322
|
+
fields: {
|
|
323
|
+
preset: fEnum("Preset", ["neutral", "dark", "terminal", "glass", "paper"], "Built-in color scheme (card / bars / text / grid / axis)."),
|
|
324
|
+
barColor: { type: "json", required: false, description: "Bar fill — a single color, or an array of per-bar colors (cycled in bar order).", meta: { constraints: { isColor: true }, control: { colorPicker: true }, ui: { label: "Bar Color" } } },
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
grid: {
|
|
328
|
+
type: "group", required: false, description: "Gridlines behind the bars.",
|
|
329
|
+
meta: { ui: { label: "Grid", order: 6, collapsedByDefault: true } },
|
|
330
|
+
fields: { show: fBool("Show", "Draw gridlines."), count: fNum("Count", "Number of gridline intervals.", undefined, { min: 1, max: 20 }) },
|
|
331
|
+
},
|
|
332
|
+
baseline: {
|
|
333
|
+
type: "group", required: false, description: "Baseline rule at the bars' anchor edge.",
|
|
334
|
+
meta: { ui: { label: "Baseline", order: 7, collapsedByDefault: true } },
|
|
335
|
+
fields: { show: fBool("Show", "Draw the baseline rule.") },
|
|
336
|
+
},
|
|
337
|
+
valueAxis: {
|
|
338
|
+
type: "group", required: false, description: "Value-axis rule at the max-value side.",
|
|
339
|
+
meta: { ui: { label: "Value Axis", order: 8, collapsedByDefault: true } },
|
|
340
|
+
fields: { show: fBool("Show", "Draw the value-axis rule.") },
|
|
341
|
+
},
|
|
342
|
+
valueLabels: {
|
|
343
|
+
type: "group", required: false, description: "Per-bar value labels.",
|
|
344
|
+
meta: { ui: { label: "Value Labels", order: 9, collapsedByDefault: true } },
|
|
345
|
+
fields: {
|
|
346
|
+
show: fBool("Show", "Print each bar's value."),
|
|
347
|
+
format: fEnum("Format", ["raw", "percent", "compact"], "raw = as-is; percent = share of max; compact = 1.2k."),
|
|
348
|
+
decimals: fNum("Decimals", "Decimal places.", undefined, { min: 0, max: 6 }),
|
|
349
|
+
suffix: fStr("Suffix", "Appended to each value (e.g. \"%\", \" MB\")."),
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
titles: {
|
|
353
|
+
type: "group", required: false, description: "Chart title + subtitle.",
|
|
354
|
+
meta: { ui: { label: "Titles", order: 10, collapsedByDefault: true } },
|
|
355
|
+
fields: {
|
|
356
|
+
title: { type: "string", required: false, description: "Chart title.", meta: { control: { placeholder: "e.g., Monthly Sales" }, ui: { label: "Title" } } },
|
|
357
|
+
subtitle: { type: "string", required: false, description: "Chart subtitle.", meta: { control: { placeholder: "e.g., Q4 2024" }, ui: { label: "Subtitle" } } },
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
anim: {
|
|
361
|
+
type: "group", required: false, description: "Reveal mode + intro animation.",
|
|
362
|
+
meta: { ui: { label: "Animation", order: 11, collapsedByDefault: true } },
|
|
363
|
+
fields: {
|
|
364
|
+
renderMode: fEnum("Render Mode", ["premium", "light"], "\"premium\" (default): bars + labels fade in — premium, but the alpha is a per-pixel geq paid on every frame of a nesting parent's whole timeline. \"light\": opaque grow + enable-gated label pop — no geq, composable, cheap when nested."),
|
|
365
|
+
reduceMotion: fBool("Reduce Motion", "Skip motion; render the final static frame."),
|
|
366
|
+
intro: {
|
|
367
|
+
type: "group", required: false, description: "Intro grow-in timing.",
|
|
368
|
+
meta: { ui: { label: "Intro", collapsedByDefault: true } },
|
|
369
|
+
fields: {
|
|
370
|
+
durationSec: fNum("Duration (s)", "Per-bar grow duration."),
|
|
371
|
+
delaySec: fNum("Delay (s)", "Delay before the first bar starts."),
|
|
372
|
+
staggerSec: fNum("Stagger (s)", "Gap between consecutive bars' start times."),
|
|
373
|
+
ease: fEnum("Ease", ["linear", "smoothstep", "easeInOut"], "Grow-in easing curve."),
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
theme: {
|
|
379
|
+
type: "group",
|
|
380
|
+
required: false,
|
|
381
|
+
description: "Opt into a theme source. Uses the local preset palette by default; set a producer slug + namespace to pull shared design tokens (self-seeds when nothing is upstream). Explicit color props still win.",
|
|
382
|
+
meta: { ui: { label: "Theme", order: 12, collapsedByDefault: true } },
|
|
383
|
+
fields: {
|
|
384
|
+
slug: fStr("Producer slug", "Producer template to seed tokens from when the namespace isn't already on ctx (e.g. \"@m0saic/theming/v1\").", "preset palette (no producer)"),
|
|
385
|
+
preset: fStr("Preset", "Producer preset/variant to request (e.g. light | dark | high-contrast for @m0saic/theming/v1; producer-defined).", "producer default"),
|
|
386
|
+
namespace: fStr("Namespace", "Upstream alias to read tokens from. Default \"theme\".", "theme"),
|
|
387
|
+
forceFetch: fBool("Force fetch", "Re-seed via the slug even if the namespace is already populated."),
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
debugLayout: { type: "boolean", required: false, description: "Dev-only: draw the layout contract (bars equal-thickness, text fits its slot) instead of the chart.", meta: { ui: { label: "Debug layout", order: 13 } } },
|
|
391
|
+
});
|
|
392
|
+
exports.ChartsBarGraphV2 = {
|
|
393
|
+
id: (0, types_1.asTemplateId)("@m0saic/charts/bar-graph/v2"),
|
|
394
|
+
label: "Bar Graph",
|
|
395
|
+
version: 2,
|
|
396
|
+
description: "Canonical bar graph data-viz primitive (tight-rect geometry): vertical/horizontal, labels, presets, intro animation.",
|
|
397
|
+
capabilities: { tier: "core" },
|
|
398
|
+
primitive: true,
|
|
399
|
+
tags: ["data-viz", "bar-graph", "animated", "analysts", "marketers", "report"],
|
|
400
|
+
outputHints: { format: { kind: "video", container: "mp4" }, width: 1920, height: 1080, fps: 30, durationMs: 2000 },
|
|
401
|
+
propsSchema,
|
|
402
|
+
defaultProps: {
|
|
403
|
+
domain: { minValue: 0 },
|
|
404
|
+
debugLayout: false,
|
|
405
|
+
theme: { forceFetch: false },
|
|
406
|
+
values: [35, 60, 85, 45, 70],
|
|
407
|
+
labels: ["Jan", "Feb", "Mar", "Apr", "May"],
|
|
408
|
+
layout: { orientation: DEFAULT_ORIENTATION, gap: DEFAULT_GAP, padding: DEFAULT_PADDING, barThickness: undefined, cornerRadius: DEFAULT_CORNER_RADIUS },
|
|
409
|
+
appearance: { preset: DEFAULT_PRESET, barColor: DEFAULT_BAR_COLOR },
|
|
410
|
+
grid: DEFAULT_GRID,
|
|
411
|
+
baseline: DEFAULT_BASELINE,
|
|
412
|
+
valueAxis: DEFAULT_VALUE_AXIS,
|
|
413
|
+
valueLabels: DEFAULT_VALUE_LABELS,
|
|
414
|
+
anim: { renderMode: DEFAULT_RENDER_MODE, ...DEFAULT_ANIM },
|
|
415
|
+
},
|
|
416
|
+
async render(props, ctx) {
|
|
417
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _w, _x, _y;
|
|
418
|
+
const W = Math.max(1, Math.round(ctx.target.width));
|
|
419
|
+
const H = Math.max(1, Math.round(ctx.target.height));
|
|
420
|
+
if (!Array.isArray(props.values) || props.values.length === 0) {
|
|
421
|
+
return Promise.resolve((0, template_utils_1.makeErrorMosaic)("values[] must be non-empty", { title: `${this.id} props`, width: W, height: H }));
|
|
422
|
+
}
|
|
423
|
+
// Grouped prop sub-objects → locals (the Make panel nests these as collapsible groups).
|
|
424
|
+
const layout = (_a = props.layout) !== null && _a !== void 0 ? _a : {};
|
|
425
|
+
const appearance = (_b = props.appearance) !== null && _b !== void 0 ? _b : {};
|
|
426
|
+
const domainCfg = (_c = props.domain) !== null && _c !== void 0 ? _c : {};
|
|
427
|
+
const titles = (_d = props.titles) !== null && _d !== void 0 ? _d : {};
|
|
428
|
+
const orientation = (_e = layout.orientation) !== null && _e !== void 0 ? _e : DEFAULT_ORIENTATION;
|
|
429
|
+
const tokens = tokensFor((_f = appearance.preset) !== null && _f !== void 0 ? _f : DEFAULT_PRESET);
|
|
430
|
+
// Theming: the preset pack is the fallback; a producer's published tokens
|
|
431
|
+
// (ctx.upstreamData["theme"] / seeded from theme.slug) override per-key.
|
|
432
|
+
// Unthemed → returns the fallback unchanged (byte-identical). `borderAlpha`
|
|
433
|
+
// has no theme key, so it stays read off `tokens`.
|
|
434
|
+
const theme = await (0, template_utils_1.resolveThemeTokens)(localThemeFromTokens(tokens), ctx, props.theme);
|
|
435
|
+
const gapRatio = Math.max(0, (_g = layout.gap) !== null && _g !== void 0 ? _g : DEFAULT_GAP); // fraction of bar width
|
|
436
|
+
const pad = (_h = layout.padding) !== null && _h !== void 0 ? _h : DEFAULT_PADDING;
|
|
437
|
+
const cornerRadius = (_j = layout.cornerRadius) !== null && _j !== void 0 ? _j : DEFAULT_CORNER_RADIUS;
|
|
438
|
+
const baseline = { ...DEFAULT_BASELINE, ...((_k = props.baseline) !== null && _k !== void 0 ? _k : {}) };
|
|
439
|
+
const valueAxis = { ...DEFAULT_VALUE_AXIS, ...((_l = props.valueAxis) !== null && _l !== void 0 ? _l : {}) };
|
|
440
|
+
const grid = { ...DEFAULT_GRID, ...((_m = props.grid) !== null && _m !== void 0 ? _m : {}) };
|
|
441
|
+
const valueLabels = { ...DEFAULT_VALUE_LABELS, ...((_o = props.valueLabels) !== null && _o !== void 0 ? _o : {}) };
|
|
442
|
+
const anim = { intro: { ...DEFAULT_ANIM.intro, ...((_q = (_p = props.anim) === null || _p === void 0 ? void 0 : _p.intro) !== null && _q !== void 0 ? _q : {}) }, reduceMotion: (_s = (_r = props.anim) === null || _r === void 0 ? void 0 : _r.reduceMotion) !== null && _s !== void 0 ? _s : false };
|
|
443
|
+
// Reveal strategy: `premium` (default) fades bars + labels via `overlay.alpha`
|
|
444
|
+
// (premium, geq — see `RenderMode`); `light` omits the alpha (opaque grow +
|
|
445
|
+
// enable-gated label pop — composable, cheap when nested).
|
|
446
|
+
const fade = ((_u = (_t = props.anim) === null || _t === void 0 ? void 0 : _t.renderMode) !== null && _u !== void 0 ? _u : DEFAULT_RENDER_MODE) === "premium";
|
|
447
|
+
const values = props.values;
|
|
448
|
+
const N = values.length;
|
|
449
|
+
const palette = Array.isArray(appearance.barColor)
|
|
450
|
+
? (appearance.barColor.length ? appearance.barColor : theme.dataPalette)
|
|
451
|
+
: [(_w = appearance.barColor) !== null && _w !== void 0 ? _w : theme.dataPalette[0]];
|
|
452
|
+
const barColorAt = (i) => palette[i % palette.length];
|
|
453
|
+
// ── Domain (nice axis when a bound is auto) ──
|
|
454
|
+
const rawMin = (_x = domainCfg.minValue) !== null && _x !== void 0 ? _x : 0;
|
|
455
|
+
const rawMax = (_y = domainCfg.maxValue) !== null && _y !== void 0 ? _y : Math.max(...values);
|
|
456
|
+
const explicit = domainCfg.minValue != null && domainCfg.maxValue != null;
|
|
457
|
+
let minValue = rawMin, maxValue = rawMax;
|
|
458
|
+
let gridCount = Math.max(1, grid.count);
|
|
459
|
+
if (!explicit) {
|
|
460
|
+
const nice = niceAxis(rawMin, rawMax, grid.count + 1);
|
|
461
|
+
minValue = nice.min;
|
|
462
|
+
maxValue = nice.max;
|
|
463
|
+
// Keep gridlines + tick rail in lockstep with the nice tick count so they
|
|
464
|
+
// land on round numbers (0/20/40/…) rather than raw domain fractions.
|
|
465
|
+
gridCount = Math.max(1, nice.ticks.length - 1);
|
|
466
|
+
}
|
|
467
|
+
const denom = maxValue - minValue;
|
|
468
|
+
const fractions = values.map((v) => (denom === 0 ? 1 : Math.max(0, Math.min(1, (v - minValue) / denom))));
|
|
469
|
+
const contentW = W - 2 * pad;
|
|
470
|
+
const contentH = H - 2 * pad;
|
|
471
|
+
if (contentW < 16 || contentH < 16) {
|
|
472
|
+
return Promise.resolve((0, template_utils_1.makeErrorMosaic)("padding consumes the whole canvas", { title: `${this.id}`, width: W, height: H }));
|
|
473
|
+
}
|
|
474
|
+
// ── Fonts + bands (pixels; outer split weights GCD-reduce) ──
|
|
475
|
+
// Header fonts WIDTH-CAP to the content (0.72em all-caps-ish, script-aware
|
|
476
|
+
// textEmUnits): the center-aligned header clipped BOTH edges at hostile
|
|
477
|
+
// canvases ("КАЗАТЕЛИ КОМАН", gate-14 baseline). Binds only on overflow.
|
|
478
|
+
const capHdr = (px, text, min) => Math.max(min, Math.min(px, Math.floor((contentW * 0.96) / (Math.max(1, (0, template_utils_1.textEmUnits)(text !== null && text !== void 0 ? text : "")) * 0.72))));
|
|
479
|
+
const titleFont = capHdr(Math.max(12, Math.round(H * 0.046)), titles.title, 12);
|
|
480
|
+
const subFont = capHdr(Math.max(10, Math.round(H * 0.022)), titles.subtitle, 10);
|
|
481
|
+
const catFont = Math.max(10, Math.round(H * 0.018));
|
|
482
|
+
const valueFont = Math.max(10, Math.round(H * 0.02));
|
|
483
|
+
const tickFont = Math.max(9, Math.round(H * 0.016));
|
|
484
|
+
const hasTitle = !!(titles.title && titles.title.trim());
|
|
485
|
+
const hasSubtitle = !!(titles.subtitle && titles.subtitle.trim());
|
|
486
|
+
const hasTitleBand = hasTitle || hasSubtitle;
|
|
487
|
+
const titleBandH = hasTitleBand ? Math.round((hasSubtitle ? titleFont * 1.2 + subFont * 1.5 : titleFont * 1.5) + H * 0.012) : 0;
|
|
488
|
+
const hasLabels = !!(props.labels && props.labels.length > 0);
|
|
489
|
+
const catBandH = hasLabels ? Math.round(catFont * 1.9) : 0;
|
|
490
|
+
// Script-aware longest strings (shared by both orientations' caps).
|
|
491
|
+
const longestCatU = hasLabels ? Math.max(1, ...props.labels.map((l) => (0, template_utils_1.textEmUnits)(l !== null && l !== void 0 ? l : ""))) : 1;
|
|
492
|
+
const longestValU = Math.max(1, ...values.map((v) => (0, template_utils_1.textEmUnits)(formatValue(v, valueLabels, maxValue))));
|
|
493
|
+
let anyValueLabel = false;
|
|
494
|
+
const titleNode = hasTitleBand
|
|
495
|
+
? paint(titleSubtitleCell({ title: hasTitle ? titles.title : undefined, subtitle: hasSubtitle ? titles.subtitle : undefined, titleFont, subFont, titleColor: theme.textPrimary, subColor: theme.textSecondary }))
|
|
496
|
+
: EMPTY;
|
|
497
|
+
let contentNode;
|
|
498
|
+
// The plot is wrapped in a nested child doc so its cell-sized buffer CLIPS
|
|
499
|
+
// the grow-in bars at the plot edges (ffmpeg overlay otherwise composites
|
|
500
|
+
// onto the full canvas, so a translating bar would spill past the baseline).
|
|
501
|
+
// One child for the whole plot — far less nesting than v1's per-bar docs.
|
|
502
|
+
const childDocs = {};
|
|
503
|
+
const wrapAsChild = (key, node) => {
|
|
504
|
+
childDocs[key] = {
|
|
505
|
+
kind: "mosaic_document", version: 1, assets: {},
|
|
506
|
+
m0: node.m0, sources: node.sources, fps: ctx.target.fps, durationMs: ctx.target.durationMs,
|
|
507
|
+
};
|
|
508
|
+
return { m0: "F", sources: [{ type: "mosaic", ref: key }] };
|
|
509
|
+
};
|
|
510
|
+
if (orientation === "vertical") {
|
|
511
|
+
const plotH = contentH - titleBandH - catBandH;
|
|
512
|
+
if (plotH < 8) {
|
|
513
|
+
return Promise.resolve((0, template_utils_1.makeErrorMosaic)("plot area too small after bands", { title: `${this.id}`, width: W, height: H }));
|
|
514
|
+
}
|
|
515
|
+
// Tick rail reserves a left column; the plot (bars + gridlines) takes the rest.
|
|
516
|
+
const hasTicks = grid.show && gridCount >= 1;
|
|
517
|
+
const tickRailW = hasTicks ? Math.max(Math.round(contentW * 0.06), tickFont * 3) : 0;
|
|
518
|
+
const plotW = contentW - tickRailW;
|
|
519
|
+
if (plotW < 4) {
|
|
520
|
+
return Promise.resolve((0, template_utils_1.makeErrorMosaic)("plot area too narrow after the tick rail", { title: `${this.id}`, width: W, height: H }));
|
|
521
|
+
}
|
|
522
|
+
// ── Bars: one EQUAL band per bar, half-gap carved INSIDE via a shared
|
|
523
|
+
// placement.inset on the tile (gap-as-inset). The old interleaved
|
|
524
|
+
// [margin, bar, gap, …] px stack let the engine's outside-in remainder
|
|
525
|
+
// spread bar widths up to 50% (18 vs 36px at 360×640 — the equal-width
|
|
526
|
+
// tripwire's catch, the same class alpine/bar-graph/v1 fixed). ──
|
|
527
|
+
const cellW = plotW / N;
|
|
528
|
+
const insetXV = layout.barThickness != null
|
|
529
|
+
? Math.max(0, (1 - Math.min(1, layout.barThickness / cellW)) / 2)
|
|
530
|
+
: gapInsetFrac(gapRatio);
|
|
531
|
+
const barWpx = cellW * (1 - 2 * insetXV);
|
|
532
|
+
const gapPx = cellW - barWpx;
|
|
533
|
+
// Caps to the column pitch (script-aware): uncapped labels shredded at
|
|
534
|
+
// high N ("ry|ry|ry…", gate-14 baseline). Floor-bound cats ellipsize.
|
|
535
|
+
const catFontV = hasLabels ? Math.max(9, Math.min(catFont, Math.floor(((barWpx + gapPx) * 0.94) / (longestCatU * 0.62)))) : catFont;
|
|
536
|
+
const fitCatV = (t) => (0, template_utils_1.fitEmUnits)(t, Math.max(2, ((barWpx + gapPx) * 0.94) / (catFontV * 0.62)));
|
|
537
|
+
const valueFontV = Math.max(9, Math.min(valueFont, Math.floor(((barWpx + gapPx) * 0.9) / (longestValU * 0.62))));
|
|
538
|
+
const labelU = valueLabels.show ? snap((valueFontV * 1.4 / plotH) * Q, HEIGHT_STEP) : 0;
|
|
539
|
+
const columnBands = (nodeFor) => Array.from({ length: N }, (_, i) => ({ weight: 1, node: nodeFor(i) }));
|
|
540
|
+
const barColumn = (i) => {
|
|
541
|
+
let h = snap(fractions[i] * Q, HEIGHT_STEP);
|
|
542
|
+
h = Math.min(Q - HEIGHT_STEP, Math.max(HEIGHT_STEP, h));
|
|
543
|
+
const barStart = anim.intro.delaySec + i * anim.intro.staggerSec;
|
|
544
|
+
const dur = anim.intro.durationSec;
|
|
545
|
+
// Value label reveal at the bar's half-growth mark: `premium` fades it in
|
|
546
|
+
// over the back half (lands as the bar arrives, not floating from t=0);
|
|
547
|
+
// `light` enable-gates it to pop at that same moment (no alpha geq).
|
|
548
|
+
const labelOverlay = anim.reduceMotion
|
|
549
|
+
? undefined
|
|
550
|
+
: fade
|
|
551
|
+
? { startAtSec: barStart + dur * 0.5, alpha: (0, template_utils_1.u01)(Math.max(0.1, dur * 0.5)) } // premium: fade in
|
|
552
|
+
: { enable: `gte(t,${(barStart + dur * 0.5).toFixed(3)})` }; // light: enable-gate pop
|
|
553
|
+
// Column top → optional value-label band → bar. The label sits just above
|
|
554
|
+
// the bar's final top; tall bars give up the label band so the bar wins.
|
|
555
|
+
const topU = Q - h;
|
|
556
|
+
const labU = labelU > 0 && topU > labelU ? labelU : 0;
|
|
557
|
+
if (labU > 0)
|
|
558
|
+
anyValueLabel = true;
|
|
559
|
+
return rowSplit([
|
|
560
|
+
{ weight: topU - labU, node: EMPTY },
|
|
561
|
+
...(labU > 0 ? [{ weight: labU, node: paint((0, template_utils_1.bindProp)((0, template_utils_1.tag)(textCell(formatValue(values[i], valueLabels, maxValue), valueFontV, theme.textPrimary, "center", "bottom", undefined, labelOverlay), "value-label"), "values", i)) }] : []),
|
|
562
|
+
{ weight: h, node: barNode(barColorAt(i), i, barStart, dur, anim.intro.ease, anim.reduceMotion, fade, "y", insetXV) },
|
|
563
|
+
]);
|
|
564
|
+
};
|
|
565
|
+
const barsNode = colSplit(columnBands(barColumn));
|
|
566
|
+
// ── Plot = gridlines (back) → bars → value-axis + baseline edge strips ──
|
|
567
|
+
// Each gridline is its OWN overlay layer (flattened into one nested chain,
|
|
568
|
+
// not pre-stacked — a pre-stacked `F{F{…}}` used as an overlay base would
|
|
569
|
+
// form an illegal overlay chain `A{B}{C}`).
|
|
570
|
+
// Gridlines include the MAX edge (top) as a normal line but skip the zero
|
|
571
|
+
// edge (bottom) — the baseline covers it. `.slice(1)` drops the i=0 (bottom)
|
|
572
|
+
// line that excludeEdges:false emits first.
|
|
573
|
+
const gridSources = grid.show && gridCount > 1
|
|
574
|
+
? (0, template_utils_1.buildGridlineSources)({ direction: "horizontal", count: gridCount, excludeEdges: false, origin: "bottom", color: theme.grid, opacity: theme.gridAlpha, thicknessFrac: 0.0025 }).slice(1)
|
|
575
|
+
: [];
|
|
576
|
+
const plotLayers = [...gridSources.map((s) => paint(s)), barsNode];
|
|
577
|
+
// Conventional L-axes: value axis along the tick edge (left), baseline at zero (bottom).
|
|
578
|
+
if (valueAxis.show)
|
|
579
|
+
plotLayers.push(paint(edgeStrip(theme.axis, theme.axisAlpha, "left")));
|
|
580
|
+
if (baseline.show)
|
|
581
|
+
plotLayers.push(paint(edgeStrip(theme.axis, theme.axisAlpha, "bottom")));
|
|
582
|
+
const plotNode = overlay(plotLayers);
|
|
583
|
+
// ── Tick rail (M = gridCount+1 values, top = max → bottom = min) ──
|
|
584
|
+
const tickLabelsV = Array.from({ length: gridCount + 1 }, (_v, i) => formatValue(maxValue - (i / gridCount) * (maxValue - minValue), valueLabels, maxValue));
|
|
585
|
+
const longestTickUV = Math.max(1, ...tickLabelsV.map((t) => (0, template_utils_1.textEmUnits)(t)));
|
|
586
|
+
const tickFontV = Math.max(8, Math.min(tickFont, Math.floor((tickRailW * 0.78) / (longestTickUV * 0.62))));
|
|
587
|
+
const tickRail = hasTicks
|
|
588
|
+
? tickRailNode(tickLabelsV, tickFontV, theme.eyebrow, "row")
|
|
589
|
+
: EMPTY;
|
|
590
|
+
// Body row: [tick rail | plot]. The plot is a clipping child doc.
|
|
591
|
+
const plotRef = wrapAsChild("plot", plotNode);
|
|
592
|
+
const bodyNode = tickRailW > 0 ? colSplit([{ weight: tickRailW, node: tickRail }, { weight: plotW, node: plotRef }]) : plotRef;
|
|
593
|
+
// ── Category labels (offset under the plot, same column bands as bars) ──
|
|
594
|
+
const catLabels = hasLabels
|
|
595
|
+
? colSplit(columnBands((i) => { var _a; return paint((0, template_utils_1.bindProp)((0, template_utils_1.tag)(textCell(fitCatV((_a = props.labels[i]) !== null && _a !== void 0 ? _a : ""), catFontV, theme.textMuted, "center", "middle"), "cat-label"), "labels", i)); }))
|
|
596
|
+
: EMPTY;
|
|
597
|
+
const catNode = hasLabels && tickRailW > 0
|
|
598
|
+
? colSplit([{ weight: tickRailW, node: EMPTY }, { weight: plotW, node: catLabels }])
|
|
599
|
+
: catLabels;
|
|
600
|
+
// ── Content bands: title / body / category ──
|
|
601
|
+
contentNode = rowSplit([
|
|
602
|
+
{ weight: titleBandH, node: titleNode },
|
|
603
|
+
{ weight: plotH, node: bodyNode },
|
|
604
|
+
{ weight: catBandH, node: catNode },
|
|
605
|
+
]);
|
|
606
|
+
}
|
|
607
|
+
else {
|
|
608
|
+
// ════════════════════ HORIZONTAL ════════════════════
|
|
609
|
+
// Bars grow rightward from a left baseline, stacked top→bottom. Category
|
|
610
|
+
// labels sit in a left rail; value ticks run along the bottom; gridlines
|
|
611
|
+
// are vertical. Mirrors the vertical layout with x/y roles swapped.
|
|
612
|
+
const hasTicksH = grid.show && gridCount >= 1;
|
|
613
|
+
const tickBandH = hasTicksH ? Math.round(tickFont * 1.8) : 0;
|
|
614
|
+
const catRailW = hasLabels ? Math.max(Math.round(contentW * 0.10), catFont * 4) : 0;
|
|
615
|
+
const bodyH = contentH - titleBandH - tickBandH;
|
|
616
|
+
const plotW = contentW - catRailW;
|
|
617
|
+
if (bodyH < 8 || plotW < 8) {
|
|
618
|
+
return Promise.resolve((0, template_utils_1.makeErrorMosaic)("plot area too small after bands", { title: `${this.id}`, width: W, height: H }));
|
|
619
|
+
}
|
|
620
|
+
// One EQUAL band per bar, half-gap carved inside (gap-as-inset — see the
|
|
621
|
+
// vertical branch for why the interleaved px stack was replaced).
|
|
622
|
+
const cellH = bodyH / N;
|
|
623
|
+
const insetYH = layout.barThickness != null
|
|
624
|
+
? Math.max(0, (1 - Math.min(1, layout.barThickness / cellH)) / 2)
|
|
625
|
+
: gapInsetFrac(gapRatio);
|
|
626
|
+
const barHpx = cellH * (1 - 2 * insetYH);
|
|
627
|
+
const gapHpx = cellH - barHpx;
|
|
628
|
+
// Cat rail cap (script-aware, 0.86 of the rail) + a value-label gutter
|
|
629
|
+
// sized to the LONGEST formatted value (the old flat 2.4em band clipped
|
|
630
|
+
// anything past ~4 chars). Floor-bound cats ellipsize.
|
|
631
|
+
const catFontH = hasLabels ? Math.max(9, Math.min(catFont, Math.floor((catRailW * 0.86) / (longestCatU * 0.62)))) : catFont;
|
|
632
|
+
const fitCatH = (t) => (0, template_utils_1.fitEmUnits)(t, Math.max(2, (catRailW * 0.86) / (catFontH * 0.62)));
|
|
633
|
+
const labelUw = valueLabels.show ? Math.min(40, snap(((valueFont * (longestValU * 0.62 + 0.8)) / plotW) * Q, HEIGHT_STEP)) : 0;
|
|
634
|
+
const rowBands = (nodeFor) => Array.from({ length: N }, (_, i) => ({ weight: 1, node: nodeFor(i) }));
|
|
635
|
+
const barRow = (i) => {
|
|
636
|
+
let w = snap(fractions[i] * Q, HEIGHT_STEP);
|
|
637
|
+
w = Math.min(Q - HEIGHT_STEP, Math.max(HEIGHT_STEP, w));
|
|
638
|
+
const barStart = anim.intro.delaySec + i * anim.intro.staggerSec;
|
|
639
|
+
const dur = anim.intro.durationSec;
|
|
640
|
+
const labelOverlay = anim.reduceMotion
|
|
641
|
+
? undefined
|
|
642
|
+
: fade
|
|
643
|
+
? { startAtSec: barStart + dur * 0.5, alpha: (0, template_utils_1.u01)(Math.max(0.1, dur * 0.5)) } // premium: fade in
|
|
644
|
+
: { enable: `gte(t,${(barStart + dur * 0.5).toFixed(3)})` }; // light: enable-gate pop
|
|
645
|
+
// Bar (grows right) → optional value label just past its end → empty rest.
|
|
646
|
+
const restU = Q - w;
|
|
647
|
+
const labW = labelUw > 0 && restU > labelUw ? labelUw : 0;
|
|
648
|
+
if (labW > 0)
|
|
649
|
+
anyValueLabel = true;
|
|
650
|
+
return colSplit([
|
|
651
|
+
{ weight: w, node: barNode(barColorAt(i), i, barStart, dur, anim.intro.ease, anim.reduceMotion, fade, "x", insetYH) },
|
|
652
|
+
...(labW > 0 ? [{ weight: labW, node: paint((0, template_utils_1.bindProp)((0, template_utils_1.tag)(textCell(formatValue(values[i], valueLabels, maxValue), valueFont, theme.textPrimary, "left", "middle", { left: 0.15 }, labelOverlay), "value-label"), "values", i)) }] : []),
|
|
653
|
+
{ weight: restU - labW, node: EMPTY },
|
|
654
|
+
]);
|
|
655
|
+
};
|
|
656
|
+
const barsNode = rowSplit(rowBands(barRow));
|
|
657
|
+
// Vertical gridlines: include the MAX edge (right) as a normal line, skip the
|
|
658
|
+
// zero edge (left) which the baseline covers (`.slice(1)` drops the i=0 line).
|
|
659
|
+
const gridSources = grid.show && gridCount > 1
|
|
660
|
+
? (0, template_utils_1.buildGridlineSources)({ direction: "vertical", count: gridCount, excludeEdges: false, origin: "left", color: theme.grid, opacity: theme.gridAlpha, thicknessFrac: 0.0025 }).slice(1)
|
|
661
|
+
: [];
|
|
662
|
+
const plotLayers = [...gridSources.map((s) => paint(s)), barsNode];
|
|
663
|
+
// Conventional L-axes: value axis along the tick edge (bottom), baseline at zero (left).
|
|
664
|
+
if (valueAxis.show)
|
|
665
|
+
plotLayers.push(paint(edgeStrip(theme.axis, theme.axisAlpha, "bottom")));
|
|
666
|
+
if (baseline.show)
|
|
667
|
+
plotLayers.push(paint(edgeStrip(theme.axis, theme.axisAlpha, "left")));
|
|
668
|
+
const plotNode = overlay(plotLayers);
|
|
669
|
+
// Category rail (left): one label per bar row, aligned to the bar rows.
|
|
670
|
+
const catRail = hasLabels
|
|
671
|
+
? rowSplit(rowBands((i) => { var _a; return paint((0, template_utils_1.bindProp)((0, template_utils_1.tag)(textCell(fitCatH((_a = props.labels[i]) !== null && _a !== void 0 ? _a : ""), catFontH, theme.textMuted, "right", "middle", { right: 0.12 }), "cat-label"), "labels", i)); }))
|
|
672
|
+
: EMPTY;
|
|
673
|
+
const plotRef = wrapAsChild("plot", plotNode);
|
|
674
|
+
const bodyNode = catRailW > 0 ? colSplit([{ weight: catRailW, node: catRail }, { weight: plotW, node: plotRef }]) : plotRef;
|
|
675
|
+
// Tick band (bottom): values min (left) → max (right), aligned under the plot.
|
|
676
|
+
const tickLabelsH = Array.from({ length: gridCount + 1 }, (_v, i) => formatValue(minValue + (i / gridCount) * (maxValue - minValue), valueLabels, maxValue));
|
|
677
|
+
const longestTickUH = Math.max(1, ...tickLabelsH.map((t) => (0, template_utils_1.textEmUnits)(t)));
|
|
678
|
+
// The 3-unit tick slivers garble at narrow canvases (6px cells for 10px
|
|
679
|
+
// text at 480 wide) — widen the cell just enough for the longest tick,
|
|
680
|
+
// capping the font only when even a full-pitch cell can't hold it (the
|
|
681
|
+
// alpine bar-graph block, ported).
|
|
682
|
+
const MH = gridCount + 1;
|
|
683
|
+
let tickFontH = tickFont;
|
|
684
|
+
const maxNeedH = Math.floor(plotW / MH);
|
|
685
|
+
let needH = Math.ceil(longestTickUH * 0.62 * tickFontH) + 2;
|
|
686
|
+
if (needH > maxNeedH) {
|
|
687
|
+
tickFontH = Math.max(8, Math.floor(maxNeedH / (longestTickUH * 0.62)));
|
|
688
|
+
needH = Math.ceil(longestTickUH * 0.62 * tickFontH) + 2;
|
|
689
|
+
}
|
|
690
|
+
const cellPx3H = (plotW * 3) / (MH * 3 + (MH - 1) * 20);
|
|
691
|
+
const TICKH = needH <= cellPx3H ? 3 : Math.min(60, Math.ceil((needH * (MH - 1) * 20) / Math.max(1, plotW - needH * MH)));
|
|
692
|
+
const tickRail = hasTicksH
|
|
693
|
+
? tickRailNode(tickLabelsH, tickFontH, theme.eyebrow, "col", TICKH)
|
|
694
|
+
: EMPTY;
|
|
695
|
+
const tickBandNode = hasTicksH && catRailW > 0 ? colSplit([{ weight: catRailW, node: EMPTY }, { weight: plotW, node: tickRail }]) : tickRail;
|
|
696
|
+
contentNode = rowSplit([
|
|
697
|
+
{ weight: titleBandH, node: titleNode },
|
|
698
|
+
{ weight: bodyH, node: bodyNode },
|
|
699
|
+
{ weight: tickBandH, node: tickBandNode },
|
|
700
|
+
]);
|
|
701
|
+
}
|
|
702
|
+
// ── Card surface (full canvas; rounded corners reveal theme.surfaceApp) ──
|
|
703
|
+
const cardNode = paint((0, template_utils_1.makeColorTile)(theme.surface, {
|
|
704
|
+
effects: {
|
|
705
|
+
rounding: { cornerStyle: "rounded", borderRadius: cornerRadius },
|
|
706
|
+
stroke: { position: "inner", width: 0.002, color: theme.border, alpha: tokens.borderAlpha },
|
|
707
|
+
},
|
|
708
|
+
}));
|
|
709
|
+
const root = overlay([cardNode, insetNode(contentNode, pad, pad, pad, pad, W, H)]);
|
|
710
|
+
const doc = {
|
|
711
|
+
kind: "mosaic_document",
|
|
712
|
+
version: 1,
|
|
713
|
+
assets: {},
|
|
714
|
+
m0: root.m0,
|
|
715
|
+
sources: root.sources,
|
|
716
|
+
...(Object.keys(childDocs).length ? { children: childDocs } : {}),
|
|
717
|
+
backgroundColor: theme.surfaceApp,
|
|
718
|
+
fps: ctx.target.fps,
|
|
719
|
+
durationMs: ctx.target.durationMs,
|
|
720
|
+
};
|
|
721
|
+
// Dev tripwire (the alpine bar-graph pattern, ported to the canonical
|
|
722
|
+
// template): every bar the same thickness, every text group fits its slot
|
|
723
|
+
// at the CLI's metrics. No expr text → full coverage. Falsy debugLayout
|
|
724
|
+
// (default) returns the doc untouched at zero cost.
|
|
725
|
+
return Promise.resolve((0, template_utils_1.withLayoutContract)(doc, ctx, {
|
|
726
|
+
templateId: "@m0saic/charts/bar-graph/v2",
|
|
727
|
+
relations: N >= 2 ? [{ label: "bar", equal: orientation === "vertical" ? "width" : "height", tolerance: 0.02, tolerancePx: 1 }] : [],
|
|
728
|
+
constraints: [
|
|
729
|
+
...(hasTitleBand ? [{ label: "chart-header", textFits: { charWidthEm: 0.72 } }] : []),
|
|
730
|
+
...(hasLabels ? [{ label: "cat-label", textFits: { charWidthEm: 0.62 } }] : []),
|
|
731
|
+
// anyValueLabel, not valueLabels.show: max-tall bars legitimately
|
|
732
|
+
// drop their label band (an unmatched label is a violation).
|
|
733
|
+
...(anyValueLabel ? [{ label: "value-label", textFits: { charWidthEm: 0.62 } }] : []),
|
|
734
|
+
// padPx 0: the tick bands are sized-to-fit slivers.
|
|
735
|
+
...(grid.show && gridCount >= 1 ? [{ label: "axis-tick", textFits: { charWidthEm: 0.62, padPx: 0 } }] : []),
|
|
736
|
+
],
|
|
737
|
+
debug: props.debugLayout === true,
|
|
738
|
+
}));
|
|
739
|
+
},
|
|
740
|
+
// Editor-only first-open cover — the mosaic-branding theme; hero = the
|
|
741
|
+
// template's own static default render, INLINED flat (gate-15/21 keeper).
|
|
742
|
+
async renderCover(_props, ctx) {
|
|
743
|
+
const heroBox = (0, onboarding_cover_1.brandedCoverHeroBox)(ctx, "band");
|
|
744
|
+
const heroCtx = {
|
|
745
|
+
...ctx,
|
|
746
|
+
target: { ...ctx.target, width: heroBox.width, height: heroBox.height },
|
|
747
|
+
output: { ...ctx.output, width: heroBox.width, height: heroBox.height },
|
|
748
|
+
};
|
|
749
|
+
const hero = (await exports.ChartsBarGraphV2.render({
|
|
750
|
+
...exports.ChartsBarGraphV2.defaultProps,
|
|
751
|
+
anim: { ...exports.ChartsBarGraphV2.defaultProps.anim, reduceMotion: true },
|
|
752
|
+
}, heroCtx));
|
|
753
|
+
return (0, onboarding_cover_1.buildBrandedCover)({
|
|
754
|
+
ctx,
|
|
755
|
+
// Band variant (founder ruling 08-30): basic viz needs no
|
|
756
|
+
// explanation — hero full-bleed + brand band, nothing else.
|
|
757
|
+
variant: "band",
|
|
758
|
+
copy: {
|
|
759
|
+
productName: "Bar Graph",
|
|
760
|
+
title: "A bar chart.",
|
|
761
|
+
},
|
|
762
|
+
hero: (theme) => (0, onboarding_cover_1.onboardingFrame)((0, onboarding_cover_1.inlineHeroDoc)(hero), theme.borderStrong),
|
|
763
|
+
heroAssets: hero.assets,
|
|
764
|
+
children: hero.children,
|
|
765
|
+
});
|
|
766
|
+
},
|
|
767
|
+
};
|
|
768
|
+
(0, template_utils_1.registerTemplate)(exports.ChartsBarGraphV2);
|