@cueframe/kernel 0.2.32 → 0.2.33

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 (47) hide show
  1. package/dist/_members/errors/registry.d.ts +4 -0
  2. package/dist/_members/render-harness/assetRefs.d.ts +26 -0
  3. package/dist/_members/render-harness/assetRefs.d.ts.map +1 -0
  4. package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
  5. package/dist/_members/render-harness/cardFonts.d.ts +13 -0
  6. package/dist/_members/render-harness/cardFonts.d.ts.map +1 -0
  7. package/dist/_members/render-harness/cardRender.d.ts +1 -0
  8. package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
  9. package/dist/_members/render-harness/css-tree-subpaths.d.ts +5 -0
  10. package/dist/_members/render-harness/renderInputAssets.d.ts.map +1 -1
  11. package/dist/authoring.js +2 -2
  12. package/dist/{chunk-LLC6TCH5.js → chunk-3GNTA646.js} +1 -1
  13. package/dist/{chunk-LEJ5QXHP.js → chunk-4RREA7VA.js} +7 -6
  14. package/dist/{chunk-WYKUWRQG.js → chunk-A3MXR6JI.js} +33 -1
  15. package/dist/{chunk-T4XTC35J.js → chunk-DLKCGEKP.js} +1 -1
  16. package/dist/{chunk-Q244EHRI.js → chunk-GMVUJYPM.js} +1 -1
  17. package/dist/{chunk-MN6D3U5N.js → chunk-KSRFYFUZ.js} +8 -1
  18. package/dist/chunk-OSMXQV5V.js +18 -0
  19. package/dist/chunk-RAPDICTC.js +82 -0
  20. package/dist/{chunk-NSXFYDBP.js → chunk-TCYULWNP.js} +1 -1
  21. package/dist/{chunk-AZSTZE64.js → chunk-W44ASS4N.js} +6 -6
  22. package/dist/compose.js +20 -20
  23. package/dist/composition/projection.js +2 -2
  24. package/dist/composition-ops.js +5 -5
  25. package/dist/composition.js +2 -2
  26. package/dist/core/render.js +3 -3
  27. package/dist/core/select.js +2 -2
  28. package/dist/core.js +3 -3
  29. package/dist/director/ai-sdk.js +3 -3
  30. package/dist/director/domain.js +2 -2
  31. package/dist/director.js +3 -3
  32. package/dist/errors.js +3 -1
  33. package/dist/primitives/hero-text.js +2 -2
  34. package/dist/primitives/lib/index.js +6 -6
  35. package/dist/primitives/lib.js +6 -6
  36. package/dist/primitives/scenes.js +2 -2
  37. package/dist/primitives/text.js +3 -3
  38. package/dist/primitives.js +18 -18
  39. package/dist/render-harness/cardAssetAdmission.js +3 -2
  40. package/dist/render-harness/cardFonts.d.ts +1 -0
  41. package/dist/render-harness/cardFonts.js +13 -0
  42. package/dist/render-harness/renderInputAssets.js +2 -1
  43. package/dist/render-harness.js +28 -7
  44. package/package.json +14 -10
  45. package/dist/{chunk-ZDL7XEXW.js → chunk-RBWS5XHE.js} +7 -7
  46. package/dist/{chunk-7SQOXIWR.js → chunk-RL5SO653.js} +3 -3
  47. package/dist/{chunk-IAQHWJUO.js → chunk-TE3PNQG6.js} +4 -4
@@ -5,6 +5,8 @@ export interface ErrorSpec {
5
5
  category: ErrorCategory;
6
6
  retryable: boolean;
7
7
  httpStatus: number;
8
+ /** Overrides the derived wait; see `retryAfterSecondsFor`. */
9
+ retryAfterSeconds?: number;
8
10
  }
