@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.
Files changed (335) hide show
  1. package/dist/_members/animate/index.d.ts +8 -2
  2. package/dist/_members/animate/layout/FlexLayout.d.ts +69 -0
  3. package/dist/_members/animate/layout/fit.d.ts +44 -0
  4. package/dist/_members/animate/layout/index.d.ts +3 -0
  5. package/dist/_members/animate/layout/solveFlex.d.ts +70 -0
  6. package/dist/_members/animate/media/MediaTileScene.d.ts +65 -0
  7. package/dist/_members/animate/media/recipes.d.ts +61 -0
  8. package/dist/_members/animate/scene/FocusPass.d.ts +76 -0
  9. package/dist/_members/animate/scene/UnlitPlane.d.ts +45 -0
  10. package/dist/_members/animate/scene/__oracle__/cssProjection.d.ts +24 -0
  11. package/dist/_members/animate/scene/assets.d.ts +21 -0
  12. package/dist/_members/animate/scene/backdrop.d.ts +7 -0
  13. package/dist/_members/animate/scene/coordinates.d.ts +58 -0
  14. package/dist/_members/animate/scene/deviceOpacity.d.ts +18 -0
  15. package/dist/_members/animate/scene/errors.d.ts +14 -0
  16. package/dist/_members/animate/scene/finishing.d.ts +69 -0
  17. package/dist/_members/animate/scene/finishingMath.d.ts +60 -0
  18. package/dist/_members/animate/scene/finishingPass.d.ts +35 -0
  19. package/dist/_members/animate/scene/focusBlur.d.ts +56 -0
  20. package/dist/_members/animate/scene/focusResources.d.ts +190 -0
  21. package/dist/_members/animate/scene/focusShaders.d.ts +68 -0
  22. package/dist/_members/animate/scene/fontReadiness.d.ts +27 -0
  23. package/dist/_members/animate/scene/grainNoise.d.ts +118 -0
  24. package/dist/_members/animate/scene/index.d.ts +19 -0
  25. package/dist/_members/animate/scene/internal.d.ts +29 -0
  26. package/dist/_members/animate/scene/planeFit.d.ts +46 -0
  27. package/dist/_members/animate/scene/preparedWorldText.d.ts +25 -0
  28. package/dist/_members/animate/scene/rasterCache.d.ts +30 -0
  29. package/dist/_members/animate/scene/rasterReadiness.d.ts +33 -0
  30. package/dist/_members/animate/scene/readiness.d.ts +69 -0
  31. package/dist/_members/animate/scene/redraw.d.ts +10 -0
  32. package/dist/_members/animate/scene/render.d.ts +9 -0
  33. package/dist/_members/animate/scene/scaling.d.ts +13 -0
  34. package/dist/_members/animate/scene/text.d.ts +40 -0
  35. package/dist/_members/animate/scene/textLayout.d.ts +78 -0
  36. package/dist/_members/animate/scene/textureImageSize.d.ts +4 -0
  37. package/dist/_members/animate/scene/useSceneImageTexture.d.ts +21 -0
  38. package/dist/_members/animate/scene/useWorldTextTexture.d.ts +21 -0
  39. package/dist/_members/animate/scene/v2/MeasuredPlaneGeometry.d.ts +7 -0
  40. package/dist/_members/animate/scene/v2/PhotographicStudioRig.d.ts +11 -0
  41. package/dist/_members/animate/scene/v2/PreparedSceneShotV1.d.ts +12 -0
  42. package/dist/_members/animate/scene/v2/SceneShotV2.d.ts +59 -0
  43. package/dist/_members/animate/scene/v2/builders.d.ts +170 -0
  44. package/dist/_members/animate/scene/v2/finishes.d.ts +152 -0
  45. package/dist/_members/animate/scene/v2/lighting.d.ts +119 -0
  46. package/dist/_members/animate/scene/v2/observePmremTargets.d.ts +4 -0
  47. package/dist/_members/animate/scene/v2/preparationFacts.d.ts +32 -0
  48. package/dist/_members/animate/scene/v2/preparedSurface.d.ts +17 -0
  49. package/dist/_members/animate/scene/v2/projectedResolution.d.ts +2 -0
  50. package/dist/_members/animate/scene/v2/renderTargetObserver.d.ts +5 -0
  51. package/dist/_members/animate/scene/v2/runtimeAllocations.d.ts +55 -0
  52. package/dist/_members/animate/scene/v2/shadow.d.ts +23 -0
  53. package/dist/_members/animate/scene/v2/slabGeometry.d.ts +134 -0
  54. package/dist/_members/animate/scene/v2/slots.d.ts +73 -0
  55. package/dist/_members/animate/scene/v2/videoBinding.d.ts +39 -0
  56. package/dist/_members/animate/scene/worldBounds.d.ts +19 -0
  57. package/dist/_members/animate/scene/worldTextRaster.d.ts +87 -0
  58. package/dist/_members/animate/scene/worldTextTexture.d.ts +32 -0
  59. package/dist/_members/animate/stage/PerspectiveStage.d.ts +73 -0
  60. package/dist/_members/animate/stage/camera.d.ts +143 -0
  61. package/dist/_members/animate/stage/dof.d.ts +9 -0
  62. package/dist/_members/animate/stage/index.d.ts +6 -0
  63. package/dist/_members/animate/stage/presets.d.ts +17 -0
  64. package/dist/_members/animate/three/DeviceMesh.d.ts +256 -0
  65. package/dist/_members/animate/three/SceneCameraRig.d.ts +12 -0
  66. package/dist/_members/animate/three/StageCameraRig.d.ts +7 -0
  67. package/dist/_members/animate/three/StudioRig.d.ts +228 -0
  68. package/dist/_members/animate/three/ThreeCanvas.d.ts +22 -0
  69. package/dist/_members/animate/three/defaultScreen.d.ts +23 -0
  70. package/dist/_members/animate/three/index.d.ts +7 -1
  71. package/dist/_members/animate/three/textureLifecycle.d.ts +29 -0
  72. package/dist/_members/animate/three/toneMapping.d.ts +113 -0
  73. package/dist/_members/animate/three/useImageTexture.d.ts +17 -0
  74. package/dist/_members/authoring/index.d.ts +2 -0
  75. package/dist/_members/authoring/scene/index.d.ts +6 -0
  76. package/dist/_members/authoring/scene/materialize.d.ts +47 -0
  77. package/dist/_members/authoring/scene/validate.d.ts +80 -0
  78. package/dist/_members/authoring/scene/wrapper.d.ts +41 -0
  79. package/dist/_members/component-runtime/allowedImports.d.ts +3 -0
  80. package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -0
  81. package/dist/_members/component-runtime/bake.d.ts +8 -0
  82. package/dist/_members/component-runtime/bake.d.ts.map +1 -1
  83. package/dist/_members/component-runtime/browserFirewall.d.ts +7 -1
  84. package/dist/_members/component-runtime/browserFirewall.d.ts.map +1 -1
  85. package/dist/_members/component-runtime/browserOptions.d.ts +59 -3
  86. package/dist/_members/component-runtime/browserOptions.d.ts.map +1 -1
  87. package/dist/_members/component-runtime/canonicalIdentity.d.ts +14 -0
  88. package/dist/_members/component-runtime/canonicalIdentity.d.ts.map +1 -1
  89. package/dist/_members/component-runtime/contracts.d.ts +341 -1
  90. package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
  91. package/dist/_members/component-runtime/fixtures/imageTileDriftWall.d.ts +5 -0
  92. package/dist/_members/component-runtime/fixtures/imageTileDriftWall.d.ts.map +1 -0
  93. package/dist/_members/component-runtime/fixtures/mediaTileMixed.d.ts +5 -0
  94. package/dist/_members/component-runtime/fixtures/mediaTileMixed.d.ts.map +1 -0
  95. package/dist/_members/component-runtime/fixtures/mediaTileVideo.d.ts +8 -0
  96. package/dist/_members/component-runtime/fixtures/mediaTileVideo.d.ts.map +1 -0
  97. package/dist/_members/component-runtime/importPolicy.d.ts +3 -2
  98. package/dist/_members/component-runtime/importPolicy.d.ts.map +1 -1
  99. package/dist/_members/component-runtime/index.d.ts +3 -0
  100. package/dist/_members/component-runtime/index.d.ts.map +1 -1
  101. package/dist/_members/component-runtime/livePreviewProxy.d.ts +7 -0
  102. package/dist/_members/component-runtime/livePreviewProxy.d.ts.map +1 -0
  103. package/dist/_members/component-runtime/localRoot.d.ts +37 -0
  104. package/dist/_members/component-runtime/localRoot.d.ts.map +1 -0
  105. package/dist/_members/component-runtime/mediaResolution.d.ts +25 -0
  106. package/dist/_members/component-runtime/mediaResolution.d.ts.map +1 -0
  107. package/dist/_members/component-runtime/render.d.ts +151 -13
  108. package/dist/_members/component-runtime/render.d.ts.map +1 -1
  109. package/dist/_members/component-runtime/renderDiagnostics.d.ts +14 -0
  110. package/dist/_members/component-runtime/renderDiagnostics.d.ts.map +1 -0
  111. package/dist/_members/component-runtime/sceneAdmission.d.ts +47 -0
  112. package/dist/_members/component-runtime/sceneAdmission.d.ts.map +1 -0
  113. package/dist/_members/component-runtime/sourceWorkspace.d.ts +8 -0
  114. package/dist/_members/component-runtime/sourceWorkspace.d.ts.map +1 -1
  115. package/dist/_members/component-runtime/webglProbe.d.ts +191 -0
  116. package/dist/_members/component-runtime/webglProbe.d.ts.map +1 -0
  117. package/dist/_members/compose/primitiveRegistry.d.ts +2 -6
  118. package/dist/_members/composition/fonts/bundledFaces.d.ts +150 -0
  119. package/dist/_members/composition/fonts/captionFaces.d.ts +268 -0
  120. package/dist/_members/composition/fonts.d.ts +11 -4
  121. package/dist/_members/composition/graphics-plan/schemas.d.ts +4 -4
  122. package/dist/_members/composition/ops/types.d.ts +1 -1
  123. package/dist/_members/composition/primitive-catalog/index.d.ts +4 -0
  124. package/dist/_members/composition/primitive-catalog/types.d.ts +1 -0
  125. package/dist/_members/composition/projection/behind-readiness.d.ts +3 -0
  126. package/dist/_members/composition/projection/brandKit.d.ts +6 -0
  127. package/dist/_members/composition/projection/composition-floor.d.ts +2 -1
  128. package/dist/_members/composition/scene/animation.d.ts +25 -0
  129. package/dist/_members/composition/scene/budget.d.ts +29 -0
  130. package/dist/_members/composition/scene/budgetPolicy.d.mts +13 -0
  131. package/dist/_members/composition/scene/clipRules.d.ts +119 -0
  132. package/dist/_members/composition/scene/constraints.d.ts +61 -0
  133. package/dist/_members/composition/scene/device.d.ts +21 -0
  134. package/dist/_members/composition/scene/examples.d.ts +11 -0
  135. package/dist/_members/composition/scene/index.d.ts +11 -0
  136. package/dist/_members/composition/scene/photographicRig.d.ts +242 -0
  137. package/dist/_members/composition/scene/preparedRender.d.ts +239 -0
  138. package/dist/_members/composition/scene/resolution.d.ts +178 -0
  139. package/dist/_members/composition/scene/schema.d.ts +351 -0
  140. package/dist/_members/composition/scene/videoSchedule.d.ts +43 -0
  141. package/dist/_members/composition/validators/brandKit.d.ts +1 -0
  142. package/dist/_members/composition/validators/render.d.ts +2 -0
  143. package/dist/_members/composition-ops/index.d.ts +45 -0
  144. package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
  145. package/dist/_members/core/render/compositionRender.d.ts +41 -9
  146. package/dist/_members/core/render/index.d.ts +9 -2
  147. package/dist/_members/core/render/sceneCaptureIdentity.d.ts +14 -0
  148. package/dist/_members/core/render/sceneShotPlan.d.ts +142 -0
  149. package/dist/_members/core/render/sceneShotPreparation.d.ts +57 -0
  150. package/dist/_members/core/render/slabDescriptor.d.ts +21 -0
  151. package/dist/_members/core/render/trackProjection.d.ts +33 -0
  152. package/dist/_members/core/render/types.d.ts +142 -0
  153. package/dist/_members/errors/registry.d.ts +6 -0
  154. package/dist/_members/mcp/adapter.d.ts +5 -0
  155. package/dist/_members/mcp/generated/harness.d.ts +1 -1
  156. package/dist/_members/mcp/generated/sceneContract.d.ts +155 -0
  157. package/dist/_members/mcp/sceneShot.d.ts +38 -0
  158. package/dist/_members/mcp/sceneShotExample.d.ts +22 -0
  159. package/dist/_members/media-model/api.d.ts +1 -0
  160. package/dist/_members/media-model/media-kind.d.ts +1 -1
  161. package/dist/_members/media-model/testing/mediaStoreContract.d.ts +1 -1
  162. package/dist/_members/primitives/effects/index.d.ts +1 -0
  163. package/dist/_members/primitives/effects/stage-camera/config.d.ts +50 -0
  164. package/dist/_members/primitives/effects/stage-camera/index.d.ts +31 -0
  165. package/dist/_members/primitives/layouts/flex-layout/config.d.ts +73 -0
  166. package/dist/_members/primitives/layouts/flex-layout/index.d.ts +4 -0
  167. package/dist/_members/primitives/layouts/index.d.ts +1 -0
  168. package/dist/_members/primitives/layouts/picture-in-picture/config.d.ts +1 -1
  169. package/dist/_members/primitives/lib/frameScale.d.ts +4 -0
  170. package/dist/_members/primitives/lib/index.d.ts +1 -0
  171. package/dist/_members/primitives/lib/palette.d.ts +30 -30
  172. package/dist/_members/primitives/lib/text/contrast.d.ts +2 -1
  173. package/dist/_members/primitives/lib/text/spec.d.ts +0 -8
  174. package/dist/_members/primitives/lib/types.d.ts +2 -0
  175. package/dist/_members/primitives/scenes/device-showcase/config.d.ts +41 -0
  176. package/dist/_members/primitives/scenes/device-showcase/index.d.ts +36 -0
  177. package/dist/_members/primitives/scenes/hero-device-assemble/config.d.ts +1 -0
  178. package/dist/_members/primitives/scenes/hero-device-assemble/index.d.ts +2 -1
  179. package/dist/_members/primitives/scenes/index.d.ts +1 -0
  180. package/dist/_members/primitives/ui-blocks/badge-pop/config.d.ts +1 -1
  181. package/dist/_members/primitives/ui-blocks/device-mockup-zoom/config.d.ts +1 -0
  182. package/dist/_members/primitives/ui-blocks/device-mockup-zoom/index.d.ts +2 -1
  183. package/dist/_members/primitives/ui-blocks/terminal-simulator/config.d.ts +1 -1
  184. package/dist/_members/primitives/ui-blocks/toast-notification/config.d.ts +1 -1
  185. package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
  186. package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
  187. package/dist/_members/render-harness/css-tree-subpaths.d.ts +11 -0
  188. package/dist/_members/render-harness/extractSegments.d.ts +1 -0
  189. package/dist/_members/render-harness/extractSegments.d.ts.map +1 -1
  190. package/dist/_members/render-harness/imageHeader.d.ts +14 -0
  191. package/dist/_members/render-harness/imageHeader.d.ts.map +1 -0
  192. package/dist/_members/render-harness/index.d.ts +6 -0
  193. package/dist/_members/render-harness/index.d.ts.map +1 -1
  194. package/dist/_members/render-harness/materializeSources.d.ts +46 -2
  195. package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
  196. package/dist/_members/render-harness/nodeScenePreparation.d.ts +97 -0
  197. package/dist/_members/render-harness/nodeScenePreparation.d.ts.map +1 -0
  198. package/dist/_members/render-harness/remotion-runtime.d.ts +16 -2
  199. package/dist/_members/render-harness/renderInputAssets.d.ts +1 -1
  200. package/dist/_members/render-harness/renderInputAssets.d.ts.map +1 -1
  201. package/dist/_members/render-harness/resolveAssets.d.ts +2 -2
  202. package/dist/_members/render-harness/resolveAssets.d.ts.map +1 -1
  203. package/dist/_members/render-harness/sceneShotAssets.d.ts +17 -0
  204. package/dist/_members/render-harness/sceneShotAssets.d.ts.map +1 -0
  205. package/dist/animate/preparation-facts.d.ts +1 -0
  206. package/dist/animate/preparation-facts.js +22 -0
  207. package/dist/animate.js +336 -1005
  208. package/dist/authoring/build-tools.js +7 -6
  209. package/dist/authoring/context.js +5 -4
  210. package/dist/authoring/prompts.js +1 -1
  211. package/dist/authoring/scene.d.ts +1 -0
  212. package/dist/authoring/scene.js +50 -0
  213. package/dist/authoring/tools.js +6 -5
  214. package/dist/authoring.js +49 -29
  215. package/dist/chunk-2L7PYYJK.js +23 -0
  216. package/dist/chunk-5DJ3IEJR.js +4424 -0
  217. package/dist/chunk-6BVVCRRD.js +26488 -0
  218. package/dist/{chunk-DQKSCHFC.js → chunk-6EWRIAZA.js} +187 -66
  219. package/dist/{chunk-YQ7FFW3G.js → chunk-6VWICHOZ.js} +26 -5
  220. package/dist/{chunk-C5SEPOWD.js → chunk-7AZLFN26.js} +1798 -702
  221. package/dist/{chunk-6ID2J64H.js → chunk-7W6ZIKWV.js} +162 -25
  222. package/dist/{chunk-RETQFTGY.js → chunk-A74FZCPY.js} +42 -5
  223. package/dist/chunk-BVA3537Z.js +63 -0
  224. package/dist/{chunk-DHKQ47Q6.js → chunk-DAARYRNT.js} +6 -1
  225. package/dist/chunk-DQLYWNLC.js +2063 -0
  226. package/dist/{chunk-HXKTZPRH.js → chunk-E7GIZEPS.js} +1 -1
  227. package/dist/chunk-EBIBLL7E.js +3619 -0
  228. package/dist/{chunk-M2TLRXEO.js → chunk-EXY4JJPH.js} +1 -1
  229. package/dist/{chunk-AWT3P5ZN.js → chunk-FVDFPJHT.js} +1 -1
  230. package/dist/{chunk-EMGFZ3PR.js → chunk-FWSJLHSV.js} +5 -1
  231. package/dist/{chunk-TMIBBD5E.js → chunk-I5QWBM3M.js} +280 -113
  232. package/dist/{chunk-IBMJ33EL.js → chunk-I5RX2QZT.js} +1 -1
  233. package/dist/{chunk-4FOOBSEE.js → chunk-J3DIUG24.js} +1 -0
  234. package/dist/{chunk-AD5HWBCE.js → chunk-JX53CVJV.js} +14 -5
  235. package/dist/{chunk-LNBVTDFR.js → chunk-L2AHS3AW.js} +1 -1
  236. package/dist/{chunk-BDMTUEEZ.js → chunk-LT4PWSR2.js} +2 -2
  237. package/dist/chunk-MH3UPKWR.js +3415 -0
  238. package/dist/{chunk-RFXR7ATW.js → chunk-MN6D3U5N.js} +13 -1
  239. package/dist/{chunk-IJ7PVJTK.js → chunk-ODUWCQI3.js} +3 -2
  240. package/dist/chunk-QAGGJHAF.js +16 -0
  241. package/dist/chunk-QS36DMFG.js +332 -0
  242. package/dist/{chunk-G5BFI32U.js → chunk-RAXHCRVV.js} +1 -1
  243. package/dist/{chunk-BIBYZJL3.js → chunk-RL5SO653.js} +3 -3
  244. package/dist/{chunk-ZSZABOE5.js → chunk-S5H6GH6M.js} +1 -1
  245. package/dist/{chunk-EEXCDFY5.js → chunk-SD25VQDE.js} +1 -1
  246. package/dist/chunk-TARKDVP6.js +430 -0
  247. package/dist/{chunk-XVBOSPZI.js → chunk-TBNTAQJA.js} +6 -6
  248. package/dist/{chunk-IHFREGFA.js → chunk-TCHPRGC5.js} +18 -2
  249. package/dist/{chunk-ZCAQHNPI.js → chunk-UKGNHZS4.js} +1 -1
  250. package/dist/{chunk-ZN6P3KOJ.js → chunk-UN6NY2E6.js} +3 -3
  251. package/dist/{chunk-WQSGVRFU.js → chunk-UY77TMKD.js} +31 -44
  252. package/dist/chunk-VKATKWWR.js +1462 -0
  253. package/dist/{chunk-U5LBYS3N.js → chunk-VLJOIUHL.js} +341 -274
  254. package/dist/{chunk-CX2IIQ4R.js → chunk-W2245F6G.js} +29 -29
  255. package/dist/{chunk-GEGRJKKO.js → chunk-W6B7BMLO.js} +1 -1
  256. package/dist/{chunk-XHUYWVYK.js → chunk-WBNFSG6T.js} +1 -1
  257. package/dist/chunk-WIHXXF3X.js +221 -0
  258. package/dist/{chunk-7KEUL3FI.js → chunk-XF2QMKRG.js} +9 -1
  259. package/dist/{chunk-HFC3MKXA.js → chunk-Y4HPN4BC.js} +1 -0
  260. package/dist/{chunk-D43J23QX.js → chunk-YFSBFCXO.js} +1018 -42
  261. package/dist/{chunk-KKEY5MIW.js → chunk-ZS3A3QUM.js} +16 -16
  262. package/dist/{chunk-LQUWKBST.js → chunk-ZVG446DJ.js} +139 -10
  263. package/dist/component-runtime/browserOptions.js +14 -3
  264. package/dist/component-runtime/contracts.js +35 -3
  265. package/dist/component-runtime/identity/browser.js +1 -1
  266. package/dist/component-runtime/identity.js +2 -2
  267. package/dist/component-runtime/importPolicy.js +2 -2
  268. package/dist/component-runtime/mediaResolution.d.ts +1 -0
  269. package/dist/component-runtime/mediaResolution.js +11 -0
  270. package/dist/component-runtime/render.js +38 -5
  271. package/dist/component-runtime.js +118 -14
  272. package/dist/compose.js +192 -33
  273. package/dist/composition/fonts.js +64 -67
  274. package/dist/composition/graphics-plan.js +3 -2
  275. package/dist/composition/ops.js +4 -3
  276. package/dist/composition/primitive-catalog.js +3 -1
  277. package/dist/composition/projection.js +10 -3
  278. package/dist/composition/scene/budget-policy.d.ts +1 -0
  279. package/dist/composition/scene/budget-policy.js +17 -0
  280. package/dist/composition/scene/schema.json +2757 -0
  281. package/dist/composition/scene.d.ts +1 -0
  282. package/dist/composition/scene.js +275 -0
  283. package/dist/composition/validators.js +3 -2
  284. package/dist/composition-ops.js +103 -13
  285. package/dist/composition.js +12 -5
  286. package/dist/{context-4GSDBFT3.js → context-IUPQ54V4.js} +5 -4
  287. package/dist/core/render.js +54 -3
  288. package/dist/core/select.js +2 -2
  289. package/dist/core.js +6 -3
  290. package/dist/director/ai-sdk.js +3 -3
  291. package/dist/director/domain.js +2 -2
  292. package/dist/director.js +3 -3
  293. package/dist/errors.js +1 -1
  294. package/dist/mcp/adapter.js +4 -4
  295. package/dist/mcp/core.js +1 -1
  296. package/dist/mcp/curation.js +1 -1
  297. package/dist/mcp/server.js +4 -4
  298. package/dist/mcp.js +4 -4
  299. package/dist/media-model/media-kind.js +2 -0
  300. package/dist/media-model/testing.js +16 -11
  301. package/dist/media-model.js +1 -1
  302. package/dist/nle-export.js +1 -27
  303. package/dist/primitives/backgrounds.js +2 -2
  304. package/dist/primitives/captions.js +21 -11
  305. package/dist/primitives/effects.js +14 -4
  306. package/dist/primitives/graphics.json +3 -0
  307. package/dist/primitives/hero-text.js +4 -3
  308. package/dist/primitives/layouts.js +9 -2
  309. package/dist/primitives/lib/frameScale.d.ts +1 -0
  310. package/dist/primitives/lib/frameScale.js +11 -0
  311. package/dist/primitives/lib/index.js +18 -10
  312. package/dist/primitives/lib/palette.js +1 -1
  313. package/dist/primitives/lib/text/contrast.js +2 -1
  314. package/dist/primitives/lib/text/typeface.js +1 -1
  315. package/dist/primitives/lib.js +18 -10
  316. package/dist/primitives/params-required.json +3 -0
  317. package/dist/primitives/scenes.js +12 -3
  318. package/dist/primitives/text.js +5 -5
  319. package/dist/primitives/transitions.js +2 -2
  320. package/dist/primitives/ui-blocks.js +7 -6
  321. package/dist/primitives/version-map.json +5 -2
  322. package/dist/primitives.js +23 -16
  323. package/dist/render-harness/cardAssetAdmission.js +2 -2
  324. package/dist/render-harness/renderInputAssets.js +2 -2
  325. package/dist/render-harness.js +874 -124
  326. package/package.json +48 -14
  327. package/dist/_members/animate/three/drei.d.ts +0 -6
  328. package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts +0 -9
  329. package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts.map +0 -1
  330. package/dist/chunk-5OTQ7M43.js +0 -718
  331. package/dist/chunk-7REW2MW3.js +0 -202
  332. package/dist/chunk-CGHTMZNC.js +0 -6
  333. package/dist/chunk-KVMVYRXX.js +0 -9527
  334. package/dist/chunk-WYQX4QIK.js +0 -544
  335. /package/dist/{chunk-H5LMJKZU.js → chunk-JVDUSOYG.js} +0 -0
