@designcombo/video 0.0.3 → 0.0.4

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.
@@ -1,4 +1,4 @@
1
- import { F as Ie, u as Ee, l as se, M as v, G as De, v as Oe, S as Fe, x as ae, E as u, e as D, y as S, z as Le, H as O, I as b, R as F, J as ne, K as He, t as m, b as f, i as B, w as L, L as K, N as We, c as Y, B as y, j as U, O as ze, Q as C, k as M, V as w, W as Ve, a as Ne, X as ie, Y as oe, Z as le, _ as ue, C as P, $ as je, a0 as A, a1 as J, D as H, a2 as $e, a3 as qe, P as Ke, d as Ye, T as X, a4 as Q, a5 as Je, a6 as Xe, a7 as Qe } from "./index-BVO9qrk3.js";
1
+ import { F as Ie, u as Ee, l as se, M as v, G as De, v as Oe, S as Fe, x as ae, E as u, e as D, y as S, z as Le, H as O, I as b, R as F, J as ne, K as He, t as m, b as f, i as B, w as L, L as K, N as We, c as Y, B as y, j as U, O as ze, Q as C, k as M, V as w, W as Ve, a as Ne, X as ie, Y as oe, Z as le, _ as ue, C as P, $ as je, a0 as A, a1 as J, D as H, a2 as $e, a3 as qe, P as Ke, d as Ye, T as X, a4 as Q, a5 as Je, a6 as Xe, a7 as Qe } from "./index-CZk_O50g.js";
2
2
  import { B as de, c as Ze } from "./colorToUniform-C2jGzNe1.js";
