@cueframe/kernel 0.0.1 → 0.1.0
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/_members/account-model/testing/conversationStoreContract.d.ts +1 -1
- package/dist/_members/authoring/providers/resourceApi.d.ts +1 -1
- package/dist/_members/authoring/transpileComponent.d.ts +1 -1
- package/dist/_members/cloud-import/CloudImportService.d.ts +35 -0
- package/dist/_members/cloud-import/ImportProvider.d.ts +73 -0
- package/dist/_members/cloud-import/MediaItemPreprocessor.d.ts +27 -0
- package/dist/_members/cloud-import/chunk-XKO6ZSWI.js +162 -0
- package/dist/_members/cloud-import/chunk-XKO6ZSWI.js.map +1 -0
- package/dist/_members/cloud-import/cloudConfig.d.ts +23 -0
- package/dist/_members/cloud-import/index.d.ts +9 -0
- package/dist/_members/cloud-import/index.js +241 -0
- package/dist/_members/cloud-import/index.js.map +1 -0
- package/dist/_members/cloud-import/multipartUpload.d.ts +12 -0
- package/dist/_members/cloud-import/multipartUpload.js +7 -0
- package/dist/_members/cloud-import/multipartUpload.js.map +1 -0
- package/dist/_members/composition/ops/compositionOps.d.ts +1 -1
- package/dist/_members/composition/ops/types.d.ts +1 -1
- package/dist/_members/composition/timeline/placement.d.ts +1 -1
- package/dist/_members/composition/validators/composition.d.ts +1 -1
- package/dist/_members/composition-ops/index.d.ts +1 -1
- package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
- package/dist/_members/convex-api/api.d.ts +5 -0
- package/dist/_members/convex-api/dataModel.d.ts +6 -0
- package/dist/_members/core/render/exportSettings.d.ts +1 -1
- package/dist/_members/mcp/curation.d.ts +1 -1
- package/dist/_members/plane/conformance.d.ts +1 -1
- package/dist/_members/render-harness/localRender.d.ts +1 -1
- package/dist/animate.js +828 -79187
- package/dist/authoring/build-tools.js +8 -11
- package/dist/authoring/context.js +5 -5
- package/dist/authoring/models.js +1 -2
- package/dist/authoring/prompts.js +1 -1
- package/dist/authoring/tools.js +7 -7
- package/dist/authoring/transpileComponent.js +3 -2220
- package/dist/authoring.js +27 -29
- package/dist/brand-derivation.js +1 -1
- package/dist/chunk-6IU2UQI5.js +107 -0
- package/dist/{chunk-N67PDTKQ.js → chunk-ABL557OT.js} +1 -1
- package/dist/{chunk-DSNG6WLU.js → chunk-AYVJXDLB.js} +1 -4
- package/dist/{chunk-G3PBH53P.js → chunk-COYMZ76S.js} +1 -1
- package/dist/chunk-DSMLHYJ4.js +82 -0
- package/dist/{chunk-BRKJKB33.js → chunk-FYZVH3MC.js} +1 -1
- package/dist/{chunk-MVEE6HEC.js → chunk-GA23TRNR.js} +5 -7
- package/dist/{chunk-OIRUO5P7.js → chunk-GEA7E2FL.js} +1 -1
- package/dist/chunk-HCCBDJLW.js +68 -0
- package/dist/{chunk-QLAQHR3L.js → chunk-IBYQG46O.js} +1 -1
- package/dist/chunk-JQMPHKLU.js +126 -0
- package/dist/{chunk-ELLSET2N.js → chunk-LM4WDUQJ.js} +3 -6
- package/dist/{chunk-UEI3NLNK.js → chunk-MHOQTPOB.js} +1 -4
- package/dist/{chunk-ATAF24QG.js → chunk-MXFAADCQ.js} +1 -1
- package/dist/{chunk-TULRCY6U.js → chunk-NFEGPWGS.js} +1 -1
- package/dist/{chunk-MC5DLSEV.js → chunk-ODL7GQJG.js} +14 -14
- package/dist/{chunk-WZTTZHNR.js → chunk-OLFOPQCA.js} +12 -9
- package/dist/{chunk-P43IE4WB.js → chunk-P727GZVO.js} +2 -4
- package/dist/{chunk-S3P5BFFL.js → chunk-PMY24FUD.js} +2 -4
- package/dist/chunk-RF7U3SCL.js +606 -0
- package/dist/{chunk-JD77Y2WM.js → chunk-SW336CJP.js} +1 -4
- package/dist/{chunk-M3I5LMAB.js → chunk-UY4SWJVE.js} +1 -1
- package/dist/{chunk-52AHXNKM.js → chunk-VOO5FQSS.js} +5 -5
- package/dist/{chunk-NV4I6GJV.js → chunk-XWKZB5U5.js} +4 -4
- package/dist/{chunk-6QJ3V3VS.js → chunk-YX2GSJK7.js} +1 -1
- package/dist/{chunk-5I7VDCAC.js → chunk-ZB3C3HM7.js} +1 -1
- package/dist/chunk-ZT7MHRQU.js +104 -0
- package/dist/cloud-import/multipart.d.ts +1 -0
- package/dist/cloud-import/multipart.js +8 -0
- package/dist/cloud-import.d.ts +1 -0
- package/dist/cloud-import.js +234 -0
- package/dist/compose/renderer.js +18 -21
- package/dist/compose.js +18 -21
- package/dist/composition/graphics-plan.js +3 -3
- package/dist/composition/ops.js +4 -4
- package/dist/composition/primitive-catalog.js +1 -1
- package/dist/composition/projection.js +3 -3
- package/dist/composition/validators.js +2 -2
- package/dist/composition-ops.js +12 -12
- package/dist/composition.js +5 -5
- package/dist/{context-CEAKQ5T7.js → context-OKX3HHFS.js} +5 -5
- package/dist/convex-api/dataModel.d.ts +1 -0
- package/dist/convex-api/dataModel.js +0 -0
- package/dist/convex-api.d.ts +1 -0
- package/dist/convex-api.js +8 -0
- package/dist/core/render.js +2 -2
- package/dist/core.js +2 -2
- package/dist/mcp/adapter.js +1 -5
- package/dist/mcp/server.js +1 -2
- package/dist/mcp.js +2 -95
- package/dist/media-model/media-kind.js +9 -98
- package/dist/nle-export/xml.js +5 -22799
- package/dist/nle-export.js +18 -21
- package/dist/primitives/backgrounds.js +2 -3
- package/dist/primitives/captions.js +4 -243
- package/dist/primitives/effects.js +2 -3
- package/dist/primitives/hero-text.js +2 -3
- package/dist/primitives/layouts.js +2 -3
- package/dist/primitives/lib/index.js +8 -10
- package/dist/primitives/lib/preview.js +1 -2
- package/dist/primitives/lib/schema.js +1 -2
- package/dist/primitives/lib/text/fitText.js +1 -2
- package/dist/primitives/lib.js +8 -10
- package/dist/primitives/scenes.js +1 -2
- package/dist/primitives/text.js +2 -3
- package/dist/primitives/ui-blocks.js +4 -5
- package/dist/primitives.js +19 -21
- package/package.json +123 -13
- package/dist/TextureLoader-UQOFUSAP.js +0 -422
- package/dist/VideoTexture-AQWSPIJG.js +0 -62
- package/dist/chunk-7GISRVON.js +0 -14176
- package/dist/chunk-DIBOJJMU.js +0 -16838
- package/dist/chunk-EAUSEGB7.js +0 -420
- package/dist/chunk-FUWJOVVK.js +0 -3633
- package/dist/chunk-G75E7YA4.js +0 -11883
- package/dist/chunk-JCZQT7K3.js +0 -3266
- package/dist/chunk-KF5ETMKB.js +0 -544
- package/dist/chunk-NDKERSXY.js +0 -1296
- package/dist/chunk-V43Y7IE4.js +0 -3621
- package/dist/chunk-VIVQHIGZ.js +0 -4319
- package/dist/chunk-YA3OR2KK.js +0 -249
- package/dist/hls-HD4C5G6W.js +0 -33000
- package/dist/token-RGFIT24D.js +0 -69
- package/dist/token-util-GPLSGYVO.js +0 -5
- package/dist/vision_bundle-5Y376MAR.js +0 -4084
- package/dist/{chunk-6CMVBTTP.js → chunk-YIOY2XEO.js} +4 -4
package/dist/authoring.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
buildDirectorContext
|
|
3
|
+
} from "./chunk-IBYQG46O.js";
|
|
4
|
+
import {
|
|
3
5
|
buildFastModel,
|
|
4
6
|
buildModel,
|
|
5
7
|
makeLangfuseFetch
|
|
6
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZT7MHRQU.js";
|
|
7
9
|
import {
|
|
8
10
|
PipelineTrace
|
|
9
11
|
} from "./chunk-LD5ZOUFT.js";
|
|
@@ -20,23 +22,14 @@ import {
|
|
|
20
22
|
buildPlannerUserMessage,
|
|
21
23
|
formatPlanSteps,
|
|
22
24
|
initCodeGenPrompts
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UY4SWJVE.js";
|
|
24
26
|
import {
|
|
25
27
|
ZERO_USAGE,
|
|
26
28
|
buildDirectorTools,
|
|
27
29
|
buildPlannerTools,
|
|
28
30
|
buildToolsFromSchemas,
|
|
29
31
|
extractProviderError
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
ToolLoopAgent,
|
|
33
|
-
generateObject,
|
|
34
|
-
generateText,
|
|
35
|
-
isStepCount,
|
|
36
|
-
pruneMessages
|
|
37
|
-
} from "./chunk-7GISRVON.js";
|
|
38
|
-
import "./chunk-KF5ETMKB.js";
|
|
39
|
-
import "./chunk-VIVQHIGZ.js";
|
|
32
|
+
} from "./chunk-LM4WDUQJ.js";
|
|
40
33
|
import {
|
|
41
34
|
COMPOSE_MOTION_TOOLS,
|
|
42
35
|
COMPOSE_MOTION_VERIFY_TOOLS,
|
|
@@ -45,33 +38,34 @@ import {
|
|
|
45
38
|
COMPOSE_ROLE_TOOLS,
|
|
46
39
|
COMPOSE_ROLE_TOOL_NAMES,
|
|
47
40
|
dispatchComposeRoleTool
|
|
48
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-VOO5FQSS.js";
|
|
49
42
|
import {
|
|
50
43
|
AgentFixableCaptureError,
|
|
51
44
|
getExcludedTools
|
|
52
45
|
} from "./chunk-JOURGVOR.js";
|
|
53
|
-
import
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-OIRUO5P7.js";
|
|
46
|
+
import "./chunk-ZB3C3HM7.js";
|
|
47
|
+
import "./chunk-XWKZB5U5.js";
|
|
48
|
+
import "./chunk-7PA7FGLD.js";
|
|
49
|
+
import "./chunk-KYRDKK2D.js";
|
|
50
|
+
import "./chunk-GEA7E2FL.js";
|
|
59
51
|
import {
|
|
60
52
|
cssLayoutVars
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-FYZVH3MC.js";
|
|
54
|
+
import "./chunk-DSMLHYJ4.js";
|
|
63
55
|
import "./chunk-JF4JJAFP.js";
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-NFEGPWGS.js";
|
|
57
|
+
import "./chunk-MXFAADCQ.js";
|
|
66
58
|
import "./chunk-W35ZMOXB.js";
|
|
67
59
|
import "./chunk-EA6MYCYW.js";
|
|
68
|
-
import "./chunk-7PA7FGLD.js";
|
|
69
|
-
import "./chunk-KYRDKK2D.js";
|
|
70
60
|
import "./chunk-WREYUH2E.js";
|
|
71
61
|
import "./chunk-37NJ27UU.js";
|
|
72
62
|
import "./chunk-2ESYSVXG.js";
|
|
73
63
|
|
|
64
|
+
// ../authoring/src/agent.ts
|
|
65
|
+
import { ToolLoopAgent, generateText, isStepCount } from "ai";
|
|
66
|
+
|
|
74
67
|
// ../authoring/src/agent/contextManagement.ts
|
|
68
|
+
import { pruneMessages } from "ai";
|
|
75
69
|
var EVICTED_IMAGE_STUB = "[capture still evicted to save context \u2014 the frame was seen and acted on; re-capture ONLY if you must re-verify pixels]";
|
|
76
70
|
function outputHasMedia(output) {
|
|
77
71
|
if (!output || typeof output !== "object") return false;
|
|
@@ -157,6 +151,7 @@ var cachePrepareStep = ({ model, messages }) => ({
|
|
|
157
151
|
});
|
|
158
152
|
|
|
159
153
|
// ../authoring/src/evaluate.ts
|
|
154
|
+
import { generateObject } from "ai";
|
|
160
155
|
import { z } from "zod";
|
|
161
156
|
var CriterionResultSchema = z.object({
|
|
162
157
|
name: z.string(),
|
|
@@ -237,6 +232,7 @@ Above are ${frames.length} captured frames. Use them to evaluate visual criteria
|
|
|
237
232
|
}
|
|
238
233
|
|
|
239
234
|
// ../authoring/src/evaluator.ts
|
|
235
|
+
import { generateObject as generateObject2 } from "ai";
|
|
240
236
|
import { z as z2 } from "zod";
|
|
241
237
|
var EvaluationSchema = z2.object({
|
|
242
238
|
scores: z2.record(z2.string(), z2.number()),
|
|
@@ -291,7 +287,7 @@ function toEvaluationResult(obj, rubric) {
|
|
|
291
287
|
async function evaluateArtifact(model, artifact, task, rubric, verificationCriteria) {
|
|
292
288
|
const dimensionsText = buildDimensionsText(rubric.dimensions);
|
|
293
289
|
const criteriaText = buildCriteriaText(verificationCriteria);
|
|
294
|
-
const { object } = await
|
|
290
|
+
const { object } = await generateObject2({
|
|
295
291
|
model,
|
|
296
292
|
schema: EvaluationSchema,
|
|
297
293
|
instructions: EVALUATOR_PROMPT,
|
|
@@ -327,7 +323,7 @@ ${compositionContext}` }
|
|
|
327
323
|
|
|
328
324
|
Above are ${capturedFrames.length} captured frames. Inspect for visual quality, positioning, and timing.` });
|
|
329
325
|
}
|
|
330
|
-
const { object } = await
|
|
326
|
+
const { object } = await generateObject2({
|
|
331
327
|
model,
|
|
332
328
|
schema: EvaluationSchema,
|
|
333
329
|
instructions: EVALUATOR_PROMPT,
|
|
@@ -878,6 +874,7 @@ function addUsage(a, b) {
|
|
|
878
874
|
}
|
|
879
875
|
|
|
880
876
|
// ../authoring/src/agent/memoryTool.ts
|
|
877
|
+
import { anthropic } from "@ai-sdk/anthropic";
|
|
881
878
|
var MAX_MEMORY_CHARS = 16e3;
|
|
882
879
|
var ROOT = "/memories";
|
|
883
880
|
function totalChars(store) {
|
|
@@ -981,6 +978,7 @@ ${body}`;
|
|
|
981
978
|
}
|
|
982
979
|
|
|
983
980
|
// ../authoring/src/decomposer.ts
|
|
981
|
+
import { generateObject as generateObject3 } from "ai";
|
|
984
982
|
import { z as z3 } from "zod";
|
|
985
983
|
|
|
986
984
|
// ../authoring/src/prompts/decomposerPrompt.ts
|
|
@@ -1044,7 +1042,7 @@ function singlePhase(task) {
|
|
|
1044
1042
|
}
|
|
1045
1043
|
async function decompose(model, task, context) {
|
|
1046
1044
|
try {
|
|
1047
|
-
const { object } = await
|
|
1045
|
+
const { object } = await generateObject3({
|
|
1048
1046
|
model,
|
|
1049
1047
|
schema: PhaseSchema,
|
|
1050
1048
|
instructions: DECOMPOSER_PROMPT,
|
package/dist/brand-derivation.js
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// ../data-models/media-model/src/media-kind.ts
|
|
2
|
+
var IMAGE_CONTENT_TYPES = ["image/png", "image/jpeg", "image/webp"];
|
|
3
|
+
var ALLOWED_CONTENT_TYPES = [
|
|
4
|
+
"video/mp4",
|
|
5
|
+
"video/quicktime",
|
|
6
|
+
"video/x-matroska",
|
|
7
|
+
"video/webm",
|
|
8
|
+
"audio/mpeg",
|
|
9
|
+
"audio/wav",
|
|
10
|
+
"audio/x-wav",
|
|
11
|
+
"audio/mp4",
|
|
12
|
+
"audio/aac",
|
|
13
|
+
"image/png",
|
|
14
|
+
"image/jpeg",
|
|
15
|
+
"image/webp",
|
|
16
|
+
"image/gif",
|
|
17
|
+
"image/svg+xml",
|
|
18
|
+
"application/json",
|
|
19
|
+
"font/ttf",
|
|
20
|
+
"font/otf",
|
|
21
|
+
"font/woff",
|
|
22
|
+
"font/woff2"
|
|
23
|
+
];
|
|
24
|
+
function mediaKind(contentType) {
|
|
25
|
+
const ct = (contentType || "").toLowerCase();
|
|
26
|
+
if (ct.startsWith("video/")) return "video";
|
|
27
|
+
if (ct.startsWith("audio/")) return "audio";
|
|
28
|
+
if (IMAGE_CONTENT_TYPES.includes(ct)) return "image";
|
|
29
|
+
return "opaque";
|
|
30
|
+
}
|
|
31
|
+
var EXT = {
|
|
32
|
+
"video/mp4": "mp4",
|
|
33
|
+
"audio/mp4": "mp4",
|
|
34
|
+
"video/quicktime": "mov",
|
|
35
|
+
"video/x-matroska": "mkv",
|
|
36
|
+
"video/webm": "webm",
|
|
37
|
+
"video/x-msvideo": "avi",
|
|
38
|
+
"audio/mpeg": "mp3",
|
|
39
|
+
"audio/wav": "wav",
|
|
40
|
+
"audio/x-wav": "wav",
|
|
41
|
+
"audio/aac": "aac",
|
|
42
|
+
"audio/ogg": "ogg",
|
|
43
|
+
"audio/flac": "flac",
|
|
44
|
+
"image/png": "png",
|
|
45
|
+
"image/jpeg": "jpg",
|
|
46
|
+
"image/webp": "webp",
|
|
47
|
+
"font/ttf": "ttf",
|
|
48
|
+
"font/otf": "otf",
|
|
49
|
+
"font/woff": "woff",
|
|
50
|
+
"font/woff2": "woff2",
|
|
51
|
+
"application/json": "json",
|
|
52
|
+
"image/svg+xml": "svg",
|
|
53
|
+
"image/gif": "gif"
|
|
54
|
+
};
|
|
55
|
+
function extensionForContentType(contentType) {
|
|
56
|
+
return EXT[(contentType || "").toLowerCase()] ?? "bin";
|
|
57
|
+
}
|
|
58
|
+
var CONTENT_TYPE_ALIASES = {
|
|
59
|
+
"audio/mp3": "audio/mpeg",
|
|
60
|
+
"audio/x-mp3": "audio/mpeg",
|
|
61
|
+
"audio/x-mpeg": "audio/mpeg",
|
|
62
|
+
"audio/mpeg3": "audio/mpeg",
|
|
63
|
+
"audio/x-mpeg-3": "audio/mpeg",
|
|
64
|
+
"audio/x-m4a": "audio/mp4",
|
|
65
|
+
"audio/m4a": "audio/mp4",
|
|
66
|
+
"audio/wave": "audio/wav",
|
|
67
|
+
"audio/vnd.wave": "audio/wav",
|
|
68
|
+
"audio/x-aac": "audio/aac",
|
|
69
|
+
"image/jpg": "image/jpeg",
|
|
70
|
+
"video/x-quicktime": "video/quicktime",
|
|
71
|
+
"video/mov": "video/quicktime",
|
|
72
|
+
"video/x-m4v": "video/mp4",
|
|
73
|
+
"video/mkv": "video/x-matroska"
|
|
74
|
+
};
|
|
75
|
+
var TYPE_BY_EXTENSION = Object.entries(EXT).reduce(
|
|
76
|
+
(acc, [contentType, ext]) => {
|
|
77
|
+
if (!(ext in acc)) acc[ext] = contentType;
|
|
78
|
+
return acc;
|
|
79
|
+
},
|
|
80
|
+
{}
|
|
81
|
+
);
|
|
82
|
+
TYPE_BY_EXTENSION["jpeg"] = "image/jpeg";
|
|
83
|
+
TYPE_BY_EXTENSION["m4a"] = "audio/mp4";
|
|
84
|
+
function mediaKindForFilename(filename) {
|
|
85
|
+
return mediaKind(contentTypeForUpload(filename, null));
|
|
86
|
+
}
|
|
87
|
+
var POOL_EXTENSIONS = Object.entries(TYPE_BY_EXTENSION).filter(([, contentType]) => mediaKind(contentType) !== "opaque").map(([ext]) => ext);
|
|
88
|
+
function contentTypeForUpload(filename, claimed) {
|
|
89
|
+
const ct = (claimed ?? "").trim().toLowerCase();
|
|
90
|
+
const allowed = ALLOWED_CONTENT_TYPES;
|
|
91
|
+
if (ct && allowed.includes(ct)) return ct;
|
|
92
|
+
if (ct && CONTENT_TYPE_ALIASES[ct]) return CONTENT_TYPE_ALIASES[ct];
|
|
93
|
+
const ext = filename.toLowerCase().split(".").pop() ?? "";
|
|
94
|
+
const byExt = TYPE_BY_EXTENSION[ext];
|
|
95
|
+
if (byExt) return byExt;
|
|
96
|
+
return ct;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
IMAGE_CONTENT_TYPES,
|
|
101
|
+
ALLOWED_CONTENT_TYPES,
|
|
102
|
+
mediaKind,
|
|
103
|
+
extensionForContentType,
|
|
104
|
+
mediaKindForFilename,
|
|
105
|
+
POOL_EXTENSIONS,
|
|
106
|
+
contentTypeForUpload
|
|
107
|
+
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fitTextOnNLines
|
|
3
|
-
} from "./chunk-YA3OR2KK.js";
|
|
4
|
-
|
|
5
1
|
// ../execution/primitives/src/lib/text/fitText.tsx
|
|
6
2
|
import React from "react";
|
|
3
|
+
import { fitTextOnNLines } from "@remotion/layout-utils";
|
|
7
4
|
function resolveFitFontSize({
|
|
8
5
|
singleLineFitFontSize,
|
|
9
6
|
minFontSize,
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FLOORS,
|
|
3
|
+
NEUTRAL_RAMP
|
|
4
|
+
} from "./chunk-JF4JJAFP.js";
|
|
5
|
+
|
|
6
|
+
// ../brand-derivation/src/contrastSafe.ts
|
|
7
|
+
import { APCAcontrast, sRGBtoY } from "apca-w3";
|
|
8
|
+
import { converter } from "culori";
|
|
9
|
+
var toRgb = converter("rgb");
|
|
10
|
+
function hexToRgb(hex) {
|
|
11
|
+
const c = toRgb(hex);
|
|
12
|
+
if (!c) return [0, 0, 0];
|
|
13
|
+
return [Math.round(c.r * 255), Math.round(c.g * 255), Math.round(c.b * 255)];
|
|
14
|
+
}
|
|
15
|
+
function colorMix(a, b, ratio) {
|
|
16
|
+
const [ar, ag, ab] = hexToRgb(a);
|
|
17
|
+
const [br, bg, bb] = hexToRgb(b);
|
|
18
|
+
const t = Math.max(0, Math.min(1, ratio));
|
|
19
|
+
const inv = 1 - t;
|
|
20
|
+
const r = Math.round(ar * inv + br * t);
|
|
21
|
+
const g = Math.round(ag * inv + bg * t);
|
|
22
|
+
const bl = Math.round(ab * inv + bb * t);
|
|
23
|
+
return "#" + [r, g, bl].map((v) => v.toString(16).padStart(2, "0")).join("");
|
|
24
|
+
}
|
|
25
|
+
function lc(fg, bg) {
|
|
26
|
+
return Math.abs(Number(APCAcontrast(sRGBtoY(hexToRgb(fg)), sRGBtoY(hexToRgb(bg)))));
|
|
27
|
+
}
|
|
28
|
+
function relativeLuminance(hex) {
|
|
29
|
+
return sRGBtoY(hexToRgb(hex));
|
|
30
|
+
}
|
|
31
|
+
function apcaLcFromLuminance(fgY, bgY) {
|
|
32
|
+
return Math.abs(Number(APCAcontrast(fgY, bgY)));
|
|
33
|
+
}
|
|
34
|
+
function apcaLc(fg, bg) {
|
|
35
|
+
return lc(fg, bg);
|
|
36
|
+
}
|
|
37
|
+
function clampToFloor(fg, bg, floor) {
|
|
38
|
+
if (lc(fg, bg) >= floor) return fg;
|
|
39
|
+
const candidates = [fg, NEUTRAL_RAMP.onDark, NEUTRAL_RAMP.onLight];
|
|
40
|
+
return candidates.reduce((best, c) => lc(c, bg) > lc(best, bg) ? c : best);
|
|
41
|
+
}
|
|
42
|
+
function deriveCaption(seedText, background) {
|
|
43
|
+
const onBrand = clampToFloor(seedText, background, FLOORS.body);
|
|
44
|
+
if (lc(onBrand, background) >= FLOORS.body) {
|
|
45
|
+
return { captionScrim: background, captionFg: onBrand };
|
|
46
|
+
}
|
|
47
|
+
return { captionScrim: NEUTRAL_RAMP.onLight, captionFg: NEUTRAL_RAMP.onDark };
|
|
48
|
+
}
|
|
49
|
+
function deriveContrastSafe(seed) {
|
|
50
|
+
const background = seed.background;
|
|
51
|
+
const text = clampToFloor(seed.text, background, FLOORS.body);
|
|
52
|
+
const accent = seed.accent;
|
|
53
|
+
const { captionScrim, captionFg } = deriveCaption(seed.text, background);
|
|
54
|
+
const surface = colorMix(background, text, 0.06);
|
|
55
|
+
const card = colorMix(background, text, 0.1);
|
|
56
|
+
const gridLine = colorMix(background, text, 0.08);
|
|
57
|
+
const accentMuted = colorMix(accent, background, 0.35);
|
|
58
|
+
const textOnAccent = clampToFloor(text, accent, FLOORS.body);
|
|
59
|
+
const textOnSurface = clampToFloor(text, surface, FLOORS.body);
|
|
60
|
+
return {
|
|
61
|
+
background,
|
|
62
|
+
text,
|
|
63
|
+
textMuted: clampToFloor(seed.text, background, FLOORS.nonBody),
|
|
64
|
+
accent,
|
|
65
|
+
captionScrim,
|
|
66
|
+
captionFg,
|
|
67
|
+
surface,
|
|
68
|
+
card,
|
|
69
|
+
gridLine,
|
|
70
|
+
accentMuted,
|
|
71
|
+
textOnAccent,
|
|
72
|
+
textOnSurface
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
relativeLuminance,
|
|
78
|
+
apcaLcFromLuminance,
|
|
79
|
+
apcaLc,
|
|
80
|
+
clampToFloor,
|
|
81
|
+
deriveContrastSafe
|
|
82
|
+
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DashboardPopulate
|
|
3
|
-
} from "./chunk-ZSZABOE5.js";
|
|
4
1
|
import {
|
|
5
2
|
resolveTypeface
|
|
6
3
|
} from "./chunk-BDMTUEEZ.js";
|
|
@@ -10,10 +7,10 @@ import {
|
|
|
10
7
|
import {
|
|
11
8
|
FitText,
|
|
12
9
|
resolveFitFontSize
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AYVJXDLB.js";
|
|
14
11
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
12
|
+
DashboardPopulate
|
|
13
|
+
} from "./chunk-ZSZABOE5.js";
|
|
17
14
|
import {
|
|
18
15
|
ACCENT,
|
|
19
16
|
ACCENT_DEEP,
|
|
@@ -658,6 +655,7 @@ function ToastNotification({
|
|
|
658
655
|
// ../execution/primitives/src/ui-blocks/browser-flow/index.tsx
|
|
659
656
|
import React2 from "react";
|
|
660
657
|
import { interpolate as interpolate4, spring as spring2, useCurrentFrame as useCurrentFrame4, useVideoConfig as useVideoConfig3 } from "remotion";
|
|
658
|
+
import { fitTextOnNLines } from "@remotion/layout-utils";
|
|
661
659
|
var FONT_FAMILY = "inherit";
|
|
662
660
|
var MONO_FAMILY = "monospace";
|
|
663
661
|
var ADDRESS_TEXT_WIDTH = 800;
|
|
@@ -6583,7 +6581,7 @@ var config2 = {
|
|
|
6583
6581
|
lines: [
|
|
6584
6582
|
{ type: "command", text: "npx shadcn@latest add @cueframe/typewriter" },
|
|
6585
6583
|
{ type: "log", text: "Installing components..." },
|
|
6586
|
-
{ type: "success", text: "\u2713 Created components/
|
|
6584
|
+
{ type: "success", text: "\u2713 Created components/apps/studio/typewriter.tsx" },
|
|
6587
6585
|
{ type: "log", text: "Done in 2.3s" }
|
|
6588
6586
|
],
|
|
6589
6587
|
title: "cueframe",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
contentTypeForUpload
|
|
3
|
+
} from "./chunk-6IU2UQI5.js";
|
|
4
|
+
|
|
5
|
+
// ../cloud-import/src/multipartUpload.ts
|
|
6
|
+
var CHUNK_SIZE = 10 * 1024 * 1024;
|
|
7
|
+
async function reasonFrom(res) {
|
|
8
|
+
try {
|
|
9
|
+
const text = await res.text();
|
|
10
|
+
if (!text) return `HTTP ${res.status}`;
|
|
11
|
+
try {
|
|
12
|
+
const parsed = JSON.parse(text);
|
|
13
|
+
if (typeof parsed.error === "string" && parsed.error) return `${parsed.error} (HTTP ${res.status})`;
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
return `${text.slice(0, 200)} (HTTP ${res.status})`;
|
|
17
|
+
} catch {
|
|
18
|
+
return `HTTP ${res.status}`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async function multipartUpload(opts) {
|
|
22
|
+
const { file, signingUrl, token, metadata, onProgress } = opts;
|
|
23
|
+
const baseUrl = signingUrl.replace(/\/$/, "");
|
|
24
|
+
const headers = { "uppy-auth-token": token, "Content-Type": "application/json" };
|
|
25
|
+
const createRes = await fetch(`${baseUrl}/s3/multipart`, {
|
|
26
|
+
method: "POST",
|
|
27
|
+
headers,
|
|
28
|
+
body: JSON.stringify({
|
|
29
|
+
filename: file.name,
|
|
30
|
+
// NOT `file.type || "video/mp4"`. That fallback relabelled every untyped
|
|
31
|
+
// file as video, so an MP3 with no MIME uploaded as `video/mp4` and was
|
|
32
|
+
// routed down the video transcode path by `mediaKind()` — a wrong
|
|
33
|
+
// pipeline instead of an honest refusal. See `contentTypeForUpload`.
|
|
34
|
+
type: contentTypeForUpload(file.name, file.type),
|
|
35
|
+
metadata: { uploadToken: token, ...metadata }
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
if (!createRes.ok) throw new Error(`Upload init failed for ${file.name}: ${await reasonFrom(createRes)}`);
|
|
39
|
+
const { uploadId } = await createRes.json();
|
|
40
|
+
const totalParts = Math.ceil(file.size / CHUNK_SIZE);
|
|
41
|
+
const parts = [];
|
|
42
|
+
for (let i = 0; i < totalParts; i++) {
|
|
43
|
+
const start = i * CHUNK_SIZE;
|
|
44
|
+
const end = Math.min(start + CHUNK_SIZE, file.size);
|
|
45
|
+
const chunk = file.slice(start, end);
|
|
46
|
+
const partNumber = i + 1;
|
|
47
|
+
const urlRes = await fetch(`${baseUrl}/s3/multipart/${uploadId}/${partNumber}`, {
|
|
48
|
+
headers: { "uppy-auth-token": token }
|
|
49
|
+
});
|
|
50
|
+
if (!urlRes.ok) throw new Error(`Presign failed for ${file.name} part ${partNumber}: ${await reasonFrom(urlRes)}`);
|
|
51
|
+
const { url } = await urlRes.json();
|
|
52
|
+
const putRes = await fetch(url, { method: "PUT", body: chunk });
|
|
53
|
+
if (!putRes.ok) throw new Error(`Part ${partNumber} of ${file.name} failed: ${await reasonFrom(putRes)}`);
|
|
54
|
+
parts.push({ PartNumber: partNumber, ETag: putRes.headers.get("ETag") ?? "" });
|
|
55
|
+
onProgress?.(end / file.size);
|
|
56
|
+
}
|
|
57
|
+
const completeRes = await fetch(`${baseUrl}/s3/multipart/${uploadId}/complete`, {
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers,
|
|
60
|
+
body: JSON.stringify({ parts })
|
|
61
|
+
});
|
|
62
|
+
if (!completeRes.ok) throw new Error(`Complete failed for ${file.name}: ${await reasonFrom(completeRes)}`);
|
|
63
|
+
return await completeRes.json();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
multipartUpload
|
|
68
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// ../execution/primitives/src/lib/preview.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { AbsoluteFill } from "remotion";
|
|
4
|
+
import { Player } from "@remotion/player";
|
|
5
|
+
import { TransitionSeries, linearTiming } from "@remotion/transitions";
|
|
6
|
+
var TransitionPanel = ({
|
|
7
|
+
label,
|
|
8
|
+
color
|
|
9
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
10
|
+
AbsoluteFill,
|
|
11
|
+
{
|
|
12
|
+
style: {
|
|
13
|
+
background: color,
|
|
14
|
+
color: "#fff",
|
|
15
|
+
display: "flex",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
fontFamily: "inherit",
|
|
19
|
+
fontSize: 96,
|
|
20
|
+
fontWeight: 600
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
label
|
|
24
|
+
);
|
|
25
|
+
var TransitionPreviewComposition = ({ presentation, durationInFrames }) => {
|
|
26
|
+
const half = Math.max(1, Math.floor(durationInFrames / 2));
|
|
27
|
+
return /* @__PURE__ */ React.createElement(TransitionSeries, null, /* @__PURE__ */ React.createElement(TransitionSeries.Sequence, { durationInFrames: half }, /* @__PURE__ */ React.createElement(TransitionPanel, { label: "A", color: "#0ea5e9" })), /* @__PURE__ */ React.createElement(
|
|
28
|
+
TransitionSeries.Transition,
|
|
29
|
+
{
|
|
30
|
+
timing: linearTiming({ durationInFrames: half }),
|
|
31
|
+
presentation
|
|
32
|
+
}
|
|
33
|
+
), /* @__PURE__ */ React.createElement(TransitionSeries.Sequence, { durationInFrames: half }, /* @__PURE__ */ React.createElement(TransitionPanel, { label: "B", color: "#9333ea" })));
|
|
34
|
+
};
|
|
35
|
+
var PrimitivePreview = ({
|
|
36
|
+
primitive,
|
|
37
|
+
exampleName,
|
|
38
|
+
paramsOverride,
|
|
39
|
+
width,
|
|
40
|
+
height,
|
|
41
|
+
autoPlay,
|
|
42
|
+
controls = false,
|
|
43
|
+
className,
|
|
44
|
+
style
|
|
45
|
+
}) => {
|
|
46
|
+
const example = React.useMemo(() => {
|
|
47
|
+
const targetName = exampleName ?? primitive.preview.defaultExample;
|
|
48
|
+
if (targetName) {
|
|
49
|
+
const found = primitive.examples.find((e) => e.name === targetName);
|
|
50
|
+
if (found) return found;
|
|
51
|
+
}
|
|
52
|
+
return primitive.examples[0];
|
|
53
|
+
}, [primitive, exampleName]);
|
|
54
|
+
const inputProps = React.useMemo(
|
|
55
|
+
() => ({ ...example?.params, ...paramsOverride }),
|
|
56
|
+
[example, paramsOverride]
|
|
57
|
+
);
|
|
58
|
+
const compWidth = width ?? primitive.preview.width ?? primitive.width;
|
|
59
|
+
const compHeight = height ?? primitive.preview.height ?? primitive.height;
|
|
60
|
+
const loop = primitive.preview.mode === "loop";
|
|
61
|
+
const shouldAutoPlay = autoPlay ?? loop;
|
|
62
|
+
if (!example) {
|
|
63
|
+
return /* @__PURE__ */ React.createElement(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className,
|
|
67
|
+
style: {
|
|
68
|
+
width: compWidth,
|
|
69
|
+
height: compHeight,
|
|
70
|
+
background: "#1a1a1a",
|
|
71
|
+
color: "#999",
|
|
72
|
+
display: "flex",
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
justifyContent: "center",
|
|
75
|
+
fontFamily: "monospace",
|
|
76
|
+
fontSize: 12,
|
|
77
|
+
...style
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"no example for ",
|
|
81
|
+
primitive.id
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
if (primitive.kind === "transition" && primitive.createPresentation) {
|
|
85
|
+
const presentation = primitive.createPresentation(inputProps);
|
|
86
|
+
return /* @__PURE__ */ React.createElement(
|
|
87
|
+
Player,
|
|
88
|
+
{
|
|
89
|
+
component: TransitionPreviewComposition,
|
|
90
|
+
inputProps: {
|
|
91
|
+
presentation,
|
|
92
|
+
durationInFrames: primitive.durationInFrames
|
|
93
|
+
},
|
|
94
|
+
durationInFrames: primitive.durationInFrames,
|
|
95
|
+
fps: primitive.fps,
|
|
96
|
+
compositionWidth: primitive.width,
|
|
97
|
+
compositionHeight: primitive.height,
|
|
98
|
+
style: { width: compWidth, height: compHeight, ...style },
|
|
99
|
+
className,
|
|
100
|
+
autoPlay: shouldAutoPlay,
|
|
101
|
+
loop,
|
|
102
|
+
controls
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return /* @__PURE__ */ React.createElement(
|
|
107
|
+
Player,
|
|
108
|
+
{
|
|
109
|
+
component: primitive.component,
|
|
110
|
+
inputProps,
|
|
111
|
+
durationInFrames: primitive.durationInFrames,
|
|
112
|
+
fps: primitive.fps,
|
|
113
|
+
compositionWidth: primitive.width,
|
|
114
|
+
compositionHeight: primitive.height,
|
|
115
|
+
style: { width: compWidth, height: compHeight, ...style },
|
|
116
|
+
className,
|
|
117
|
+
autoPlay: shouldAutoPlay,
|
|
118
|
+
loop,
|
|
119
|
+
controls
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
PrimitivePreview
|
|
126
|
+
};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
APICallError,
|
|
3
|
-
TypeValidationError,
|
|
4
|
-
tool
|
|
5
|
-
} from "./chunk-VIVQHIGZ.js";
|
|
6
1
|
import {
|
|
7
2
|
COMPOSE_PLANNER_TOOLS,
|
|
8
3
|
COMPOSE_ROLE_TOOLS,
|
|
9
4
|
dispatchComposeRoleTool
|
|
10
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VOO5FQSS.js";
|
|
11
6
|
|
|
12
7
|
// ../authoring/src/agent/buildTools.ts
|
|
8
|
+
import { tool } from "ai";
|
|
13
9
|
function formatToolResult(name, result) {
|
|
14
10
|
if (!COMPOSE_ROLE_TOOLS[name]?.metadata.imageResponse) {
|
|
15
11
|
return typeof result === "string" ? result : JSON.stringify(result);
|
|
@@ -148,6 +144,7 @@ var buildPlannerTools = (p) => {
|
|
|
148
144
|
};
|
|
149
145
|
|
|
150
146
|
// ../authoring/src/agent/errors.ts
|
|
147
|
+
import { APICallError, TypeValidationError } from "ai";
|
|
151
148
|
function extractProviderError(err) {
|
|
152
149
|
if (APICallError.isInstance(err)) {
|
|
153
150
|
const status = err.statusCode;
|
|
@@ -266,7 +266,7 @@ var TimelineClip = z.object({
|
|
|
266
266
|
* does not select its audio, so every ripple, move and trim silently desyncs
|
|
267
267
|
* sound from picture and the user finds out at playback. Every editor this
|
|
268
268
|
* repo has been measured against carries the same field; ours had none
|
|
269
|
-
* (`grep linkGroup` returned nothing across `
|
|
269
|
+
* (`grep linkGroup` returned nothing across `apps/studio/src` and
|
|
270
270
|
* `packages/composition/src` on 2026-08-23).
|
|
271
271
|
*
|
|
272
272
|
* Membership is the ONLY thing stored. What a link implies — expand the
|