@@ -0,0 +1,118 @@
1
+ /**
2
+ * The grain field: the SVG `feTurbulence` generator, in TypeScript.
3
+ *
4
+ * The shot's finishing puts grain on three layers that must agree — the CSS backdrop and the DOM
5
+ * screen text, which go through the real `feTurbulence` in `finishing.tsx`, and the world, which is
6
+ * WebGL and cannot reach an SVG filter. So the world runs the same generator: this module is the
7
+ * SVG 1.1 reference implementation of `feTurbulence` (the Park–Miller stream, the 256-entry
8
+ * gradient lattice, the shuffle, the fractal sum), seeded by the same `grainSeed(seed, frame)`
9
+ * integer the filter is given. `grainLatticeTable` packs one seed's lattice for the shader, which
10
+ * evaluates `grainTurbulence`'s arithmetic per pixel; `grainTurbulence` itself is the reference the
11
+ * shader mirrors and the thing the tests pin.
12
+ *
13
+ * Measured against Chromium's own `feTurbulence` (a 240x160 element, `baseFrequency` 0.85, two
14
+ * octaves, `stitchTiles="stitch"`, greyed by the same `feColorMatrix`, screenshotted and compared
15
+ * code for code): mean absolute difference **0.38 of 255**, worst 3, 63 % of pixels exact,
16
+ * correlation **0.99929**. The residue is Skia's 8-bit rounding of an intermediate, not a different
17
+ * field.
18
+ */
19
+ /** Lattice size; the spec's `BSize`. Indices wrap at 256, which is why `BM` is a mask of 255. */
20
+ export declare const GRAIN_LATTICE = 256;
21
+ /** The spec's `PerlinN`: a large multiple of `BSize` added so negative coordinates still mask. */
22
+ export declare const GRAIN_PERLIN_N = 4096;
23
+ /** The four noise channels the generator produces; the filter greys the first three. */
24
+ export declare const GRAIN_CHANNELS = 4;
25
+ /** Octaves in the fractal sum; the filter's `numOctaves`. */
26
+ export declare const GRAIN_OCTAVES = 2;
27
+ /** The channels the grey matrix averages: R, G and B. */
28
+ export declare const GRAIN_GREY_CHANNELS = 3;
29
+ /** The grey matrix's own coefficient, spelled as the filter spells it, not as a third. */
30
+ export declare const GRAIN_GREY_COEFFICIENT = 0.3333;
31
+ /**
32
+ * Where in a pixel the browser samples the field.
33
+ *
34
+ * Measured, not assumed: correlating this implementation against Chromium's rendered
35
+ * `feTurbulence` over a 240x160 element at `baseFrequency` 0.85 puts the maximum at exactly
36
+ * `(x + 1, y + 1)` for the pixel whose top-left corner is `(x, y)` — 0.99913 there against 0.1772
37
+ * at the pixel centre and -0.1294 at the corner, and the same answer with the element moved to
38
+ * (37, 23), so it is a property of the generator and not of where the layer sits. One pixel of
39
+ * base-frequency-0.85 noise is more than a whole lattice cell, so a sample point taken on faith
40
+ * would have decorrelated the world's grain from the backdrop's completely.
41
+ */
42
+ export declare const GRAIN_SAMPLE_OFFSET = 1;
43
+ /**
44
+ * The spec's `setup_seed`: fold the seed into `[1, 2^31 - 2]` without ever returning zero.
45
+ *
46
+ * Through a 32-bit float first, because that is where the browser's copy of the seed has been.
47
+ * `feTurbulence`'s `seed` is an SVG `<number>`, which Blink parses into a float and Skia rounds
48
+ * back to an int, so a seed above 2^24 is not the seed the filter actually runs with:
49
+ * `grainSeed('scene-shot:shot-a', 7)` is 831 820 165 and the filter's is 831 820 160. Measured, the
50
+ * difference is the whole field — correlation **-0.007** against Chromium's rendered noise without
51
+ * this line and **0.99929** with it. `grainSeed` returns values across the whole Lehmer range, so
52
+ * most frames of most shots land above 2^24 and would otherwise have grained the world from a
53
+ * lattice no other layer of the shot was using.
54
+ */
55
+ export declare function grainSetupSeed(seed: number): number;
56
+ /** One step of the Park–Miller stream the lattice is built from: `r = 16807 r mod (2^31 - 1)`. */
57
+ export declare function grainNextRandom(seed: number): number;
58
+ export interface GrainLattice {
59
+ /** `BSize + BSize + 2` selectors; the tail duplicates the head so `i + by` never runs off. */
60
+ readonly selector: Int32Array;
61
+ /** Per channel, `(BSize + BSize + 2) * 2` unit gradient components. */
62
+ readonly gradient: readonly Float64Array[];
63
+ }
64
+ /**
65
+ * The spec's `init`: four channels of unit gradients drawn from the stream in channel-major order,
66
+ * then a 255-swap shuffle of the selector, then the two-entry-plus-block duplication that lets
67
+ * `noise2` index `selector[i] + by` without a second mask.
68
+ */
69
+ export declare function grainLattice(seed: number): GrainLattice;
70
+ /**
71
+ * The stitch state for one tile, in the form the shader uses.
72
+ *
73
+ * `stitchTiles="stitch"` moves the base frequency to the nearer frequency that fits a whole number
74
+ * of periods across the tile, and then wraps the lattice at that period, so the field is continuous
75
+ * across the tile's edges. The spec keeps the wrap points offset by `PerlinN`, because its `noise2`
76
+ * adds `PerlinN` to the coordinate before flooring; the shader does not add it (the coordinates
77
+ * here are never negative, and `PerlinN` is a multiple of the lattice, so it cannot change a masked
78
+ * index), so the offset is taken off the wrap points once, here.
79
+ */
80
+ export interface GrainStitch {
81
+ readonly baseX: number;
82
+ readonly baseY: number;
83
+ readonly width: number;
84
+ readonly height: number;
85
+ readonly wrapX: number;
86
+ readonly wrapY: number;
87
+ }
88
+ /** The stitched frequencies and wrap points for a tile at the origin of the given size. */
89
+ export declare function grainStitch(frequency: number, tileWidth: number, tileHeight: number): GrainStitch;
90
+ /**
91
+ * The spec's `noise2` for one channel, with the `PerlinN` offset folded out (see `GrainStitch`).
92
+ * The lattice cell is picked by the floor of the coordinate, wrapped by the stitch and masked to
93
+ * the lattice; the value is the s-curve blend of the four corners' gradient dot products.
94
+ */
95
+ export declare function grainNoise2(lattice: GrainLattice, channel: number, x: number, y: number, stitch: GrainStitch): number;
96
+ /**
97
+ * `type="fractalNoise"` at a point: the signed octave sum, each octave at twice the frequency and
98
+ * half the amplitude, mapped from `[-1, 1]` into `[0, 1]`. The stitch doubles with the octave.
99
+ */
100
+ export declare function grainTurbulence(lattice: GrainLattice, channel: number, x: number, y: number, stitch: GrainStitch, octaves: number): number;
101
+ /**
102
+ * What the filter's grey matrix produces from the field: the mean of the first three channels, with
103
+ * the filter's own 0.3333 coefficient rather than a third, clamped like an 8-bit channel.
104
+ */
105
+ export declare function grainGrey(lattice: GrainLattice, x: number, y: number, stitch: GrainStitch, octaves: number): number;
106
+ /** Texels across the shader's lattice table: the whole selector, head and duplicated tail. */
107
+ export declare const GRAIN_TABLE_WIDTH: number;
108
+ /** Rows: the selector, then the first two channels' gradients, then the third's. */
109
+ export declare const GRAIN_TABLE_HEIGHT = 3;
110
+ /**
111
+ * One seed's lattice as RGBA float texels for the shader.
112
+ *
113
+ * Row 0 holds the selector in red. Row 1 holds channels 0 and 1's gradients as `(x, y, x, y)` and
114
+ * row 2 channel 2's as `(x, y, 0, 0)`, so a corner costs two fetches for all three greyed channels
115
+ * instead of three. The fourth channel is not packed: the filter's grey matrix drops it, and the
116
+ * alpha it would have produced is replaced by the source's own coverage.
117
+ */
118
+ export declare function grainLatticeTable(seed: number): Float32Array;
@@ -0,0 +1,19 @@
1
+ export type { SceneShotRender } from './render.js';
2
+ export { SceneShotError, type SceneShotErrorCode } from './errors.js';
3
+ export { referenceScale, type SceneFrameSize } from './scaling.js';
4
+ export { conjugateF, sceneWorldMatrix, sceneCssMatrix, sceneLayerPose, scaleSceneTransform, SCENE_EULER_ORDER, F, type SceneVec3, type SceneWorldTransform, type ThreeLayerPose, } from './coordinates.js';
5
+ export { SceneShotV2, backdropStyleV2, resolveSceneAssetsV2, type SceneShotV2Props, } from './v2/SceneShotV2.js';
6
+ export { PreparedSceneShotV1, PreparedSceneShotError, type PreparedSceneShotV1Props } from './v2/PreparedSceneShotV1.js';
7
+ export { SceneVideoBindingV1, SceneVideoTextureCommitV1, type SceneVideoBindingPropsV1, type SceneVideoTextureBindingV1 } from './v2/videoBinding.js';
8
+ export { acquireSceneRuntimeAllocationV1, registerActualSceneResourcesV1, resetSceneRuntimeAllocationCountersV1, sceneRuntimeAllocationSnapshotV1, type SceneActualResourceRowV1, type SceneActualResourceReceiptV1, type SceneRuntimeAllocationSnapshotV1 } from './v2/runtimeAllocations.js';
9
+ export { sceneShadowBoundsV2 } from './v2/shadow.js';
10
+ export { LaptopObject, PageObject, SlabObject, WorldTextObject, PosedObject, SLAB_CONTENT_OFFSET } from './v2/builders.js';
11
+ export type { SceneShotSpecV2, SceneObjectV2, SceneGroupV2, SceneLaptopV2, ScenePhoneV2, SceneSlabV2, ScenePageV2, SceneWorldTextV2, SceneScreenTextV2, SceneBackdropV2, ScenePostV2, SceneRigV2, SceneGeneratedStudioRigV2, ScenePhotographicStudioRigV1, SceneSurfaceBindingV2 } from '../../composition/scene/index.js';
12
+ export { PhotographicStudioRig, PhotographicStudioEnvironmentError, verifyPhotographicStudioHdr, PHOTOGRAPHIC_STUDIO_RIG_ID, PHOTOGRAPHIC_STUDIO_HDRI_PATH, PHOTOGRAPHIC_STUDIO_HDRI_SHA256, PHOTOGRAPHIC_STUDIO_HDRI_BYTES, PHOTOGRAPHIC_STUDIO_PMREM_VERSION, PHOTOGRAPHIC_STUDIO_LIGHTING_VERSION, PHOTOGRAPHIC_STUDIO_EDGE_LIGHTS, PHOTOGRAPHIC_STUDIO_EDGE_INTENSITY, PHOTOGRAPHIC_STUDIO_GPU_BYTES, PHOTOGRAPHIC_STUDIO_RIG_FACTS, } from './v2/PhotographicStudioRig.js';
13
+ export { SLAB_TESSELLATION, SLAB_TESSELLATION_VERSION, SLAB_TRIANGLES, SLAB_DEFAULTS, SCENE_MAX_TRIANGLES, SCENE_MAX_LAYERS, slabBodyGeometry, slabTriangleCount, slabTrianglesFor, withNormalisedFaceUv, } from './v2/slabGeometry.js';
14
+ export { SLAB_FINISHES, SLAB_FINISH_SPEC, slabFinishMaterial, slabFinishDeclaredBytes, satinRoughnessMap, satinRoughnessScalar, brushedNormal, anodisedGrainNormal, type SceneSlabFinish, } from './v2/finishes.js';
15
+ export { admitLightingProfile, admitSceneRigKind, admitSceneRigV2, assertNoObjectLightField, sceneRigIdentityV2, sceneLightCount, lightingProfileDeclaredBytes, SceneLightingRefusal, SCENE_OBJECT_LIGHT_FIELDS, SCENE_ENVIRONMENT_VERSION, type SceneLightingRefusalCode, type SceneRigIdentityV2, type SceneRigKindV2, type SceneGeneratedStudioRigIdentityV2, type ScenePhotographicStudioRigIdentityV1, } from './v2/lighting.js';
16
+ export { sceneSlotsFor, sceneBoundSurfaces, assertSceneSurfaceResolution, type SceneSlotDescriptor, } from './v2/slots.js';
17
+ export { RESOLUTION_BOUND, ALLOWED_BAKE_SCALES, DEFAULT_BAKE_SCALE, SceneResolutionRefusal, checkSurfaceResolution, selectSceneBakeScale, projectedSlotEdges, projectToOutputPixels, type SceneBakeScale, type SceneResolutionResult, type SceneBakeScaleSelection, type SceneEvaluatedPose, type SceneSlotRect, type SceneResolutionRefusalCode, } from './v2/projectedResolution.js';
18
+ export { sceneSlabPreparationFactsV1, scenePresetBuilderDescriptorV1, generatedStudioPreparationFactsV1, photographicStudioPreparationFactsV1, sceneGrainPreparationAllocationV1, sceneGrainPreparationCpuAllocationV1, sceneFocusPreparationAllocationsV1, } from './v2/preparationFacts.js';
19
+ export { preparedSurfaceDeviceProps, type PreparedSceneSurfaceVisualV1 } from './v2/preparedSurface.js';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Internal surface of the scene-shot renderer: the pieces later stages and tests reach for, kept
3
+ * off the package barrel so authored components see only `SceneShot` and the geometry helpers.
4
+ */
5
+ export { screenTextStyle, ScreenText, type ScreenTextProps, type EvaluatedScreenText } from './text.js';
6
+ export { PostFilter, postFilterId, postFilterStages, postFilterStyle, grainSeed, grainFrequency, hashSeed, GRAIN_BASE_FREQUENCY, type PostFilterProps, type ScenePostTreatment, type PostStage, } from './finishing.js';
7
+ export { vignetteGeometry, sceneVignetteFactor, sceneGrainLevel, sceneOverlay, blurredCoverage, erf, VIGNETTE_CORE_INSET, VIGNETTE_SIGMA, type VignetteGeometry, } from './finishingMath.js';
8
+ export { grainLattice, grainLatticeTable, grainStitch, grainNoise2, grainTurbulence, grainGrey, grainSetupSeed, grainNextRandom, GRAIN_LATTICE, GRAIN_OCTAVES, GRAIN_PERLIN_N, GRAIN_CHANNELS, GRAIN_GREY_CHANNELS, GRAIN_GREY_COEFFICIENT, GRAIN_SAMPLE_OFFSET, GRAIN_TABLE_WIDTH, GRAIN_TABLE_HEIGHT, type GrainLattice, type GrainStitch, } from './grainNoise.js';
9
+ export { sceneFinishingUniforms, type SceneFinishingUniforms } from './finishingPass.js';
10
+ export { sceneImageHandle, type SceneImageSlotRef } from './assets.js';
11
+ export { planeFit, planeImageRect, type PlaneFitResult, type PlaneSize, type SceneImageFit } from './planeFit.js';
12
+ export { LoadGenerations, EMPTY_TEXTURE_STATE, onTextureLoaded, onTextureError, onTextureCommitted, onTextureOwnerUnmounted, type Disposable, type CommittedTexture, type ScreenTextureState, type ReadinessEffects, type TextureSlotRef, } from './readiness.js';
13
+ export { useSceneImageTexture, type SceneImageSlotKind } from './useSceneImageTexture.js';
14
+ export { useWorldTextTexture } from './useWorldTextTexture.js';
15
+ export { textBlockLayout, lineBaselineY, lineOriginX, textFontShorthand, resolveSceneFontFamily, type TextBlockLayout, type TextLineBox, type TextLayoutInput, type TextFontMetrics, } from './textLayout.js';
16
+ export { drawWorldText, worldTextCacheKey, worldTextLayout, worldTextRasterSize, WORLD_TEXT_MAX_TEXTURE, type TextRasterContext, } from './worldTextRaster.js';
17
+ export { createWorldTextTexture, type WorldTextRasterRequest } from './worldTextTexture.js';
18
+ export { RasterCache, worldTextRasterCache } from './rasterCache.js';
19
+ export { onRasterReady, onRasterCommitted, onRasterOwnerUnmounted, type HeldRaster } from './rasterReadiness.js';
20
+ export { whenFontReady, documentFonts, type FontSource } from './fontReadiness.js';
21
+ export { focusBlurRadius, focusUniforms, viewDistanceFromDepth, FOCUS_OFF, FOCUS_TAPS, type FocusPassUniforms } from './focusBlur.js';
22
+ export { FOCUS_VERTEX_SHADER, FOCUS_GATHER_CHUNK, FOCUS_BLUR_FRAGMENT_SHADER, FOCUS_COMPOSITE_FRAGMENT_SHADER, FOCUS_FINISHING_CHUNK, } from './focusShaders.js';
23
+ export { FocusResources, renderFocusPass, assertHalfFloatColorTargets, canvasSampleCount, HALF_FLOAT_TARGET_EXTENSIONS, FOCUS_SPEC_PATH, type FocusRenderer, type FocusRendererExtensions, } from './focusResources.js';
24
+ export { FocusPass, FOCUS_PASS_PRIORITY, focusCameraPlanes, type FocusPassProps } from './FocusPass.js';
25
+ export { advanceRendererOnce } from './redraw.js';
26
+ export { applyLayerOpacity } from './deviceOpacity.js';
27
+ export { textureImageSize } from './textureImageSize.js';
28
+ export { deviceShellCorners, pointsBounds, unionBounds, type WorldPoint } from './worldBounds.js';
29
+ export { UnlitPlane, UNLIT_PLANE_ALPHA_TEST, type UnlitPlaneProps } from './UnlitPlane.js';
@@ -0,0 +1,46 @@
1
+ export type SceneImageFit = 'contain' | 'cover';
2
+ export interface PlaneSize {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ /**
7
+ * How a decoded image lands on an authored world plane.
8
+ *
9
+ * `size` is the quad actually drawn, `repeat`/`offset` are the texture's UV window. The two carry
10
+ * the two halves of the fit between them: `cover` keeps the authored plane and crops the image
11
+ * through the UV window; `contain` keeps the whole image and shrinks the quad to the image's
12
+ * aspect inside the authored box. Shrinking the quad — rather than padding the UVs — means the
13
+ * plane never samples outside [0,1], so no edge texel is smeared into a letterbox bar and the
14
+ * plane's transparent margin stays genuinely absent rather than a black rectangle.
15
+ */
16
+ export interface PlaneFitResult {
17
+ size: PlaneSize;
18
+ /** Three `Texture.repeat`, the fraction of the image the quad shows. */
19
+ repeat: [number, number];
20
+ /** Three `Texture.offset`, the UV-space corner of that fraction. */
21
+ offset: [number, number];
22
+ }
23
+ /**
24
+ * The region of the source image a fitted plane shows, in fractions of the image with the origin
25
+ * at the image's TOP-left and y running down — the orientation an author reasons about, and the
26
+ * one a quadrant fixture is checked against.
27
+ *
28
+ * The conversion from `offset` is an identity because both crops are centred: a `cover` crop
29
+ * removes the same fraction from the top and the bottom, so the distance from the image's top
30
+ * equals the UV-space distance from its bottom. Orientation itself comes from two facts that hold
31
+ * for every page plane this renderer builds: `PlaneGeometry` puts v = 1 at local +y, and a
32
+ * `TextureLoader` image has `flipY` true, which puts the image's first row at v = 1. The plane's
33
+ * top therefore shows the image's top, with no flip anywhere in the transform chain — the layer
34
+ * conversion `F·M·F` conjugates the pose, it does not mirror the geometry's own frame.
35
+ */
36
+ export declare function planeImageRect(fit: PlaneFitResult): {
37
+ x: number;
38
+ y: number;
39
+ width: number;
40
+ height: number;
41
+ };
42
+ /**
43
+ * Fit a decoded image of `image` pixels onto an authored `plane` (both in the same units; the
44
+ * caller has already applied the reference scale to the plane). Pure: no texture, no renderer.
45
+ */
46
+ export declare function planeFit(fit: SceneImageFit, plane: PlaneSize, image: PlaneSize): PlaneFitResult;
@@ -0,0 +1,25 @@
1
+ import type { SceneWorldTextV2 } from '../../composition/scene/index.js';
2
+ import type { TextBlockLayout } from './textLayout.js';
3
+ /** Raster inputs already resolved before the Three consumer mounts. */
4
+ export interface PreparedWorldTextLayer {
5
+ kind: 'worldText';
6
+ layer: SceneWorldTextV2 & {
7
+ width: number;
8
+ };
9
+ index: number;
10
+ layout: TextBlockLayout;
11
+ size: {
12
+ width: number;
13
+ height: number;
14
+ };
15
+ key: string;
16
+ }
17
+ /** A world text raster maps one-to-one onto its world plane. */
18
+ export declare function worldTextPlaneFit(layout: TextBlockLayout): {
19
+ size: {
20
+ width: number;
21
+ height: number;
22
+ };
23
+ repeat: [number, number];
24
+ offset: [number, number];
25
+ };
@@ -0,0 +1,30 @@
1
+ import type { Texture } from 'three';
2
+ import type { Disposable } from '../three/textureLifecycle.js';
3
+ /**
4
+ * A cache of immutable rasters shared by content identity, with one reference count per holder.
5
+ *
6
+ * The contract lets instances share immutable decoded inputs while keeping mutable meshes,
7
+ * materials, cameras and render targets per instance. A world-text raster is exactly that kind of
8
+ * input: static within a shot, identical whenever the resolved text, typography and scale are
9
+ * identical, and never written to after it is drawn. Each holder acquires and releases, and the
10
+ * value is disposed on the release that takes the count to zero — so one shot unmounting can
11
+ * never dispose the texture another shot is still drawing with, and a shot that reacquires the
12
+ * same identity does not redraw it.
13
+ *
14
+ * A release for a value that is no longer the cached one disposes that value alone: it belonged
15
+ * to a superseded entry and only its holder can free it.
16
+ */
17
+ export declare class RasterCache<T extends Disposable> {
18
+ private readonly entries;
19
+ acquire(key: string, create: () => T): T;
20
+ release(key: string, value: T): void;
21
+ /** How many holders a key has right now; 0 when it is not cached. Tests and diagnostics only. */
22
+ refs(key: string): number;
23
+ get size(): number;
24
+ }
25
+ /**
26
+ * The renderer's world-text rasters. One process-wide table keyed by content and scale: two shots
27
+ * saying the same thing at the same size decode it once. Nothing mutable lives here — see the
28
+ * class doc for why that is the line.
29
+ */
30
+ export declare const worldTextRasterCache: RasterCache<Texture<unknown>>;
@@ -0,0 +1,33 @@
1
+ import type { Disposable } from '../three/textureLifecycle.js';
2
+ import type { RasterCache } from './rasterCache.js';
3
+ import type { LoadGenerations, ReadinessEffects } from './readiness.js';
4
+ /** A shared raster this layer holds a reference to, with the readiness handle its build took. */
5
+ export interface HeldRaster<T extends Disposable = Disposable> {
6
+ key: string;
7
+ raster: T;
8
+ handle: number;
9
+ }
10
+ /**
11
+ * A raster's prerequisites (its font) are ready.
12
+ *
13
+ * Live: the shared raster is acquired — built only if no other holder has it — and returned for
14
+ * React to commit; its handle stays open until the commit step has drawn it. Obsolete (a newer
15
+ * identity began, or the owner unmounted): nothing is acquired, so nothing has to be given back,
16
+ * and only this load's own handle is released.
17
+ */
18
+ export declare function onRasterReady<T extends Disposable>(generations: LoadGenerations, cache: RasterCache<T>, token: number, key: string, handle: number, create: () => T, effects: Pick<ReadinessEffects, 'continueRender'>): HeldRaster<T> | null;
19
+ /**
20
+ * React committed a raster. Draw once (the frame loop is `never` while rendering), then release
21
+ * the handle, then — and only then — give back the reference this commit replaced. Releasing the
22
+ * previous reference last is what keeps a shared raster alive across an identity change that
23
+ * resolves to the same content: the new acquisition is already counted before the old one goes.
24
+ */
25
+ export declare function onRasterCommitted<T extends Disposable>(cache: RasterCache<T>, held: HeldRaster<T> | null, committed: HeldRaster<T>, effects: Pick<ReadinessEffects, 'continueRender'> & {
26
+ redraw(): void;
27
+ }): HeldRaster<T>;
28
+ /**
29
+ * The owner unmounted, possibly mid-build: no later completion may acquire anything, and the
30
+ * reference it holds goes back to the cache — which disposes the raster only if this was the last
31
+ * holder, so another shot drawing the same words is untouched.
32
+ */
33
+ export declare function onRasterOwnerUnmounted<T extends Disposable>(generations: LoadGenerations, cache: RasterCache<T>, held: HeldRaster<T> | null): null;
@@ -0,0 +1,69 @@
1
+ import { type Disposable } from '../three/textureLifecycle.js';
2
+ /**
3
+ * Generation tokens for one asynchronous resource. Each load takes a token; only the newest is
4
+ * live, and none is once the owner closes. A completion checks its token before touching anything.
5
+ */
6
+ export declare class LoadGenerations {
7
+ private current;
8
+ private closed;
9
+ begin(): number;
10
+ isLive(token: number): boolean;
11
+ close(): void;
12
+ }
13
+ export type { Disposable };
14
+ /** A loaded texture handed to React with the readiness handle its load took. */
15
+ export interface CommittedTexture<T extends Disposable = Disposable> {
16
+ texture: T;
17
+ handle: number;
18
+ }
19
+ /** What one layer's texture loads have produced so far. */
20
+ export interface ScreenTextureState<T extends Disposable = Disposable> {
21
+ /** The texture the scene was last drawn with. */
22
+ drawn: T | null;
23
+ /** Loaded and handed to React, but not yet through the commit step. */
24
+ pending: T | null;
25
+ }
26
+ export declare const EMPTY_TEXTURE_STATE: ScreenTextureState<never>;
27
+ export interface ReadinessEffects {
28
+ continueRender(handle: number): void;
29
+ cancelRender(error: Error): void;
30
+ }
31
+ /**
32
+ * A texture finished loading. Live: it becomes pending and is returned for React to commit; its
33
+ * handle stays open until the commit step has drawn it. Obsolete (a newer load began, or the
34
+ * owner unmounted): the texture is disposed and only its own handle is released — the drawn
35
+ * scene and any other handle are untouched.
36
+ */
37
+ export declare function onTextureLoaded<T extends Disposable>(generations: LoadGenerations, state: ScreenTextureState<T>, token: number, texture: T, handle: number, effects: Pick<ReadinessEffects, 'continueRender'>): {
38
+ state: ScreenTextureState<T>;
39
+ commit: CommittedTexture<T> | null;
40
+ };
41
+ /** Which binding a failed load belongs to: the slot name, and what the shot wanted it for. */
42
+ export interface TextureSlotRef {
43
+ slot: string;
44
+ what: string;
45
+ }
46
+ /**
47
+ * A load failed. Live: the render is cancelled with a typed error naming the slot. Obsolete: the
48
+ * layer that owned this load is gone or has moved on, so only its own handle is released.
49
+ */
50
+ export declare function onTextureError(generations: LoadGenerations, token: number, error: unknown, handle: number, target: TextureSlotRef, effects: ReadinessEffects): 'cancelled' | 'released';
51
+ /**
52
+ * React committed a loaded texture. Draw once (the frame loop is `never` while rendering), then
53
+ * release the handle, then — and only then — dispose the texture this one replaced. The
54
+ * replacement rule itself is `commitImageTexture`, the one dispose-on-commit policy this package
55
+ * has; this function adds only the readiness handle and the draw that must precede it.
56
+ */
57
+ export declare function onTextureCommitted<T extends Disposable>(state: ScreenTextureState<T>, committed: CommittedTexture<T>, effects: Pick<ReadinessEffects, 'continueRender'> & {
58
+ redraw(): void;
59
+ }): ScreenTextureState<T>;
60
+ /**
61
+ * The owner unmounted, possibly mid-load: no later completion may touch anything, the drawn
62
+ * texture goes, and so does one that loaded but never reached the commit step.
63
+ *
64
+ * Both disposals are `textureLifecycle`'s, not restatements of it: what an unmounted owner does
65
+ * with what it last drew is `releaseImageTexture`, and a texture that arrived for an owner that is
66
+ * gone is `discardStaleTexture` — the same rule `onTextureLoaded` applies to a superseded load.
67
+ * This function adds only the generation close and the pending case.
68
+ */
69
+ export declare function onTextureOwnerUnmounted<T extends Disposable>(generations: LoadGenerations, state: ScreenTextureState<T>): ScreenTextureState<never>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Draw the fiber scene once, now. During rendering the frame loop is `never` and `invalidate()`
3
+ * is a no-op, so a change committed outside Remotion's own per-frame advance (a texture that
4
+ * arrived) is invisible until something calls `advance`. This is the one place the scene renderer
5
+ * reads a clock: fiber's `advance` wants a timestamp to hand its frame callbacks. This renderer
6
+ * registers exactly one — `FocusPass`, which claims the render priority — and that callback takes
7
+ * neither the timestamp nor the delta, so the wall clock cannot reach a drawn frame through it
8
+ * (asserted in `FocusPass.test.tsx`). Authored components never call this; the readiness hook does.
9
+ */
10
+ export declare function advanceRendererOnce(advance: (timestamp: number) => void): void;
@@ -0,0 +1,9 @@
1
+ /** Output facts supplied by the admitted render host for one scene frame. */
2
+ export interface SceneShotRender {
3
+ frame: number;
4
+ fps: number;
5
+ width: number;
6
+ height: number;
7
+ seed: string;
8
+ colorSpace: 'srgb';
9
+ }
@@ -0,0 +1,13 @@
1
+ export interface SceneFrameSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ /**
6
+ * The uniform reference-pixel scale for an output frame: output width over reference width.
7
+ * Only defined at an equal aspect; anything else is a re-layout the author must do, not a crop
8
+ * this renderer may invent. Checked by cross-multiplication so integer sizes compare exactly.
9
+ */
10
+ export declare function referenceScale(render: SceneFrameSize, reference: {
11
+ width: number;
12
+ height: number;
13
+ }): number;
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import type { SceneScreenTextV2 } from '../../composition/scene/index.js';
3
+ import type { SceneFrameSize } from './scaling.js';
4
+ export interface EvaluatedScreenText {
5
+ x: number;
6
+ y: number;
7
+ rotation: number;
8
+ scale: number;
9
+ opacity: number;
10
+ }
11
+ /**
12
+ * Inline style for a screen-space text block. The box comes from `textBlockLayout`, the same
13
+ * module the world-text rasterizer draws from, so the two paths cannot drift *in their boxes* —
14
+ * run-boundary shaping is the one place they still can, and `drawWorldText` documents it: the block is
15
+ * `width` wide and exactly `lines × fontSize × lineHeight` tall (lines are explicit, so its
16
+ * height is known without measuring), centred on the frame centre plus (x, y), all in reference
17
+ * pixels times `scale`. Rotation and the uniform scale act about the block centre. `lineHeight`
18
+ * is a unitless multiplier and is not scaled; `whiteSpace: pre` keeps authored spacing and
19
+ * forbids reflow. `index` is the layer's array index, used for validator-style error paths
20
+ * (`layers.N.color`).
21
+ */
22
+ export declare function screenTextStyle(layer: SceneScreenTextV2 & {
23
+ width: number;
24
+ }, index: number, evaluated: EvaluatedScreenText, scale: number, frame: SceneFrameSize): React.CSSProperties;
25
+ export interface ScreenTextProps {
26
+ layer: SceneScreenTextV2 & {
27
+ width: number;
28
+ };
29
+ /** The layer's index in `spec.layers`, for error paths. */
30
+ index: number;
31
+ evaluated: EvaluatedScreenText;
32
+ scale: number;
33
+ frame: SceneFrameSize;
34
+ }
35
+ /**
36
+ * Screen text as DOM from typed runs: one block per line, one span per run, text as text nodes.
37
+ * A run colour overrides the layer colour for that run only; there is no substring matching and
38
+ * no markup path, so a run reading `<b>` renders those three characters.
39
+ */
40
+ export declare function ScreenText({ layer, index, evaluated, scale, frame }: ScreenTextProps): React.JSX.Element;
@@ -0,0 +1,78 @@
1
+ import type { SceneFontFamily, SceneTextLineV2 } from '../../composition/scene/index.js';
2
+ /** The typography and content both text paths read; screen and world text differ only in placement. */
3
+ export interface TextLayoutInput {
4
+ fontFamily: SceneFontFamily;
5
+ fontWeight: number;
6
+ fontStyle: 'normal' | 'italic';
7
+ /** Reference pixels. */
8
+ fontSize: number;
9
+ /** Unitless multiplier, never scaled. */
10
+ lineHeight: number;
11
+ letterSpacing: number;
12
+ align: 'left' | 'center' | 'right';
13
+ /** Reference pixels. */
14
+ width: number;
15
+ lines: readonly SceneTextLineV2[];
16
+ }
17
+ /** One line's box in the block, in output pixels from the block's top-left. */
18
+ export interface TextLineBox {
19
+ index: number;
20
+ top: number;
21
+ height: number;
22
+ }
23
+ /** The block's boxes in output pixels: what the DOM lays out and what the rasterizer draws into. */
24
+ export interface TextBlockLayout {
25
+ width: number;
26
+ height: number;
27
+ /** The reference scale this block was laid out at; both paths name the same face with it. */
28
+ scale: number;
29
+ fontSize: number;
30
+ /** The unitless multiplier, carried through unscaled for the DOM's `line-height`. */
31
+ lineHeight: number;
32
+ /** `fontSize * lineHeight`, the height of every line box. */
33
+ lineBox: number;
34
+ align: 'left' | 'center' | 'right';
35
+ lines: TextLineBox[];
36
+ }
37
+ /**
38
+ * The one line/run layout both text paths consume: the DOM screen-text block and the world-text
39
+ * rasterizer.
40
+ *
41
+ * Lines are authored explicitly, so a block's height is known without measuring anything: `lines ×
42
+ * fontSize × lineHeight`, the CSS line-box model with a unitless `line-height`. Reference pixels
43
+ * scale by the output scale; the multiplier does not. Nothing here needs a font to be loaded,
44
+ * which is what lets the DOM path lay out before the raster path has measured a glyph.
45
+ */
46
+ export declare function textBlockLayout(layer: TextLayoutInput, scale: number): TextBlockLayout;
47
+ /** A font's vertical extent at the laid-out size, as `measureText` reports it. */
48
+ export interface TextFontMetrics {
49
+ ascent: number;
50
+ descent: number;
51
+ }
52
+ /**
53
+ * The alphabetic baseline of a line box, in output pixels from the block's top.
54
+ *
55
+ * CSS centres the font's content box inside the line box and splits the remainder evenly above and
56
+ * below it (half-leading); the baseline is then the ascent below the content box's top. A
57
+ * rasterizer that put the baseline anywhere else would drift from the DOM path as `lineHeight`
58
+ * moved away from 1.
59
+ */
60
+ export declare function lineBaselineY(box: TextLineBox, metrics: TextFontMetrics): number;
61
+ /**
62
+ * Where a line of measured width `lineWidth` starts, in output pixels from the block's left edge.
63
+ * The same rule CSS `text-align` applies; a line wider than the block overflows both ways rather
64
+ * than being truncated, because the contract forbids reflow and truncation alike.
65
+ */
66
+ export declare function lineOriginX(layout: TextBlockLayout, lineWidth: number): number;
67
+ /**
68
+ * The family a text layer actually draws with. A brand font token is resolved during preparation,
69
+ * like a brand colour; one that reaches the renderer would otherwise be handed to the font loader
70
+ * as a family name and quietly replaced by a fallback face, so it is refused with its path.
71
+ */
72
+ export declare function resolveSceneFontFamily(family: SceneFontFamily, path: string): string;
73
+ /**
74
+ * The CSS `font` shorthand for a layer at an output scale, in the order the shorthand requires
75
+ * (style, weight, size, family). Both paths use it: the DOM through its own properties, the
76
+ * rasterizer through `ctx.font` and `document.fonts`, so neither can drift onto another face.
77
+ */
78
+ export declare function textFontShorthand(layer: TextLayoutInput, scale: number, path?: string): string;
@@ -0,0 +1,4 @@
1
+ import type { Texture } from 'three';
2
+ import type { PlaneSize } from './planeFit.js';
3
+ /** The decoded pixel size of a loaded texture's image, refused rather than guessed if absent. */
4
+ export declare function textureImageSize(texture: Texture, slot: string, layerIndex: number): PlaneSize;
@@ -0,0 +1,21 @@
1
+ import { Texture } from 'three';
2
+ /** What an image slot is for; only the wording of a handle and of a load failure differs. */
3
+ export type SceneImageSlotKind = 'screenshot' | 'page image';
4
+ /**
5
+ * One image slot's bytes as an sRGB Three texture, under Remotion readiness: a device layer's
6
+ * screenshot or a page layer's image. A thin wrapper — every decision about what a completion may
7
+ * touch lives in the pure policy functions in `readiness.ts`, which the node tests drive directly.
8
+ *
9
+ * Every `src` takes a fresh `delayRender` handle and a generation token. The first handle is
10
+ * taken during render, not in an effect: the cold frame is the one whose readiness poll could
11
+ * otherwise land between the commit and the effect. A live completion is committed through
12
+ * state; the layout effect after that commit draws the scene once, releases the handle, and only
13
+ * then disposes the texture it replaced. Must run inside the fiber canvas (it uses `useThree`).
14
+ *
15
+ * The texture is owned by this hook's instance: two layers binding the same slot decode their
16
+ * own, so one layer's crop or disposal can never reach the other's material.
17
+ *
18
+ * `what` names the slot in the readiness handle and in a load failure ("screenshot", "page
19
+ * image"); the failure path stays `assets.<slot>`, the binding map the author must correct.
20
+ */
21
+ export declare function useSceneImageTexture(src: string, slot: string, what: SceneImageSlotKind, resourceOwner?: string): Texture | null;
@@ -0,0 +1,21 @@
1
+ import type { Texture } from 'three';
2
+ import type { PreparedWorldTextLayer } from './preparedWorldText.js';
3
+ /**
4
+ * One world-text layer's rasterized texture, under Remotion readiness. A thin wrapper: every
5
+ * decision about what a completion may touch lives in the pure policy in `rasterReadiness.ts`,
6
+ * which the node tests drive directly.
7
+ *
8
+ * The shape is the image path's, with two differences the raster forces:
9
+ *
10
+ * 1. The wait is for a font, not for bytes. Nothing is drawn until `document.fonts` reports the
11
+ * exact face ready under this render's `delayRender` handle, so a frame can never be captured
12
+ * with a fallback face that a later frame would draw differently. No timer is involved.
13
+ * 2. The texture is immutable and shared by content identity, so it is acquired from and released
14
+ * to `worldTextRasterCache` rather than disposed directly. Two shots saying the same thing at
15
+ * the same scale rasterize once, and either unmounting cannot dispose what the other draws.
16
+ *
17
+ * Every identity takes a fresh handle and a generation token; a completion that is no longer live
18
+ * releases its own handle and acquires nothing. The reference the layer replaces is given back
19
+ * only in the commit effect, after the redraw that drew its replacement.
20
+ */
21
+ export declare function useWorldTextTexture(prepared: PreparedWorldTextLayer): Texture | null;
@@ -0,0 +1,7 @@
1
+ /** A Fiber-owned plane whose actual Three disposal closes its measured allocation receipt. */
2
+ export declare function MeasuredPlaneGeometry({ width, height, owner, name }: {
3
+ width: number;
4
+ height: number;
5
+ owner: string;
6
+ name: string;
7
+ }): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export { PHOTOGRAPHIC_STUDIO_EDGE_INTENSITY, PHOTOGRAPHIC_STUDIO_EDGE_LIGHTS, PHOTOGRAPHIC_STUDIO_GPU_BYTES, PHOTOGRAPHIC_STUDIO_HDRI_BYTES, PHOTOGRAPHIC_STUDIO_HDRI_PATH, PHOTOGRAPHIC_STUDIO_HDRI_SHA256, PHOTOGRAPHIC_STUDIO_LIGHTING_VERSION, PHOTOGRAPHIC_STUDIO_PMREM_VERSION, PHOTOGRAPHIC_STUDIO_RIG_FACTS, PHOTOGRAPHIC_STUDIO_RIG_ID, } from '../../../composition/scene/index.js';
2
+ export declare class PhotographicStudioEnvironmentError extends Error {
3
+ readonly code: 'scene_photographic_environment_fetch_failed' | 'scene_photographic_environment_digest_mismatch' | 'scene_photographic_environment_decode_failed';
4
+ constructor(code: PhotographicStudioEnvironmentError['code'], message: string);
5
+ }
6
+ /** Refuse any bytes other than the redistributed, pinned CC0 environment before decoding them. */
7
+ export declare function verifyPhotographicStudioHdr(bytes: Uint8Array): Promise<void>;
8
+ /** The original three-card reflection rig: fixed environment, five fixed lights, no floor/shadows. */
9
+ export declare function PhotographicStudioRig({ worldScale }: {
10
+ worldScale?: number;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type SealedSceneShotPlanV1 } from '../../../composition/scene/index.js';
2
+ import type { SceneShotRender } from '../render.js';
3
+ export declare class PreparedSceneShotError extends Error {
4
+ readonly code: 'scene_plan_output_mismatch' | 'scene_builder_descriptor_unavailable' | 'scene_builder_descriptor_mismatch';
5
+ constructor(code: 'scene_plan_output_mismatch' | 'scene_builder_descriptor_unavailable' | 'scene_builder_descriptor_mismatch', message: string);
6
+ }
7
+ export interface PreparedSceneShotV1Props {
8
+ plan: SealedSceneShotPlanV1;
9
+ render: SceneShotRender;
10
+ }
11
+ /** Renders only decisions already sealed by preparation; unsupported builders refuse by authored kind. */
12
+ export declare function PreparedSceneShotV1({ plan, render }: PreparedSceneShotV1Props): import("react").JSX.Element;