@viji-dev/core 0.3.16 → 0.3.18

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/index.d.ts CHANGED
@@ -1374,6 +1374,17 @@ export declare class VijiCore {
1374
1374
  * Get current debug mode status
1375
1375
  */
1376
1376
  getDebugMode(): boolean;
1377
+ /**
1378
+ * Show the core's iframe (make it visible in the host container).
1379
+ * No-op for headless cores.
1380
+ */
1381
+ show(): void;
1382
+ /**
1383
+ * Hide the core's iframe (keep rendering but invisible).
1384
+ * Useful for create-in-background, reveal-when-ready patterns.
1385
+ * No-op for headless cores.
1386
+ */
1387
+ hide(): void;
1377
1388
  /**
1378
1389
  * Select audio analysis backend
1379
1390
  */
@@ -1460,7 +1471,24 @@ export declare class VijiCore {
1460
1471
  */
1461
1472
  injectTouchEvent(data: TouchEventData): void;
1462
1473
  /**
1463
- * Inject frames directly (compositor pipeline)
1474
+ * Worker-side stream index offset for direct frame slots.
1475
+ * Accounts for main video stream and additional media streams.
1476
+ */
1477
+ private get directFrameStartIndex();
1478
+ /**
1479
+ * Ensure the worker has enough direct frame slots prepared.
1480
+ * Auto-grows as needed; skips if already sufficient.
1481
+ */
1482
+ private ensureDirectFrameSlots;
1483
+ /**
1484
+ * Inject a single frame into a specific direct-frame stream slot.
1485
+ * Allows independent per-stream updates (e.g. during source hot-swap).
1486
+ * Auto-prepares slots as needed. Transfers ownership of the bitmap (zero-copy).
1487
+ */
1488
+ injectFrame(bitmap: ImageBitmap, streamIndex: number): void;
1489
+ /**
1490
+ * Inject frames for all direct-frame stream slots at once (compositor pipeline).
1491
+ * Auto-prepares slots on first call. Transfers ownership of all bitmaps (zero-copy).
1464
1492
  */
1465
1493
  injectFrames(bitmaps: ImageBitmap[]): void;
1466
1494
  /**
@@ -1907,6 +1935,8 @@ export declare interface VijiCoreConfig {
1907
1935
  allowUserInteraction?: boolean;
1908
1936
  /** Enable device sensor APIs (motion, orientation) */
1909
1937
  allowDeviceInteraction?: boolean;
1938
+ /** Start with iframe hidden (default: true). Use show()/hide() to toggle visibility. */
1939
+ visible?: boolean;
1910
1940
  }
1911
1941
 
1912
1942
  export declare class VijiCoreError extends Error {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, V, a, b } from "./index-CcPOjcNA.js";
1
+ import { A, V, a, b } from "./index-BSQyI1F-.js";
2
2
  export {
3
3
  A as AudioSystem,
4
4
  V as VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/core",
3
- "version": "0.3.16",
3
+ "version": "0.3.18",
4
4
  "description": "Universal execution engine for Viji Creative scenes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",