@happyvertical/smrt-video 0.51.32 → 0.51.34
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/__smrt-register__.d.ts +2 -0
- package/dist/__smrt-register__.d.ts.map +1 -0
- package/dist/character-asset.d.ts +22 -0
- package/dist/character-asset.d.ts.map +1 -0
- package/dist/character-assets.d.ts +11 -0
- package/dist/character-assets.d.ts.map +1 -0
- package/dist/character-owned-asset.d.ts +19 -0
- package/dist/character-owned-asset.d.ts.map +1 -0
- package/dist/character.d.ts +152 -0
- package/dist/character.d.ts.map +1 -0
- package/dist/characters.d.ts +23 -0
- package/dist/characters.d.ts.map +1 -0
- package/dist/composite-job.d.ts +89 -0
- package/dist/composite-job.d.ts.map +1 -0
- package/dist/index.d.ts +58 -1283
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/media-bundle-persistence.d.ts +2 -0
- package/dist/media-bundle-persistence.d.ts.map +1 -0
- package/dist/owned-asset-utils.d.ts +24 -0
- package/dist/owned-asset-utils.d.ts.map +1 -0
- package/dist/performer-asset.d.ts +22 -0
- package/dist/performer-asset.d.ts.map +1 -0
- package/dist/performer-assets.d.ts +11 -0
- package/dist/performer-assets.d.ts.map +1 -0
- package/dist/performer-owned-asset.d.ts +19 -0
- package/dist/performer-owned-asset.d.ts.map +1 -0
- package/dist/performer.d.ts +117 -0
- package/dist/performer.d.ts.map +1 -0
- package/dist/personality-profile.d.ts +10 -0
- package/dist/personality-profile.d.ts.map +1 -0
- package/dist/scene-asset.d.ts +22 -0
- package/dist/scene-asset.d.ts.map +1 -0
- package/dist/scene-assets.d.ts +11 -0
- package/dist/scene-assets.d.ts.map +1 -0
- package/dist/scene-owned-asset.d.ts +19 -0
- package/dist/scene-owned-asset.d.ts.map +1 -0
- package/dist/scene.d.ts +179 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +4 -4
- package/dist/video-composition-asset.d.ts +21 -0
- package/dist/video-composition-asset.d.ts.map +1 -0
- package/dist/video-composition.d.ts +77 -0
- package/dist/video-composition.d.ts.map +1 -0
- package/dist/video-compositions.d.ts +13 -0
- package/dist/video-compositions.d.ts.map +1 -0
- package/dist/video-content.d.ts +10 -0
- package/dist/video-content.d.ts.map +1 -0
- package/dist/video-sequence-asset.d.ts +21 -0
- package/dist/video-sequence-asset.d.ts.map +1 -0
- package/dist/video-sequence.d.ts +66 -0
- package/dist/video-sequence.d.ts.map +1 -0
- package/dist/video-sequences.d.ts +13 -0
- package/dist/video-sequences.d.ts.map +1 -0
- package/dist/video-shot-asset.d.ts +21 -0
- package/dist/video-shot-asset.d.ts.map +1 -0
- package/dist/video-shot-character.d.ts +56 -0
- package/dist/video-shot-character.d.ts.map +1 -0
- package/dist/video-shot-characters.d.ts +13 -0
- package/dist/video-shot-characters.d.ts.map +1 -0
- package/dist/video-shot.d.ts +142 -0
- package/dist/video-shot.d.ts.map +1 -0
- package/dist/video-shots.d.ts +15 -0
- package/dist/video-shots.d.ts.map +1 -0
- package/dist/video-workflow.d.ts +187 -0
- package/dist/video-workflow.d.ts.map +1 -0
- package/package.json +10 -10
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoCompositionCollection - Collection manager for VideoComposition instances
|
|
3
|
+
*/
|
|
4
|
+
import { SmrtCollection } from '@happyvertical/smrt-core';
|
|
5
|
+
import { type RenderStatus, VideoComposition } from './video-composition.js';
|
|
6
|
+
export declare class VideoCompositionCollection extends SmrtCollection<VideoComposition> {
|
|
7
|
+
static readonly _itemClass: typeof VideoComposition;
|
|
8
|
+
/** Find compositions by render status */
|
|
9
|
+
findByRenderStatus(renderStatus: RenderStatus): Promise<VideoComposition[]>;
|
|
10
|
+
/** Find compositions that are ready for publishing */
|
|
11
|
+
findReady(): Promise<VideoComposition[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=video-compositions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-compositions.d.ts","sourceRoot":"","sources":["../src/video-compositions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE7E,qBAAa,0BAA2B,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IAC9E,MAAM,CAAC,QAAQ,CAAC,UAAU,0BAAoB;IAE9C,yCAAyC;IACnC,kBAAkB,CACtB,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAM9B,sDAAsD;IAChD,SAAS,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAK/C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoContent - DEPRECATED
|
|
3
|
+
*
|
|
4
|
+
* Use VideoShot instead. This module re-exports VideoShot as VideoContent
|
|
5
|
+
* for backwards compatibility.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Use {@link VideoShot} from './video-shot.js' instead.
|
|
8
|
+
*/
|
|
9
|
+
export { type VideoMetadata, VideoShot as VideoContent, type VideoShotOptions as VideoContentOptions, type VideoShotStatus as VideoContentStatus, } from './video-shot.js';
|
|
10
|
+
//# sourceMappingURL=video-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-content.d.ts","sourceRoot":"","sources":["../src/video-content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,aAAa,EAClB,SAAS,IAAI,YAAY,EACzB,KAAK,gBAAgB,IAAI,mBAAmB,EAC5C,KAAK,eAAe,IAAI,kBAAkB,GAC3C,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoSequenceAsset - legacy STI asset subclass for VideoSequence-owned assets
|
|
3
|
+
*
|
|
4
|
+
* @deprecated VideoSequence now uses inherited Content asset helpers backed by
|
|
5
|
+
* `content_assets`. This legacy subtype remains readable during migration.
|
|
6
|
+
*/
|
|
7
|
+
import { Asset, type AssetOptions } from '@happyvertical/smrt-assets';
|
|
8
|
+
/** Roles a video sequence asset can play */
|
|
9
|
+
export type VideoSequenceAssetRole = 'video' | 'audio' | 'thumbnail';
|
|
10
|
+
export interface VideoSequenceAssetOptions extends AssetOptions {
|
|
11
|
+
/** VideoSequence this asset belongs to */
|
|
12
|
+
videoSequenceId?: string | null;
|
|
13
|
+
/** Role of this asset for the sequence */
|
|
14
|
+
role?: VideoSequenceAssetRole;
|
|
15
|
+
}
|
|
16
|
+
export declare class VideoSequenceAsset extends Asset {
|
|
17
|
+
videoSequenceId: string | null;
|
|
18
|
+
role: VideoSequenceAssetRole;
|
|
19
|
+
constructor(options?: VideoSequenceAssetOptions);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=video-sequence-asset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-sequence-asset.d.ts","sourceRoot":"","sources":["../src/video-sequence-asset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAItE,4CAA4C;AAC5C,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;AAErE,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,0CAA0C;IAC1C,IAAI,CAAC,EAAE,sBAAsB,CAAC;CAC/B;AAED,qBAKa,kBAAmB,SAAQ,KAAK;IAE3C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEtC,IAAI,EAAE,sBAAsB,CAAW;gBAE3B,OAAO,GAAE,yBAA8B;CAMpD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoSequence Model
|
|
3
|
+
*
|
|
4
|
+
* A thematic section of a video: "top story", "weather", "interview".
|
|
5
|
+
* Groups VideoShots. Maps to Remotion <TransitionSeries.Sequence>.
|
|
6
|
+
*
|
|
7
|
+
* Design principle: store frames, compute seconds. seconds = frames / fps.
|
|
8
|
+
*/
|
|
9
|
+
import type { Asset } from '@happyvertical/smrt-assets';
|
|
10
|
+
import { Content, type ContentOptions } from '@happyvertical/smrt-content';
|
|
11
|
+
import type { VideoSequenceAssetRole } from './video-sequence-asset.js';
|
|
12
|
+
/**
|
|
13
|
+
* Transition type to the next sequence
|
|
14
|
+
*/
|
|
15
|
+
export type TransitionType = 'none' | 'fade' | 'slide' | 'wipe';
|
|
16
|
+
/**
|
|
17
|
+
* VideoSequence creation options
|
|
18
|
+
*/
|
|
19
|
+
export interface VideoSequenceOptions extends ContentOptions {
|
|
20
|
+
/** Composition this sequence belongs to (nullable — can exist standalone) */
|
|
21
|
+
compositionId?: string | null;
|
|
22
|
+
/** Order within composition */
|
|
23
|
+
position?: number;
|
|
24
|
+
/** Computed duration: sum of shot frames */
|
|
25
|
+
durationInFrames?: number;
|
|
26
|
+
/** Transition type to the next sequence */
|
|
27
|
+
transitionType?: TransitionType;
|
|
28
|
+
/** Overlap frames with next sequence for transition */
|
|
29
|
+
transitionDurationFrames?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Thematic section of a video composition
|
|
33
|
+
*
|
|
34
|
+
* VideoSequence groups VideoShots into a logical section. It can belong
|
|
35
|
+
* to a VideoComposition or exist standalone (e.g., during long-video generation).
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import { VideoSequence } from '@happyvertical/smrt-video';
|
|
40
|
+
*
|
|
41
|
+
* const sequence = new VideoSequence({
|
|
42
|
+
* title: 'Top Story',
|
|
43
|
+
* position: 0,
|
|
44
|
+
* transitionType: 'fade',
|
|
45
|
+
* transitionDurationFrames: 15,
|
|
46
|
+
* });
|
|
47
|
+
* await sequence.save();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare class VideoSequence extends Content {
|
|
51
|
+
/** Composition this sequence belongs to */
|
|
52
|
+
compositionId: string | null;
|
|
53
|
+
/** Order within composition */
|
|
54
|
+
position: number;
|
|
55
|
+
/** Computed duration: sum of shot frames */
|
|
56
|
+
durationInFrames: number;
|
|
57
|
+
/** Transition type to the next sequence */
|
|
58
|
+
transitionType: TransitionType;
|
|
59
|
+
/** Overlap frames with next sequence for transition */
|
|
60
|
+
transitionDurationFrames: number;
|
|
61
|
+
constructor(options?: VideoSequenceOptions);
|
|
62
|
+
getAssets(relationship?: string): Promise<Asset[]>;
|
|
63
|
+
getAssets(role?: VideoSequenceAssetRole): Promise<Asset[]>;
|
|
64
|
+
getAssetByRole(role: VideoSequenceAssetRole): Promise<Asset | null>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=video-sequence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-sequence.d.ts","sourceRoot":"","sources":["../src/video-sequence.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAQ3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,2CAA2C;IAC3C,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,uDAAuD;IACvD,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAWa,aAAc,SAAQ,OAAO;IACxC,2CAA2C;IAE3C,aAAa,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEpC,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAK;IAErB,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,CAAK;IAE7B,2CAA2C;IAC3C,cAAc,EAAE,cAAc,CAAU;IAExC,uDAAuD;IACvD,wBAAwB,EAAE,MAAM,CAAK;gBAEzB,OAAO,GAAE,oBAAyB;IAiBxC,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAClD,SAAS,CAAC,IAAI,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAgC1D,cAAc,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;CAI1E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoSequenceCollection - Collection manager for VideoSequence instances
|
|
3
|
+
*/
|
|
4
|
+
import { SmrtCollection } from '@happyvertical/smrt-core';
|
|
5
|
+
import { VideoSequence } from './video-sequence.js';
|
|
6
|
+
export declare class VideoSequenceCollection extends SmrtCollection<VideoSequence> {
|
|
7
|
+
static readonly _itemClass: typeof VideoSequence;
|
|
8
|
+
/** Find sequences belonging to a composition, ordered by position */
|
|
9
|
+
findByComposition(compositionId: string): Promise<VideoSequence[]>;
|
|
10
|
+
/** Find standalone sequences (not in any composition) */
|
|
11
|
+
findStandalone(): Promise<VideoSequence[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=video-sequences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-sequences.d.ts","sourceRoot":"","sources":["../src/video-sequences.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,qBAAa,uBAAwB,SAAQ,cAAc,CAAC,aAAa,CAAC;IACxE,MAAM,CAAC,QAAQ,CAAC,UAAU,uBAAiB;IAE3C,qEAAqE;IAC/D,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAOxE,yDAAyD;IACnD,cAAc,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;CAKjD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoShotAsset - legacy STI asset subclass for VideoShot-owned assets
|
|
3
|
+
*
|
|
4
|
+
* @deprecated VideoShot now uses inherited Content asset helpers backed by
|
|
5
|
+
* `content_assets`. This legacy subtype remains readable during migration.
|
|
6
|
+
*/
|
|
7
|
+
import { Asset, type AssetOptions } from '@happyvertical/smrt-assets';
|
|
8
|
+
/** Roles a video shot asset can play */
|
|
9
|
+
export type VideoShotAssetRole = 'video' | 'audio' | 'thumbnail';
|
|
10
|
+
export interface VideoShotAssetOptions extends AssetOptions {
|
|
11
|
+
/** VideoShot this asset belongs to */
|
|
12
|
+
videoShotId?: string | null;
|
|
13
|
+
/** Role of this asset for the shot */
|
|
14
|
+
role?: VideoShotAssetRole;
|
|
15
|
+
}
|
|
16
|
+
export declare class VideoShotAsset extends Asset {
|
|
17
|
+
videoShotId: string | null;
|
|
18
|
+
role: VideoShotAssetRole;
|
|
19
|
+
constructor(options?: VideoShotAssetOptions);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=video-shot-asset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-shot-asset.d.ts","sourceRoot":"","sources":["../src/video-shot-asset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAItE,wCAAwC;AACxC,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;AAEjE,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sCAAsC;IACtC,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,qBAKa,cAAe,SAAQ,KAAK;IAEvC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElC,IAAI,EAAE,kBAAkB,CAAW;gBAEvB,OAAO,GAAE,qBAA0B;CAMhD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoShotCharacter - Join model linking VideoShots to Characters
|
|
3
|
+
*
|
|
4
|
+
* Replaces the old single personalityProfileId FK on VideoContent.
|
|
5
|
+
* Supports multiple characters per shot with role and ordering.
|
|
6
|
+
*/
|
|
7
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
8
|
+
import { SmrtObject } from '@happyvertical/smrt-core';
|
|
9
|
+
/**
|
|
10
|
+
* Character role within a shot
|
|
11
|
+
*/
|
|
12
|
+
export type VideoShotCharacterRole = 'primary' | 'secondary' | 'background';
|
|
13
|
+
/**
|
|
14
|
+
* VideoShotCharacter creation options
|
|
15
|
+
*/
|
|
16
|
+
export interface VideoShotCharacterOptions extends SmrtObjectOptions {
|
|
17
|
+
/** Video shot ID */
|
|
18
|
+
videoShotId: string;
|
|
19
|
+
/** Character ID */
|
|
20
|
+
characterId: string;
|
|
21
|
+
/** Role of the character in this shot */
|
|
22
|
+
role?: VideoShotCharacterRole;
|
|
23
|
+
/** Order/layer position within the shot */
|
|
24
|
+
position?: number;
|
|
25
|
+
/** Tenant ID for multi-tenant isolation */
|
|
26
|
+
tenantId?: string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Join model linking a VideoShot to a Character
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { VideoShotCharacter } from '@happyvertical/smrt-video';
|
|
34
|
+
*
|
|
35
|
+
* const link = new VideoShotCharacter({
|
|
36
|
+
* videoShotId: 'shot-123',
|
|
37
|
+
* characterId: 'char-456',
|
|
38
|
+
* role: 'primary',
|
|
39
|
+
* position: 0,
|
|
40
|
+
* });
|
|
41
|
+
* await link.save();
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare class VideoShotCharacter extends SmrtObject {
|
|
45
|
+
tenantId: string | null;
|
|
46
|
+
/** Video shot ID */
|
|
47
|
+
videoShotId: string;
|
|
48
|
+
/** Character ID */
|
|
49
|
+
characterId: string;
|
|
50
|
+
/** Role of the character in this shot */
|
|
51
|
+
role: VideoShotCharacterRole;
|
|
52
|
+
/** Order/layer position within the shot */
|
|
53
|
+
position: number;
|
|
54
|
+
constructor(options: VideoShotCharacterOptions);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=video-shot-character.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-shot-character.d.ts","sourceRoot":"","sources":["../src/video-shot-character.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAc,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAKxE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,oBAAoB;IACpB,WAAW,EAAE,MAAM,CAAC;IAEpB,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAE9B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAWa,kBAAmB,SAAQ,UAAU;IAEhD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B,oBAAoB;IAEpB,WAAW,EAAE,MAAM,CAAM;IAEzB,mBAAmB;IAEnB,WAAW,EAAE,MAAM,CAAM;IAEzB,yCAAyC;IACzC,IAAI,EAAE,sBAAsB,CAAa;IAEzC,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAK;gBAET,OAAO,EAAE,yBAAyB;CAS/C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoShotCharacterCollection - Collection manager for VideoShotCharacter instances
|
|
3
|
+
*/
|
|
4
|
+
import { SmrtCollection } from '@happyvertical/smrt-core';
|
|
5
|
+
import { VideoShotCharacter } from './video-shot-character.js';
|
|
6
|
+
export declare class VideoShotCharacterCollection extends SmrtCollection<VideoShotCharacter> {
|
|
7
|
+
static readonly _itemClass: typeof VideoShotCharacter;
|
|
8
|
+
/** Find all character links for a shot, ordered by position */
|
|
9
|
+
findByShot(videoShotId: string): Promise<VideoShotCharacter[]>;
|
|
10
|
+
/** Find all shot links for a character */
|
|
11
|
+
findByCharacter(characterId: string): Promise<VideoShotCharacter[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=video-shot-characters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-shot-characters.d.ts","sourceRoot":"","sources":["../src/video-shot-characters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,kBAAkB,CAAC;IAClF,MAAM,CAAC,QAAQ,CAAC,UAAU,4BAAsB;IAEhD,+DAA+D;IACzD,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAOpE,0CAA0C;IACpC,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;CAK1E"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoShot Model
|
|
3
|
+
*
|
|
4
|
+
* The atomic video generation unit. One or more characters + one scene + one pipeline run.
|
|
5
|
+
* This is what ComfyUI produces. Maps to Remotion <Sequence><Video /></Sequence>.
|
|
6
|
+
*
|
|
7
|
+
* Design principle: store frames, compute seconds. seconds = frames / fps.
|
|
8
|
+
*/
|
|
9
|
+
import type { Asset } from '@happyvertical/smrt-assets';
|
|
10
|
+
import { Content, type ContentOptions } from '@happyvertical/smrt-content';
|
|
11
|
+
import type { WordTiming } from '@happyvertical/smrt-voice';
|
|
12
|
+
import type { VideoShotAssetRole } from './video-shot-asset.js';
|
|
13
|
+
/**
|
|
14
|
+
* Video shot status
|
|
15
|
+
*/
|
|
16
|
+
export type VideoShotStatus = 'draft' | 'queued' | 'processing' | 'ready' | 'failed' | 'published';
|
|
17
|
+
/**
|
|
18
|
+
* Video metadata
|
|
19
|
+
*/
|
|
20
|
+
export interface VideoMetadata {
|
|
21
|
+
/** Actual duration in seconds */
|
|
22
|
+
duration?: number;
|
|
23
|
+
/** Video resolution (e.g., "1920x1080") */
|
|
24
|
+
resolution?: string;
|
|
25
|
+
/** Aspect ratio (e.g., "16:9", "9:16") */
|
|
26
|
+
aspectRatio?: string;
|
|
27
|
+
/** Video codec (e.g., "h264", "h265") */
|
|
28
|
+
codec?: string;
|
|
29
|
+
/** Frames per second */
|
|
30
|
+
fps?: number;
|
|
31
|
+
/** File size in bytes */
|
|
32
|
+
fileSize?: number;
|
|
33
|
+
/** Word timing data from TTS for lip-sync */
|
|
34
|
+
wordTimings?: WordTiming[];
|
|
35
|
+
/** ComfyUI prompt ID for tracking */
|
|
36
|
+
comfyPromptId?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Video shot creation options
|
|
40
|
+
*/
|
|
41
|
+
export interface VideoShotOptions extends ContentOptions {
|
|
42
|
+
/** Sequence this shot belongs to (nullable — shots can exist standalone) */
|
|
43
|
+
sequenceId?: string | null;
|
|
44
|
+
/** Scene for this shot (nullable) */
|
|
45
|
+
sceneId?: string | null;
|
|
46
|
+
/** Order within sequence */
|
|
47
|
+
position?: number;
|
|
48
|
+
/** Actual frame count of generated clip */
|
|
49
|
+
durationInFrames?: number;
|
|
50
|
+
/** Frames to skip at start (overlap handling) */
|
|
51
|
+
trimBeforeFrames?: number;
|
|
52
|
+
/** Frames to skip at end */
|
|
53
|
+
trimAfterFrames?: number;
|
|
54
|
+
/** Script text to be spoken */
|
|
55
|
+
scriptText?: string;
|
|
56
|
+
/** Word count in the script */
|
|
57
|
+
scriptWordCount?: number;
|
|
58
|
+
/** Target duration in seconds */
|
|
59
|
+
targetDuration?: number;
|
|
60
|
+
/** Video generation status */
|
|
61
|
+
shotStatus?: VideoShotStatus;
|
|
62
|
+
/** Generation progress (0-100) */
|
|
63
|
+
progress?: number;
|
|
64
|
+
/** Error message if status is 'failed' */
|
|
65
|
+
errorMessage?: string | null;
|
|
66
|
+
/** Detailed status message for progress tracking */
|
|
67
|
+
statusMessage?: string | null;
|
|
68
|
+
/** Video metadata */
|
|
69
|
+
videoMetadata?: VideoMetadata;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Atomic video generation unit
|
|
73
|
+
*
|
|
74
|
+
* VideoShot represents a single pipeline run producing one video clip.
|
|
75
|
+
* It can belong to a VideoSequence (for multi-segment long videos) or
|
|
76
|
+
* exist standalone. Characters are linked via the VideoShotCharacter join model.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* import { VideoShot } from '@happyvertical/smrt-video';
|
|
81
|
+
*
|
|
82
|
+
* const shot = new VideoShot({
|
|
83
|
+
* scriptText: 'Welcome to the evening news.',
|
|
84
|
+
* targetDuration: 30,
|
|
85
|
+
* title: 'Evening News - Opening',
|
|
86
|
+
* });
|
|
87
|
+
* await shot.save();
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export declare class VideoShot extends Content {
|
|
91
|
+
/** Sequence this shot belongs to */
|
|
92
|
+
sequenceId: string | null;
|
|
93
|
+
/** Scene for this shot */
|
|
94
|
+
sceneId: string | null;
|
|
95
|
+
/** Order within sequence */
|
|
96
|
+
position: number;
|
|
97
|
+
/** Actual frame count of generated clip */
|
|
98
|
+
durationInFrames: number;
|
|
99
|
+
/** Frames to skip at start (overlap handling) */
|
|
100
|
+
trimBeforeFrames: number;
|
|
101
|
+
/** Frames to skip at end */
|
|
102
|
+
trimAfterFrames: number;
|
|
103
|
+
/** Script text to be spoken */
|
|
104
|
+
scriptText: string;
|
|
105
|
+
/** Word count in the script */
|
|
106
|
+
scriptWordCount: number;
|
|
107
|
+
/** Target duration in seconds */
|
|
108
|
+
targetDuration: number;
|
|
109
|
+
/** Video generation status */
|
|
110
|
+
shotStatus: VideoShotStatus;
|
|
111
|
+
/** Generation progress (0-100) */
|
|
112
|
+
progress: number;
|
|
113
|
+
/** Error message if status is 'failed' */
|
|
114
|
+
errorMessage: string | null;
|
|
115
|
+
/** Detailed status message for progress tracking */
|
|
116
|
+
statusMessage: string | null;
|
|
117
|
+
/** Video metadata (duration, resolution, etc.) */
|
|
118
|
+
videoMetadata: VideoMetadata;
|
|
119
|
+
constructor(options?: VideoShotOptions);
|
|
120
|
+
/** Estimate speech duration based on word count (2.7 words/sec) */
|
|
121
|
+
get estimatedDuration(): number;
|
|
122
|
+
/** Check if the script length matches target duration (+/- 15%) */
|
|
123
|
+
get isScriptLengthValid(): boolean;
|
|
124
|
+
/** Get the recommended word count for target duration */
|
|
125
|
+
get recommendedWordCount(): {
|
|
126
|
+
min: number;
|
|
127
|
+
max: number;
|
|
128
|
+
target: number;
|
|
129
|
+
};
|
|
130
|
+
/** Effective frame count after trimming */
|
|
131
|
+
get effectiveFrames(): number;
|
|
132
|
+
/** Check if video generation is in progress */
|
|
133
|
+
get isGenerating(): boolean;
|
|
134
|
+
/** Check if video is ready for publishing */
|
|
135
|
+
get isReady(): boolean;
|
|
136
|
+
getAssets(relationship?: string): Promise<Asset[]>;
|
|
137
|
+
getAssets(role?: VideoShotAssetRole): Promise<Asset[]>;
|
|
138
|
+
getAssetByRole(role: VideoShotAssetRole): Promise<Asset | null>;
|
|
139
|
+
/** Update script text and recalculate word count */
|
|
140
|
+
setScript(text: string): void;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=video-shot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-shot.d.ts","sourceRoot":"","sources":["../src/video-shot.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQ5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,QAAQ,GACR,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,WAAW,CAAC;AAEhB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;I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AI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAgCtD,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAKrE,oDAAoD;IACpD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAI9B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoShotCollection - Collection manager for VideoShot instances
|
|
3
|
+
*/
|
|
4
|
+
import { SmrtCollection } from '@happyvertical/smrt-core';
|
|
5
|
+
import { VideoShot, type VideoShotStatus } from './video-shot.js';
|
|
6
|
+
export declare class VideoShotCollection extends SmrtCollection<VideoShot> {
|
|
7
|
+
static readonly _itemClass: typeof VideoShot;
|
|
8
|
+
/** Find shots belonging to a specific sequence, ordered by position */
|
|
9
|
+
findBySequence(sequenceId: string): Promise<VideoShot[]>;
|
|
10
|
+
/** Find shots by status */
|
|
11
|
+
findByStatus(shotStatus: VideoShotStatus): Promise<VideoShot[]>;
|
|
12
|
+
/** Find standalone shots (not in any sequence) */
|
|
13
|
+
findStandalone(): Promise<VideoShot[]>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=video-shots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-shots.d.ts","sourceRoot":"","sources":["../src/video-shots.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElE,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,SAAS,CAAC;IAChE,MAAM,CAAC,QAAQ,CAAC,UAAU,mBAAa;IAEvC,uEAAuE;IACjE,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAO9D,2BAA2B;IACrB,YAAY,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAIrE,kDAAkD;IAC5C,cAAc,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;CAG7C"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video Workflow Model
|
|
3
|
+
*
|
|
4
|
+
* Manages ComfyUI workflow templates for video generation.
|
|
5
|
+
*/
|
|
6
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
7
|
+
import { SmrtObject } from '@happyvertical/smrt-core';
|
|
8
|
+
/**
|
|
9
|
+
* Node mapping for dynamic parameter injection
|
|
10
|
+
*/
|
|
11
|
+
export interface NodeMapping {
|
|
12
|
+
/**
|
|
13
|
+
* Node ID for anchor seed image input
|
|
14
|
+
*/
|
|
15
|
+
seedImage?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Node ID for TTS audio input
|
|
18
|
+
*/
|
|
19
|
+
audioFile?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Node ID for base motion video input
|
|
22
|
+
*/
|
|
23
|
+
baseVideo?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Node ID for final video output
|
|
26
|
+
*/
|
|
27
|
+
outputVideo?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Node ID for text prompt input
|
|
30
|
+
*/
|
|
31
|
+
prompt?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Node ID for negative prompt input
|
|
34
|
+
*/
|
|
35
|
+
negativePrompt?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Node ID for sampler/scheduler settings
|
|
38
|
+
*/
|
|
39
|
+
sampler?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Node ID for video duration control
|
|
42
|
+
*/
|
|
43
|
+
duration?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Additional custom node mappings
|
|
46
|
+
*/
|
|
47
|
+
[key: string]: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Workflow type classification
|
|
51
|
+
*/
|
|
52
|
+
export type WorkflowType = 'prebake' | 'broadcast' | 'lipsync' | 'postprod' | 'custom';
|
|
53
|
+
/**
|
|
54
|
+
* Video workflow creation options
|
|
55
|
+
*/
|
|
56
|
+
export interface VideoWorkflowOptions extends SmrtObjectOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Human-readable name for the workflow
|
|
59
|
+
*/
|
|
60
|
+
name?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Description of what this workflow does
|
|
63
|
+
*/
|
|
64
|
+
description?: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* Workflow type classification
|
|
67
|
+
* @default 'custom'
|
|
68
|
+
*/
|
|
69
|
+
workflowType?: WorkflowType;
|
|
70
|
+
/**
|
|
71
|
+
* ComfyUI API format JSON
|
|
72
|
+
*/
|
|
73
|
+
workflowJson?: object | null;
|
|
74
|
+
/**
|
|
75
|
+
* Node ID mappings for dynamic parameter injection
|
|
76
|
+
*/
|
|
77
|
+
nodeMapping?: NodeMapping;
|
|
78
|
+
/**
|
|
79
|
+
* Estimated processing time in seconds
|
|
80
|
+
*/
|
|
81
|
+
estimatedTime?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Whether this workflow is active/usable
|
|
84
|
+
* @default true
|
|
85
|
+
*/
|
|
86
|
+
isActive?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* ComfyUI models required by this workflow
|
|
89
|
+
*/
|
|
90
|
+
requiredModels?: string[];
|
|
91
|
+
/**
|
|
92
|
+
* Tenant ID for multi-tenant isolation
|
|
93
|
+
*/
|
|
94
|
+
tenantId?: string | null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* ComfyUI workflow template for video generation
|
|
98
|
+
*
|
|
99
|
+
* VideoWorkflow stores ComfyUI workflow definitions with node mappings
|
|
100
|
+
* for dynamic parameter injection. This allows the Histrio agent to
|
|
101
|
+
* inject anchor images, audio, and other inputs at runtime.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* import { VideoWorkflow } from '@happyvertical/smrt-video';
|
|
106
|
+
*
|
|
107
|
+
* const workflow = new VideoWorkflow({
|
|
108
|
+
* name: 'Wan 2.6 + EchoMimic',
|
|
109
|
+
* description: 'Full broadcast generation with lip-sync',
|
|
110
|
+
* workflowType: 'broadcast',
|
|
111
|
+
* workflowJson: comfyuiWorkflowJson,
|
|
112
|
+
* nodeMapping: {
|
|
113
|
+
* seedImage: '1',
|
|
114
|
+
* audioFile: '5',
|
|
115
|
+
* outputVideo: '12',
|
|
116
|
+
* },
|
|
117
|
+
* estimatedTime: 600, // 10 minutes
|
|
118
|
+
* requiredModels: ['wan_2.6_t2v_14b_fp8', 'echomimic_v2'],
|
|
119
|
+
* });
|
|
120
|
+
* await workflow.save();
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
export declare class VideoWorkflow extends SmrtObject {
|
|
124
|
+
/**
|
|
125
|
+
* Tenant ID for multi-tenant isolation
|
|
126
|
+
*/
|
|
127
|
+
tenantId: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* Human-readable name for the workflow
|
|
130
|
+
*/
|
|
131
|
+
name: string;
|
|
132
|
+
/**
|
|
133
|
+
* Description of what this workflow does
|
|
134
|
+
*/
|
|
135
|
+
description: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* Workflow type classification
|
|
138
|
+
* - prebake: Pre-generate base motion from seed image
|
|
139
|
+
* - broadcast: Full video generation pipeline
|
|
140
|
+
* - lipsync: Lip-sync only (requires base video + audio)
|
|
141
|
+
* - postprod: Post-production overlays and effects
|
|
142
|
+
* - custom: User-defined workflow
|
|
143
|
+
*/
|
|
144
|
+
workflowType: WorkflowType;
|
|
145
|
+
/**
|
|
146
|
+
* ComfyUI API format JSON
|
|
147
|
+
* This is the workflow definition that will be sent to ComfyUI
|
|
148
|
+
*/
|
|
149
|
+
workflowJson: object | null;
|
|
150
|
+
/**
|
|
151
|
+
* Node ID mappings for dynamic parameter injection
|
|
152
|
+
* Maps semantic names to ComfyUI node IDs
|
|
153
|
+
*/
|
|
154
|
+
nodeMapping: NodeMapping;
|
|
155
|
+
/**
|
|
156
|
+
* Estimated processing time in seconds
|
|
157
|
+
* Used for progress estimation
|
|
158
|
+
*/
|
|
159
|
+
estimatedTime: number;
|
|
160
|
+
/**
|
|
161
|
+
* Whether this workflow is active/usable
|
|
162
|
+
*/
|
|
163
|
+
isActive: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* ComfyUI models required by this workflow
|
|
166
|
+
* Used for validation before queuing
|
|
167
|
+
*/
|
|
168
|
+
requiredModels: string[];
|
|
169
|
+
constructor(options?: VideoWorkflowOptions);
|
|
170
|
+
/**
|
|
171
|
+
* Check if the workflow has all required node mappings
|
|
172
|
+
*/
|
|
173
|
+
get hasRequiredMappings(): boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Get a copy of the workflow JSON with injected parameters
|
|
176
|
+
*
|
|
177
|
+
* Parameter injection follows ComfyUI node structure conventions:
|
|
178
|
+
* - seedImage, audioFile, baseVideo → node.inputs.image (file path)
|
|
179
|
+
* - prompt → node.inputs.text (string)
|
|
180
|
+
* - Other parameters → node.inputs[paramKey]
|
|
181
|
+
*
|
|
182
|
+
* @param params - Key-value pairs of parameters to inject
|
|
183
|
+
* @returns Modified workflow JSON or null if no workflowJson set
|
|
184
|
+
*/
|
|
185
|
+
injectParameters(params: Record<string, unknown>): object | null;
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=video-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-workflow.d.ts","sourceRoot":"","sources":["../src/video-workflow.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAK5D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,S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IAE/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAM;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElC;;;;;;;OAOG;IACH,YAAY,EAAE,YAAY,CAAY;IAEtC;;;OAGG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEnC;;;OAGG;IACH,WAAW,EAAE,WAAW,CAAM;IAE9B;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAO;IAE5B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAQ;IAEzB;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,CAAM;gBAElB,OAAO,GAAE,oBAAyB;IAoB9C;;OAEG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAGjC;IAED;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI;CA2CjE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-video",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Video content management for AI-powered video production in the SMRT ecosystem",
|
|
6
6
|
"author": "HappyVertical",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@happyvertical/logger": "^0.94.1",
|
|
33
|
-
"@happyvertical/smrt-assets": "0.51.
|
|
34
|
-
"@happyvertical/smrt-config": "0.51.
|
|
35
|
-
"@happyvertical/smrt-content": "0.51.
|
|
36
|
-
"@happyvertical/smrt-core": "0.51.
|
|
37
|
-
"@happyvertical/smrt-profiles": "0.51.
|
|
38
|
-
"@happyvertical/smrt-tenancy": "0.51.
|
|
39
|
-
"@happyvertical/smrt-voice": "0.51.
|
|
33
|
+
"@happyvertical/smrt-assets": "0.51.34",
|
|
34
|
+
"@happyvertical/smrt-config": "0.51.34",
|
|
35
|
+
"@happyvertical/smrt-content": "0.51.34",
|
|
36
|
+
"@happyvertical/smrt-core": "0.51.34",
|
|
37
|
+
"@happyvertical/smrt-profiles": "0.51.34",
|
|
38
|
+
"@happyvertical/smrt-tenancy": "0.51.34",
|
|
39
|
+
"@happyvertical/smrt-voice": "0.51.34",
|
|
40
40
|
"@happyvertical/utils": "^0.94.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@happyvertical/smrt-vitest": "0.51.
|
|
43
|
+
"@happyvertical/smrt-vitest": "0.51.34",
|
|
44
44
|
"@happyvertical/sql": "^0.94.1",
|
|
45
45
|
"@types/node": "24.13.6",
|
|
46
|
-
"typescript": "
|
|
46
|
+
"typescript": "6.0.3",
|
|
47
47
|
"vite": "8.1.4",
|
|
48
48
|
"vitest": "4.1.10"
|
|
49
49
|
},
|