openvideo 0.2.8 → 0.2.10

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.
@@ -30,6 +30,7 @@ interface BaseClipJSON {
30
30
  };
31
31
  transition?: ITransitionInfo;
32
32
  style?: any;
33
+ locked?: boolean;
33
34
  animation?: {
34
35
  keyFrames: Record<string, Partial<{
35
36
  x: number;
@@ -23,6 +23,7 @@ export interface BaseSpriteEvents {
23
23
  opacity: number;
24
24
  volume: number;
25
25
  animations: IAnimation[];
26
+ locked: boolean;
26
27
  }>;
27
28
  [key: string]: any;
28
29
  [key: symbol]: any;
@@ -127,6 +128,12 @@ export declare abstract class BaseSprite<T extends BaseSpriteEvents = BaseSprite
127
128
  */
128
129
  get volume(): number;
129
130
  set volume(v: number);
131
+ private _locked;
132
+ /**
133
+ * Whether the sprite is locked (preventing interactions)
134
+ */
135
+ get locked(): boolean;
136
+ set locked(v: boolean);
130
137
  /**
131
138
  * Flip clip horizontally or vertically
132
139
  */
@@ -20,6 +20,14 @@ export declare class SelectionManager {
20
20
  private onStagePointerDown;
21
21
  private onStagePointerMove;
22
22
  private onStagePointerUp;
23
+ /**
24
+ * Find clips that intersect with the given selection rectangle
25
+ */
26
+ private getIntersectingClips;
27
+ /**
28
+ * Update the transformer to show a preview of what will be selected
29
+ */
30
+ private updatePreviewSelection;
23
31
  /**
24
32
  * Setup sprite interactivity for click selection
25
33
  */
@@ -40,7 +48,7 @@ export declare class SelectionManager {
40
48
  deselectClip(): void;
41
49
  move(dx: number, dy: number): Promise<void>;
42
50
  clear(): void;
43
- private recreateTransformer;
51
+ recreateTransformer(): void;
44
52
  private destroyTransformer;
45
53
  private createTransformer;
46
54
  private syncSelectedClipsTransformsRealtime;
package/dist/studio.d.ts CHANGED
@@ -67,6 +67,10 @@ export interface StudioEvents {
67
67
  "clip:updated": {
68
68
  clip: IClip;
69
69
  };
70
+ "clip:lock-changed": {
71
+ clip: IClip;
72
+ locked: boolean;
73
+ };
70
74
  "clip:replaced": {
71
75
  oldClip: IClip;
72
76
  newClip: IClip;
@@ -90,6 +94,12 @@ export interface StudioEvents {
90
94
  canUndo: boolean;
91
95
  canRedo: boolean;
92
96
  };
97
+ "transform:start": {
98
+ transformer: Transformer;
99
+ };
100
+ "transform:end": {
101
+ transformer: Transformer;
102
+ };
93
103
  [key: string]: any;
94
104
  [key: symbol]: any;
95
105
  }
@@ -378,6 +388,10 @@ export declare class Studio extends EventEmitter<StudioEvents> {
378
388
  * Deselect the current clip and hide transform controls
379
389
  */
380
390
  deselectClip(): void;
391
+ /**
392
+ * Toggle lock state of a clip
393
+ */
394
+ lockClip(clipId: string, locked: boolean): Promise<void>;
381
395
  /**
382
396
  * Export current studio state to JSON
383
397
  * @param sourceUrlMap Optional map of clips to their source URLs (required for proper serialization)
@@ -15,6 +15,7 @@ export declare class Transformer extends Container {
15
15
  clip?: any;
16
16
  artboardWidth?: number;
17
17
  artboardHeight?: number;
18
+ locked?: boolean;
18
19
  };
19
20
  constructor(opts: {
20
21
  group: Container[];
@@ -22,6 +23,7 @@ export declare class Transformer extends Container {
22
23
  clip?: any;
23
24
  artboardWidth?: number;
24
25
  artboardHeight?: number;
26
+ locked?: boolean;
25
27
  });
26
28
  /**
27
29
  * Immediately initialize bounds and show transformer.
@@ -1,4 +1,4 @@
1
- import { e as a, R as e, T as d, G as i, b as s, M as t, c as p, d as P, f as n, g as r, B as T, H as l, h as c, i as m, N as x, j as S, k as o } from "./index-DoARYsuw.js";
1
+ import { e as a, R as e, T as d, G as i, b as s, M as t, c as p, d as P, f as n, g as r, B as T, H as l, h as c, i as m, N as x, j as S, k as o } from "./index-56Xwic2v.js";
2
2
  a.add(e);
3
3
  a.add(d);
4
4
  a.add(i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openvideo",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Video rendering and processing library",
5
5
  "type": "module",
6
6
  "publishConfig": {