@cueframe/kernel 0.0.1 → 0.1.1

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 (432) hide show
  1. package/LICENSE +661 -0
  2. package/dist/_members/account-model/testing/conversationStoreContract.d.ts +1 -1
  3. package/dist/_members/authoring/providers/resourceApi.d.ts +1 -1
  4. package/dist/_members/authoring/transpileComponent.d.ts +1 -1
  5. package/dist/_members/cloud-import/CloudImportService.d.ts +35 -0
  6. package/dist/_members/cloud-import/ImportProvider.d.ts +73 -0
  7. package/dist/_members/cloud-import/MediaItemPreprocessor.d.ts +27 -0
  8. package/dist/_members/cloud-import/cloudConfig.d.ts +23 -0
  9. package/dist/_members/cloud-import/index.d.ts +9 -0
  10. package/dist/_members/cloud-import/multipartUpload.d.ts +12 -0
  11. package/dist/_members/composition/ops/compositionOps.d.ts +2 -1
  12. package/dist/_members/composition/ops/types.d.ts +1 -1
  13. package/dist/_members/composition/projection/behind-readiness.d.ts +127 -0
  14. package/dist/_members/composition/projection/index.d.ts +2 -0
  15. package/dist/_members/composition/projection/reframe-readiness.d.ts +156 -0
  16. package/dist/_members/composition/timeline/placement.d.ts +1 -1
  17. package/dist/_members/composition/validators/composition.d.ts +43 -26
  18. package/dist/_members/composition/validators/render.d.ts +32 -0
  19. package/dist/_members/composition-ops/index.d.ts +1 -1
  20. package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
  21. package/dist/_members/convex-api/api.d.ts +5 -0
  22. package/dist/_members/convex-api/dataModel.d.ts +6 -0
  23. package/dist/_members/core/render/compositionRender.d.ts +17 -1
  24. package/dist/_members/core/render/exportSettings.d.ts +1 -1
  25. package/dist/_members/core/render/types.d.ts +31 -0
  26. package/dist/_members/mcp/curation.d.ts +1 -1
  27. package/dist/_members/plane/conformance.d.ts +1 -1
  28. package/dist/_members/render-harness/localRender.d.ts +1 -1
  29. package/dist/animate.js +828 -79187
  30. package/dist/authoring/build-tools.js +8 -11
  31. package/dist/authoring/context.js +5 -5
  32. package/dist/authoring/models.js +1 -2
  33. package/dist/authoring/prompts.js +1 -1
  34. package/dist/authoring/tools.js +7 -7
  35. package/dist/authoring/transpileComponent.js +3 -2220
  36. package/dist/authoring.js +30 -30
  37. package/dist/brand-derivation.js +1 -1
  38. package/dist/chunk-6IU2UQI5.js +107 -0
  39. package/dist/{chunk-5I7VDCAC.js → chunk-7FO3ZJ43.js} +4 -1
  40. package/dist/{chunk-N67PDTKQ.js → chunk-ABL557OT.js} +1 -1
  41. package/dist/{chunk-MC5DLSEV.js → chunk-AP6ZIVAV.js} +15 -15
  42. package/dist/{chunk-QLAQHR3L.js → chunk-AQBREB5O.js} +1 -1
  43. package/dist/{chunk-DSNG6WLU.js → chunk-AYVJXDLB.js} +1 -4
  44. package/dist/{chunk-6CMVBTTP.js → chunk-DK2ODBNT.js} +19 -9
  45. package/dist/chunk-DSMLHYJ4.js +82 -0
  46. package/dist/{chunk-BRKJKB33.js → chunk-FYZVH3MC.js} +1 -1
  47. package/dist/{chunk-MVEE6HEC.js → chunk-GA23TRNR.js} +5 -7
  48. package/dist/chunk-HCCBDJLW.js +68 -0
  49. package/dist/{chunk-JRQVPFLF.js → chunk-HY3RIEZW.js} +1 -1
  50. package/dist/{chunk-OIRUO5P7.js → chunk-JJ6XD7NG.js} +152 -2
  51. package/dist/{_members/primitives/chunk-IDAL6G3Y.js → chunk-JQMPHKLU.js} +19 -27
  52. package/dist/{chunk-G3PBH53P.js → chunk-MBCXCJOE.js} +1 -1
  53. package/dist/{chunk-UEI3NLNK.js → chunk-MHOQTPOB.js} +1 -4
  54. package/dist/{chunk-37NJ27UU.js → chunk-OCFDUCF4.js} +3 -0
  55. package/dist/{chunk-WZTTZHNR.js → chunk-OLFOPQCA.js} +12 -9
  56. package/dist/{chunk-P43IE4WB.js → chunk-P727GZVO.js} +2 -4
  57. package/dist/{chunk-52AHXNKM.js → chunk-PDYO3DOJ.js} +5 -5
  58. package/dist/{chunk-S3P5BFFL.js → chunk-PMY24FUD.js} +2 -4
  59. package/dist/{chunk-ATAF24QG.js → chunk-PODIYN2K.js} +10 -3
  60. package/dist/chunk-RF7U3SCL.js +606 -0
  61. package/dist/{chunk-JD77Y2WM.js → chunk-SW336CJP.js} +1 -4
  62. package/dist/{chunk-TULRCY6U.js → chunk-TOJEXFXL.js} +1 -1
  63. package/dist/{chunk-ELLSET2N.js → chunk-UHGSZZDI.js} +3 -6
  64. package/dist/{chunk-M3I5LMAB.js → chunk-UY4SWJVE.js} +1 -1
  65. package/dist/{chunk-6QJ3V3VS.js → chunk-YX2GSJK7.js} +1 -1
  66. package/dist/chunk-ZT7MHRQU.js +104 -0
  67. package/dist/{chunk-NV4I6GJV.js → chunk-ZWMV6DD2.js} +27 -4
  68. package/dist/cloud-import/multipart.d.ts +1 -0
  69. package/dist/cloud-import/multipart.js +8 -0
  70. package/dist/cloud-import.d.ts +1 -0
  71. package/dist/cloud-import.js +234 -0
  72. package/dist/compose/renderer.js +19 -22
  73. package/dist/compose.js +19 -22
  74. package/dist/composition/graphics-plan.js +3 -3
  75. package/dist/composition/ops.js +4 -4
  76. package/dist/composition/primitive-catalog.js +1 -1
  77. package/dist/composition/projection.js +21 -5
  78. package/dist/composition/validators.js +6 -4
  79. package/dist/composition-ops.js +15 -13
  80. package/dist/composition.js +26 -8
  81. package/dist/{context-CEAKQ5T7.js → context-YWUZDG5X.js} +5 -5
  82. package/dist/convex-api/dataModel.d.ts +1 -0
  83. package/dist/convex-api/dataModel.js +0 -0
  84. package/dist/convex-api.d.ts +1 -0
  85. package/dist/convex-api.js +8 -0
  86. package/dist/core/render.js +3 -3
  87. package/dist/core/select.js +2 -2
  88. package/dist/core.js +3 -3
  89. package/dist/errors.js +1 -1
  90. package/dist/mcp/adapter.js +2 -5
  91. package/dist/mcp/server.js +1 -2
  92. package/dist/mcp.js +2 -95
  93. package/dist/media-model/media-kind.js +9 -98
  94. package/dist/media-model/testing.js +1071 -718
  95. package/dist/nle-export/server.js +328 -130
  96. package/dist/nle-export/xml.js +5 -22799
  97. package/dist/nle-export.js +20 -22
  98. package/dist/primitives/backgrounds.js +2 -3
  99. package/dist/primitives/captions.js +4 -243
  100. package/dist/primitives/effects.js +2 -3
  101. package/dist/primitives/hero-text.js +2 -3
  102. package/dist/primitives/layouts.js +2 -3
  103. package/dist/primitives/lib/index.js +8 -10
  104. package/dist/primitives/lib/preview.js +1 -2
  105. package/dist/primitives/lib/schema.js +1 -2
  106. package/dist/primitives/lib/text/fitText.js +1 -2
  107. package/dist/primitives/lib.js +8 -10
  108. package/dist/primitives/scenes.js +1 -2
  109. package/dist/primitives/text.js +2 -3
  110. package/dist/primitives/ui-blocks.js +4 -5
  111. package/dist/primitives.js +19 -21
  112. package/package.json +125 -16
  113. package/dist/TextureLoader-UQOFUSAP.js +0 -422
  114. package/dist/VideoTexture-AQWSPIJG.js +0 -62
  115. package/dist/_members/account-model/index.js +0 -4
  116. package/dist/_members/account-model/testing/conversationStoreContract.js +0 -168
  117. package/dist/_members/account-model/testing/index.js +0 -7
  118. package/dist/_members/account-model/testing/restorePointStoreContract.js +0 -69
  119. package/dist/_members/account-model/types/index.js +0 -1
  120. package/dist/_members/account-model/validators/contextFile.js +0 -18
  121. package/dist/_members/account-model/validators/conversation.js +0 -95
  122. package/dist/_members/account-model/validators/dashboardInsight.js +0 -16
  123. package/dist/_members/account-model/validators/index.js +0 -7
  124. package/dist/_members/account-model/validators/sessionToken.js +0 -49
  125. package/dist/_members/account-model/validators/uploadToken.js +0 -16
  126. package/dist/_members/account-model/validators/userSettings.js +0 -12
  127. package/dist/_members/account-model/validators/workingComposition.js +0 -20
  128. package/dist/_members/brand-derivation/constants.js +0 -20
  129. package/dist/_members/brand-derivation/contrastSafe.js +0 -114
  130. package/dist/_members/brand-derivation/index.js +0 -1
  131. package/dist/_members/composition/audio/audioMix.js +0 -61
  132. package/dist/_members/composition/audio/index.js +0 -5
  133. package/dist/_members/composition/audio/mixStaging.js +0 -195
  134. package/dist/_members/composition/audio/musicPack.generated.js +0 -136
  135. package/dist/_members/composition/audio/musicPack.js +0 -36
  136. package/dist/_members/composition/audio/pack.generated.js +0 -603
  137. package/dist/_members/composition/audio/pack.js +0 -48
  138. package/dist/_members/composition/audio/palette.js +0 -134
  139. package/dist/_members/composition/autozoom/index.js +0 -83
  140. package/dist/_members/composition/brand-kit.js +0 -45
  141. package/dist/_members/composition/brief/contract.js +0 -209
  142. package/dist/_members/composition/color-grade.js +0 -80
  143. package/dist/_members/composition/depth.js +0 -8
  144. package/dist/_members/composition/fixtures/index.js +0 -143
  145. package/dist/_members/composition/fixtures/vaayaErrored.d.ts +0 -25
  146. package/dist/_members/composition/fixtures/vaayaErrored.js +0 -203
  147. package/dist/_members/composition/fonts.js +0 -162
  148. package/dist/_members/composition/graphics-plan/compile.js +0 -221
  149. package/dist/_members/composition/graphics-plan/index.js +0 -10
  150. package/dist/_members/composition/graphics-plan/instantiateMotif.js +0 -44
  151. package/dist/_members/composition/graphics-plan/motion.js +0 -66
  152. package/dist/_members/composition/graphics-plan/schemas.js +0 -261
  153. package/dist/_members/composition/graphics-plan/solve.js +0 -145
  154. package/dist/_members/composition/index.js +0 -5
  155. package/dist/_members/composition/invariants/clipPlacement.js +0 -69
  156. package/dist/_members/composition/invariants/composition.js +0 -28
  157. package/dist/_members/composition/invariants/errors.js +0 -10
  158. package/dist/_members/composition/invariants/etag.js +0 -38
  159. package/dist/_members/composition/invariants/ids.js +0 -33
  160. package/dist/_members/composition/invariants/index.js +0 -9
  161. package/dist/_members/composition/invariants/keyframes.js +0 -45
  162. package/dist/_members/composition/invariants/markers.js +0 -29
  163. package/dist/_members/composition/invariants/time.js +0 -20
  164. package/dist/_members/composition/invariants/tracks.js +0 -304
  165. package/dist/_members/composition/ops/compositionOps.js +0 -1056
  166. package/dist/_members/composition/ops/headlessStore.js +0 -94
  167. package/dist/_members/composition/ops/index.js +0 -4
  168. package/dist/_members/composition/ops/selectors.js +0 -118
  169. package/dist/_members/composition/ops/timeline-word.js +0 -1
  170. package/dist/_members/composition/ops/transcript.js +0 -77
  171. package/dist/_members/composition/ops/types.js +0 -16
  172. package/dist/_members/composition/primitive-catalog/catalogQuery.js +0 -150
  173. package/dist/_members/composition/primitive-catalog/disabled.js +0 -32
  174. package/dist/_members/composition/primitive-catalog/generated/meta.js +0 -15161
  175. package/dist/_members/composition/primitive-catalog/index.js +0 -46
  176. package/dist/_members/composition/primitive-catalog/paramValidation.js +0 -231
  177. package/dist/_members/composition/primitive-catalog/projection.js +0 -164
  178. package/dist/_members/composition/primitive-catalog/types.js +0 -14
  179. package/dist/_members/composition/projection/behind-placement.js +0 -62
  180. package/dist/_members/composition/projection/brandKit.js +0 -482
  181. package/dist/_members/composition/projection/cardTokens.js +0 -209
  182. package/dist/_members/composition/projection/composition-floor.js +0 -582
  183. package/dist/_members/composition/projection/cropProjection.js +0 -257
  184. package/dist/_members/composition/projection/index.js +0 -7
  185. package/dist/_members/composition/projection/occlusion-budget.js +0 -104
  186. package/dist/_members/composition/projection/safe-zones.js +0 -99
  187. package/dist/_members/composition/reframe/aspectLoss.js +0 -115
  188. package/dist/_members/composition/reframe/coverage.js +0 -62
  189. package/dist/_members/composition/reframe/derive.js +0 -73
  190. package/dist/_members/composition/reframe/index.js +0 -109
  191. package/dist/_members/composition/reframe/kenBurns.js +0 -64
  192. package/dist/_members/composition/reframe/shotScale.js +0 -176
  193. package/dist/_members/composition/reframe/trajectory.js +0 -124
  194. package/dist/_members/composition/timeline/compound.js +0 -134
  195. package/dist/_members/composition/timeline/index.js +0 -9
  196. package/dist/_members/composition/timeline/intent.js +0 -228
  197. package/dist/_members/composition/timeline/keyframes.js +0 -121
  198. package/dist/_members/composition/timeline/link.js +0 -59
  199. package/dist/_members/composition/timeline/occupancy.js +0 -36
  200. package/dist/_members/composition/timeline/placement.js +0 -74
  201. package/dist/_members/composition/timeline/plan.js +0 -31
  202. package/dist/_members/composition/timeline/resolve.js +0 -170
  203. package/dist/_members/composition/timeline/trims.js +0 -278
  204. package/dist/_members/composition/types/index.js +0 -1
  205. package/dist/_members/composition/validators/brandKit.js +0 -295
  206. package/dist/_members/composition/validators/composePlan.js +0 -113
  207. package/dist/_members/composition/validators/composition.js +0 -703
  208. package/dist/_members/composition/validators/font.js +0 -34
  209. package/dist/_members/composition/validators/graphicKinds.js +0 -30
  210. package/dist/_members/composition/validators/index.js +0 -9
  211. package/dist/_members/composition/validators/project.js +0 -29
  212. package/dist/_members/composition/validators/registry.js +0 -41
  213. package/dist/_members/composition/validators/render.js +0 -139
  214. package/dist/_members/composition/validators/session.js +0 -37
  215. package/dist/_members/composition/validators/webhook.js +0 -72
  216. package/dist/_members/composition-ops/alphaLayers.js +0 -141
  217. package/dist/_members/composition-ops/index.js +0 -637
  218. package/dist/_members/composition-ops/materializeGrid.js +0 -99
  219. package/dist/_members/composition-ops/opRecorder.js +0 -196
  220. package/dist/_members/composition-ops/recordingStore.js +0 -14
  221. package/dist/_members/composition-ops/replaceRegion.js +0 -102
  222. package/dist/_members/composition-ops/testFixtures.js +0 -19
  223. package/dist/_members/core/index.js +0 -5
  224. package/dist/_members/core/render/bookends.js +0 -53
  225. package/dist/_members/core/render/captions.js +0 -127
  226. package/dist/_members/core/render/compositionRender.js +0 -1249
  227. package/dist/_members/core/render/deriveTrajectory.js +0 -889
  228. package/dist/_members/core/render/emphasis.js +0 -16
  229. package/dist/_members/core/render/eval/cropBox.js +0 -139
  230. package/dist/_members/core/render/eval/inclusion.js +0 -96
  231. package/dist/_members/core/render/eval/index.js +0 -146
  232. package/dist/_members/core/render/eval/metrics.js +0 -94
  233. package/dist/_members/core/render/exportSettings.js +0 -65
  234. package/dist/_members/core/render/index.js +0 -20
  235. package/dist/_members/core/render/mapFaceToPerson.js +0 -73
  236. package/dist/_members/core/render/types.js +0 -8
  237. package/dist/_members/core/render/vcam/cameraPath.js +0 -248
  238. package/dist/_members/core/render/vcam/constants.js +0 -115
  239. package/dist/_members/core/render/vcam/errorCodes.js +0 -39
  240. package/dist/_members/core/render/vcam/framing.js +0 -136
  241. package/dist/_members/core/render/vcam/requiredRegion.js +0 -137
  242. package/dist/_members/core/render/vcam/shots.js +0 -53
  243. package/dist/_members/core/render/vcam/subjectSet.js +0 -388
  244. package/dist/_members/core/select/errorCodes.js +0 -38
  245. package/dist/_members/core/select/index.js +0 -26
  246. package/dist/_members/core/select/model.js +0 -18
  247. package/dist/_members/core/select/select.js +0 -244
  248. package/dist/_members/core/select/stabilize.js +0 -242
  249. package/dist/_members/core/types.js +0 -7
  250. package/dist/_members/errors/index.js +0 -1
  251. package/dist/_members/errors/registry.js +0 -560
  252. package/dist/_members/foundation/codes/index.js +0 -31
  253. package/dist/_members/foundation/index.js +0 -2
  254. package/dist/_members/foundation/primitives/index.js +0 -5
  255. package/dist/_members/mcp/adapter.js +0 -771
  256. package/dist/_members/mcp/burnedNames.js +0 -73
  257. package/dist/_members/mcp/core.js +0 -390
  258. package/dist/_members/mcp/curation.js +0 -792
  259. package/dist/_members/mcp/executor.js +0 -142
  260. package/dist/_members/mcp/format.js +0 -9
  261. package/dist/_members/mcp/generated/catalogPreviews.js +0 -95
  262. package/dist/_members/mcp/generated/harness.js +0 -81
  263. package/dist/_members/mcp/generated/operations.js +0 -131
  264. package/dist/_members/mcp/index.js +0 -50
  265. package/dist/_members/mcp/internalLoopTools.js +0 -109
  266. package/dist/_members/mcp/prompts.js +0 -45
  267. package/dist/_members/mcp/resources.js +0 -166
  268. package/dist/_members/mcp/server.js +0 -340
  269. package/dist/_members/mcp/wait.js +0 -378
  270. package/dist/_members/mcp/x402Meta.js +0 -66
  271. package/dist/_members/media-model/api.js +0 -175
  272. package/dist/_members/media-model/index.js +0 -1
  273. package/dist/_members/media-model/media-kind.js +0 -116
  274. package/dist/_members/media-model/testing/index.js +0 -1
  275. package/dist/_members/media-model/testing/mediaStoreContract.js +0 -82
  276. package/dist/_members/media-model/transcriptSearch.js +0 -70
  277. package/dist/_members/media-model/transcriptSearchCases.json +0 -79
  278. package/dist/_members/nle-export/compact-timeline.js +0 -73
  279. package/dist/_members/nle-export/compact-timeline.js.map +0 -1
  280. package/dist/_members/nle-export/composition-to-input.js +0 -147
  281. package/dist/_members/nle-export/composition-to-input.js.map +0 -1
  282. package/dist/_members/nle-export/fcpxml.js +0 -159
  283. package/dist/_members/nle-export/fcpxml.js.map +0 -1
  284. package/dist/_members/nle-export/index.js +0 -12
  285. package/dist/_members/nle-export/index.js.map +0 -1
  286. package/dist/_members/nle-export/premiere.js +0 -161
  287. package/dist/_members/nle-export/premiere.js.map +0 -1
  288. package/dist/_members/nle-export/server/index.js +0 -2
  289. package/dist/_members/nle-export/server/index.js.map +0 -1
  290. package/dist/_members/nle-export/server/pack-zip.js +0 -38
  291. package/dist/_members/nle-export/server/pack-zip.js.map +0 -1
  292. package/dist/_members/nle-export/srt.js +0 -50
  293. package/dist/_members/nle-export/srt.js.map +0 -1
  294. package/dist/_members/nle-export/types.js +0 -9
  295. package/dist/_members/nle-export/types.js.map +0 -1
  296. package/dist/_members/nle-export/xml/index.js +0 -11
  297. package/dist/_members/nle-export/xml/index.js.map +0 -1
  298. package/dist/_members/nle-export/xml-utils.js +0 -48
  299. package/dist/_members/nle-export/xml-utils.js.map +0 -1
  300. package/dist/_members/perception/activeSpeaker.js +0 -103
  301. package/dist/_members/perception/audioQuality.js +0 -76
  302. package/dist/_members/perception/energyBeat.js +0 -99
  303. package/dist/_members/perception/identityMatch.js +0 -91
  304. package/dist/_members/perception/index.js +0 -48
  305. package/dist/_members/perception/visualQuality.js +0 -95
  306. package/dist/_members/plane/conformance.js +0 -90
  307. package/dist/_members/plane/contract.js +0 -49
  308. package/dist/_members/plane/index.js +0 -16
  309. package/dist/_members/primitives/backgrounds/index.js +0 -32
  310. package/dist/_members/primitives/backgrounds/index.js.map +0 -1
  311. package/dist/_members/primitives/captions/index.js +0 -398
  312. package/dist/_members/primitives/captions/index.js.map +0 -1
  313. package/dist/_members/primitives/chunk-2LVE4UIT.js +0 -139
  314. package/dist/_members/primitives/chunk-2LVE4UIT.js.map +0 -1
  315. package/dist/_members/primitives/chunk-3IQUH6KK.js +0 -20
  316. package/dist/_members/primitives/chunk-3IQUH6KK.js.map +0 -1
  317. package/dist/_members/primitives/chunk-3OMURV6Q.js +0 -112
  318. package/dist/_members/primitives/chunk-3OMURV6Q.js.map +0 -1
  319. package/dist/_members/primitives/chunk-4IS6TMEG.js +0 -21
  320. package/dist/_members/primitives/chunk-4IS6TMEG.js.map +0 -1
  321. package/dist/_members/primitives/chunk-5MWGAEGQ.js +0 -1644
  322. package/dist/_members/primitives/chunk-5MWGAEGQ.js.map +0 -1
  323. package/dist/_members/primitives/chunk-7RRPFPQK.js +0 -15
  324. package/dist/_members/primitives/chunk-7RRPFPQK.js.map +0 -1
  325. package/dist/_members/primitives/chunk-DH5TRZK2.js +0 -125
  326. package/dist/_members/primitives/chunk-DH5TRZK2.js.map +0 -1
  327. package/dist/_members/primitives/chunk-E3KNUSFG.js +0 -2337
  328. package/dist/_members/primitives/chunk-E3KNUSFG.js.map +0 -1
  329. package/dist/_members/primitives/chunk-G2B3G4HK.js +0 -47
  330. package/dist/_members/primitives/chunk-G2B3G4HK.js.map +0 -1
  331. package/dist/_members/primitives/chunk-HFPFGZXT.js +0 -1494
  332. package/dist/_members/primitives/chunk-HFPFGZXT.js.map +0 -1
  333. package/dist/_members/primitives/chunk-HIWVFZVH.js +0 -19
  334. package/dist/_members/primitives/chunk-HIWVFZVH.js.map +0 -1
  335. package/dist/_members/primitives/chunk-IDAL6G3Y.js.map +0 -1
  336. package/dist/_members/primitives/chunk-KNC6JP5F.js +0 -34
  337. package/dist/_members/primitives/chunk-KNC6JP5F.js.map +0 -1
  338. package/dist/_members/primitives/chunk-KYRDVZST.js +0 -459
  339. package/dist/_members/primitives/chunk-KYRDVZST.js.map +0 -1
  340. package/dist/_members/primitives/chunk-LWLHS2NS.js +0 -3410
  341. package/dist/_members/primitives/chunk-LWLHS2NS.js.map +0 -1
  342. package/dist/_members/primitives/chunk-QAQ3P7DR.js +0 -8855
  343. package/dist/_members/primitives/chunk-QAQ3P7DR.js.map +0 -1
  344. package/dist/_members/primitives/chunk-ROV2ODWC.js +0 -81
  345. package/dist/_members/primitives/chunk-ROV2ODWC.js.map +0 -1
  346. package/dist/_members/primitives/chunk-TCRC2FH3.js +0 -183
  347. package/dist/_members/primitives/chunk-TCRC2FH3.js.map +0 -1
  348. package/dist/_members/primitives/chunk-US4YEDAA.js +0 -96
  349. package/dist/_members/primitives/chunk-US4YEDAA.js.map +0 -1
  350. package/dist/_members/primitives/chunk-UVKRO5ER.js +0 -13
  351. package/dist/_members/primitives/chunk-UVKRO5ER.js.map +0 -1
  352. package/dist/_members/primitives/chunk-W4EIIF2I.js +0 -10
  353. package/dist/_members/primitives/chunk-W4EIIF2I.js.map +0 -1
  354. package/dist/_members/primitives/chunk-WPGKIPCO.js +0 -3563
  355. package/dist/_members/primitives/chunk-WPGKIPCO.js.map +0 -1
  356. package/dist/_members/primitives/chunk-WZFLEGMD.js +0 -1435
  357. package/dist/_members/primitives/chunk-WZFLEGMD.js.map +0 -1
  358. package/dist/_members/primitives/chunk-XHU3WBEI.js +0 -33
  359. package/dist/_members/primitives/chunk-XHU3WBEI.js.map +0 -1
  360. package/dist/_members/primitives/chunk-YN7WTZZ7.js +0 -46
  361. package/dist/_members/primitives/chunk-YN7WTZZ7.js.map +0 -1
  362. package/dist/_members/primitives/effects/index.js +0 -30
  363. package/dist/_members/primitives/effects/index.js.map +0 -1
  364. package/dist/_members/primitives/hero-text/index.js +0 -14
  365. package/dist/_members/primitives/hero-text/index.js.map +0 -1
  366. package/dist/_members/primitives/index.js +0 -64
  367. package/dist/_members/primitives/index.js.map +0 -1
  368. package/dist/_members/primitives/layouts/index.js +0 -24
  369. package/dist/_members/primitives/layouts/index.js.map +0 -1
  370. package/dist/_members/primitives/lib/easings.js +0 -26
  371. package/dist/_members/primitives/lib/easings.js.map +0 -1
  372. package/dist/_members/primitives/lib/index.js +0 -74
  373. package/dist/_members/primitives/lib/index.js.map +0 -1
  374. package/dist/_members/primitives/lib/palette.js +0 -72
  375. package/dist/_members/primitives/lib/palette.js.map +0 -1
  376. package/dist/_members/primitives/lib/preview.js +0 -8
  377. package/dist/_members/primitives/lib/preview.js.map +0 -1
  378. package/dist/_members/primitives/lib/schema.js +0 -12
  379. package/dist/_members/primitives/lib/schema.js.map +0 -1
  380. package/dist/_members/primitives/lib/seeded-random.js +0 -14
  381. package/dist/_members/primitives/lib/seeded-random.js.map +0 -1
  382. package/dist/_members/primitives/lib/text/contrast.js +0 -12
  383. package/dist/_members/primitives/lib/text/contrast.js.map +0 -1
  384. package/dist/_members/primitives/lib/text/fill.js +0 -8
  385. package/dist/_members/primitives/lib/text/fill.js.map +0 -1
  386. package/dist/_members/primitives/lib/text/fitText.js +0 -10
  387. package/dist/_members/primitives/lib/text/fitText.js.map +0 -1
  388. package/dist/_members/primitives/lib/text/marker.js +0 -8
  389. package/dist/_members/primitives/lib/text/marker.js.map +0 -1
  390. package/dist/_members/primitives/lib/text/motion.js +0 -16
  391. package/dist/_members/primitives/lib/text/motion.js.map +0 -1
  392. package/dist/_members/primitives/lib/text/recolor.js +0 -8
  393. package/dist/_members/primitives/lib/text/recolor.js.map +0 -1
  394. package/dist/_members/primitives/lib/text/spec.js +0 -1
  395. package/dist/_members/primitives/lib/text/spec.js.map +0 -1
  396. package/dist/_members/primitives/lib/text/stage.js +0 -8
  397. package/dist/_members/primitives/lib/text/stage.js.map +0 -1
  398. package/dist/_members/primitives/lib/text/typeface.js +0 -8
  399. package/dist/_members/primitives/lib/text/typeface.js.map +0 -1
  400. package/dist/_members/primitives/lib/tokens.js +0 -24
  401. package/dist/_members/primitives/lib/tokens.js.map +0 -1
  402. package/dist/_members/primitives/lib/types.js +0 -1
  403. package/dist/_members/primitives/lib/types.js.map +0 -1
  404. package/dist/_members/primitives/params-required.json +0 -153
  405. package/dist/_members/primitives/scenes/index.js +0 -25
  406. package/dist/_members/primitives/scenes/index.js.map +0 -1
  407. package/dist/_members/primitives/subject-foreground/index.js +0 -30
  408. package/dist/_members/primitives/subject-foreground/index.js.map +0 -1
  409. package/dist/_members/primitives/text/index.js +0 -57
  410. package/dist/_members/primitives/text/index.js.map +0 -1
  411. package/dist/_members/primitives/transitions/index.js +0 -67
  412. package/dist/_members/primitives/transitions/index.js.map +0 -1
  413. package/dist/_members/primitives/ui-blocks/index.js +0 -76
  414. package/dist/_members/primitives/ui-blocks/index.js.map +0 -1
  415. package/dist/_members/primitives/version-map.json +0 -105
  416. package/dist/_members/primitives/workspace.js +0 -60
  417. package/dist/_members/primitives/workspace.js.map +0 -1
  418. package/dist/chunk-7GISRVON.js +0 -14176
  419. package/dist/chunk-DIBOJJMU.js +0 -16838
  420. package/dist/chunk-EAUSEGB7.js +0 -420
  421. package/dist/chunk-FUWJOVVK.js +0 -3633
  422. package/dist/chunk-G75E7YA4.js +0 -11883
  423. package/dist/chunk-JCZQT7K3.js +0 -3266
  424. package/dist/chunk-KF5ETMKB.js +0 -544
  425. package/dist/chunk-NDKERSXY.js +0 -1296
  426. package/dist/chunk-V43Y7IE4.js +0 -3621
  427. package/dist/chunk-VIVQHIGZ.js +0 -4319
  428. package/dist/chunk-YA3OR2KK.js +0 -249
  429. package/dist/hls-HD4C5G6W.js +0 -33000
  430. package/dist/token-RGFIT24D.js +0 -69
  431. package/dist/token-util-GPLSGYVO.js +0 -5
  432. package/dist/vision_bundle-5Y376MAR.js +0 -4084
