@genfeedai/workflow-ui 0.2.2 → 0.2.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.
- package/README.md +11 -33
- package/dist/canvas.d.ts +22 -22
- package/dist/canvas.mjs +16 -17
- package/dist/{chunk-WBR34V4L.mjs → chunk-2FUPL67V.mjs} +1593 -1045
- package/dist/{chunk-4VEN4UN7.mjs → chunk-53XDE62A.mjs} +818 -623
- package/dist/{chunk-PCIWWD37.mjs → chunk-7LV4UAUS.mjs} +19 -19
- package/dist/{chunk-7SKSRSS7.mjs → chunk-B4EAAKYF.mjs} +16 -16
- package/dist/{chunk-ZJD5WMR3.mjs → chunk-C6MQBJFC.mjs} +45 -13
- package/dist/{chunk-7H3WJJYS.mjs → chunk-ESVULCFY.mjs} +12 -6
- package/dist/{chunk-GWBGK3KL.mjs → chunk-FWJIAW2E.mjs} +82 -47
- package/dist/{chunk-R727OFBR.mjs → chunk-GPYIIWD5.mjs} +404 -350
- package/dist/{chunk-OQREHJXK.mjs → chunk-IYFWAJBB.mjs} +208 -203
- package/dist/{chunk-2JQSKIWR.mjs → chunk-MGLAKMDP.mjs} +24 -23
- package/dist/{chunk-LT3ZJJL6.mjs → chunk-OJWVEEMM.mjs} +497 -399
- package/dist/{chunk-ZD2BADZO.mjs → chunk-ORVDYXDP.mjs} +221 -175
- package/dist/{chunk-CV4M7CNU.mjs → chunk-QQVHGJ2G.mjs} +149 -142
- package/dist/{chunk-6PSJTBNV.mjs → chunk-U4QPE4CY.mjs} +387 -347
- package/dist/{chunk-EFXQT23N.mjs → chunk-VVQ4CH77.mjs} +5 -5
- package/dist/{chunk-VRN3UWE5.mjs → chunk-XRC3O5GK.mjs} +73 -73
- package/dist/{chunk-FT33LFII.mjs → chunk-YUIK4AHM.mjs} +1 -1
- package/dist/{chunk-JT4Y5H3U.mjs → chunk-ZSITTZ4S.mjs} +630 -569
- package/dist/hooks.d.ts +37 -37
- package/dist/hooks.mjs +10 -10
- package/dist/index.d.ts +26 -11
- package/dist/index.mjs +99 -20
- package/dist/lib.d.ts +203 -203
- package/dist/lib.mjs +228 -199
- package/dist/nodes.d.ts +2 -2
- package/dist/nodes.mjs +12 -13
- package/dist/panels.d.ts +2 -3
- package/dist/panels.mjs +3 -3
- package/dist/provider.d.ts +2 -2
- package/dist/provider.mjs +2 -2
- package/dist/stores.d.ts +5 -5
- package/dist/stores.mjs +5 -5
- package/dist/toolbar.d.ts +42 -24
- package/dist/toolbar.mjs +4 -5
- package/dist/ui.d.ts +2 -2
- package/dist/ui.mjs +2 -2
- package/dist/{useCommentNavigation-BakbiiIc.d.ts → useRequiredInputs-ByoIS-fT.d.ts} +160 -160
- package/dist/{promptLibraryStore-Dl3Q3cP6.d.ts → workflowStore-Bsz0nd5c.d.ts} +368 -368
- package/dist/workflowStore-N2F7WIG3.mjs +2 -0
- package/package.json +79 -77
- package/src/styles/workflow-ui.css +56 -19
- package/dist/chunk-OY7BRSGG.mjs +0 -60
- package/dist/workflowStore-UAAKOOIK.mjs +0 -2
- package/dist/{types-IEKYuYhu.d.ts → types-CRXJnajq.d.ts} +1 -1
|
@@ -1,47 +1,99 @@
|
|
|
1
1
|
import { memo, useRef, useState, useCallback } from 'react';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
// src/lib/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return { url: mcData.outputVideo, type: mcData.outputVideo ? "video" : null };
|
|
31
|
-
}
|
|
32
|
-
case "download": {
|
|
33
|
-
const outData = data;
|
|
34
|
-
if (outData.inputVideo) {
|
|
35
|
-
return { url: outData.inputVideo, type: "video" };
|
|
36
|
-
}
|
|
37
|
-
if (outData.inputImage) {
|
|
38
|
-
return { url: outData.inputImage, type: "image" };
|
|
39
|
-
}
|
|
40
|
-
return { url: null, type: null };
|
|
41
|
-
}
|
|
42
|
-
default:
|
|
43
|
-
return { url: null, type: null };
|
|
4
|
+
// src/lib/models/registry.ts
|
|
5
|
+
var IMAGE_MODELS = [
|
|
6
|
+
{ apiId: "google/nano-banana", label: "Nano Banana", value: "nano-banana" },
|
|
7
|
+
{
|
|
8
|
+
apiId: "google/nano-banana-pro",
|
|
9
|
+
label: "Nano Banana Pro",
|
|
10
|
+
value: "nano-banana-pro"
|
|
11
|
+
}
|
|
12
|
+
];
|
|
13
|
+
var IMAGE_MODEL_MAP = Object.fromEntries(
|
|
14
|
+
IMAGE_MODELS.map((m) => [m.apiId, m.value])
|
|
15
|
+
);
|
|
16
|
+
var IMAGE_MODEL_ID_MAP = Object.fromEntries(IMAGE_MODELS.map((m) => [m.value, m.apiId]));
|
|
17
|
+
var DEFAULT_IMAGE_MODEL = "nano-banana-pro";
|
|
18
|
+
var VIDEO_MODELS = [
|
|
19
|
+
{
|
|
20
|
+
apiId: "google/veo-3.1-fast",
|
|
21
|
+
description: "Fast",
|
|
22
|
+
label: "Veo 3.1 Fast",
|
|
23
|
+
value: "veo-3.1-fast"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
apiId: "google/veo-3.1",
|
|
27
|
+
description: "High quality",
|
|
28
|
+
label: "Veo 3.1",
|
|
29
|
+
value: "veo-3.1"
|
|
44
30
|
}
|
|
31
|
+
];
|
|
32
|
+
var VIDEO_MODEL_MAP = Object.fromEntries(
|
|
33
|
+
VIDEO_MODELS.map((m) => [m.apiId, m.value])
|
|
34
|
+
);
|
|
35
|
+
var VIDEO_MODEL_ID_MAP = Object.fromEntries(VIDEO_MODELS.map((m) => [m.value, m.apiId]));
|
|
36
|
+
var DEFAULT_VIDEO_MODEL = "veo-3.1-fast";
|
|
37
|
+
var LIPSYNC_MODELS = [
|
|
38
|
+
{
|
|
39
|
+
label: "OmniHuman (Image)",
|
|
40
|
+
supportsImage: true,
|
|
41
|
+
value: "bytedance/omni-human"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "VEED Fabric (Image)",
|
|
45
|
+
supportsImage: true,
|
|
46
|
+
value: "veed/fabric-1.0"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: "Sync Labs Pro (Video)",
|
|
50
|
+
supportsImage: false,
|
|
51
|
+
value: "sync/lipsync-2-pro"
|
|
52
|
+
},
|
|
53
|
+
{ label: "Sync Labs (Video)", supportsImage: false, value: "sync/lipsync-2" },
|
|
54
|
+
{ label: "Pixverse", supportsImage: true, value: "pixverse/lipsync" }
|
|
55
|
+
];
|
|
56
|
+
var LIPSYNC_SYNC_MODES = [
|
|
57
|
+
{ label: "Loop", value: "loop" },
|
|
58
|
+
{ label: "Bounce", value: "bounce" },
|
|
59
|
+
{ label: "Cut Off", value: "cut_off" },
|
|
60
|
+
{ label: "Silence", value: "silence" },
|
|
61
|
+
{ label: "Remap", value: "remap" }
|
|
62
|
+
];
|
|
63
|
+
var DEFAULT_LIPSYNC_MODEL = "bytedance/omni-human";
|
|
64
|
+
var LLM_MODELS = [
|
|
65
|
+
{
|
|
66
|
+
apiId: "meta/meta-llama-3.1-405b-instruct",
|
|
67
|
+
label: "Llama 3.1 405B",
|
|
68
|
+
value: "meta-llama-3.1-405b-instruct"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
apiId: "anthropic/claude-4.5-sonnet",
|
|
72
|
+
label: "Claude 4.5 Sonnet",
|
|
73
|
+
value: "claude-4.5-sonnet"
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
var LLM_MODEL_MAP = Object.fromEntries(
|
|
77
|
+
LLM_MODELS.map((m) => [m.apiId, m.value])
|
|
78
|
+
);
|
|
79
|
+
var LLM_MODEL_ID_MAP = Object.fromEntries(
|
|
80
|
+
LLM_MODELS.map((m) => [m.value, m.apiId])
|
|
81
|
+
);
|
|
82
|
+
var DEFAULT_LLM_MODEL = "meta-llama-3.1-405b-instruct";
|
|
83
|
+
function getImageModelLabel(model) {
|
|
84
|
+
return IMAGE_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
85
|
+
}
|
|
86
|
+
function getVideoModelLabel(model) {
|
|
87
|
+
return VIDEO_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
88
|
+
}
|
|
89
|
+
function getLipSyncModelLabel(model) {
|
|
90
|
+
return LIPSYNC_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
91
|
+
}
|
|
92
|
+
function getLLMModelLabel(model) {
|
|
93
|
+
return LLM_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
94
|
+
}
|
|
95
|
+
function lipSyncModelSupportsImage(model) {
|
|
96
|
+
return LIPSYNC_MODELS.find((m) => m.value === model)?.supportsImage ?? false;
|
|
45
97
|
}
|
|
46
98
|
|
|
47
99
|
// src/lib/schemaHandles.ts
|
|
@@ -77,35 +129,35 @@ var HANDLE_FIELDS = /* @__PURE__ */ new Set([
|
|
|
77
129
|
"audio_url"
|
|
78
130
|
]);
|
|
79
131
|
var FIELD_TO_HANDLE_TYPE = {
|
|
80
|
-
//
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
132
|
+
// Audio fields
|
|
133
|
+
audio: "audio",
|
|
134
|
+
audio_url: "audio",
|
|
135
|
+
control_image: "image",
|
|
136
|
+
end_image: "image",
|
|
137
|
+
face_image: "image",
|
|
138
|
+
first_frame_image: "image",
|
|
84
139
|
// Image fields (single)
|
|
85
140
|
image: "image",
|
|
86
141
|
image_input: "image",
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
end_image: "image",
|
|
142
|
+
image_url: "image",
|
|
143
|
+
init_image: "image",
|
|
90
144
|
last_frame: "image",
|
|
91
145
|
mask: "image",
|
|
92
146
|
mask_image: "image",
|
|
93
|
-
|
|
94
|
-
init_image: "image",
|
|
95
|
-
subject_image: "image",
|
|
96
|
-
face_image: "image",
|
|
97
|
-
style_image: "image",
|
|
147
|
+
negative_prompt: "text",
|
|
98
148
|
pose_image: "image",
|
|
99
|
-
|
|
100
|
-
|
|
149
|
+
// Text fields
|
|
150
|
+
prompt: "text",
|
|
101
151
|
// Image fields (array)
|
|
102
152
|
reference_images: "image",
|
|
153
|
+
start_image: "image",
|
|
154
|
+
style_image: "image",
|
|
155
|
+
subject_image: "image",
|
|
156
|
+
subject_reference: "text",
|
|
157
|
+
tail_image_url: "image",
|
|
103
158
|
// Video fields
|
|
104
159
|
video: "video",
|
|
105
|
-
video_url: "video"
|
|
106
|
-
// Audio fields
|
|
107
|
-
audio: "audio",
|
|
108
|
-
audio_url: "audio"
|
|
160
|
+
video_url: "video"
|
|
109
161
|
};
|
|
110
162
|
function generateHandlesFromSchema(inputSchema, staticHandles) {
|
|
111
163
|
if (!inputSchema) return staticHandles;
|
|
@@ -119,12 +171,12 @@ function generateHandlesFromSchema(inputSchema, staticHandles) {
|
|
|
119
171
|
if (!handleType) continue;
|
|
120
172
|
const label = prop.title || fieldName.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
121
173
|
dynamicHandles.push({
|
|
174
|
+
fromSchema: true,
|
|
122
175
|
id: fieldName,
|
|
123
|
-
type: handleType,
|
|
124
176
|
label,
|
|
125
177
|
multiple: prop.type === "array",
|
|
126
178
|
required: schema.required?.includes(fieldName),
|
|
127
|
-
|
|
179
|
+
type: handleType
|
|
128
180
|
});
|
|
129
181
|
}
|
|
130
182
|
return [...staticHandles, ...dynamicHandles];
|
|
@@ -133,296 +185,56 @@ function isSchemaHandle(handle) {
|
|
|
133
185
|
return handle.fromSchema === true;
|
|
134
186
|
}
|
|
135
187
|
|
|
136
|
-
// src/lib/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
var DEFAULT_IMAGE_MODEL = "nano-banana-pro";
|
|
148
|
-
var VIDEO_MODELS = [
|
|
149
|
-
{
|
|
150
|
-
value: "veo-3.1-fast",
|
|
151
|
-
label: "Veo 3.1 Fast",
|
|
152
|
-
description: "Fast",
|
|
153
|
-
apiId: "google/veo-3.1-fast"
|
|
154
|
-
},
|
|
155
|
-
{ value: "veo-3.1", label: "Veo 3.1", description: "High quality", apiId: "google/veo-3.1" }
|
|
156
|
-
];
|
|
157
|
-
var VIDEO_MODEL_MAP = Object.fromEntries(
|
|
158
|
-
VIDEO_MODELS.map((m) => [m.apiId, m.value])
|
|
159
|
-
);
|
|
160
|
-
var VIDEO_MODEL_ID_MAP = Object.fromEntries(
|
|
161
|
-
VIDEO_MODELS.map((m) => [m.value, m.apiId])
|
|
162
|
-
);
|
|
163
|
-
var DEFAULT_VIDEO_MODEL = "veo-3.1-fast";
|
|
164
|
-
var LIPSYNC_MODELS = [
|
|
165
|
-
{ value: "bytedance/omni-human", label: "OmniHuman (Image)", supportsImage: true },
|
|
166
|
-
{ value: "veed/fabric-1.0", label: "VEED Fabric (Image)", supportsImage: true },
|
|
167
|
-
{ value: "sync/lipsync-2-pro", label: "Sync Labs Pro (Video)", supportsImage: false },
|
|
168
|
-
{ value: "sync/lipsync-2", label: "Sync Labs (Video)", supportsImage: false },
|
|
169
|
-
{ value: "pixverse/lipsync", label: "Pixverse", supportsImage: true }
|
|
170
|
-
];
|
|
171
|
-
var LIPSYNC_SYNC_MODES = [
|
|
172
|
-
{ value: "loop", label: "Loop" },
|
|
173
|
-
{ value: "bounce", label: "Bounce" },
|
|
174
|
-
{ value: "cut_off", label: "Cut Off" },
|
|
175
|
-
{ value: "silence", label: "Silence" },
|
|
176
|
-
{ value: "remap", label: "Remap" }
|
|
177
|
-
];
|
|
178
|
-
var DEFAULT_LIPSYNC_MODEL = "bytedance/omni-human";
|
|
179
|
-
var LLM_MODELS = [
|
|
180
|
-
{
|
|
181
|
-
value: "meta-llama-3.1-405b-instruct",
|
|
182
|
-
label: "Llama 3.1 405B",
|
|
183
|
-
apiId: "meta/meta-llama-3.1-405b-instruct"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
value: "claude-4.5-sonnet",
|
|
187
|
-
label: "Claude 4.5 Sonnet",
|
|
188
|
-
apiId: "anthropic/claude-4.5-sonnet"
|
|
189
|
-
}
|
|
190
|
-
];
|
|
191
|
-
var LLM_MODEL_MAP = Object.fromEntries(
|
|
192
|
-
LLM_MODELS.map((m) => [m.apiId, m.value])
|
|
193
|
-
);
|
|
194
|
-
var LLM_MODEL_ID_MAP = Object.fromEntries(
|
|
195
|
-
LLM_MODELS.map((m) => [m.value, m.apiId])
|
|
196
|
-
);
|
|
197
|
-
var DEFAULT_LLM_MODEL = "meta-llama-3.1-405b-instruct";
|
|
198
|
-
function getImageModelLabel(model) {
|
|
199
|
-
return IMAGE_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
200
|
-
}
|
|
201
|
-
function getVideoModelLabel(model) {
|
|
202
|
-
return VIDEO_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
203
|
-
}
|
|
204
|
-
function getLipSyncModelLabel(model) {
|
|
205
|
-
return LIPSYNC_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
206
|
-
}
|
|
207
|
-
function getLLMModelLabel(model) {
|
|
208
|
-
return LLM_MODELS.find((m) => m.value === model)?.label ?? model;
|
|
209
|
-
}
|
|
210
|
-
function lipSyncModelSupportsImage(model) {
|
|
211
|
-
return LIPSYNC_MODELS.find((m) => m.value === model)?.supportsImage ?? false;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// src/lib/easing.ts
|
|
215
|
-
var EASING_PRESETS = {
|
|
216
|
-
// Linear - no easing
|
|
217
|
-
linear: [0, 0, 1, 1],
|
|
218
|
-
// Standard easing functions
|
|
219
|
-
easeIn: [0.42, 0, 1, 1],
|
|
220
|
-
easeOut: [0, 0, 0.58, 1],
|
|
221
|
-
easeInOut: [0.42, 0, 0.58, 1],
|
|
222
|
-
// Quadratic easing
|
|
223
|
-
easeInQuad: [0.55, 0.085, 0.68, 0.53],
|
|
224
|
-
easeOutQuad: [0.25, 0.46, 0.45, 0.94],
|
|
225
|
-
easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
|
|
226
|
-
// Cubic easing
|
|
227
|
-
easeInCubic: [0.55, 0.055, 0.675, 0.19],
|
|
228
|
-
easeOutCubic: [0.215, 0.61, 0.355, 1],
|
|
229
|
-
easeInOutCubic: [0.645, 0.045, 0.355, 1],
|
|
230
|
-
// Exponential easing
|
|
231
|
-
easeInExpo: [0.95, 0.05, 0.795, 0.035],
|
|
232
|
-
easeOutExpo: [0.19, 1, 0.22, 1],
|
|
233
|
-
easeInOutExpo: [1, 0, 0, 1]
|
|
234
|
-
};
|
|
235
|
-
var DEFAULT_CUSTOM_BEZIER = [0.42, 0, 0.58, 1];
|
|
236
|
-
var PRESET_BEZIERS = {
|
|
237
|
-
easeInExpoOutCubic: [0.85, 0, 0.15, 1],
|
|
238
|
-
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
239
|
-
easeInQuartOutQuad: [0.8, 0, 0.2, 1],
|
|
240
|
-
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
241
|
-
easeInOutSine: [0.37, 0, 0.63, 1]
|
|
242
|
-
};
|
|
243
|
-
var EASING_BEZIER_MAP = {
|
|
244
|
-
...PRESET_BEZIERS,
|
|
245
|
-
linear: [0, 0, 1, 1],
|
|
246
|
-
easeInSine: [0.12, 0, 0.39, 0],
|
|
247
|
-
easeOutSine: [0.61, 1, 0.88, 1],
|
|
248
|
-
easeInQuad: [0.11, 0, 0.5, 0],
|
|
249
|
-
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
250
|
-
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
251
|
-
easeInCubic: [0.32, 0, 0.67, 0],
|
|
252
|
-
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
253
|
-
easeInQuart: [0.5, 0, 0.75, 0],
|
|
254
|
-
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
255
|
-
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
256
|
-
easeInQuint: [0.64, 0, 0.78, 0],
|
|
257
|
-
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
258
|
-
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
259
|
-
easeInExpo: [0.7, 0, 0.84, 0],
|
|
260
|
-
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
261
|
-
easeInCirc: [0.55, 0, 1, 0.45],
|
|
262
|
-
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
263
|
-
easeInOutCirc: [0.85, 0, 0.15, 1]
|
|
264
|
-
};
|
|
265
|
-
function getPresetBezier(preset) {
|
|
266
|
-
const handles = preset ? PRESET_BEZIERS[preset] : null;
|
|
267
|
-
const source = handles ?? DEFAULT_CUSTOM_BEZIER;
|
|
268
|
-
return [...source];
|
|
269
|
-
}
|
|
270
|
-
function getEasingBezier(name) {
|
|
271
|
-
const handles = name ? EASING_BEZIER_MAP[name] : null;
|
|
272
|
-
const source = handles ?? DEFAULT_CUSTOM_BEZIER;
|
|
273
|
-
return [...source];
|
|
274
|
-
}
|
|
275
|
-
function createAsymmetricEase(easeIn, easeOut) {
|
|
276
|
-
return (t) => {
|
|
277
|
-
if (t <= 0.5) {
|
|
278
|
-
return 0.5 * easeIn(t * 2);
|
|
188
|
+
// src/lib/mediaExtraction.ts
|
|
189
|
+
function getMediaFromNode(nodeType, data) {
|
|
190
|
+
switch (nodeType) {
|
|
191
|
+
case "imageGen": {
|
|
192
|
+
const imgData = data;
|
|
193
|
+
const urls = imgData.outputImages?.length ? imgData.outputImages : [];
|
|
194
|
+
return {
|
|
195
|
+
type: imgData.outputImage || urls.length ? "image" : null,
|
|
196
|
+
url: imgData.outputImage,
|
|
197
|
+
urls
|
|
198
|
+
};
|
|
279
199
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
easeOutQuad: (t) => t * (2 - t),
|
|
287
|
-
easeInOutQuad: (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t,
|
|
288
|
-
easeInCubic: (t) => t * t * t,
|
|
289
|
-
easeOutCubic: (t) => {
|
|
290
|
-
const t1 = t - 1;
|
|
291
|
-
return t1 * t1 * t1 + 1;
|
|
292
|
-
},
|
|
293
|
-
easeInOutCubic: (t) => t < 0.5 ? 4 * t * t * t : 1 - (-2 * t + 2) ** 3 / 2,
|
|
294
|
-
easeInQuart: (t) => t * t * t * t,
|
|
295
|
-
easeOutQuart: (t) => {
|
|
296
|
-
const t1 = t - 1;
|
|
297
|
-
return 1 - t1 * t1 * t1 * t1;
|
|
298
|
-
},
|
|
299
|
-
easeInOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - (-2 * t + 2) ** 4 / 2,
|
|
300
|
-
easeInQuint: (t) => t * t * t * t * t,
|
|
301
|
-
easeOutQuint: (t) => {
|
|
302
|
-
const t1 = t - 1;
|
|
303
|
-
return 1 + t1 * t1 * t1 * t1 * t1;
|
|
304
|
-
},
|
|
305
|
-
easeInOutQuint: (t) => t < 0.5 ? 16 * t * t * t * t * t : 1 - (-2 * t + 2) ** 5 / 2,
|
|
306
|
-
easeInSine: (t) => 1 - Math.cos(t * Math.PI / 2),
|
|
307
|
-
easeOutSine: (t) => Math.sin(t * Math.PI / 2),
|
|
308
|
-
easeInOutSine: (t) => -(Math.cos(Math.PI * t) - 1) / 2,
|
|
309
|
-
easeInExpo: (t) => t === 0 ? 0 : 2 ** (10 * t - 10),
|
|
310
|
-
easeOutExpo: (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t),
|
|
311
|
-
easeInOutExpo: (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2,
|
|
312
|
-
easeInCirc: (t) => 1 - Math.sqrt(1 - t ** 2),
|
|
313
|
-
easeOutCirc: (t) => Math.sqrt(1 - (t - 1) ** 2),
|
|
314
|
-
easeInOutCirc: (t) => t < 0.5 ? (1 - Math.sqrt(1 - (2 * t) ** 2)) / 2 : (Math.sqrt(1 - (-2 * t + 2) ** 2) + 1) / 2
|
|
315
|
-
};
|
|
316
|
-
var hybridEasing = {
|
|
317
|
-
easeInExpoOutCubic: createAsymmetricEase(baseEasing.easeInExpo, baseEasing.easeOutCubic),
|
|
318
|
-
easeInQuartOutQuad: createAsymmetricEase(baseEasing.easeInQuart, baseEasing.easeOutQuad)
|
|
319
|
-
};
|
|
320
|
-
var easing = {
|
|
321
|
-
...baseEasing,
|
|
322
|
-
...hybridEasing
|
|
323
|
-
};
|
|
324
|
-
function createBezierEasing(p1x, p1y, p2x, p2y) {
|
|
325
|
-
const clamp = (value) => Math.min(1, Math.max(0, value));
|
|
326
|
-
const x1 = clamp(p1x);
|
|
327
|
-
const y1 = clamp(p1y);
|
|
328
|
-
const x2 = clamp(p2x);
|
|
329
|
-
const y2 = clamp(p2y);
|
|
330
|
-
const cx = 3 * x1;
|
|
331
|
-
const bx = 3 * (x2 - x1) - cx;
|
|
332
|
-
const ax = 1 - cx - bx;
|
|
333
|
-
const cy = 3 * y1;
|
|
334
|
-
const by = 3 * (y2 - y1) - cy;
|
|
335
|
-
const ay = 1 - cy - by;
|
|
336
|
-
const sampleCurveX = (t) => ((ax * t + bx) * t + cx) * t;
|
|
337
|
-
const sampleCurveY = (t) => ((ay * t + by) * t + cy) * t;
|
|
338
|
-
const sampleDerivativeX = (t) => (3 * ax * t + 2 * bx) * t + cx;
|
|
339
|
-
const solveCurveX = (x) => {
|
|
340
|
-
let t2 = x;
|
|
341
|
-
const epsilon = 1e-6;
|
|
342
|
-
for (let i = 0; i < 8; i++) {
|
|
343
|
-
const x2err = sampleCurveX(t2) - x;
|
|
344
|
-
if (Math.abs(x2err) < epsilon) return t2;
|
|
345
|
-
const d2 = sampleDerivativeX(t2);
|
|
346
|
-
if (Math.abs(d2) < epsilon) break;
|
|
347
|
-
t2 -= x2err / d2;
|
|
200
|
+
case "videoGen": {
|
|
201
|
+
const vidData = data;
|
|
202
|
+
return {
|
|
203
|
+
type: vidData.outputVideo ? "video" : null,
|
|
204
|
+
url: vidData.outputVideo
|
|
205
|
+
};
|
|
348
206
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
while (t0 < t1) {
|
|
353
|
-
const x2err = sampleCurveX(t2);
|
|
354
|
-
if (Math.abs(x2err - x) < epsilon) return t2;
|
|
355
|
-
if (x > x2err) t0 = t2;
|
|
356
|
-
else t1 = t2;
|
|
357
|
-
t2 = (t1 + t0) / 2;
|
|
207
|
+
case "imageInput": {
|
|
208
|
+
const inputData = data;
|
|
209
|
+
return { type: inputData.image ? "image" : null, url: inputData.image };
|
|
358
210
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
function applySpeedCurve(duration, curve, sampleRate = 60) {
|
|
387
|
-
const timestamps = [];
|
|
388
|
-
for (let i = 0; i <= sampleRate; i++) {
|
|
389
|
-
const t = i / sampleRate;
|
|
390
|
-
const easedT = evaluateBezier(t, curve);
|
|
391
|
-
timestamps.push(easedT * duration);
|
|
211
|
+
case "videoInput": {
|
|
212
|
+
const vidInputData = data;
|
|
213
|
+
return {
|
|
214
|
+
type: vidInputData.video ? "video" : null,
|
|
215
|
+
url: vidInputData.video
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
case "motionControl": {
|
|
219
|
+
const mcData = data;
|
|
220
|
+
return {
|
|
221
|
+
type: mcData.outputVideo ? "video" : null,
|
|
222
|
+
url: mcData.outputVideo
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
case "download": {
|
|
226
|
+
const outData = data;
|
|
227
|
+
if (outData.inputVideo) {
|
|
228
|
+
return { type: "video", url: outData.inputVideo };
|
|
229
|
+
}
|
|
230
|
+
if (outData.inputImage) {
|
|
231
|
+
return { type: "image", url: outData.inputImage };
|
|
232
|
+
}
|
|
233
|
+
return { type: null, url: null };
|
|
234
|
+
}
|
|
235
|
+
default:
|
|
236
|
+
return { type: null, url: null };
|
|
392
237
|
}
|
|
393
|
-
return timestamps;
|
|
394
|
-
}
|
|
395
|
-
var EASING_DISPLAY_NAMES = {
|
|
396
|
-
linear: "Linear",
|
|
397
|
-
easeIn: "Ease In",
|
|
398
|
-
easeOut: "Ease Out",
|
|
399
|
-
easeInOut: "Ease In Out",
|
|
400
|
-
easeInQuad: "Ease In Quadratic",
|
|
401
|
-
easeOutQuad: "Ease Out Quadratic",
|
|
402
|
-
easeInOutQuad: "Ease In Out Quadratic",
|
|
403
|
-
easeInCubic: "Ease In Cubic",
|
|
404
|
-
easeOutCubic: "Ease Out Cubic",
|
|
405
|
-
easeInOutCubic: "Ease In Out Cubic",
|
|
406
|
-
easeInQuart: "Ease In Quartic",
|
|
407
|
-
easeOutQuart: "Ease Out Quartic",
|
|
408
|
-
easeInOutQuart: "Ease In Out Quartic",
|
|
409
|
-
easeInQuint: "Ease In Quintic",
|
|
410
|
-
easeOutQuint: "Ease Out Quintic",
|
|
411
|
-
easeInOutQuint: "Ease In Out Quintic",
|
|
412
|
-
easeInSine: "Ease In Sine",
|
|
413
|
-
easeOutSine: "Ease Out Sine",
|
|
414
|
-
easeInOutSine: "Ease In Out Sine",
|
|
415
|
-
easeInExpo: "Ease In Exponential",
|
|
416
|
-
easeOutExpo: "Ease Out Exponential",
|
|
417
|
-
easeInOutExpo: "Ease In Out Exponential",
|
|
418
|
-
easeInCirc: "Ease In Circular",
|
|
419
|
-
easeOutCirc: "Ease Out Circular",
|
|
420
|
-
easeInOutCirc: "Ease In Out Circular",
|
|
421
|
-
easeInExpoOutCubic: "Expo In \u2192 Cubic Out",
|
|
422
|
-
easeInQuartOutQuad: "Quart In \u2192 Quad Out"
|
|
423
|
-
};
|
|
424
|
-
function getEasingDisplayName(preset) {
|
|
425
|
-
return EASING_DISPLAY_NAMES[preset] || preset;
|
|
426
238
|
}
|
|
427
239
|
var PADDING = 16;
|
|
428
240
|
var POINT_RADIUS = 8;
|
|
@@ -583,7 +395,15 @@ function CubicBezierEditorComponent({
|
|
|
583
395
|
opacity: 0.5
|
|
584
396
|
}
|
|
585
397
|
),
|
|
586
|
-
/* @__PURE__ */ jsx(
|
|
398
|
+
/* @__PURE__ */ jsx(
|
|
399
|
+
"path",
|
|
400
|
+
{
|
|
401
|
+
d: curvePath,
|
|
402
|
+
fill: "none",
|
|
403
|
+
stroke: "var(--primary)",
|
|
404
|
+
strokeWidth: 2.5
|
|
405
|
+
}
|
|
406
|
+
),
|
|
587
407
|
/* @__PURE__ */ jsx("circle", { cx: p0x, cy: p0y, r: 3, fill: "var(--foreground)" }),
|
|
588
408
|
/* @__PURE__ */ jsx("circle", { cx: p3x, cy: p3y, r: 3, fill: "var(--foreground)" }),
|
|
589
409
|
/* @__PURE__ */ jsx(
|
|
@@ -635,4 +455,224 @@ function CubicBezierEditorComponent({
|
|
|
635
455
|
}
|
|
636
456
|
var CubicBezierEditor = memo(CubicBezierEditorComponent);
|
|
637
457
|
|
|
458
|
+
// src/lib/easing.ts
|
|
459
|
+
var EASING_PRESETS = {
|
|
460
|
+
// Standard easing functions
|
|
461
|
+
easeIn: [0.42, 0, 1, 1],
|
|
462
|
+
// Cubic easing
|
|
463
|
+
easeInCubic: [0.55, 0.055, 0.675, 0.19],
|
|
464
|
+
// Exponential easing
|
|
465
|
+
easeInExpo: [0.95, 0.05, 0.795, 0.035],
|
|
466
|
+
easeInOut: [0.42, 0, 0.58, 1],
|
|
467
|
+
easeInOutCubic: [0.645, 0.045, 0.355, 1],
|
|
468
|
+
easeInOutExpo: [1, 0, 0, 1],
|
|
469
|
+
easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
|
|
470
|
+
// Quadratic easing
|
|
471
|
+
easeInQuad: [0.55, 0.085, 0.68, 0.53],
|
|
472
|
+
easeOut: [0, 0, 0.58, 1],
|
|
473
|
+
easeOutCubic: [0.215, 0.61, 0.355, 1],
|
|
474
|
+
easeOutExpo: [0.19, 1, 0.22, 1],
|
|
475
|
+
easeOutQuad: [0.25, 0.46, 0.45, 0.94],
|
|
476
|
+
// Linear - no easing
|
|
477
|
+
linear: [0, 0, 1, 1]
|
|
478
|
+
};
|
|
479
|
+
var DEFAULT_CUSTOM_BEZIER = [0.42, 0, 0.58, 1];
|
|
480
|
+
var PRESET_BEZIERS = {
|
|
481
|
+
easeInExpoOutCubic: [0.85, 0, 0.15, 1],
|
|
482
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
483
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
484
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
485
|
+
easeInQuartOutQuad: [0.8, 0, 0.2, 1]
|
|
486
|
+
};
|
|
487
|
+
var EASING_BEZIER_MAP = {
|
|
488
|
+
...PRESET_BEZIERS,
|
|
489
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
|
490
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
|
491
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
|
492
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
493
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
494
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
495
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
496
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
|
497
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
|
498
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
|
499
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
|
500
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
501
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
502
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
503
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
504
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
505
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
506
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
|
507
|
+
linear: [0, 0, 1, 1]
|
|
508
|
+
};
|
|
509
|
+
function getPresetBezier(preset) {
|
|
510
|
+
const handles = preset ? PRESET_BEZIERS[preset] : null;
|
|
511
|
+
const source = handles ?? DEFAULT_CUSTOM_BEZIER;
|
|
512
|
+
return [...source];
|
|
513
|
+
}
|
|
514
|
+
function getEasingBezier(name) {
|
|
515
|
+
const handles = name ? EASING_BEZIER_MAP[name] : null;
|
|
516
|
+
const source = handles ?? DEFAULT_CUSTOM_BEZIER;
|
|
517
|
+
return [...source];
|
|
518
|
+
}
|
|
519
|
+
function createAsymmetricEase(easeIn, easeOut) {
|
|
520
|
+
return (t) => {
|
|
521
|
+
if (t <= 0.5) {
|
|
522
|
+
return 0.5 * easeIn(t * 2);
|
|
523
|
+
}
|
|
524
|
+
return 0.5 + 0.5 * easeOut((t - 0.5) * 2);
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
var baseEasing = {
|
|
528
|
+
easeInCirc: (t) => 1 - Math.sqrt(1 - t ** 2),
|
|
529
|
+
easeInCubic: (t) => t * t * t,
|
|
530
|
+
easeInExpo: (t) => t === 0 ? 0 : 2 ** (10 * t - 10),
|
|
531
|
+
easeInOutCirc: (t) => t < 0.5 ? (1 - Math.sqrt(1 - (2 * t) ** 2)) / 2 : (Math.sqrt(1 - (-2 * t + 2) ** 2) + 1) / 2,
|
|
532
|
+
easeInOutCubic: (t) => t < 0.5 ? 4 * t * t * t : 1 - (-2 * t + 2) ** 3 / 2,
|
|
533
|
+
easeInOutExpo: (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2,
|
|
534
|
+
easeInOutQuad: (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t,
|
|
535
|
+
easeInOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - (-2 * t + 2) ** 4 / 2,
|
|
536
|
+
easeInOutQuint: (t) => t < 0.5 ? 16 * t * t * t * t * t : 1 - (-2 * t + 2) ** 5 / 2,
|
|
537
|
+
easeInOutSine: (t) => -(Math.cos(Math.PI * t) - 1) / 2,
|
|
538
|
+
easeInQuad: (t) => t * t,
|
|
539
|
+
easeInQuart: (t) => t * t * t * t,
|
|
540
|
+
easeInQuint: (t) => t * t * t * t * t,
|
|
541
|
+
easeInSine: (t) => 1 - Math.cos(t * Math.PI / 2),
|
|
542
|
+
easeOutCirc: (t) => Math.sqrt(1 - (t - 1) ** 2),
|
|
543
|
+
easeOutCubic: (t) => {
|
|
544
|
+
const t1 = t - 1;
|
|
545
|
+
return t1 * t1 * t1 + 1;
|
|
546
|
+
},
|
|
547
|
+
easeOutExpo: (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t),
|
|
548
|
+
easeOutQuad: (t) => t * (2 - t),
|
|
549
|
+
easeOutQuart: (t) => {
|
|
550
|
+
const t1 = t - 1;
|
|
551
|
+
return 1 - t1 * t1 * t1 * t1;
|
|
552
|
+
},
|
|
553
|
+
easeOutQuint: (t) => {
|
|
554
|
+
const t1 = t - 1;
|
|
555
|
+
return 1 + t1 * t1 * t1 * t1 * t1;
|
|
556
|
+
},
|
|
557
|
+
easeOutSine: (t) => Math.sin(t * Math.PI / 2),
|
|
558
|
+
linear: (t) => t
|
|
559
|
+
};
|
|
560
|
+
var hybridEasing = {
|
|
561
|
+
easeInExpoOutCubic: createAsymmetricEase(
|
|
562
|
+
baseEasing.easeInExpo,
|
|
563
|
+
baseEasing.easeOutCubic
|
|
564
|
+
),
|
|
565
|
+
easeInQuartOutQuad: createAsymmetricEase(
|
|
566
|
+
baseEasing.easeInQuart,
|
|
567
|
+
baseEasing.easeOutQuad
|
|
568
|
+
)
|
|
569
|
+
};
|
|
570
|
+
var easing = {
|
|
571
|
+
...baseEasing,
|
|
572
|
+
...hybridEasing
|
|
573
|
+
};
|
|
574
|
+
function createBezierEasing(p1x, p1y, p2x, p2y) {
|
|
575
|
+
const clamp = (value) => Math.min(1, Math.max(0, value));
|
|
576
|
+
const x1 = clamp(p1x);
|
|
577
|
+
const y1 = clamp(p1y);
|
|
578
|
+
const x2 = clamp(p2x);
|
|
579
|
+
const y2 = clamp(p2y);
|
|
580
|
+
const cx = 3 * x1;
|
|
581
|
+
const bx = 3 * (x2 - x1) - cx;
|
|
582
|
+
const ax = 1 - cx - bx;
|
|
583
|
+
const cy = 3 * y1;
|
|
584
|
+
const by = 3 * (y2 - y1) - cy;
|
|
585
|
+
const ay = 1 - cy - by;
|
|
586
|
+
const sampleCurveX = (t) => ((ax * t + bx) * t + cx) * t;
|
|
587
|
+
const sampleCurveY = (t) => ((ay * t + by) * t + cy) * t;
|
|
588
|
+
const sampleDerivativeX = (t) => (3 * ax * t + 2 * bx) * t + cx;
|
|
589
|
+
const solveCurveX = (x) => {
|
|
590
|
+
let t2 = x;
|
|
591
|
+
const epsilon = 1e-6;
|
|
592
|
+
for (let i = 0; i < 8; i++) {
|
|
593
|
+
const x2err = sampleCurveX(t2) - x;
|
|
594
|
+
if (Math.abs(x2err) < epsilon) return t2;
|
|
595
|
+
const d2 = sampleDerivativeX(t2);
|
|
596
|
+
if (Math.abs(d2) < epsilon) break;
|
|
597
|
+
t2 -= x2err / d2;
|
|
598
|
+
}
|
|
599
|
+
let t0 = 0;
|
|
600
|
+
let t1 = 1;
|
|
601
|
+
t2 = x;
|
|
602
|
+
while (t0 < t1) {
|
|
603
|
+
const x2err = sampleCurveX(t2);
|
|
604
|
+
if (Math.abs(x2err - x) < epsilon) return t2;
|
|
605
|
+
if (x > x2err) t0 = t2;
|
|
606
|
+
else t1 = t2;
|
|
607
|
+
t2 = (t1 + t0) / 2;
|
|
608
|
+
}
|
|
609
|
+
return t2;
|
|
610
|
+
};
|
|
611
|
+
return (t) => {
|
|
612
|
+
const clamped = clamp(t);
|
|
613
|
+
return sampleCurveY(solveCurveX(clamped));
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
function getEasingFunction(name) {
|
|
617
|
+
const func = easing[name];
|
|
618
|
+
if (!func) return easing.linear;
|
|
619
|
+
return func;
|
|
620
|
+
}
|
|
621
|
+
function getAllEasingNames() {
|
|
622
|
+
return Object.keys(easing);
|
|
623
|
+
}
|
|
624
|
+
function evaluateBezier(t, curve) {
|
|
625
|
+
const [x1, y1, x2, y2] = curve;
|
|
626
|
+
const epsilon = 1e-6;
|
|
627
|
+
let guess = t;
|
|
628
|
+
for (let i = 0; i < 8; i++) {
|
|
629
|
+
const x = 3 * (1 - guess) * (1 - guess) * guess * x1 + 3 * (1 - guess) * guess * guess * x2 + guess * guess * guess - t;
|
|
630
|
+
if (Math.abs(x) < epsilon) break;
|
|
631
|
+
const dx = 3 * (1 - guess) * (1 - guess) * x1 + 6 * (1 - guess) * guess * (x2 - x1) + 3 * guess * guess * (1 - x2);
|
|
632
|
+
guess -= x / dx;
|
|
633
|
+
}
|
|
634
|
+
return 3 * (1 - guess) * (1 - guess) * guess * y1 + 3 * (1 - guess) * guess * guess * y2 + guess * guess * guess;
|
|
635
|
+
}
|
|
636
|
+
function applySpeedCurve(duration, curve, sampleRate = 60) {
|
|
637
|
+
const timestamps = [];
|
|
638
|
+
for (let i = 0; i <= sampleRate; i++) {
|
|
639
|
+
const t = i / sampleRate;
|
|
640
|
+
const easedT = evaluateBezier(t, curve);
|
|
641
|
+
timestamps.push(easedT * duration);
|
|
642
|
+
}
|
|
643
|
+
return timestamps;
|
|
644
|
+
}
|
|
645
|
+
var EASING_DISPLAY_NAMES = {
|
|
646
|
+
easeIn: "Ease In",
|
|
647
|
+
easeInCirc: "Ease In Circular",
|
|
648
|
+
easeInCubic: "Ease In Cubic",
|
|
649
|
+
easeInExpo: "Ease In Exponential",
|
|
650
|
+
easeInExpoOutCubic: "Expo In \u2192 Cubic Out",
|
|
651
|
+
easeInOut: "Ease In Out",
|
|
652
|
+
easeInOutCirc: "Ease In Out Circular",
|
|
653
|
+
easeInOutCubic: "Ease In Out Cubic",
|
|
654
|
+
easeInOutExpo: "Ease In Out Exponential",
|
|
655
|
+
easeInOutQuad: "Ease In Out Quadratic",
|
|
656
|
+
easeInOutQuart: "Ease In Out Quartic",
|
|
657
|
+
easeInOutQuint: "Ease In Out Quintic",
|
|
658
|
+
easeInOutSine: "Ease In Out Sine",
|
|
659
|
+
easeInQuad: "Ease In Quadratic",
|
|
660
|
+
easeInQuart: "Ease In Quartic",
|
|
661
|
+
easeInQuartOutQuad: "Quart In \u2192 Quad Out",
|
|
662
|
+
easeInQuint: "Ease In Quintic",
|
|
663
|
+
easeInSine: "Ease In Sine",
|
|
664
|
+
easeOut: "Ease Out",
|
|
665
|
+
easeOutCirc: "Ease Out Circular",
|
|
666
|
+
easeOutCubic: "Ease Out Cubic",
|
|
667
|
+
easeOutExpo: "Ease Out Exponential",
|
|
668
|
+
easeOutQuad: "Ease Out Quadratic",
|
|
669
|
+
easeOutQuart: "Ease Out Quartic",
|
|
670
|
+
easeOutQuint: "Ease Out Quintic",
|
|
671
|
+
easeOutSine: "Ease Out Sine",
|
|
672
|
+
linear: "Linear"
|
|
673
|
+
};
|
|
674
|
+
function getEasingDisplayName(preset) {
|
|
675
|
+
return EASING_DISPLAY_NAMES[preset] || preset;
|
|
676
|
+
}
|
|
677
|
+
|
|
638
678
|
export { CubicBezierEditor, DEFAULT_CUSTOM_BEZIER, DEFAULT_IMAGE_MODEL, DEFAULT_LIPSYNC_MODEL, DEFAULT_LLM_MODEL, DEFAULT_VIDEO_MODEL, EASING_BEZIER_MAP, EASING_PRESETS, IMAGE_MODELS, IMAGE_MODEL_ID_MAP, IMAGE_MODEL_MAP, LIPSYNC_MODELS, LIPSYNC_SYNC_MODES, LLM_MODELS, LLM_MODEL_ID_MAP, LLM_MODEL_MAP, PRESET_BEZIERS, VIDEO_MODELS, VIDEO_MODEL_ID_MAP, VIDEO_MODEL_MAP, applySpeedCurve, createAsymmetricEase, createBezierEasing, easing, evaluateBezier, generateHandlesFromSchema, getAllEasingNames, getEasingBezier, getEasingDisplayName, getEasingFunction, getImageModelLabel, getLLMModelLabel, getLipSyncModelLabel, getMediaFromNode, getPresetBezier, getVideoModelLabel, isSchemaHandle, lipSyncModelSupportsImage };
|