@cueframe/kernel 0.2.51 → 0.2.53

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 (74) hide show
  1. package/dist/_members/composition/fonts/bundledFaces.d.ts +9 -15
  2. package/dist/_members/composition/fonts/captionFaces.d.ts +2 -3
  3. package/dist/_members/composition/ops/captionOps.d.ts +11 -0
  4. package/dist/_members/composition/ops/compositionOps.d.ts +20 -19
  5. package/dist/_members/composition/validators/composition.d.ts +664 -0
  6. package/dist/_members/composition/validators/registry.d.ts +1 -1
  7. package/dist/_members/composition/validators/render.d.ts +294 -0
  8. package/dist/_members/composition-ops/index.d.ts +86 -0
  9. package/dist/_members/core/render/compositionAudioAndDepth.d.ts +9 -3
  10. package/dist/_members/core/render/compositionRender.d.ts +14 -0
  11. package/dist/_members/core/render/index.d.ts +2 -2
  12. package/dist/_members/core/render/types.d.ts +4 -1
  13. package/dist/_members/plane/contract.d.ts +1 -1
  14. package/dist/_members/primitives/captions/Captions.d.ts +18 -1
  15. package/dist/_members/primitives/captions/index.d.ts +1 -1
  16. package/dist/animate.js +2 -2
  17. package/dist/authoring/build-tools.js +6 -6
  18. package/dist/authoring/context.js +5 -5
  19. package/dist/authoring/tools.js +5 -5
  20. package/dist/authoring.js +9 -9
  21. package/dist/{chunk-MYBK6DKF.js → chunk-2BVKNYRB.js} +1 -1
  22. package/dist/{chunk-2LUAUF46.js → chunk-46DGDPXR.js} +303 -47
  23. package/dist/{chunk-KY3QBG7O.js → chunk-4DM63RTI.js} +4 -4
  24. package/dist/{chunk-IHWC75AN.js → chunk-5E4YP44R.js} +1 -1
  25. package/dist/{chunk-MOUWO53S.js → chunk-7AUHC2X7.js} +1 -1
  26. package/dist/{chunk-AVTEPAWI.js → chunk-7RGDRDAR.js} +17 -13
  27. package/dist/{chunk-7XZW26U2.js → chunk-AONWKKXK.js} +1 -1
  28. package/dist/{chunk-O3SJTX6S.js → chunk-C6ONUJIO.js} +5 -5
  29. package/dist/{chunk-LO3DH776.js → chunk-CJMUTCJW.js} +2 -2
  30. package/dist/{chunk-CZOVEX2D.js → chunk-CR3G2JQP.js} +1 -1
  31. package/dist/{chunk-2PU2TSUG.js → chunk-D5E5XFHK.js} +1 -1
  32. package/dist/{chunk-6WQHVYJD.js → chunk-G7ZSFSQG.js} +1 -1
  33. package/dist/{chunk-7SXY6NFW.js → chunk-GAACUQAB.js} +4 -4
  34. package/dist/{chunk-4CNJGY7P.js → chunk-LPUQTBKU.js} +147 -27
  35. package/dist/{chunk-YKXOAGY3.js → chunk-P3DYA5NA.js} +8 -8
  36. package/dist/{chunk-Z6NY6MCL.js → chunk-RMLGMYEJ.js} +1 -1
  37. package/dist/{chunk-NLXQ7WTH.js → chunk-TPKPU4PE.js} +56 -38
  38. package/dist/{chunk-LZEX2GAY.js → chunk-UFNIB3JL.js} +144 -5
  39. package/dist/{chunk-ACURZCPN.js → chunk-UKKY7HWN.js} +1 -1
  40. package/dist/{chunk-M665ZQYB.js → chunk-VTM7NEJC.js} +38 -6
  41. package/dist/{chunk-FSA3UBVR.js → chunk-ZFW35DLG.js} +1 -1
  42. package/dist/{chunk-OVV35ZS2.js → chunk-ZIPGDGBR.js} +1 -1
  43. package/dist/component-runtime/render.js +2 -2
  44. package/dist/component-runtime.js +3 -3
  45. package/dist/compose.js +23 -23
  46. package/dist/composition/fonts.js +1 -1
  47. package/dist/composition/graphics-plan.js +3 -3
  48. package/dist/composition/ops.js +4 -4
  49. package/dist/composition/projection.js +3 -3
  50. package/dist/composition/validators.js +17 -3
  51. package/dist/composition-ops.js +8 -8
  52. package/dist/composition.js +19 -5
  53. package/dist/{context-AIUJG7R4.js → context-UAS5WJRB.js} +5 -5
  54. package/dist/core/render.js +6 -4
  55. package/dist/core.js +4 -4
  56. package/dist/mcp/adapter.js +2 -2
  57. package/dist/mcp/core.js +1 -1
  58. package/dist/mcp/scene-shot.js +2 -2
  59. package/dist/mcp/server.js +12 -12
  60. package/dist/mcp.js +12 -12
  61. package/dist/primitives/captions.js +195 -32
  62. package/dist/primitives/effects.js +4 -4
  63. package/dist/primitives/hero-text.js +2 -2
  64. package/dist/primitives/layouts.js +3 -3
  65. package/dist/primitives/scenes.js +4 -4
  66. package/dist/primitives/text.js +2 -2
  67. package/dist/primitives/ui-blocks.js +4 -4
  68. package/dist/primitives.js +23 -23
  69. package/dist/render-harness/cardFonts.js +2 -2
  70. package/dist/render-harness.js +12 -12
  71. package/package.json +12 -12
  72. package/dist/{chunk-RL5SO653.js → chunk-7SQOXIWR.js} +3 -3
  73. package/dist/{chunk-B3GSTQLR.js → chunk-VLJOIUHL.js} +6 -6
  74. package/dist/{chunk-RBWS5XHE.js → chunk-X34KW2SL.js} +4 -4