@@ -11,7 +11,7 @@
11
11
  * remotion / animate as endowments — and (b) assign `exports.default = <Component>`.
12
12
  *
13
13
  * This is the Node/native-esbuild sibling of the desktop `transpileJsx`
14
- * (cueframe/src/llm/transpile.ts, esbuild-wasm) and the director's
14
+ * (apps/studio/src/llm/transpile.ts, esbuild-wasm) and the director's
15
15
  * `serverTranspiler` (activities/director.ts). All three share ONE transpile
16
16
  * config — the SSOT `ESBUILD_JSX_OPTIONS` + `postProcessForSandbox` in
17
17
  * ./transpileHelper — so a live component transpiled here is byte-identical to
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Singleton Uppy service for imports (local + cloud).
3
+ *
4
+ * Uses @uppy/aws-s3 for multipart uploads directly to R2 via the
5
+ * upload-signing CF Worker. Replaces the old TUS-based upload path.
6
+ *
7
+ * Owns the Uppy instance lifecycle (headless — no Dashboard plugin).
8
+ * React integration is handled by ImportProvider (single mount at app root).
9
+ * MediaItem pre-creation is handled by MediaItemPreprocessor (Uppy plugin).
10
+ */
11
+ import Uppy from '@uppy/core';
12
+ import { MediaItemPreprocessor } from './MediaItemPreprocessor.js';
13
+ interface CloudImportConfig {
14
+ uploadSigningUrl: string;
15
+ }
16
+ export interface CloudUploadResult {
17
+ uploadURL: string;
18
+ fileName: string;
19
+ fileSize: number;
20
+ }
21
+ declare class CloudImportService {
22
+ private uppy;
23
+ private config;
24
+ /** Lazy-init: create Uppy + plugins on first use. */
25
+ init(config: CloudImportConfig): Uppy;
26
+ /** Get the Uppy instance (must call init() first). */
27
+ getUppy(): Uppy;
28
+ /** Get the MediaItemPreprocessor plugin. */
29
+ getPreprocessor(): MediaItemPreprocessor;
30
+ /** Update upload metadata (uploadToken, userId, projectId). */
31
+ setMeta(meta: Record<string, string>): void;
32
+ }
33
+ /** Module-level singleton. */
34
+ export declare const cloudImportService: CloudImportService;
35
+ export {};
@@ -0,0 +1,73 @@
1
+ /**
2
+ * ImportProvider — single mount at app root.
3
+ *
4
+ * Initializes the CloudImportService, wires auth callbacks, and provides
5
+ * the useImport() hook to child components. Wraps children in Uppy's
6
+ * UppyContextProvider so headless hooks (useDropzone, useUppyState, etc.)
7
+ * work anywhere in the tree.
8
+ *
9
+ * The import dialog UI is injected via `dialogSlot` to avoid circular
10
+ * dependency between @cueframe/cloud-import and @cueframe/pro.
11
+ */
12
+ import { type ReactNode } from 'react';
13
+ import type Uppy from '@uppy/core';
14
+ import type { CloudUploadResult } from './CloudImportService.js';
15
+ interface ImportContextValue {
16
+ openModal: () => void;
17
+ closeModal: () => void;
18
+ isOpen: boolean;
19
+ uppy: Uppy;
20
+ /**
21
+ * Can this lane actually take an upload right now?
22
+ *
23
+ * A cloud import needs an identity: `getUploadMeta` mints an org-scoped
24
+ * upload token, so with none the modal opens onto a request that can only
25
+ * fail. This is DATA because the provider is now a fixture of the tree — it
26
+ * mounts for the life of the desktop process, signed in or not, so its
27
+ * PRESENCE stopped being the answer to this question (it was, back when the
28
+ * whole cloud stack mounted only inside a confirmed auth handshake).
29
+ */
30
+ available: boolean;
31
+ }
32
+ export interface ImportProviderProps {
33
+ children: ReactNode;
34
+ /** Whether this lane can take an upload — see `ImportContextValue.available`.
35
+ * Required, with no default: the one thing a caller must not forget is the
36
+ * fact that decides whether a control is offered at all. */
37
+ available: boolean;
38
+ /** React element to render the import dialog (e.g. <ImportDialog />) */
39
+ dialogSlot?: ReactNode;
40
+ uploadSigningUrl: string;
41
+ /** Called before opening the modal — returns upload metadata (token, userId, etc). */
42
+ getUploadMeta?: () => Promise<Record<string, string>>;
43
+ /** Pre-create a mediaItem — called by the preprocessor plugin before upload starts. */
44
+ createMediaItem?: (file: {
45
+ name: string;
46
+ size: number;
47
+ mimeType: string;
48
+ }) => Promise<string>;
49
+ onUploadComplete?: (results: CloudUploadResult[]) => void;
50
+ onError?: (error: Error) => void;
51
+ }
52
+ export declare function ImportProvider({ children, available, dialogSlot, uploadSigningUrl, getUploadMeta, createMediaItem, onUploadComplete, onError, }: ImportProviderProps): import("react").JSX.Element;
53
+ /** Hook to access the import modal and Uppy instance. Must be used inside <ImportProvider>. */
54
+ export declare function useImport(): ImportContextValue;
55
+ /**
56
+ * The context WHEN THE LANE CAN BE USED, and `null` otherwise — for surfaces
57
+ * that offer the cloud modal only where it works and fall back where it does
58
+ * not (the pro ImportButton, which drops to the local file picker).
59
+ *
60
+ * It used to answer presence alone, and presence used to be the same fact:
61
+ * the provider mounted only inside a confirmed auth handshake. It mounts for
62
+ * the life of the desktop process now (Task 11 — a provider that appears and
63
+ * disappears re-parents the app), so presence would offer a cloud modal to a
64
+ * signed-out user whose upload-token request can only fail: a control that
65
+ * looks alive and silently does nothing.
66
+ *
67
+ * Still ONE fact, read from the tree rather than mirrored: the alternative —
68
+ * a caller re-deriving `isDesktop && cloudEnabled && signedIn` — is the drift
69
+ * class that crashed the desktop ("useImport must be used within
70
+ * <ImportProvider>") whenever the two copies disagreed.
71
+ */
72
+ export declare function useImportIfAvailable(): ImportContextValue | null;
73
+ export {};
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Uppy preprocessor plugin that pre-creates a mediaItem in the backend
3
+ * before the upload starts. This guarantees convexMediaItemId is in the
4
+ * upload metadata before the first byte goes out — no race condition.
5
+ *
6
+ * The actual creation function is injected via setCreateFn() so the plugin
7
+ * stays decoupled from Convex/auth concerns.
8
+ */
9
+ import { BasePlugin } from '@uppy/core';
10
+ import type { Uppy, Meta } from '@uppy/core';
11
+ type CreateMediaItemFn = (file: {
12
+ name: string;
13
+ size: number;
14
+ mimeType: string;
15
+ }) => Promise<string>;
16
+ export declare class MediaItemPreprocessor extends BasePlugin<Record<string, never>, Meta, Record<string, never>> {
17
+ static pluginId: string;
18
+ private createFn;
19
+ private preprocessBound;
20
+ constructor(uppy: Uppy, opts?: Record<string, never>);
21
+ /** Inject the creation function (called from ImportProvider). */
22
+ setCreateFn(fn: CreateMediaItemFn | null): void;
23
+ install(): void;
24
+ uninstall(): void;
25
+ private preprocess;
26
+ }
27
+ export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Single source of truth for cloud endpoint resolution.
3
+ *
4
+ * One input (convexUrl) → deterministic output (all cloud endpoints).
5
+ * No fallback chains, no env var reading, no defaults.
6
+ */
7
+ export type CloudEnvironment = 'dev' | 'staging' | 'production';
8
+ export interface CloudEndpoints {
9
+ convexUrl: string;
10
+ uploadSigningUrl: string;
11
+ }
12
+ export declare const ENVIRONMENTS: Record<CloudEnvironment, CloudEndpoints>;
13
+ /** Detect environment from a Convex deployment URL.
14
+ *
15
+ * Convex exposes two domains per deployment: queries (`data*`) and HTTP
16
+ * actions (`api*`). Callers pass either form depending on which client
17
+ * they own, so detection has to recognize both:
18
+ * prod → api.cueframe.ai | data.cueframe.ai
19
+ * staging → api-dev.cueframe.ai | data-dev.cueframe.ai
20
+ */
21
+ export declare function detectEnvironment(convexUrl?: string): CloudEnvironment;
22
+ /** Resolve all cloud endpoints from a Convex URL. */
23
+ export declare function getEndpoints(convexUrl: string): CloudEndpoints;
@@ -0,0 +1,9 @@
1
+ export { ImportProvider, useImport, useImportIfAvailable } from './ImportProvider.js';
2
+ export type { ImportProviderProps } from './ImportProvider.js';
3
+ export { cloudImportService } from './CloudImportService.js';
4
+ export type { CloudUploadResult } from './CloudImportService.js';
5
+ export { ENVIRONMENTS, detectEnvironment, getEndpoints } from './cloudConfig.js';
6
+ export type { CloudEnvironment, CloudEndpoints } from './cloudConfig.js';
7
+ export { multipartUpload } from './multipartUpload.js';
8
+ export type { MultipartUploadOptions, MultipartUploadResult } from './multipartUpload.js';
9
+ export { useDropzone, useUppyState, useUppyEvent, } from '@uppy/react';
@@ -0,0 +1,12 @@
1
+ export interface MultipartUploadOptions {
2
+ file: File;
3
+ signingUrl: string;
4
+ token: string;
5
+ metadata?: Record<string, string>;
6
+ onProgress?: (fraction: number) => void;
7
+ }
8
+ export interface MultipartUploadResult {
9
+ location: string;
10
+ mediaItemId: string;
11
+ }
12
+ export declare function multipartUpload(opts: MultipartUploadOptions): Promise<MultipartUploadResult>;
@@ -4,7 +4,7 @@
4
4
  * All operations are side-effect-free: no persistence, no logging. Only
