@viji-dev/core 0.11.3 → 0.11.5

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
@@ -1,3 +1,37 @@
1
+ /**
2
+ * Analyzes a scene's source code and returns the capabilities it declares,
3
+ * without constructing a core. Composes {@link SceneAnalyzer.detectRendererType}
4
+ * and {@link SceneAnalyzer.detectCapabilities} — the same two steps `VijiCore`
5
+ * performs at construction — so for a given core version the result is
6
+ * identical to a booted core's `getSceneData().capabilities`.
7
+ *
8
+ * Intended for out-of-engine consumers (e.g. server-side persistence of
9
+ * per-scene capabilities). The following properties are an intentional, kept
10
+ * contract:
11
+ * - **Pure and Node-safe** — static analysis only; the scene is never executed
12
+ * and no DOM, canvas, or worker API is touched. Callable in a bare Node
13
+ * process.
14
+ * - **Deterministic** — same code string, same result, within a core version.
15
+ * - **Inclusive-biased** — a capability the scene uses is never hidden; a
16
+ * rare ambiguous case may report an extra one.
17
+ * - **Safe on untrusted input** — linear-time scan and regexes with no throw
18
+ * paths on any string input.
19
+ *
20
+ * Note for consumers filtering on `video`: the flag means the scene reads the
21
+ * video *image* (pixels/texture). Shader scenes that consume only CV result
22
+ * uniforms report `cv.*` without `video`, so a "reacts to the camera" filter
23
+ * should test `video || any cv key`.
24
+ *
25
+ * @param sceneCode - The artist's scene code (native, p5, or shader)
26
+ * @returns The set of capabilities the scene declares it uses
27
+ * @example
28
+ * ```ts
29
+ * const caps = analyzeSceneCapabilities(scene.code);
30
+ * if (caps.audio) tags.push('audio');
31
+ * ```
32
+ */
33
+ export declare function analyzeSceneCapabilities(sceneCode: string): SceneCapabilities;
34
+
1
35
  declare interface AudioAnalysisState {
2
36
  isConnected: boolean;
3
37
  currentBPM: number;
@@ -2798,7 +2832,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
2798
2832
  /** Returned by `on*` listener registration calls; invoke to unsubscribe. */
2799
2833
  export declare type Unsubscribe = () => void;
2800
2834
 
2801
- export declare const VERSION = "0.11.3";
2835
+ export declare const VERSION = "0.11.5";
2802
2836
 
2803
2837
  /**
2804
2838
  * Real-time video API: drawable frame, dimensions, and the source-side
@@ -2985,13 +3019,13 @@ export declare interface VideoCVAPI {
2985
3019
  }
2986
3020
 
2987
3021
  /**
2988
- * Video stream categorization type
2989
- * - main: Primary video with CV processing (viji.video)
2990
- * - additional: Host-provided MediaStreams without CV (viji.videoStreams[])
2991
- * - directFrame: Injected frames from compositor pipeline (viji.videoStreams[], after additional)
2992
- * - device: Device-provided camera streams (device.video)
3022
+ * Video stream role, derived from position in the index contract.
3023
+ * - main: primary video with CV (`viji.video`)
3024
+ * - additional: host-provided MediaStreams, no CV (`viji.videoStreams[]`)
3025
+ * - device: device camera streams (`viji.devices[].video`)
3026
+ * - directFrame: injected compositor frames (`viji.videoStreams[]`, after additional)
2993
3027
  */
2994
- export declare type VideoStreamType = 'main' | 'additional' | 'directFrame' | 'device';
3028
+ export declare type VideoStreamType = 'main' | 'additional' | 'device' | 'directFrame';
2995
3029
 
2996
3030
  /**
2997
3031
  * The Viji API surface available to artist code as the global `viji` object.
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
- import { A as s, C as o, I as E, V as i, a as A, b as C } from "./index-BzkVQgrq.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-CFKPh6Ia.js";
2
2
  export {
3
- s as AudioSystem,
4
- o as CV_FEATURE_KEYS,
5
- E as INPUT_CAPABILITY_KEYS,
6
- i as VERSION,
7
- A as VijiCore,
8
- C as VijiCoreError
3
+ e as AudioSystem,
4
+ i as CV_FEATURE_KEYS,
5
+ r as INPUT_CAPABILITY_KEYS,
6
+ o as VERSION,
7
+ C as VijiCore,
8
+ E as VijiCoreError,
9
+ A as analyzeSceneCapabilities
9
10
  };
10
11
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/core",
3
- "version": "0.11.3",
3
+ "version": "0.11.5",
4
4
  "description": "Universal execution engine for Viji Creative scenes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",