visualfries 0.1.0 → 0.1.1
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/SceneBuilder.svelte.d.ts +1627 -4795
- package/dist/animations/AnimationPresetsRegister.d.ts +49 -225
- package/dist/builders/_ComponentState.svelte.d.ts +110 -462
- package/dist/builders/html/processors/TextEffectsStyleProcessor.js +1 -1
- package/dist/components/hooks/SubtitlesHook.d.ts +25 -38
- package/dist/layers/Layer.svelte.d.ts +1627 -4795
- package/dist/managers/LayersManager.svelte.d.ts +1627 -4795
- package/dist/managers/StateManager.svelte.d.ts +1659 -4853
- package/dist/managers/SubtitlesManager.svelte.d.ts +76 -115
- package/dist/schemas/scene/animations.d.ts +1385 -89353
- package/dist/schemas/scene/animations.js +11 -11
- package/dist/schemas/scene/components.d.ts +23513 -0
- package/dist/schemas/scene/components.js +156 -116
- package/dist/schemas/scene/core.d.ts +21255 -0
- package/dist/schemas/scene/core.js +25 -23
- package/dist/schemas/scene/index.d.ts +5 -3
- package/dist/schemas/scene/index.js +1 -1
- package/dist/schemas/scene/properties.d.ts +437 -727
- package/dist/schemas/scene/properties.js +63 -51
- package/dist/schemas/scene/subtitles.d.ts +159 -995
- package/package.json +4 -4
|
@@ -19,7 +19,7 @@ export const SceneAssetMetadataShape = z.object({
|
|
|
19
19
|
});
|
|
20
20
|
export const AssetSubtitleShape = z.object({
|
|
21
21
|
// id: z.string(),
|
|
22
|
-
url: z.
|
|
22
|
+
url: z.url().optional(),
|
|
23
23
|
language_code: z.string().optional(),
|
|
24
24
|
subtitles: z.array(SubtitleWithCompactWordsShape).optional()
|
|
25
25
|
});
|
|
@@ -36,8 +36,8 @@ export const SceneAssetShape = z.object({
|
|
|
36
36
|
subtitles: z.array(AssetSubtitleShape).optional()
|
|
37
37
|
});
|
|
38
38
|
export const SceneSubtitlesSettingsShape = z.object({
|
|
39
|
-
punctuation: z.boolean().
|
|
40
|
-
mergeGap: z.number().min(0).
|
|
39
|
+
punctuation: z.boolean().prefault(true),
|
|
40
|
+
mergeGap: z.number().min(0).prefault(0.2).optional(),
|
|
41
41
|
data: z.record(z.string(), SubtitleCollectionShape).optional()
|
|
42
42
|
});
|
|
43
43
|
/**
|
|
@@ -59,27 +59,29 @@ export const SceneSettingsShape = z.object({
|
|
|
59
59
|
}))
|
|
60
60
|
.optional(),
|
|
61
61
|
/** Frame rate for rendering */
|
|
62
|
-
fps: z.
|
|
62
|
+
fps: z.int().positive().prefault(30),
|
|
63
63
|
/** Background configuration */
|
|
64
64
|
backgroundColor: z
|
|
65
65
|
.union([
|
|
66
|
-
z.string().refine(isValidColor, {
|
|
66
|
+
z.string().refine(isValidColor, {
|
|
67
|
+
error: 'Invalid color format'
|
|
68
|
+
}),
|
|
67
69
|
z.object({
|
|
68
70
|
type: z.enum(['linear', 'radial']),
|
|
69
71
|
colors: z.array(z.string().refine(isValidColor)).min(2),
|
|
70
72
|
stops: z.array(z.number().min(0).max(1)).optional(),
|
|
71
|
-
angle: z.number().min(0).max(360).
|
|
73
|
+
angle: z.number().min(0).max(360).prefault(180).optional(),
|
|
72
74
|
position: z.string().optional(),
|
|
73
75
|
shape: z.enum(['ellipse', 'circle']).optional()
|
|
74
76
|
})
|
|
75
77
|
])
|
|
76
|
-
.
|
|
78
|
+
.prefault('#FFFFFF'),
|
|
77
79
|
/** Audio configuration */
|
|
78
80
|
audio: z
|
|
79
81
|
.object({
|
|
80
|
-
src: z.
|
|
81
|
-
volume: z.number().min(0).max(1).
|
|
82
|
-
muted: z.boolean().
|
|
82
|
+
src: z.url().optional(),
|
|
83
|
+
volume: z.number().min(0).max(1).prefault(1),
|
|
84
|
+
muted: z.boolean().prefault(false)
|
|
83
85
|
})
|
|
84
86
|
.optional(),
|
|
85
87
|
subtitles: SceneSubtitlesSettingsShape.optional()
|
|
@@ -94,17 +96,17 @@ export const SceneLayerShape = z.object({
|
|
|
94
96
|
/** Optional name for the layer */
|
|
95
97
|
name: z.string().optional(),
|
|
96
98
|
/** Layer stacking order (higher values appear on top) */
|
|
97
|
-
order: z.number().
|
|
99
|
+
order: z.number().prefault(0),
|
|
98
100
|
/** Whether the layer is visible */
|
|
99
|
-
visible: z.boolean().
|
|
101
|
+
visible: z.boolean().prefault(true),
|
|
100
102
|
/** Whether audio in this layer is muted */
|
|
101
|
-
muted: z.boolean().
|
|
103
|
+
muted: z.boolean().prefault(false),
|
|
102
104
|
/** Components contained in this layer */
|
|
103
105
|
components: z
|
|
104
106
|
.array(
|
|
105
107
|
// Will be extended with component schemas in components.ts
|
|
106
108
|
ComponentShape)
|
|
107
|
-
.
|
|
109
|
+
.prefault([])
|
|
108
110
|
});
|
|
109
111
|
/**
|
|
110
112
|
* Audio track schema for global audio playback
|
|
@@ -113,14 +115,14 @@ export const AudioTrackShape = z.object({
|
|
|
113
115
|
id: z.string(),
|
|
114
116
|
name: z.string().optional(),
|
|
115
117
|
url: z.string(),
|
|
116
|
-
volume: z.number().min(0).max(1).
|
|
118
|
+
volume: z.number().min(0).max(1).prefault(1),
|
|
117
119
|
startAt: z.number().min(0).transform(toFixed3),
|
|
118
120
|
endAt: z
|
|
119
121
|
.number()
|
|
120
122
|
.min(0)
|
|
121
123
|
.optional()
|
|
122
124
|
.transform((val) => (val === undefined ? undefined : toFixed3(val))),
|
|
123
|
-
muted: z.boolean().
|
|
125
|
+
muted: z.boolean().prefault(false)
|
|
124
126
|
});
|
|
125
127
|
/**
|
|
126
128
|
* Schema for transitions between components
|
|
@@ -133,12 +135,12 @@ export const SceneTransitionShape = z.object({
|
|
|
133
135
|
type: z.string(),
|
|
134
136
|
presetId: z.string().optional(),
|
|
135
137
|
duration: z.number().min(0).transform(toFixed3),
|
|
136
|
-
parameters: z.record(z.unknown()).optional()
|
|
138
|
+
parameters: z.record(z.string(), z.unknown()).optional()
|
|
137
139
|
});
|
|
138
140
|
/**
|
|
139
141
|
* Schema for the main scene structure in v2.0
|
|
140
142
|
*/
|
|
141
|
-
export const SceneShape = z.
|
|
143
|
+
export const SceneShape = z.strictObject({
|
|
142
144
|
/** Unique identifier for the scene */
|
|
143
145
|
id: z.string(),
|
|
144
146
|
/** Schema version */
|
|
@@ -146,15 +148,15 @@ export const SceneShape = z.object({
|
|
|
146
148
|
/** Optional name for the scene */
|
|
147
149
|
name: z.string().optional(),
|
|
148
150
|
/** Scene settings */
|
|
149
|
-
settings: SceneSettingsShape
|
|
151
|
+
settings: SceneSettingsShape,
|
|
150
152
|
/** Assets registry */
|
|
151
|
-
assets: z.array(SceneAssetShape).
|
|
153
|
+
assets: z.array(SceneAssetShape).prefault([]),
|
|
152
154
|
/** Layers in the scene */
|
|
153
|
-
layers: z.array(SceneLayerShape
|
|
155
|
+
layers: z.array(SceneLayerShape).prefault([]),
|
|
154
156
|
/** Scene transitions */
|
|
155
|
-
transitions: z.array(SceneTransitionShape).
|
|
157
|
+
transitions: z.array(SceneTransitionShape).prefault([]),
|
|
156
158
|
/** Audio tracks */
|
|
157
|
-
audioTracks: z.array(AudioTrackShape).
|
|
159
|
+
audioTracks: z.array(AudioTrackShape).prefault([]),
|
|
158
160
|
/** Optional checksum */
|
|
159
161
|
checksum: z.string().optional()
|
|
160
162
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export * from './core.js';
|
|
2
|
+
export type * from './core.js';
|
|
2
3
|
export * from './components.js';
|
|
3
|
-
export * from './properties.js';
|
|
4
|
-
export * from './animations.js';
|
|
5
4
|
export type * from './components.js';
|
|
5
|
+
export * from './properties.js';
|
|
6
6
|
export type * from './properties.js';
|
|
7
|
-
export
|
|
7
|
+
export * from './animations.js';
|
|
8
|
+
export type * from './animations.js';
|
|
8
9
|
export * from './subtitles.js';
|
|
10
|
+
export type * from './subtitles.js';
|
|
9
11
|
export type FontType = {
|
|
10
12
|
alias: string;
|
|
11
13
|
url?: string;
|