@@ -23,7 +23,9 @@ export interface BundledFontFace {
23
23
  */
24
24
  readonly weight: string;
25
25
  /** The `-<file>.woff2` suffix that carries it, i.e. `public/fonts/<slug>-<file>.woff2`. */
26
- readonly file: "400" | "700";
26
+ readonly file: "400" | "700" | "400-italic";
27
+ /** Omitted for existing upright files; italic must name a real italic binary. */
28
+ readonly style?: "normal" | "italic";
27
29
  }
28
30
  /**
29
31
  * The weights a caption run is drawn at when the style names none.
@@ -56,8 +58,7 @@ export interface BundledFontFamilyFaces {
56
58
  * What bytes actually ship with the render bundle, per family.
57
59
  *
58
60
  * This is the single source for the two facts every font gate needs before it may claim a face is
59
- * reproducible: which weights a bundled or aliased family's file declares, and that no bundled or
60
- * aliased family ships an italic file at all. Both gates read this one table — render-entry's
61
+ * reproducible: which weights and styles each bundled or aliased family's files declare. Both gates read this one table — render-entry's
61
62
  * loader (`packages/execution/render-entry/src/fonts.ts`) derives its face table and its
62
63
  * `staticFile('fonts/<slug>-<file>.woff2')` URLs from it, and core's scene-shot sealing
63
64
  * (`sealSceneShotFonts`) admits a bundled face by it — so the host-side seal and the page-side
@@ -65,16 +66,11 @@ export interface BundledFontFamilyFaces {
65
66
  *
66
67
  * A declared weight range must not exceed what the file carries: outside it the browser
67
68
  * synthesises the face, which is a silent substitution, not a render. `fonts.test.ts` in
68
- * render-entry asserts every face here has bytes on disk and that no italic file exists, so these
69
+ * render-entry asserts every face here has bytes on disk and that its style matches the font metadata, so these
69
70
  * facts cannot drift away from the bytes.
70
71
  */