5
5
  * state mutations via set/get on the wire-shape Composition.
6
6
  *
7
- * Mirrors the desktop store's v2 ops (cueframe/src/store/compositionStore/
7
+ * Mirrors the desktop store's v2 ops (apps/studio/src/store/compositionStore/
8
8
  * compositionOps.ts). The OSS module drops desktop-only concerns
9
9
  * (corrections, transcriptDoc) — those live on the desktop envelope.
10
10
  */
@@ -89,6 +89,7 @@ export declare function createCompositionOps(get: OpsGet, set: OpsSet): {
89
89
  setCropIntents: (clipId: string, segments: ReframeSegment[] | null) => void;
90
90
  setEffects: (clipId: string, effects: PerClipEffect[]) => void;
91
91
  setCaptionStyle: (style: CaptionStyle) => void;
92
+ setCaptionDepth: (zPlane: "front" | "behind-subject") => void;
92
93
  setCaptions: (segments: CaptionSegment[], style?: CaptionStyle, derivedFrom?: {
93
94
  clipId: string;
94
95
  }) => void;
@@ -2,7 +2,7 @@
2
2
  * Composition types — v2 wire-shape.
3
3
  *
4
4
  * The OSS shared composition module mirrors the desktop store's v2
5
- * shape (cueframe/src/store/compositionStore/types.ts) minus desktop-only
5
+ * shape (apps/studio/src/store/compositionStore/types.ts) minus desktop-only
6
6
  * envelope concerns (corrections, transcriptDoc, isLoaded).
7
7
  *
8
8
  * Used by:
@@ -0,0 +1,127 @@
1
+ /**
2
+ * CAN THIS OVERLAY ACTUALLY GO BEHIND THE SUBJECT — answered in the editor,
3
+ * before a render is paid for.
4
+ *
5
+ * The render already decides this, in the director's `resolveBehindPlacement`:
6
+ * a behind-subject overlay whose clip has no matte, no geometry sidecar, or too
7
+ * little subject presence is DEGRADED — `zPlane` flipped back to `front` and the
8
+ * authored `anchor` deleted — and the reason is recorded in a `degraded[]` array
9
+ * that both of its callers discard. So the user flips the toggle, pays for a
10
+ * render, and finds out from the output.
11
+ *
12
+ * This module answers the same question from data the editor already has on the
13
+ * media row, so the toggle can tell the truth at the moment it is flipped.
14
+ *
15
+ * ── IT IS ONLY WORTH ANYTHING IF IT AGREES WITH THE SERVER ──────────────────
16
+ * Every rule below mirrors a specific server rule, named at its call site. Two
17
+ * helpers are currently duplicated from the private `@cueframe/shared/
18
+ * variant-keys` (`hashMatteIntent`, `clipOverlapsBehindWindow`); they live here
19
+ * because this package is the shared one, and the private copies become
20
+ * re-exports of these when the fact-record work lands. Until then the agreement
21
+ * is held by `__tests__/behind-readiness.test.ts`, whose key fixture is a hash
22
+ * taken from PRODUCTION rather than invented.
23
+ *
24
+ * ── WHAT IT CANNOT ANSWER ───────────────────────────────────────────────────
25
+ * The server has a FOURTH degrade path — the occlusion budget — which needs the
26
+ * `.geometry.json` sidecar from R2, and the client has no presigned URL for it.
27
+ * So `subject-present` means "the preconditions hold", NOT "this is guaranteed
28
+ * to render behind", and UI copy must not promise more.
29
+ */
30
+ /** A matte intent: the clip's SOURCE window plus what is being cut out.
31
+ * Mirrors `MatteIntentLike` in the private variant-keys. */
32
+ export interface MatteIntentLike {
33
+ startSec: number;
34
+ endSec: number;
35
+ subjectClass: "person" | "product";
36
+ }
37
+ /** The fields this module reads off a `mediaItems.mattes[hash]` entry — the
38
+ * same two `resolveBehindPlacement` reads out of its `matteGeometry` map. */
39
+ export interface MatteEntryLike {
40
+ geometryR2Key?: string;
41
+ presenceFraction?: number;
42
+ }
43
+ /** The clip an overlay will be placed against, and the source window whose
44
+ * matte answers for it. */
45
+ export interface BehindTarget {
46
+ mediaId: string;
47
+ window: {
48
+ startSec: number;
49
+ endSec: number;
50
+ };
51
+ }
52
+ /**
53
+ * Why a behind-subject overlay will or will not survive the render. The three
54
+ * failing states correspond 1:1 to the server's degrade reasons: `no-clip` and
55
+ * `no-subject` both degrade as `"no-subject"` there, `no-matte` as
56
+ * `"no-geometry"`.
57
+ */
58
+ export type BehindReadiness = {
59
+ state: "no-clip";
60
+ } | {
61
+ state: "no-matte";
62
+ target: BehindTarget;
63
+ } | {
64
+ state: "no-subject";
65
+ target: BehindTarget;
66
+ presenceFraction: number;
67
+ } | {
68
+ state: "subject-present";
69
+ target: BehindTarget;
70
+ };
71
+ /**
72
+ * Content-address a matte intent, byte-identically to the server's
73
+ * `hashMatteIntent`. Milliseconds-rounded so float jitter cannot miss a cached
74
+ * matte; 12 hex chars. Async because `crypto.subtle` is — available in the
75
+ * webview and in Node alike.
76
+ *
77
+ * The bake VERSION is deliberately not hashed (it segments the R2 key instead),
78
+ * so this key is stable across model bumps.
79
+ */
80
+ export declare function matteIntentKey(intent: MatteIntentLike): Promise<string>;
81
+ /**
82
+ * The clip a behind-subject overlay anchors against: **the first media clip on
83
+ * a VIDEO track, in track→content order, whose timeline range overlaps the
84
+ * overlay**. This is `resolveBehindPlacement`'s rule, and it is deliberately
85
+ * NOT `computeMatteWindowsByMediaId`'s — that one also scans audio and image
86
+ * tracks, because it answers a different question (which mattes to bake).
87
+ * Mirroring the wrong one of the two would put the editor and the render into
88
+ * exactly the disagreement this module exists to remove.
89
+ *
90
+ * The returned `window` is the clip's SOURCE trim, defaulted the way
91
+ * `renders.ts` defaults it: `trim.start ?? 0`, `trim.end ?? start + duration`.
92
+ * That is the window the matte is keyed by.
93
+ *
94
+ * Returns null when the overlay is unknown, or floats over no video clip —
95
+ * which the server degrades as `"no-subject"`.
96
+ */
97
+ export declare function primaryClipForOverlay(composition: unknown, overlayId: string): BehindTarget | null;
98
+ export interface BehindReadinessInput {
99
+ /** The wire-shape composition currently open in the editor. */
100
+ composition: unknown;
101
+ /** The overlay being inspected. It need NOT already be behind-subject — the
102
+ * editor asks this to decide what to show BEFORE the toggle is flipped. */
103
+ overlayId: string;
104
+ /** `mediaItems.mattes`, per media id, exactly as it arrives from Convex. */
105
+ mattesByMediaId: Record<string, Record<string, MatteEntryLike> | undefined>;
106
+ }
107
+ /**
108
+ * Will this overlay actually render behind the subject? Mirrors the first three
109
+ * of `resolveBehindPlacement`'s four gates, in the same order:
110
+ *
111
+ * 1. no primary clip → server: degrade("no-subject")
112
+ * 2. no matte / no geometry sidecar → server: degrade("no-geometry")
113
+ * 3. presence below the floor → server: degrade("no-subject")
114
+ *
115
+ * The fourth (occlusion budget) is not knowable client-side — see the header.
116
+ */
117
+ export declare function behindReadinessForOverlay(input: BehindReadinessInput): Promise<BehindReadiness>;
118
+ /**
119
+ * The same verdict from an ALREADY-RESOLVED target — the half that actually
120
+ * costs something (a SHA-256) split from the half that is a pure walk.
121
+ *
122
+ * The editor calls this one. `primaryClipForOverlay` is sync, so a component
123
+ * can memoize the target on the composition and then depend only on the
124
+ * window's two numbers plus the media's matte record — instead of re-hashing on
125
+ * every keystroke that produces a new composition reference.
126
+ */
127
+ export declare function behindReadinessForTarget(target: BehindTarget | null, mattes: Record<string, MatteEntryLike> | undefined): Promise<BehindReadiness>;
@@ -3,5 +3,7 @@ export * from "./cardTokens.js";
3
3
  export * from "./composition-floor.js";
4
4
  export * from "./safe-zones.js";
5
5
  export * from "./behind-placement.js";
6
+ export * from "./behind-readiness.js";
7
+ export * from "./reframe-readiness.js";
6
8
  export * from "./occlusion-budget.js";
7
9
  export * from "./cropProjection.js";
@@ -0,0 +1,156 @@
1
+ /**
2
+ * WHICH CLIPS WANT A CROP, AND DO WE HAVE WHAT IT TAKES — answered in the
3
+ * editor, from data the media row already carries.
4
+ *
5
+ * The sibling of `behind-readiness.ts`, one rung down the fidelity ladder. That
6
+ * module asks whether a SILHOUETTE exists so an overlay can go behind a person;
7
+ * this one asks whether a BOX TRACK exists so a clip can follow one. Same shape,
8
+ * same discipline, ~40× apart in what the answer costs.
9
+ *
10
+ * ── WHY IT EXISTS ───────────────────────────────────────────────────────────
11
+ * A follow-the-speaker reframe is authored in the editor and only takes effect
12
+ * at render, because the crop trajectory is derived from a SUBJECT TRACK the
13
+ * editor never asked for. So the editor showed an uncropped source while the
14
+ * render produced a moving crop — the "editor shows something the render will
15
+ * not honour" defect, in its second location. Deriving the trajectory locally
16
+ * fixes that, and the derive needs to find the right track first. That lookup
17
+ * is what this module is.
18
+ *
19
+ * ── IT IS ONLY WORTH ANYTHING IF IT AGREES WITH THE SERVER ──────────────────
20
+ * `reframeTargets` mirrors `collectTrajectoryDeriveJobs` (private
21
+ * `renders.ts`) — the walk the SHIP render uses to decide which clips derive a
22
+ * trajectory and at which window. `sourceWindowKey` mirrors `hashSourceWindow`
23
+ * (private `@cueframe/shared/variant-keys`) byte for byte; the golden fixtures
24
+ * in `__tests__/reframe-readiness.test.ts` are hashes taken from PRODUCTION
25
+ * rather than invented, for the same reason `behind-readiness`'s are.
26
+ *
27
+ * ── WHAT IT DELIBERATELY DOES NOT CHECK ─────────────────────────────────────
28
+ * The DETECTOR VERSION. The server skips a track whose `detectorVersion` is not
29
+ * the current `DETECTOR_VERSION`, and the app cannot ask that without a third,
30
+ * unguarded mirror of a string whose TS↔Python sync is already CI-guarded on
31
+ * both existing copies. So the editor derives off whatever track sits at the
32
+ * window. A version bump means the render re-detects and the framing shifts
33
+ * slightly — same subject, same authored intent, and far closer to the truth
34
+ * than showing an uncropped source. A decision, not an omission.
35
+ */
36
+ /** A source window. Subject tracks key on this — the window, plus the producer
37
+ * when it is not the default face detector. Mirrors `SourceWindowLike`. */
38
+ export interface SourceWindowLike {
39
+ startSec: number;
40
+ endSec: number;
41
+ /**
42
+ * Which producer detected the track: 'face' (YuNet/SCRFD, the default) or
43
+ * 'person' (YOLO11x + BoT-SORT). Folded into the hash ONLY when it is not
44
+ * 'face', so existing face-track keys never churn and a person track for the
45
+ * same window gets a DISTINCT key instead of overwriting the face one.
46
+ */
47
+ detector?: "face" | "person";
48
+ }
49
+ /** The fields this module reads off a `mediaItems.subjectTracks[hash]` entry. */
50
+ export interface SubjectTrackEntryLike {
51
+ /** R2 object key — the STABLE identity every server-side reader matches on. */
52
+ trackR2Key?: string;
53
+ /**
54
+ * Presigned URL for that key, added ALONGSIDE it by `resolveR2Urls`. The row
55
+ * carries only a SUMMARY of the track (the face roster, a count); the
56
+ * per-frame boxes `deriveTrajectory` needs are the R2 object, so this is the
57
+ * one field that makes a client-side derive possible at all.
58
+ */
59
+ trackUrl?: string;
60
+ detectorVersion?: string;
61
+ window?: {
62
+ startSec: number;
63
+ endSec: number;
64
+ };
65
+ /** The inline face roster — who is in this window, for a per-person picker. */
66
+ faces?: Array<{
67
+ faceId: string;
68
+ bbox: {
69
+ x: number;
70
+ y: number;
71
+ width: number;
72
+ height: number;
73
+ };
74
+ speakingShare?: number;
75
+ }>;
76
+ }
77
+ /**
78
+ * Content-address a source window, byte-identically to the server's
79
+ * `hashSourceWindow`. Milliseconds-rounded so float jitter cannot miss a cached
80
+ * track; 12 hex chars. Async because `crypto.subtle` is — available in the
81
+ * webview and in Node alike.
82
+ *
83
+ * The detector is omitted from the canonical form when it is 'face', which is
84
+ * NOT a shortcut: it is what keeps every already-cached face-track key valid.
85
+ */
86
+ export declare function sourceWindowKey(window: SourceWindowLike): Promise<string>;
87
+ /** A clip that has authored a reframe, and the window whose track answers for
88
+ * it. `segments` travels along because `deriveTrajectory` takes it verbatim. */
89
+ export interface ReframeTarget {
90
+ clipId: string;
91
+ mediaId: string;
92
+ window: {
93
+ startSec: number;
94
+ endSec: number;
95
+ };
96
+ /** The authored `source.reframe.segments`, untouched — the derive owns their
97
+ * shape, and re-typing it here would be a fourth place to keep in sync. */
98
+ segments: unknown[];
99
+ }
100
+ /**
101
+ * Does this reframe track a real subject? A geometric one (a screen-recording
102
+ * point-zoom, an honest center crop) needs nothing detected and must NEVER be
103
+ * handed a detection bill — nor be told it is waiting for one.
104
+ */
105
+ export declare function reframeNeedsDetection(segments: unknown[]): boolean;
106
+ /**
107
+ * Every clip in the composition that has authored a reframe, with the source
108
+ * window its track is keyed by.
109
+ *
110
+ * MIRRORS `collectTrajectoryDeriveJobs`, including the two rules that are easy
111
+ * to get subtly wrong:
112
+ * · only VIDEO and IMAGE tracks (an audio clip is `kind:"media"` too, and a
113
+ * viewport crop is meaningless for sound)
114
+ * · the window is the SOURCE TRIM, defaulted exactly as `renders.ts` defaults
115
+ * it — `trim.start ?? 0`, `trim.end ?? start + clip.duration`
116
+ *
117
+ * Walked defensively with no zod, the `collectBehindWindows` convention, so it
118
+ * is safe in every bundle.
119
+ */
120
+ export declare function reframeTargets(composition: unknown): ReframeTarget[];
121
+ /**
122
+ * What the editor can say about one reframed clip.
123
+ *
124
+ * `geometric` is a distinct state and not a convenience: a point-zoom on a
125
+ * screen recording is fully derivable with no detection, so calling it
126
+ * "waiting for a track" would be a lie that also implies a charge.
127
+ */
128
+ export type ReframeReadiness =
129
+ /** No detection needed — derives off a faceless stub, today, for free. */
130
+ {
131
+ state: "geometric";
132
+ }
133
+ /** The track exists and can be fetched. */
134
+ | {
135
+ state: "track-ready";
136
+ entry: SubjectTrackEntryLike;
137
+ trackUrl: string;
138
+ }
139
+ /** A track is registered but carries no presigned URL, so the client cannot
140
+ * derive. The RENDER still can — it reads the key directly. */
141
+ | {
142
+ state: "track-unfetchable";
143
+ entry: SubjectTrackEntryLike;
144
+ }
145
+ /** Nothing detected at this window yet. This is the state that buys one. */
146
+ | {
147
+ state: "no-track";
148
+ };
149
+ /**
150
+ * Can the editor derive this clip's crop trajectory right now?
151
+ *
152
+ * `subjectTracks` is `mediaItems.subjectTracks` for the target's media, exactly
153
+ * as it arrives from Convex — undefined for an item with no cloud perception,
154
+ * which is the honest shape for a local-only import.
155
+ */
156
+ export declare function reframeReadinessForTarget(target: ReframeTarget, subjectTracks: Record<string, SubjectTrackEntryLike> | undefined): Promise<ReframeReadiness>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * WHERE A SOURCE GOES.
3
3
  *
4
- * Hoisted from `cueframe/src/components/Timeline/fabric/placement.ts` (2026-08-23)
4
+ * Hoisted from `apps/studio/src/components/Timeline/fabric/placement.ts` (2026-08-23)
5
5
  * for the reason the module's own header predicted and the repo rule requires:
6
6
  * the cloud director writes compositions too, so a placement rule that lives in
7
7
  * the desktop is a rule the cloud does not have. This is now the single home.