3
3
  var et = `in vec2 vMaskCoord;
4
4
  in vec2 vTextureCoord;
@@ -1,6 +1,6 @@
1
- import { S as G, E as d, B as v, w as m, D as S, L as j, v as ve, s as U, t as b, a8 as Be, k as K, a9 as Ae, b as p, V as L, j as B, i as A, l as F, M as $, aa as z, ab as Ne, ac as ye, ad as Y, ae as Ce, A as De, R as Ie, e as T } from "./index-BVO9qrk3.js";
1
+ import { S as G, E as d, B as v, w as m, D as S, L as j, v as ve, s as U, t as b, a8 as Be, k as K, a9 as Ae, b as p, V as L, j as B, i as A, l as F, M as $, aa as z, ab as Ne, ac as ye, ad as Y, ae as Ce, A as De, R as Ie, e as T } from "./index-CZk_O50g.js";
2
2
  import { b as q } from "./colorToUniform-C2jGzNe1.js";
3
- import { e as Ge, G as Ue, c as Fe, b as Oe, U as Pe, R as Me, B as Z, d as N, f as Le, S as He, a as we } from "./SharedSystems-s9Js69L7.js";
3
+ import { e as Ge, G as Ue, c as Fe, b as Oe, U as Pe, R as Me, B as Z, d as N, f as Le, S as He, a as we } from "./SharedSystems-Cv0Hv-t_.js";
4
4
  class Q {
5
5
  constructor() {
6
6
  this._tempState = G.for2d(), this._didUploadHash = {};
@@ -1,6 +1,6 @@
1
- import { S as E, g as A, E as p, f as ae, D as S, b as C, B as T, c as ue, d as L, h as M, w as v, i as x, j as ce, k as de, l as k, m as w, M as D, n as H, o as he, p as pe, q as z, s as F, t as R, A as le, R as fe, e as B } from "./index-BVO9qrk3.js";
1
+ import { S as E, g as A, E as p, f as ae, D as S, b as C, B as T, c as ue, d as L, h as M, w as v, i as x, j as ce, k as de, l as k, m as w, M as D, n as H, o as he, p as pe, q as z, s as F, t as R, A as le, R as fe, e as B } from "./index-CZk_O50g.js";
2
2
  import { l as ge, a as me } from "./colorToUniform-C2jGzNe1.js";
3
- import { c as _e, u as be, U as xe, B as ye, G as Ge, e as Se, R as Be, t as Pe, S as Te, a as Ce } from "./SharedSystems-s9Js69L7.js";
3
+ import { c as _e, u as be, U as xe, B as ye, G as Ge, e as Se, R as Be, t as Pe, S as Te, a as Ce } from "./SharedSystems-Cv0Hv-t_.js";
4
4
  const y = E.for2d();
5
5
  class O {
6
6
  start(e, t, r) {
@@ -1,5 +1,5 @@
1
- import { T as M, U as Z, P as m, r as te, E as y, a as ie, w as g, e as P, C as V } from "./index-BVO9qrk3.js";
2
- import "./webworkerAll-zvzmYHny.js";
1
+ import { T as M, U as Z, P as m, r as te, E as y, a as ie, w as g, e as P, C as V } from "./index-CZk_O50g.js";
2
+ import "./webworkerAll-C-9pdN3u.js";
3
3
  class q {
4
4
  constructor(e) {
5
5
  this._lastTransform = "", this._observer = null, this._tickerAttached = !1, this.updateTranslation = () => {
@@ -48,9 +48,6 @@ export declare class AudioClip extends BaseClip implements IPlaybackCapable {
48
48
  * Whether to loop the audio (hybrid JSON structure)
49
49
  */
50
50
  loop: boolean;
51
- /**
52
- * Audio volume level (0-1) (hybrid JSON structure)
53
- */
54
51
  /**
55
52
  * Load an audio clip from a URL
56
53
  * @param url Audio URL
@@ -1,5 +1,5 @@
1
1
  import { BaseSprite } from '../sprite/base-sprite';
2
- import { IClip, IClipMeta } from './iclip';
2
+ import { IClip, IClipMeta, ITransitionInfo } from './iclip';
3
3
  import { ClipJSON } from '../json-serialization';
4
4
  /**
5
5
  * Base class for all clips that extends BaseSprite
@@ -15,6 +15,10 @@ export declare abstract class BaseClip extends BaseSprite implements IClip {
15
15
  * Used for serialization and reloading from JSON
16
16
  */
17
17
  src: string;
18
+ /**
19
+ * Transition info (optional)
20
+ */
21
+ transition?: ITransitionInfo;
18
22
  abstract tick(time: number): Promise<{
19
23
  video?: VideoFrame | ImageBitmap | null;
20
24
  audio?: Float32Array[];
@@ -209,8 +209,8 @@ export declare class CaptionClip extends BaseClip implements IClip {
209
209
  color: string | number;
210
210
  alpha: number;
211
211
  blur: number;
212
- offsetX: number;
213
- offsetY: number;
212
+ distance: number;
213
+ angle: number;
214
214
  } | undefined;
215
215
  };
216
216
  /**
@@ -30,4 +30,8 @@ export declare class EffectClip extends BaseClip {
30
30
  }>;
31
31
  split(_time: number): Promise<[this, this]>;
32
32
  toJSON(main?: boolean): any;
33
+ /**
34
+ * Create an EffectClip instance from a JSON object
35
+ */
36
+ static fromObject(json: any): Promise<EffectClip>;
33
37
  }
@@ -4,6 +4,16 @@ export interface IClipMeta {
4
4
  height: number;
5
5
  duration: number;
6
6
  }
7
+ export interface ITransitionInfo {
8
+ name: string;
9
+ duration: number;
10
+ textureUrl?: string;
11
+ prevClipId?: string;
12
+ fromClipId?: string;
13
+ toClipId?: string;
14
+ start?: number;
15
+ end?: number;
16
+ }
7
17
  /**
8
18
  * Interface that all clips must implement
9
19
  *
@@ -69,6 +79,14 @@ export interface IClip extends Omit<BaseSprite, 'destroy' | 'ready'> {
69
79
  * @param renderer The PixiJS renderer to use
70
80
  */
71
81
  setRenderer?(renderer: any): void;
82
+ /**
83
+ * Transition info (optional)
84
+ */
85
+ transition?: ITransitionInfo;
86
+ /**
87
+ * Audio volume level (0-1)
88
+ */
89
+ volume: number;
72
90
  }
73
91
  /**
74
92
  * Optional interface for clips that support HTML media element playback
@@ -7,3 +7,4 @@ export { VideoClip } from './video-clip';
7
7
  export type { IMP4ClipOpts } from './video-clip';
8
8
  export * from './text-clip';
9
9
  export * from './effect-clip';
10
+ export * from './transition-clip';
@@ -58,6 +58,15 @@ export interface ITextClipOpts {
58
58
  * @default 'left'
59
59
  */
60
60
  align?: 'left' | 'center' | 'right';
61
+ /**
62
+ * Alias for align to match UI property naming
63
+ */
64
+ textAlign?: 'left' | 'center' | 'right';
65
+ /**
66
+ * Vertical alignment ('top', 'center', 'bottom')
67
+ * @default 'top'
68
+ */
69
+ verticalAlign?: 'top' | 'center' | 'bottom' | 'underline' | 'overline' | 'strikethrough';
61
70
  /**
62
71
  * Drop shadow configuration
63
72
  */
@@ -126,58 +135,37 @@ export declare class TextClip extends BaseClip {
126
135
  width: number;
127
136
  height: number;
128
137
  };
138
+ get width(): number;
139
+ set width(v: number);
140
+ get height(): number;
141
+ set height(v: number);
142
+ private _text;
129
143
  /**
130
144
  * Text content (hybrid JSON structure)
131
145
  */
132
- text: string;
146
+ get text(): string;
147
+ set text(v: string);
133
148
  /**
134
149
  * Text styling (hybrid JSON structure)
135
150
  * Provides direct access to styling properties
136
151
  */
137
- get style(): {
138
- fontSize: number | undefined;
139
- fontFamily: string | undefined;
140
- fontWeight: string | undefined;
141
- fontStyle: string | undefined;
142
- color: string | number | {
143
- type: "gradient";
144
- x0: number;
145
- y0: number;
146
- x1: number;
147
- y1: number;
148
- colors: Array<{
149
- ratio: number;
150
- color: string | number;
151
- }>;
152
- } | undefined;
153
- align: "center" | "left" | "right" | undefined;
154
- stroke: {
155
- color: string | number;
156
- width: number;
157
- join: "round" | "miter" | "bevel" | undefined;
158
- cap: "round" | "butt" | "square" | undefined;
159
- miterLimit: number | undefined;
160
- } | {
161
- color: string | number;
162
- width: number;
163
- join?: undefined;
164
- cap?: undefined;
165
- miterLimit?: undefined;
166
- } | undefined;
167
- shadow: {
168
- color: string | number;
169
- alpha: number;
170
- blur: number;
171
- offsetX: number;
172
- offsetY: number;
173
- } | undefined;
174
- wordWrap: boolean | undefined;
175
- wordWrapWidth: number | undefined;
176
- lineHeight: number | undefined;
177
- letterSpacing: number | undefined;
178
- textCase: "title" | "none" | "uppercase" | "lowercase" | undefined;
179
- textDecoration: "none" | "underline" | "line-through" | "overline" | undefined;
180
- };
152
+ get style(): any;
153
+ set style(opts: Partial<ITextClipOpts>);
154
+ /**
155
+ * Text alignment proxy for compatibility with UI
156
+ */
157
+ get textAlign(): 'left' | 'center' | 'right';
158
+ set textAlign(v: 'left' | 'center' | 'right');
159
+ /**
160
+ * Vertical alignment or decoration proxy
161
+ */
162
+ get verticalAlign(): string;
163
+ set verticalAlign(v: string);
164
+ /**
165
+ * Text case proxy
166
+ */
167
+ get textCase(): string;
168
+ set textCase(v: 'none' | 'uppercase' | 'lowercase' | 'title');
181
169
  private pixiText;
182
170
  private textStyle;
183
171
  private renderTexture;
@@ -0,0 +1,37 @@
1
+ import { BaseClip } from './base-clip';
2
+ import { IClip } from './iclip';
3
+ import { TransitionKey } from '../transition/glsl/gl-transition';
4
+ export declare class TransitionClip extends BaseClip {
5
+ readonly type = "Transition";
6
+ ready: IClip['ready'];
7
+ private _meta;
8
+ get meta(): {
9
+ duration: number;
10
+ width: number;
11
+ height: number;
12
+ };
13
+ /**
14
+ * Unique identifier for this clip instance
15
+ */
16
+ id: string;
17
+ /**
18
+ * The transition configuration
19
+ */
20
+ transitionEffect: {
21
+ id: string;
22
+ key: TransitionKey;
23
+ name: string;
24
+ };
25
+ constructor(transitionKey: TransitionKey);
26
+ clone(): Promise<this>;
27
+ tick(_time: number): Promise<{
28
+ video: ImageBitmap | undefined;
29
+ state: 'success';
30
+ }>;
31
+ split(_time: number): Promise<[this, this]>;
32
+ toJSON(main?: boolean): any;
33
+ /**
34
+ * Create a TransitionClip instance from a JSON object
35
+ */
36
+ static fromObject(json: any): Promise<TransitionClip>;
37
+ }
@@ -127,8 +127,6 @@ export declare class VideoClip extends BaseClip implements IPlaybackCapable {
127
127
  height?: number;
128
128
  }): Promise<VideoClip>;
129
129
  constructor(source: OPFSToolFile | ReadableStream<Uint8Array> | MPClipCloneArgs, opts?: IMP4ClipOpts, src?: string);
130
- set volume(v: number);
131
- get volume(): number;
132
130
  /**
133
131
  * Intercept data returned by {@link VideoClip.tick} method for secondary processing of image and audio data
134
132
  * @param time Time when tick was called