@cueframe/kernel 0.2.2 → 0.2.3

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 (332) 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/composition/fonts/bundledFaces.d.ts +150 -0
  118. package/dist/_members/composition/fonts/captionFaces.d.ts +268 -0
  119. package/dist/_members/composition/fonts.d.ts +11 -4
  120. package/dist/_members/composition/graphics-plan/schemas.d.ts +4 -4
  121. package/dist/_members/composition/ops/types.d.ts +1 -1
  122. package/dist/_members/composition/primitive-catalog/types.d.ts +1 -0
  123. package/dist/_members/composition/projection/behind-readiness.d.ts +3 -0
  124. package/dist/_members/composition/projection/brandKit.d.ts +6 -0
  125. package/dist/_members/composition/projection/composition-floor.d.ts +2 -1
  126. package/dist/_members/composition/scene/animation.d.ts +25 -0
  127. package/dist/_members/composition/scene/budget.d.ts +29 -0
  128. package/dist/_members/composition/scene/budgetPolicy.d.mts +13 -0
  129. package/dist/_members/composition/scene/clipRules.d.ts +119 -0
  130. package/dist/_members/composition/scene/constraints.d.ts +61 -0
  131. package/dist/_members/composition/scene/device.d.ts +21 -0
  132. package/dist/_members/composition/scene/examples.d.ts +11 -0
  133. package/dist/_members/composition/scene/index.d.ts +11 -0
  134. package/dist/_members/composition/scene/photographicRig.d.ts +242 -0
  135. package/dist/_members/composition/scene/preparedRender.d.ts +239 -0
  136. package/dist/_members/composition/scene/resolution.d.ts +178 -0
  137. package/dist/_members/composition/scene/schema.d.ts +351 -0
  138. package/dist/_members/composition/scene/videoSchedule.d.ts +43 -0
  139. package/dist/_members/composition/validators/brandKit.d.ts +1 -0
  140. package/dist/_members/composition/validators/render.d.ts +2 -0
  141. package/dist/_members/composition-ops/index.d.ts +45 -0
  142. package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
  143. package/dist/_members/core/render/compositionRender.d.ts +41 -9
  144. package/dist/_members/core/render/index.d.ts +9 -2
  145. package/dist/_members/core/render/sceneCaptureIdentity.d.ts +14 -0
  146. package/dist/_members/core/render/sceneShotPlan.d.ts +142 -0
  147. package/dist/_members/core/render/sceneShotPreparation.d.ts +57 -0
  148. package/dist/_members/core/render/slabDescriptor.d.ts +21 -0
  149. package/dist/_members/core/render/trackProjection.d.ts +33 -0
  150. package/dist/_members/core/render/types.d.ts +142 -0
  151. package/dist/_members/errors/registry.d.ts +6 -0
  152. package/dist/_members/mcp/adapter.d.ts +5 -0
  153. package/dist/_members/mcp/generated/sceneContract.d.ts +155 -0
  154. package/dist/_members/mcp/sceneShot.d.ts +38 -0
  155. package/dist/_members/mcp/sceneShotExample.d.ts +22 -0
  156. package/dist/_members/media-model/api.d.ts +1 -0
  157. package/dist/_members/media-model/media-kind.d.ts +1 -1
  158. package/dist/_members/media-model/testing/mediaStoreContract.d.ts +1 -1
  159. package/dist/_members/primitives/effects/index.d.ts +1 -0
  160. package/dist/_members/primitives/effects/stage-camera/config.d.ts +50 -0
  161. package/dist/_members/primitives/effects/stage-camera/index.d.ts +31 -0
  162. package/dist/_members/primitives/layouts/flex-layout/config.d.ts +73 -0
  163. package/dist/_members/primitives/layouts/flex-layout/index.d.ts +4 -0
  164. package/dist/_members/primitives/layouts/index.d.ts +1 -0
  165. package/dist/_members/primitives/layouts/picture-in-picture/config.d.ts +1 -1
  166. package/dist/_members/primitives/lib/frameScale.d.ts +4 -0
  167. package/dist/_members/primitives/lib/index.d.ts +1 -0
  168. package/dist/_members/primitives/lib/palette.d.ts +30 -30
  169. package/dist/_members/primitives/lib/text/contrast.d.ts +2 -1
  170. package/dist/_members/primitives/lib/text/spec.d.ts +0 -8
  171. package/dist/_members/primitives/lib/types.d.ts +2 -0
  172. package/dist/_members/primitives/scenes/device-showcase/config.d.ts +41 -0
  173. package/dist/_members/primitives/scenes/device-showcase/index.d.ts +36 -0
  174. package/dist/_members/primitives/scenes/hero-device-assemble/config.d.ts +1 -0
  175. package/dist/_members/primitives/scenes/hero-device-assemble/index.d.ts +2 -1
  176. package/dist/_members/primitives/scenes/index.d.ts +1 -0
  177. package/dist/_members/primitives/ui-blocks/badge-pop/config.d.ts +1 -1
  178. package/dist/_members/primitives/ui-blocks/device-mockup-zoom/config.d.ts +1 -0
  179. package/dist/_members/primitives/ui-blocks/device-mockup-zoom/index.d.ts +2 -1
  180. package/dist/_members/primitives/ui-blocks/terminal-simulator/config.d.ts +1 -1
  181. package/dist/_members/primitives/ui-blocks/toast-notification/config.d.ts +1 -1
  182. package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
  183. package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
  184. package/dist/_members/render-harness/css-tree-subpaths.d.ts +11 -0
  185. package/dist/_members/render-harness/extractSegments.d.ts +1 -0
  186. package/dist/_members/render-harness/extractSegments.d.ts.map +1 -1
  187. package/dist/_members/render-harness/imageHeader.d.ts +14 -0
  188. package/dist/_members/render-harness/imageHeader.d.ts.map +1 -0
  189. package/dist/_members/render-harness/index.d.ts +6 -0
  190. package/dist/_members/render-harness/index.d.ts.map +1 -1
  191. package/dist/_members/render-harness/materializeSources.d.ts +46 -2
  192. package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
  193. package/dist/_members/render-harness/nodeScenePreparation.d.ts +97 -0
  194. package/dist/_members/render-harness/nodeScenePreparation.d.ts.map +1 -0
  195. package/dist/_members/render-harness/remotion-runtime.d.ts +16 -2
  196. package/dist/_members/render-harness/renderInputAssets.d.ts +1 -1
  197. package/dist/_members/render-harness/renderInputAssets.d.ts.map +1 -1
  198. package/dist/_members/render-harness/resolveAssets.d.ts +2 -2
  199. package/dist/_members/render-harness/resolveAssets.d.ts.map +1 -1
  200. package/dist/_members/render-harness/sceneShotAssets.d.ts +17 -0
  201. package/dist/_members/render-harness/sceneShotAssets.d.ts.map +1 -0
  202. package/dist/animate/preparation-facts.d.ts +1 -0
  203. package/dist/animate/preparation-facts.js +22 -0
  204. package/dist/animate.js +336 -1005
  205. package/dist/authoring/build-tools.js +7 -6
  206. package/dist/authoring/context.js +5 -4
  207. package/dist/authoring/prompts.js +1 -1
  208. package/dist/authoring/scene.d.ts +1 -0
  209. package/dist/authoring/scene.js +50 -0
  210. package/dist/authoring/tools.js +6 -5
  211. package/dist/authoring.js +49 -29
  212. package/dist/chunk-2L7PYYJK.js +23 -0
  213. package/dist/{chunk-ZN6P3KOJ.js → chunk-32TH76H3.js} +2 -2
  214. package/dist/chunk-5DJ3IEJR.js +4424 -0
  215. package/dist/chunk-6BVVCRRD.js +26488 -0
  216. package/dist/{chunk-DQKSCHFC.js → chunk-6EWRIAZA.js} +187 -66
  217. package/dist/{chunk-YQ7FFW3G.js → chunk-6VWICHOZ.js} +26 -5
  218. package/dist/{chunk-RETQFTGY.js → chunk-A74FZCPY.js} +42 -5
  219. package/dist/{chunk-C5SEPOWD.js → chunk-AS5EXBNS.js} +1792 -707
  220. package/dist/{chunk-U5LBYS3N.js → chunk-B3GSTQLR.js} +339 -272
  221. package/dist/chunk-BVA3537Z.js +63 -0
  222. package/dist/{chunk-DHKQ47Q6.js → chunk-DAARYRNT.js} +6 -1
  223. package/dist/chunk-DQLYWNLC.js +2063 -0
  224. package/dist/chunk-E6WHXIDF.js +3619 -0
  225. package/dist/{chunk-HXKTZPRH.js → chunk-E7GIZEPS.js} +1 -1
  226. package/dist/{chunk-M2TLRXEO.js → chunk-EXY4JJPH.js} +1 -1
  227. package/dist/{chunk-GEGRJKKO.js → chunk-F2DJL7P7.js} +1 -1
  228. package/dist/{chunk-AWT3P5ZN.js → chunk-FVDFPJHT.js} +1 -1
  229. package/dist/{chunk-EMGFZ3PR.js → chunk-FWSJLHSV.js} +5 -1
  230. package/dist/{chunk-TMIBBD5E.js → chunk-I5QWBM3M.js} +280 -113
  231. package/dist/{chunk-IBMJ33EL.js → chunk-I5RX2QZT.js} +1 -1
  232. package/dist/{chunk-4FOOBSEE.js → chunk-J3DIUG24.js} +1 -0
  233. package/dist/{chunk-AD5HWBCE.js → chunk-JX53CVJV.js} +14 -5
  234. package/dist/{chunk-LNBVTDFR.js → chunk-L2AHS3AW.js} +1 -1
  235. package/dist/{chunk-BDMTUEEZ.js → chunk-LT4PWSR2.js} +2 -2
  236. package/dist/chunk-MH3UPKWR.js +3415 -0
  237. package/dist/{chunk-RFXR7ATW.js → chunk-NUKDEOK6.js} +13 -1
  238. package/dist/{chunk-IJ7PVJTK.js → chunk-ODUWCQI3.js} +3 -2
  239. package/dist/chunk-QAGGJHAF.js +16 -0
  240. package/dist/chunk-QS36DMFG.js +332 -0
  241. package/dist/{chunk-G5BFI32U.js → chunk-RAXHCRVV.js} +1 -1
  242. package/dist/{chunk-BIBYZJL3.js → chunk-RL5SO653.js} +3 -3
  243. package/dist/{chunk-ZSZABOE5.js → chunk-S5H6GH6M.js} +1 -1
  244. package/dist/{chunk-EEXCDFY5.js → chunk-SD25VQDE.js} +1 -1
  245. package/dist/{chunk-7REW2MW3.js → chunk-SX523NDS.js} +10 -10
  246. package/dist/chunk-TARKDVP6.js +430 -0
  247. package/dist/{chunk-IHFREGFA.js → chunk-TCHPRGC5.js} +18 -2
  248. package/dist/{chunk-ZCAQHNPI.js → chunk-UKGNHZS4.js} +1 -1
  249. package/dist/{chunk-WQSGVRFU.js → chunk-UY77TMKD.js} +31 -44
  250. package/dist/chunk-VKATKWWR.js +1462 -0
  251. package/dist/{chunk-CX2IIQ4R.js → chunk-W2245F6G.js} +29 -29
  252. package/dist/{chunk-XHUYWVYK.js → chunk-WBNFSG6T.js} +1 -1
  253. package/dist/chunk-WIHXXF3X.js +221 -0
  254. package/dist/{chunk-XVBOSPZI.js → chunk-X74EEFXV.js} +6 -6
  255. package/dist/{chunk-7KEUL3FI.js → chunk-XF2QMKRG.js} +9 -1
  256. package/dist/{chunk-HFC3MKXA.js → chunk-Y4HPN4BC.js} +1 -0
  257. package/dist/{chunk-D43J23QX.js → chunk-YFSBFCXO.js} +1018 -42
  258. package/dist/{chunk-6ID2J64H.js → chunk-YHC3RXS7.js} +162 -25
  259. package/dist/{chunk-KKEY5MIW.js → chunk-ZS3A3QUM.js} +16 -16
  260. package/dist/{chunk-LQUWKBST.js → chunk-ZVG446DJ.js} +139 -10
  261. package/dist/component-runtime/browserOptions.js +14 -3
  262. package/dist/component-runtime/contracts.js +35 -3
  263. package/dist/component-runtime/identity/browser.js +1 -1
  264. package/dist/component-runtime/identity.js +2 -2
  265. package/dist/component-runtime/importPolicy.js +2 -2
  266. package/dist/component-runtime/mediaResolution.d.ts +1 -0
  267. package/dist/component-runtime/mediaResolution.js +11 -0
  268. package/dist/component-runtime/render.js +38 -5
  269. package/dist/component-runtime.js +118 -14
  270. package/dist/compose.js +26 -20
  271. package/dist/composition/fonts.js +64 -67
  272. package/dist/composition/graphics-plan.js +3 -2
  273. package/dist/composition/ops.js +4 -3
  274. package/dist/composition/primitive-catalog.js +1 -1
  275. package/dist/composition/projection.js +10 -3
  276. package/dist/composition/scene/budget-policy.d.ts +1 -0
  277. package/dist/composition/scene/budget-policy.js +17 -0
  278. package/dist/composition/scene/schema.json +2757 -0
  279. package/dist/composition/scene.d.ts +1 -0
  280. package/dist/composition/scene.js +275 -0
  281. package/dist/composition/validators.js +3 -2
  282. package/dist/composition-ops.js +103 -13
  283. package/dist/composition.js +12 -5
  284. package/dist/{context-4GSDBFT3.js → context-IUPQ54V4.js} +5 -4
  285. package/dist/core/render.js +54 -3
  286. package/dist/core/select.js +2 -2
  287. package/dist/core.js +6 -3
  288. package/dist/director/ai-sdk.js +3 -3
  289. package/dist/director/domain.js +2 -2
  290. package/dist/director.js +3 -3
  291. package/dist/errors.js +1 -1
  292. package/dist/mcp/adapter.js +4 -4
  293. package/dist/mcp/core.js +1 -1
  294. package/dist/mcp/curation.js +1 -1
  295. package/dist/mcp/server.js +4 -4
  296. package/dist/mcp.js +4 -4
  297. package/dist/media-model/media-kind.js +2 -0
  298. package/dist/media-model/testing.js +16 -11
  299. package/dist/media-model.js +1 -1
  300. package/dist/nle-export.js +26 -20
  301. package/dist/primitives/backgrounds.js +2 -2
  302. package/dist/primitives/captions.js +21 -11
  303. package/dist/primitives/effects.js +14 -4
  304. package/dist/primitives/graphics.json +3 -0
  305. package/dist/primitives/hero-text.js +4 -3
  306. package/dist/primitives/layouts.js +9 -2
  307. package/dist/primitives/lib/frameScale.d.ts +1 -0
  308. package/dist/primitives/lib/frameScale.js +11 -0
  309. package/dist/primitives/lib/index.js +18 -10
  310. package/dist/primitives/lib/palette.js +1 -1
  311. package/dist/primitives/lib/text/contrast.js +2 -1
  312. package/dist/primitives/lib/text/typeface.js +1 -1
  313. package/dist/primitives/lib.js +18 -10
  314. package/dist/primitives/params-required.json +3 -0
  315. package/dist/primitives/scenes.js +12 -3
  316. package/dist/primitives/text.js +5 -5
  317. package/dist/primitives/transitions.js +2 -2
  318. package/dist/primitives/ui-blocks.js +6 -5
  319. package/dist/primitives/version-map.json +5 -2
  320. package/dist/primitives.js +20 -13
  321. package/dist/render-harness/cardAssetAdmission.js +2 -2
  322. package/dist/render-harness/renderInputAssets.js +2 -2
  323. package/dist/render-harness.js +874 -124
  324. package/package.json +49 -15
  325. package/dist/_members/animate/three/drei.d.ts +0 -6
  326. package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts +0 -9
  327. package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts.map +0 -1
  328. package/dist/chunk-5OTQ7M43.js +0 -718
  329. package/dist/chunk-CGHTMZNC.js +0 -6
  330. package/dist/chunk-KVMVYRXX.js +0 -9527
  331. package/dist/chunk-WYQX4QIK.js +0 -544
  332. /package/dist/{chunk-H5LMJKZU.js → chunk-JVDUSOYG.js} +0 -0