9
11
  export declare const ERROR_CODES: {
10
12
  readonly unauthorized: {
@@ -1649,6 +1651,8 @@ export declare class CueframeError extends Error {
1649
1651
  export declare function encodeError(e: CueframeError): string;
1650
1652
  export declare function decodeError(msg: string): CueframeError | null;
1651
1653
  export declare function scrubSensitive(s: string): string;
1654
+ /** Seconds to wait before retrying, or undefined when retrying will not help. */
1655
+ export declare function retryAfterSecondsFor(code: ErrorCode): number | undefined;
1652
1656
  export declare function toWireEnvelope(e: Envelope, opts?: {
1653
1657
  trusted?: boolean;
1654
1658
  }): Envelope;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * What counts as a reference to something OUTSIDE this document.
3
+ *
4
+ * Two guards ask that question about card HTML — `cardAssetAdmission`'s CSS/HTML
5
+ * walk and `renderInputAssets`'s `suspiciousUnannotatedAsset` sweep — and they
6
+ * disagreed. The walk knew that `url(#local-id)` is a same-document fragment;
7
+ * the sweep matched a bare `url(` and refused it.
8
+ *
9
+ * The visible cost: an inline `<svg>` using `clip-path="url(#mark-clip)"` passed
10
+ * the guard that understands SVG and was refused by the one that does not, so the
11
+ * org's own logo could not be inlined without rewriting it (CUE-31 sibling,
12
+ * reported 2026-09-17). A fragment reference is the OPPOSITE of remote — it
13
+ * cannot leave the document — and every guard has to agree on that.
14
+ *
15
+ * One definition, imported by both.
16
+ */
17
+ /** `url(#id)`, `href="#id"` — resolves inside this document, never over a network. */
18
+ export declare function isFragmentReference(value: string): boolean;
19
+ /** Every `url(...)` payload in a CSS value, unquoted. */
20
+ export declare function cssUrlPayloads(value: string): string[];
21
+ /**
22
+ * Does this CSS value reach outside the document? True only when it carries a
23
+ * `url()` whose payload is not a same-document fragment.
24
+ */
25
+ export declare function hasNonFragmentCssUrl(value: string): boolean;
26
+ //# sourceMappingURL=assetRefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetRefs.d.ts","sourceRoot":"","sources":["../src/assetRefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,yDAAyD;AACzD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEtD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAI3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"cardAssetAdmission.d.ts","sourceRoot":"","sources":["../src/cardAssetAdmission.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA+GzD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAQhE"}
1
+ {"version":3,"file":"cardAssetAdmission.d.ts","sourceRoot":"","sources":["../src/cardAssetAdmission.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA4GzD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAQhE"}
@@ -0,0 +1,13 @@
1
+ /** The `font-family` stacks a card's HTML declares, deduplicated. */
2
+ export declare function cardFontFamilyStacks(html: string): string[];
3
+ /**
4
+ * The bundled families a card's HTML names, in the order a renderer should load them.
5
+ *
6
+ * The loader half of the same question `assertCardFontsAdmitted` gates on, off the
7
+ * same extraction, so the faces a card is ALLOWED to name and the faces a renderer
8
+ * actually registers cannot drift apart. Entries that are not bundled (a generic,
9
+ * a system face) are dropped: there is nothing to load for them.
10
+ */
11
+ export declare function cardBundledFamilies(html: string): string[];
12
+ export declare function assertCardFontsAdmitted(html: string, locator: string): void;
13
+ //# sourceMappingURL=cardFonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cardFonts.d.ts","sourceRoot":"","sources":["../src/cardFonts.ts"],"names":[],"mappings":"AAqEA,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAI3D;AAmCD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ1D;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAa3E"}
@@ -5,6 +5,7 @@ export declare function generateCardRootSource(opts: {
5
5
  width: number;
6
6
  height: number;
7
7
  fps: number;
8
+ renderEntryRoot: string;
8
9
  }): string;
9
10
  export declare function generateCardEntrySource(): string;
10
11
  export declare function buildCardWebpackOverride(renderEntryRoot: string): (config: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"cardRender.d.ts","sourceRoot":"","sources":["../src/cardRender.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AACvD,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CA6BnG;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAMhD;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,IACtD,QAAQ,GAAG,SAOpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA0D7F"}
1
+ {"version":3,"file":"cardRender.d.ts","sourceRoot":"","sources":["../src/cardRender.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AACvD,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,MAAM,CAkDT;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAMhD;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,IACtD,QAAQ,GAAG,SAOpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAgE7F"}
@@ -9,3 +9,8 @@ declare module 'css-tree/walker' {
9
9
  const walk: typeof import('css-tree').walk;
10
10
  export default walk;
11
11
  }
12
+
13
+ declare module 'css-tree/generator' {
14
+ const generate: typeof import('css-tree').generate;
15
+ export default generate;
16
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"renderInputAssets.d.ts","sourceRoot":"","sources":["../src/renderInputAssets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,OAAO,GACP,cAAc,GACd,MAAM,GACN,YAAY,GACZ,gBAAgB,CAAC;AAErB,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAM/C;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,IAAI,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AA8GD,wBAAiB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,CAoDpE;AAsBD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,EAAE,CAYhE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CA2C3D"}
1
+ {"version":3,"file":"renderInputAssets.d.ts","sourceRoot":"","sources":["../src/renderInputAssets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,OAAO,GACP,cAAc,GACd,MAAM,GACN,YAAY,GACZ,gBAAgB,CAAC;AAErB,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAM/C;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,IAAI,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAkHD,wBAAiB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,CAoDpE;AAsBD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,EAAE,CAYhE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CA2C3D"}
package/dist/authoring.js CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  formatPlanSteps,
49
49
  initCodeGenPrompts
50
50
  } from "./chunk-Y4HPN4BC.js";
51
- import "./chunk-Q244EHRI.js";
51
+ import "./chunk-GMVUJYPM.js";
52
52
  import {
53
53
  cssLayoutVars
54
54
  } from "./chunk-W5W3FDDI.js";
@@ -62,7 +62,7 @@ import "./chunk-WPZKOVYF.js";
62
62
  import "./chunk-B7J5UUUV.js";
63
63
  import "./chunk-KYRDKK2D.js";
64
64
  import "./chunk-WREYUH2E.js";
65
- import "./chunk-WYKUWRQG.js";
65
+ import "./chunk-A3MXR6JI.js";
66
66
  import "./chunk-7PA7FGLD.js";
67
67
  import {
68
68
  collectSceneClipIssues,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CueframeError,
3
3
  encodeError
4
- } from "./chunk-WYKUWRQG.js";
4
+ } from "./chunk-A3MXR6JI.js";
5
5
 
6
6
  // ../execution/core/src/render/vcam/constants.ts
7
7
  var P_MIN = 0.5;
@@ -1,6 +1,10 @@
1
+ import {
2
+ cssUrlPayloads,
3
+ isFragmentReference
4
+ } from "./chunk-OSMXQV5V.js";
1
5
  import {
2
6
  CueframeError
3
- } from "./chunk-WYKUWRQG.js";
7
+ } from "./chunk-A3MXR6JI.js";
4
8
 
5
9
  // ../execution/render-harness/src/cardAssetAdmission.ts
6
10
  import parseCss from "css-tree/parser";
@@ -41,9 +45,6 @@ var CSS_VALUE_ATTRIBUTES = /* @__PURE__ */ new Set([
41
45
  "mask",
42
46
  "stroke"
43
47
  ]);
44
- function isFragmentReference(value) {
45
- return value.trim().startsWith("#");
46
- }
47
48
  function refuse(locator, reason) {
48
49
  throw new CueframeError(
49
50
  "card_external_asset_forbidden",
@@ -84,8 +85,8 @@ function assertNodeAssetFree(node, locator) {
84
85
  }
85
86
  if (name === "style") assertCssAssetFree(attr.value, "declarationList", locator);
86
87
  if (CSS_VALUE_ATTRIBUTES.has(name)) {
87
- for (const match of attr.value.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi)) {
88
- if (!isFragmentReference(match[2] ?? "")) {
88
+ for (const payload of cssUrlPayloads(attr.value)) {
89
+ if (!isFragmentReference(payload)) {
89
90
  refuse(locator, `contains an unmanifested ${name} url() asset reference`);
90
91
  }
91
92
  }
@@ -440,6 +440,34 @@ function scrubAll(obj) {
440
440
  for (const [k, v] of Object.entries(obj)) out[k] = scrubVal(v);
441
441
  return Object.keys(out).length ? out : void 0;
442
442
  }
443
+ var DEFAULT_RETRY_AFTER_SECONDS = 30;
444
+ var BUSY_RETRY_AFTER_SECONDS = 5;
445
+ var PROVIDER_RETRY_AFTER_SECONDS = 60;
446
+ var RETRY_AFTER_OVERRIDES = {
447
+ idempotency_conflict: BUSY_RETRY_AFTER_SECONDS,
448
+ resource_import_in_flight: BUSY_RETRY_AFTER_SECONDS,
449
+ capture_busy: BUSY_RETRY_AFTER_SECONDS,
450
+ snapshot_stale: BUSY_RETRY_AFTER_SECONDS,
451
+ too_many_active_sessions: BUSY_RETRY_AFTER_SECONDS,
452
+ rate_limited: PROVIDER_RETRY_AFTER_SECONDS,
453
+ billing_unavailable: PROVIDER_RETRY_AFTER_SECONDS,
454
+ render_provider_unreachable: PROVIDER_RETRY_AFTER_SECONDS,
455
+ render_provider_start_failed: PROVIDER_RETRY_AFTER_SECONDS,
456
+ render_pipeline_unavailable: PROVIDER_RETRY_AFTER_SECONDS,
457
+ sighted_provider_unreachable: PROVIDER_RETRY_AFTER_SECONDS,
458
+ lambda_infra_failed: PROVIDER_RETRY_AFTER_SECONDS,
459
+ pipeline_unavailable: PROVIDER_RETRY_AFTER_SECONDS,
460
+ mux_unavailable: PROVIDER_RETRY_AFTER_SECONDS,
461
+ import_unavailable: PROVIDER_RETRY_AFTER_SECONDS,
462
+ import_source_unreachable: PROVIDER_RETRY_AFTER_SECONDS,
463
+ generator_unavailable: PROVIDER_RETRY_AFTER_SECONDS,
464
+ service_unavailable: PROVIDER_RETRY_AFTER_SECONDS
465
+ };
466
+ function retryAfterSecondsFor(code) {
467
+ const spec = ERROR_CODES[code];
468
+ if (!spec?.retryable) return void 0;
469
+ return spec.retryAfterSeconds ?? RETRY_AFTER_OVERRIDES[code] ?? DEFAULT_RETRY_AFTER_SECONDS;
470
+ }
443
471
  function toWireEnvelope(e, opts) {
444
472
  const trusted = opts?.trusted ?? false;
445
473
  let message;
@@ -455,7 +483,10 @@ function toWireEnvelope(e, opts) {
455
483
  fix = pickScrub(e.fix, FIX_ALLOW);
456
484
  }
457
485
  const locator = pickScrub(e.locator, LOCATOR_ALLOW);
458
- return { ...e, message, fix, locator };
486
+ const thrown = typeof fix?.retryAfter === "number" ? fix.retryAfter : void 0;
487
+ const retryAfter = thrown ?? retryAfterSecondsFor(e.code);
488
+ const withRetry = retryAfter === void 0 ? fix : { ...fix ?? {}, retryAfter };
489
+ return { ...e, message, fix: withRetry, locator };
459
490
  }
460
491
 
461
492
  export {
@@ -464,5 +495,6 @@ export {
464
495
  encodeError,
465
496
  decodeError,
466
497
  scrubSensitive,
498
+ retryAfterSecondsFor,
467
499
  toWireEnvelope
468
500
  };
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  decodeError,
11
11
  scrubSensitive
12
- } from "./chunk-WYKUWRQG.js";
12
+ } from "./chunk-A3MXR6JI.js";
13
13
 
14
14
  // ../director/src/domain/chat.ts
15
15
  import { z } from "zod";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  CueframeError,
8
8
  encodeError
9
- } from "./chunk-WYKUWRQG.js";
9
+ } from "./chunk-A3MXR6JI.js";
10
10
 
11
11
  // ../composition/src/projection/cardTokens.ts
12
12
  var CARD_MOTION_VAR_NAMES = [
@@ -1,3 +1,6 @@
1
+ import {
2
+ hasNonFragmentCssUrl
3
+ } from "./chunk-OSMXQV5V.js";
1
4
  import {
2
5
  getPrimitiveCatalogMeta
3
6
  } from "./chunk-7AZLFN26.js";
@@ -86,7 +89,11 @@ function parameterAssetPaths(primitiveId) {
86
89
  }
87
90
  function suspiciousUnannotatedAsset(value) {
88
91
  if (typeof value === "string") {
89
- return /^(?:https?:\/\/|\/\/|data:|blob:|file:|\.\.?\/)/i.test(value) || /url\(\s*['"]?/i.test(value) || /^[^\s]+\.(?:png|jpe?g|gif|webp|svg|json|lottie|mp4|mov|webm|m4a|mp3|wav|woff2?|ttf|otf)(?:\?.*)?$/i.test(value);
92
+ return /^(?:https?:\/\/|\/\/|data:|blob:|file:|\.\.?\/)/i.test(value) || // A `url()` counts only when it leaves the document. `url(#mark-clip)` is a
93
+ // same-document fragment — the SVG/CSS walk in `cardAssetAdmission` has
94
+ // always known that, and this sweep did not, so an inline logo passed one
95
+ // guard and was refused by the other. Same predicate, both places.
96
+ hasNonFragmentCssUrl(value) || /^[^\s]+\.(?:png|jpe?g|gif|webp|svg|json|lottie|mp4|mov|webm|m4a|mp3|wav|woff2?|ttf|otf)(?:\?.*)?$/i.test(value);
90
97
  }
91
98
  if (Array.isArray(value)) return value.some(suspiciousUnannotatedAsset);
92
99
  if (value && typeof value === "object") return Object.values(value).some(suspiciousUnannotatedAsset);
@@ -0,0 +1,18 @@
1
+ // ../execution/render-harness/src/assetRefs.ts
2
+ function isFragmentReference(value) {
3
+ return value.trim().startsWith("#");
4
+ }
5
+ function cssUrlPayloads(value) {
6
+ return [...value.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi)].map((m) => m[2] ?? "");
7
+ }
8
+ function hasNonFragmentCssUrl(value) {
9
+ const payloads = cssUrlPayloads(value);
10
+ if (payloads.length === 0) return false;
11
+ return payloads.some((payload) => !isFragmentReference(payload));
12
+ }
13
+
14
+ export {
15
+ isFragmentReference,
16
+ cssUrlPayloads,
17
+ hasNonFragmentCssUrl
18
+ };
@@ -0,0 +1,82 @@
1
+ import {
2
+ CueframeError
3
+ } from "./chunk-A3MXR6JI.js";
4
+ import {
5
+ bundledFontFamilyFaces,
6
+ isGenericOnlyStack,
7
+ parseFontStack
8
+ } from "./chunk-AVTEPAWI.js";
9
+
10
+ // ../execution/render-harness/src/cardFonts.ts
11
+ import parseCss from "css-tree/parser";
12
+ import walkCss from "css-tree/walker";
13
+ import generateCss from "css-tree/generator";
14
+ import { parseFragment } from "parse5";
15
+ function collectFontFamilyStacks(css, context, out) {
16
+ let ast;
17
+ try {
18
+ ast = parseCss(css, { context });
19
+ } catch {
20
+ return;
21
+ }
22
+ walkCss(ast, (node) => {
23
+ if (node.type !== "Declaration") return;
24
+ if (node.property.toLowerCase() !== "font-family") return;
25
+ const value = generateCss(node.value).trim();
26
+ if (value.length > 0) out.add(value);
27
+ });
28
+ }
29
+ function collectFromNode(node, out) {
30
+ if ("tagName" in node) {
31
+ for (const attr of node.attrs) {
32
+ if (attr.name.toLowerCase() === "style") {
33
+ collectFontFamilyStacks(attr.value, "declarationList", out);
34
+ }
35
+ if (attr.name.toLowerCase() === "font-family" && attr.value.trim().length > 0) {
36
+ out.add(attr.value.trim());
37
+ }
38
+ }
39
+ if (node.tagName.toLowerCase() === "style" && "childNodes" in node) {
40
+ const css = node.childNodes.filter((child) => child.nodeName === "#text").map((child) => child.value).join("");
41
+ collectFontFamilyStacks(css, "stylesheet", out);
42
+ }
43
+ }
44
+ if ("childNodes" in node) for (const child of node.childNodes) collectFromNode(child, out);
45
+ }
46
+ function cardFontFamilyStacks(html) {
47
+ const out = /* @__PURE__ */ new Set();
48
+ for (const node of parseFragment(html).childNodes) collectFromNode(node, out);
49
+ return [...out];
50
+ }
51
+ function stackDrawsSomethingReal(stack) {
52
+ const entries = parseFontStack(stack);
53
+ if (entries.length === 0) return true;
54
+ return entries.some((entry) => bundledFontFamilyFaces(entry) !== void 0 || isGenericOnlyStack(entry));
55
+ }
56
+ function cardBundledFamilies(html) {
57
+ const out = /* @__PURE__ */ new Set();
58
+ for (const stack of cardFontFamilyStacks(html)) {
59
+ for (const entry of parseFontStack(stack)) {
60
+ if (bundledFontFamilyFaces(entry) !== void 0) out.add(entry);
61
+ }
62
+ }
63
+ return [...out];
64
+ }
65
+ function assertCardFontsAdmitted(html, locator) {
66
+ for (const stack of cardFontFamilyStacks(html)) {
67
+ if (!stackDrawsSomethingReal(stack)) {
68
+ throw new CueframeError(
69
+ "font_not_reproducible",
70
+ `Card ${locator} asks for font-family '${stack}', which the renderer has no bytes for. Read GET /v1/fonts (list_render_fonts) for the admitted families; a stack naming one of them resolves to it. @import and remote font files are not available inside a card.`,
71
+ void 0,
72
+ { card: locator, fontFamily: stack }
73
+ );
74
+ }
75
+ }
76
+ }
77
+
78
+ export {
79
+ cardFontFamilyStacks,
80
+ cardBundledFamilies,
81
+ assertCardFontsAdmitted
82
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ChatErrorView,
3
3
  DirectorTurnContext
4
- } from "./chunk-T4XTC35J.js";
4
+ } from "./chunk-DLKCGEKP.js";
5
5
  import {
6
6
  GenerationArtifact
7
7
  } from "./chunk-73DQTUWY.js";
@@ -7,10 +7,6 @@ import {
7
7
  flattenCompoundClips,
8
8
  hasCompoundClips
9
9
  } from "./chunk-QISFYLBB.js";
10
- import {
11
- compositionHasVo,
12
- roleDefaultGainDb
13
- } from "./chunk-VZ7TYX6Z.js";
14
10
  import {
15
11
  DOMINANCE_WEIGHTS,
16
12
  ENTER_SEC,
@@ -28,7 +24,11 @@ import {
28
24
  scoreAndRank,
29
25
  segmentShots,
30
26
  stabilizeSelectionHysteresis
31
- } from "./chunk-LLC6TCH5.js";
27
+ } from "./chunk-3GNTA646.js";
28
+ import {
29
+ compositionHasVo,
30
+ roleDefaultGainDb
31
+ } from "./chunk-VZ7TYX6Z.js";
32
32
  import {
33
33
  SHOT_SCALE_TARGET,
34
34
  shotScaleZoom
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  CueframeError,
38
38
  encodeError
39
- } from "./chunk-WYKUWRQG.js";
39
+ } from "./chunk-A3MXR6JI.js";
40
40
  import {
41
41
  SCENE_CAPTURE_IDENTITY_FIELDS_V1,
42
42
  SCENE_PRESET_TRIANGLES,
package/dist/compose.js CHANGED
@@ -1,44 +1,44 @@
1
1
  import "./chunk-JVDUSOYG.js";
2
+ import "./chunk-GULDS3VE.js";
2
3
  import {
3
4
  isContrastCritical
4
5
  } from "./chunk-QDBVYZSF.js";
5
6
  import "./chunk-JQMPHKLU.js";
6
7
  import "./chunk-ZZRBKGDA.js";
7
- import "./chunk-GULDS3VE.js";
8
- import {
9
- catalog as catalog6
10
- } from "./chunk-VLJOIUHL.js";
11
- import {
12
- catalog as catalog2
13
- } from "./chunk-WAUVKF2F.js";
14
- import {
15
- catalog as catalog8
16
- } from "./chunk-7SQOXIWR.js";
17
8
  import {
18
9
  catalog as catalog4
19
10
  } from "./chunk-JRJQECCF.js";
20
11
  import {
21
12
  catalog as catalog7
22
- } from "./chunk-IAQHWJUO.js";
23
- import "./chunk-S5H6GH6M.js";
24
- import "./chunk-QAGGJHAF.js";
25
- import "./chunk-MFHXCHRI.js";
13
+ } from "./chunk-TE3PNQG6.js";
26
14
  import {
27
15
  catalog
28
- } from "./chunk-ZDL7XEXW.js";
29
- import "./chunk-U4V4FZGE.js";
16
+ } from "./chunk-RBWS5XHE.js";
30
17
  import "./chunk-DLF4WVSE.js";
31
- import "./chunk-LT4PWSR2.js";
32
- import "./chunk-FWSJLHSV.js";
18
+ import "./chunk-U4V4FZGE.js";
33
19
  import {
34
20
  catalog as catalog3
35
21
  } from "./chunk-FVDFPJHT.js";
36
22
  import "./chunk-QGAWDLYX.js";
23
+ import {
24
+ catalog as catalog6
25
+ } from "./chunk-VLJOIUHL.js";
26
+ import "./chunk-S5H6GH6M.js";
27
+ import "./chunk-QAGGJHAF.js";
37
28
  import {
38
29
  catalog as catalog5
39
30
  } from "./chunk-RAXHCRVV.js";
40
- import "./chunk-XHGZ2E77.js";
31
+ import {
32
+ catalog as catalog2
33
+ } from "./chunk-WAUVKF2F.js";
34
+ import "./chunk-MFHXCHRI.js";
35
+ import {
36
+ catalog as catalog8
37
+ } from "./chunk-RL5SO653.js";
38
+ import "./chunk-LT4PWSR2.js";
39
+ import "./chunk-FWSJLHSV.js";
41
40
  import "./chunk-ZFEXATWN.js";
41
+ import "./chunk-XHGZ2E77.js";
42
42
  import "./chunk-W2245F6G.js";
43
43
  import "./chunk-JBWSK2YD.js";
44
44
  import "./chunk-OBA6NW4S.js";
@@ -54,7 +54,7 @@ import {
54
54
  import {
55
55
  CueframeError,
56
56
  encodeError
57
- } from "./chunk-WYKUWRQG.js";
57
+ } from "./chunk-A3MXR6JI.js";
58
58
  import "./chunk-7PA7FGLD.js";
59
59
  import "./chunk-XACXNDFL.js";
60
60
  import "./chunk-2L7PYYJK.js";
@@ -32,7 +32,7 @@ import {
32
32
  silhouetteKeepOutForWindow,
33
33
  sourceRectToOutput,
34
34
  sourceWindowKey
35
- } from "../chunk-Q244EHRI.js";
35
+ } from "../chunk-GMVUJYPM.js";
36
36
  import {
37
37
  BRAND_TOKEN_REFS,
38
38
  BRAND_TOKEN_ROOT_KEYS,
@@ -74,7 +74,7 @@ import {
74
74
  contrastRatio
75
75
  } from "../chunk-ILO4NEZ3.js";
76
76
  import "../chunk-VG2ND6PX.js";
77
- import "../chunk-WYKUWRQG.js";
77
+ import "../chunk-A3MXR6JI.js";
78
78
  import "../chunk-AVTEPAWI.js";
79
79
  import "../chunk-2ESYSVXG.js";
80
80
  export {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  playableSpans
3
- } from "./chunk-AZSTZE64.js";
3
+ } from "./chunk-W44ASS4N.js";
4
4
  import "./chunk-QH3YI3ND.js";
5
5
  import "./chunk-QISFYLBB.js";
6
+ import "./chunk-3GNTA646.js";
6
7
  import "./chunk-VZ7TYX6Z.js";
7
- import "./chunk-LLC6TCH5.js";
8
8
  import "./chunk-DENF4TPI.js";
9
9
  import {
10
10
  createHeadlessStore,
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-B7J5UUUV.js";
31
31
  import "./chunk-KYRDKK2D.js";
32
32
  import "./chunk-WREYUH2E.js";
33
- import "./chunk-WYKUWRQG.js";
33
+ import "./chunk-A3MXR6JI.js";
34
34
  import "./chunk-7PA7FGLD.js";
35
35
  import {
36
36
  SCENE_SLOT_MEDIA_FORMATS,
@@ -578,7 +578,7 @@ var CompositionOp = z.discriminatedUnion("type", [
578
578
  "Set the output format \u2014 `aspectRatio` (16:9|9:16|1:1|4:5) plus optional `fps` and `resolution`. Merges: an omitted field keeps the current value."
579
579
  ),
580
580
  z.object({ type: z.literal("addTrack"), kind: Track.shape.kind, name: z.string().optional(), id: z.string().optional() }).strict().describe(
581
- "Add an EMPTY track of a given family (video|audio|image|overlay|effect). Optional pinned `id`."
581
+ "Add an EMPTY track of a given family (video|audio|image|overlay|effect). Optional pinned `id`. The new track is appended, so it starts at the BACK: index 0 is the top layer and higher indices are further back (see `reorderTracks`). Track order only ranks clips on the same plane \u2014 every overlay draws above the video lane unless its `zPlane` is `behind-subject`, whatever its track index."
582
582
  ),
583
583
  z.object({ type: z.literal("removeTrack"), trackId: z.string() }).strict().describe(
584
584
  "Remove a track AND all its clips by id."
@@ -587,7 +587,7 @@ var CompositionOp = z.discriminatedUnion("type", [
587
587
  "Patch a track's `name` / `enabled` by id."
588
588
  ),
589
589
  z.object({ type: z.literal("reorderTracks"), fromIndex: z.number(), toIndex: z.number() }).strict().describe(
590
- "Move a track from one index to another (changes layer/compositing order)."
590
+ 'Move a track from one index to another. ORDER: index 0 is the TOP layer, not the bottom \u2014 moving a backdrop to index 0 puts it in FRONT of everything and hides the composition. Higher index = further back. PRECEDENCE: track order decides compositing only among clips on the same plane. Overlays are composited in a lane ABOVE the video lane whatever their track index; the one exception is `zPlane:"behind-subject"`, which moves the overlay inside its host clip, behind the segmented foreground. So if reordering tracks does not change what you see, the plane split already decided it.'
591
591
  ),
592
592
  z.object({ type: z.literal("moveClipToTrack"), clipId: z.string(), targetTrackId: z.string(), newStartTime: z.number().optional() }).strict().describe(
593
593
  "Move a clip to another SAME-family track, optionally at a new `newStartTime`."
@@ -46,7 +46,7 @@ import {
46
46
  silhouetteKeepOutForWindow,
47
47
  sourceRectToOutput,
48
48
  sourceWindowKey
49
- } from "./chunk-Q244EHRI.js";
49
+ } from "./chunk-GMVUJYPM.js";
50
50
  import {
51
51
  BRAND_TOKEN_REFS,
52
52
  BRAND_TOKEN_ROOT_KEYS,
@@ -194,7 +194,7 @@ import {
194
194
  ReframeSegmentFields
195
195
  } from "./chunk-B7J5UUUV.js";
196
196
  import "./chunk-WREYUH2E.js";
197
- import "./chunk-WYKUWRQG.js";
197
+ import "./chunk-A3MXR6JI.js";
198
198
  import "./chunk-AVTEPAWI.js";
199
199
  import "./chunk-2ESYSVXG.js";
200
200
 
@@ -66,19 +66,19 @@ import {
66
66
  sliceTranscriptWords,
67
67
  splitIntoSentences,
68
68
  validateComposition
69
- } from "../chunk-AZSTZE64.js";
69
+ } from "../chunk-W44ASS4N.js";
70
70
  import {
71
71
  buildEasedZooms,
72
72
  buildPannedCenters,
73
73
  easeOutCubic
74
74
  } from "../chunk-QH3YI3ND.js";
75
75
  import "../chunk-QISFYLBB.js";
76
+ import "../chunk-3GNTA646.js";
76
77
  import "../chunk-VZ7TYX6Z.js";
77
- import "../chunk-LLC6TCH5.js";
78
78
  import "../chunk-DENF4TPI.js";
79
79
  import "../chunk-KYRDKK2D.js";
80
80
  import "../chunk-WREYUH2E.js";
81
- import "../chunk-WYKUWRQG.js";
81
+ import "../chunk-A3MXR6JI.js";
82
82
  import "../chunk-7PA7FGLD.js";
83
83
  import "../chunk-XACXNDFL.js";
84
84
  import "../chunk-2L7PYYJK.js";
@@ -7,8 +7,8 @@ import {
7
7
  stabilizeIncumbentChallenger,
8
8
  stabilizePresenceGate,
9
9
  stabilizeSelectionHysteresis
10
- } from "../chunk-LLC6TCH5.js";
11
- import "../chunk-WYKUWRQG.js";
10
+ } from "../chunk-3GNTA646.js";
11
+ import "../chunk-A3MXR6JI.js";
12
12
  import "../chunk-2ESYSVXG.js";
13
13
 
14
14
  // ../execution/core/src/select/errorCodes.ts
package/dist/core.js CHANGED
@@ -10,15 +10,15 @@ import {
10
10
  ensureEven,
11
11
  extractCaptionWordsFromDoc,
12
12
  isEmphasized
13
- } from "./chunk-AZSTZE64.js";
13
+ } from "./chunk-W44ASS4N.js";
14
14
  import "./chunk-QH3YI3ND.js";
15
15
  import "./chunk-QISFYLBB.js";
16
+ import "./chunk-3GNTA646.js";
16
17
  import "./chunk-VZ7TYX6Z.js";
17
- import "./chunk-LLC6TCH5.js";
18
18
  import "./chunk-DENF4TPI.js";
19
19
  import "./chunk-KYRDKK2D.js";
20
20
  import "./chunk-WREYUH2E.js";
21
- import "./chunk-WYKUWRQG.js";
21
+ import "./chunk-A3MXR6JI.js";
22
22
  import "./chunk-7PA7FGLD.js";
23
23
  import "./chunk-XACXNDFL.js";
24
24
  import "./chunk-2L7PYYJK.js";
@@ -10,13 +10,13 @@ import {
10
10
  dataChunk,
11
11
  generationArtifactFromToolResult,
12
12
  projectDirectorHistory
13
- } from "../chunk-NSXFYDBP.js";
14
- import "../chunk-T4XTC35J.js";
13
+ } from "../chunk-TCYULWNP.js";
14
+ import "../chunk-DLKCGEKP.js";
15
15
  import "../chunk-73DQTUWY.js";
16
16
  import "../chunk-BADZHXLR.js";
17
17
  import "../chunk-U3JPILZS.js";
18
18
  import "../chunk-XELS2BGA.js";
19
- import "../chunk-WYKUWRQG.js";
19
+ import "../chunk-A3MXR6JI.js";
20
20
  import "../chunk-2ESYSVXG.js";
21
21
  export {
22
22
  CueFrameIteration,
@@ -9,7 +9,7 @@ import {
9
9
  ProjectRef,
10
10
  chatErrorViewFromEnvelope,
11
11
  chatErrorViewFromUnknown
12
- } from "../chunk-T4XTC35J.js";
12
+ } from "../chunk-DLKCGEKP.js";
13
13
  import {
14
14
  ClientRequestId,
15
15
  GenerateMediaCommand,
@@ -31,7 +31,7 @@ import {
31
31
  import "../chunk-BADZHXLR.js";
32
32
  import "../chunk-U3JPILZS.js";
33
33
  import "../chunk-XELS2BGA.js";
34
- import "../chunk-WYKUWRQG.js";
34
+ import "../chunk-A3MXR6JI.js";
35
35
  import "../chunk-2ESYSVXG.js";
36
36
  export {
37
37
  ChatErrorView,
package/dist/director.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  dataChunk,
11
11
  generationArtifactFromToolResult,
12
12
  projectDirectorHistory
13
- } from "./chunk-NSXFYDBP.js";
13
+ } from "./chunk-TCYULWNP.js";
14
14
  import "./chunk-FTVZF4GO.js";
15
15
  import {
16
16
  ChatErrorView,
@@ -22,7 +22,7 @@ import {
22
22
  ProjectRef,
23
23
  chatErrorViewFromEnvelope,
24
24
  chatErrorViewFromUnknown
25
- } from "./chunk-T4XTC35J.js";
25
+ } from "./chunk-DLKCGEKP.js";
26
26
  import {
27
27
  ClientRequestId,
28
28
  GenerateMediaCommand,
@@ -44,7 +44,7 @@ import {
44
44
  import "./chunk-BADZHXLR.js";
45
45
  import "./chunk-U3JPILZS.js";
46
46
  import "./chunk-XELS2BGA.js";
47
- import "./chunk-WYKUWRQG.js";
47
+ import "./chunk-A3MXR6JI.js";
48
48
  import "./chunk-2ESYSVXG.js";
49
49
  export {
50
50
  ChatErrorView,
package/dist/errors.js CHANGED
@@ -3,15 +3,17 @@ import {
3
3
  ERROR_CODES,
4
4
  decodeError,
5
5
  encodeError,
6
+ retryAfterSecondsFor,
6
7
  scrubSensitive,
7
8
  toWireEnvelope
8
- } from "./chunk-WYKUWRQG.js";
9
+ } from "./chunk-A3MXR6JI.js";
9
10
  import "./chunk-2ESYSVXG.js";
10
11
  export {
11
12
  CueframeError,
12
13
  ERROR_CODES,
13
14
  decodeError,
14
15
  encodeError,
16
+ retryAfterSecondsFor,
15
17
  scrubSensitive,
16
18
  toWireEnvelope
17
19
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  HeroText,
3
3
  catalog
4
- } from "../chunk-7SQOXIWR.js";
4
+ } from "../chunk-RL5SO653.js";
5
5
  import "../chunk-LT4PWSR2.js";
6
6
  import "../chunk-FWSJLHSV.js";
7
- import "../chunk-XHGZ2E77.js";
8
7
  import "../chunk-ZFEXATWN.js";
8
+ import "../chunk-XHGZ2E77.js";
9
9
  import "../chunk-W2245F6G.js";
10
10
  import "../chunk-2ESYSVXG.js";
11
11
  export {
@@ -1,4 +1,10 @@
1
1
  import "../../chunk-JVDUSOYG.js";
2
+ import {
3
+ SeededPRNG,
4
+ gauss,
5
+ pick,
6
+ range
7
+ } from "../../chunk-GULDS3VE.js";
2
8
  import {
3
9
  ALLOWED_BRAND_PATHS,
4
10
  CONTRAST_CRITICAL_PATHS,
@@ -18,12 +24,6 @@ import {
18
24
  zodToDefaults,
19
25
  zodToJsonSchemaFor
20
26
  } from "../../chunk-ZZRBKGDA.js";
21
- import {
22
- SeededPRNG,
23
- gauss,
24
- pick,
25
- range
26
- } from "../../chunk-GULDS3VE.js";
27
27
  import {
28
28
  FRAME_BASELINE_WIDTH,
29
29
  frameScale,
@@ -1,4 +1,10 @@
1
1
  import "../chunk-JVDUSOYG.js";
2
+ import {
3
+ SeededPRNG,
4
+ gauss,
5
+ pick,
6
+ range
7
+ } from "../chunk-GULDS3VE.js";
2
8
  import {
3
9
  ALLOWED_BRAND_PATHS,
4
10
  CONTRAST_CRITICAL_PATHS,
@@ -18,12 +24,6 @@ import {
18
24
  zodToDefaults,
19
25
  zodToJsonSchemaFor
20
26
  } from "../chunk-ZZRBKGDA.js";
21
- import {
22
- SeededPRNG,
23
- gauss,
24
- pick,
25
- range
26
- } from "../chunk-GULDS3VE.js";
27
27
  import {
28
28
  FRAME_BASELINE_WIDTH,
29
29
  frameScale,
@@ -8,11 +8,11 @@ import {
8
8
  ProductLaunchTrailer,
9
9
  TerminalToBrowserDeploy,
10
10
  catalog
11
- } from "../chunk-IAQHWJUO.js";
11
+ } from "../chunk-TE3PNQG6.js";
12
+ import "../chunk-QGAWDLYX.js";
12
13
  import "../chunk-S5H6GH6M.js";
13
14
  import "../chunk-QAGGJHAF.js";
14
15
  import "../chunk-MFHXCHRI.js";
15
- import "../chunk-QGAWDLYX.js";
16
16
  import "../chunk-W2245F6G.js";
17
17
  import "../chunk-JBWSK2YD.js";
18
18
  import "../chunk-OBA6NW4S.js";
@@ -21,13 +21,13 @@ import {
21
21
  TrackingIn,
22
22
  Typewriter,
23
23
  catalog
24
- } from "../chunk-ZDL7XEXW.js";
25
- import "../chunk-U4V4FZGE.js";
24
+ } from "../chunk-RBWS5XHE.js";
26
25
  import "../chunk-DLF4WVSE.js";
26
+ import "../chunk-U4V4FZGE.js";
27
27
  import "../chunk-LT4PWSR2.js";
28
28
  import "../chunk-FWSJLHSV.js";
29
- import "../chunk-XHGZ2E77.js";
30
29
  import "../chunk-ZFEXATWN.js";
30
+ import "../chunk-XHGZ2E77.js";
31
31
  import "../chunk-W2245F6G.js";
32
32
  import "../chunk-2ESYSVXG.js";
33
33
  export {
@@ -1,37 +1,37 @@
1
- import {
2
- catalog as catalog6
3
- } from "./chunk-VLJOIUHL.js";
4
- import {
5
- catalog as catalog2
6
- } from "./chunk-WAUVKF2F.js";
7
- import {
8
- catalog as catalog8
9
- } from "./chunk-7SQOXIWR.js";
10
1
  import {
11
2
  catalog as catalog4
12
3
  } from "./chunk-JRJQECCF.js";
13
4
  import {
14
5
  catalog as catalog7
15
- } from "./chunk-IAQHWJUO.js";
16
- import "./chunk-S5H6GH6M.js";
17
- import "./chunk-QAGGJHAF.js";
18
- import "./chunk-MFHXCHRI.js";
6
+ } from "./chunk-TE3PNQG6.js";
19
7
  import {
20
8
  catalog
21
- } from "./chunk-ZDL7XEXW.js";
22
- import "./chunk-U4V4FZGE.js";
9
+ } from "./chunk-RBWS5XHE.js";
23
10
  import "./chunk-DLF4WVSE.js";
24
- import "./chunk-LT4PWSR2.js";
25
- import "./chunk-FWSJLHSV.js";
11
+ import "./chunk-U4V4FZGE.js";
26
12
  import {
27
13
  catalog as catalog3
28
14
  } from "./chunk-FVDFPJHT.js";
29
15
  import "./chunk-QGAWDLYX.js";
16
+ import {
17
+ catalog as catalog6
18
+ } from "./chunk-VLJOIUHL.js";
19
+ import "./chunk-S5H6GH6M.js";
20
+ import "./chunk-QAGGJHAF.js";
30
21
  import {
31
22
  catalog as catalog5
32
23
  } from "./chunk-RAXHCRVV.js";
33
- import "./chunk-XHGZ2E77.js";
24
+ import {
25
+ catalog as catalog2
26
+ } from "./chunk-WAUVKF2F.js";
27
+ import "./chunk-MFHXCHRI.js";
28
+ import {
29
+ catalog as catalog8
30
+ } from "./chunk-RL5SO653.js";
31
+ import "./chunk-LT4PWSR2.js";
32
+ import "./chunk-FWSJLHSV.js";
34
33
  import "./chunk-ZFEXATWN.js";
34
+ import "./chunk-XHGZ2E77.js";
35
35
  import "./chunk-W2245F6G.js";
36
36
  import "./chunk-JBWSK2YD.js";
37
37
  import "./chunk-OBA6NW4S.js";
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  assertCardHtmlAssetFree
3
- } from "../chunk-LEJ5QXHP.js";
4
- import "../chunk-WYKUWRQG.js";
3
+ } from "../chunk-4RREA7VA.js";
4
+ import "../chunk-OSMXQV5V.js";
5
+ import "../chunk-A3MXR6JI.js";
5
6
  import "../chunk-2ESYSVXG.js";
6
7
  export {
7
8
  assertCardHtmlAssetFree
@@ -0,0 +1 @@
1
+ export * from "../_members/render-harness/cardFonts.js";
@@ -0,0 +1,13 @@
1
+ import {
2
+ assertCardFontsAdmitted,
3
+ cardBundledFamilies,
4
+ cardFontFamilyStacks
5
+ } from "../chunk-RAPDICTC.js";
6
+ import "../chunk-A3MXR6JI.js";
7
+ import "../chunk-AVTEPAWI.js";
8
+ import "../chunk-2ESYSVXG.js";
9
+ export {
10
+ assertCardFontsAdmitted,
11
+ cardBundledFamilies,
12
+ cardFontFamilyStacks
13
+ };
@@ -4,7 +4,8 @@ import {
4
4
  assetUrlKey,
5
5
  isRemoteUrl,
6
6
  renderInputAssets
7
- } from "../chunk-MN6D3U5N.js";
7
+ } from "../chunk-KSRFYFUZ.js";
8
+ import "../chunk-OSMXQV5V.js";
8
9
  import "../chunk-7AZLFN26.js";
9
10
  import "../chunk-7PA7FGLD.js";
10
11
  import "../chunk-2ESYSVXG.js";
@@ -1,13 +1,17 @@
1
1
  import {
2
2
  assertCardHtmlAssetFree
3
- } from "./chunk-LEJ5QXHP.js";
3
+ } from "./chunk-4RREA7VA.js";
4
+ import {
5
+ assertCardFontsAdmitted
6
+ } from "./chunk-RAPDICTC.js";
4
7
  import {
5
8
  assertNoRemoteRefs,
6
9
  assetSlots,
7
10
  assetUrlKey,
8
11
  isRemoteUrl,
9
12
  renderInputAssets
10
- } from "./chunk-MN6D3U5N.js";
13
+ } from "./chunk-KSRFYFUZ.js";
14
+ import "./chunk-OSMXQV5V.js";
11
15
  import "./chunk-256ZO323.js";
12
16
  import "./chunk-BVA3537Z.js";
13
17
  import {
@@ -42,17 +46,17 @@ import {
42
46
  parseSceneComponentCaptureIntentV1,
43
47
  prepareSceneShotRenderInput,
44
48
  readSceneShotManifest
45
- } from "./chunk-AZSTZE64.js";
49
+ } from "./chunk-W44ASS4N.js";
46
50
  import "./chunk-QH3YI3ND.js";
47
51
  import "./chunk-QISFYLBB.js";
52
+ import "./chunk-3GNTA646.js";
48
53
  import "./chunk-VZ7TYX6Z.js";
49
- import "./chunk-LLC6TCH5.js";
50
54
  import "./chunk-DENF4TPI.js";
51
55
  import "./chunk-KYRDKK2D.js";
52
56
  import "./chunk-WREYUH2E.js";
53
57
  import {
54
58
  CueframeError
55
- } from "./chunk-WYKUWRQG.js";
59
+ } from "./chunk-A3MXR6JI.js";
56
60
  import "./chunk-7PA7FGLD.js";
57
61
  import {
58
62
  evaluateScene,
@@ -1109,12 +1113,25 @@ var CARD_COMPOSITION_ID = "CueFrameCardStill";
1109
1113
  var CARD_ROOT_FILENAME = "card.Root.local.tsx";
1110
1114
  var CARD_ENTRY_FILENAME = "card.entry.local.tsx";
1111
1115
  function generateCardRootSource(opts) {
1116
+ const fontsModule = JSON.stringify(join6(opts.renderEntryRoot, "src", "fonts"));
1112
1117
  return `// GENERATED by @cueframe/render-harness generateCardRootSource \u2014 DO NOT EDIT.
1113
1118
  import React from 'react';
1114
- import { Composition, AbsoluteFill, getInputProps } from 'remotion';
1119
+ import { Composition, AbsoluteFill, getInputProps, delayRender, continueRender } from 'remotion';
1120
+ import { ensureAllFontsLoaded } from ${fontsModule};
1115
1121
 
1116
1122
  const Card: React.FC = () => {
1117
1123
  const { html, cssVars } = getInputProps() as { html: string; cssVars?: Record<string, string> };
1124
+ // Hold the frame until the faces are registered. Without this the still can be
1125
+ // captured mid-load and fall back to a system face \u2014 the same silent
1126
+ // substitution, just intermittent instead of constant.
1127
+ const [handle] = React.useState(() => delayRender('card-fonts'));
1128
+ React.useEffect(() => {
1129
+ let cancelled = false;
1130
+ ensureAllFontsLoaded()
1131
+ .catch(() => undefined)
1132
+ .then(() => { if (!cancelled) continueRender(handle); });
1133
+ return () => { cancelled = true; };
1134
+ }, [handle]);
1118
1135
  return (
1119
1136
  <AbsoluteFill>
1120
1137
  <div
@@ -1162,7 +1179,11 @@ async function renderCardStill(opts) {
1162
1179
  const renderEntryRoot = resolveRenderEntryRoot(opts.renderEntryRoot);
1163
1180
  const browserExecutable = (await verifyLocalStagedBrowser(renderEntryRoot)).path;
1164
1181
  mkdirSync(opts.outDir, { recursive: true });
1165
- writeFileSync(join6(opts.outDir, CARD_ROOT_FILENAME), generateCardRootSource({ width, height, fps }));
1182
+ assertCardFontsAdmitted(opts.html, "still");
1183
+ writeFileSync(
1184
+ join6(opts.outDir, CARD_ROOT_FILENAME),
1185
+ generateCardRootSource({ width, height, fps, renderEntryRoot })
1186
+ );
1166
1187
  const entryPoint = join6(opts.outDir, CARD_ENTRY_FILENAME);
1167
1188
  writeFileSync(entryPoint, generateCardEntrySource());
1168
1189
  const { bundle } = await importFromRenderEntry(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cueframe/kernel",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "type": "module",
5
5
  "description": "Publish-only aggregate of CueFrame's isomorphic kernel packages — composition, primitives, authoring, MCP, and friends shipped as one npm artifact. Members remain separate workspace packages; this only changes what ships.",
6
6
  "files": [
@@ -16,26 +16,26 @@
16
16
  "devDependencies": {
17
17
  "tsup": "^8.3.5",
18
18
  "typescript": "^5.9.3",
19
+ "@cueframe/account-model": "0.1.0",
19
20
  "@cueframe/animate": "0.1.0",
21
+ "@cueframe/authoring": "0.1.0",
20
22
  "@cueframe/cloud-import": "0.1.0",
21
- "@cueframe/account-model": "0.1.0",
22
- "@cueframe/composition-ops": "0.1.0",
23
23
  "@cueframe/composition": "0.1.0",
24
24
  "@cueframe/compose": "0.1.0",
25
+ "@cueframe/errors": "0.1.0",
25
26
  "@cueframe/director": "0.1.0",
27
+ "@cueframe/composition-ops": "0.1.0",
26
28
  "@cueframe/component-runtime": "0.1.0",
27
29
  "@cueframe/core": "0.1.0",
28
- "@cueframe/mcp": "0.1.0",
30
+ "@cueframe/brand-derivation": "0.1.0",
29
31
  "@cueframe/media-model": "0.1.0",
30
32
  "@cueframe/foundation": "0.1.0",
31
- "@cueframe/errors": "0.1.0",
33
+ "@cueframe/plane": "0.1.0",
32
34
  "@cueframe/nle-export": "0.1.0",
33
- "@cueframe/render-harness": "0.1.0",
34
- "@cueframe/primitives": "0.1.0",
35
+ "@cueframe/mcp": "0.1.0",
35
36
  "@cueframe/perception": "0.1.0",
36
- "@cueframe/authoring": "0.1.0",
37
- "@cueframe/plane": "0.1.0",
38
- "@cueframe/brand-derivation": "0.1.0"
37
+ "@cueframe/render-harness": "0.1.0",
38
+ "@cueframe/primitives": "0.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "gsap": "3.13.0",
@@ -457,6 +457,10 @@
457
457
  "types": "./dist/render-harness/cardAssetAdmission.d.ts",
458
458
  "default": "./dist/render-harness/cardAssetAdmission.js"
459
459
  },
460
+ "./render-harness/cardFonts": {
461
+ "types": "./dist/render-harness/cardFonts.d.ts",
462
+ "default": "./dist/render-harness/cardFonts.js"
463
+ },
460
464
  "./render-harness/renderInputAssets": {
461
465
  "types": "./dist/render-harness/renderInputAssets.d.ts",
462
466
  "default": "./dist/render-harness/renderInputAssets.js"
@@ -1,9 +1,9 @@
1
- import {
2
- TextStage
3
- } from "./chunk-U4V4FZGE.js";
4
1
  import {
5
2
  recolor
6
3
  } from "./chunk-DLF4WVSE.js";
4
+ import {
5
+ TextStage
6
+ } from "./chunk-U4V4FZGE.js";
7
7
  import {
8
8
  resolveTypeface
9
9
  } from "./chunk-LT4PWSR2.js";
@@ -12,15 +12,15 @@ import {
12
12
  FLOOR_TEXT,
13
13
  resolveContrast
14
14
  } from "./chunk-FWSJLHSV.js";
15
- import {
16
- FitText,
17
- resolveFitFontSize
18
- } from "./chunk-XHGZ2E77.js";
19
15
  import {
20
16
  resolveEasing,
21
17
  staggerRise,
22
18
  staggerUp
23
19
  } from "./chunk-ZFEXATWN.js";
20
+ import {
21
+ FitText,
22
+ resolveFitFontSize
23
+ } from "./chunk-XHGZ2E77.js";
24
24
  import {
25
25
  ACCENT,
26
26
  ACCENT_STRONG,
@@ -4,15 +4,15 @@ import {
4
4
  import {
5
5
  resolveContrast
6
6
  } from "./chunk-FWSJLHSV.js";
7
- import {
8
- resolveFitFontSize
9
- } from "./chunk-XHGZ2E77.js";
10
7
  import {
11
8
  fadeProgress,
12
9
  resolveEasing,
13
10
  staggerUp,
14
11
  wordPop
15
12
  } from "./chunk-ZFEXATWN.js";
13
+ import {
14
+ resolveFitFontSize
15
+ } from "./chunk-XHGZ2E77.js";
16
16
 
17
17
  // ../execution/primitives/src/hero-text/HeroText.tsx
18
18
  import { useCurrentFrame, useVideoConfig } from "remotion";
@@ -1,3 +1,7 @@
1
+ import {
2
+ frostedGlassWipe,
3
+ spatialPush
4
+ } from "./chunk-QGAWDLYX.js";
1
5
  import {
2
6
  DashboardPopulate
3
7
  } from "./chunk-S5H6GH6M.js";
@@ -7,10 +11,6 @@ import {
7
11
  import {
8
12
  EASING_BY_INTENT
9
13
  } from "./chunk-MFHXCHRI.js";
10
- import {
11
- frostedGlassWipe,
12
- spatialPush
13
- } from "./chunk-QGAWDLYX.js";
14
14
  import {
15
15
  ACCENT,
16
16
  ACCENT_SOFT,