71
72
  export declare const BUNDLED_FONT_FACES: Readonly<Record<VendoredFontFamily | AliasedFontFamily, BundledFontFamilyFaces>>;
72
- /**
73
- * The only style a bundled or aliased family can be rendered in. There is no italic file in
74
- * `public/fonts` for any of them, so an italic request against one has no bytes behind it: the
75
- * browser would slant the upright face, which is neither the typeface the author asked for nor
76
- * reproducible across engines. A real italic comes from a sealed brand font asset.
77
- */
73
+ /** The default style of a bundled face when its declaration omits style. */
78
74
  export declare const BUNDLED_FONT_STYLE: "normal";
79
75
  /** The files behind a bundled or aliased family, or `undefined` when nothing ships for it. */
80
76
  export declare function bundledFontFamilyFaces(family: string): BundledFontFamilyFaces | undefined;
@@ -82,8 +78,7 @@ export declare function bundledFontFamilyFaces(family: string): BundledFontFamil
82
78
  export declare function bundledFaceCoversWeight(face: BundledFontFace, weight: number): boolean;
83
79
  /**
84
80
  * Whether bytes ship for exactly this (family, weight, style). This is the whole bundled-face
85
- * rule: the family must be bundled or aliased, the style must be upright because no italic file
86
- * exists, and some file must declare the weight.
81
+ * rule: some bundled or aliased file must declare both the requested weight and style.
87
82
  */
88
83
  export declare function bundledFontFaceExists(family: string, weight: number, style: "normal" | "italic"): boolean;
89
84
  /** The weights a bundled family covers, phrased for an error message ("400-900", "400, 700"). */
@@ -177,10 +172,9 @@ export interface VendoredFontCatalogEntry {
177
172
  readonly max: number;
178
173
  }>;
179
174
  /**
180
- * The styles bytes exist for. Always `["normal"]`: no bundled or aliased family ships an
181
- * italic file, so `fontStyle: "italic"` over one is refused rather than slanted.
175
+ * The styles bytes exist for; unsupported styles are refused rather than synthesized.
182
176
  */
183
- readonly styles: readonly ["normal"];
177
+ readonly styles: readonly ("normal" | "italic")[];
184
178
  /** The weights a caption is drawn at when the style names none. */
185
179
  readonly captionDefaults: CaptionFaceDefaults;
186
180
  /**
@@ -261,8 +261,7 @@ export declare const CAPTION_WEIGHT_CHOICES: readonly number[];
261
261
  */
262
262
  export declare function captionWeightChoices(stack: string | undefined): readonly number[];
263
263
  /**
264
- * The styles an editing surface may offer for a caption font stack. Every bundled and aliased
265
- * family is upright-only, so italic is offered only for a stack whose face comes from the brand
266
- * kit's sealed font manifest.
264
+ * The styles an editing surface may offer for a caption font stack, derived from bundled
265
+ * face declarations or deferred to a custom brand font manifest.
267
266
  */
268
267
  export declare function captionStyleChoices(stack: string | undefined): readonly ("normal" | "italic")[];
@@ -0,0 +1,11 @@
1
+ import type { CaptionLayout, CaptionSegment, CaptionStyle } from '../validators/index.js';
2
+ import type { OpsSet } from './types.js';
3
+ /** Caption-channel edits share one mutation boundary and preserve the existing style/depth semantics. */
4
+ export declare function createCaptionOps(set: OpsSet): {
5
+ setCaptionStyle: (style: CaptionStyle) => void;
6
+ setCaptionLayouts: (layouts: CaptionLayout[]) => void;
7
+ setCaptionDepth: (zPlane: "front" | "behind-subject") => void;
8
+ setCaptions: (segments: CaptionSegment[], style?: CaptionStyle, derivedFrom?: {
9
+ clipId: string;
10
+ }) => void;
11
+ };
@@ -1,9 +1,28 @@
1
- import type { CaptionSegment, CaptionStyle, Format, Marker, PerClipEffect, ReframeSegment, TimelineClip, Track } from '../validators/index.js';
1
+ import type { Format, Marker, PerClipEffect, ReframeSegment, TimelineClip, Track } from '../validators/index.js';
2
2
  import type { ClipPropertyUpdates, OpsGet, OpsSet } from './types.js';
