@viji-dev/core 0.11.6 → 0.11.8

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.
package/dist/docs-api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export const docsApi = {
2
2
  "version": "1.1.0",
3
- "coreVersion": "0.11.6",
4
- "generatedAt": "2026-07-24T10:51:17.968Z",
3
+ "coreVersion": "0.11.8",
4
+ "generatedAt": "2026-08-06T16:39:30.974Z",
5
5
  "navigation": [
6
6
  {
7
7
  "id": "getting-started",
@@ -1,4 +1,4 @@
1
- import { g as kn } from "./index-BKvsDqj0.js";
1
+ import { g as kn } from "./index-fdus0y3o.js";
2
2
  function jn(Oe, ot) {
3
3
  for (var ve = 0; ve < ot.length; ve++) {
4
4
  const Z = ot[ve];
@@ -3374,4 +3374,4 @@ const xn = /* @__PURE__ */ kn(yi), Ln = /* @__PURE__ */ jn({
3374
3374
  export {
3375
3375
  Ln as e
3376
3376
  };
3377
- //# sourceMappingURL=essentia-wasm.web-B5WvSGTX.js.map
3377
+ //# sourceMappingURL=essentia-wasm.web-B48G7Mzk.js.map
@@ -547,7 +547,7 @@ class lB {
547
547
  }
548
548
  }
549
549
  }
550
- const nB = "" + new URL("assets/viji.worker-Bu5UOGpW.js", import.meta.url).href;
550
+ const nB = "" + new URL("assets/viji.worker-B1ltcEP7.js", import.meta.url).href;
551
551
  class dB {
552
552
  constructor(A, B, I) {
553
553
  this.iframeManager = A, this.sceneCode = B, this.init = I;
@@ -792,6 +792,7 @@ class dB {
792
792
  Q
793
793
  );
794
794
  }
795
+ else B.data?.bitmap instanceof ImageBitmap && B.data.bitmap.close();
795
796
  }, this.iframeManager.onWorkerMessage(this.onWorkerMessageBound);
796
797
  }
797
798
  }
@@ -1518,7 +1519,7 @@ class HB {
1518
1519
  if (!this.isInitialized)
1519
1520
  return this.initPromise ? this.initPromise : (this.initPromise = (async () => {
1520
1521
  try {
1521
- const A = await import("./essentia.js-core.es-CC_3Ap1i.js"), B = await import("./essentia-wasm.web-B5WvSGTX.js").then((g) => g.e), I = A.Essentia || A.default?.Essentia || A.default;
1522
+ const A = await import("./essentia.js-core.es-CC_3Ap1i.js"), B = await import("./essentia-wasm.web-B48G7Mzk.js").then((g) => g.e), I = A.Essentia || A.default?.Essentia || A.default;
1522
1523
  let Q = B.default || B.EssentiaWASM || B.default?.EssentiaWASM;
1523
1524
  if (!Q)
1524
1525
  throw new Error("WASM module not found - check essentia-wasm.web.js export");
@@ -9834,7 +9835,8 @@ class rA {
9834
9835
  format: B,
9835
9836
  type: B === "blob" ? A.type : void 0,
9836
9837
  quality: B === "blob" ? A.quality : void 0,
9837
- resolution: A.resolution
9838
+ resolution: A.resolution,
9839
+ frame: A.frame
9838
9840
  }, 1e4);
9839
9841
  return B === "bitmap" ? I.bitmap : I.blob;
9840
9842
  }
@@ -9862,11 +9864,17 @@ class rA {
9862
9864
  /**
9863
9865
  * Enable auto-capture. Captured frames are retrieved via getLatestFrame().
9864
9866
  * @param format.flipY — true for WebGL texture consumers, false for 2D canvas drawImage.
9867
+ * @param format.frame — frame role: `'plate'` (default) captures the clean
9868
+ * pre-overlay frame (thumbnails, VJ sources); `'display'` captures the
9869
+ * composited frame the viewer sees, including the branding overlay when the
9870
+ * session applies it. Headless cores degrade `'display'` to `'plate'`.
9871
+ * Omitting the field on a re-enable keeps the previously set role.
9865
9872
  */
9866
9873
  enableAutoCapture(A) {
9867
9874
  this.autoCaptureEnabled = !0, this.workerManager && this.workerManager.postMessage("enable-auto-capture", {
9868
9875
  enabled: !0,
9869
- flipY: A?.flipY
9876
+ flipY: A?.flipY,
9877
+ frame: A?.frame
9870
9878
  });
9871
9879
  const B = A ? ` with flipY=${A.flipY}` : "";
9872
9880
  this.debugLog(`[AutoCapture] ENABLED${B}`);
@@ -11624,7 +11632,7 @@ function HI(D) {
11624
11632
  expectedVersion: 1
11625
11633
  } : typeof A.senderTime != "number" ? { code: "invalid-field", details: "senderTime must be a number", field: "senderTime" } : null;
11626
11634
  }
11627
- const mI = "0.11.6";
11635
+ const mI = "0.11.8";
11628
11636
  export {
11629
11637
  eA as A,
11630
11638
  LI as C,
@@ -11635,4 +11643,4 @@ export {
11635
11643
  J as c,
11636
11644
  gI as g
11637
11645
  };
11638
- //# sourceMappingURL=index-BKvsDqj0.js.map
11646
+ //# sourceMappingURL=index-fdus0y3o.js.map
package/dist/index.d.ts CHANGED
@@ -930,6 +930,16 @@ export declare interface CaptureFrameOptions {
930
930
  * canvas, the source is center-cropped before scaling.
931
931
  */
932
932
  resolution?: number | Resolution;
933
+ /**
934
+ * Frame role to capture. `'plate'` (default) captures the clean pre-overlay
935
+ * frame — thumbnails and VJ source frames, identical to previous behavior.
936
+ * `'display'` captures the composited frame the viewer sees, including the
937
+ * branding overlay when the session applies it. On headless cores no
938
+ * overlay is ever drawn, so `'display'` degrades to `'plate'`. Note:
939
+ * center-cropping via `resolution` can crop the edge-anchored overlay out
940
+ * of a `'display'` capture — display captures are intended at canvas aspect.
941
+ */
942
+ frame?: 'plate' | 'display';
933
943
  }
934
944
 
935
945
  /**
@@ -2861,7 +2871,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
2861
2871
  /** Returned by `on*` listener registration calls; invoke to unsubscribe. */
2862
2872
  export declare type Unsubscribe = () => void;
2863
2873
 
2864
- export declare const VERSION = "0.11.6";
2874
+ export declare const VERSION = "0.11.8";
2865
2875
 
2866
2876
  /**
2867
2877
  * Real-time video API: drawable frame, dimensions, and the source-side
@@ -3269,6 +3279,21 @@ export declare class VijiCore {
3269
3279
  /**
3270
3280
  * Capture current scene frame
3271
3281
  * @param options.format 'blob' = encoded image, 'bitmap' = GPU-friendly ImageBitmap
3282
+ *
3283
+ * Readiness: the request queues in the worker and drains in the
3284
+ * post-render slot of the first tick where artist drawing code dispatched
3285
+ * cleanly against a canvas with a rendering context. Ticks where the scene
3286
+ * is still in async setup, a shader is compiling, p5 is initializing, or
3287
+ * the render threw are skipped — so `captureFrame` right after
3288
+ * `initialize()` waits for the scene's first real frame instead of
3289
+ * snapshotting a pre-first-paint canvas. The gate is per-tick, not
3290
+ * latched: on a live scene whose render is transiently throwing, the
3291
+ * capture holds until the next clean tick. This is an engine-readiness
3292
+ * gate, not a content guarantee — pixel output is never inspected, so a
3293
+ * scene whose render runs but draws nothing (or draws black) captures
3294
+ * exactly that. A scene that never reaches a clean painted tick (broken
3295
+ * code, render throwing persistently) rejects with `MESSAGE_TIMEOUT`
3296
+ * after 10s.
3272
3297
  */
3273
3298
  captureFrame(options: {
3274
3299
  format: 'bitmap';
@@ -3291,9 +3316,15 @@ export declare class VijiCore {
3291
3316
  /**
3292
3317
  * Enable auto-capture. Captured frames are retrieved via getLatestFrame().
3293
3318
  * @param format.flipY — true for WebGL texture consumers, false for 2D canvas drawImage.
3319
+ * @param format.frame — frame role: `'plate'` (default) captures the clean
3320
+ * pre-overlay frame (thumbnails, VJ sources); `'display'` captures the
3321
+ * composited frame the viewer sees, including the branding overlay when the
3322
+ * session applies it. Headless cores degrade `'display'` to `'plate'`.
3323
+ * Omitting the field on a re-enable keeps the previously set role.
3294
3324
  */
3295
3325
  enableAutoCapture(format?: {
3296
3326
  flipY: boolean;
3327
+ frame?: 'plate' | 'display';
3297
3328
  }): void;
3298
3329
  /**
3299
3330
  * Disable auto-capture and release any pending frame buffer.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, C as i, I as r, V as o, a as C, c as E, b as A } from "./index-BKvsDqj0.js";
1
+ import { A as e, C as i, I as r, V as o, a as C, c as E, b as A } from "./index-fdus0y3o.js";
2
2
  export {
3
3
  e as AudioSystem,
4
4
  i as CV_FEATURE_KEYS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/core",
3
- "version": "0.11.6",
3
+ "version": "0.11.8",
4
4
  "description": "Universal execution engine for Viji Creative scenes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",