@cueframe/kernel 0.2.2 → 0.2.4
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/dist/_members/animate/index.d.ts +8 -2
- package/dist/_members/animate/layout/FlexLayout.d.ts +69 -0
- package/dist/_members/animate/layout/fit.d.ts +44 -0
- package/dist/_members/animate/layout/index.d.ts +3 -0
- package/dist/_members/animate/layout/solveFlex.d.ts +70 -0
- package/dist/_members/animate/media/MediaTileScene.d.ts +65 -0
- package/dist/_members/animate/media/recipes.d.ts +61 -0
- package/dist/_members/animate/scene/FocusPass.d.ts +76 -0
- package/dist/_members/animate/scene/UnlitPlane.d.ts +45 -0
- package/dist/_members/animate/scene/__oracle__/cssProjection.d.ts +24 -0
- package/dist/_members/animate/scene/assets.d.ts +21 -0
- package/dist/_members/animate/scene/backdrop.d.ts +7 -0
- package/dist/_members/animate/scene/coordinates.d.ts +58 -0
- package/dist/_members/animate/scene/deviceOpacity.d.ts +18 -0
- package/dist/_members/animate/scene/errors.d.ts +14 -0
- package/dist/_members/animate/scene/finishing.d.ts +69 -0
- package/dist/_members/animate/scene/finishingMath.d.ts +60 -0
- package/dist/_members/animate/scene/finishingPass.d.ts +35 -0
- package/dist/_members/animate/scene/focusBlur.d.ts +56 -0
- package/dist/_members/animate/scene/focusResources.d.ts +190 -0
- package/dist/_members/animate/scene/focusShaders.d.ts +68 -0
- package/dist/_members/animate/scene/fontReadiness.d.ts +27 -0
- package/dist/_members/animate/scene/grainNoise.d.ts +118 -0
- package/dist/_members/animate/scene/index.d.ts +19 -0
- package/dist/_members/animate/scene/internal.d.ts +29 -0
- package/dist/_members/animate/scene/planeFit.d.ts +46 -0
- package/dist/_members/animate/scene/preparedWorldText.d.ts +25 -0
- package/dist/_members/animate/scene/rasterCache.d.ts +30 -0
- package/dist/_members/animate/scene/rasterReadiness.d.ts +33 -0
- package/dist/_members/animate/scene/readiness.d.ts +69 -0
- package/dist/_members/animate/scene/redraw.d.ts +10 -0
- package/dist/_members/animate/scene/render.d.ts +9 -0
- package/dist/_members/animate/scene/scaling.d.ts +13 -0
- package/dist/_members/animate/scene/text.d.ts +40 -0
- package/dist/_members/animate/scene/textLayout.d.ts +78 -0
- package/dist/_members/animate/scene/textureImageSize.d.ts +4 -0
- package/dist/_members/animate/scene/useSceneImageTexture.d.ts +21 -0
- package/dist/_members/animate/scene/useWorldTextTexture.d.ts +21 -0
- package/dist/_members/animate/scene/v2/MeasuredPlaneGeometry.d.ts +7 -0
- package/dist/_members/animate/scene/v2/PhotographicStudioRig.d.ts +11 -0
- package/dist/_members/animate/scene/v2/PreparedSceneShotV1.d.ts +12 -0
- package/dist/_members/animate/scene/v2/SceneShotV2.d.ts +59 -0
- package/dist/_members/animate/scene/v2/builders.d.ts +170 -0
- package/dist/_members/animate/scene/v2/finishes.d.ts +152 -0
- package/dist/_members/animate/scene/v2/lighting.d.ts +119 -0
- package/dist/_members/animate/scene/v2/observePmremTargets.d.ts +4 -0
- package/dist/_members/animate/scene/v2/preparationFacts.d.ts +32 -0
- package/dist/_members/animate/scene/v2/preparedSurface.d.ts +17 -0
- package/dist/_members/animate/scene/v2/projectedResolution.d.ts +2 -0
- package/dist/_members/animate/scene/v2/renderTargetObserver.d.ts +5 -0
- package/dist/_members/animate/scene/v2/runtimeAllocations.d.ts +55 -0
- package/dist/_members/animate/scene/v2/shadow.d.ts +23 -0
- package/dist/_members/animate/scene/v2/slabGeometry.d.ts +134 -0
- package/dist/_members/animate/scene/v2/slots.d.ts +73 -0
- package/dist/_members/animate/scene/v2/videoBinding.d.ts +39 -0
- package/dist/_members/animate/scene/worldBounds.d.ts +19 -0
- package/dist/_members/animate/scene/worldTextRaster.d.ts +87 -0
- package/dist/_members/animate/scene/worldTextTexture.d.ts +32 -0
- package/dist/_members/animate/stage/PerspectiveStage.d.ts +73 -0
- package/dist/_members/animate/stage/camera.d.ts +143 -0
- package/dist/_members/animate/stage/dof.d.ts +9 -0
- package/dist/_members/animate/stage/index.d.ts +6 -0
- package/dist/_members/animate/stage/presets.d.ts +17 -0
- package/dist/_members/animate/three/DeviceMesh.d.ts +256 -0
- package/dist/_members/animate/three/SceneCameraRig.d.ts +12 -0
- package/dist/_members/animate/three/StageCameraRig.d.ts +7 -0
- package/dist/_members/animate/three/StudioRig.d.ts +228 -0
- package/dist/_members/animate/three/ThreeCanvas.d.ts +22 -0
- package/dist/_members/animate/three/defaultScreen.d.ts +23 -0
- package/dist/_members/animate/three/index.d.ts +7 -1
- package/dist/_members/animate/three/textureLifecycle.d.ts +29 -0
- package/dist/_members/animate/three/toneMapping.d.ts +113 -0
- package/dist/_members/animate/three/useImageTexture.d.ts +17 -0
- package/dist/_members/authoring/index.d.ts +2 -0
- package/dist/_members/authoring/scene/index.d.ts +6 -0
- package/dist/_members/authoring/scene/materialize.d.ts +47 -0
- package/dist/_members/authoring/scene/validate.d.ts +80 -0
- package/dist/_members/authoring/scene/wrapper.d.ts +41 -0
- package/dist/_members/component-runtime/allowedImports.d.ts +3 -0
- package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -0
- package/dist/_members/component-runtime/bake.d.ts +8 -0
- package/dist/_members/component-runtime/bake.d.ts.map +1 -1
- package/dist/_members/component-runtime/browserFirewall.d.ts +7 -1
- package/dist/_members/component-runtime/browserFirewall.d.ts.map +1 -1
- package/dist/_members/component-runtime/browserOptions.d.ts +59 -3
- package/dist/_members/component-runtime/browserOptions.d.ts.map +1 -1
- package/dist/_members/component-runtime/canonicalIdentity.d.ts +14 -0
- package/dist/_members/component-runtime/canonicalIdentity.d.ts.map +1 -1
- package/dist/_members/component-runtime/contracts.d.ts +341 -1
- package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
- package/dist/_members/component-runtime/fixtures/imageTileDriftWall.d.ts +5 -0
- package/dist/_members/component-runtime/fixtures/imageTileDriftWall.d.ts.map +1 -0
- package/dist/_members/component-runtime/fixtures/mediaTileMixed.d.ts +5 -0
- package/dist/_members/component-runtime/fixtures/mediaTileMixed.d.ts.map +1 -0
- package/dist/_members/component-runtime/fixtures/mediaTileVideo.d.ts +8 -0
- package/dist/_members/component-runtime/fixtures/mediaTileVideo.d.ts.map +1 -0
- package/dist/_members/component-runtime/importPolicy.d.ts +3 -2
- package/dist/_members/component-runtime/importPolicy.d.ts.map +1 -1
- package/dist/_members/component-runtime/index.d.ts +3 -0
- package/dist/_members/component-runtime/index.d.ts.map +1 -1
- package/dist/_members/component-runtime/livePreviewProxy.d.ts +7 -0
- package/dist/_members/component-runtime/livePreviewProxy.d.ts.map +1 -0
- package/dist/_members/component-runtime/localRoot.d.ts +37 -0
- package/dist/_members/component-runtime/localRoot.d.ts.map +1 -0
- package/dist/_members/component-runtime/mediaResolution.d.ts +25 -0
- package/dist/_members/component-runtime/mediaResolution.d.ts.map +1 -0
- package/dist/_members/component-runtime/render.d.ts +151 -13
- package/dist/_members/component-runtime/render.d.ts.map +1 -1
- package/dist/_members/component-runtime/renderDiagnostics.d.ts +14 -0
- package/dist/_members/component-runtime/renderDiagnostics.d.ts.map +1 -0
- package/dist/_members/component-runtime/sceneAdmission.d.ts +47 -0
- package/dist/_members/component-runtime/sceneAdmission.d.ts.map +1 -0
- package/dist/_members/component-runtime/sourceWorkspace.d.ts +8 -0
- package/dist/_members/component-runtime/sourceWorkspace.d.ts.map +1 -1
- package/dist/_members/component-runtime/webglProbe.d.ts +191 -0
- package/dist/_members/component-runtime/webglProbe.d.ts.map +1 -0
- package/dist/_members/compose/primitiveRegistry.d.ts +2 -6
- package/dist/_members/composition/fonts/bundledFaces.d.ts +150 -0
- package/dist/_members/composition/fonts/captionFaces.d.ts +268 -0
- package/dist/_members/composition/fonts.d.ts +11 -4
- package/dist/_members/composition/graphics-plan/schemas.d.ts +4 -4
- package/dist/_members/composition/ops/types.d.ts +1 -1
- package/dist/_members/composition/primitive-catalog/index.d.ts +4 -0
- package/dist/_members/composition/primitive-catalog/types.d.ts +1 -0
- package/dist/_members/composition/projection/behind-readiness.d.ts +3 -0
- package/dist/_members/composition/projection/brandKit.d.ts +6 -0
- package/dist/_members/composition/projection/composition-floor.d.ts +2 -1
- package/dist/_members/composition/scene/animation.d.ts +25 -0
- package/dist/_members/composition/scene/budget.d.ts +29 -0
- package/dist/_members/composition/scene/budgetPolicy.d.mts +13 -0
- package/dist/_members/composition/scene/clipRules.d.ts +119 -0
- package/dist/_members/composition/scene/constraints.d.ts +61 -0
- package/dist/_members/composition/scene/device.d.ts +21 -0
- package/dist/_members/composition/scene/examples.d.ts +11 -0
- package/dist/_members/composition/scene/index.d.ts +11 -0
- package/dist/_members/composition/scene/photographicRig.d.ts +242 -0
- package/dist/_members/composition/scene/preparedRender.d.ts +239 -0
- package/dist/_members/composition/scene/resolution.d.ts +178 -0
- package/dist/_members/composition/scene/schema.d.ts +351 -0
- package/dist/_members/composition/scene/videoSchedule.d.ts +43 -0
- package/dist/_members/composition/validators/brandKit.d.ts +1 -0
- package/dist/_members/composition/validators/render.d.ts +2 -0
- package/dist/_members/composition-ops/index.d.ts +45 -0
- package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
- package/dist/_members/core/render/compositionRender.d.ts +41 -9
- package/dist/_members/core/render/index.d.ts +9 -2
- package/dist/_members/core/render/sceneCaptureIdentity.d.ts +14 -0
- package/dist/_members/core/render/sceneShotPlan.d.ts +142 -0
- package/dist/_members/core/render/sceneShotPreparation.d.ts +57 -0
- package/dist/_members/core/render/slabDescriptor.d.ts +21 -0
- package/dist/_members/core/render/trackProjection.d.ts +33 -0
- package/dist/_members/core/render/types.d.ts +142 -0
- package/dist/_members/errors/registry.d.ts +6 -0
- package/dist/_members/mcp/adapter.d.ts +5 -0
- package/dist/_members/mcp/generated/harness.d.ts +1 -1
- package/dist/_members/mcp/generated/sceneContract.d.ts +155 -0
- package/dist/_members/mcp/sceneShot.d.ts +38 -0
- package/dist/_members/mcp/sceneShotExample.d.ts +22 -0
- package/dist/_members/media-model/api.d.ts +1 -0
- package/dist/_members/media-model/media-kind.d.ts +1 -1
- package/dist/_members/media-model/testing/mediaStoreContract.d.ts +1 -1
- package/dist/_members/primitives/effects/index.d.ts +1 -0
- package/dist/_members/primitives/effects/stage-camera/config.d.ts +50 -0
- package/dist/_members/primitives/effects/stage-camera/index.d.ts +31 -0
- package/dist/_members/primitives/layouts/flex-layout/config.d.ts +73 -0
- package/dist/_members/primitives/layouts/flex-layout/index.d.ts +4 -0
- package/dist/_members/primitives/layouts/index.d.ts +1 -0
- package/dist/_members/primitives/layouts/picture-in-picture/config.d.ts +1 -1
- package/dist/_members/primitives/lib/frameScale.d.ts +4 -0
- package/dist/_members/primitives/lib/index.d.ts +1 -0
- package/dist/_members/primitives/lib/palette.d.ts +30 -30
- package/dist/_members/primitives/lib/text/contrast.d.ts +2 -1
- package/dist/_members/primitives/lib/text/spec.d.ts +0 -8
- package/dist/_members/primitives/lib/types.d.ts +2 -0
- package/dist/_members/primitives/scenes/device-showcase/config.d.ts +41 -0
- package/dist/_members/primitives/scenes/device-showcase/index.d.ts +36 -0
- package/dist/_members/primitives/scenes/hero-device-assemble/config.d.ts +1 -0
- package/dist/_members/primitives/scenes/hero-device-assemble/index.d.ts +2 -1
- package/dist/_members/primitives/scenes/index.d.ts +1 -0
- package/dist/_members/primitives/ui-blocks/badge-pop/config.d.ts +1 -1
- package/dist/_members/primitives/ui-blocks/device-mockup-zoom/config.d.ts +1 -0
- package/dist/_members/primitives/ui-blocks/device-mockup-zoom/index.d.ts +2 -1
- package/dist/_members/primitives/ui-blocks/terminal-simulator/config.d.ts +1 -1
- package/dist/_members/primitives/ui-blocks/toast-notification/config.d.ts +1 -1
- package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
- package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
- package/dist/_members/render-harness/css-tree-subpaths.d.ts +11 -0
- package/dist/_members/render-harness/extractSegments.d.ts +1 -0
- package/dist/_members/render-harness/extractSegments.d.ts.map +1 -1
- package/dist/_members/render-harness/imageHeader.d.ts +14 -0
- package/dist/_members/render-harness/imageHeader.d.ts.map +1 -0
- package/dist/_members/render-harness/index.d.ts +6 -0
- package/dist/_members/render-harness/index.d.ts.map +1 -1
- package/dist/_members/render-harness/materializeSources.d.ts +46 -2
- package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
- package/dist/_members/render-harness/nodeScenePreparation.d.ts +97 -0
- package/dist/_members/render-harness/nodeScenePreparation.d.ts.map +1 -0
- package/dist/_members/render-harness/remotion-runtime.d.ts +16 -2
- package/dist/_members/render-harness/renderInputAssets.d.ts +1 -1
- package/dist/_members/render-harness/renderInputAssets.d.ts.map +1 -1
- package/dist/_members/render-harness/resolveAssets.d.ts +2 -2
- package/dist/_members/render-harness/resolveAssets.d.ts.map +1 -1
- package/dist/_members/render-harness/sceneShotAssets.d.ts +17 -0
- package/dist/_members/render-harness/sceneShotAssets.d.ts.map +1 -0
- package/dist/animate/preparation-facts.d.ts +1 -0
- package/dist/animate/preparation-facts.js +22 -0
- package/dist/animate.js +336 -1005
- package/dist/authoring/build-tools.js +7 -6
- package/dist/authoring/context.js +5 -4
- package/dist/authoring/prompts.js +1 -1
- package/dist/authoring/scene.d.ts +1 -0
- package/dist/authoring/scene.js +50 -0
- package/dist/authoring/tools.js +6 -5
- package/dist/authoring.js +49 -29
- package/dist/chunk-2L7PYYJK.js +23 -0
- package/dist/chunk-5DJ3IEJR.js +4424 -0
- package/dist/chunk-6BVVCRRD.js +26488 -0
- package/dist/{chunk-DQKSCHFC.js → chunk-6EWRIAZA.js} +187 -66
- package/dist/{chunk-YQ7FFW3G.js → chunk-6VWICHOZ.js} +26 -5
- package/dist/{chunk-C5SEPOWD.js → chunk-7AZLFN26.js} +1798 -702
- package/dist/{chunk-6ID2J64H.js → chunk-7W6ZIKWV.js} +162 -25
- package/dist/{chunk-RETQFTGY.js → chunk-A74FZCPY.js} +42 -5
- package/dist/chunk-BVA3537Z.js +63 -0
- package/dist/{chunk-DHKQ47Q6.js → chunk-DAARYRNT.js} +6 -1
- package/dist/chunk-DQLYWNLC.js +2063 -0
- package/dist/{chunk-HXKTZPRH.js → chunk-E7GIZEPS.js} +1 -1
- package/dist/chunk-EBIBLL7E.js +3619 -0
- package/dist/{chunk-M2TLRXEO.js → chunk-EXY4JJPH.js} +1 -1
- package/dist/{chunk-AWT3P5ZN.js → chunk-FVDFPJHT.js} +1 -1
- package/dist/{chunk-EMGFZ3PR.js → chunk-FWSJLHSV.js} +5 -1
- package/dist/{chunk-TMIBBD5E.js → chunk-I5QWBM3M.js} +280 -113
- package/dist/{chunk-IBMJ33EL.js → chunk-I5RX2QZT.js} +1 -1
- package/dist/{chunk-4FOOBSEE.js → chunk-J3DIUG24.js} +1 -0
- package/dist/{chunk-AD5HWBCE.js → chunk-JX53CVJV.js} +14 -5
- package/dist/{chunk-LNBVTDFR.js → chunk-L2AHS3AW.js} +1 -1
- package/dist/{chunk-BDMTUEEZ.js → chunk-LT4PWSR2.js} +2 -2
- package/dist/chunk-MH3UPKWR.js +3415 -0
- package/dist/{chunk-RFXR7ATW.js → chunk-MN6D3U5N.js} +13 -1
- package/dist/{chunk-IJ7PVJTK.js → chunk-ODUWCQI3.js} +3 -2
- package/dist/chunk-QAGGJHAF.js +16 -0
- package/dist/chunk-QS36DMFG.js +332 -0
- package/dist/{chunk-G5BFI32U.js → chunk-RAXHCRVV.js} +1 -1
- package/dist/{chunk-BIBYZJL3.js → chunk-RL5SO653.js} +3 -3
- package/dist/{chunk-ZSZABOE5.js → chunk-S5H6GH6M.js} +1 -1
- package/dist/{chunk-EEXCDFY5.js → chunk-SD25VQDE.js} +1 -1
- package/dist/chunk-TARKDVP6.js +430 -0
- package/dist/{chunk-XVBOSPZI.js → chunk-TBNTAQJA.js} +6 -6
- package/dist/{chunk-IHFREGFA.js → chunk-TCHPRGC5.js} +18 -2
- package/dist/{chunk-ZCAQHNPI.js → chunk-UKGNHZS4.js} +1 -1
- package/dist/{chunk-ZN6P3KOJ.js → chunk-UN6NY2E6.js} +3 -3
- package/dist/{chunk-WQSGVRFU.js → chunk-UY77TMKD.js} +31 -44
- package/dist/chunk-VKATKWWR.js +1462 -0
- package/dist/{chunk-U5LBYS3N.js → chunk-VLJOIUHL.js} +341 -274
- package/dist/{chunk-CX2IIQ4R.js → chunk-W2245F6G.js} +29 -29
- package/dist/{chunk-GEGRJKKO.js → chunk-W6B7BMLO.js} +1 -1
- package/dist/{chunk-XHUYWVYK.js → chunk-WBNFSG6T.js} +1 -1
- package/dist/chunk-WIHXXF3X.js +221 -0
- package/dist/{chunk-7KEUL3FI.js → chunk-XF2QMKRG.js} +9 -1
- package/dist/{chunk-HFC3MKXA.js → chunk-Y4HPN4BC.js} +1 -0
- package/dist/{chunk-D43J23QX.js → chunk-YFSBFCXO.js} +1018 -42
- package/dist/{chunk-KKEY5MIW.js → chunk-ZS3A3QUM.js} +16 -16
- package/dist/{chunk-LQUWKBST.js → chunk-ZVG446DJ.js} +139 -10
- package/dist/component-runtime/browserOptions.js +14 -3
- package/dist/component-runtime/contracts.js +35 -3
- package/dist/component-runtime/identity/browser.js +1 -1
- package/dist/component-runtime/identity.js +2 -2
- package/dist/component-runtime/importPolicy.js +2 -2
- package/dist/component-runtime/mediaResolution.d.ts +1 -0
- package/dist/component-runtime/mediaResolution.js +11 -0
- package/dist/component-runtime/render.js +38 -5
- package/dist/component-runtime.js +118 -14
- package/dist/compose.js +192 -33
- package/dist/composition/fonts.js +64 -67
- package/dist/composition/graphics-plan.js +3 -2
- package/dist/composition/ops.js +4 -3
- package/dist/composition/primitive-catalog.js +3 -1
- package/dist/composition/projection.js +10 -3
- package/dist/composition/scene/budget-policy.d.ts +1 -0
- package/dist/composition/scene/budget-policy.js +17 -0
- package/dist/composition/scene/schema.json +2757 -0
- package/dist/composition/scene.d.ts +1 -0
- package/dist/composition/scene.js +275 -0
- package/dist/composition/validators.js +3 -2
- package/dist/composition-ops.js +103 -13
- package/dist/composition.js +12 -5
- package/dist/{context-4GSDBFT3.js → context-IUPQ54V4.js} +5 -4
- package/dist/core/render.js +54 -3
- package/dist/core/select.js +2 -2
- package/dist/core.js +6 -3
- package/dist/director/ai-sdk.js +3 -3
- package/dist/director/domain.js +2 -2
- package/dist/director.js +3 -3
- package/dist/errors.js +1 -1
- package/dist/mcp/adapter.js +4 -4
- package/dist/mcp/core.js +1 -1
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp.js +4 -4
- package/dist/media-model/media-kind.js +2 -0
- package/dist/media-model/testing.js +16 -11
- package/dist/media-model.js +1 -1
- package/dist/nle-export.js +1 -27
- package/dist/primitives/backgrounds.js +2 -2
- package/dist/primitives/captions.js +21 -11
- package/dist/primitives/effects.js +14 -4
- package/dist/primitives/graphics.json +3 -0
- package/dist/primitives/hero-text.js +4 -3
- package/dist/primitives/layouts.js +9 -2
- package/dist/primitives/lib/frameScale.d.ts +1 -0
- package/dist/primitives/lib/frameScale.js +11 -0
- package/dist/primitives/lib/index.js +18 -10
- package/dist/primitives/lib/palette.js +1 -1
- package/dist/primitives/lib/text/contrast.js +2 -1
- package/dist/primitives/lib/text/typeface.js +1 -1
- package/dist/primitives/lib.js +18 -10
- package/dist/primitives/params-required.json +3 -0
- package/dist/primitives/scenes.js +12 -3
- package/dist/primitives/text.js +5 -5
- package/dist/primitives/transitions.js +2 -2
- package/dist/primitives/ui-blocks.js +7 -6
- package/dist/primitives/version-map.json +5 -2
- package/dist/primitives.js +23 -16
- package/dist/render-harness/cardAssetAdmission.js +2 -2
- package/dist/render-harness/renderInputAssets.js +2 -2
- package/dist/render-harness.js +874 -124
- package/package.json +48 -14
- package/dist/_members/animate/three/drei.d.ts +0 -6
- package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts +0 -9
- package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts.map +0 -1
- package/dist/chunk-5OTQ7M43.js +0 -718
- package/dist/chunk-7REW2MW3.js +0 -202
- package/dist/chunk-CGHTMZNC.js +0 -6
- package/dist/chunk-KVMVYRXX.js +0 -9527
- package/dist/chunk-WYQX4QIK.js +0 -544
- /package/dist/{chunk-H5LMJKZU.js → chunk-JVDUSOYG.js} +0 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
// ../composition/src/fonts/bundledFaces.ts
|
|
2
|
+
var VENDORED_FONT_FAMILIES = [
|
|
3
|
+
"Inter",
|
|
4
|
+
"Space Mono",
|
|
5
|
+
"Montserrat",
|
|
6
|
+
"Roboto",
|
|
7
|
+
"Poppins",
|
|
8
|
+
"Oswald",
|
|
9
|
+
"Playfair Display",
|
|
10
|
+
"Bebas Neue",
|
|
11
|
+
"Instrument Serif",
|
|
12
|
+
"National Park",
|
|
13
|
+
"Bricolage Grotesque",
|
|
14
|
+
"Schibsted Grotesk"
|
|
15
|
+
];
|
|
16
|
+
var ALIASED_FONT_FAMILIES = ["Georgia"];
|
|
17
|
+
var BUNDLED_FONT_FACES = Object.freeze({
|
|
18
|
+
// Variable files: one upright binary whose `wght` axis covers the declared range. Each carries
|
|
19
|
+
// the house 600/800 pair outright, so its caption defaults are that pair.
|
|
20
|
+
"Inter": {
|
|
21
|
+
slug: "inter",
|
|
22
|
+
faces: [{ weight: "100 900", file: "400" }],
|
|
23
|
+
captionDefaults: { base: 600, emphasis: 800 }
|
|
24
|
+
},
|
|
25
|
+
"Montserrat": {
|
|
26
|
+
slug: "montserrat",
|
|
27
|
+
faces: [{ weight: "100 900", file: "400" }],
|
|
28
|
+
captionDefaults: { base: 600, emphasis: 800 }
|
|
29
|
+
},
|
|
30
|
+
"Roboto": {
|
|
31
|
+
slug: "roboto",
|
|
32
|
+
faces: [{ weight: "100 900", file: "400" }],
|
|
33
|
+
captionDefaults: { base: 600, emphasis: 800 }
|
|
34
|
+
},
|
|
35
|
+
// Oswald's axis stops at 700, so it declares 700 for the emphasis run rather than an 800 it
|
|
36
|
+
// has no bytes for.
|
|
37
|
+
"Oswald": {
|
|
38
|
+
slug: "oswald",
|
|
39
|
+
faces: [{ weight: "400 700", file: "400" }],
|
|
40
|
+
captionDefaults: { base: 600, emphasis: 700 }
|
|
41
|
+
},
|
|
42
|
+
"Playfair Display": {
|
|
43
|
+
slug: "playfair-display",
|
|
44
|
+
faces: [{ weight: "400 900", file: "400" }],
|
|
45
|
+
captionDefaults: { base: 600, emphasis: 800 }
|
|
46
|
+
},
|
|
47
|
+
"Bricolage Grotesque": {
|
|
48
|
+
slug: "bricolage-grotesque",
|
|
49
|
+
faces: [{ weight: "200 800", file: "400" }],
|
|
50
|
+
captionDefaults: { base: 600, emphasis: 800 }
|
|
51
|
+
},
|
|
52
|
+
"Schibsted Grotesk": {
|
|
53
|
+
slug: "schibsted-grotesk",
|
|
54
|
+
faces: [{ weight: "400 900", file: "400" }],
|
|
55
|
+
captionDefaults: { base: 600, emphasis: 800 }
|
|
56
|
+
},
|
|
57
|
+
// Static files: exactly the weights listed, nothing between them, so the declared defaults are
|
|
58
|
+
// drawn from those weights — the regular for the base run and the bold for the emphasis run.
|
|
59
|
+
"Space Mono": {
|
|
60
|
+
slug: "space-mono",
|
|
61
|
+
faces: [{ weight: "400", file: "400" }, { weight: "700", file: "700" }],
|
|
62
|
+
captionDefaults: { base: 400, emphasis: 700 }
|
|
63
|
+
},
|
|
64
|
+
"Poppins": {
|
|
65
|
+
slug: "poppins",
|
|
66
|
+
faces: [{ weight: "400", file: "400" }, { weight: "700", file: "700" }],
|
|
67
|
+
captionDefaults: { base: 400, emphasis: 700 }
|
|
68
|
+
},
|
|
69
|
+
// One file, one weight: the emphasis run separates itself by scale, colour and letter spacing
|
|
70
|
+
// rather than by a weight these families do not ship.
|
|
71
|
+
"Bebas Neue": {
|
|
72
|
+
slug: "bebas-neue",
|
|
73
|
+
faces: [{ weight: "400", file: "400" }],
|
|
74
|
+
captionDefaults: { base: 400, emphasis: 400 }
|
|
75
|
+
},
|
|
76
|
+
"Instrument Serif": {
|
|
77
|
+
slug: "instrument-serif",
|
|
78
|
+
faces: [{ weight: "400", file: "400" }],
|
|
79
|
+
captionDefaults: { base: 400, emphasis: 400 }
|
|
80
|
+
},
|
|
81
|
+
"National Park": {
|
|
82
|
+
slug: "national-park",
|
|
83
|
+
faces: [{ weight: "400", file: "400" }],
|
|
84
|
+
captionDefaults: { base: 400, emphasis: 400 }
|
|
85
|
+
},
|
|
86
|
+
// The one alias: `@font-face { font-family: 'Georgia' }` served from the Gelasio binary.
|
|
87
|
+
"Georgia": {
|
|
88
|
+
slug: "gelasio",
|
|
89
|
+
faces: [{ weight: "400", file: "400" }, { weight: "700", file: "700" }],
|
|
90
|
+
captionDefaults: { base: 400, emphasis: 700 }
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
var BUNDLED_FONT_STYLE = "normal";
|
|
94
|
+
function bundledFontFamilyFaces(family) {
|
|
95
|
+
return BUNDLED_FONT_FACES[family];
|
|
96
|
+
}
|
|
97
|
+
function bundledFaceCoversWeight(face, weight) {
|
|
98
|
+
const parts = face.weight.split(/\s+/).map(Number);
|
|
99
|
+
if (parts.some((n) => !Number.isFinite(n))) return false;
|
|
100
|
+
if (parts.length === 1) return parts[0] === weight;
|
|
101
|
+
const [lo, hi] = parts;
|
|
102
|
+
return weight >= lo && weight <= hi;
|
|
103
|
+
}
|
|
104
|
+
function bundledFontFaceExists(family, weight, style) {
|
|
105
|
+
if (style !== BUNDLED_FONT_STYLE) return false;
|
|
106
|
+
const bundled = bundledFontFamilyFaces(family);
|
|
107
|
+
if (!bundled) return false;
|
|
108
|
+
return bundled.faces.some((face) => bundledFaceCoversWeight(face, weight));
|
|
109
|
+
}
|
|
110
|
+
function describeBundledFontWeights(family) {
|
|
111
|
+
const bundled = bundledFontFamilyFaces(family);
|
|
112
|
+
if (!bundled) return "";
|
|
113
|
+
return bundled.faces.map((face) => face.weight.split(/\s+/).join("-")).join(", ");
|
|
114
|
+
}
|
|
115
|
+
function unrenderableFaceField(family, weight, style, sealed) {
|
|
116
|
+
if (bundledFontFamilyFaces(family)) {
|
|
117
|
+
return style === BUNDLED_FONT_STYLE ? "fontWeight" : "fontStyle";
|
|
118
|
+
}
|
|
119
|
+
if (sealed.hasFamily(family)) {
|
|
120
|
+
return sealed.hasWeight(family, weight) ? "fontStyle" : "fontWeight";
|
|
121
|
+
}
|
|
122
|
+
return "fontFamily";
|
|
123
|
+
}
|
|
124
|
+
function parseFontStack(value) {
|
|
125
|
+
return value.split(",").map((f) => f.trim().replace(/^['"]|['"]$/g, "").trim()).filter(Boolean);
|
|
126
|
+
}
|
|
127
|
+
var CSS_GENERIC_FAMILIES = /* @__PURE__ */ new Set([
|
|
128
|
+
"serif",
|
|
129
|
+
"sans-serif",
|
|
130
|
+
"monospace",
|
|
131
|
+
"cursive",
|
|
132
|
+
"fantasy",
|
|
133
|
+
"system-ui",
|
|
134
|
+
"ui-serif",
|
|
135
|
+
"ui-sans-serif",
|
|
136
|
+
"ui-monospace",
|
|
137
|
+
"ui-rounded",
|
|
138
|
+
"emoji",
|
|
139
|
+
"math",
|
|
140
|
+
"fangsong"
|
|
141
|
+
]);
|
|
142
|
+
function isGenericOnlyStack(stack) {
|
|
143
|
+
if (typeof stack !== "string" || stack.trim().length === 0) return false;
|
|
144
|
+
const families = parseFontStack(stack);
|
|
145
|
+
return families.length > 0 && families.every((entry) => CSS_GENERIC_FAMILIES.has(entry.toLowerCase()));
|
|
146
|
+
}
|
|
147
|
+
var BUNDLED_BY_LOWER = new Map(
|
|
148
|
+
Object.keys(BUNDLED_FONT_FACES).map((family) => [family.toLowerCase(), family])
|
|
149
|
+
);
|
|
150
|
+
function bundledFamilyForStack(stack) {
|
|
151
|
+
if (typeof stack !== "string" || stack.trim().length === 0) return { kind: "default" };
|
|
152
|
+
if (stack.includes("$brand:") || stack.includes("${")) return { kind: "unknown" };
|
|
153
|
+
let bundled;
|
|
154
|
+
for (const entry of parseFontStack(stack)) {
|
|
155
|
+
const lower = entry.toLowerCase();
|
|
156
|
+
if (CSS_GENERIC_FAMILIES.has(lower)) continue;
|
|
157
|
+
const known = BUNDLED_BY_LOWER.get(lower);
|
|
158
|
+
if (!known) return { kind: "unknown" };
|
|
159
|
+
bundled ??= known;
|
|
160
|
+
}
|
|
161
|
+
return bundled ? { kind: "bundled", family: bundled } : { kind: "default" };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// ../composition/src/fonts/captionFaces.ts
|
|
165
|
+
var CAPTION_FACE_DEFAULTS = Object.freeze({
|
|
166
|
+
fontFamily: "Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
167
|
+
fontWeight: 600,
|
|
168
|
+
emphasisFontWeight: 800,
|
|
169
|
+
emphasisFontStyle: "normal"
|
|
170
|
+
});
|
|
171
|
+
var CAPTION_DEFAULT_FAMILY = "Inter";
|
|
172
|
+
function captionStackFamily(stack) {
|
|
173
|
+
if (typeof stack !== "string" || stack.trim().length === 0) {
|
|
174
|
+
return { kind: "bundled", family: CAPTION_DEFAULT_FAMILY };
|
|
175
|
+
}
|
|
176
|
+
return bundledFamilyForStack(stack);
|
|
177
|
+
}
|
|
178
|
+
function captionDefaultWeights(resolved) {
|
|
179
|
+
const bundled = resolved.kind === "bundled" ? bundledFontFamilyFaces(resolved.family) : void 0;
|
|
180
|
+
return bundled?.captionDefaults ?? {
|
|
181
|
+
base: CAPTION_FACE_DEFAULTS.fontWeight,
|
|
182
|
+
emphasis: CAPTION_FACE_DEFAULTS.emphasisFontWeight
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function resolveCaptionFaces(style) {
|
|
186
|
+
const baseStack = style.fontFamily ?? CAPTION_FACE_DEFAULTS.fontFamily;
|
|
187
|
+
const baseResolved = captionStackFamily(style.fontFamily);
|
|
188
|
+
const baseWeight = style.fontWeight ?? captionDefaultWeights(baseResolved).base;
|
|
189
|
+
const emphasisAuthoredStack = style.emphasisFontFamily;
|
|
190
|
+
const emphasisStack = emphasisAuthoredStack ?? baseStack;
|
|
191
|
+
const emphasisResolved = emphasisAuthoredStack === void 0 ? baseResolved : captionStackFamily(emphasisAuthoredStack);
|
|
192
|
+
const emphasisWeight = style.emphasisFontWeight ?? captionDefaultWeights(emphasisResolved).emphasis;
|
|
193
|
+
const emphasisStyle = style.emphasisFontStyle ?? CAPTION_FACE_DEFAULTS.emphasisFontStyle;
|
|
194
|
+
return {
|
|
195
|
+
base: {
|
|
196
|
+
role: "base",
|
|
197
|
+
field: "fontWeight",
|
|
198
|
+
stack: baseStack,
|
|
199
|
+
resolved: baseResolved,
|
|
200
|
+
weight: baseWeight,
|
|
201
|
+
style: BUNDLED_FONT_STYLE,
|
|
202
|
+
fromDefault: style.fontWeight === void 0
|
|
203
|
+
},
|
|
204
|
+
emphasis: {
|
|
205
|
+
role: "emphasis",
|
|
206
|
+
field: emphasisStyle === "italic" ? "emphasisFontStyle" : "emphasisFontWeight",
|
|
207
|
+
stack: emphasisStack,
|
|
208
|
+
resolved: emphasisResolved,
|
|
209
|
+
weight: emphasisWeight,
|
|
210
|
+
style: emphasisStyle,
|
|
211
|
+
fromDefault: emphasisStyle === "italic" ? style.emphasisFontStyle === void 0 : style.emphasisFontWeight === void 0
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
function captionFaceUses(style) {
|
|
216
|
+
const { base, emphasis } = resolveCaptionFaces(style);
|
|
217
|
+
const sameFace = emphasis.stack === base.stack && emphasis.weight === base.weight && emphasis.style === base.style;
|
|
218
|
+
return sameFace ? [base] : [base, emphasis];
|
|
219
|
+
}
|
|
220
|
+
var CAPTION_FACE_ISSUE_FIELDS = Object.freeze(["fontWeight", "emphasisFontWeight", "emphasisFontStyle"]);
|
|
221
|
+
function because(use) {
|
|
222
|
+
return use.fromDefault ? `no ${use.field} is authored, so the ${use.role} run is drawn at the default ${use.style === "italic" ? `${use.field} "italic"` : use.weight}` : `${use.field} ${use.style === "italic" ? '"italic"' : use.weight} has no file behind it`;
|
|
223
|
+
}
|
|
224
|
+
function faceIssue(use) {
|
|
225
|
+
if (use.resolved.kind === "default" && use.style === "italic") {
|
|
226
|
+
return {
|
|
227
|
+
field: use.field,
|
|
228
|
+
face: { family: use.stack, weight: use.weight, style: use.style },
|
|
229
|
+
message: `font_not_reproducible \u2014 ${because(use)}: "${use.stack}" names no font file the render bundle carries, and it ships no italic binary at all, so the browser would slant whatever upright face it matched and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
if (use.resolved.kind !== "bundled") return null;
|
|
233
|
+
const face = { family: use.resolved.family, weight: use.weight, style: use.style };
|
|
234
|
+
if (use.style === "italic") {
|
|
235
|
+
return {
|
|
236
|
+
field: use.field,
|
|
237
|
+
face,
|
|
238
|
+
message: `font_not_reproducible \u2014 ${because(use)}: ${use.resolved.family} ships no italic binary, so the browser would slant the upright face and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (bundledFontFaceExists(use.resolved.family, use.weight, use.style)) return null;
|
|
242
|
+
return {
|
|
243
|
+
field: use.field,
|
|
244
|
+
face,
|
|
245
|
+
message: `font_not_reproducible \u2014 ${because(use)}: ${use.resolved.family} ships ${describeBundledFontWeights(use.resolved.family)}. The render refuses a weight outside that range before capture rather than let the browser substitute a nearby file, so set ${use.field} to a weight the family covers, or pick a family whose files do.`
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function captionFaceIssues(style) {
|
|
249
|
+
const issues = [];
|
|
250
|
+
for (const use of captionFaceUses(style)) {
|
|
251
|
+
const issue = faceIssue(use);
|
|
252
|
+
if (issue) issues.push(issue);
|
|
253
|
+
}
|
|
254
|
+
return issues;
|
|
255
|
+
}
|
|
256
|
+
function faceKey(issue) {
|
|
257
|
+
return `${issue.face.family}\0${issue.face.weight}\0${issue.face.style}`;
|
|
258
|
+
}
|
|
259
|
+
function introducedCaptionFaceIssues(base, next) {
|
|
260
|
+
const before = new Set(captionFaceIssues(base).map(faceKey));
|
|
261
|
+
return captionFaceIssues(next).filter((issue) => !before.has(faceKey(issue)));
|
|
262
|
+
}
|
|
263
|
+
var CAPTION_FACE_MERGE_FIELDS = Object.freeze([
|
|
264
|
+
"fontFamily",
|
|
265
|
+
"fontWeight",
|
|
266
|
+
"emphasisFontFamily",
|
|
267
|
+
"emphasisFontWeight",
|
|
268
|
+
"emphasisFontStyle"
|
|
269
|
+
]);
|
|
270
|
+
function captionFontSource(fonts) {
|
|
271
|
+
if (fonts.caption) return { ref: fonts.caption, slot: "caption" };
|
|
272
|
+
if (fonts.body) return { ref: fonts.body, slot: "body" };
|
|
273
|
+
return { ref: fonts.heading, slot: "heading" };
|
|
274
|
+
}
|
|
275
|
+
function effectiveCaptionFamily(kit) {
|
|
276
|
+
const authored = kit.captionProfile?.fontFamily;
|
|
277
|
+
if (authored !== void 0) return { family: authored, path: "captionProfile.fontFamily" };
|
|
278
|
+
const { ref, slot } = captionFontSource(kit.fonts);
|
|
279
|
+
return { family: ref?.family, path: `fonts.${slot}` };
|
|
280
|
+
}
|
|
281
|
+
function brandKitCaptionFaceIssues(kit) {
|
|
282
|
+
const family = effectiveCaptionFamily(kit);
|
|
283
|
+
const profile = kit.captionProfile ?? {};
|
|
284
|
+
const style = {
|
|
285
|
+
...profile,
|
|
286
|
+
...family.family !== void 0 ? { fontFamily: family.family } : { fontFamily: void 0 }
|
|
287
|
+
};
|
|
288
|
+
return captionFaceIssues(style).map((issue) => ({
|
|
289
|
+
...issue,
|
|
290
|
+
// The offending value is normally the profile's own — which is all that is reachable while
|
|
291
|
+
// every bundled family's DECLARED caption defaults are faces it ships (pinned by "declares a
|
|
292
|
+
// base and an emphasis weight every family has bytes for" in fonts.test.ts), because a kit
|
|
293
|
+
// whose profile authors nothing then draws two faces that exist. `family.path` is the answer
|
|
294
|
+
// for the day that stops being true: a defaulted face refused by the family the slot chain
|
|
295
|
+
// chose has to send the author to the SLOT, not to a profile field they never wrote.
|
|
296
|
+
path: profile[issue.field] !== void 0 ? `captionProfile.${issue.field}` : family.path
|
|
297
|
+
}));
|
|
298
|
+
}
|
|
299
|
+
function supplied(value) {
|
|
300
|
+
return value !== void 0 && value !== null && value !== "";
|
|
301
|
+
}
|
|
302
|
+
function mergeCaptionFaceFields(style, brandCaption) {
|
|
303
|
+
const merged = {};
|
|
304
|
+
for (const field of CAPTION_FACE_MERGE_FIELDS) {
|
|
305
|
+
const fromKit = brandCaption?.[field];
|
|
306
|
+
if (supplied(fromKit)) {
|
|
307
|
+
merged[field] = fromKit;
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
const fromStyle = style?.[field];
|
|
311
|
+
if (supplied(fromStyle)) merged[field] = fromStyle;
|
|
312
|
+
}
|
|
313
|
+
return merged;
|
|
314
|
+
}
|
|
315
|
+
function mergedCaptionFaceIssues(style, brandCaption) {
|
|
316
|
+
const merged = mergeCaptionFaceFields(style, brandCaption);
|
|
317
|
+
const originOf = (field) => {
|
|
318
|
+
if (supplied(brandCaption?.[field])) return "brandKit.captionProfile";
|
|
319
|
+
if (supplied(style?.[field])) return "captions.style";
|
|
320
|
+
return null;
|
|
321
|
+
};
|
|
322
|
+
return captionFaceIssues(merged).map((issue) => {
|
|
323
|
+
const familyField = issue.field === "fontWeight" ? "fontFamily" : supplied(merged.emphasisFontFamily) ? "emphasisFontFamily" : "fontFamily";
|
|
324
|
+
const origin = originOf(issue.field) ?? originOf(familyField);
|
|
325
|
+
if (origin === null) {
|
|
326
|
+
throw new Error(
|
|
327
|
+
`merged caption face refused at ${issue.field}, but neither it nor ${familyField} was authored by the composition or the brand kit, so no surface owns the value`
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
return { ...issue, origin, path: `${origin}.${issue.field}` };
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
function describeCaptionFaceIssues(issues, pathPrefix = "captionStyle") {
|
|
334
|
+
return issues.map((issue) => `${pathPrefix}.${issue.field}: ${issue.message}`).join(" ");
|
|
335
|
+
}
|
|
336
|
+
var CAPTION_WEIGHT_CHOICES = Object.freeze([400, 500, 600, 700, 800, 900]);
|
|
337
|
+
function captionWeightChoices(stack) {
|
|
338
|
+
const resolved = captionStackFamily(stack);
|
|
339
|
+
if (resolved.kind !== "bundled") return CAPTION_WEIGHT_CHOICES;
|
|
340
|
+
return CAPTION_WEIGHT_CHOICES.filter(
|
|
341
|
+
(weight) => bundledFontFaceExists(resolved.family, weight, BUNDLED_FONT_STYLE)
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
function captionStyleChoices(stack) {
|
|
345
|
+
return captionStackFamily(stack).kind === "unknown" ? ["normal", "italic"] : ["normal"];
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// ../composition/src/fonts.ts
|
|
349
|
+
var AVAILABLE_LOWER = new Set(
|
|
350
|
+
[...VENDORED_FONT_FAMILIES, ...ALIASED_FONT_FAMILIES].map((f) => f.toLowerCase())
|
|
351
|
+
);
|
|
352
|
+
function isAvailableFontFamily(family) {
|
|
353
|
+
return AVAILABLE_LOWER.has(family.trim().replace(/^['"]|['"]$/g, "").toLowerCase());
|
|
354
|
+
}
|
|
355
|
+
var FONT_FAMILY_CSS = /font-family\s*:\s*((?:'[^']*'|"[^"]*"|[^;}"'])+?)\s*(?:;|}|"|$)/gi;
|
|
356
|
+
var FONT_FAMILY_KEY = /fontfamily$/i;
|
|
357
|
+
var MAX_NAMED = 6;
|
|
358
|
+
function collectFontStacks(value, out) {
|
|
359
|
+
if (Array.isArray(value)) {
|
|
360
|
+
for (const v of value) collectFontStacks(v, out);
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
if (value === null || typeof value !== "object") return;
|
|
364
|
+
for (const [k, v] of Object.entries(value)) {
|
|
365
|
+
if (typeof v === "string") {
|
|
366
|
+
if (FONT_FAMILY_KEY.test(k)) out.push(v);
|
|
367
|
+
for (const m of v.matchAll(FONT_FAMILY_CSS)) out.push(m[1]);
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
collectFontStacks(v, out);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
function detectUnavailableFonts(value) {
|
|
374
|
+
const stacks = [];
|
|
375
|
+
collectFontStacks(value, stacks);
|
|
376
|
+
if (stacks.length === 0) return [];
|
|
377
|
+
const offenders = /* @__PURE__ */ new Map();
|
|
378
|
+
for (const raw of stacks) {
|
|
379
|
+
if (raw.includes("$brand:")) continue;
|
|
380
|
+
const families = parseFontStack(raw);
|
|
381
|
+
if (families.length === 0) continue;
|
|
382
|
+
if (families.some((f) => f.includes("${"))) continue;
|
|
383
|
+
if (families.some(isAvailableFontFamily)) continue;
|
|
384
|
+
offenders.set(families[0], (offenders.get(families[0]) ?? 0) + 1);
|
|
385
|
+
}
|
|
386
|
+
if (offenders.size === 0) return [];
|
|
387
|
+
const names = [...offenders.keys()];
|
|
388
|
+
const shown = names.slice(0, MAX_NAMED).map((n) => `\`${n}\``).join(", ");
|
|
389
|
+
const elided = names.length > MAX_NAMED ? ` (+${names.length - MAX_NAMED} more)` : "";
|
|
390
|
+
const requests = [...offenders.values()].reduce((a, b) => a + b, 0);
|
|
391
|
+
return [
|
|
392
|
+
`font_not_available \u2014 ${requests} font request${requests === 1 ? "" : "s"} name ${shown}${elided}, and nothing else in those stacks is vendored either. Only the vendored faces are guaranteed present in the render, so naming a family alone gets you the generic fallback (Liberation Sans) \u2014 no error, just the wrong typeface. Guaranteed: ${VENDORED_FONT_FAMILIES.join(", ")} (plus Georgia). Note that putting the family on a brand kit does NOT make it available \u2014 brand fonts resolve against the same vendored set.`
|
|
393
|
+
];
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export {
|
|
397
|
+
VENDORED_FONT_FAMILIES,
|
|
398
|
+
ALIASED_FONT_FAMILIES,
|
|
399
|
+
BUNDLED_FONT_FACES,
|
|
400
|
+
BUNDLED_FONT_STYLE,
|
|
401
|
+
bundledFontFamilyFaces,
|
|
402
|
+
bundledFaceCoversWeight,
|
|
403
|
+
bundledFontFaceExists,
|
|
404
|
+
describeBundledFontWeights,
|
|
405
|
+
unrenderableFaceField,
|
|
406
|
+
parseFontStack,
|
|
407
|
+
isGenericOnlyStack,
|
|
408
|
+
bundledFamilyForStack,
|
|
409
|
+
CAPTION_FACE_DEFAULTS,
|
|
410
|
+
CAPTION_DEFAULT_FAMILY,
|
|
411
|
+
captionStackFamily,
|
|
412
|
+
captionDefaultWeights,
|
|
413
|
+
resolveCaptionFaces,
|
|
414
|
+
captionFaceUses,
|
|
415
|
+
CAPTION_FACE_ISSUE_FIELDS,
|
|
416
|
+
captionFaceIssues,
|
|
417
|
+
introducedCaptionFaceIssues,
|
|
418
|
+
CAPTION_FACE_MERGE_FIELDS,
|
|
419
|
+
captionFontSource,
|
|
420
|
+
effectiveCaptionFamily,
|
|
421
|
+
brandKitCaptionFaceIssues,
|
|
422
|
+
mergeCaptionFaceFields,
|
|
423
|
+
mergedCaptionFaceIssues,
|
|
424
|
+
describeCaptionFaceIssues,
|
|
425
|
+
CAPTION_WEIGHT_CHOICES,
|
|
426
|
+
captionWeightChoices,
|
|
427
|
+
captionStyleChoices,
|
|
428
|
+
isAvailableFontFamily,
|
|
429
|
+
detectUnavailableFonts
|
|
430
|
+
};
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getPrimitiveSubtextParam,
|
|
6
6
|
getPrimitiveTextParam
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7AZLFN26.js";
|
|
8
8
|
import {
|
|
9
9
|
selectAllOverlays
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-I5RX2QZT.js";
|
|
11
11
|
import {
|
|
12
12
|
ComposePlan
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TCHPRGC5.js";
|
|
14
14
|
import {
|
|
15
15
|
OverlayClipSource
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XF2QMKRG.js";
|
|
17
17
|
|
|
18
18
|
// ../authoring/src/tools/toolSets.ts
|
|
19
19
|
var COMPOSE_PLANNER_TOOLS = [
|
|
@@ -63,7 +63,7 @@ var COMPOSE_ROLE_TOOLS = Object.freeze({
|
|
|
63
63
|
schema: z.object({}),
|
|
64
64
|
metadata: { label: "Get Context" },
|
|
65
65
|
handler: async (_args, capabilities) => {
|
|
66
|
-
const { buildDirectorContext } = await import("./context-
|
|
66
|
+
const { buildDirectorContext } = await import("./context-IUPQ54V4.js");
|
|
67
67
|
return buildDirectorContext(capabilities);
|
|
68
68
|
}
|
|
69
69
|
},
|
|
@@ -138,7 +138,7 @@ ${overlay.params.jsxSource}`);
|
|
|
138
138
|
textColor: z.string().regex(/^#[0-9a-fA-F]{3,8}$/, "Must be a hex color").optional().describe("New text color as hex"),
|
|
139
139
|
fontFamily: z.string().optional().describe("New font family"),
|
|
140
140
|
backgroundColor: z.string().regex(/^#[0-9a-fA-F]{3,8}$/, "Must be a hex color").optional().describe("New background color as hex"),
|
|
141
|
-
jsxSource: z.string().max(
|
|
141
|
+
jsxSource: z.string().max(5e4).optional().describe("New canonical TSX module source for the overlay"),
|
|
142
142
|
transition: z.enum(["fade", "slide", "wipe", "none"]).optional().describe("New transition type"),
|
|
143
143
|
sequenceGroup: z.string().optional().describe("New sequence group ID"),
|
|
144
144
|
primitiveId: z.string().optional().describe(
|
|
@@ -4,7 +4,10 @@ import {
|
|
|
4
4
|
Format,
|
|
5
5
|
GraphicRole,
|
|
6
6
|
OpaqueId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XF2QMKRG.js";
|
|
8
|
+
import {
|
|
9
|
+
brandKitCaptionFaceIssues
|
|
10
|
+
} from "./chunk-TARKDVP6.js";
|
|
8
11
|
|
|
9
12
|
// ../composition/src/validators/composePlan.ts
|
|
10
13
|
import { z } from "zod";
|
|
@@ -238,9 +241,18 @@ var BrandKit = z2.object({
|
|
|
238
241
|
entranceStaggerMs: z2.number().optional(),
|
|
239
242
|
exitMs: z2.number().optional(),
|
|
240
243
|
fontFamily: z2.string().optional(),
|
|
244
|
+
// The ordinary run's weight. The profile could name a caption family but never how heavy it
|
|
245
|
+
// was drawn, so the only answer to "that weight has no file behind it" was to change the
|
|
246
|
+
// family. A family that does not declare this weight is still refused here — but now at a
|
|
247
|
+
// field the author can set, and a family that ships it needs no setting at all: every
|
|
248
|
+
// bundled family declares a base and an emphasis weight it has bytes for.
|
|
249
|
+
fontWeight: z2.number().int().min(100).max(900).multipleOf(100).optional(),
|
|
241
250
|
emphasisFontFamily: z2.string().optional(),
|
|
242
251
|
emphasisScale: z2.number().positive().optional(),
|
|
243
|
-
|
|
252
|
+
// A CSS weight, and the profile is projected straight onto the caption style, so it is held
|
|
253
|
+
// to the same range the composition holds `emphasisFontWeight` to. An unbounded number here
|
|
254
|
+
// was a hole: 0 or 1500 named no face at all.
|
|
255
|
+
emphasisFontWeight: z2.number().int().min(100).max(900).optional(),
|
|
244
256
|
emphasisFontStyle: z2.enum(["normal", "italic"]).optional(),
|
|
245
257
|
emphasisTextTransform: z2.enum(["none", "uppercase"]).optional(),
|
|
246
258
|
emphasisLetterSpacing: z2.number().optional(),
|
|
@@ -298,6 +310,10 @@ var BrandKit = z2.object({
|
|
|
298
310
|
]).optional(),
|
|
299
311
|
ownerOrgId: z2.string().optional(),
|
|
300
312
|
acl: AccessControl.optional()
|
|
313
|
+
}).superRefine((kit, ctx) => {
|
|
314
|
+
for (const issue of brandKitCaptionFaceIssues(kit)) {
|
|
315
|
+
ctx.addIssue({ code: "custom", path: issue.path.split("."), message: issue.message });
|
|
316
|
+
}
|
|
301
317
|
});
|
|
302
318
|
|
|
303
319
|
// ../composition/src/validators/font.ts
|
|
@@ -310,7 +310,7 @@ Call wait_job(kind="compose", id="${j.composeJobId}", projectId="${a.projectId}"
|
|
|
310
310
|
name: "apply_composition",
|
|
311
311
|
operationId: "applyComposition",
|
|
312
312
|
pathArgs: { projectId: "id" },
|
|
313
|
-
description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / PATCH /projects/:id with brandKitId). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines.',
|
|
313
|
+
description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / PATCH /projects/:id with brandKitId). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines. SCENE SHOTS: for a 3D product shot \u2014 a tilted page screenshot, a lit laptop/phone showing a real screenshot, two-colour type, a colour-field backdrop, focus/grain/vignette and a camera move \u2014 use {type:"scene.add", clipId, newTrack|trackId, startTime, duration, scene, assets} and revise it with {type:"scene.update", clipId, scene?, assets?, startTime?, duration?}. You author a scene SPEC, never wrapper TSX; the server registers the component for you. There is NO built-in scene primitive in list_catalog \u2014 READ cueframe://scene-shot first for the JSON schema, a copyable two-shot example with its asset-binding map, the admitted image formats (PNG/JPEG/WebP), the reference-aspect rule, screen-vs-world text, the v1 limits and the global-effect scope gap.',
|
|
314
314
|
okFormat: (j, a) => {
|
|
315
315
|
const warns = formatWarnings(j);
|
|
316
316
|
if (j && typeof j.valid === "boolean") {
|
|
@@ -483,7 +483,7 @@ Call wait_job(kind="verify", id="${j.jobId}") to block until the scores + checkp
|
|
|
483
483
|
name: "list_catalog",
|
|
484
484
|
operationId: "listCatalog",
|
|
485
485
|
defaults: { limit: 20 },
|
|
486
|
-
description: "DISCOVER WHAT TO BUILD WITH \u2014 list the component catalog: the built-in primitive catalog plus your org-installed components. The agent-safe default page is 20 entries; use pagination.nextCursor as `after`, or narrow with category, kind, tier, useCase, mood, q, or intent. Results are recommended-tier-first when filtered. Each entry carries the exact placement hint for apply_composition and fixedCopy warnings; use get_component_source to fork a primitive when baked copy must change. Read cueframe://component/{id} for the full prop schema.",
|
|
486
|
+
description: "DISCOVER WHAT TO BUILD WITH \u2014 list the component catalog: the built-in primitive catalog plus your org-installed components. The agent-safe default page is 20 entries; use pagination.nextCursor as `after`, or narrow with category, kind, tier, useCase, mood, q, or intent. Results are recommended-tier-first when filtered. Each entry carries the exact placement hint for apply_composition and fixedCopy warnings; use get_component_source to fork a primitive when baked copy must change. Read cueframe://component/{id} for the full prop schema. SCENE SHOTS ARE NOT LISTED HERE: there is no built-in scene primitive, so do not look for one \u2014 author a shot with the scene.add op (see cueframe://scene-shot). The wrapper it registers then appears here as an ordinary INSTALLED component under these same rules.",
|
|
487
487
|
okFormat: (j) => formatComponentList(j),
|
|
488
488
|
annotations: { readOnlyHint: true },
|
|
489
489
|
preview: {
|
|
@@ -775,7 +775,7 @@ Render it with create_render(projectId="${a.projectId}", body={ compositionId: "
|
|
|
775
775
|
{
|
|
776
776
|
name: "get_account",
|
|
777
777
|
operationId: "getAccount",
|
|
778
|
-
description: "ORIENT FIRST \u2014 show THIS key's account before you spend a metered call: the org it is bound to, the current plan, a per-feature entitlements map, and per-call cost ceilings. READ `balance`, NOT `included`. CueFrame is credit-funded: rendering (entitlements.exports), generation (generate), preview stills (compose_capture), the judge (compose_verify) and the Director (compose) have NO separate per-plan allowance \u2014 they all spend one shared wallet, named in `fundedBy` (`credits`; generation
|
|
778
|
+
description: "ORIENT FIRST \u2014 show THIS key's account before you spend a metered call: the org it is bound to, the current plan, a per-feature entitlements map, and per-call cost ceilings. READ `balance`, NOT `included`. CueFrame is credit-funded: rendering (entitlements.exports), generation (generate), preview stills (compose_capture), the judge (compose_verify) and the Director (compose) have NO separate per-plan allowance \u2014 they all spend one shared wallet, named in `fundedBy` (`credits`; generation is metered in provider-cost units against that wallet). Each `balance` restates that ONE wallet in that feature's own unit at `creditCost` credits per unit, so they are alternative ways to spend the same money, not four budgets. Check the requested cost against the balance. For generation, also check generationLimit: free accounts have a separate provider-cost cap even with a positive wallet. A billing_required error with reason free_generation_cap requires a credit-pack purchase through normal checkout. `included:false` means the plan genuinely lacks the feature. Every new org starts with a free credit grant, so an account with an empty usage history can still render, generate, preview and score. costCeilings.generateMediaUsdPerCall is the generate_media per-call USD cap. No args \u2014 identity is resolved from your key (never echoed from input).",
|
|
779
779
|
annotations: { readOnlyHint: true }
|
|
780
780
|
},
|
|
781
781
|
{
|