3
3
  import type { TimelineEntity } from '../timeline/plan.js';
4
4
  import { type TrackKind } from './compositionOps.shared.js';
5
5
  export { findClipById, findMarkerById, findOrCreateTrackByKind, findTrackContainingClipId, type TrackKind, } from './compositionOps.shared.js';
6
6
  export declare function createCompositionOps(get: OpsGet, set: OpsSet): {
7
+ ripple: (time: number, amount: number) => void;
8
+ setFormat: (next: {
9
+ aspectRatio: Format["aspectRatio"];
10
+ fps?: Format["fps"];
11
+ resolution?: Format["resolution"];
12
+ platform?: Format["platform"];
13
+ }) => void;
14
+ addTrack: (kind: Track["kind"], name?: string, id?: string) => void;
15
+ removeTrack: (trackId: string) => void;
16
+ updateTrack: (trackId: string, updates: Partial<Pick<Track, "name" | "enabled" | "volume">>) => void;
17
+ reorderTracks: (fromIndex: number, toIndex: number) => void;
18
+ moveClipToTrack: (clipId: string, targetTrackId: string, newStartTime?: number) => void;
19
+ duplicateClip: (id: string) => string | undefined;
20
+ setCaptionStyle: (style: import("../index.js").CaptionStyle) => void;
21
+ setCaptionLayouts: (layouts: import("../index.js").CaptionLayout[]) => void;
22
+ setCaptionDepth: (zPlane: "front" | "behind-subject") => void;
23
+ setCaptions: (segments: import("../index.js").CaptionSegment[], style?: import("../index.js").CaptionStyle, derivedFrom?: {
24
+ clipId: string;
25
+ }) => void;
7
26
  addClip: (clip: TimelineClip, options?: {
8
27
  newTrack?: boolean;
9
28
  newTrackId?: string;
@@ -41,23 +60,5 @@ export declare function createCompositionOps(get: OpsGet, set: OpsSet): {
41
60
  removeExcludedRange: (clipId: string, rangeIdx: number) => void;
42
61
  setCropIntents: (clipId: string, segments: ReframeSegment[] | null) => void;
43
62
  setEffects: (clipId: string, effects: PerClipEffect[]) => void;
44
- setCaptionStyle: (style: CaptionStyle) => void;
45
- setCaptionDepth: (zPlane: "front" | "behind-subject") => void;
46
- setCaptions: (segments: CaptionSegment[], style?: CaptionStyle, derivedFrom?: {
47
- clipId: string;
48
- }) => void;
49
- ripple: (time: number, amount: number) => void;
50
- setFormat: (next: {
51
- aspectRatio: Format["aspectRatio"];
52
- fps?: Format["fps"];
53
- resolution?: Format["resolution"];
54
- platform?: Format["platform"];
55
- }) => void;
56
- addTrack: (kind: Track["kind"], name?: string, id?: string) => void;
57
- removeTrack: (trackId: string) => void;
58
- updateTrack: (trackId: string, updates: Partial<Pick<Track, "name" | "enabled" | "volume">>) => void;
59
- reorderTracks: (fromIndex: number, toIndex: number) => void;
60
- moveClipToTrack: (clipId: string, targetTrackId: string, newStartTime?: number) => void;
61
- duplicateClip: (id: string) => string | undefined;
62
63
  };
63
64
  export type CompositionOps = ReturnType<typeof createCompositionOps>;