m0saic 0.2.2 → 0.3.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 +22 -7
- package/README.md +23 -5
- package/dist/browseE2e.js +1 -1
- package/dist/connectionsFromEnv.js +1 -1
- package/dist/e2eTemplateVariants.js +1 -1
- package/dist/frontDoor.js +1 -1
- package/dist/index.js +1 -1
- package/dist/inlineDsl.js +1 -1
- package/dist/mcp/bridgeClient.js +1 -0
- package/dist/mcp/server.js +1 -0
- package/dist/mcp/tools.js +1 -0
- package/dist/mosaicxRunner.js +1 -1
- package/dist/outputPattern.js +1 -1
- package/dist/showcaseFeed.js +1 -1
- package/dist/templateDoctor.js +1 -1
- package/dist/utils/checkFeasibility.js +1 -1
- package/dist/utils/collectRenderErrors.js +1 -1
- package/dist/utils/enrichImageAlphaFromDoc.js +1 -1
- package/dist/utils/ensureFfmpeg.js +1 -1
- package/dist/utils/extractLayoutMeta.js +1 -1
- package/dist/utils/failureHints.js +1 -1
- package/dist/utils/ffmpegProbe.js +1 -1
- package/dist/utils/formatM0saicForCli.js +1 -1
- package/dist/utils/hashFile.js +1 -1
- package/dist/utils/helpGroups.js +1 -1
- package/dist/utils/installContext.js +1 -0
- package/dist/utils/invocation.js +1 -1
- package/dist/utils/licenseActivation.js +1 -0
- package/dist/utils/licenseActivationWorker.js +1 -0
- package/dist/utils/mosaicSpinner.js +1 -1
- package/dist/utils/parseDimensions.js +1 -1
- package/dist/utils/pathInfo.js +1 -1
- package/dist/utils/readJsonArg.js +1 -1
- package/dist/utils/renderOutcome.js +1 -1
- package/dist/utils/renderReport.js +1 -1
- package/dist/utils/renderSignals.js +1 -1
- package/dist/utils/renderWorkspace.js +1 -1
- package/dist/utils/reportOutputFormat.js +1 -0
- package/dist/utils/setupFfmpeg.js +1 -1
- package/dist/utils/telemetry.js +1 -1
- package/dist/utils/telemetryFlushWorker.js +1 -1
- package/dist/utils/telemetryUpstream.js +1 -1
- package/dist/utils/telemetryUsage.js +1 -1
- package/dist/utils/toolchainConfig.js +1 -1
- package/dist/utils/tutorialDuration.js +1 -1
- package/dist/utils/updateCheck.js +1 -1
- package/dist/utils/updateCheckWorker.js +1 -1
- package/dist/utils/validateSourceCounts.js +1 -1
- package/dist/utils/versions.js +1 -1
- package/dist/webCustomizeLink.js +1 -1
- package/node_modules/@m0saic/community-m/NOTICE +9 -0
- package/node_modules/@m0saic/community-m/release.json +2 -2
- package/node_modules/@m0saic/core/dist/core/buildChildMosaicSource.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildChunkCommands.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildEncodeCommands.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildLavfiSource.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildMediaSource.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildMosaicNode.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildMosaicPlanFromFile.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildSvgTextSource.js +1 -1
- package/node_modules/@m0saic/core/dist/core/buildTextRenderCommand.js +1 -1
- package/node_modules/@m0saic/core/dist/core/collectRefTargets.js +1 -1
- package/node_modules/@m0saic/core/dist/core/index.js +1 -1
- package/node_modules/@m0saic/core/dist/core/maskCacheDir.js +1 -1
- package/node_modules/@m0saic/core/dist/core/maskWorkerBridge.js +1 -1
- package/node_modules/@m0saic/core/dist/core/playbackPlaySpeed.js +1 -1
- package/node_modules/@m0saic/core/dist/core/prepareProps.js +1 -1
- package/node_modules/@m0saic/core/dist/core/primaryOutput.js +1 -1
- package/node_modules/@m0saic/core/dist/core/rasterizeMaskPng.js +1 -1
- package/node_modules/@m0saic/core/dist/core/rasterizeSvgMediaPng.js +1 -1
- package/node_modules/@m0saic/core/dist/core/refTargetTap.js +1 -1
- package/node_modules/@m0saic/core/dist/core/resolveMasks.js +1 -1
- package/node_modules/@m0saic/core/dist/core/resolveMasksSync.js +1 -1
- package/node_modules/@m0saic/core/dist/core/resolveStrokeRingsSync.js +1 -1
- package/node_modules/@m0saic/core/dist/core/roundedRectMask.js +1 -1
- package/node_modules/@m0saic/core/dist/core/strokeRing.js +1 -1
- package/node_modules/@m0saic/core/dist/core/svgRaster.js +1 -1
- package/node_modules/@m0saic/core/dist/defaults.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/backgroundImageInput.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/bufferGuard.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/ffmpegCommands.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyBackdropBlur.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyBlur.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyBorderRadius.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyCamera.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyChromaKey.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyFade.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyGrade.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyMask.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyNoise.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyPixelize.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyRotate.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyStroke.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/applyTileEffects.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/coverCrop.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/index.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/filters/sourceRectCrop.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/gridLowering.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/index.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/splitAvMux.js +1 -1
- package/node_modules/@m0saic/core/dist/ffmpeg/threadGuard.js +1 -1
- package/node_modules/@m0saic/core/dist/flatten/index.js +1 -1
- package/node_modules/@m0saic/core/dist/fs/index.js +1 -1
- package/node_modules/@m0saic/core/dist/fs/tempWorkspace.js +1 -1
- package/node_modules/@m0saic/core/dist/index.js +1 -1
- package/node_modules/@m0saic/core/dist/media/buildAssetManifestFromInputs.js +1 -1
- package/node_modules/@m0saic/core/dist/media/buildMediaRegistryFromInput.js +1 -1
- package/node_modules/@m0saic/core/dist/media/collectMediaInputsFromInvocationProps.js +1 -1
- package/node_modules/@m0saic/core/dist/media/collectMediaInputsFromMosaicRenderableFile.js +1 -1
- package/node_modules/@m0saic/core/dist/media/collectMediaInputsFromProps.js +1 -1
- package/node_modules/@m0saic/core/dist/media/index.js +1 -1
- package/node_modules/@m0saic/core/dist/media/internalMintAsset.js +1 -1
- package/node_modules/@m0saic/core/dist/media/remoteUrl.js +1 -1
- package/node_modules/@m0saic/core/dist/media/stageUnsafeFilenames.js +1 -1
- package/node_modules/@m0saic/core/dist/media/types.js +1 -1
- package/node_modules/@m0saic/core/dist/output/index.js +1 -1
- package/node_modules/@m0saic/core/dist/output/resolveOutputFormat.js +1 -1
- package/node_modules/@m0saic/core/dist/output/types.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/cellLuminanceProbe.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/extractSubtitleCues.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/helpers.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/index.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/luminanceProbe.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/probeMedia.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/runFFprobe.js +1 -1
- package/node_modules/@m0saic/core/dist/probe/types.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/engineRedaction.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/ffmpegFailure.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/filterPreflight.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/hashFile.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/index.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/pathInfo.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/perfHeatmap.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/perfReport.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/pipelineM0p.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/renderCostModel.constants.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/renderCostModel.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/renderReport.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/renderSidecars.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/resolveMosaicx.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/runPlan.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/types.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/upstream.js +1 -1
- package/node_modules/@m0saic/core/dist/runtime/writeSidecars.js +1 -1
- package/node_modules/@m0saic/core/dist/types/chunk.js +1 -1
- package/node_modules/@m0saic/core/dist/types/index.js +1 -1
- package/node_modules/@m0saic/core/dist/types/mosaic-plan.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/assertTiming.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/command.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/createEngineContext.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/createTemplateRenderCache.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/ffmpegColor.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/formatDuration.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/fsSafeId.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/index.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/lowerRenderableToMosaicDocument.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/movSafeCodec.js +1 -1
- package/node_modules/@m0saic/core/dist/utils/resolveBoxFrac.js +1 -1
- package/node_modules/@m0saic/core/dist/validate/index.js +1 -1
- package/node_modules/@m0saic/core/scripts/mask-rasterize-core.js +1 -1
- package/node_modules/@m0saic/core/scripts/mask-rasterize-worker.js +1 -1
- package/node_modules/@m0saic/core/scripts/mask-worker-thread.js +1 -1
- package/node_modules/@m0saic/dictionary/NOTICE +9 -0
- package/node_modules/@m0saic/dictionary/README.md +315 -0
- package/node_modules/@m0saic/dictionary/package.json +1 -1
- package/node_modules/@m0saic/dsl/package.json +1 -1
- package/node_modules/@m0saic/dsl-file-formats/dist/cjs/agent.js +6 -0
- package/node_modules/@m0saic/dsl-file-formats/dist/cjs/m0/parseM0File.js +1 -1
- package/node_modules/@m0saic/dsl-file-formats/dist/cjs/m0/serializeM0File.js +2 -2
- package/node_modules/@m0saic/dsl-file-formats/dist/cjs/m0c/m0cFile.js +3 -3
- package/node_modules/@m0saic/dsl-file-formats/dist/cjs/types.js +1 -1
- package/node_modules/@m0saic/dsl-file-formats/package.json +1 -1
- package/node_modules/@m0saic/dsl-stdlib/dist/cjs/builders/bakeM0cInsets.js +1 -0
- package/node_modules/@m0saic/dsl-stdlib/dist/cjs/builders/index.js +1 -1
- package/node_modules/@m0saic/dsl-stdlib/package.json +1 -1
- package/node_modules/@m0saic/knowledge/LICENSE +21 -0
- package/node_modules/@m0saic/knowledge/README.md +71 -0
- package/node_modules/@m0saic/knowledge/dist/index.js +1 -0
- package/node_modules/@m0saic/knowledge/docs/README.md +60 -0
- package/node_modules/@m0saic/knowledge/docs/file-formats/m0-iteration-protocol.md +120 -0
- package/node_modules/@m0saic/knowledge/docs/file-formats/m0p-and-custom-field.md +195 -0
- package/node_modules/@m0saic/knowledge/docs/handbook/README.md +27 -0
- package/node_modules/@m0saic/knowledge/docs/handbook/composition-arithmetic.md +278 -0
- package/node_modules/@m0saic/knowledge/docs/handbook/dsl-complexity.md +75 -0
- package/node_modules/@m0saic/knowledge/docs/handbook/dsl-rules.md +367 -0
- package/node_modules/@m0saic/knowledge/docs/handbook/feasibility-precision-quantization.md +591 -0
- package/node_modules/@m0saic/knowledge/docs/handbook/m0-construction-methods.md +201 -0
- package/node_modules/@m0saic/knowledge/docs/handbook/precision-tiers.md +84 -0
- package/node_modules/@m0saic/knowledge/docs/m0saic-thesis.md +95 -0
- package/node_modules/@m0saic/knowledge/docs/runtime/README.md +17 -0
- package/node_modules/@m0saic/knowledge/docs/runtime/cli-usage.md +447 -0
- package/node_modules/@m0saic/knowledge/docs/runtime/ffmpeg-expression-limits.md +117 -0
- package/node_modules/@m0saic/knowledge/docs/runtime/reduce-to-one.md +96 -0
- package/node_modules/@m0saic/knowledge/docs/skills/README.md +40 -0
- package/node_modules/@m0saic/knowledge/docs/skills/axis-and-geometry.md +103 -0
- package/node_modules/@m0saic/knowledge/docs/skills/dsl-stdlib-method-catalog.md +7 -0
- package/node_modules/@m0saic/knowledge/docs/skills/identity.md +123 -0
- package/node_modules/@m0saic/knowledge/docs/skills/labels-and-masks.md +170 -0
- package/node_modules/@m0saic/knowledge/docs/skills/m0saic-string-generation.md +251 -0
- package/node_modules/@m0saic/knowledge/docs/skills/more-atoms-not-bigger-atoms.md +77 -0
- package/node_modules/@m0saic/knowledge/docs/skills/overlay-semantics.md +194 -0
- package/node_modules/@m0saic/knowledge/docs/skills/parse-apis.md +79 -0
- package/node_modules/@m0saic/knowledge/docs/skills/passthrough-semantics.md +136 -0
- package/node_modules/@m0saic/knowledge/docs/skills/structural-construction.md +86 -0
- package/node_modules/@m0saic/knowledge/docs/skills/text-in-templates.md +126 -0
- package/node_modules/@m0saic/knowledge/docs/skills/zero-overlay-analysis.md +87 -0
- package/node_modules/@m0saic/knowledge/docs/templates/README.md +65 -0
- package/node_modules/@m0saic/knowledge/docs/templates/capability-templates.md +72 -0
- package/node_modules/@m0saic/knowledge/docs/templates/construction-strategy.md +329 -0
- package/node_modules/@m0saic/knowledge/docs/templates/data-pipeline.md +324 -0
- package/node_modules/@m0saic/knowledge/docs/templates/emission-patterns.md +130 -0
- package/node_modules/@m0saic/knowledge/docs/templates/geometry-recipes.md +248 -0
- package/node_modules/@m0saic/knowledge/docs/templates/layout-contract.md +168 -0
- package/node_modules/@m0saic/knowledge/docs/templates/output-resolution-tree.md +202 -0
- package/node_modules/@m0saic/knowledge/docs/templates/patterns/case-study-lessons.md +69 -0
- package/node_modules/@m0saic/knowledge/docs/templates/patterns/perf-authoring-rules.md +100 -0
- package/node_modules/@m0saic/knowledge/docs/templates/patterns/primitive-extraction-pattern.md +103 -0
- package/node_modules/@m0saic/knowledge/docs/templates/philosophy-and-contract.md +310 -0
- package/node_modules/@m0saic/knowledge/docs/templates/recursion-nested-rendering.md +154 -0
- package/node_modules/@m0saic/knowledge/docs/templates/reference/grid.md +104 -0
- package/node_modules/@m0saic/knowledge/docs/templates/reference/json-prop-type.md +169 -0
- package/node_modules/@m0saic/knowledge/docs/templates/reference/mosaic-color.md +81 -0
- package/node_modules/@m0saic/knowledge/docs/templates/reference/mosaic-placement-props.md +103 -0
- package/node_modules/@m0saic/knowledge/docs/templates/reference/prop-bindings.md +324 -0
- package/node_modules/@m0saic/knowledge/docs/templates/reference/template-flags.md +224 -0
- package/node_modules/@m0saic/knowledge/docs/templates/render-lifecycle.md +117 -0
- package/node_modules/@m0saic/knowledge/docs/templates/rendering-model-contract.md +392 -0
- package/node_modules/@m0saic/knowledge/docs/templates/standalone-pack-authoring.md +299 -0
- package/node_modules/@m0saic/knowledge/docs/templates/theming.md +81 -0
- package/node_modules/@m0saic/knowledge/docs/templates/ui-controls.md +150 -0
- package/node_modules/@m0saic/knowledge/package.json +6 -0
- package/node_modules/@m0saic/momo-types/README.md +109 -0
- package/node_modules/@m0saic/momo-types/dist/agent.js +1 -6
- package/node_modules/@m0saic/momo-types/dist/context.js +1 -1
- package/node_modules/@m0saic/momo-types/package.json +1 -1
- package/node_modules/@m0saic/platform/README.md +3 -0
- package/node_modules/@m0saic/platform/dist/cjs/index.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/mosaic/outputKind/outputKind.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/mosaic/propBindings/index.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/mosaic/propBindings/propBindings.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/mosaic/validate/validateSources.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/packages/mosaicPackages.js +1 -0
- package/node_modules/@m0saic/platform/dist/cjs/paths/m0saicRoot.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/telemetry/lifecycle.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/telemetry/preview.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/telemetry/sender.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/telemetry/usageRecorder.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/telemetry/usageStore.js +3 -3
- package/node_modules/@m0saic/platform/dist/cjs/toolchain/ffmpeg/baseline.json +25 -97
- package/node_modules/@m0saic/platform/dist/cjs/toolchain/ffmpeg/index.js +1 -1
- package/node_modules/@m0saic/platform/dist/cjs/toolchain/ffmpeg/install.js +2 -2
- package/node_modules/@m0saic/platform/dist/cjs/toolchain/goldenFfmpeg.js +6 -6
- package/node_modules/@m0saic/platform/package.json +1 -1
- package/node_modules/@m0saic/product/dist/communityRelease.js +1 -1
- package/node_modules/@m0saic/product/dist/freeTierLicense.js +1 -1
- package/node_modules/@m0saic/product/dist/index.js +1 -1
- package/node_modules/@m0saic/product/dist/licenseActivationNotice.js +1 -0
- package/node_modules/@m0saic/product/dist/licenseFile.js +1 -0
- package/node_modules/@m0saic/product/dist/licenseToken.js +1 -1
- package/node_modules/@m0saic/product/dist/makeScratchPath.js +1 -0
- package/node_modules/@m0saic/product/dist/postRenderWrapper.js +1 -1
- package/node_modules/@m0saic/product/dist/publicKeys.js +1 -1
- package/node_modules/@m0saic/product/dist/revokedKeys.js +1 -1
- package/node_modules/@m0saic/product/dist/upstreamDefaults.js +1 -1
- package/node_modules/@m0saic/product/dist/workspaceScaffold.js +1 -0
- package/node_modules/@m0saic/template-utils/dist/brand/hello-world/helloWorld.js +1 -1
- package/node_modules/@m0saic/template-utils/dist/geometry-contract/index.js +1 -1
- package/node_modules/@m0saic/template-utils/dist/geometry-contract/layoutConstraint.js +2 -2
- package/node_modules/@m0saic/template-utils/dist/m0saic/loadSession.js +1 -1
- package/node_modules/@m0saic/template-utils/dist/render/createDesignContext.js +1 -1
- package/node_modules/@m0saic/template-utils/dist/sources/makeErrorMosaic.js +2 -2
- package/node_modules/@m0saic/template-utils/dist/sources/svgTextSource.js +1 -1
- package/node_modules/@m0saic/template-utils/dist/template/auditRenderedTemplate.js +5 -5
- package/node_modules/@m0saic/template-utils/dist/template/templateConventions.js +3 -3
- package/node_modules/@m0saic/template-utils/dist/template/validateTemplateProps.js +1 -1
- package/node_modules/@m0saic/template-utils/dist/text/fitText.js +6 -6
- package/node_modules/@m0saic/template-utils/package.json +1 -1
- package/node_modules/@m0saic/templates/NOTICE +9 -0
- package/node_modules/@m0saic/templates/dist/m0saic/media/blur-regions/v1/tutorial.js +1 -1
- package/node_modules/@m0saic/templates/package.json +1 -1
- package/node_modules/@m0saic/templates-advanced/NOTICE +9 -0
- package/node_modules/@m0saic/text/package.json +1 -1
- package/node_modules/@m0saic/types/dist/analytics/consent.js +1 -1
- package/node_modules/@m0saic/types/dist/analytics/event.js +1 -1
- package/node_modules/@m0saic/types/dist/analytics/usageMetrics.js +1 -1
- package/node_modules/@m0saic/types/dist/identifiers/identifiers.js +1 -1
- package/node_modules/@m0saic/types/dist/telemetry/ffmpegFailure.js +1 -1
- package/node_modules/@m0saic/types/package.json +1 -1
- package/node_modules/@m0saic/types-internal/dist/analytics/featureKeys.js +1 -1
- package/package.json +13 -11
- package/resources/starter-base/starter-base.json +10 -0
- package/resources/starter-base/starter-base.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`);return{canvas:{width:e,height:n},docs:o,m0:r,hash:fingerprintHash(r),chars:r.length,frames:i}}
|
|
3
|
-
`)[0]).frameCount)}catch{return"?"}},"frames"),r=l
|
|
4
|
-
`)[0].slice(0,200)}l(firstLine,"firstLine");function documentsOf(t){const e=t;return!e||typeof e!="object"?[]:e.kind==="mosaic_document"&&Array.isArray(e.sources)?[e]:e.kind==="mosaic_pipeline"&&Array.isArray(e.steps)?e.steps.map(n=>n.file).filter(n=>!!n&&typeof n=="object"&&Array.isArray(n.sources)):[]}l(documentsOf,"documentsOf");function collectM0Strings(t,e=[],n={mosaicx:0,bitmap:0},o=new Set){var i,r;if(o.has(t))return{m0s:e,skipped:n};if(o.add(t),((r=(i=t.engine)===null||i===void 0?void 0:i.lattice)===null||r===void 0?void 0:r.mode)==="bitmap")return n.bitmap++,{m0s:e,skipped:n};typeof t.m0=="string"&&e.push(t.m0);const a=t.children;if(a&&typeof a=="object")for(const d of Object.values(a)){const f=d?.kind;if(typeof f=="string"&&f.startsWith("mosaicx_")){n.mosaicx++;continue}for(const b of documentsOf(d))collectM0Strings(b,e,n,o)}return{m0s:e,skipped:n}}l(collectM0Strings,"collectM0Strings");function drawnTextOf(t){var e,n,o;const i=[];for(const r of(e=t.sources)!==null&&e!==void 0?e:[]){if(!r||r.type!=="text"||!Array.isArray(r.layers))continue;const a=r.rasterizer==="svg",d=(n=r.style)!==null&&n!==void 0?n:{};for(const f of r.layers){const b=f?.content;if(!b||b.kind!=="literal"||typeof b.text!="string")continue;const x={...d,...(o=f.style)!==null&&o!==void 0?o:{}};i.push({text:b.text,svg:a,family:typeof x.fontFamily=="string"?x.fontFamily:void 0,weight:x.fontWeight,style:x.fontStyle})}}return i}l(drawnTextOf,"drawnTextOf");const CLOSED_OR_PICKED=l(t=>{var e,n;const o=(e=t.meta)===null||e===void 0?void 0:e.constraints,i=(n=t.meta)===null||n===void 0?void 0:n.control;return!!(Array.isArray(o?.oneOf)&&o.oneOf.length>0||o?.isColor||Array.isArray(i?.options)&&i.options.length>0||i?.optionsFrom||i?.optionsFromConnection||i?.colorPicker||i?.picker)},"CLOSED_OR_PICKED");function freeTextProps(t){const e=[];return(0,auditSchemaConventions_1.walkPropDefinitions)(t,(n,o)=>{var i,r,a,d;o.type==="string"&&(!((r=(i=o.meta)===null||i===void 0?void 0:i.ui)===null||r===void 0)&&r.hidden||((d=(a=o.meta)===null||a===void 0?void 0:a.ui)===null||d===void 0?void 0:d.consumer)!=="human"&&(CLOSED_OR_PICKED(o)||e.push(n)))}),e}l(freeTextProps,"freeTextProps");function valueAt(t,e){return e.split(".").reduce((n,o)=>n&&typeof n=="object"?n[o]:void 0,t)}l(valueAt,"valueAt");function fontFor(t){var e,n;try{(0,text_1.registerBundledFonts)();const o=(0,text_1.resolveFontFile)({family:t.family,weight:t.weight,style:t.style});return{path:(e=o?.path)!==null&&e!==void 0?e:(0,text_1.bundledFontPath)(),label:(n=t.family)!==null&&n!==void 0?n:"the bundled font"}}catch{return null}}l(fontFor,"fontFor");function loadFont(t){const e=(0,text_1.getCachedFont)(t);if(e)return e;try{const n=(0,text_1.getOpentype)();if(typeof n.loadSync!="function")return null;const o=n.loadSync(t);return(0,text_1.setCachedFont)(t,o),o}catch{return null}}l(loadFont,"loadFont");async function auditRenderedTemplate(t,e={}){var n,o,i,r,a,d,f,b,x,O,v,$,T;const G=String(t.id),A=(0,resolveTemplateOutputHints_1.resolveTemplateOutputHints)(t,t.defaultProps),k=(n=e.width)!==null&&n!==void 0?n:typeof A.width=="number"?A.width:1280,g=(o=e.height)!==null&&o!==void 0?o:typeof A.height=="number"?A.height:720,C=typeof A.fps=="number"?A.fps:30,F=typeof A.durationMs=="number"?A.durationMs:4e3,E=(i=e.external)!==null&&i!==void 0?i:!1,j=(r=e.record)!==null&&r!==void 0?r:!0,h={templateId:G,canvas:{width:k,height:g},notes:[],findings:[]},P=new Map,_=l((s,c)=>{var u;const y=(u=P.get(s))!==null&&u!==void 0?u:[];y.some(p=>p.key===c.key&&p.detail===c.detail)||y.push(c),P.set(s,y)},"push");if(((a=t.capabilities)===null||a===void 0?void 0:a.tier)==="capability")return h.skipped="capability tier \u2014 needs host handles a bare ctx cannot supply",h;const N=t.propsSchema,q=(d=t.defaultProps)!==null&&d!==void 0?d:{},H=l(()=>({...(0,templateRegistry_1.deepFreezeTemplate)(q)}),"productionDefaults"),I=Object.entries(N??{}).filter(([s,c])=>c?.required&&q[s]===void 0).map(([s])=>s);let R;try{const s=ctxFor(k,g,C,F,(f=e.workspaceDir)!==null&&f!==void 0?f:"/tmp/m0saic-template-audit");R=await t.render(H(),s)}catch(s){if(I.length>0)return h.skipped=`requires inputs with no default: ${I.join(", ")}`,h;_("rendersAtDefaults",{key:"render",detail:`render(defaultProps) at ${k}\xD7${g} threw: ${firstLine(s)}`})}const w=documentsOf(R);for(const s of floorViolations(w,k,g))_("safeMinimumCanvas",s);if(R!==void 0)try{const s=ctxFor(k,g,C,F,(b=e.workspaceDir)!==null&&b!==void 0?b:"/tmp/m0saic-template-audit"),c=await t.render(H(),s),u=JSON.parse(JSON.stringify(R)),y=JSON.parse(JSON.stringify(c)),p=firstDiff(u,y);p&&_("deterministic",{key:p,detail:`two renders of defaultProps at ${k}\xD7${g} differ at ${p} \u2014 a clock, Math.random, an ambient read, or a per-call id is leaking into the document.`})}catch(s){_("deterministic",{key:"render",detail:`the second render of defaultProps threw where the first did not: ${firstLine(s)}`})}for(const s of w){for(const c of textFitViolations(s,k,g,h.notes))_("textFits",c);for(const c of costViolations(s,k,g))_("costBudget",c)}const m=t.lattice,B=((x=m?.allow)!==null&&x!==void 0?x:[]).filter(s=>s&&Number.isSafeInteger(s.count)&&s.count>0),V=l((s,c,u)=>{const y={m0s:[],skipped:{mosaicx:0,bitmap:0}};for(const S of s)collectM0Strings(S,y.m0s,y.skipped);y.skipped.mosaicx>0&&h.notes.push(`latticeSmooth: ${y.skipped.mosaicx} mosaicx child(ren) not scanned at ${dims(c)} (invocations, not geometry)`),y.skipped.bitmap>0&&h.notes.push(`latticeSmooth: ${y.skipped.bitmap} bitmap child document(s) skipped at ${dims(c)} (engine.lattice.mode)`);const p=m?.canvas==="physical";for(const S of(0,latticeReport_1.latticeViolations)(y.m0s,{canvas:c,allow:B.map(D=>D.count),physicalCanvas:p}))_("latticeSmooth",u?{key:`${u}:${S.key}`,detail:`at ${dims(c)}: ${S.detail}`}:S)},"latticeCheck");w.length>0&&(m?.mode==="bitmap"?h.notes.push('latticeSmooth: skipped \u2014 lattice.mode is "bitmap" (a baked raster is never live-composed)'):(B.length>0&&h.notes.push(`latticeSmooth: allowed content counts ${B.map(s=>`${s.count} (${s.reason})`).join(", ")}`),m?.canvas==="physical"&&h.notes.push(`latticeSmooth: hinted canvas ${k}\xD7${g} declared physical (lattice.canvas) \u2014 a rough axis is not reported; the counts it explains are charged to it`),V(w,{width:k,height:g},""))),h.layout=layoutFingerprintOf(w,k,g);for(const s of(O=e.sweepCanvases)!==null&&O!==void 0?O:[])if(!(s.width===k&&s.height===g))try{const c=ctxFor(s.width,s.height,C,F,(v=e.workspaceDir)!==null&&v!==void 0?v:"/tmp/m0saic-template-audit"),u=documentsOf(await t.render(H(),c));for(const y of floorViolations(u,s.width,s.height))_("canvasEnvelope",y);u.length>0&&m?.mode!=="bitmap"&&m?.canvas!=="physical"&&V(u,{width:s.width,height:s.height},dims(s))}catch(c){h.notes.push(`canvasEnvelope: render at ${dims(s)} threw: ${firstLine(c)}`)}const M=new Set;for(const s of w){const c=(0,frameResolution_1.resolvePropBindings)(s,k,g,{propsSchema:N});for(const[u,y]of Object.entries(c.byProp))y.some(p=>p.childPath.length===0)&&M.add(u);for(const u of c.rejected)u.childPath.length>0||_("bindingsSound",{key:u.propKey,detail:`binding on "${u.propKey}" was rejected (${u.reason}) \u2014 ${REJECTION_HINT[u.reason]}`})}if(w.length>0){const s=w.flatMap(drawnTextOf),c=s.map(p=>p.text);for(const p of freeTextProps(N)){const S=valueAt(q,p);typeof S!="string"||S.trim().length<2||M.has(p)||c.some(D=>D.includes(S))&&_("bindingsCover",{key:p,detail:`"${p}" (default ${JSON.stringify(S.length>40?`${S.slice(0,37)}\u2026`:S)}) is drawn as text but no source binds it \u2014 wrap the source that shows it: bindProp(src, "${p}").`})}let u=!1;const y=new Set;for(const p of s){if(!p.svg)continue;const S=[...p.text].filter(U=>U.charCodeAt(0)>127&&U!==`
|
|
5
|
-
`);if(
|
|
1
|
+
"use strict";var ot=Object.defineProperty;var c=(t,e)=>ot(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.NESTED_BG_PROP=exports.COST_BUDGETS=exports.STANDARD_SWEEP_CANVASES=void 0,exports.fingerprintHash=fingerprintHash,exports.layoutFingerprintOf=layoutFingerprintOf,exports.diffLayoutFingerprint=diffLayoutFingerprint,exports.layoutFingerprintFinding=layoutFingerprintFinding,exports.accountableProps=accountableProps,exports.numberSpellings=numberSpellings,exports.drawnAsNumber=drawnAsNumber,exports.auditRenderedTemplate=auditRenderedTemplate;const resolveTemplateOutputHints_1=require("./resolveTemplateOutputHints"),dsl_1=require("@m0saic/dsl"),text_1=require("@m0saic/text"),platform_1=require("@m0saic/platform"),frameResolution_1=require("../geometry-contract/frameResolution"),latticeReport_1=require("../lattice/latticeReport"),auditSchemaConventions_1=require("./auditSchemaConventions"),templateRegistry_1=require("./templateRegistry"),templateConventions_1=require("./templateConventions");exports.STANDARD_SWEEP_CANVASES=[{width:1920,height:1080},{width:1080,height:1920},{width:1080,height:1080}],exports.COST_BUDGETS={frames:400,sources:400,overlayDepth:20,inlineMasks:200};const RENDER_TIME_CONVENTIONS=["rendersAtDefaults","bindingsSound","bindingsCover","bindingsDeclared","bindingHints","canvasFill","svgGlyphCoverage","safeMinimumCanvas","canvasEnvelope","deterministic","textFits","costBudget","latticeSmooth"];function fingerprintHash(t){let e=2166136261,n=-2145608618;for(let o=0;o<t.length;o++){const i=t.charCodeAt(o);e=Math.imul(e^i,16777619)>>>0,n=Math.imul(n^i+o,16777619)>>>0}return e.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}c(fingerprintHash,"fingerprintHash");function layoutFingerprintOf(t,e,n){const o=[];let i=0;for(const l of t){const f=flattenedM0(l,e,n);if(f){o.push(f);try{i+=(0,dsl_1.getComplexityMetricsFast)(f).frameCount}catch{}}}if(o.length===0)return;const r=o.join(`
|
|
2
|
+
`);return{canvas:{width:e,height:n},docs:o,m0:r,hash:fingerprintHash(r),chars:r.length,frames:i}}c(layoutFingerprintOf,"layoutFingerprintOf");function diffLayoutFingerprint(t,e){if(t===e)return{same:!0,detail:""};let n=0;const o=Math.min(t.length,e.length);for(;n<o&&t[n]===e[n];)n++;const i=c(l=>{try{return String((0,dsl_1.getComplexityMetricsFast)(l.split(`
|
|
3
|
+
`)[0]).frameCount)}catch{return"?"}},"frames"),r=c(l=>l.slice(Math.max(0,n-12),n+28).replace(/\n/g,"\u23CE"),"snip");return{same:!1,detail:`flattened layout differs from the committed fingerprint at char ${n} (committed ${t.length} chars / ${i(t)} frames \u2192 now ${e.length} chars / ${i(e)} frames): \u2026${r(t)}\u2026 \u2192 \u2026${r(e)}\u2026`}}c(diffLayoutFingerprint,"diffLayoutFingerprint");function layoutFingerprintFinding(t,e,n,o=!1){const i=diffLayoutFingerprint(e,n);return i.same?null:(0,templateConventions_1.makeTemplateConventionFinding)(t,"layoutFingerprint",[{key:"layout",detail:i.detail}],o)}c(layoutFingerprintFinding,"layoutFingerprintFinding");function costViolations(t,e,n){var o;const i=[],r=flattenedM0(t,e,n);if(!r||!(0,dsl_1.validateM0String)(r).ok)return i;const l=c((g,F,T,M=null)=>{if(F>exports.COST_BUDGETS[g]){const j=M===null?"":` on child document "${M}"`;i.push({key:g,detail:`${g} ${F}${j} exceeds the budget of ${exports.COST_BUDGETS[g]} \u2014 ${T}`})}},"over");let f=0;try{f=(0,dsl_1.getComplexityMetricsFast)(r).frameCount}catch{}l("frames",f,"past a few hundred tiles the planner's per-process budgets bite and the canvas blanks.");const v=(o=t.sources)!==null&&o!==void 0?o:[];l("sources",v.length,"every source is an ffmpeg input or filter; hundreds multiply the graph.");let m={value:0,node:null},b={value:0,node:null};return forEachDocumentNode(t,(g,F)=>{var T,M,j,q;const E=((T=g.sources)!==null&&T!==void 0?T:[]).filter(_=>{var $;return _&&typeof _=="object"&&(($=_.mask)===null||$===void 0?void 0:$.kind)==="inline-mask"}).length;if(E>b.value&&(b={value:E,node:F}),E===0||typeof g.m0!="string")return;const C=g.size;let P=0;try{const _=(0,dsl_1.parseM0StringComplete)(g.m0,(M=C?.width)!==null&&M!==void 0?M:e,(j=C?.height)!==null&&j!==void 0?j:n);if(_.ok)for(const $ of _.ir.editorFrames)P=Math.max(P,Number((q=$.overlayDepth)!==null&&q!==void 0?q:0))}catch{}P>m.value&&(m={value:P,node:F})}),l("overlayDepth",m.value,"the engine drops inline masks past ~25 overlay layers on one node; nest a child document instead.",m.node),l("inlineMasks",b.value,"hundreds of inline masks on one node overflow the mask resolver's argv.",b.node),i}c(costViolations,"costViolations");function forEachDocumentNode(t,e,n=null,o=new Set){var i,r;if(!t||typeof t!="object"||o.has(t)||(o.add(t),((r=(i=t.engine)===null||i===void 0?void 0:i.lattice)===null||r===void 0?void 0:r.mode)==="bitmap"))return;e(t,n);const l=t.children;if(!(!l||typeof l!="object"))for(const[f,v]of Object.entries(l)){const m=v?.kind;if(!(typeof m=="string"&&m.startsWith("mosaicx_")))for(const b of documentsOf(v))forEachDocumentNode(b,e,f,o)}}c(forEachDocumentNode,"forEachDocumentNode");function sides(t){if(typeof t=="number")return{top:t,right:t,bottom:t,left:t};const e=t??{},n=c((r,l)=>typeof e[r]=="number"?e[r]:l,"n"),o=n("x",0),i=n("y",0);return{top:n("top",i),right:n("right",o),bottom:n("bottom",i),left:n("left",o)}}c(sides,"sides");function firstDiff(t,e,n="$"){if(t===e)return null;if(typeof t!=typeof e||t===null||e===null||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return n;const o=Object.keys(t),i=Object.keys(e);for(const r of new Set([...o,...i])){const l=firstDiff(t[r],e[r],`${n}.${r}`);if(l)return l}return null}c(firstDiff,"firstDiff");function textFitViolations(t,e,n,o){var i;const r=[],{framesByLogical:l}=(0,frameResolution_1.resolveDocFrames)(t,e,n);return((i=t.sources)!==null&&i!==void 0?i:[]).forEach((v,m)=>{var b,g,F,T;if(!v||v.type!=="text"||v.rasterizer!=="svg"||!Array.isArray(v.layers))return;const M=l[m];if(!M)return;const j=(b=v.style)!==null&&b!==void 0?b:{},q=(g=v.placement)!==null&&g!==void 0?g:{};for(const[I,E]of v.layers.entries()){const C=E?.content;if(!C||C.kind!=="literal"||typeof C.text!="string"||!C.text.trim())continue;const P={...j,...(F=E.style)!==null&&F!==void 0?F:{}},_=P.fontSize;if(typeof _!="number"||!(_>0))continue;const $={...q,...(T=E.placement)!==null&&T!==void 0?T:{}},k=sides($.inset),w=sides($.padding),K=M.width*Math.max(0,1-k.left-k.right),V=M.height*Math.max(0,1-k.top-k.bottom),W=c(N=>typeof N=="number"?N:typeof N=="string"&&/^-?\d+(\.\d+)?$/.test(N.trim())?Number(N):0,"px"),G=K*Math.max(0,1-w.left-w.right)-Math.max(0,W($.xExpr)),x=V*Math.max(0,1-w.top-w.bottom)-Math.max(0,W($.yExpr)),L=fontFor({family:typeof P.fontFamily=="string"?P.fontFamily:void 0,weight:P.fontWeight,style:P.fontStyle});let y;try{y=(0,text_1.measureText)(C.text,{fontSize:_,...L?{fontPath:L.path}:{}})}catch(N){o.push(`textFits: could not measure src[${m}] layer ${I}: ${firstLine(N)}`);continue}const R=typeof P.lineHeight=="number"?P.lineHeight:1.25,H=_+Math.max(0,y.lines-1)*_*R,U=Math.max(1,_*.1);if(y.width>G+U||H>x+U){const N=C.text.replace(/\s+/g," ").slice(0,32)+(C.text.length>32?"\u2026":"");r.push({key:`src[${m}]${v.layers.length>1?`.layer[${I}]`:""}`,detail:`"${N}" at ${_}px needs ${Math.round(y.width)}\xD7${Math.round(H)} px but its cell offers ${Math.round(G)}\xD7${Math.round(x)} px at ${e}\xD7${n} \u2014 svg text clips silently.`})}}}),r}c(textFitViolations,"textFitViolations");const dims=c(t=>`${Math.round(t.width)}\xD7${Math.round(t.height)}`,"dims");function flattenedM0(t,e,n){const o=!!t.children&&Object.keys(t.children).length>0;try{const i=(0,platform_1.flattenMosaicDocument)({file:t,width:e,height:n,resolveRef:c(()=>null,"resolveRef")});if(i.ok)return String(i.file.m0)}catch{}return o?null:String(t.m0)}c(flattenedM0,"flattenedM0");function floorViolations(t,e,n){const o=[];for(const i of t){const r=flattenedM0(i,e,n);if(!r)continue;const l=(0,platform_1.checkLayoutFloors)(r,{width:e,height:n});if(!l||!l.below)continue;const f=l.floors;o.push({key:dims({width:e,height:n}),detail:`at ${dims({width:e,height:n})} the layout's safe minimum is ${dims(f.safeMin)} (feasibility ${dims(f.feasibility)}, precision ${dims(f.precision)}) \u2014 `+(l.culls?"cells are culled: content is missing.":"cells are squashed.")})}return o}c(floorViolations,"floorViolations");function ctxFor(t,e,n,o,i){const r={width:t,height:e,fps:n,durationMs:o};return{mode:"render",target:r,output:{...r,workspaceDir:i},media:{}}}c(ctxFor,"ctxFor");function firstLine(t){return(t instanceof Error?t.message:String(t)).split(`
|
|
4
|
+
`)[0].slice(0,200)}c(firstLine,"firstLine");function documentsOf(t){const e=t;return!e||typeof e!="object"?[]:e.kind==="mosaic_document"&&Array.isArray(e.sources)?[e]:e.kind==="mosaic_pipeline"&&Array.isArray(e.steps)?e.steps.map(n=>n.file).filter(n=>!!n&&typeof n=="object"&&Array.isArray(n.sources)):[]}c(documentsOf,"documentsOf");function collectM0Strings(t,e=[],n={mosaicx:0,bitmap:0},o=new Set){var i,r;if(o.has(t))return{m0s:e,skipped:n};if(o.add(t),((r=(i=t.engine)===null||i===void 0?void 0:i.lattice)===null||r===void 0?void 0:r.mode)==="bitmap")return n.bitmap++,{m0s:e,skipped:n};typeof t.m0=="string"&&e.push(t.m0);const l=t.children;if(l&&typeof l=="object")for(const f of Object.values(l)){const v=f?.kind;if(typeof v=="string"&&v.startsWith("mosaicx_")){n.mosaicx++;continue}for(const m of documentsOf(f))collectM0Strings(m,e,n,o)}return{m0s:e,skipped:n}}c(collectM0Strings,"collectM0Strings");function drawnTextOf(t){var e,n,o;const i=[];for(const r of(e=t.sources)!==null&&e!==void 0?e:[]){if(!r||r.type!=="text"||!Array.isArray(r.layers))continue;const l=r.rasterizer==="svg",f=(n=r.style)!==null&&n!==void 0?n:{},v=(0,platform_1.sourceBindings)(r.editor).map(m=>m.propKey).filter(m=>typeof m=="string");for(const m of r.layers){const b=m?.content;if(!b||b.kind!=="literal"||typeof b.text!="string")continue;const g={...f,...(o=m.style)!==null&&o!==void 0?o:{}};i.push({text:b.text,svg:l,boundTo:v,family:typeof g.fontFamily=="string"?g.fontFamily:void 0,weight:g.fontWeight,style:g.fontStyle})}}return i}c(drawnTextOf,"drawnTextOf");const CLOSED_OR_PICKED=c(t=>{var e,n;const o=(e=t.meta)===null||e===void 0?void 0:e.constraints,i=(n=t.meta)===null||n===void 0?void 0:n.control;return!!(Array.isArray(o?.oneOf)&&o.oneOf.length>0||o?.isColor||Array.isArray(i?.options)&&i.options.length>0||i?.optionsFrom||i?.optionsFromConnection||i?.colorPicker||i?.picker)},"CLOSED_OR_PICKED");function freeTextProps(t){const e=[];return(0,auditSchemaConventions_1.walkPropDefinitions)(t,(n,o)=>{var i,r,l,f;o.type==="string"&&(!((r=(i=o.meta)===null||i===void 0?void 0:i.ui)===null||r===void 0)&&r.hidden||((f=(l=o.meta)===null||l===void 0?void 0:l.ui)===null||f===void 0?void 0:f.consumer)!=="human"&&(CLOSED_OR_PICKED(o)||e.push(n)))}),e}c(freeTextProps,"freeTextProps");function accountableProps(t){const e=[];return(0,auditSchemaConventions_1.walkPropDefinitions)(t,(n,o)=>{var i,r,l,f,v,m,b,g;if(!((r=(i=o.meta)===null||i===void 0?void 0:i.ui)===null||r===void 0)&&r.hidden||((f=(l=o.meta)===null||l===void 0?void 0:l.ui)===null||f===void 0?void 0:f.consumer)==="human")return;const F=!!(!((m=(v=o.meta)===null||v===void 0?void 0:v.constraints)===null||m===void 0)&&m.isColor||!((g=(b=o.meta)===null||b===void 0?void 0:b.control)===null||g===void 0)&&g.colorPicker);switch(o.type){case"string":F?e.push({key:n,kind:"color"}):CLOSED_OR_PICKED(o)||e.push({key:n,kind:"string"});return;case"number":CLOSED_OR_PICKED(o)||e.push({key:n,kind:"number"});return;case"media":e.push({key:n,kind:"media"});return;case"string[]":e.push({key:n,kind:F?"color element":"string element"});return;case"number[]":e.push({key:n,kind:"number element"});return;case"media[]":e.push({key:n,kind:"media element"});return;case"json":case"list":case"array":e.push({key:n,kind:isRectPicker(o)?"rect":"leaf"});return;default:return}}),e}c(accountableProps,"accountableProps"),exports.NESTED_BG_PROP="useNestedBackgroundColor";function isPlainColorFill(t){var e;return t.overlay||t.mask||t.placement||t.effects?!1:t.type==="lavfi"?typeof t.color=="string":t.type==="text"?typeof((e=t.visual)===null||e===void 0?void 0:e.backgroundColor)!="string"?!1:(Array.isArray(t.layers)?t.layers:[]).every(o=>{const i=o?.content;return!i||i.kind!=="literal"||typeof i.text!="string"||i.text.trim()===""}):!1}c(isPlainColorFill,"isPlainColorFill");function forEachSourceInTree(t,e,n=new Set){var o;for(const i of t){if(!i||typeof i!="object"||n.has(i))continue;n.add(i);for(const l of(o=i.sources)!==null&&o!==void 0?o:[])l&&typeof l=="object"&&e(l);const r=i.children;if(r&&typeof r=="object")for(const l of Object.values(r))forEachSourceInTree(documentsOf(l),e,n)}}c(forEachSourceInTree,"forEachSourceInTree");function backgroundColorsOf(t,e=new Set,n=new Set){if(!t||typeof t!="object"||n.has(t))return e;n.add(t);const o=t.backgroundColor;typeof o=="string"&&o.trim()&&e.add(o.trim().toLowerCase());const i=t.children;if(i&&typeof i=="object")for(const r of Object.values(i))for(const l of documentsOf(r))backgroundColorsOf(l,e,n);return e}c(backgroundColorsOf,"backgroundColorsOf");function isRectPicker(t){var e;const n=(e=t.meta)===null||e===void 0?void 0:e.control;return n?.picker==="regions"}c(isRectPicker,"isRectPicker");function drawnNumberProps(t){const e=[];return(0,auditSchemaConventions_1.walkPropDefinitions)(t,(n,o)=>{var i,r,l,f;o.type==="number"&&(!((r=(i=o.meta)===null||i===void 0?void 0:i.ui)===null||r===void 0)&&r.hidden||((f=(l=o.meta)===null||l===void 0?void 0:l.ui)===null||f===void 0?void 0:f.consumer)!=="human"&&(CLOSED_OR_PICKED(o)||e.push(n)))}),e}c(drawnNumberProps,"drawnNumberProps");function numberSpellings(t){if(!Number.isFinite(t))return[];const e=[String(t),t.toLocaleString("en-US")];return Number.isInteger(t)||e.push(t.toFixed(1),t.toFixed(2)),[...new Set(e)].filter(n=>n.length>=2)}c(numberSpellings,"numberSpellings");const DIGIT=/[0-9]/,digitAt=c((t,e)=>{var n;return DIGIT.test((n=t[e])!==null&&n!==void 0?n:"")},"digitAt");function drawnAsNumber(t,e){let n=t.indexOf(e);for(;n>=0;){const o=n+e.length,i=t[n-1],r=t[o],l=!digitAt(t,n-1)&&!((i==="."||i===",")&&digitAt(t,n-2)),f=!digitAt(t,o)&&!((r==="."||r===",")&&digitAt(t,o+1));if(l&&f)return!0;n=t.indexOf(e,n+1)}return!1}c(drawnAsNumber,"drawnAsNumber");function valueAt(t,e){return e.split(".").reduce((n,o)=>n&&typeof n=="object"?n[o]:void 0,t)}c(valueAt,"valueAt");function fontFor(t){var e,n;try{(0,text_1.registerBundledFonts)();const o=(0,text_1.resolveFontFile)({family:t.family,weight:t.weight,style:t.style});return{path:(e=o?.path)!==null&&e!==void 0?e:(0,text_1.bundledFontPath)(),label:(n=t.family)!==null&&n!==void 0?n:"the bundled font"}}catch{return null}}c(fontFor,"fontFor");function loadFont(t){const e=(0,text_1.getCachedFont)(t);if(e)return e;try{const n=(0,text_1.getOpentype)();if(typeof n.loadSync!="function")return null;const o=n.loadSync(t);return(0,text_1.setCachedFont)(t,o),o}catch{return null}}c(loadFont,"loadFont");async function auditRenderedTemplate(t,e={}){var n,o,i,r,l,f,v,m,b,g,F,T,M,j,q,I,E,C,P;const _=String(t.id),$=(0,resolveTemplateOutputHints_1.resolveTemplateOutputHints)(t,t.defaultProps),k=(n=e.width)!==null&&n!==void 0?n:typeof $.width=="number"?$.width:1280,w=(o=e.height)!==null&&o!==void 0?o:typeof $.height=="number"?$.height:720,K=typeof $.fps=="number"?$.fps:30,V=typeof $.durationMs=="number"?$.durationMs:4e3,W=(i=e.external)!==null&&i!==void 0?i:!1,G=(r=e.record)!==null&&r!==void 0?r:!0,x={templateId:_,canvas:{width:k,height:w},notes:[],findings:[],lagging:[]},L=new Map,y=c((s,d)=>{var u;const p=(u=L.get(s))!==null&&u!==void 0?u:[];p.some(a=>a.key===d.key&&a.detail===d.detail)||p.push(d),L.set(s,p)},"push");if(((l=t.capabilities)===null||l===void 0?void 0:l.tier)==="capability")return x.skipped="capability tier \u2014 needs host handles a bare ctx cannot supply",x;const R=t.propsSchema,H=(f=t.defaultProps)!==null&&f!==void 0?f:{},U=c(()=>({...(0,templateRegistry_1.deepFreezeTemplate)(H)}),"productionDefaults"),N=Object.entries(R??{}).filter(([s,d])=>d?.required&&H[s]===void 0).map(([s])=>s);let z;try{const s=ctxFor(k,w,K,V,(v=e.workspaceDir)!==null&&v!==void 0?v:"/tmp/m0saic-template-audit");z=await t.render(U(),s)}catch(s){if(N.length>0)return x.skipped=`requires inputs with no default: ${N.join(", ")}`,x;y("rendersAtDefaults",{key:"render",detail:`render(defaultProps) at ${k}\xD7${w} threw: ${firstLine(s)}`})}const D=documentsOf(z);for(const s of floorViolations(D,k,w))y("safeMinimumCanvas",s);if(z!==void 0)try{const s=ctxFor(k,w,K,V,(m=e.workspaceDir)!==null&&m!==void 0?m:"/tmp/m0saic-template-audit"),d=await t.render(U(),s),u=JSON.parse(JSON.stringify(z)),p=JSON.parse(JSON.stringify(d)),a=firstDiff(u,p);a&&y("deterministic",{key:a,detail:`two renders of defaultProps at ${k}\xD7${w} differ at ${a} \u2014 a clock, Math.random, an ambient read, or a per-call id is leaking into the document.`})}catch(s){y("deterministic",{key:"render",detail:`the second render of defaultProps threw where the first did not: ${firstLine(s)}`})}for(const s of D){for(const d of textFitViolations(s,k,w,x.notes))y("textFits",d);for(const d of costViolations(s,k,w))y("costBudget",d)}const O=t.lattice,Q=((b=O?.allow)!==null&&b!==void 0?b:[]).filter(s=>s&&Number.isSafeInteger(s.count)&&s.count>0),tt=c((s,d,u)=>{const p={m0s:[],skipped:{mosaicx:0,bitmap:0}};for(const h of s)collectM0Strings(h,p.m0s,p.skipped);p.skipped.mosaicx>0&&x.notes.push(`latticeSmooth: ${p.skipped.mosaicx} mosaicx child(ren) not scanned at ${dims(d)} (invocations, not geometry)`),p.skipped.bitmap>0&&x.notes.push(`latticeSmooth: ${p.skipped.bitmap} bitmap child document(s) skipped at ${dims(d)} (engine.lattice.mode)`);const a=O?.canvas==="physical";for(const h of(0,latticeReport_1.latticeViolations)(p.m0s,{canvas:d,allow:Q.map(S=>S.count),physicalCanvas:a}))y("latticeSmooth",u?{key:`${u}:${h.key}`,detail:`at ${dims(d)}: ${h.detail}`}:h)},"latticeCheck");D.length>0&&(O?.mode==="bitmap"?x.notes.push('latticeSmooth: skipped \u2014 lattice.mode is "bitmap" (a baked raster is never live-composed)'):(Q.length>0&&x.notes.push(`latticeSmooth: allowed content counts ${Q.map(s=>`${s.count} (${s.reason})`).join(", ")}`),O?.canvas==="physical"&&x.notes.push(`latticeSmooth: hinted canvas ${k}\xD7${w} declared physical (lattice.canvas) \u2014 a rough axis is not reported; the counts it explains are charged to it`),tt(D,{width:k,height:w},""))),x.layout=layoutFingerprintOf(D,k,w);for(const s of(g=e.sweepCanvases)!==null&&g!==void 0?g:[])if(!(s.width===k&&s.height===w))try{const d=ctxFor(s.width,s.height,K,V,(F=e.workspaceDir)!==null&&F!==void 0?F:"/tmp/m0saic-template-audit"),u=documentsOf(await t.render(U(),d));for(const p of floorViolations(u,s.width,s.height))y("canvasEnvelope",p);u.length>0&&O?.mode!=="bitmap"&&O?.canvas!=="physical"&&tt(u,{width:s.width,height:s.height},dims(s))}catch(d){x.notes.push(`canvasEnvelope: render at ${dims(s)} threw: ${firstLine(d)}`)}const X=new Set,Y=new Set;for(const s of D){const d=(0,frameResolution_1.resolvePropBindings)(s,k,w,{propsSchema:R});for(const[u,p]of Object.entries(d.byProp))p.some(a=>a.childPath.length===0)&&X.add(u),Y.add(u);for(const u of d.rejected)u.childPath.length>0||y("bindingsSound",{key:u.propKey,detail:`binding on "${u.propKey}" was rejected (${u.reason}) \u2014 ${REJECTION_HINT[u.reason]}`})}if(D.length>0){const s=(M=(T=t.bindings)===null||T===void 0?void 0:T.unbound)!==null&&M!==void 0?M:{},d=accountableProps(R),u=new Set(d.map(a=>a.key)),p=new Set;for(const a of D)backgroundColorsOf(a,p);for(const{key:a,kind:h}of d)if(!Y.has(a)){if(h==="color"){const S=valueAt(H,a);if(typeof S=="string"&&p.has(S.trim().toLowerCase()))continue}Object.prototype.hasOwnProperty.call(s,a)||y("bindingsDeclared",{key:a,detail:`"${a}" can carry a ${h} handle but nothing binds it \u2014 bind the rect that shows it (bindProp(src, "${a}")), or declare why it has none: bindings.unbound = { "${a}": "<reason>" }.`})}for(const[a,h]of Object.entries(s)){if(!u.has(a)){y("bindingsDeclared",{key:a,detail:`bindings.unbound names "${a}", which is not a prop that can carry a canvas handle (unknown, hidden, a closed set, a boolean, a group, an m0 prop or code) \u2014 drop the entry.`});continue}if(Y.has(a)){y("bindingsDeclared",{key:a,detail:`bindings.unbound says "${a}" has no canvas handle, but a source binds it \u2014 drop the entry, the binding is the truth.`});continue}(typeof h!="string"||h.trim().length===0)&&y("bindingsDeclared",{key:a,detail:`bindings.unbound["${a}"] has no reason \u2014 one honest word is the point of the declaration (e.g. "timing", "geometry", "determinism").`})}}if(D.length>0){const s=new Map;(0,auditSchemaConventions_1.walkPropDefinitions)(R,(u,p)=>s.set(u,p));const d=[];forEachSourceInTree(D,u=>{for(const p of(0,platform_1.sourceBindings)(u.editor)){if(p.companion)continue;const a=s.get(p.propKey);if(!a)continue;const h=p.hint;typeof h=="string"&&h.trim()||typeof a.description=="string"&&a.description.trim()||d.includes(p.propKey)||d.push(p.propKey)}});for(const u of d)y("bindingHints",{key:u,detail:`the rect bound to "${u}" shows nothing in context \u2014 a person who double-clicks it sees a label and a value, and nothing says what changing it does. Give the prop a description (propsSchema.${u}.description = "what it does and what it looks like"), or the binding its own line (bindProp(src, "${u}", i, { hint }) / withBindingHint(src, "\u2026")).`})}const Z=(j=t.canvas)===null||j===void 0?void 0:j.baseRect,et=typeof Z=="string"&&Z.trim().length>0;if(typeof Z=="string"&&!et&&y("canvasFill",{key:"canvas.baseRect",detail:'canvas.baseRect is declared with no reason \u2014 say why this template ships a full-canvas rect (e.g. "the lesson IS the full-rect base under two overlays"), or drop the field and use document.backgroundColor.'}),!et&&valueAt(H,exports.NESTED_BG_PROP)!==!0)for(const s of D){const{framesByLogical:d}=(0,frameResolution_1.resolveDocFrames)(s,k,w),u=(q=s.sources)!==null&&q!==void 0?q:[];for(let p=0;p<d.length;p++){const a=d[p],h=u[p];!a||!h||!isPlainColorFill(h)||a.x!==0||a.y!==0||a.width!==k||a.height!==w||y("canvasFill",{key:`source[${p}]`,detail:`source ${p} is a static ${String((I=h.color)!==null&&I!==void 0?I:(E=h.visual)===null||E===void 0?void 0:E.backgroundColor)} fill covering the whole ${k}\xD7${w} canvas \u2014 set document.backgroundColor instead and drop the source. A base rect is a click target over everything: in Make it is selected whenever the pointer is not on a smaller tile. (A template whose SUBJECT is that rect declares it: canvas.baseRect = "<why>". A template that must ship it because it is composed INTO another uses defaultProps.${exports.NESTED_BG_PROP} = true instead.)`})}}if(D.length>0){const s=D.flatMap(drawnTextOf),d=c((a,h,S)=>{if(S.some(A=>A.boundTo.length===0))return`"${a}" (${h}) is drawn as text but no source binds it \u2014 wrap the source that shows it: bindProp(src, "${a}").`;const B=[...new Set(S.flatMap(A=>A.boundTo))].map(A=>`"${A}"`).join(" / ");return`"${a}" (${h}) is drawn as text, but every rect that shows it already binds ${B} \u2014 a composite line. Add this prop to that rect: bindProps(src, [\u2026 , { propKey: "${a}" }]), or split the line so each prop has its own rect.`},"coverage");for(const a of freeTextProps(R)){const h=valueAt(H,a);if(typeof h!="string"||h.trim().length<2||X.has(a))continue;const S=s.filter(B=>B.text.includes(h));S.length!==0&&y("bindingsCover",{key:a,detail:d(a,`default ${JSON.stringify(h.length>40?`${h.slice(0,37)}\u2026`:h)}`,S)})}for(const a of drawnNumberProps(R)){const h=valueAt(H,a);if(typeof h!="number"||X.has(a))continue;let S,B=[];for(const A of numberSpellings(h))if(B=s.filter(J=>drawnAsNumber(J.text,A)),B.length>0){S=A;break}S&&y("bindingsCover",{key:a,detail:d(a,`default ${h}, drawn as ${JSON.stringify(S)}`,B)})}let u=!1;const p=new Set;for(const a of s){if(!a.svg)continue;const h=[...a.text].filter(A=>A.charCodeAt(0)>127&&A!==`
|
|
5
|
+
`);if(h.length===0)continue;const S=fontFor(a),B=S?loadFont(S.path):null;if(!B){u=!0;continue}for(const A of h){const J=(C=A.codePointAt(0))!==null&&C!==void 0?C:0,nt=`${S.path}:${J}`;p.has(nt)||(p.add(nt),B.charToGlyph(A).index===0&&y("svgGlyphCoverage",{key:`U+${J.toString(16).toUpperCase().padStart(4,"0")}`,detail:`"${A}" (U+${J.toString(16).toUpperCase().padStart(4,"0")}) has no glyph in ${S.label} \u2014 it renders as tofu.`}))}}u&&x.notes.push("svgGlyphCoverage: a font could not be loaded on this host; the rule was not fully checked")}for(const s of RENDER_TIME_CONVENTIONS){const d=(P=L.get(s))!==null&&P!==void 0?P:[];if(d.length===0){G&&(0,templateConventions_1.clearTemplateConventionFinding)(_,s);continue}const u=(0,templateConventions_1.makeTemplateConventionFinding)(_,s,d,W);if(e.shippedAt&&(0,templateConventions_1.compareConventionVersions)(templateConventions_1.TEMPLATE_CONVENTION_SINCE[s],e.shippedAt)>0){x.lagging.push(u),G&&(0,templateConventions_1.clearTemplateConventionFinding)(_,s);continue}G&&(0,templateConventions_1.recordTemplateConventionFinding)(u),x.findings.push(u)}return x}c(auditRenderedTemplate,"auditRenderedTemplate");const REJECTION_HINT={"unknown-prop":'no such prop in propsSchema (check the dotted path; group fields nest as "group.field").',"unsupported-type":'that prop type is not bindable (closed pickers, media, booleans, and whole lists never are; a rect binding fits only a json prop with picker: "regions" and regions.max: 1).',"index-required":"a string[] / number[] prop binds ONE element \u2014 pass the index (bindProp(src, key, i)).","path-required":'a json / list prop binds ONE leaf \u2014 pass its path (bindPropPath(src, key, [i, "field"], kind)).',"kind-required":`a structured binding must declare the leaf's kind ("string" | "number" | "color") \u2014 use bindPropPath.`};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var n=(e,o)=>u(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.TemplateConventionError=exports.TEMPLATE_CONVENTION_FIX=exports.TEMPLATE_CONVENTION_POSTURE=void 0,exports.listTemplateConventionFindings=listTemplateConventionFindings,exports.drainTemplateConventionFindings=drainTemplateConventionFindings,exports.recordTemplateConventionFinding=recordTemplateConventionFinding,exports.clearTemplateConventionFinding=clearTemplateConventionFinding,exports.makeTemplateConventionFinding=makeTemplateConventionFinding,exports.enforceTemplateConventions=enforceTemplateConventions;const auditDefaultProps_1=require("./auditDefaultProps"),auditSchemaConventions_1=require("./auditSchemaConventions");exports.TEMPLATE_CONVENTION_POSTURE={defaultProps:"throw",colorProps:"throw",noLocalPaths:"throw",browseSurface:"throw",propLabels:"record",defaultsValidate:"throw",outputFormat:"record",outputHintsResolve:"throw",repoFrontDoor:"record",rendersAtDefaults:"throw",bindingsSound:"throw",bindingsCover:"record",svgGlyphCoverage:"throw",safeMinimumCanvas:"record",canvasEnvelope:"record",deterministic:"throw",textFits:"throw",costBudget:"record",latticeSmooth:"throw",layoutFingerprint:"throw"},exports.TEMPLATE_CONVENTION_FIX={defaultProps:'"a knob shows what it does": declare the value in defaultProps (booleans / closed sets), or add meta.control.placeholder naming the unset behaviour (plain strings / numbers). A closed set must contain the unset state (add a "none" option and default it) \u2014 never default a real value over "unset".',colorProps:"a colour-valued prop declares BOTH constraints.isColor: true and control.colorPicker: true, so the editor shows a swatch picker instead of a text box.",noLocalPaths:"defaultProps must not contain absolute filesystem paths \u2014 they exist only on the authoring machine. Ship a bundled asset by relative reference, or leave the input empty.",browseSurface:"give the template a non-empty description and at least one tag \u2014 the Templates page and the manifest are built from them.",propLabels:"give every visible prop a meta.ui.label \u2014 the panel otherwise falls back to the raw key (internal templates are exempt: a building block has no panel).",outputFormat:`declare the deliverable in outputHints.format \u2014 { kind: "video", container: "mp4" } for motion, { kind: "image", container: "png" } for a still (pixelFormat: "rgba" when it ships alpha). Without it the CLI defaults the output to out.mp4 and a Make share link at defaults carries an f= ask. A template with an outputFormat knob declares the knob's DEFAULT (the knob still wins at render). Building blocks (internal: true) are exempt.`,outputHintsResolve:"keep resolveOutputHints pure and consistent \u2014 return an object, the same object on every call at defaultProps, and at defaults agree with the static outputHints for every field you return (the static hints are what the manifest and cards show). Never throw: an unknown prop value resolves to the default.",repoFrontDoor:"declare the repo's front door \u2014 repo.helloWorld = the id of the template a newcomer renders first. The canonical card is one call, defineHelloWorldTemplate({ id, subline }) from @m0saic/template-utils; a pack with its own look points the field at its own template. Hosts read the field (m0saic hello-world --template-repo, Make's Start here) and the manifest carries it.",defaultsValidate:"defaultProps must pass the template's own schema: a default outside its oneOf, beyond its min/max, of the wrong type, or over a list bound is a knob that shows one thing and renders another. (A required input with no default is fine \u2014 inputs are not defaults.)",rendersAtDefaults:"render(defaultProps) must succeed on the hinted canvas \u2014 a template whose defaults cannot render shows an error card in Make. (Templates whose required inputs have no default are skipped, not failed.)",bindingsSound:"every editor.binding must resolve against propsSchema: the prop must exist and be bindable, list props need an index, structured (json / list) props need a path AND a kind \u2014 see bindProp / bindPropPath in @m0saic/template-utils.",bindingsCover:`a prop drawn as text should be bound to the rect that shows it (bindProp(src, "<key>")) so Make's double-click edits it in place. Bind the rect that SHOWS the prop, even when its value is empty.`,svgGlyphCoverage:'every character drawn with rasterizer:"svg" must have a glyph in the font it resolves to; missing glyphs render as tofu. Use an ASCII stand-in ("->" for an arrow) or a font that has the character.',safeMinimumCanvas:"at its own hinted canvas, the template's flattened layout must clear its safe minimum (per-axis max of the feasibility and precision floors) \u2014 below it cells are squashed or culled at the template's DEFAULT size. Bound weightedSplit totals with a precision budget (never scale raw slider values into slots), or raise outputHints to a canvas the layout actually needs.",canvasEnvelope:"the layout should clear its safe minimum on the standard canvases too (1080p landscape / portrait / square); a canvas it cannot clear is one users will pick in Make and get squashed or culled cells. Declare the supported range, or make the geometry ratio-based.",deterministic:"render(defaultProps) must produce the same document twice \u2014 no Math.random, no clock, no ambient state, no per-call ids. Randomness takes a seed prop; identical seeds give identical output.",textFits:"every svg-rasterized text layer must fit the cell it lands on at the hinted canvas (measured with the rasterizer's own font, after inset and padding) \u2014 svg text never wraps or scales on its own. Fit it with fitSvgText / svgLabel, shorten it, or give the cell more room.",costBudget:"keep the rendered document inside the engine's comfort zone (see COST_BUDGETS): frame count, source count, overlay depth and inline-mask count each have a ceiling past which renders slow down quadratically, drop layers, or overflow the process argv \u2014 operations, not string length (a baked-inset m0 is long and cheap). Collapse detail into fewer, larger cells; nest a child document instead of stacking overlays.",latticeSmooth:`every split count above 12 in the rendered layout (root document and every nested child) must be 5-smooth \u2014 2\u1D43\xB73\u1D47\xB75\u1D9C \u2014 so the layout composes: inlining one template into another costs the LCM of their split counts, and one rough factor (7, 11, 121 = 11\xB2) multiplies the whole composition. Cap weighted bands with weightedSplit(\u2026, { precision: 120 }) \u2014 never round each weight to a cap on its own, that sums to 120 \xB1 1 (119/121); place rect soups with placeInsetPieces / placeOptimizedPieces (they pick divisors of the axis); take a self-frame's pitch from the divisors of its side, not round(side / K). Counts \u2264 12 with a rough factor are content fill and pass; a larger content count (53 ISO weeks) is declared as lattice: { allow: [{ count, reason }] }; a baked raster (QR, barcode, logo trace) declares lattice: { mode: "bitmap" }.`,layoutFingerprint:"the flattened layout at the hinted canvas changed from the committed fingerprint (the <slug>.layout.m0 beside the template, or layout-fingerprints/<key>.m0 for ids without a source folder). If the change is intended, re-mint with `npm run fingerprints:update` and commit the new file so the diff is reviewed; if not, a shared helper or a default drifted."};function describe(e){const o=e.violations.length;return`${e.templateId} breaks the "${e.convention}" convention \u2014 ${o} violation${o===1?"":"s"}:
|
|
1
|
+
"use strict";var h=Object.defineProperty;var o=(e,n)=>h(e,"name",{value:n,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.TemplateConventionError=exports.TEMPLATE_CONVENTION_FIX=exports.TEMPLATE_CONVENTION_SINCE=exports.TEMPLATE_CONVENTION_POSTURE=void 0,exports.compareConventionVersions=compareConventionVersions,exports.conventionVersions=conventionVersions,exports.conventionsLevel=conventionsLevel,exports.listTemplateConventionFindings=listTemplateConventionFindings,exports.drainTemplateConventionFindings=drainTemplateConventionFindings,exports.recordTemplateConventionFinding=recordTemplateConventionFinding,exports.clearTemplateConventionFinding=clearTemplateConventionFinding,exports.makeTemplateConventionFinding=makeTemplateConventionFinding,exports.enforceTemplateConventions=enforceTemplateConventions;const auditDefaultProps_1=require("./auditDefaultProps"),auditSchemaConventions_1=require("./auditSchemaConventions");exports.TEMPLATE_CONVENTION_POSTURE={defaultProps:"throw",colorProps:"throw",noLocalPaths:"throw",browseSurface:"throw",propLabels:"record",defaultsValidate:"throw",outputFormat:"record",outputHintsResolve:"throw",repoFrontDoor:"record",rendersAtDefaults:"throw",bindingsSound:"throw",bindingsCover:"record",bindingsDeclared:"throw",bindingHints:"throw",canvasFill:"throw",svgGlyphCoverage:"throw",safeMinimumCanvas:"record",canvasEnvelope:"record",deterministic:"throw",textFits:"throw",costBudget:"record",latticeSmooth:"throw",layoutFingerprint:"throw"},exports.TEMPLATE_CONVENTION_SINCE={defaultProps:"0.2.0",colorProps:"0.2.0",noLocalPaths:"0.2.0",browseSurface:"0.2.0",propLabels:"0.2.0",defaultsValidate:"0.2.0",outputFormat:"0.2.0",outputHintsResolve:"0.2.0",repoFrontDoor:"0.2.0",rendersAtDefaults:"0.2.0",bindingsSound:"0.2.0",bindingsCover:"0.2.0",bindingsDeclared:"0.3.0",bindingHints:"0.3.0",canvasFill:"0.3.0",svgGlyphCoverage:"0.2.0",safeMinimumCanvas:"0.2.0",canvasEnvelope:"0.2.0",deterministic:"0.2.0",textFits:"0.2.0",costBudget:"0.2.0",latticeSmooth:"0.2.0",layoutFingerprint:"0.2.0"};function compareConventionVersions(e,n){const t=o(l=>l.split(".").map(s=>Number.parseInt(s,10)||0),"seg"),[a,r,c]=t(e),[i,d,u]=t(n);return a-i||r-d||c-u}o(compareConventionVersions,"compareConventionVersions");function conventionVersions(){return[...new Set(Object.values(exports.TEMPLATE_CONVENTION_SINCE))].sort(compareConventionVersions)}o(conventionVersions,"conventionVersions");function conventionsLevel(e){var n,t,a;const r=conventionVersions(),c=[...new Set(e.filter(s=>s.severity==="error").map(s=>s.convention))];if(c.length===0)return{meets:(n=r[r.length-1])!==null&&n!==void 0?n:null,behind:[]};const i=new Map;for(const s of c){const p=exports.TEMPLATE_CONVENTION_SINCE[s];i.set(p,[...(t=i.get(p))!==null&&t!==void 0?t:[],s].sort())}const d=[...i.entries()].map(([s,p])=>({since:s,conventions:p})).sort((s,p)=>compareConventionVersions(s.since,p.since)),u=d[0].since,l=r.filter(s=>compareConventionVersions(s,u)<0);return{meets:(a=l[l.length-1])!==null&&a!==void 0?a:null,behind:d}}o(conventionsLevel,"conventionsLevel"),exports.TEMPLATE_CONVENTION_FIX={defaultProps:'"a knob shows what it does": declare the value in defaultProps (booleans / closed sets), or add meta.control.placeholder naming the unset behaviour (plain strings / numbers). A closed set must contain the unset state (add a "none" option and default it) \u2014 never default a real value over "unset".',colorProps:"a colour-valued prop declares BOTH constraints.isColor: true and control.colorPicker: true, so the editor shows a swatch picker instead of a text box.",noLocalPaths:"defaultProps must not contain absolute filesystem paths \u2014 they exist only on the authoring machine. Ship a bundled asset by relative reference, or leave the input empty.",browseSurface:"give the template a non-empty description and at least one tag \u2014 the Templates page and the manifest are built from them.",propLabels:"give every visible prop a meta.ui.label \u2014 the panel otherwise falls back to the raw key (internal templates are exempt: a building block has no panel).",outputFormat:`declare the deliverable in outputHints.format \u2014 { kind: "video", container: "mp4" } for motion, { kind: "image", container: "png" } for a still (pixelFormat: "rgba" when it ships alpha). Without it the CLI defaults the output to out.mp4 and a Make share link at defaults carries an f= ask. A template with an outputFormat knob declares the knob's DEFAULT (the knob still wins at render). Building blocks (internal: true) are exempt.`,outputHintsResolve:"keep resolveOutputHints pure and consistent \u2014 return an object, the same object on every call at defaultProps, and at defaults agree with the static outputHints for every field you return (the static hints are what the manifest and cards show). Never throw: an unknown prop value resolves to the default.",repoFrontDoor:"declare the repo's front door \u2014 repo.helloWorld = the id of the template a newcomer renders first. The canonical card is one call, defineHelloWorldTemplate({ id, subline }) from @m0saic/template-utils; a pack with its own look points the field at its own template. Hosts read the field (m0saic hello-world --template-repo, Make's Start here) and the manifest carries it.",defaultsValidate:"defaultProps must pass the template's own schema: a default outside its oneOf, beyond its min/max, of the wrong type, or over a list bound is a knob that shows one thing and renders another. (A required input with no default is fine \u2014 inputs are not defaults.)",rendersAtDefaults:"render(defaultProps) must succeed on the hinted canvas \u2014 a template whose defaults cannot render shows an error card in Make. (Templates whose required inputs have no default are skipped, not failed.)",bindingsSound:"every editor.binding must resolve against propsSchema: the prop must exist and be bindable, list props need an index, structured (json / list) props need a path AND a kind \u2014 see bindProp / bindPropPath in @m0saic/template-utils.",bindingsCover:`a prop drawn as text should be bound to the rect that shows it (bindProp(src, "<key>")) so Make's double-click edits it in place. Bind the rect that SHOWS the prop, even when its value is empty.`,bindingsDeclared:'every prop that CAN carry a canvas handle is either bound on the rect that shows it (bindProp / bindProps / bindPropPath / bindPropRect) or named in template.bindings.unbound with the reason it has none ({ fps: "timing" }). The accountable props are free-text and colour strings, numbers, media, one element of a basic list, one leaf of json / list / array, and a regions-picker rect; booleans, closed sets, group containers, the m0 family, code and hidden / human props are never canvas things. A declaration naming an unknown prop, or one that is actually bound, is itself a violation \u2014 a stale entry is worse than none. Templates hashed in frozen.manifest.json are exempt.',bindingHints:`every bound rect must show one line in context \u2014 what changing the value does and what it looks like \u2014 because Make puts it under the inline editor, on the tile card and in the handle's tooltip, and a person who double-clicks should not have to open the settings or a manual. It comes from the binding's own hint (bindProp(src, "<key>", i, { hint: "\u2026" }) / withBindingHint(src, "\u2026")) or, for every binding of the prop at once, the prop's description (propsSchema.<key>.description). One plain sentence; never the value itself. A companion leaf (filled only by a media drop) needs none. Templates hashed in frozen.manifest.json are exempt.`,canvasFill:'fill the canvas with document.backgroundColor, never a full-canvas colour rect. A base rect is a click target that covers everything \u2014 it gets selected in Make any time the pointer is not on a smaller tile \u2014 and the document background does the same job with no rect at all. Only a STATIC, fully opaque, unshaped fill counts: a curtain wipe (overlay.enable / window), a scrim (overlay.alpha), a masked shape and a rounded card are all legitimate and never flagged. Two declared exceptions, and they mean different things: canvas.baseRect = "<why>" is the general one (the rect IS the subject \u2014 a lesson about full-rect nodes, a tutorial surface), and defaultProps.useNestedBackgroundColor = true is the narrow one (this template is COMPOSED INTO another, whose slot its own backgroundColor cannot fill). An empty baseRect reason is refused.',svgGlyphCoverage:'every character drawn with rasterizer:"svg" must have a glyph in the font it resolves to; missing glyphs render as tofu. Use an ASCII stand-in ("->" for an arrow) or a font that has the character.',safeMinimumCanvas:"at its own hinted canvas, the template's flattened layout must clear its safe minimum (per-axis max of the feasibility and precision floors) \u2014 below it cells are squashed or culled at the template's DEFAULT size. Bound weightedSplit totals with a precision budget (never scale raw slider values into slots), or raise outputHints to a canvas the layout actually needs.",canvasEnvelope:"the layout should clear its safe minimum on the standard canvases too (1080p landscape / portrait / square); a canvas it cannot clear is one users will pick in Make and get squashed or culled cells. Declare the supported range, or make the geometry ratio-based.",deterministic:"render(defaultProps) must produce the same document twice \u2014 no Math.random, no clock, no ambient state, no per-call ids. Randomness takes a seed prop; identical seeds give identical output.",textFits:"every svg-rasterized text layer must fit the cell it lands on at the hinted canvas (measured with the rasterizer's own font, after inset and padding) \u2014 svg text never wraps or scales on its own. Fit it with fitSvgText / svgLabel, shorten it, or give the cell more room.",costBudget:"keep the rendered document inside the engine's comfort zone (see COST_BUDGETS): frame count, source count, overlay depth and inline-mask count each have a ceiling past which renders slow down quadratically, drop layers, or overflow the process argv \u2014 operations, not string length (a baked-inset m0 is long and cheap). Collapse detail into fewer, larger cells; nest a child document instead of stacking overlays.",latticeSmooth:`every split count above 12 in the rendered layout (root document and every nested child) must be 5-smooth \u2014 2\u1D43\xB73\u1D47\xB75\u1D9C \u2014 so the layout composes: inlining one template into another costs the LCM of their split counts, and one rough factor (7, 11, 121 = 11\xB2) multiplies the whole composition. Cap weighted bands with weightedSplit(\u2026, { precision: 120 }) \u2014 never round each weight to a cap on its own, that sums to 120 \xB1 1 (119/121); place rect soups with placeInsetPieces / placeOptimizedPieces (they pick divisors of the axis); take a self-frame's pitch from the divisors of its side, not round(side / K). Counts \u2264 12 with a rough factor are content fill and pass; a larger content count (53 ISO weeks) is declared as lattice: { allow: [{ count, reason }] }; a baked raster (QR, barcode, logo trace) declares lattice: { mode: "bitmap" }.`,layoutFingerprint:"the flattened layout at the hinted canvas changed from the committed fingerprint (the <slug>.layout.m0 beside the template, or layout-fingerprints/<key>.m0 for ids without a source folder). If the change is intended, re-mint with `npm run fingerprints:update` and commit the new file so the diff is reviewed; if not, a shared helper or a default drifted."};function describe(e){const n=e.violations.length;return`${e.templateId} breaks the "${e.convention}" convention \u2014 ${n} violation${n===1?"":"s"}:
|
|
2
2
|
`+e.violations.map(t=>` \u2022 ${t.detail}`).join(`
|
|
3
3
|
`)+`
|
|
4
|
-
Fix: ${exports.TEMPLATE_CONVENTION_FIX[e.convention]}`}
|
|
4
|
+
Fix: ${exports.TEMPLATE_CONVENTION_FIX[e.convention]}`}o(describe,"describe");class TemplateConventionError extends Error{static{o(this,"TemplateConventionError")}constructor(n){const t=Array.isArray(n)?n:[n];if(t.length===0)throw new Error("TemplateConventionError: at least one finding");super(t.map(describe).join(`
|
|
5
5
|
|
|
6
|
-
`)),this.name="TemplateConventionError",this.templateId=t[0].templateId,this.convention=t[0].convention,this.violations=t[0].violations,this.findings=t}}exports.TemplateConventionError=TemplateConventionError;const LOG_KEY="__m0saicTemplateConventionFindings";function log(){const e=globalThis;return Array.isArray(e[LOG_KEY])||(e[LOG_KEY]=[]),e[LOG_KEY]}
|
|
6
|
+
`)),this.name="TemplateConventionError",this.templateId=t[0].templateId,this.convention=t[0].convention,this.violations=t[0].violations,this.findings=t}}exports.TemplateConventionError=TemplateConventionError;const LOG_KEY="__m0saicTemplateConventionFindings";function log(){const e=globalThis;return Array.isArray(e[LOG_KEY])||(e[LOG_KEY]=[]),e[LOG_KEY]}o(log,"log");function listTemplateConventionFindings(){return log().slice()}o(listTemplateConventionFindings,"listTemplateConventionFindings");function drainTemplateConventionFindings(){const e=log().slice();return log().length=0,e}o(drainTemplateConventionFindings,"drainTemplateConventionFindings");function recordTemplateConventionFinding(e){const n=log(),t=n.findIndex(a=>a.templateId===e.templateId&&a.convention===e.convention);t>=0?n[t]=e:n.push(e)}o(recordTemplateConventionFinding,"recordTemplateConventionFinding");function clearTemplateConventionFinding(e,n){const t=log(),a=t.findIndex(r=>r.templateId===e&&r.convention===n);a>=0&&t.splice(a,1)}o(clearTemplateConventionFinding,"clearTemplateConventionFinding");function makeTemplateConventionFinding(e,n,t,a){return{templateId:e,convention:n,external:a,severity:exports.TEMPLATE_CONVENTION_POSTURE[n]==="throw"?"error":"warning",violations:t}}o(makeTemplateConventionFinding,"makeTemplateConventionFinding");const DEFINITION_TIME_AUDITS=[{convention:"defaultProps",run:o(e=>(0,auditDefaultProps_1.auditDefaultProps)(e),"run")},{convention:"colorProps",run:o(e=>(0,auditSchemaConventions_1.auditColorProps)(e),"run")},{convention:"noLocalPaths",run:o(e=>(0,auditSchemaConventions_1.auditNoLocalPaths)(e),"run")},{convention:"browseSurface",run:o(e=>(0,auditSchemaConventions_1.auditBrowseSurface)(e),"run")},{convention:"propLabels",run:o(e=>(0,auditSchemaConventions_1.auditPropLabels)(e),"run")},{convention:"defaultsValidate",run:o(e=>(0,auditSchemaConventions_1.auditDefaultsValidate)(e),"run")},{convention:"outputFormat",run:o(e=>(0,auditSchemaConventions_1.auditOutputFormat)(e),"run")},{convention:"outputHintsResolve",run:o(e=>(0,auditSchemaConventions_1.auditOutputHintsResolve)(e),"run")}];function enforceTemplateConventions(e,n={}){var t;const a=(t=n.mode)!==null&&t!==void 0?t:"throw",r=String(e.id),c=[],i=[];for(const d of DEFINITION_TIME_AUDITS){const u=d.run(e);if(u.length===0){clearTemplateConventionFinding(r,d.convention);continue}const l=makeTemplateConventionFinding(r,d.convention,u,a==="record");recordTemplateConventionFinding(l),c.push(l),a==="throw"&&l.severity==="error"&&i.push(l)}if(i.length>0)throw new TemplateConventionError(i);return c}o(enforceTemplateConventions,"enforceTemplateConventions");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var m=(
|
|
1
|
+
"use strict";var p=Object.defineProperty;var m=(t,n)=>p(t,"name",{value:n,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateTemplateProps=validateTemplateProps;const types_1=require("@m0saic/types");function isPlainObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}m(isPlainObject,"isPlainObject");function validateSingleProp(t,n,e){var a;const o=[];if(e==null)return n.required&&o.push({code:(0,types_1.asDiagnosticCode)("MISSING_REQUIRED_PROP"),message:`Missing required prop "${t}".`,severity:"error"}),o;const c=n.type;let s=!0;switch(c){case"string":s=typeof e=="string";break;case"number":s=typeof e=="number"&&Number.isFinite(e);break;case"boolean":s=typeof e=="boolean";break;case"string[]":s=Array.isArray(e)&&e.every(i=>typeof i=="string");break;case"number[]":s=Array.isArray(e)&&e.every(i=>typeof i=="number"&&Number.isFinite(i));break;case"media":s=typeof e=="string"||typeof e=="object"&&e!==null;break;case"media[]":s=Array.isArray(e)&&e.every(i=>typeof i=="string"||typeof i=="object"&&i!==null);break;case"group":s=isPlainObject(e);break;case"list":case"array":s=Array.isArray(e);break;case"code":s=isPlainObject(e)&&typeof e.language=="string"&&e.language.trim().length>0&&typeof e.code=="string";break;case"json":s=e!==void 0;break;default:s=!0;break}if(!s){const i=Array.isArray(e)?"array":typeof e;return o.push({code:(0,types_1.asDiagnosticCode)("INVALID_PROP_TYPE"),message:`Prop "${t}" expected type "${c}" but got "${i}".`,severity:"error"}),o}const r=(a=n.meta)===null||a===void 0?void 0:a.constraints;return r&&(c==="number"&&typeof e=="number"&&(r.min!=null&&e<r.min&&o.push({code:(0,types_1.asDiagnosticCode)("PROP_BELOW_MIN"),message:`Prop "${t}" must be >= ${r.min} (got ${e}).`,severity:"error"}),r.max!=null&&e>r.max&&o.push({code:(0,types_1.asDiagnosticCode)("PROP_ABOVE_MAX"),message:`Prop "${t}" must be <= ${r.max} (got ${e}).`,severity:"error"})),Array.isArray(e)&&(r.minItems!=null&&e.length<r.minItems&&o.push({code:(0,types_1.asDiagnosticCode)("PROP_TOO_FEW_ITEMS"),message:`Prop "${t}" must have at least ${r.minItems} items (got ${e.length}).`,severity:"error"}),r.maxItems!=null&&e.length>r.maxItems&&o.push({code:(0,types_1.asDiagnosticCode)("PROP_TOO_MANY_ITEMS"),message:`Prop "${t}" must have at most ${r.maxItems} items (got ${e.length}).`,severity:"error"})),r.oneOf&&typeof e=="string"&&(r.oneOf.includes(e)||o.push({code:(0,types_1.asDiagnosticCode)("PROP_NOT_IN_ONEOF"),message:`Prop "${t}" must be one of [${r.oneOf.join(", ")}] (got "${e}").`,severity:"error"}))),o}m(validateSingleProp,"validateSingleProp");function validateTemplateProps(t,n){var e;const a=[],o=(e=t.propsSchema)!==null&&e!==void 0?e:{},c=Object.keys(o);for(const s of c){const r=o[s];if(!r)continue;const i=n[s];a.push(...validateSingleProp(s,r,i))}return a}m(validateTemplateProps,"validateTemplateProps");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`),P=(0,textToPath_1.measureText)(m,{fontSize:
|
|
3
|
-
`),fontSize:
|
|
1
|
+
"use strict";var p=Object.defineProperty;var _=(u,x)=>p(u,"name",{value:x,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_MIN_FIT_PX=void 0,exports.wrapMeasured=wrapMeasured,exports.fitSvgText=fitSvgText,exports.fitSvgParagraphs=fitSvgParagraphs,exports.fitSvgLines=fitSvgLines;const textToPath_1=require("./textToPath");function wrapMeasured(u,x,g){const e=u.trim().split(/\s+/).filter(n=>n.length>0),i=[];let t="";for(const n of e){const s=t.length===0?n:`${t} ${n}`;t.length===0||(0,textToPath_1.measureText)(s,{fontSize:x}).width<=g?t=s:(i.push(t),t=n)}return t.length>0&&i.push(t),i}_(wrapMeasured,"wrapMeasured"),exports.DEFAULT_MIN_FIT_PX=12;function fitSvgText(u,x,g,e){var i,t,n;const s=u.trim().replace(/\s+/g," "),f=x*((i=e.widthFrac)!==null&&i!==void 0?i:.72),M=g*((t=e.heightFrac)!==null&&t!==void 0?t:.66),v=_(c=>{const o=wrapMeasured(s,c,f);if(o.length>e.maxLines)return;const m=o.join(`
|
|
2
|
+
`),P=(0,textToPath_1.measureText)(m,{fontSize:c});if(!(P.width>f||P.height>M))return{text:m,fontSize:c,lineCount:o.length}},"attempt"),h=Math.max(1,Math.round((n=e.minPx)!==null&&n!==void 0?n:exports.DEFAULT_MIN_FIT_PX));let r=h,a=Math.max(h,Math.round(e.maxPx)),d=v(r);for(;r<=a;){const c=Math.floor((r+a)/2),o=v(c);o?(d=o,r=c+1):a=c-1}if(d)return d;const l=wrapMeasured(s,h,f);return{text:l.join(`
|
|
3
|
+
`),fontSize:h,lineCount:l.length}}_(fitSvgText,"fitSvgText");function fitSvgParagraphs(u,x,g,e){var i,t,n,s;const f=x*((i=e.widthFrac)!==null&&i!==void 0?i:.72),M=g*((t=e.heightFrac)!==null&&t!==void 0?t:.9),v=(n=e.maxLinesPerParagraph)!==null&&n!==void 0?n:6,h=_(o=>{const m=[];for(const F of u){const b=wrapMeasured(F,o,f);if(b.length>v)return;m.push(b.join(`
|
|
4
4
|
`))}const P=m.join(`
|
|
5
5
|
|
|
6
|
-
`),
|
|
6
|
+
`),T=(0,textToPath_1.measureText)(P,{fontSize:o});return T.width<=f&&T.height<=M?P:void 0},"attempt"),r=Math.max(1,Math.round((s=e.minPx)!==null&&s!==void 0?s:exports.DEFAULT_MIN_FIT_PX));let a=r,d=Math.max(r,Math.round(e.maxPx)),l;for(;a<=d;){const o=Math.floor((a+d)/2),m=h(o);m!==void 0?(l={text:m,fontSize:o},a=o+1):d=o-1}return l||{text:u.map(o=>wrapMeasured(o,r,f).join(`
|
|
7
7
|
`)).join(`
|
|
8
8
|
|
|
9
|
-
`),fontSize:
|
|
10
|
-
`),
|
|
9
|
+
`),fontSize:r}}_(fitSvgParagraphs,"fitSvgParagraphs");function fitSvgLines(u,x,g,e){var i,t,n;const s=x*((i=e.widthFrac)!==null&&i!==void 0?i:.72),f=g*((t=e.heightFrac)!==null&&t!==void 0?t:.72),M=u.join(`
|
|
10
|
+
`),v=_(l=>{const c=(0,textToPath_1.measureText)(M,{fontSize:l});return c.width<=s&&c.height<=f},"fits"),h=Math.max(1,Math.round((n=e.minPx)!==null&&n!==void 0?n:exports.DEFAULT_MIN_FIT_PX));let r=h,a=Math.max(h,Math.round(e.maxPx)),d=h;for(;r<=a;){const l=Math.floor((r+a)/2);v(l)?(d=l,r=l+1):a=l-1}return{text:M,fontSize:d}}_(fitSvgLines,"fitSvgLines");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
m0saic — Deterministic rectangle layout DSL and tooling
|
|
2
|
+
Copyright (c) 2026 m0saic LLC
|
|
3
|
+
|
|
4
|
+
This package is licensed under the MIT License (see LICENSE).
|
|
5
|
+
|
|
6
|
+
m0saic and the m0saic logo are trademarks of m0saic LLC.
|
|
7
|
+
This license does not grant permission to use the trade names, trademarks,
|
|
8
|
+
service marks, or product names of m0saic LLC, except as required for
|
|
9
|
+
reasonable and customary use in describing the origin of the work.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var i=(e,o)=>h(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderBlurRegionsTutorial=renderBlurRegionsTutorial;const types_1=require("@m0saic/types"),template_utils_1=require("@m0saic/template-utils"),screencap_grid_cover_1=require("../../screencap_grid/v2/screencap-grid-cover"),TUTORIAL_FPS=30,SR="/Users/qusimone/src/m0saic/packages/sandbox/production/media-blur-regions-v1/fixtures/screen_recordings",TUTORIAL_CLIPS={draw:{path:`${SR}/invoice_sr.mp4`,durationMs:10483},brush:{path:`${SR}/signed-letter_sr.mp4`,durationMs:7967},inbox:{path:`${SR}/inbox_sr.mp4`,durationMs:17533},chat:{path:`${SR}/chat_sr.mp4`,durationMs:13133}},P={bg:"#0a0c12",surface:"#141926",raised:"#1d2433",inset:"#10141f",border:"#2a3347",accent:"#f97316",accentSoft:"#fdba74",textHi:"#f5f7fa",textLo:"#9aa5b5",textMute:"#5f6b7d",frost:"#c8ccd2@0.55",target:"#e5484d"};function cardTile(e,o={}){var n;return(0,screencap_grid_cover_1.onboardingLeaf)((0,template_utils_1.makeColorTile)(e,{effects:{rounding:{cornerStyle:"rounded",borderRadius:(n=o.radius)!==null&&n!==void 0?n:.08},...o.stroke?{stroke:{position:"inner",width:.004,color:o.stroke,alpha:.9}}:{}},...o.atSec!=null?{overlay:{alpha:(0,template_utils_1.fadeInExpr)(o.atSec,.3)}}:{}}))}i(cardTile,"cardTile");function padded(e,o=5){const n=(0,screencap_grid_cover_1.onboardingSplit)("col",[o,100-2*o,o],[null,e,null]);return(0,screencap_grid_cover_1.onboardingSplit)("row",[o,100-2*o,o],[null,n,null])}i(padded,"padded");function windowCard(e,o={}){const n=i(l=>(0,screencap_grid_cover_1.onboardingSplit)("row",[1,2,1],[null,cardTile(l,{radius:.5}),null]),"dot"),r=(0,screencap_grid_cover_1.onboardingSplit)("col",[10,9,5,9,5,9,440],[null,n(P.textMute),null,n(P.textMute),null,n(P.accent),null]),t=o.chrome===!1?e:(0,screencap_grid_cover_1.onboardingSplit)("row",[8,1,89],[r,null,e]);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.05,stroke:P.border}),padded(t,o.chrome===!1?2:3))}i(windowCard,"windowCard");function pill(e,o,n={}){const r=cardTile(n.active?P.accent:P.raised,{radius:.5,atSec:n.atSec}),t=(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:e,fontSize:o.micro,color:n.active?P.bg:P.textLo,...n.atSec!=null?{fadeDelaySec:n.atSec}:{},label:`chip ${e.toLowerCase()}`}));return(0,screencap_grid_cover_1.onboardingOverlay)(r,t)}i(pill,"pill");function fadeTile(e,o,n=.25){return(0,screencap_grid_cover_1.onboardingLeaf)((0,template_utils_1.makeColorTile)(e,{overlay:{alpha:(0,template_utils_1.fadeInExpr)(o,n)}}))}i(fadeTile,"fadeTile");function dashedEdge(e,o){const n=[],r=[];for(let t=0;t<9;t++)n.push(t%2===0?fadeTile(P.accent,o,.15):null),r.push(1);return(0,screencap_grid_cover_1.onboardingSplit)(e,r,n)}i(dashedEdge,"dashedEdge");function footageMock(e){return(0,screencap_grid_cover_1.onboardingSplit)("col",[7,6,7],[(0,screencap_grid_cover_1.onboardingGuttered)("row",[cardTile("#243049",{radius:.12}),cardTile("#1a2336",{radius:.12})],12,1),(0,screencap_grid_cover_1.onboardingSplit)("row",[4,6,6],[cardTile("#1a2336",{radius:.12}),e?cardTile(P.target,{radius:.12}):cardTile("#2c3a57",{radius:.12}),cardTile("#22304b",{radius:.12})]),(0,screencap_grid_cover_1.onboardingGuttered)("row",[cardTile("#202b42",{radius:.12}),cardTile("#243049",{radius:.12})],12,1)])}i(footageMock,"footageMock");function buildHeroVisual(e){const o=windowCard(padded(footageMock(!0),4)),n=(0,screencap_grid_cover_1.onboardingSplit)("row",[8,6,7],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[5,7,9],[null,fadeTile(P.frost,.9,.45),null]),null]),r=windowCard(padded((0,screencap_grid_cover_1.onboardingOverlay)(footageMock(!0),n),4)),t=i(l=>(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:l,fontSize:e.micro,color:P.textMute,label:l.toLowerCase()})),"caption");return(0,screencap_grid_cover_1.onboardingSplit)("row",[2,12,1,2,4],[null,(0,screencap_grid_cover_1.onboardingGuttered)("col",[o,r],12,1),null,(0,screencap_grid_cover_1.onboardingGuttered)("col",[t("YOUR FILE"),t("SAME FILE \xB7 CENSORED")],12,1),null])}i(buildHeroVisual,"buildHeroVisual");function buildFlowVisual(e){const o=i((r,t,l,a)=>{const d=(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.accent,{radius:.5,atSec:a}),(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:r,fontSize:e.callout,color:P.bg,fadeDelaySec:a,label:`step ${r}`}))),s=(0,screencap_grid_cover_1.onboardingSplit)("row",[2,4,2,3,3,4],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[10,10,10],[null,d,null]),null,(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:t,fontSize:e.callout,color:P.textHi,fadeDelaySec:a,label:t.toLowerCase()})),(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:l,fontSize:e.micro,color:P.textLo,fadeDelaySec:a+.05,label:l.toLowerCase()})),null]);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.1,stroke:P.border,atSec:a}),padded(s,6))},"step"),n=(0,screencap_grid_cover_1.onboardingGuttered)("col",[o("1","Pick","video or image",.2),o("2","Draw","boxes over anything",.7),o("3","Render","same file, censored",1.2)],12,1);return(0,screencap_grid_cover_1.onboardingSplit)("row",[3,10,4],[null,n,null])}i(buildFlowVisual,"buildFlowVisual");function buildDrawVisual(e){const o=(0,screencap_grid_cover_1.onboardingSplit)("row",[1,8,1],[dashedEdge("col",.6),(0,screencap_grid_cover_1.onboardingSplit)("col",[1,8,1],[dashedEdge("row",1.5),fadeTile(P.frost,2,.5),dashedEdge("row",.9)]),dashedEdge("col",1.2)]),n=(0,screencap_grid_cover_1.onboardingSplit)("row",[21,46,33],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[31,38,31],[null,o,null]),null]),r=(0,screencap_grid_cover_1.onboardingOverlay)(footageMock(!0),n),t=(0,screencap_grid_cover_1.onboardingSplit)("col",[12,4,1],[(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:"drag on the preview",fontSize:e.micro,color:P.textMute,hAlign:"left",label:"drag hint"})),(0,screencap_grid_cover_1.onboardingSplit)("row",[1,3,1],[null,pill("Blur regions",e,{active:!0}),null]),null]);return windowCard((0,screencap_grid_cover_1.onboardingSplit)("row",[16,1,2],[padded(r,3),null,t]))}i(buildDrawVisual,"buildDrawVisual");function buildBrushVisual(e){const o=(0,screencap_grid_cover_1.onboardingGuttered)("col",[pill("Rect",e),pill("Ellipse",e),pill("Polygon",e),pill("Lasso",e),pill("Brush",e,{active:!0})],10,1),n=18,r=i((l,a)=>{const d=[],s=[];for(let u=0;u<n;u++)d.push(u>=l&&u<=a?fadeTile(P.frost,.6+u*.12,.18):null),s.push(1);return(0,screencap_grid_cover_1.onboardingSplit)("col",s,d)},"strokeRow"),t=(0,screencap_grid_cover_1.onboardingOverlay)(footageMock(!1),(0,screencap_grid_cover_1.onboardingSplit)("row",[4,2,2,2,2,2,5],[null,r(2,5),r(3,8),r(6,12),r(10,15),r(13,16),null]));return windowCard((0,screencap_grid_cover_1.onboardingSplit)("row",[3,1,15],[o,null,padded(t,2)]))}i(buildBrushVisual,"buildBrushVisual");function buildUseCasesVisual(e){const o=i((t,l,a)=>{const d=(0,screencap_grid_cover_1.onboardingSplit)("row",[4,3],[(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:t,fontSize:e.callout,color:P.textHi,fadeDelaySec:a,label:t.toLowerCase()})),(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:l,fontSize:e.micro,color:P.textLo,fadeDelaySec:a+.05,label:l.toLowerCase()}))]);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.1,stroke:P.border,atSec:a}),padded(d,8))},"useCase"),n=(0,screencap_grid_cover_1.onboardingGuttered)("col",[o("Interview faces","blur bystanders before publishing",.2),o("Dashcam plates","pixelate every plate in one pass",.5)],12,1),r=(0,screencap_grid_cover_1.onboardingGuttered)("col",[o("Screen recordings","hide emails, names, tokens",.8),o("Documents & photos","PNG in, censored PNG out",1.1)],12,1);return(0,screencap_grid_cover_1.onboardingGuttered)("row",[n,r],12,1)}i(buildUseCasesVisual,"buildUseCasesVisual");function buildFinishVisual(e){const o=i((r,t)=>(0,screencap_grid_cover_1.onboardingSplit)("col",[2,1,17],[cardTile(P.accent,{radius:.5,atSec:t}),null,(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:r,fontSize:e.body,color:P.textLo,hAlign:"left",fadeDelaySec:t,label:r.slice(0,24).toLowerCase()}))]),"row"),n=(0,screencap_grid_cover_1.onboardingGuttered)("row",[o("Audio passes through untouched",.2),o("A bad region fails loudly \u2014 never silently dropped",.55),o("mp4 \xB7 webm \xB7 png \u2014 the container follows your output",.9),o("Up to 50 regions per file",1.25)],10,2);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.08,stroke:P.border}),padded(n,7))}i(buildFinishVisual,"buildFinishVisual");const BEATS=[{name:"hero",durationMs:3800,eyebrow:"EASY BLUR",title:"Hide anything. Keep everything else.",body:"Draw a box over what must go \u2014 a face, a plate, a name \u2014 and render the same file back with that area unreadable.",detail:"Same container \xB7 same audio \xB7 censored pixels",buildVisual:buildHeroVisual},{name:"flow",durationMs:3600,eyebrow:"THE WHOLE JOB",title:"Three steps, no timeline.",body:"Pick a video or image. Draw regions on the preview. Render. That's the entire workflow \u2014 no editing skills required.",detail:"No regions yet? The file passes through untouched.",buildVisual:buildFlowVisual},{name:"draw",durationMs:5200,eyebrow:"WATCH \xB7 BLOCK OUT",title:"One drag covers the block.",body:"Open Blur regions and drag on the preview \u2014 here it's an invoice's name, address, and account number in a single box.",detail:"The box you draw is exactly what renders censored",buildVisual:buildDrawVisual},{name:"brush",durationMs:4600,eyebrow:"WATCH \xB7 KEEP IT SIMPLE",title:"The fastest shape wins.",body:"A signature isn't a rectangle \u2014 but one quick box covers it anyway. When you want precision, ellipse, polygon, lasso, and brush are right there.",detail:"Rect \xB7 ellipse \xB7 polygon \xB7 lasso \xB7 brush \u2014 mix freely",buildVisual:buildBrushVisual},{name:"inbox",durationMs:4200,eyebrow:"REAL WORLD \xB7 SCREENS",title:"Every address in one pass.",body:"Quick strips over each sender's email and the screenshot is safe to share \u2014 the list stays readable.",detail:"Works the same on any screen capture",buildVisual:buildUseCasesVisual},{name:"chat",durationMs:4200,eyebrow:"REAL WORLD \xB7 MESSAGES",title:"The code and the number.",body:"Anything you'd rather not forward: door codes, phone numbers, names. Draw, render, share the rest.",detail:"Blur reads softer \xB7 pixelate reads redacted",buildVisual:buildUseCasesVisual},{name:"usecases",durationMs:3400,eyebrow:"AND MORE",title:"Wherever pixels leak.",body:"Faces in interviews, plates in dashcam footage, whole documents. If it renders, it can be hidden.",detail:"Video or image \xB7 up to 50 regions",buildVisual:buildUseCasesVisual},{name:"finish",durationMs:3600,eyebrow:"GOOD TO KNOW",title:"Built for shipping.",body:"Close this and draw your first region \u2014 the preview is already your canvas.",detail:"Privacy is all-or-nothing by design",buildVisual:buildFinishVisual}];function beatProgress(e,o){const n=(0,screencap_grid_cover_1.onboardingGuttered)("col",BEATS.map((t,l)=>cardTile(l===e?P.accent:l<e?"#7c4a12":P.border,{radius:.5,...l===e?{atSec:.04}:{}})),3,2),r=(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:`${e+1} / ${BEATS.length}`,fontSize:o.micro,color:P.textMute,hAlign:"left",label:"tutorial progress"}));return(0,screencap_grid_cover_1.onboardingSplit)("col",[30,12,16,30,12],[null,r,null,n,null])}i(beatProgress,"beatProgress");function beatVisual(e,o){const n=TUTORIAL_CLIPS[e.name];if(!n)return{comp:e.buildVisual(o),assets:{}};const r=(0,types_1.asAssetId)(`tut-clip-${e.name}`),t={type:"media",mediaType:"video",assetId:r,placement:{fit:"contain"},playback:{clipStartMs:0,clipDurationMs:n.durationMs},editor:{owner:"template",label:`recording ${e.name}`}};return{comp:windowCard((0,screencap_grid_cover_1.onboardingLeaf)(t),{chrome:!1}),assets:{[r]:{kind:"file",path:n.path,mediaType:"video"}},clipMs:n.durationMs}}i(beatVisual,"beatVisual");function buildHeroClipBeat(e,o,n,r,t,l){const a=(0,screencap_grid_cover_1.onboardingTypeRamp)(n,r),d=r>n*.9,s=d?n*.8:n*.56,u=(0,screencap_grid_cover_1.onboardingSplit)("row",[2,4,1,10,1,9,2],[null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.eyebrow,fontSize:a.label,color:P.accent,cellWidthPx:s,hAlign:"left",fadeDelaySec:.1,label:"beat eyebrow"}),null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.title,fontSize:a.headline,color:P.textHi,cellWidthPx:s,hAlign:"left",widthFrac:.96,fadeDelaySec:.16,label:"beat title"}),null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.body,fontSize:a.body,color:P.textLo,cellWidthPx:s,hAlign:"left",widthFrac:.95,fadeDelaySec:.22,label:"beat body"}),null]),c=(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.08,stroke:P.border,atSec:.06}),padded(u,4)),b=(0,screencap_grid_cover_1.onboardingGuttered)("col",BEATS.map((S,p)=>cardTile(p===o?P.accent:p<o?"#7c4a12":P.border,{radius:.5})),3,2),g=(0,screencap_grid_cover_1.onboardingSplit)("row",[44,12,44],[null,b,null]),f=d?(0,screencap_grid_cover_1.onboardingSplit)("row",[4,36,3,22,3,4,28],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[4,92,4],[null,t,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[4,92,4],[null,c,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[30,40,30],[null,b,null]),null]):(0,screencap_grid_cover_1.onboardingSplit)("row",[2,69,2,23,4],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[19,62,19],[null,t,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[19,62,2,12,5],[null,c,null,g,null]),null]);return{kind:"mosaic_document",version:1,assets:l,size:{width:n,height:r},backgroundColor:P.bg,m0:f.m0,sources:f.sources}}i(buildHeroClipBeat,"buildHeroClipBeat");function buildBeat(e,o,n,r){const t=(0,screencap_grid_cover_1.onboardingTypeRamp)(n,r),l=r>n*.9,a=l?n*.84:n*.4,{comp:d,assets:s,clipMs:u}=beatVisual(e,t);if(u!=null)return{doc:buildHeroClipBeat(e,o,n,r,d,s),durationMs:u};const c=(0,screencap_grid_cover_1.onboardingSplit)("row",[3,4,15,20,3,6,5],[null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.eyebrow,fontSize:t.label,color:P.accent,cellWidthPx:a,hAlign:"left",fadeDelaySec:.04,label:"beat eyebrow"}),(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.title,fontSize:t.headline,color:P.textHi,cellWidthPx:a,hAlign:"left",widthFrac:.9,fadeDelaySec:.08,label:"beat title"}),(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.body,fontSize:t.body,color:P.textLo,cellWidthPx:a,hAlign:"left",widthFrac:.91,fadeDelaySec:.12,label:"beat body"}),null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.detail,fontSize:t.micro,color:P.accentSoft,cellWidthPx:a,hAlign:"left",fadeDelaySec:.16,label:"beat detail"}),null]),b=beatProgress(o,t),g=l?(0,screencap_grid_cover_1.onboardingSplit)("row",[5,33,3,47,3,4,5],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[7,86,7],[null,c,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[6,88,6],[null,d,null]),null,b,null]):(0,screencap_grid_cover_1.onboardingSplit)("row",[7,83,2,5,3],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[5,34,4,51,6],[null,c,null,d,null]),null,b,null]);return{doc:{kind:"mosaic_document",version:1,assets:s,size:{width:n,height:r},backgroundColor:P.bg,m0:g.m0,sources:g.sources},durationMs:u??e.durationMs}}i(buildBeat,"buildBeat");function renderBlurRegionsTutorial(e){var o;const n=e.target.width,r=e.target.height,t=BEATS.map((l,a)=>{const{doc:d,durationMs:s}=buildBeat(l,a,n,r);return{name:l.name,durationMs:s,file:d}});return{kind:"mosaic_pipeline",version:1,fps:(o=e.target.fps)!==null&&o!==void 0?o:TUTORIAL_FPS,durationMs:t.reduce((l,a)=>l+a.durationMs,0),defaultTransition:{type:"cut"},backgroundColor:P.bg,steps:t}}i(renderBlurRegionsTutorial,"renderBlurRegionsTutorial");
|
|
1
|
+
"use strict";var h=Object.defineProperty;var i=(e,o)=>h(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderBlurRegionsTutorial=renderBlurRegionsTutorial;const types_1=require("@m0saic/types"),template_utils_1=require("@m0saic/template-utils"),screencap_grid_cover_1=require("../../screencap_grid/v2/screencap-grid-cover"),TUTORIAL_FPS=30,TUTORIAL_CLIPS={draw:{file:"invoice_sr.mp4",durationMs:10483},brush:{file:"signed-letter_sr.mp4",durationMs:7967},inbox:{file:"inbox_sr.mp4",durationMs:17533},chat:{file:"chat_sr.mp4",durationMs:13133}},TUTORIAL_CLIP_DIR="assets/templates/@m0saic__media__blur-regions__v1/tutorial";function tutorialClipAsset(e){var o;if(!(typeof process<"u"&&!!(!((o=process.versions)===null||o===void 0)&&o.node)))return{kind:"url",url:`/template-assets/${TUTORIAL_CLIP_DIR}/${e.file}`,mediaType:"video"};const r=`${__dirname}`;return{kind:"file",path:`${r.includes("/app.asar/")?r.split("/app.asar/").join("/app.asar.unpacked/"):r.split("\\app.asar\\").join("\\app.asar.unpacked\\")}/../../../../../${TUTORIAL_CLIP_DIR}/${e.file}`,mediaType:"video"}}i(tutorialClipAsset,"tutorialClipAsset");const P={bg:"#0a0c12",surface:"#141926",raised:"#1d2433",inset:"#10141f",border:"#2a3347",accent:"#f97316",accentSoft:"#fdba74",textHi:"#f5f7fa",textLo:"#9aa5b5",textMute:"#5f6b7d",frost:"#c8ccd2@0.55",target:"#e5484d"};function cardTile(e,o={}){var n;return(0,screencap_grid_cover_1.onboardingLeaf)((0,template_utils_1.makeColorTile)(e,{effects:{rounding:{cornerStyle:"rounded",borderRadius:(n=o.radius)!==null&&n!==void 0?n:.08},...o.stroke?{stroke:{position:"inner",width:.004,color:o.stroke,alpha:.9}}:{}},...o.atSec!=null?{overlay:{alpha:(0,template_utils_1.fadeInExpr)(o.atSec,.3)}}:{}}))}i(cardTile,"cardTile");function padded(e,o=5){const n=(0,screencap_grid_cover_1.onboardingSplit)("col",[o,100-2*o,o],[null,e,null]);return(0,screencap_grid_cover_1.onboardingSplit)("row",[o,100-2*o,o],[null,n,null])}i(padded,"padded");function windowCard(e,o={}){const n=i(l=>(0,screencap_grid_cover_1.onboardingSplit)("row",[1,2,1],[null,cardTile(l,{radius:.5}),null]),"dot"),r=(0,screencap_grid_cover_1.onboardingSplit)("col",[10,9,5,9,5,9,440],[null,n(P.textMute),null,n(P.textMute),null,n(P.accent),null]),t=o.chrome===!1?e:(0,screencap_grid_cover_1.onboardingSplit)("row",[8,1,89],[r,null,e]);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.05,stroke:P.border}),padded(t,o.chrome===!1?2:3))}i(windowCard,"windowCard");function pill(e,o,n={}){const r=cardTile(n.active?P.accent:P.raised,{radius:.5,atSec:n.atSec}),t=(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:e,fontSize:o.micro,color:n.active?P.bg:P.textLo,...n.atSec!=null?{fadeDelaySec:n.atSec}:{},label:`chip ${e.toLowerCase()}`}));return(0,screencap_grid_cover_1.onboardingOverlay)(r,t)}i(pill,"pill");function fadeTile(e,o,n=.25){return(0,screencap_grid_cover_1.onboardingLeaf)((0,template_utils_1.makeColorTile)(e,{overlay:{alpha:(0,template_utils_1.fadeInExpr)(o,n)}}))}i(fadeTile,"fadeTile");function dashedEdge(e,o){const n=[],r=[];for(let t=0;t<9;t++)n.push(t%2===0?fadeTile(P.accent,o,.15):null),r.push(1);return(0,screencap_grid_cover_1.onboardingSplit)(e,r,n)}i(dashedEdge,"dashedEdge");function footageMock(e){return(0,screencap_grid_cover_1.onboardingSplit)("col",[7,6,7],[(0,screencap_grid_cover_1.onboardingGuttered)("row",[cardTile("#243049",{radius:.12}),cardTile("#1a2336",{radius:.12})],12,1),(0,screencap_grid_cover_1.onboardingSplit)("row",[4,6,6],[cardTile("#1a2336",{radius:.12}),e?cardTile(P.target,{radius:.12}):cardTile("#2c3a57",{radius:.12}),cardTile("#22304b",{radius:.12})]),(0,screencap_grid_cover_1.onboardingGuttered)("row",[cardTile("#202b42",{radius:.12}),cardTile("#243049",{radius:.12})],12,1)])}i(footageMock,"footageMock");function buildHeroVisual(e){const o=windowCard(padded(footageMock(!0),4)),n=(0,screencap_grid_cover_1.onboardingSplit)("row",[8,6,7],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[5,7,9],[null,fadeTile(P.frost,.9,.45),null]),null]),r=windowCard(padded((0,screencap_grid_cover_1.onboardingOverlay)(footageMock(!0),n),4)),t=i(l=>(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:l,fontSize:e.micro,color:P.textMute,label:l.toLowerCase()})),"caption");return(0,screencap_grid_cover_1.onboardingSplit)("row",[2,12,1,2,4],[null,(0,screencap_grid_cover_1.onboardingGuttered)("col",[o,r],12,1),null,(0,screencap_grid_cover_1.onboardingGuttered)("col",[t("YOUR FILE"),t("SAME FILE \xB7 CENSORED")],12,1),null])}i(buildHeroVisual,"buildHeroVisual");function buildFlowVisual(e){const o=i((r,t,l,a)=>{const s=(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.accent,{radius:.5,atSec:a}),(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:r,fontSize:e.callout,color:P.bg,fadeDelaySec:a,label:`step ${r}`}))),d=(0,screencap_grid_cover_1.onboardingSplit)("row",[2,4,2,3,3,4],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[10,10,10],[null,s,null]),null,(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:t,fontSize:e.callout,color:P.textHi,fadeDelaySec:a,label:t.toLowerCase()})),(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:l,fontSize:e.micro,color:P.textLo,fadeDelaySec:a+.05,label:l.toLowerCase()})),null]);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.1,stroke:P.border,atSec:a}),padded(d,6))},"step"),n=(0,screencap_grid_cover_1.onboardingGuttered)("col",[o("1","Pick","video or image",.2),o("2","Draw","boxes over anything",.7),o("3","Render","same file, censored",1.2)],12,1);return(0,screencap_grid_cover_1.onboardingSplit)("row",[3,10,4],[null,n,null])}i(buildFlowVisual,"buildFlowVisual");function buildDrawVisual(e){const o=(0,screencap_grid_cover_1.onboardingSplit)("row",[1,8,1],[dashedEdge("col",.6),(0,screencap_grid_cover_1.onboardingSplit)("col",[1,8,1],[dashedEdge("row",1.5),fadeTile(P.frost,2,.5),dashedEdge("row",.9)]),dashedEdge("col",1.2)]),n=(0,screencap_grid_cover_1.onboardingSplit)("row",[21,46,33],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[31,38,31],[null,o,null]),null]),r=(0,screencap_grid_cover_1.onboardingOverlay)(footageMock(!0),n),t=(0,screencap_grid_cover_1.onboardingSplit)("col",[12,4,1],[(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:"drag on the preview",fontSize:e.micro,color:P.textMute,hAlign:"left",label:"drag hint"})),(0,screencap_grid_cover_1.onboardingSplit)("row",[1,3,1],[null,pill("Blur regions",e,{active:!0}),null]),null]);return windowCard((0,screencap_grid_cover_1.onboardingSplit)("row",[16,1,2],[padded(r,3),null,t]))}i(buildDrawVisual,"buildDrawVisual");function buildBrushVisual(e){const o=(0,screencap_grid_cover_1.onboardingGuttered)("col",[pill("Rect",e),pill("Ellipse",e),pill("Polygon",e),pill("Lasso",e),pill("Brush",e,{active:!0})],10,1),n=18,r=i((l,a)=>{const s=[],d=[];for(let u=0;u<n;u++)s.push(u>=l&&u<=a?fadeTile(P.frost,.6+u*.12,.18):null),d.push(1);return(0,screencap_grid_cover_1.onboardingSplit)("col",d,s)},"strokeRow"),t=(0,screencap_grid_cover_1.onboardingOverlay)(footageMock(!1),(0,screencap_grid_cover_1.onboardingSplit)("row",[4,2,2,2,2,2,5],[null,r(2,5),r(3,8),r(6,12),r(10,15),r(13,16),null]));return windowCard((0,screencap_grid_cover_1.onboardingSplit)("row",[3,1,15],[o,null,padded(t,2)]))}i(buildBrushVisual,"buildBrushVisual");function buildUseCasesVisual(e){const o=i((t,l,a)=>{const s=(0,screencap_grid_cover_1.onboardingSplit)("row",[4,3],[(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:t,fontSize:e.callout,color:P.textHi,fadeDelaySec:a,label:t.toLowerCase()})),(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:l,fontSize:e.micro,color:P.textLo,fadeDelaySec:a+.05,label:l.toLowerCase()}))]);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.1,stroke:P.border,atSec:a}),padded(s,8))},"useCase"),n=(0,screencap_grid_cover_1.onboardingGuttered)("col",[o("Interview faces","blur bystanders before publishing",.2),o("Dashcam plates","pixelate every plate in one pass",.5)],12,1),r=(0,screencap_grid_cover_1.onboardingGuttered)("col",[o("Screen recordings","hide emails, names, tokens",.8),o("Documents & photos","PNG in, censored PNG out",1.1)],12,1);return(0,screencap_grid_cover_1.onboardingGuttered)("row",[n,r],12,1)}i(buildUseCasesVisual,"buildUseCasesVisual");function buildFinishVisual(e){const o=i((r,t)=>(0,screencap_grid_cover_1.onboardingSplit)("col",[2,1,17],[cardTile(P.accent,{radius:.5,atSec:t}),null,(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:r,fontSize:e.body,color:P.textLo,hAlign:"left",fadeDelaySec:t,label:r.slice(0,24).toLowerCase()}))]),"row"),n=(0,screencap_grid_cover_1.onboardingGuttered)("row",[o("Audio passes through untouched",.2),o("A bad region fails loudly \u2014 never silently dropped",.55),o("mp4 \xB7 webm \xB7 png \u2014 the container follows your output",.9),o("Up to 50 regions per file",1.25)],10,2);return(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.08,stroke:P.border}),padded(n,7))}i(buildFinishVisual,"buildFinishVisual");const BEATS=[{name:"hero",durationMs:3800,eyebrow:"EASY BLUR",title:"Hide anything. Keep everything else.",body:"Draw a box over what must go \u2014 a face, a plate, a name \u2014 and render the same file back with that area unreadable.",detail:"Same container \xB7 same audio \xB7 censored pixels",buildVisual:buildHeroVisual},{name:"flow",durationMs:3600,eyebrow:"THE WHOLE JOB",title:"Three steps, no timeline.",body:"Pick a video or image. Draw regions on the preview. Render. That's the entire workflow \u2014 no editing skills required.",detail:"No regions yet? The file passes through untouched.",buildVisual:buildFlowVisual},{name:"draw",durationMs:5200,eyebrow:"WATCH \xB7 BLOCK OUT",title:"One drag covers the block.",body:"Open Blur regions and drag on the preview \u2014 here it's an invoice's name, address, and account number in a single box.",detail:"The box you draw is exactly what renders censored",buildVisual:buildDrawVisual},{name:"brush",durationMs:4600,eyebrow:"WATCH \xB7 KEEP IT SIMPLE",title:"The fastest shape wins.",body:"A signature isn't a rectangle \u2014 but one quick box covers it anyway. When you want precision, ellipse, polygon, lasso, and brush are right there.",detail:"Rect \xB7 ellipse \xB7 polygon \xB7 lasso \xB7 brush \u2014 mix freely",buildVisual:buildBrushVisual},{name:"inbox",durationMs:4200,eyebrow:"REAL WORLD \xB7 SCREENS",title:"Every address in one pass.",body:"Quick strips over each sender's email and the screenshot is safe to share \u2014 the list stays readable.",detail:"Works the same on any screen capture",buildVisual:buildUseCasesVisual},{name:"chat",durationMs:4200,eyebrow:"REAL WORLD \xB7 MESSAGES",title:"The code and the number.",body:"Anything you'd rather not forward: door codes, phone numbers, names. Draw, render, share the rest.",detail:"Blur reads softer \xB7 pixelate reads redacted",buildVisual:buildUseCasesVisual},{name:"usecases",durationMs:3400,eyebrow:"AND MORE",title:"Wherever pixels leak.",body:"Faces in interviews, plates in dashcam footage, whole documents. If it renders, it can be hidden.",detail:"Video or image \xB7 up to 50 regions",buildVisual:buildUseCasesVisual},{name:"finish",durationMs:3600,eyebrow:"GOOD TO KNOW",title:"Built for shipping.",body:"Close this and draw your first region \u2014 the preview is already your canvas.",detail:"Privacy is all-or-nothing by design",buildVisual:buildFinishVisual}];function beatProgress(e,o){const n=(0,screencap_grid_cover_1.onboardingGuttered)("col",BEATS.map((t,l)=>cardTile(l===e?P.accent:l<e?"#7c4a12":P.border,{radius:.5,...l===e?{atSec:.04}:{}})),3,2),r=(0,screencap_grid_cover_1.onboardingLeaf)((0,screencap_grid_cover_1.onboardingTextSource)({text:`${e+1} / ${BEATS.length}`,fontSize:o.micro,color:P.textMute,hAlign:"left",label:"tutorial progress"}));return(0,screencap_grid_cover_1.onboardingSplit)("col",[30,12,16,30,12],[null,r,null,n,null])}i(beatProgress,"beatProgress");function beatVisual(e,o){const n=TUTORIAL_CLIPS[e.name];if(!n)return{comp:e.buildVisual(o),assets:{}};const r=(0,types_1.asAssetId)(`tut-clip-${e.name}`),t={type:"media",mediaType:"video",assetId:r,placement:{fit:"contain"},playback:{clipStartMs:0,clipDurationMs:n.durationMs},editor:{owner:"template",label:`recording ${e.name}`}};return{comp:windowCard((0,screencap_grid_cover_1.onboardingLeaf)(t),{chrome:!1}),assets:{[r]:tutorialClipAsset(n)},clipMs:n.durationMs}}i(beatVisual,"beatVisual");function buildHeroClipBeat(e,o,n,r,t,l){const a=(0,screencap_grid_cover_1.onboardingTypeRamp)(n,r),s=r>n*.9,d=s?n*.8:n*.56,u=(0,screencap_grid_cover_1.onboardingSplit)("row",[2,4,1,10,1,9,2],[null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.eyebrow,fontSize:a.label,color:P.accent,cellWidthPx:d,hAlign:"left",fadeDelaySec:.1,label:"beat eyebrow"}),null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.title,fontSize:a.headline,color:P.textHi,cellWidthPx:d,hAlign:"left",widthFrac:.96,fadeDelaySec:.16,label:"beat title"}),null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.body,fontSize:a.body,color:P.textLo,cellWidthPx:d,hAlign:"left",widthFrac:.95,fadeDelaySec:.22,label:"beat body"}),null]),c=(0,screencap_grid_cover_1.onboardingOverlay)(cardTile(P.surface,{radius:.08,stroke:P.border,atSec:.06}),padded(u,4)),b=(0,screencap_grid_cover_1.onboardingGuttered)("col",BEATS.map((S,p)=>cardTile(p===o?P.accent:p<o?"#7c4a12":P.border,{radius:.5})),3,2),g=(0,screencap_grid_cover_1.onboardingSplit)("row",[44,12,44],[null,b,null]),f=s?(0,screencap_grid_cover_1.onboardingSplit)("row",[4,36,3,22,3,4,28],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[4,92,4],[null,t,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[4,92,4],[null,c,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[30,40,30],[null,b,null]),null]):(0,screencap_grid_cover_1.onboardingSplit)("row",[2,69,2,23,4],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[19,62,19],[null,t,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[19,62,2,12,5],[null,c,null,g,null]),null]);return{kind:"mosaic_document",version:1,assets:l,size:{width:n,height:r},backgroundColor:P.bg,m0:f.m0,sources:f.sources}}i(buildHeroClipBeat,"buildHeroClipBeat");function buildBeat(e,o,n,r){const t=(0,screencap_grid_cover_1.onboardingTypeRamp)(n,r),l=r>n*.9,a=l?n*.84:n*.4,{comp:s,assets:d,clipMs:u}=beatVisual(e,t);if(u!=null)return{doc:buildHeroClipBeat(e,o,n,r,s,d),durationMs:u};const c=(0,screencap_grid_cover_1.onboardingSplit)("row",[3,4,15,20,3,6,5],[null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.eyebrow,fontSize:t.label,color:P.accent,cellWidthPx:a,hAlign:"left",fadeDelaySec:.04,label:"beat eyebrow"}),(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.title,fontSize:t.headline,color:P.textHi,cellWidthPx:a,hAlign:"left",widthFrac:.9,fadeDelaySec:.08,label:"beat title"}),(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.body,fontSize:t.body,color:P.textLo,cellWidthPx:a,hAlign:"left",widthFrac:.91,fadeDelaySec:.12,label:"beat body"}),null,(0,screencap_grid_cover_1.onboardingTextBlock)({text:e.detail,fontSize:t.micro,color:P.accentSoft,cellWidthPx:a,hAlign:"left",fadeDelaySec:.16,label:"beat detail"}),null]),b=beatProgress(o,t),g=l?(0,screencap_grid_cover_1.onboardingSplit)("row",[5,33,3,47,3,4,5],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[7,86,7],[null,c,null]),null,(0,screencap_grid_cover_1.onboardingSplit)("col",[6,88,6],[null,s,null]),null,b,null]):(0,screencap_grid_cover_1.onboardingSplit)("row",[7,83,2,5,3],[null,(0,screencap_grid_cover_1.onboardingSplit)("col",[5,34,4,51,6],[null,c,null,s,null]),null,b,null]);return{doc:{kind:"mosaic_document",version:1,assets:d,size:{width:n,height:r},backgroundColor:P.bg,m0:g.m0,sources:g.sources},durationMs:u??e.durationMs}}i(buildBeat,"buildBeat");function renderBlurRegionsTutorial(e){var o;const n=e.target.width,r=e.target.height,t=BEATS.map((l,a)=>{const{doc:s,durationMs:d}=buildBeat(l,a,n,r);return{name:l.name,durationMs:d,file:s}});return{kind:"mosaic_pipeline",version:1,fps:(o=e.target.fps)!==null&&o!==void 0?o:TUTORIAL_FPS,durationMs:t.reduce((l,a)=>l+a.durationMs,0),defaultTransition:{type:"cut"},backgroundColor:P.bg,steps:t}}i(renderBlurRegionsTutorial,"renderBlurRegionsTutorial");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
m0saic — Deterministic rectangle layout DSL and tooling
|
|
2
|
+
Copyright (c) 2026 m0saic LLC
|
|
3
|
+
|
|
4
|
+
This package is licensed under the MIT License (see LICENSE).
|
|
5
|
+
|
|
6
|
+
m0saic and the m0saic logo are trademarks of m0saic LLC.
|
|
7
|
+
This license does not grant permission to use the trade names, trademarks,
|
|
8
|
+
service marks, or product names of m0saic LLC, except as required for
|
|
9
|
+
reasonable and customary use in describing the origin of the work.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var s=(e,r)=>t(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.isAnalyticsEmissionEnabled=exports.DEFAULT_ANALYTICS_CONSENT=void 0;const DEFAULT_ANALYTICS_CONSENT=s(e=>({mode:"undecided",installId:e,channels:{rollup:!0,errorReports:!1,lifecycle:!0
|
|
1
|
+
"use strict";var t=Object.defineProperty;var s=(e,r)=>t(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.isAnalyticsEmissionEnabled=exports.DEFAULT_ANALYTICS_CONSENT=void 0;const DEFAULT_ANALYTICS_CONSENT=s(e=>({mode:"undecided",installId:e,channels:{rollup:!0,errorReports:!1,lifecycle:!0},redactions:{templateIds:"scramble",filePaths:"drop",errorMessages:"drop",ffmpegArgs:"drop",stderrLines:"drop"},scrambling:"deterministic"}),"DEFAULT_ANALYTICS_CONSENT");exports.DEFAULT_ANALYTICS_CONSENT=DEFAULT_ANALYTICS_CONSENT;const isAnalyticsEmissionEnabled=s(e=>e.mode!=="opted-out","isAnalyticsEmissionEnabled");exports.isAnalyticsEmissionEnabled=isAnalyticsEmissionEnabled;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0})
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MOSAIC_INSTALL_SOURCE_RE=void 0,exports.MOSAIC_INSTALL_SOURCE_RE=/^[a-z0-9][a-z0-9-]{1,23}$/;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=Object.defineProperty;var _=(E,e)=>t(E,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_TEMPLATE_ID_CHARS=exports.MAX_TEMPLATES_USED=exports.FIRST_PARTY_TEMPLATE_ID_RE=exports.isFeatureKeyShaped=exports.MAX_FEATURE_KEY_CHARS=exports.FEATURE_KEY_SHAPE_RE=void 0,exports.FEATURE_KEY_SHAPE_RE=/^[a-z][a-z0-9_]*(?:\.[a-z0-9_]+){1,3}$/,exports.MAX_FEATURE_KEY_CHARS=40;const isFeatureKeyShaped=_(E=>typeof E=="string"&&E.length<=exports.MAX_FEATURE_KEY_CHARS&&exports.FEATURE_KEY_SHAPE_RE.test(E),"isFeatureKeyShaped");exports.isFeatureKeyShaped=isFeatureKeyShaped,exports.FIRST_PARTY_TEMPLATE_ID_RE=/^@m0saic\/[a-z0-9-]+(?:\/[a-z0-9-]+){0,3}\/v\d{1,3}$/,exports.MAX_TEMPLATES_USED=64,exports.MAX_TEMPLATE_ID_CHARS=80;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var t=(s,e)=>o(s,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.isInstallId=exports.asInstallId=exports.asOutputKey=exports.asSpanId=exports.asTraceId=exports.asDiagnosticCode=exports.asDictionaryEntryId=exports.asRepoId=exports.asTemplateId=exports.asAliasId=exports.asFlattenedStableKey=exports.asAssetId=exports.isDictionaryEntryId=exports.isRepoId=exports.isTemplateId=exports.isAliasId=exports.isAssetId=exports.isOutputKey=exports.isSpanId=exports.isTraceId=exports.isDiagnosticCode=exports.isNamespacedId=exports.isFlattenedStableKey=exports.isFriendlySlug=exports.isStrictIdentifier=exports.TRACE_ID_PATTERN=exports.TEMPLATE_ROLE_PATTERN=exports.DIAGNOSTIC_CODE_PATTERN=exports.NAMESPACED_ID_PATTERN=exports.FLATTENED_STABLE_KEY_PATTERN=exports.FRIENDLY_SLUG_PATTERN=exports.STRICT_IDENTIFIER_PATTERN=void 0,exports.STRICT_IDENTIFIER_PATTERN=/^[a-zA-Z_][a-zA-Z0-9_]{0,63}$/,exports.FRIENDLY_SLUG_PATTERN=/^[A-Za-z0-9_][A-Za-z0-9_.\-]{0,127}$/,exports.FLATTENED_STABLE_KEY_PATTERN=/^(c\d+_)*[a-zA-Z_][a-zA-Z0-9_]{0,63}$/,exports.NAMESPACED_ID_PATTERN=/^@?[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*$/,exports.DIAGNOSTIC_CODE_PATTERN=/^[A-Z][A-Z0-9_]{0,63}$/,exports.TEMPLATE_ROLE_PATTERN=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,exports.TRACE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;const isStrictIdentifier=t(s=>typeof s=="string"&&exports.STRICT_IDENTIFIER_PATTERN.test(s),"isStrictIdentifier");exports.isStrictIdentifier=isStrictIdentifier;const isFriendlySlug=t(s=>typeof s=="string"&&exports.FRIENDLY_SLUG_PATTERN.test(s),"isFriendlySlug");exports.isFriendlySlug=isFriendlySlug;const isFlattenedStableKey=t(s=>typeof s=="string"&&exports.FLATTENED_STABLE_KEY_PATTERN.test(s),"isFlattenedStableKey");exports.isFlattenedStableKey=isFlattenedStableKey;const isNamespacedId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isNamespacedId");exports.isNamespacedId=isNamespacedId;const isDiagnosticCode=t(s=>typeof s=="string"&&exports.DIAGNOSTIC_CODE_PATTERN.test(s),"isDiagnosticCode");exports.isDiagnosticCode=isDiagnosticCode;const isTraceId=t(s=>typeof s=="string"&&exports.TRACE_ID_PATTERN.test(s),"isTraceId");exports.isTraceId=isTraceId;const isSpanId=t(s=>typeof s=="string"&&exports.TRACE_ID_PATTERN.test(s),"isSpanId");exports.isSpanId=isSpanId;const isOutputKey=t(s=>typeof s=="string"&&exports.FRIENDLY_SLUG_PATTERN.test(s),"isOutputKey");exports.isOutputKey=isOutputKey;const isAssetId=t(s=>typeof s=="string"&&exports.FRIENDLY_SLUG_PATTERN.test(s),"isAssetId");exports.isAssetId=isAssetId;const isAliasId=t(s=>typeof s=="string"&&exports.STRICT_IDENTIFIER_PATTERN.test(s),"isAliasId");exports.isAliasId=isAliasId;const isTemplateId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isTemplateId");exports.isTemplateId=isTemplateId;const isRepoId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isRepoId");exports.isRepoId=isRepoId;const isDictionaryEntryId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isDictionaryEntryId");exports.isDictionaryEntryId=isDictionaryEntryId;const asAssetId=t(s=>s,"asAssetId");exports.asAssetId=asAssetId;const asFlattenedStableKey=t(s=>s,"asFlattenedStableKey");exports.asFlattenedStableKey=asFlattenedStableKey;const asAliasId=t(s=>s,"asAliasId");exports.asAliasId=asAliasId;const asTemplateId=t(s=>s,"asTemplateId");exports.asTemplateId=asTemplateId;const asRepoId=t(s=>s,"asRepoId");exports.asRepoId=asRepoId;const asDictionaryEntryId=t(s=>s,"asDictionaryEntryId");exports.asDictionaryEntryId=asDictionaryEntryId;const asDiagnosticCode=t(s=>s,"asDiagnosticCode");exports.asDiagnosticCode=asDiagnosticCode;const asTraceId=t(s=>s,"asTraceId");exports.asTraceId=asTraceId;const asSpanId=t(s=>s,"asSpanId");exports.asSpanId=asSpanId;const asOutputKey=t(s=>s,"asOutputKey");exports.asOutputKey=asOutputKey;const asInstallId=t(s=>s,"asInstallId");exports.asInstallId=asInstallId;const isInstallId=t(s=>typeof s=="string"&&exports.TRACE_ID_PATTERN.test(s),"isInstallId");exports.isInstallId=isInstallId;
|
|
1
|
+
"use strict";var o=Object.defineProperty;var t=(s,e)=>o(s,"name",{value:e,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.isInstallId=exports.asInstallId=exports.asOutputKey=exports.asSpanId=exports.asTraceId=exports.asDiagnosticCode=exports.asDictionaryEntryId=exports.asRepoId=exports.asTemplateId=exports.asAliasId=exports.asFlattenedStableKey=exports.asAssetId=exports.isDictionaryEntryId=exports.isRepoId=exports.isTemplateId=exports.isAliasId=exports.isAssetId=exports.isOutputKey=exports.isSpanId=exports.isTraceId=exports.isDiagnosticCode=exports.isNamespacedId=exports.isFlattenedStableKey=exports.isFriendlySlug=exports.isStrictIdentifier=exports.TRACE_ID_PATTERN=exports.TEMPLATE_ROLE_PATTERN=exports.DIAGNOSTIC_CODE_PATTERN=exports.NAMESPACED_ID_PATTERN=exports.FLATTENED_STABLE_KEY_PATTERN=exports.FRIENDLY_SLUG_PATTERN=exports.STRICT_IDENTIFIER_PATTERN=void 0,exports.STRICT_IDENTIFIER_PATTERN=/^[a-zA-Z_][a-zA-Z0-9_]{0,63}$/,exports.FRIENDLY_SLUG_PATTERN=/^[A-Za-z0-9_][A-Za-z0-9_.\-]{0,127}$/,exports.FLATTENED_STABLE_KEY_PATTERN=/^(?:r(?:\/(?:g(?:col|row)c\d+|[fpnu]c\d+|ov\d+c\d+))*|(?:c\d+_)*[a-zA-Z_][a-zA-Z0-9_]{0,63})$/,exports.NAMESPACED_ID_PATTERN=/^@?[A-Za-z0-9_-]+(\/[A-Za-z0-9_-]+)*$/,exports.DIAGNOSTIC_CODE_PATTERN=/^[A-Z][A-Z0-9_]{0,63}$/,exports.TEMPLATE_ROLE_PATTERN=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,exports.TRACE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;const isStrictIdentifier=t(s=>typeof s=="string"&&exports.STRICT_IDENTIFIER_PATTERN.test(s),"isStrictIdentifier");exports.isStrictIdentifier=isStrictIdentifier;const isFriendlySlug=t(s=>typeof s=="string"&&exports.FRIENDLY_SLUG_PATTERN.test(s),"isFriendlySlug");exports.isFriendlySlug=isFriendlySlug;const isFlattenedStableKey=t(s=>typeof s=="string"&&exports.FLATTENED_STABLE_KEY_PATTERN.test(s),"isFlattenedStableKey");exports.isFlattenedStableKey=isFlattenedStableKey;const isNamespacedId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isNamespacedId");exports.isNamespacedId=isNamespacedId;const isDiagnosticCode=t(s=>typeof s=="string"&&exports.DIAGNOSTIC_CODE_PATTERN.test(s),"isDiagnosticCode");exports.isDiagnosticCode=isDiagnosticCode;const isTraceId=t(s=>typeof s=="string"&&exports.TRACE_ID_PATTERN.test(s),"isTraceId");exports.isTraceId=isTraceId;const isSpanId=t(s=>typeof s=="string"&&exports.TRACE_ID_PATTERN.test(s),"isSpanId");exports.isSpanId=isSpanId;const isOutputKey=t(s=>typeof s=="string"&&exports.FRIENDLY_SLUG_PATTERN.test(s),"isOutputKey");exports.isOutputKey=isOutputKey;const isAssetId=t(s=>typeof s=="string"&&exports.FRIENDLY_SLUG_PATTERN.test(s),"isAssetId");exports.isAssetId=isAssetId;const isAliasId=t(s=>typeof s=="string"&&exports.STRICT_IDENTIFIER_PATTERN.test(s),"isAliasId");exports.isAliasId=isAliasId;const isTemplateId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isTemplateId");exports.isTemplateId=isTemplateId;const isRepoId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isRepoId");exports.isRepoId=isRepoId;const isDictionaryEntryId=t(s=>typeof s=="string"&&exports.NAMESPACED_ID_PATTERN.test(s),"isDictionaryEntryId");exports.isDictionaryEntryId=isDictionaryEntryId;const asAssetId=t(s=>s,"asAssetId");exports.asAssetId=asAssetId;const asFlattenedStableKey=t(s=>s,"asFlattenedStableKey");exports.asFlattenedStableKey=asFlattenedStableKey;const asAliasId=t(s=>s,"asAliasId");exports.asAliasId=asAliasId;const asTemplateId=t(s=>s,"asTemplateId");exports.asTemplateId=asTemplateId;const asRepoId=t(s=>s,"asRepoId");exports.asRepoId=asRepoId;const asDictionaryEntryId=t(s=>s,"asDictionaryEntryId");exports.asDictionaryEntryId=asDictionaryEntryId;const asDiagnosticCode=t(s=>s,"asDiagnosticCode");exports.asDiagnosticCode=asDiagnosticCode;const asTraceId=t(s=>s,"asTraceId");exports.asTraceId=asTraceId;const asSpanId=t(s=>s,"asSpanId");exports.asSpanId=asSpanId;const asOutputKey=t(s=>s,"asOutputKey");exports.asOutputKey=asOutputKey;const asInstallId=t(s=>s,"asInstallId");exports.asInstallId=asInstallId;const isInstallId=t(s=>typeof s=="string"&&exports.TRACE_ID_PATTERN.test(s),"isInstallId");exports.isInstallId=isInstallId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var a=(r,t)=>l(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.stderrIndicatesFramesProduced=stderrIndicatesFramesProduced,exports.classifyFfmpegFailure=classifyFfmpegFailure,exports.formatFailureMessage=formatFailureMessage;const ENOMEM_EXIT_CODES=new Set([-12,4294967284,137]),CANCEL_EXIT_CODES=new Set([255,143]);function stderrIndicatesFramesProduced(r){return/(^|[^\w])frame=\s*0*[1-9]\d*/.test(r)}a(stderrIndicatesFramesProduced,"stderrIndicatesFramesProduced");function classifyFfmpegFailure(r,t,i){const e=(t??"").toString(),n=r??0,o=stderrIndicatesFramesProduced(e),s=ENOMEM_EXIT_CODES.has(n)||/Cannot allocate memory|out of memory|ENOMEM|cannot allocate.+bytes/i.test(e);return/\[m0saic\] FFMPEG_STALLED:/.test(e)?{kind:"stalled",summary:"ffmpeg produced no progress and no output for the stall window, so the runner stopped it (FFMPEG_STALLED). Usually a source that never ends or never decodes \u2014 a corrupt image or clip, a stream that hangs.",hints:["Check the inputs of the failing node: a corrupt or truncated image/clip, or a network source that never answers, will hang the decoder.","Try the render with that node's media replaced by a known-good file."],matchedSignal:"stderr matched runner stall marker"}:/Failed initializing scaling graph \(Resource temporarily unavailable\)/i.test(e)?{kind:"thread-exhaustion",summary:"ffmpeg hit the platform's per-process thread limit while creating swscale worker pools (dense filter graphs spawn one pool per scale/format conversion). Frames stop advancing \u2014 the output freezes on the first frame while render speed collapses.",hints:["This should be prevented by the engine's swscale thread guard \u2014 if you're seeing it, the failing command likely bypassed the guard (hand-rolled args?). Capture the .commands.json sidecar and report it.","Workaround: re-run with fewer tiles / lower grid density, or add `-filter_complex_threads 2` and `-threads 1` before each still-image input to the failing command.","macOS caps a process at `sysctl kern.num_taskthreads` threads (2048 default) \u2014 this failure is expected on macOS first; Windows/Linux limits are far higher."],matchedSignal:"stderr matched swscale EAGAIN pattern"}:i?.carriedBufferFuse&&o&&s?{kind:"link-queue-buffer-overflow",summary:"the filtergraph's link-queue buffering exceeded the `-filter_buffered_frames` fuse (an unbalanced sync filter \u2014 overlay / xfade / concat \u2014 queued too many frames). ffmpeg reports this as 'Cannot allocate memory', but this is almost certainly a graph-shape problem, not a memory shortage.",hints:["Almost certainly a template/layout issue: before adding RAM, check the failing node for inputs of very different durations feeding one overlay/concat, or a stalled early-EOF source.","A genuine mid-render OOM on this command looks identical \u2014 but the layout imbalance is far more likely, so investigate clip-length mismatches first.","To confirm it's the fuse (not real OOM): set `M0SAIC_FILTER_BUFFERED_FRAMES=0` and RESTART the app (or re-run via the CLI) \u2014 the render will then climb memory slowly instead of tripping, proving the buffering imbalance."],matchedSignal:"fused command + mid-render ENOMEM signal"}:s?{kind:"out-of-memory",summary:"ffmpeg ran out of memory while building the filter graph. This is usually triggered by very high output resolutions combined with many concurrent input streams or lossless intermediate codecs (qtrle, huffyuv).",hints:["Render at a lower resolution (e.g. 1080p instead of 4K) and upscale at the end if needed \u2014 peak memory scales quadratically with width \xD7 height.","Reduce the number of concurrent inputs in the template (fewer cells / shorter source list).","Avoid lossless ARGB intermediates (qtrle) for large canvases \u2014 try yuv420p / prores 422 instead. Per-frame bytes drop ~4\xD7 when alpha isn't required.","Close other memory-hungry apps; the ffmpeg process needs to allocate large filter-graph buffers all at once."],matchedSignal:ENOMEM_EXIT_CODES.has(n)?`exit code ${n}`:"stderr matched memory pattern"}:/No space left on device|ENOSPC|disk full/i.test(e)||n===28?{kind:"no-space",summary:"ran out of disk space while writing intermediates or the final output.",hints:["Free disk space on the workspace drive (often %TEMP% on Windows, /tmp on Unix).","Choose a different workspace directory on a larger drive.","For long high-bitrate renders, intermediates can be tens of GB \u2014 check headroom before starting."],matchedSignal:n===28?"ENOSPC exit":"stderr matched ENOSPC"}:CANCEL_EXIT_CODES.has(n)||/Exiting normally, received signal 2|Interrupt|signal 15/i.test(e)?{kind:"killed",summary:"render was cancelled or the process was killed.",hints:["If this wasn't intentional, check whether another process or the OS terminated ffmpeg (out-of-memory killer, antivirus, sleep/standby)."],matchedSignal:`exit code ${n}`}:/No such file or directory|Could not open file|Invalid data found when processing input/i.test(e)?{kind:"missing-input",summary:"one of the input files couldn't be opened (path missing, permission denied, or unsupported container).",hints:["Verify every asset path in the doc resolves to a real file with read permission.","Container probe via ffprobe on the failing input to confirm ffmpeg can read it."],matchedSignal:"stderr matched missing-input pattern"}:/Unknown encoder|Encoder not found|Decoder not found|Unsupported codec/i.test(e)?{kind:"missing-codec",summary:"the requested encoder or decoder isn't available in this ffmpeg build.",hints:["Run `ffmpeg -encoders` / `ffmpeg -decoders` to confirm which codecs are present.","
|
|
1
|
+
"use strict";var l=Object.defineProperty;var a=(r,t)=>l(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.stderrIndicatesFramesProduced=stderrIndicatesFramesProduced,exports.classifyFfmpegFailure=classifyFfmpegFailure,exports.formatFailureMessage=formatFailureMessage;const ENOMEM_EXIT_CODES=new Set([-12,4294967284,137]),CANCEL_EXIT_CODES=new Set([255,143]);function stderrIndicatesFramesProduced(r){return/(^|[^\w])frame=\s*0*[1-9]\d*/.test(r)}a(stderrIndicatesFramesProduced,"stderrIndicatesFramesProduced");function classifyFfmpegFailure(r,t,i){const e=(t??"").toString(),n=r??0,o=stderrIndicatesFramesProduced(e),s=ENOMEM_EXIT_CODES.has(n)||/Cannot allocate memory|out of memory|ENOMEM|cannot allocate.+bytes/i.test(e);return/\[m0saic\] FFMPEG_STALLED:/.test(e)?{kind:"stalled",summary:"ffmpeg produced no progress and no output for the stall window, so the runner stopped it (FFMPEG_STALLED). Usually a source that never ends or never decodes \u2014 a corrupt image or clip, a stream that hangs.",hints:["Check the inputs of the failing node: a corrupt or truncated image/clip, or a network source that never answers, will hang the decoder.","Try the render with that node's media replaced by a known-good file."],matchedSignal:"stderr matched runner stall marker"}:/Failed initializing scaling graph \(Resource temporarily unavailable\)/i.test(e)?{kind:"thread-exhaustion",summary:"ffmpeg hit the platform's per-process thread limit while creating swscale worker pools (dense filter graphs spawn one pool per scale/format conversion). Frames stop advancing \u2014 the output freezes on the first frame while render speed collapses.",hints:["This should be prevented by the engine's swscale thread guard \u2014 if you're seeing it, the failing command likely bypassed the guard (hand-rolled args?). Capture the .commands.json sidecar and report it.","Workaround: re-run with fewer tiles / lower grid density, or add `-filter_complex_threads 2` and `-threads 1` before each still-image input to the failing command.","macOS caps a process at `sysctl kern.num_taskthreads` threads (2048 default) \u2014 this failure is expected on macOS first; Windows/Linux limits are far higher."],matchedSignal:"stderr matched swscale EAGAIN pattern"}:i?.carriedBufferFuse&&o&&s?{kind:"link-queue-buffer-overflow",summary:"the filtergraph's link-queue buffering exceeded the `-filter_buffered_frames` fuse (an unbalanced sync filter \u2014 overlay / xfade / concat \u2014 queued too many frames). ffmpeg reports this as 'Cannot allocate memory', but this is almost certainly a graph-shape problem, not a memory shortage.",hints:["Almost certainly a template/layout issue: before adding RAM, check the failing node for inputs of very different durations feeding one overlay/concat, or a stalled early-EOF source.","A genuine mid-render OOM on this command looks identical \u2014 but the layout imbalance is far more likely, so investigate clip-length mismatches first.","To confirm it's the fuse (not real OOM): set `M0SAIC_FILTER_BUFFERED_FRAMES=0` and RESTART the app (or re-run via the CLI) \u2014 the render will then climb memory slowly instead of tripping, proving the buffering imbalance."],matchedSignal:"fused command + mid-render ENOMEM signal"}:s?{kind:"out-of-memory",summary:"ffmpeg ran out of memory while building the filter graph. This is usually triggered by very high output resolutions combined with many concurrent input streams or lossless intermediate codecs (qtrle, huffyuv).",hints:["Render at a lower resolution (e.g. 1080p instead of 4K) and upscale at the end if needed \u2014 peak memory scales quadratically with width \xD7 height.","Reduce the number of concurrent inputs in the template (fewer cells / shorter source list).","Avoid lossless ARGB intermediates (qtrle) for large canvases \u2014 try yuv420p / prores 422 instead. Per-frame bytes drop ~4\xD7 when alpha isn't required.","Close other memory-hungry apps; the ffmpeg process needs to allocate large filter-graph buffers all at once."],matchedSignal:ENOMEM_EXIT_CODES.has(n)?`exit code ${n}`:"stderr matched memory pattern"}:/No space left on device|ENOSPC|disk full/i.test(e)||n===28?{kind:"no-space",summary:"ran out of disk space while writing intermediates or the final output.",hints:["Free disk space on the workspace drive (often %TEMP% on Windows, /tmp on Unix).","Choose a different workspace directory on a larger drive.","For long high-bitrate renders, intermediates can be tens of GB \u2014 check headroom before starting."],matchedSignal:n===28?"ENOSPC exit":"stderr matched ENOSPC"}:CANCEL_EXIT_CODES.has(n)||/Exiting normally, received signal 2|Interrupt|signal 15/i.test(e)?{kind:"killed",summary:"render was cancelled or the process was killed.",hints:["If this wasn't intentional, check whether another process or the OS terminated ffmpeg (out-of-memory killer, antivirus, sleep/standby)."],matchedSignal:`exit code ${n}`}:/No such file or directory|Could not open file|Invalid data found when processing input/i.test(e)?{kind:"missing-input",summary:"one of the input files couldn't be opened (path missing, permission denied, or unsupported container).",hints:["Verify every asset path in the doc resolves to a real file with read permission.","Container probe via ffprobe on the failing input to confirm ffmpeg can read it."],matchedSignal:"stderr matched missing-input pattern"}:/Unknown encoder|Encoder not found|Decoder not found|Unsupported codec/i.test(e)?{kind:"missing-codec",summary:"the requested encoder or decoder isn't available in this ffmpeg build.",hints:["Run `ffmpeg -encoders` / `ffmpeg -decoders` to confirm which codecs are present.","An ffmpeg built without --enable-gpl has no libx264 / libx265. Install m0saic's pinned build (Tools \u2192 Toolchain, or `m0saic setup`)."],matchedSignal:"stderr matched codec pattern"}:/Error (?:parsing|reinitializing) (?:filter|filters|filtergraph)|No such filter|Filtergraph .* No such option|Invalid argument to filter/i.test(e)?{kind:"filter-graph-invalid",summary:"ffmpeg rejected the filter graph (syntax or unsupported filter combination).",hints:["Check the failing node's tiles and effects \u2014 the graph is composed from the doc, so an unsupported effect/filter combination on that node is the usual cause.","Check ffmpeg version \u2014 newer filters (e.g. zscale, libplacebo) require recent builds."],matchedSignal:"stderr matched filter pattern"}:/Assertion .* failed|Segmentation fault|signal 11|signal 6|av_log.*FATAL/i.test(e)?{kind:"ffmpeg-crash",summary:"ffmpeg crashed (likely a bug in the codec / filter implementation).",hints:["Try a different ffmpeg build (the bundled vs system version often differ).","Reduce input variety or try simpler filter combinations to isolate the crash trigger.","Report the failing stderr tail + plan upstream \u2014 assertion failures are usually fixable bugs."],matchedSignal:"stderr matched crash pattern"}:{kind:"unknown",summary:`ffmpeg exited with code ${n} and no recognised failure signal in stderr.`,hints:["Run again with `--verbose` to capture full ffmpeg output.","Check `qr_stamp.failed.json` (or the equivalent sidecar) for the full stderr tail."]}}a(classifyFfmpegFailure,"classifyFfmpegFailure");function formatFailureMessage(r,t){if(t.kind==="unknown")return`${r}
|
|
2
2
|
|
|
3
3
|
${t.hints.join(" ")}`;const i=[r,"",`\u26A0 ${t.kind}: ${t.summary}`];for(const e of t.hints)i.push(` \u2022 ${e}`);return i.join(`
|
|
4
4
|
`)}a(formatFailureMessage,"formatFailureMessage");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var a=(e,o)=>t(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_FEATURE_KEY_CHARS=exports.FEATURE_KEY_SHAPE_RE=exports.isMosaicFeatureKey=exports.MOSAIC_FEATURE_KEYS=void 0;const types_1=require("@m0saic/types");Object.defineProperty(exports,"FEATURE_KEY_SHAPE_RE",{enumerable:!0,get:a(function(){return types_1.FEATURE_KEY_SHAPE_RE},"get")}),Object.defineProperty(exports,"MAX_FEATURE_KEY_CHARS",{enumerable:!0,get:a(function(){return types_1.MAX_FEATURE_KEY_CHARS},"get")}),exports.MOSAIC_FEATURE_KEYS=["session.start","page.layout","page.make","page.templates","page.compose","page.learn","page.news","page.community","page.jobs","page.tools","page.telemetry","page.other","template.open.builtin","template.open.community","template.open.external","template.web_card.cta","make.render.start","make.render.cancel","make.render.web_cta","share.make.copy","share.make.over_cap","share.layout.copy","share.layout.over_cap","share.receive.ok","share.receive.unavailable","share.receive.invalid","share.receive.mobile","mobile.handoff.copy","mobile.handoff.share","mobile.handoff.email","mobile.handoff.cli","gate.pick_file","gate.pick_files","gate.pick_folder","gate.drop_file","gate.reveal_file","gate.open_file","download.modal.open","download.copy_install","download.copy_command","download.save_mosaicx","download.click","compose.start","compose.add_step","compose.send_to_make","learn.course.start","learn.course.complete","ui.error.uncaught","ui.error.unhandled_rejection","ui.error.chunk_load","save.mosaic","save.mosaicx","save.m0","save.m0c","make.props.changed","templates.search","dictionary.insert","session.role.engineer","cli.command.make","cli.command.hello_world","cli.command.make_wireframe","cli.command.make_wireframe_animated","cli.command.flatten","cli.command.resolve","cli.command.list_templates","cli.command.browse_templates","cli.command.momo","cli.command.open","cli.command.doctor","cli.command.setup","cli.command.activate","cli.command.license","cli.command.update","cli.command.versions","cli.command.inline_dsl","cli.command.other"];const FEATURE_KEY_SET=new Set(exports.MOSAIC_FEATURE_KEYS),isMosaicFeatureKey=a(e=>typeof e=="string"&&FEATURE_KEY_SET.has(e),"isMosaicFeatureKey");exports.isMosaicFeatureKey=isMosaicFeatureKey;
|
|
1
|
+
"use strict";var t=Object.defineProperty;var a=(e,o)=>t(e,"name",{value:o,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_FEATURE_KEY_CHARS=exports.FEATURE_KEY_SHAPE_RE=exports.isMosaicFeatureKey=exports.MOSAIC_FEATURE_KEYS=void 0;const types_1=require("@m0saic/types");Object.defineProperty(exports,"FEATURE_KEY_SHAPE_RE",{enumerable:!0,get:a(function(){return types_1.FEATURE_KEY_SHAPE_RE},"get")}),Object.defineProperty(exports,"MAX_FEATURE_KEY_CHARS",{enumerable:!0,get:a(function(){return types_1.MAX_FEATURE_KEY_CHARS},"get")}),exports.MOSAIC_FEATURE_KEYS=["session.start","page.layout","page.make","page.templates","page.compose","page.learn","page.news","page.community","page.jobs","page.tools","page.telemetry","page.other","template.open.builtin","template.open.community","template.open.external","template.web_card.cta","make.render.start","make.render.cancel","make.render.web_cta","share.make.copy","share.make.over_cap","share.layout.copy","share.layout.over_cap","share.receive.ok","share.receive.unavailable","share.receive.invalid","share.receive.mobile","mobile.handoff.copy","mobile.handoff.share","mobile.handoff.email","mobile.handoff.cli","gate.pick_file","gate.pick_files","gate.pick_folder","gate.drop_file","gate.reveal_file","gate.open_file","gate.template_workspace","gate.terminal","workspace.create","workspace.open_shell","workspace.template_added","workspace.open_in_make","workspace.install_prereqs","download.modal.open","download.copy_install","download.copy_command","download.save_mosaicx","download.click","compose.start","compose.add_step","compose.send_to_make","learn.course.start","learn.course.complete","ui.error.uncaught","ui.error.unhandled_rejection","ui.error.chunk_load","save.mosaic","save.mosaicx","save.m0","save.m0c","make.props.changed","templates.search","dictionary.insert","session.role.engineer","cli.command.make","cli.command.hello_world","cli.command.make_wireframe","cli.command.make_wireframe_animated","cli.command.flatten","cli.command.resolve","cli.command.list_templates","cli.command.browse_templates","cli.command.momo","cli.command.open","cli.command.doctor","cli.command.setup","cli.command.activate","cli.command.license","cli.command.update","cli.command.versions","cli.command.inline_dsl","cli.command.other","cli.command.mcp","cli.command.init","cli.invocation.help","setup.completed","setup.failed","setup.already_present","entry.template_link","entry.typed_link","make.props.undo","make.props.reset","make.edit.inline","make.edit.panel","make.edit.drop","make.edit.draw","make.error_card","make.tutorial.open","community.update.installed","community.update.failed","jobs.run","templates.request"];const FEATURE_KEY_SET=new Set(exports.MOSAIC_FEATURE_KEYS),isMosaicFeatureKey=a(e=>typeof e=="string"&&FEATURE_KEY_SET.has(e),"isMosaicFeatureKey");exports.isMosaicFeatureKey=isMosaicFeatureKey;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "m0saic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "m0saic — deterministic video renders from a layout string and your data.",
|
|
5
5
|
"homepage": "https://m0saic.io",
|
|
6
6
|
"bin": {
|
|
@@ -14,18 +14,19 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@m0saic/community-m": "0.2.0",
|
|
16
16
|
"@m0saic/core": "0.2.0",
|
|
17
|
-
"@m0saic/dictionary": "0.
|
|
18
|
-
"@m0saic/dsl": "
|
|
19
|
-
"@m0saic/dsl-file-formats": "
|
|
20
|
-
"@m0saic/dsl-stdlib": "
|
|
21
|
-
"@m0saic/
|
|
22
|
-
"@m0saic/
|
|
17
|
+
"@m0saic/dictionary": "0.3.0",
|
|
18
|
+
"@m0saic/dsl": "2.0.0",
|
|
19
|
+
"@m0saic/dsl-file-formats": "2.0.1",
|
|
20
|
+
"@m0saic/dsl-stdlib": "3.1.0",
|
|
21
|
+
"@m0saic/knowledge": "0.2.0",
|
|
22
|
+
"@m0saic/momo-types": "1.0.0",
|
|
23
|
+
"@m0saic/platform": "0.3.0",
|
|
23
24
|
"@m0saic/product": "0.2.0",
|
|
24
|
-
"@m0saic/template-utils": "0.
|
|
25
|
-
"@m0saic/templates": "0.
|
|
25
|
+
"@m0saic/template-utils": "0.3.0",
|
|
26
|
+
"@m0saic/templates": "0.3.0",
|
|
26
27
|
"@m0saic/templates-advanced": "0.2.0",
|
|
27
|
-
"@m0saic/text": "0.
|
|
28
|
-
"@m0saic/types": "0.
|
|
28
|
+
"@m0saic/text": "0.3.0",
|
|
29
|
+
"@m0saic/types": "0.3.0",
|
|
29
30
|
"@m0saic/types-internal": "0.2.0",
|
|
30
31
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
31
32
|
"commander": "^12.1.0",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"@m0saic/dsl",
|
|
41
42
|
"@m0saic/dsl-file-formats",
|
|
42
43
|
"@m0saic/dsl-stdlib",
|
|
44
|
+
"@m0saic/knowledge",
|
|
43
45
|
"@m0saic/momo-types",
|
|
44
46
|
"@m0saic/platform",
|
|
45
47
|
"@m0saic/product",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "m0saic-project/m0saic-template-repo-starter-base",
|
|
3
|
+
"sha": "89ccc250d7ddb423d3a5820e657fee5989746382",
|
|
4
|
+
"packedAt": "2026-09-29T02:14:01.051Z",
|
|
5
|
+
"dirty": false,
|
|
6
|
+
"prefix": "starter-base/",
|
|
7
|
+
"files": 34,
|
|
8
|
+
"bytes": 351021,
|
|
9
|
+
"sha256": "23cb42ca732fd5ea467e44474be9175d814cca97eaf493853c2c580acce7d9d9"
|
|
10
|
+
}
|
|
Binary file
|