@@ -0,0 +1,59 @@
1
+ import React from 'react';
2
+ import { type ShadowBounds } from '../../three/StudioRig.js';
3
+ import type { SceneShotRender } from '../render.js';
4
+ import type { SceneBackdropV2, SceneObjectV2, SceneShotSpecV2, SealedSceneShotPlanV1 } from '../../../composition/scene/index.js';
5
+ import type { PreparedSceneSurfaceVisualV1 } from './preparedSurface.js';
6
+ import { type SceneVideoTextureBindingV1 } from './videoBinding.js';
7
+ /** The backdrop as CSS on the shot root. Transparent paints nothing, so the frame keeps its alpha. */
8
+ export declare function backdropStyleV2(backdrop: SceneBackdropV2): React.CSSProperties;
9
+ export declare function drawSceneFrameV2({ advance, invalidate, isRendering, playing, now }: {
10
+ advance: (timestamp: number) => void;
11
+ invalidate: () => void;
12
+ isRendering: boolean;
13
+ playing: boolean;
14
+ now: number;
15
+ }): void;
16
+ /** Every image slot the tree binds, with its handle resolved BEFORE any canvas mounts. */
17
+ export declare function resolveSceneAssetsV2(layers: readonly SceneObjectV2[], assets: Record<string, unknown>): Map<string, string>;
18
+ export interface SceneShotV2Props {
19
+ /** One EVALUATED frame of a new-contract shot. The caller evaluates the animation; see the contract. */
20
+ spec: SceneShotSpecV2;
21
+ assets: Record<string, unknown>;
22
+ render: SceneShotRender;
23
+ /** THE NEGATIVE CONTROL of the material-lifecycle gate, and nothing else may set it. */
24
+ mountSurfacesEarly?: boolean;
25
+ /** Complete preparation evidence authorizing omission of the authored one-frame guard. */
26
+ preparedPlan?: SealedSceneShotPlanV1;
27
+ sealedBodyTriangles?: Readonly<Record<string, number>>;
28
+ sealedSurfaceColors?: Readonly<Record<string, string>>;
29
+ preparedSurfaceVisuals?: Readonly<Record<string, PreparedSceneSurfaceVisualV1>>;
30
+ videoTextureBindings?: readonly SceneVideoTextureBindingV1[];
31
+ sealedSurfaceHandles?: Readonly<Record<string, string>>;
32
+ sealedShadowBounds?: ShadowBounds;
33
+ sealedCameraPlanes?: {
34
+ near: number;
35
+ far: number;
36
+ };
37
+ }
38
+ /**
39
+ * The new-contract scene-shot renderer.
40
+ *
41
+ * A pure function of (evaluated spec, output size). Reference pixels scale uniformly by output
42
+ * width over reference width; a mismatched aspect throws `scene_aspect_mismatch`, because output
43
+ * resizing changes projection and viewport and never authored geometry (Decision 1).
44
+ *
45
+ * **The three-layer finishing split, which is contract and not implementation detail.** The shot is
46
+ * three stacked layers over one box: the CSS backdrop, the world (one fiber canvas, one camera, one
47
+ * depth buffer), and the screen text as DOM. The two DOM layers go through the alpha-preserving SVG
48
+ * filter; the world is finished inside the focus pass's output stage, from the same numbers. **No
49
+ * element that contains the WebGL canvas carries a CSS `filter`** — a filtered layer holding one is
50
+ * what let Chromium rasterize a whole shot once at 756x413 and repeat that raster across six frames
51
+ * of a 390-frame render (defect D4). `w1-mixed-shot` asserts that on the served markup.
52
+ *
53
+ * What differs from V1 is only what Decision 1 changes: the camera is Three-native and absolute,
54
+ * angles are radians, the floor is Y-up reference units, and every object's transform is authored
55
+ * in Three's axes. The lighting, the rig, the device geometry, the readiness path, the focus pass
56
+ * and the finishing are the same code the retained baselines were measured against — which is the
57
+ * point, because it makes the comparison a comparison of conventions and not of two renderers.
58
+ */
59
+ export declare function SceneShotV2({ spec, assets, render, mountSurfacesEarly, preparedPlan, sealedBodyTriangles, sealedSurfaceColors, preparedSurfaceVisuals, videoTextureBindings, sealedSurfaceHandles, sealedShadowBounds, sealedCameraPlanes }: SceneShotV2Props): React.JSX.Element;
@@ -0,0 +1,170 @@
1
+ import React from 'react';
2
+ import { type SceneWorldTransform } from '../coordinates.js';
3
+ import type { PreparedSceneSurfaceVisualV1 } from './preparedSurface.js';
4
+ import { type SceneLaptopV2, type ScenePageV2, type ScenePhoneV2, type SceneSlabV2, type SceneWorldTextV2 } from '../../../composition/scene/index.js';
5
+ export declare const sceneDeviceResourceOwnerV1: (node: Pick<SceneLaptopV2 | ScenePhoneV2, "kind" | "id">) => string;
6
+ /** The slab front slot is a centred contain fit inside the authored face. */
7
+ export declare const slabContentFit: (width: number, height: number, image: {
8
+ width: number;
9
+ height: number;
10
+ }) => import("../planeFit.js").PlaneFitResult;
11
+ /**
12
+ * One new-contract object's group: the authored (Three-native) pose, and the object's opacity
13
+ * multiplied through every material under it.
14
+ *
15
+ * The same shape as V1's `PosedLayer` and for the same reason — the layout effect must run after
16
+ * the group and its content are attached and before the readiness effect draws the frame, and
17
+ * React runs layout effects bottom-up — but it takes an AUTHORED transform rather than a V1 one,
18
+ * so nothing converts anything here.
19
+ */
20
+ export declare function PosedObject({ transform, scale, opacity, children }: {
21
+ transform: SceneWorldTransform;
22
+ scale: number;
23
+ opacity: number;
24
+ children: React.ReactNode;
25
+ }): React.JSX.Element;
26
+ /**
27
+ * THE LAPTOP BUILDER (plan W1 item 3).
28
+ *
29
+ * A group with an animatable hinge and the screen attached to the lid. The hinge is `DeviceMesh`'s
30
+ * own — the lid group pivots at the back edge of the base and carries the bezel, the screenshot
31
+ * plane and the glass with it — so the geometry and the materials are the ones the retained
32
+ * baselines were measured against, and `openAngle` drives them per frame.
33
+ *
34
+ * `openAngle` is RADIANS on the wire (report §5.5). `DeviceMesh`'s own parameter is degrees, so the
35
+ * conversion happens here, at the builder boundary, exactly as `fov` converts at three's API. There
36
+ * is one such conversion in the whole scene lane per quantity, and this is the hinge's.
37
+ *
38
+ * **THE MATERIAL-LIFECYCLE RULE (report §5.6.1), which is the reason this component can return
39
+ * `null`.** Three does not rebuild a shader program when `map` is assigned to an already-created
40
+ * material without `needsUpdate`, so a mesh mounted with `map: null` stays untextured for the
41
+ * WHOLE render even after the texture commits — and the render succeeds. So: a builder whose slot
42
+ * binding is present returns `null` until `useSceneImageTexture` has committed, and the readiness
43
+ * handle that hook took during render keeps the frame open meanwhile. Never
44
+ * `<mesh><material map={maybeNull} /></mesh>`. `w1-material-lifecycle` is the gate, and its
45
+ * negative control — the same fixture built with `mountEarly` — must fail it.
46
+ */
47
+ export declare function LaptopObject({ node, src, screenColor, preparedSurface, scale, surfaceResourceOwner, glassOpacity, mountEarly }: {
48
+ node: SceneLaptopV2;
49
+ /** The admitted handle for the object's screen slot, resolved before the canvas mounted. */
50
+ src: string;
51
+ screenColor?: string;
52
+ preparedSurface?: PreparedSceneSurfaceVisualV1;
53
+ surfaceResourceOwner?: string;
54
+ scale: number;
55
+ /**
56
+ * The screen glass's opacity, in the space the caller's pipeline blends in.
57
+ *
58
+ * Defaults to the LINEAR tenth, because a scene shot composes its world in the focus pass's
59
+ * half-float target. A caller drawing straight onto the canvas — which is what the V1/V2
60
+ * comparison does on BOTH of its arms, so that the comparison is of conventions and not of
61
+ * pipelines — passes the encoded one. `DeviceMesh` documents the pair; this prop exists so the
62
+ * builder never decides the pipeline on its caller's behalf.
63
+ */
64
+ glassOpacity?: number;
65
+ /**
66
+ * THE NEGATIVE CONTROL, and nothing else may set it.
67
+ *
68
+ * `true` mounts the mesh before the texture commits, which is the defect §5.6.1 names: the
69
+ * material is created with `map: null`, three caches a program for it, and the later assignment
70
+ * never reaches the GPU. It exists so the material-lifecycle gate has a red arm — a green gate
71
+ * with no red control proves nothing here, because the defect produces a *successful* render.
72
+ */
73
+ mountEarly?: boolean;
74
+ }): React.JSX.Element | null;
75
+ /** Canonical phone builder using the same owned shell/screen/glass hierarchy as DeviceMesh. */
76
+ export declare function PhoneObject({ node, src, screenColor, preparedSurface, scale, surfaceResourceOwner, glassOpacity, mountEarly }: {
77
+ node: ScenePhoneV2;
78
+ src: string;
79
+ screenColor?: string;
80
+ preparedSurface?: PreparedSceneSurfaceVisualV1;
81
+ surfaceResourceOwner?: string;
82
+ scale: number;
83
+ glassOpacity?: number;
84
+ mountEarly?: boolean;
85
+ }): React.JSX.Element | null;
86
+ /**
87
+ * The distance the content face sits in front of the slab's own front plane, in REFERENCE px.
88
+ *
89
+ * The body's front face is at `z = +thickness/2` exactly (`slabBodyGeometry` documents why), so a
90
+ * coplanar content quad would z-fight across the whole face — a shimmer that moves with the camera
91
+ * and that no still frame reveals. 0.6 reference px is under a tenth of the 15 px edge radius, so
92
+ * the face does not float off the shoulder at any yaw the shot takes, and it is comfortably more
93
+ * than the depth buffer's resolution at these near/far planes.
94
+ */
95
+ export declare const SLAB_CONTENT_OFFSET = 0.6;
96
+ /**
97
+ * THE SLAB BUILDER (plan W2 item 2).
98
+ *
99
+ * Two meshes and one group:
100
+ *
101
+ * - the BODY: the extruded rounded solid at the frozen 24/6 tessellation, with one of the two
102
+ * generated finishes. It is LIT, it casts and receives shadow, and it draws through
103
+ * `takeSceneEnvironment` so the scene's environment is the material's own — the third of the
104
+ * three three.js rules in `finishes.ts`.
105
+ * - the FRONT FACE: the `front` slot's admitted content, on an UNLIT, colour-managed quad.
106
+ *
107
+ * **The face is unlit, and that is a contract clause rather than a look.** A4 gates content
108
+ * surfaces as BYTE-IDENTICAL with the lighting profile on and off, and that gate is only passable
109
+ * because a content face takes no light by construction: `UNLIT_COLOUR_MANAGED` carries
110
+ * `toneMapped: false` and a basic material. Mapping the capture onto the lit body instead would
111
+ * make the gate fail — one moved interior pixel means a content surface IS taking light, which is
112
+ * a finding and not a tolerance.
113
+ *
114
+ * **The material-lifecycle rule (report §5.6.1), same as the laptop and for the same reason.** A
115
+ * builder whose slot binding is present returns `null` until `useSceneImageTexture` has committed.
116
+ * Three does not rebuild a shader program when `map` is assigned to an already-created material
117
+ * without `needsUpdate`, so a mesh mounted with `map: null` stays untextured for the WHOLE render
118
+ * and the render SUCCEEDS. `mountEarly` is the negative control, and nothing but the
119
+ * material-lifecycle gate sets it.
120
+ *
121
+ * **A bare slab is a first-class case, not a missing binding.** `surfaces` absent means the body
122
+ * with no face, which is what the finish gates measure: a content inset covering three quarters of
123
+ * the face would make any luma profile a measurement of the capture rather than of the material.
124
+ */
125
+ export declare function SlabObject({ node, src, frontColor, preparedSurface, scale, surfaceResourceOwner, mountEarly, expectedBodyTriangles }: {
126
+ node: SceneSlabV2;
127
+ /** The admitted handle for the `front` slot, or `undefined` for a bare slab. */
128
+ src: string | undefined;
129
+ frontColor?: string;
130
+ preparedSurface?: PreparedSceneSurfaceVisualV1;
131
+ surfaceResourceOwner?: string;
132
+ scale: number;
133
+ /** THE NEGATIVE CONTROL; see `LaptopObject`. Nothing but the material-lifecycle gate sets it. */
134
+ mountEarly?: boolean;
135
+ expectedBodyTriangles?: number;
136
+ }): React.JSX.Element | null;
137
+ /** Own the slab's independently replaceable GPU resources for exactly one mounted builder. */
138
+ export declare function useOwnedSlabResources(width: number, height: number, thickness: number, cornerRadius: number, edgeRadius: number, finishName: SceneSlabV2['finish'], baseColor: string, materialOverride?: import('../../../composition/scene/index.js').SceneMaterialOverrideV2, owner?: string): {
139
+ geometry: import("three").ExtrudeGeometry;
140
+ finish: import("./finishes.js").SlabFinishMaterial;
141
+ };
142
+ /**
143
+ * A page: the bound image on an unlit, colour-managed world plane, occluding and occluded like any
144
+ * world surface. Same material-lifecycle rule as the laptop, for the same reason.
145
+ */
146
+ export declare function PageObject({ node, src, contentColor, preparedSurface, scale, surfaceResourceOwner, mountEarly }: {
147
+ node: ScenePageV2;
148
+ src: string;
149
+ contentColor?: string;
150
+ preparedSurface?: PreparedSceneSurfaceVisualV1;
151
+ surfaceResourceOwner?: string;
152
+ scale: number;
153
+ /** THE NEGATIVE CONTROL; see `LaptopObject`. Nothing but the material-lifecycle gate sets it. */
154
+ mountEarly?: boolean;
155
+ }): React.JSX.Element | null;
156
+ /**
157
+ * World text: the typed lines and runs rasterized from the same layout and the same font the DOM
158
+ * path uses, on an unlit plane placed by the object's world transform.
159
+ *
160
+ * The raster itself is V1's — `useWorldTextTexture`, `worldTextLayout`, the shared raster cache and
161
+ * its font readiness — because the typography is not what this contract changes and a second
162
+ * rasterizer would be a second set of baselines. The V2 node carries exactly the typographic fields
163
+ * that path reads; what it does not carry is a V1 `transform`, which that path never reads.
164
+ */
165
+ export declare function WorldTextObject({ node, index, scale, referenceWidth }: {
166
+ node: SceneWorldTextV2;
167
+ index: number;
168
+ scale: number;
169
+ referenceWidth: number;
170
+ }): React.JSX.Element | null;
@@ -0,0 +1,152 @@
1
+ /**
2
+ * The two GENERATED slab finishes — satin and brushed — and the material each one builds.
3
+ *
4
+ * **Nothing here is sampled from a photograph, and that is the point.** The spike put five
5
+ * photogrammetric CC0 scans on this slab and every one read as a FOUND object: weathered casting,
6
+ * oxidised gilt, a good powder coat that still carried the scan's own speckle. That is what a scan
7
+ * IS — one real, aged square metre of metal with its history in it. New hardware has no history and
8
+ * you cannot subtract one from the other. So every texel below is computed from a seeded PRNG,
9
+ * which buys three properties this lane needs:
10
+ *
11
+ * - **no dirt**, because dirt was never generated: the only variation is the band-limited noise
12
+ * these functions put there deliberately;
13
+ * - **small**: generated one-channel-ish data, not four 2048 JPEGs, so the material costs
14
+ * single-digit MiB against Decision 5's 256 MiB per-shot surface budget;
15
+ * - **deterministic**: `mulberry32` from a fixed integer seed gives the same texels on every host
16
+ * and every run. There is no `Math.random()` in this file, which is what lets gate 3's `sha256`
17
+ * equality and gate 4's byte identity mean anything at all.
18
+ *
19
+ * Everything is TILEABLE by construction — the value-noise lattices index modulo their own size —
20
+ * so a map wraps seamlessly and the slab never shows a repeat edge.
21
+ *
22
+ * **The three three.js rules this file exists to obey.** Each is a measured defect from the spike,
23
+ * not a style preference, and each looks like "the material didn't load" when it is broken:
24
+ *
25
+ * 1. **Extrusion UVs are unnormalised**, so the uv coordinate IS the world pixel. `repeat` is
26
+ * therefore `1 / (tile size in world px)`. A `repeat` of 1 would tile a map ~1040 times across
27
+ * this slab and grind it into grey noise. See `slabGeometry.ts`.
28
+ * 2. **Three MULTIPLIES the scalar by the map**: `roughness · roughnessMap.g`,
29
+ * `metalness · metalnessMap.b`, `color · map`. A scalar and its map are therefore declared
30
+ * TOGETHER, in one place, by `slabFinishMaterial` — leaving a `metalness: 0` in place beside a
31
+ * metalness map silently multiplies it to zero and gives back a dielectric.
32
+ * 3. **`envMapIntensity` only reaches a frame through `takeSceneEnvironment`.** Three uploads it
33
+ * only for a material carrying its OWN `envMap`; a material lit by `scene.environment` takes
34
+ * the other branch and has `scene.environmentIntensity` written over that uniform. The slab
35
+ * body therefore draws through that hook. Note that this makes the knob REAL, not authorable:
36
+ * report §5.7 keeps `envMapIntensity` out of the contract entirely, because environment
37
+ * strength is `environment.intensity` and nothing else.
38
+ */
39
+ import { DataTexture, MeshPhysicalMaterial } from 'three';
40
+ import type { SceneMaterialOverrideV2 } from '../../../composition/scene/index.js';
41
+ import { type SceneActualResourceRegistrarV1 } from './runtimeAllocations.js';
42
+ /** The two finishes report §5.5 names. `satin` is the default. */
43
+ export type SceneSlabFinish = 'satin' | 'brushed';
44
+ export declare const SLAB_FINISHES: readonly SceneSlabFinish[];
45
+ /**
46
+ * The satin micro-roughness map.
47
+ *
48
+ * **The encoding, which is rule 2 in its sharpest form.** Three computes roughness as
49
+ * `material.roughness · roughnessMap.g`, and an 8-bit map can only carry [0, 1] — so a map meaning
50
+ * "1.0 plus or minus `amp`" cannot be stored directly. Instead the map holds
51
+ * `(1 + amp·n) / (1 + amp)`, which lands in `[(1−amp)/(1+amp), 1]`, and the caller sets
52
+ * `material.roughness = base · (1 + amp)`. The product is then exactly `base · (1 + amp·n)`.
53
+ * `satinRoughnessScalar` returns that scalar so the two halves cannot drift apart, and
54
+ * `slabFinishMaterial` is the only place either is written.
55
+ *
56
+ * The noise is deliberately LOW frequency: a slow undulation reads as an unevenly cured satin coat,
57
+ * where a high-frequency version of the same modulation reads as sensor grain — the exact "grungy"
58
+ * note the generated finishes exist to remove.
59
+ */
60
+ export declare function satinRoughnessMap(size: number, tilePx: number, amp: number, seed: number): DataTexture;
61
+ /** The scalar half of the satin encoding above. Never written anywhere else. */
62
+ export declare const satinRoughnessScalar: (base: number, amp: number) => number;
63
+ /**
64
+ * A barely-there ISOTROPIC anodised grain, used by satin and as brushed's CLEARCOAT normal.
65
+ *
66
+ * The spike's first cut used a 128-cell lattice at strength 6 and it was wrong in the way the
67
+ * generated finishes exist to fix: a 128 lattice over a 512 px map tiled every 512 world px puts a
68
+ * feature every 4 world px, which at a ~1:1 projection is a 4 px stipple — visible orange peel,
69
+ * i.e. texture, i.e. grunge. 256/512 cells put it at 1–2 world px, below what the eye resolves as a
70
+ * pattern, and strength 1.2 rather than 6 makes it a sheen modulation instead of a relief.
71
+ */
72
+ export declare const anodisedGrainNormal: (size: number, tilePx: number, seed: number) => DataTexture;
73
+ /**
74
+ * Fine parallel brushing along the slab's LONG axis.
75
+ *
76
+ * The lattices are 512 wide and 6 tall: across the slab the height changes every ~2 texels, down it
77
+ * every ~170, so the gradient is almost entirely in x and the surface normal tilts side to side
78
+ * only. That is what stretches a point highlight into a line running down the slab — and because
79
+ * `uv`'s v axis is the slab's local y, the streaks run along the long axis, which is where the
80
+ * direction has to be for a brushed panel to read as machined rather than scratched.
81
+ *
82
+ * **Strength is 2.5, down from a first cut at 10, and the difference was a rim.** At 10 the lines
83
+ * read as tooling marks, and they DESTROYED the silhouette: the shoulder is an arc whose normal
84
+ * sweeps 90° in x, and a normal map perturbing x every ~2 units puts seven full cycles across it,
85
+ * scrambling exactly the axis the lit edge depends on. Measured, the band went to 0 px at 0.21×
86
+ * body — the edge read DARKER than the face. At 2.5 the direction still reads and the shoulder
87
+ * survives, which is what the `studio-edge` brushed gate then measures at 250.00 @ 2 px.
88
+ */
89
+ export declare const brushedNormal: (size: number, tilePx: number, seed: number) => DataTexture;
90
+ /**
91
+ * Every number either finish is built from, in ONE table.
92
+ *
93
+ * Satin is the original three-card acceptance material. Brushed retains W2's separately measured
94
+ * profile. The seeds are named constants rather than literals so byte-identity gates have one
95
+ * place to look.
96
+ */
97
+ export declare const SLAB_FINISH_SPEC: {
98
+ /** The W2 brushed defaults; satin overrides the original recipe's material fields below. */
99
+ readonly common: {
100
+ readonly clearcoat: 0.6;
101
+ readonly clearcoatRoughness: 0.22;
102
+ /** Rule 2: declared here beside every map, so no map is silently multiplied by a stale scalar. */
103
+ readonly metalness: 0;
104
+ readonly mapSize: 2048;
105
+ };
106
+ readonly satin: {
107
+ /** The *base* roughness. The scalar three receives is `satinRoughnessScalar(base, amp)`. */
108
+ readonly roughnessBase: 0.32;
109
+ readonly roughnessAmp: 0.03;
110
+ readonly roughnessTilePx: 1024;
111
+ readonly roughnessSeed: 6221057;
112
+ readonly roughnessMapSize: 512;
113
+ readonly normalTilePx: 512;
114
+ readonly normalSeed: 6221058;
115
+ readonly normalMapSize: 512;
116
+ readonly normalScale: 0.12;
117
+ readonly metalness: 0.22;
118
+ readonly clearcoat: 1;
119
+ readonly clearcoatRoughness: 0.12;
120
+ readonly envMapIntensity: 0.14;
121
+ };
122
+ readonly brushed: {
123
+ readonly roughness: 0.28;
124
+ readonly normalTilePx: 3;
125
+ readonly normalSeed: 7;
126
+ /** Three's tangent/local-x is the slab's short axis, so rotate the BRDF onto long local-y. */
127
+ readonly anisotropy: 0.65;
128
+ readonly anisotropyRotation: number;
129
+ readonly clearcoatNormalTilePx: 9;
130
+ readonly clearcoatNormalSeed: 13;
131
+ };
132
+ };
133
+ /** The maps one finish owns, kept together so disposal cannot miss one. */
134
+ export interface SlabFinishMaterial {
135
+ material: MeshPhysicalMaterial;
136
+ dispose(): void;
137
+ }
138
+ /**
139
+ * Build the material for one finish, with every scalar declared beside the map it multiplies.
140
+ *
141
+ * `baseColor` is the slab's flat base; there is no colour map, so it is not multiplied by anything
142
+ * and reaches the frame as written.
143
+ */
144
+ export declare function slabFinishMaterial(finish: SceneSlabFinish, baseColor: string, override?: SceneMaterialOverrideV2, owner?: string, registerActual?: SceneActualResourceRegistrarV1): SlabFinishMaterial;
145
+ /**
146
+ * The declared GL bytes one finish's generated maps allocate, for Decision 5's ledger.
147
+ *
148
+ * `Σ_l max(1, floor(W/2^l)) · max(1, floor(H/2^l)) · bytesPerTexel` across the full mip chain, at
149
+ * the actual declared storage format (RGBA8, 4 B/texel). Declared BEFORE allocation, which is what
150
+ * Decision 5 asks builders for; the runtime instrumentation checks the allocation against it.
151
+ */
152
+ export declare function slabFinishDeclaredBytes(finish: SceneSlabFinish): number;
@@ -0,0 +1,119 @@
1
+ /**
2
+ * A4's two refusals, and the rig identity the profile is sealed into.
3
+ *
4
+ * **NOTE FOR W3.** Refusal CODES and their paths are wire contract and belong in
5
+ * `@cueframe/composition/scene`'s schema module when W3 lands (plan ownership map). They are here
6
+ * because W2 has to enforce them before that schema exists, and because enforcement without a
7
+ * refusal is a default, which is the class of quiet wrongness this contract exists to remove. The
8
+ * two codes, their paths and their message shapes move unchanged.
9
+ *
10
+ * **NOTE FOR W4.** `sceneRigIdentityV2` is what preparation seals into the plan's `rigIdentity`
11
+ * (report §5.9). It is pure so that W4 can call it, and so that a reviewer can check that
12
+ * `lightingProfile` is genuinely part of the identity a capture and a ledger key on.
13
+ */
14
+ import { STUDIO_EDGE_INTENSITY, STUDIO_EDGE_LIGHTS, STUDIO_SHADOW_MAP_BUDGET, type SceneLightingProfile, type ShadowBounds, type StudioPreset } from '../../three/StudioRig.js';
15
+ import { PHOTOGRAPHIC_STUDIO_RIG_FACTS, PHOTOGRAPHIC_STUDIO_RIG_ID } from './PhotographicStudioRig.js';
16
+ import type { SceneGeneratedStudioRigV2, ScenePhotographicStudioRigV1 } from '../../../composition/scene/index.js';
17
+ export type SceneLightingRefusalCode = 'scene_lighting_profile_unsupported' | 'scene_rig_unsupported' | 'scene_photographic_rig_field_unsupported' | 'scene_object_light_field_unsupported';
18
+ export type SceneRigKindV2 = 'studio' | typeof PHOTOGRAPHIC_STUDIO_RIG_ID;
19
+ /** Admit the absent legacy kind or the one fixed photographic rig; nothing accepts a custom HDRI. */
20
+ export declare function admitSceneRigKind(value: unknown, path?: string): SceneRigKindV2;
21
+ /** Admit the complete rig object. The photographic arm has exactly one key and no knobs. */
22
+ export declare function admitSceneRigV2(rig: unknown, path?: string): SceneRigKindV2;
23
+ /** A typed refusal with the path the author's document is refused AT. */
24
+ export declare class SceneLightingRefusal extends Error {
25
+ readonly code: SceneLightingRefusalCode;
26
+ readonly path: string;
27
+ readonly detail: Record<string, unknown>;
28
+ constructor(code: SceneLightingRefusalCode, message: string, path: string, detail: Record<string, unknown>);
29
+ }
30
+ /**
31
+ * Admit a shot's `lightingProfile`, or refuse it by name.
32
+ *
33
+ * Any value that is not one of the two is `scene_lighting_profile_unsupported` at
34
+ * `environment.lightingProfile`, naming the value AND the two legal profiles — a refusal that does
35
+ * not say what IS legal makes an author guess, and the legal set here is two strings long.
36
+ *
37
+ * `undefined` is the default, `'studio'`. `null` is not: an explicitly null profile is an author
38
+ * saying something, and what they said is not a profile.
39
+ */
40
+ export declare function admitLightingProfile(value: unknown, path?: string): SceneLightingProfile;
41
+ /**
42
+ * Every field name an object might try to carry a light with — refused at the object's own path.
43
+ *
44
+ * **This list is the load-bearing half of A4.** The ruling is that adding or removing slabs never
45
+ * changes the light count: it is two under `studio-edge` whether the shot holds one slab, twelve or
46
+ * none, and zero extra under `studio`. That is only true if no object can contribute a light, so
47
+ * there is no `slabEdgeLighting`, no per-object light, no position and no intensity anywhere in
48
+ * `SceneObjectV2` — and an author writing one gets a refusal rather than a field that is ignored.
49
+ *
50
+ * `slabEdgeLighting` and `slabEdgeBoost` are named explicitly because the I0 PROTOTYPE carried
51
+ * them: arm (a) scaled the rig's own rim light per slab, and a document written against that
52
+ * prototype would otherwise be silently accepted with its lighting dropped on the floor.
53
+ */
54
+ export declare const SCENE_OBJECT_LIGHT_FIELDS: readonly string[];
55
+ /**
56
+ * Refuse any light-shaped field on an object, at `layers.N.<field>`.
57
+ *
58
+ * Returns the object unchanged when it carries none, so a caller can use it as a gate in an
59
+ * expression. `index` is used for the path when the node has no id yet.
60
+ */
61
+ export declare function assertNoObjectLightField(node: object, layerPath: string): void;
62
+ /** Report §5.9's `rigIdentity`: what a capture and a ledger key on. */
63
+ export interface SceneGeneratedStudioRigIdentityV2 {
64
+ lightingProfile: SceneLightingProfile;
65
+ preset: StudioPreset;
66
+ intensity: number;
67
+ floorY: number;
68
+ shadowOpacity: number;
69
+ shadowMapEdge: number;
70
+ environmentVersion: number;
71
+ }
72
+ export interface ScenePhotographicStudioRigIdentityV1 {
73
+ rigId: typeof PHOTOGRAPHIC_STUDIO_RIG_ID;
74
+ hdriSha256: string;
75
+ pmremVersion: string;
76
+ lightingVersion: number;
77
+ worldScale: number;
78
+ lightLayout: typeof PHOTOGRAPHIC_STUDIO_RIG_FACTS.studioLights;
79
+ edgeLightLayout: typeof PHOTOGRAPHIC_STUDIO_RIG_FACTS.edgeLights;
80
+ environmentIntensity: 1;
81
+ floor: 'none';
82
+ shadows: 'none';
83
+ retainedGpuBytes: number;
84
+ preparationPeakGpuBytes: number;
85
+ }
86
+ export type SceneRigIdentityV2 = SceneGeneratedStudioRigIdentityV2 | ScenePhotographicStudioRigIdentityV1;
87
+ /**
88
+ * The generated `RoomEnvironment`'s version.
89
+ *
90
+ * Bumped when the environment three generates changes — a different room, a different PMREM
91
+ * roughness, a three upgrade that moves either. It is in the identity because the environment is
92
+ * what lights every reflective surface in the shot, so a changed one is a changed picture, and a
93
+ * capture reused across it would be a stale one.
94
+ */
95
+ export declare const SCENE_ENVIRONMENT_VERSION = 1;
96
+ /**
97
+ * Seal the rig into an identity — including `lightingProfile`, which is the clause A4 adds.
98
+ *
99
+ * **Not animatable.** A profile is a property of the shot: a light count that changes mid-shot is
100
+ * not a rig, and an identity that a shot changes halfway through is not an identity. `intensity`
101
+ * IS animatable (report §5.7), so what is sealed here is its value at frame 0, which is what the
102
+ * sealed plan's `rigIdentity` carries and what W4 must keep doing.
103
+ */
104
+ export declare function sceneRigIdentityV2(rig: ScenePhotographicStudioRigV1, worldScale: number, shadowBounds?: ShadowBounds): ScenePhotographicStudioRigIdentityV1;
105
+ export declare function sceneRigIdentityV2(rig: SceneGeneratedStudioRigV2, worldScale: number, shadowBounds?: ShadowBounds): SceneGeneratedStudioRigIdentityV2;
106
+ /**
107
+ * What the profile allocates: **nothing**, and this function says so as an assertion rather than
108
+ * leaving it to be inferred.
109
+ *
110
+ * The two `studio-edge` lights cast no shadow, so they allocate no shadow map and no render target.
111
+ * Report §4.2's ledger is identical under both profiles and W7's totals do not move. "Two more
112
+ * lights" reads like a cost, and here it is not one; the gate that proves it is the byte-equality
113
+ * of every retained region assertion between the two profiles.
114
+ */
115
+ export declare function lightingProfileDeclaredBytes(_profile: SceneLightingProfile): number;
116
+ /** A shot's total light count under a profile: the rig's three, plus the profile's. */
117
+ export declare function sceneLightCount(profile: SceneLightingProfile, objectCount: number): number;
118
+ export { STUDIO_EDGE_LIGHTS, STUDIO_EDGE_INTENSITY, STUDIO_SHADOW_MAP_BUDGET };
119
+ export type { SceneLightingProfile };
@@ -0,0 +1,4 @@
1
+ import { type WebGLRenderer } from 'three';
2
+ import { type SceneActualResourceRegistrarV1 } from './runtimeAllocations.js';
3
+ /** Observe PMREM's internal targets at the renderer binding that precedes their first allocation. */
4
+ export declare function withObservedPmremTargetsV1<T>(renderer: WebGLRenderer, owner: string, build: () => T, registerActual?: SceneActualResourceRegistrarV1): T;
@@ -0,0 +1,32 @@
1
+ import { type SceneBuilderAllocationDescriptorV1, type SceneBuilderDescriptorV1, type SceneObjectV2, type SceneSlabV2 } from '../../../composition/scene/index.js';
2
+ import { type ShadowBounds } from '../../three/StudioRig.js';
3
+ import type { SceneGeneratedStudioRigV2 } from '../../../composition/scene/index.js';
4
+ export { photographicStudioPreparationFactsV1, sceneFocusPreparationAllocationsV1, } from '../../../composition/scene/index.js';
5
+ /** Facts measured from the same Three geometry constructor used by SlabObject. */
6
+ export declare function sceneSlabPreparationFactsV1(slab: SceneSlabV2): {
7
+ bodyTriangles: number;
8
+ allocations: readonly SceneBuilderAllocationDescriptorV1[];
9
+ };
10
+ /** The persistent float grain table allocated by FocusResources when post processing is active. */
11
+ export declare function sceneGrainPreparationAllocationV1(): SceneBuilderAllocationDescriptorV1;
12
+ export declare function sceneGrainPreparationCpuAllocationV1(): SceneBuilderAllocationDescriptorV1;
13
+ export declare function generatedStudioPreparationFactsV1(rig: SceneGeneratedStudioRigV2, worldScale: number, bounds: ShadowBounds, width: number, height: number): {
14
+ identity: import("./lighting.js").SceneGeneratedStudioRigIdentityV2;
15
+ allocations: SceneBuilderAllocationDescriptorV1[];
16
+ };
17
+ /** Complete descriptor facts measured from the same constructors mounted by the production builders. */
18
+ export declare function scenePresetBuilderDescriptorV1(object: Exclude<SceneObjectV2, {
19
+ kind: 'group';
20
+ } | {
21
+ kind: 'text';
22
+ space: 'screen';
23
+ }>, context?: {
24
+ referenceSize: {
25
+ width: number;
26
+ height: number;
27
+ };
28
+ output: {
29
+ width: number;
30
+ height: number;
31
+ };
32
+ }): SceneBuilderDescriptorV1;
@@ -0,0 +1,17 @@
1
+ import type { Texture } from 'three';
2
+ /**
3
+ * A surface whose bytes have already reached the shared Three consumer.
4
+ * The producer owns and disposes textures; builders only retain the reference while mounted.
5
+ */
6
+ export type PreparedSceneSurfaceVisualV1 = {
7
+ kind: 'texture';
8
+ texture: Texture;
9
+ readiness: 'committed';
10
+ } | {
11
+ kind: 'color';
12
+ color: string;
13
+ };
14
+ export declare function preparedSurfaceDeviceProps(surface: PreparedSceneSurfaceVisualV1 | undefined): {
15
+ screen: Texture | null;
16
+ screenColor?: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ /** Canonical portable resolution logic lives with the authored scene contract. */
2
+ export * from '../../../composition/scene/index.js';
@@ -0,0 +1,5 @@
1
+ import type { WebGLRenderer } from 'three';
2
+ type Subscriber = (target: Parameters<WebGLRenderer['setRenderTarget']>[0]) => void;
3
+ /** One wrapper per renderer; subscriptions detach safely in any order. */
4
+ export declare function subscribeSceneRenderTargetsV1(renderer: WebGLRenderer, subscriber: Subscriber): () => void;
5
+ export {};
@@ -0,0 +1,55 @@
1
+ import type { SealedSceneShotPlanV1 } from '../../../composition/scene/index.js';
2
+ import { type ReactNode } from 'react';
3
+ export interface SceneRuntimeAllocationSnapshotV1 {
4
+ createdPlans: number;
5
+ disposedPlans: number;
6
+ livePlans: number;
7
+ liveContextGlBytes: number;
8
+ liveCpuBytes: number;
9
+ peakGlBytesIncludingPreparation: number;
10
+ peakDeclaredLiveBytes: number;
11
+ actualCreatedResources: number;
12
+ actualDisposedResources: number;
13
+ actualLiveGlBytes: number;
14
+ actualLiveCpuBytes: number;
15
+ actualPeakLiveBytes: number;
16
+ actualLiveRows: readonly SceneActualResourceReceiptV1[];
17
+ }
18
+ export interface SceneActualResourceRowV1 {
19
+ owner: string;
20
+ name: string;
21
+ domain: 'gl' | 'cpu';
22
+ bytes: number;
23
+ width?: number;
24
+ height?: number;
25
+ samples?: number;
26
+ byteLength?: number;
27
+ /** Measured internal target whose installed Three name is not a wire allocation name. */
28
+ evidenceOnly?: boolean;
29
+ }
30
+ export interface SceneActualResourceReceiptV1 extends SceneActualResourceRowV1 {
31
+ resourceId: number;
32
+ }
33
+ export type SceneActualResourceRegistrarV1 = (object: object, rows: readonly SceneActualResourceRowV1[]) => () => void;
34
+ export declare function sceneActualResourceRegistrarForMountV1(mountId: number): SceneActualResourceRegistrarV1;
35
+ /** Returns a registrar bound to a pure token; receipts begin only after its boundary commits. */
36
+ export declare function useSceneActualResourceRegistrarV1(): SceneActualResourceRegistrarV1;
37
+ /** Plan replacement remounts one committed owner; render and discarded trees emit no receipts. */
38
+ export declare function SceneRuntimeAllocationBoundaryV1({ plan, children }: {
39
+ plan: SealedSceneShotPlanV1;
40
+ children: ReactNode;
41
+ }): import("react").FunctionComponentElement<{
42
+ plan: SealedSceneShotPlanV1;
43
+ children?: ReactNode;
44
+ }>;
45
+ export declare function sceneRuntimeAllocationSnapshotV1(): Readonly<SceneRuntimeAllocationSnapshotV1>;
46
+ /** Reset is test/host-cycle instrumentation only; mounted resources must be gone first. */
47
+ export declare function resetSceneRuntimeAllocationCountersV1(): void;
48
+ /** Register measured storage beside a real owned object; release after its actual dispose succeeds. */
49
+ export declare function registerActualSceneResourcesV1(object: object, rows: readonly SceneActualResourceRowV1[], mountId?: number): () => void;
50
+ /** Called by the actual prepared scene mount and released by its layout-effect cleanup. */
51
+ export declare function reserveSceneRuntimeAllocationV1(plan: SealedSceneShotPlanV1): {
52
+ mountId: number;
53
+ release: () => void;
54
+ };
55
+ export declare function acquireSceneRuntimeAllocationV1(plan: SealedSceneShotPlanV1): () => void;
@@ -0,0 +1,23 @@
1
+ import type { ShadowBounds } from '../../three/StudioRig.js';
2
+ import type { SceneObjectV2 } from '../../../composition/scene/index.js';
3
+ /**
4
+ * The shot's shadow allocation, in REFERENCE units, from the shot's own sweep.
5
+ *
6
+ * Shot-level by construction: the caller hands every evaluated frame it wants covered — in
7
+ * practice the extremes of its animation, which is what it knows and what W4's preparation will
8
+ * seal — and the union of them is one allocation that cannot change size mid-render. A frustum
9
+ * recomputed from the frame being drawn would resize the shadow map as the shot ran, and the
10
+ * contact band would move with it.
11
+ *
12
+ * Pages and world text contribute coverage although they do not cast: only device shells set
13
+ * `castShadow`, and an unlit plane has no shadow to place. Including them can only grow the
14
+ * frustum — never shrink it — so the receiving floor under a page stays inside the caster's view.
15
+ *
16
+ * The frame term is the authored frame at z = 0, down to the floor when the floor lies below it,
17
+ * exactly as V1's `shotShadowBounds` computes it. It assumes the camera looks at the frame plane
18
+ * head-on; a camera pushed far off axis is covered only through the objects it can see.
19
+ */
20
+ export declare function sceneShadowBoundsV2(samples: readonly (readonly SceneObjectV2[])[], referenceSize: {
21
+ width: number;
22
+ height: number;
23
+ }, floorY: number): ShadowBounds;