@clipwright/core 0.39.0 → 0.40.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/account-actors.d.ts +93 -2
- package/dist/account-actors.js +135 -20
- package/dist/account-actors.js.map +1 -1
- package/dist/actors.d.ts +24 -2
- package/dist/actors.js +30 -9
- package/dist/actors.js.map +1 -1
- package/dist/ad-pause-trim.d.ts +21 -0
- package/dist/ad-pause-trim.js +16 -0
- package/dist/ad-pause-trim.js.map +1 -0
- package/dist/aspect.d.ts +5 -0
- package/dist/aspect.js +7 -0
- package/dist/aspect.js.map +1 -1
- package/dist/assets.d.ts +2 -1
- package/dist/assets.js +10 -11
- package/dist/assets.js.map +1 -1
- package/dist/billing-terms.d.ts +8 -0
- package/dist/broll-policy.js +2 -3
- package/dist/broll-policy.js.map +1 -1
- package/dist/caption-geometry.js +10 -8
- package/dist/caption-geometry.js.map +1 -1
- package/dist/contract-dispositions.d.ts +1575 -100
- package/dist/contract-dispositions.js +100 -14
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/contracts/v1/workflow-brief.d.ts +10762 -2790
- package/dist/contracts/v1/workflow-brief.js +16 -1
- package/dist/contracts/v1/workflow-brief.js.map +1 -1
- package/dist/contracts/v1/workflow-catalog.d.ts +11612 -3536
- package/dist/contracts/v1/workflow-client.d.ts +5429 -1187
- package/dist/contracts/v1/workflow-client.js +9 -5
- package/dist/contracts/v1/workflow-client.js.map +1 -1
- package/dist/contracts/v1/workflow-execution.d.ts +242 -0
- package/dist/contracts/v1/workflow-execution.js +2 -2
- package/dist/contracts/v1/workflow-execution.js.map +1 -1
- package/dist/contracts/v1/workflow-next.d.ts +225 -0
- package/dist/contracts/v1/workflow-next.js +21 -0
- package/dist/contracts/v1/workflow-next.js.map +1 -0
- package/dist/contracts/v1/workflow-plan.d.ts +18556 -6429
- package/dist/contracts/v1/workflow-plan.js +2 -1
- package/dist/contracts/v1/workflow-plan.js.map +1 -1
- package/dist/contracts/v1/workflow-primitives.d.ts +20 -1
- package/dist/contracts/v1/workflow-primitives.js +8 -2
- package/dist/contracts/v1/workflow-primitives.js.map +1 -1
- package/dist/contracts/v1/workflow-run-read.d.ts +50 -0
- package/dist/creator-profile.d.ts +1 -0
- package/dist/creator-profile.js +13 -7
- package/dist/creator-profile.js.map +1 -1
- package/dist/design.d.ts +921 -0
- package/dist/design.js +183 -0
- package/dist/design.js.map +1 -0
- package/dist/edit-candidate.d.ts +2 -0
- package/dist/edit-candidate.js +3 -0
- package/dist/edit-candidate.js.map +1 -1
- package/dist/edit-faceless.js +2 -1
- package/dist/edit-faceless.js.map +1 -1
- package/dist/endpoint-notes.js +19 -0
- package/dist/endpoint-notes.js.map +1 -1
- package/dist/endpoints.js +21 -4
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -1
- package/dist/face-billing.d.ts +39 -0
- package/dist/face-billing.js +11 -1
- package/dist/face-billing.js.map +1 -1
- package/dist/faceless-action-shots.d.ts +31 -0
- package/dist/faceless-action-shots.js +51 -0
- package/dist/faceless-action-shots.js.map +1 -0
- package/dist/faceless-media-record.d.ts +56 -0
- package/dist/faceless-media-record.js +6 -2
- package/dist/faceless-media-record.js.map +1 -1
- package/dist/faceless-price.d.ts +22 -0
- package/dist/faceless-price.js +27 -3
- package/dist/faceless-price.js.map +1 -1
- package/dist/faceless-public-plan.d.ts +10 -1
- package/dist/faceless-public-plan.js +4 -0
- package/dist/faceless-public-plan.js.map +1 -1
- package/dist/faceless-public.d.ts +5583 -184
- package/dist/faceless-public.js +110 -12
- package/dist/faceless-public.js.map +1 -1
- package/dist/feedback.js +1 -1
- package/dist/feedback.js.map +1 -1
- package/dist/generations-output.js +1 -1
- package/dist/generations-output.js.map +1 -1
- package/dist/generations.js +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/live-shot-kinds.d.ts +22 -0
- package/dist/live-shot-kinds.js +17 -0
- package/dist/live-shot-kinds.js.map +1 -0
- package/dist/mcp-ugc-descriptions.d.ts +32 -0
- package/dist/mcp-ugc-descriptions.js +112 -0
- package/dist/mcp-ugc-descriptions.js.map +1 -0
- package/dist/motion-styles.d.ts +54 -0
- package/dist/motion-styles.js +67 -0
- package/dist/motion-styles.js.map +1 -0
- package/dist/moves.d.ts +222 -0
- package/dist/moves.js +81 -0
- package/dist/moves.js.map +1 -0
- package/dist/music.d.ts +18 -0
- package/dist/music.js +29 -0
- package/dist/music.js.map +1 -0
- package/dist/openapi.d.ts +3 -1
- package/dist/openapi.js +32 -5
- package/dist/openapi.js.map +1 -1
- package/dist/parts-pricing.d.ts +14 -3
- package/dist/parts-pricing.js +23 -5
- package/dist/parts-pricing.js.map +1 -1
- package/dist/prices.d.ts +6 -1
- package/dist/prices.js +56 -17
- package/dist/prices.js.map +1 -1
- package/dist/reference-analysis.d.ts +134 -0
- package/dist/reference-analysis.js +45 -33
- package/dist/reference-analysis.js.map +1 -1
- package/dist/reference-display.js +3 -0
- package/dist/reference-display.js.map +1 -1
- package/dist/reference-kinds.d.ts +3 -2
- package/dist/reference-kinds.js +2 -1
- package/dist/reference-kinds.js.map +1 -1
- package/dist/reference-profile.d.ts +435 -0
- package/dist/reference-profile.js +40 -1
- package/dist/reference-profile.js.map +1 -1
- package/dist/reference-staging.d.ts +54 -2
- package/dist/reference-staging.js +28 -5
- package/dist/reference-staging.js.map +1 -1
- package/dist/reference-text-spans.d.ts +26 -0
- package/dist/reference-text-spans.js +76 -0
- package/dist/reference-text-spans.js.map +1 -0
- package/dist/resolved-timeline.d.ts +173 -0
- package/dist/resolved-timeline.js +15 -4
- package/dist/resolved-timeline.js.map +1 -1
- package/dist/run-media.d.ts +5 -0
- package/dist/run-media.js +17 -0
- package/dist/run-media.js.map +1 -0
- package/dist/run-static-warnings.js +12 -3
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/runs.d.ts +49 -0
- package/dist/runs.js +5 -0
- package/dist/runs.js.map +1 -1
- package/dist/scene-graph.d.ts +547 -0
- package/dist/scene-graph.js +296 -0
- package/dist/scene-graph.js.map +1 -0
- package/dist/scene-place.d.ts +2 -0
- package/dist/scene-place.js +6 -0
- package/dist/scene-place.js.map +1 -1
- package/dist/semantic-inserts.d.ts +2 -1
- package/dist/semantic-inserts.js +4 -4
- package/dist/semantic-inserts.js.map +1 -1
- package/dist/skills.d.ts +11737 -5424
- package/dist/skills.js +239 -52
- package/dist/skills.js.map +1 -1
- package/dist/templates/chart.d.ts +35 -0
- package/dist/templates/chart.js +38 -0
- package/dist/templates/chart.js.map +1 -0
- package/dist/templates/chat-window.d.ts +58 -0
- package/dist/templates/chat-window.js +57 -0
- package/dist/templates/chat-window.js.map +1 -0
- package/dist/templates/compare.d.ts +10 -2
- package/dist/templates/compare.js +13 -9
- package/dist/templates/compare.js.map +1 -1
- package/dist/templates/hand-title.d.ts +32 -0
- package/dist/templates/hand-title.js +47 -0
- package/dist/templates/hand-title.js.map +1 -0
- package/dist/templates/index.d.ts +32 -6
- package/dist/templates/index.js +91 -47
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/lower-third.d.ts +11 -0
- package/dist/templates/lower-third.js +8 -3
- package/dist/templates/lower-third.js.map +1 -1
- package/dist/templates/notification.d.ts +24 -2
- package/dist/templates/notification.js +21 -12
- package/dist/templates/notification.js.map +1 -1
- package/dist/templates/phone-screen.d.ts +37 -0
- package/dist/templates/phone-screen.js +41 -0
- package/dist/templates/phone-screen.js.map +1 -0
- package/dist/templates/pointer-chips.d.ts +40 -0
- package/dist/templates/pointer-chips.js +53 -0
- package/dist/templates/pointer-chips.js.map +1 -0
- package/dist/templates/quote.d.ts +2 -2
- package/dist/templates/quote.js +5 -5
- package/dist/templates/quote.js.map +1 -1
- package/dist/templates/race.d.ts +32 -0
- package/dist/templates/race.js +43 -0
- package/dist/templates/race.js.map +1 -0
- package/dist/templates/size.d.ts +20 -0
- package/dist/templates/size.js +14 -0
- package/dist/templates/size.js.map +1 -1
- package/dist/templates/slot.js +1 -1
- package/dist/templates/slot.js.map +1 -1
- package/dist/templates/sounds.d.ts +221 -4
- package/dist/templates/sounds.js +40 -10
- package/dist/templates/sounds.js.map +1 -1
- package/dist/templates/terminal.d.ts +46 -0
- package/dist/templates/terminal.js +46 -0
- package/dist/templates/terminal.js.map +1 -0
- package/dist/templates/video-grid.d.ts +52 -0
- package/dist/templates/video-grid.js +50 -0
- package/dist/templates/video-grid.js.map +1 -0
- package/dist/templates/word-fill.d.ts +22 -0
- package/dist/templates/word-fill.js +29 -0
- package/dist/templates/word-fill.js.map +1 -0
- package/dist/templates/word-title.d.ts +24 -0
- package/dist/templates/word-title.js +33 -0
- package/dist/templates/word-title.js.map +1 -0
- package/dist/trend-search.d.ts +336 -0
- package/dist/trend-search.js +307 -0
- package/dist/trend-search.js.map +1 -0
- package/dist/ugc-framing.d.ts +2 -1
- package/dist/ugc-framing.js +3 -2
- package/dist/ugc-framing.js.map +1 -1
- package/dist/ugc-layers.d.ts +36 -4
- package/dist/ugc-layers.js +26 -5
- package/dist/ugc-layers.js.map +1 -1
- package/dist/ugc-scenes.d.ts +40 -0
- package/dist/ugc-scenes.js +35 -0
- package/dist/ugc-scenes.js.map +1 -0
- package/dist/uploads.d.ts +1 -1
- package/dist/uploads.js +9 -9
- package/dist/uploads.js.map +1 -1
- package/dist/voice-admission.d.ts +4767 -836
- package/dist/voice-catalog-data.d.ts +1 -0
- package/dist/voice-catalog.d.ts +2 -0
- package/dist/voice-catalog.generated.json +286 -0
- package/dist/voice-catalog.js +1 -0
- package/dist/voice-catalog.js.map +1 -1
- package/dist/voice-pace.generated.json +65 -0
- package/dist/voices.d.ts +1 -0
- package/dist/voices.js +2 -1
- package/dist/voices.js.map +1 -1
- package/dist/workflows/index.d.ts +2 -0
- package/dist/workflows/index.js +1 -0
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +2275 -188
- package/dist/workflows/methods/kinetic-launch.d.ts +2275 -188
- package/dist/workflows/methods/product-image-story.d.ts +2275 -188
- package/dist/workflows/methods/reference-remake.d.ts +2275 -188
- package/dist/workflows/methods/shared.d.ts +2275 -188
- package/dist/workflows/methods/ugc-faq-answer.d.ts +2275 -188
- package/dist/workflows/methods/ugc-product-intro.d.ts +2275 -188
- package/dist/workflows/methods/website-proof-demo.d.ts +2275 -188
- package/dist/workflows/motion-director.d.ts +59 -0
- package/dist/workflows/motion-director.js +118 -0
- package/dist/workflows/motion-director.js.map +1 -0
- package/dist/workflows/reference-remake.d.ts +1172 -2
- package/dist/workflows/reference-remake.js +938 -114
- package/dist/workflows/reference-remake.js.map +1 -1
- package/dist/workflows/remake-chooser.d.ts +16 -0
- package/dist/workflows/remake-chooser.js +10 -0
- package/dist/workflows/remake-chooser.js.map +1 -0
- package/dist/workflows/remake-motion.d.ts +100 -0
- package/dist/workflows/remake-motion.js +237 -0
- package/dist/workflows/remake-motion.js.map +1 -0
- package/dist/workflows/validate.js +1 -1
- package/dist/workflows/validate.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type AnchoredItem, type WordRange } from "./ugc-layers.js";
|
|
2
|
+
export declare const MOTION_STYLE_IDS: readonly ["line_boil", "sketchbook", "paper_cutout", "fabric", "pixel", "comic", "zine", "film", "glass", "clay", "engraving"];
|
|
3
|
+
export type MotionStyleId = (typeof MOTION_STYLE_IDS)[number];
|
|
4
|
+
/** A style, or `plain`: a span drawn plain inside a styled video. */
|
|
5
|
+
export declare const MOTION_STYLE_CHOICES: readonly ["line_boil", "sketchbook", "paper_cutout", "fabric", "pixel", "comic", "zine", "film", "glass", "clay", "engraving", "plain"];
|
|
6
|
+
export type MotionStyleChoice = (typeof MOTION_STYLE_CHOICES)[number];
|
|
7
|
+
export declare const MAX_MOTION_STYLE_SPANS = 4;
|
|
8
|
+
/** When each style fits, for an agent choosing one by topic; keyed by id so a new style cannot ship without its line. */
|
|
9
|
+
export declare const MOTION_STYLE_GUIDANCE: Readonly<Record<MotionStyleId, string>>;
|
|
10
|
+
export declare const MOTION_STYLE_DESCRIPTION: string;
|
|
11
|
+
export interface MotionStyleRequest {
|
|
12
|
+
style?: MotionStyleChoice | undefined;
|
|
13
|
+
spans?: readonly {
|
|
14
|
+
style: MotionStyleChoice;
|
|
15
|
+
anchor: AnchoredItem["anchor"];
|
|
16
|
+
cover_words?: number | undefined;
|
|
17
|
+
}[] | undefined;
|
|
18
|
+
}
|
|
19
|
+
/** The style a video is drawn in: the run's own, else its design's, else plain. */
|
|
20
|
+
export declare function baseMotionStyle(input: {
|
|
21
|
+
motion_style?: MotionStyleRequest | undefined;
|
|
22
|
+
design?: {
|
|
23
|
+
style?: MotionStyleId | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
}): MotionStyleChoice;
|
|
26
|
+
/** The words each span covers, in order of the request; a string names why a span does not resolve. */
|
|
27
|
+
export declare function motionStyleSpanRanges(script: string, spans: NonNullable<MotionStyleRequest["spans"]>): (WordRange | string)[];
|
|
28
|
+
/** Why a request's spans cannot be drawn: no script to sit on, an anchor that names no words, two spans on one word, or a span in the video's own
|
|
29
|
+
* style. */
|
|
30
|
+
export declare function motionStyleRefusals(input: {
|
|
31
|
+
script?: string | undefined;
|
|
32
|
+
segments?: unknown;
|
|
33
|
+
motion_style?: MotionStyleRequest | undefined;
|
|
34
|
+
design?: {
|
|
35
|
+
style?: MotionStyleId | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
}): {
|
|
38
|
+
path: (string | number)[];
|
|
39
|
+
message: string;
|
|
40
|
+
}[];
|
|
41
|
+
/** Whether the video draws anything a style dresses: captions, templates or scenes. */
|
|
42
|
+
export declare const motionStyleHasCanvas: (input: {
|
|
43
|
+
captions?: boolean | undefined;
|
|
44
|
+
templates?: readonly unknown[] | undefined;
|
|
45
|
+
scenes?: readonly unknown[] | undefined;
|
|
46
|
+
}) => boolean;
|
|
47
|
+
/** Whether the request names a style other than plain anywhere. */
|
|
48
|
+
export declare const motionStyleAsked: (input: {
|
|
49
|
+
motion_style?: MotionStyleRequest | undefined;
|
|
50
|
+
design?: {
|
|
51
|
+
style?: MotionStyleId | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
}) => boolean;
|
|
54
|
+
export declare const MOTION_STYLE_UNUSED_WARNING = "motion_style was not drawn: a style dresses captions, templates and scenes, and this video has none";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { lexicalTokens } from "./semantic-inserts.js";
|
|
2
|
+
import { layerWordRange } from "./ugc-layers.js";
|
|
3
|
+
// Motion styles (#1123): how the graphics of a video are drawn and move: their lines, their material and their timing. A style is part of the
|
|
4
|
+
// design DNA; its colours stay the palette's. It dresses captions, templates and scenes, never the presenter or the pictures.
|
|
5
|
+
export const MOTION_STYLE_IDS = ["line_boil", "sketchbook", "paper_cutout", "fabric", "pixel", "comic", "zine", "film", "glass", "clay", "engraving"];
|
|
6
|
+
/** A style, or `plain`: a span drawn plain inside a styled video. */
|
|
7
|
+
export const MOTION_STYLE_CHOICES = [...MOTION_STYLE_IDS, "plain"];
|
|
8
|
+
export const MAX_MOTION_STYLE_SPANS = 4;
|
|
9
|
+
/** When each style fits, for an agent choosing one by topic; keyed by id so a new style cannot ship without its line. */
|
|
10
|
+
export const MOTION_STYLE_GUIDANCE = {
|
|
11
|
+
line_boil: "a hand-drawn line that redraws itself; sits on any look and topic",
|
|
12
|
+
sketchbook: "pencil on paper; tutorials, ideas, plans and personal stories",
|
|
13
|
+
paper_cutout: "card cutouts moved as stop motion; playful explainers, kids, crafts",
|
|
14
|
+
fabric: "felt and stitching; cosy, handmade, home and baby brands",
|
|
15
|
+
pixel: "a retro game grid with square corners; games, tech, nostalgia",
|
|
16
|
+
comic: "halftone, heavy ink and outlined letters; bold claims, reveals, humour",
|
|
17
|
+
zine: "a photocopied collage of leaning scraps; music, fashion, street culture",
|
|
18
|
+
film: "moving grain and a flickering lamp; stories, history, a cinematic mood",
|
|
19
|
+
glass: "frosted panes and soft light; tech, finance, premium products",
|
|
20
|
+
clay: "modelled clay as stop motion; friendly, light-hearted topics",
|
|
21
|
+
engraving: "fine hatching and a double rule; heritage, craft, food and drink, serious topics",
|
|
22
|
+
};
|
|
23
|
+
export const MOTION_STYLE_DESCRIPTION = "How captions, templates and scenes are drawn: style for the whole video, spans for words drawn in another " +
|
|
24
|
+
"style, entered and left through that style's own cut. Colours stay the design's; small text stays crisp. Spans need script. Free. Styles: " +
|
|
25
|
+
`${MOTION_STYLE_IDS.map(id => `${id}, ${MOTION_STYLE_GUIDANCE[id]}`).join("; ")}; plain, no style. One style carries the video; a span in a ` +
|
|
26
|
+
"second style marks one moment, such as a twist, a number or the call to action.";
|
|
27
|
+
/** The style a video is drawn in: the run's own, else its design's, else plain. */
|
|
28
|
+
export function baseMotionStyle(input) {
|
|
29
|
+
return input.motion_style?.style ?? input.design?.style ?? "plain";
|
|
30
|
+
}
|
|
31
|
+
/** The words each span covers, in order of the request; a string names why a span does not resolve. */
|
|
32
|
+
export function motionStyleSpanRanges(script, spans) {
|
|
33
|
+
const tokens = lexicalTokens(script);
|
|
34
|
+
return spans.map((span, index) => layerWordRange(tokens, { id: `span${index}`, anchor: span.anchor, cover_words: span.cover_words }));
|
|
35
|
+
}
|
|
36
|
+
/** Why a request's spans cannot be drawn: no script to sit on, an anchor that names no words, two spans on one word, or a span in the video's own
|
|
37
|
+
* style. */
|
|
38
|
+
export function motionStyleRefusals(input) {
|
|
39
|
+
const spans = input.motion_style?.spans;
|
|
40
|
+
if (!spans?.length)
|
|
41
|
+
return [];
|
|
42
|
+
if (input.script === undefined || input.segments !== undefined) {
|
|
43
|
+
return [{ path: ["motion_style", "spans"], message: "motion_style spans sit on the script's words: pass script, without segments" }];
|
|
44
|
+
}
|
|
45
|
+
const base = baseMotionStyle(input), refusals = [], taken = [];
|
|
46
|
+
for (const [index, range] of motionStyleSpanRanges(input.script, spans).entries()) {
|
|
47
|
+
const span = spans[index];
|
|
48
|
+
if (typeof range === "string") {
|
|
49
|
+
refusals.push({ path: ["motion_style", "spans", index, "anchor"], message: range });
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (span.style === base) {
|
|
53
|
+
refusals.push({ path: ["motion_style", "spans", index, "style"], message: `the span is in the video's own style ${base}: name another style or drop the span` });
|
|
54
|
+
}
|
|
55
|
+
if (taken.some(other => range.startWord < other.coverWord && other.startWord < range.coverWord)) {
|
|
56
|
+
refusals.push({ path: ["motion_style", "spans", index, "anchor"], message: "spans may not share words" });
|
|
57
|
+
}
|
|
58
|
+
taken.push(range);
|
|
59
|
+
}
|
|
60
|
+
return refusals;
|
|
61
|
+
}
|
|
62
|
+
/** Whether the video draws anything a style dresses: captions, templates or scenes. */
|
|
63
|
+
export const motionStyleHasCanvas = (input) => input.captions === true || Boolean(input.templates?.length) || Boolean(input.scenes?.length);
|
|
64
|
+
/** Whether the request names a style other than plain anywhere. */
|
|
65
|
+
export const motionStyleAsked = (input) => baseMotionStyle(input) !== "plain" || Boolean(input.motion_style?.spans?.some(span => span.style !== "plain"));
|
|
66
|
+
export const MOTION_STYLE_UNUSED_WARNING = "motion_style was not drawn: a style dresses captions, templates and scenes, and this video has none";
|
|
67
|
+
//# sourceMappingURL=motion-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion-styles.js","sourceRoot":"","sources":["../src/motion-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAqC,MAAM,iBAAiB,CAAC;AAEpF,8IAA8I;AAC9I,8HAA8H;AAE9H,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAU,CAAC;AAE/J,qEAAqE;AACrE,MAAM,C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,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;YAChG,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC,CAAC;QAC5G,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAA8H,EACzJ,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1G,mEAAmE;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAoH,EAAW,EAAE,CAChK,eAAe,CAAC,KAAK,CAAC,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC;AAEjH,MAAM,CAAC,MAAM,2BAA2B,GAAG,qGAAqG,CAAC"}
|
package/dist/moves.d.ts
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MOVES_PATH = "/v1/moves";
|
|
3
|
+
/** The script line a move serves, finer than hook, proof and call to action. */
|
|
4
|
+
export declare const MOVE_BEATS: readonly ["hook", "problem", "demo", "proof", "social_proof", "offer", "cta", "transition"];
|
|
5
|
+
export type MoveBeat = (typeof MOVE_BEATS)[number];
|
|
6
|
+
/** What the move shows, so the agent knows what to pass in data. */
|
|
7
|
+
export declare const MOVE_CONTENTS: readonly ["none", "words", "number", "list", "quote", "rating", "photo", "screenshot", "footage", "link"];
|
|
8
|
+
export type MoveContent = (typeof MOVE_CONTENTS)[number];
|
|
9
|
+
/** Where it draws: over the presenter, on the full frame, on the presenter's shot, on the captions, on a picture, on a graphic, or between shots. */
|
|
10
|
+
export declare const MOVE_SURFACES: readonly ["over", "full", "presenter", "captions", "picture", "layer", "transition"];
|
|
11
|
+
export type MoveSurface = (typeof MOVE_SURFACES)[number];
|
|
12
|
+
export declare const MOVE_SKILLS: readonly ["make_ugc", "make_faceless", "plan_reference_remake"];
|
|
13
|
+
export type MoveSkill = (typeof MOVE_SKILLS)[number];
|
|
14
|
+
/** soon: listed so the agent knows it is coming, refused when named. */
|
|
15
|
+
export declare const MOVE_STATUSES: readonly ["ready", "soon"];
|
|
16
|
+
export declare const MAX_MOVES = 12;
|
|
17
|
+
export declare const MOVES_PAGE_DEFAULT = 40;
|
|
18
|
+
export declare const MOVES_PAGE_MAX = 100;
|
|
19
|
+
export declare const moveName: z.ZodString;
|
|
20
|
+
/** One catalogue line: the short read carries the first fields, detail=full all of them. */
|
|
21
|
+
export declare const motionMove: z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
status: z.ZodEnum<{
|
|
24
|
+
ready: "ready";
|
|
25
|
+
soon: "soon";
|
|
26
|
+
}>;
|
|
27
|
+
purpose: z.ZodString;
|
|
28
|
+
beats: z.ZodArray<z.ZodEnum<{
|
|
29
|
+
cta: "cta";
|
|
30
|
+
demo: "demo";
|
|
31
|
+
hook: "hook";
|
|
32
|
+
offer: "offer";
|
|
33
|
+
problem: "problem";
|
|
34
|
+
proof: "proof";
|
|
35
|
+
social_proof: "social_proof";
|
|
36
|
+
transition: "transition";
|
|
37
|
+
}>>;
|
|
38
|
+
content: z.ZodEnum<{
|
|
39
|
+
footage: "footage";
|
|
40
|
+
link: "link";
|
|
41
|
+
list: "list";
|
|
42
|
+
none: "none";
|
|
43
|
+
number: "number";
|
|
44
|
+
photo: "photo";
|
|
45
|
+
quote: "quote";
|
|
46
|
+
rating: "rating";
|
|
47
|
+
screenshot: "screenshot";
|
|
48
|
+
words: "words";
|
|
49
|
+
}>;
|
|
50
|
+
surface: z.ZodEnum<{
|
|
51
|
+
captions: "captions";
|
|
52
|
+
full: "full";
|
|
53
|
+
layer: "layer";
|
|
54
|
+
over: "over";
|
|
55
|
+
picture: "picture";
|
|
56
|
+
presenter: "presenter";
|
|
57
|
+
transition: "transition";
|
|
58
|
+
}>;
|
|
59
|
+
credits: z.ZodNumber;
|
|
60
|
+
look: z.ZodOptional<z.ZodString>;
|
|
61
|
+
moods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
62
|
+
calm: "calm";
|
|
63
|
+
playful: "playful";
|
|
64
|
+
premium: "premium";
|
|
65
|
+
punchy: "punchy";
|
|
66
|
+
}>>>;
|
|
67
|
+
seconds: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
per_video: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
70
|
+
make_faceless: "make_faceless";
|
|
71
|
+
make_ugc: "make_ugc";
|
|
72
|
+
plan_reference_remake: "plan_reference_remake";
|
|
73
|
+
}>>>;
|
|
74
|
+
needs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
pairs_with: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
preview_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
export type MotionMove = z.infer<typeof motionMove>;
|
|
80
|
+
export declare const motionMovesQuery: z.ZodObject<{
|
|
81
|
+
beat: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
cta: "cta";
|
|
83
|
+
demo: "demo";
|
|
84
|
+
hook: "hook";
|
|
85
|
+
offer: "offer";
|
|
86
|
+
problem: "problem";
|
|
87
|
+
proof: "proof";
|
|
88
|
+
social_proof: "social_proof";
|
|
89
|
+
transition: "transition";
|
|
90
|
+
}>>;
|
|
91
|
+
content: z.ZodOptional<z.ZodEnum<{
|
|
92
|
+
footage: "footage";
|
|
93
|
+
link: "link";
|
|
94
|
+
list: "list";
|
|
95
|
+
none: "none";
|
|
96
|
+
number: "number";
|
|
97
|
+
photo: "photo";
|
|
98
|
+
quote: "quote";
|
|
99
|
+
rating: "rating";
|
|
100
|
+
screenshot: "screenshot";
|
|
101
|
+
words: "words";
|
|
102
|
+
}>>;
|
|
103
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
captions: "captions";
|
|
105
|
+
full: "full";
|
|
106
|
+
layer: "layer";
|
|
107
|
+
over: "over";
|
|
108
|
+
picture: "picture";
|
|
109
|
+
presenter: "presenter";
|
|
110
|
+
transition: "transition";
|
|
111
|
+
}>>;
|
|
112
|
+
mood: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
calm: "calm";
|
|
114
|
+
playful: "playful";
|
|
115
|
+
premium: "premium";
|
|
116
|
+
punchy: "punchy";
|
|
117
|
+
}>>;
|
|
118
|
+
skill: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
make_faceless: "make_faceless";
|
|
120
|
+
make_ugc: "make_ugc";
|
|
121
|
+
plan_reference_remake: "plan_reference_remake";
|
|
122
|
+
}>>;
|
|
123
|
+
q: z.ZodOptional<z.ZodString>;
|
|
124
|
+
names: z.ZodOptional<z.ZodString>;
|
|
125
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
full: "full";
|
|
127
|
+
short: "short";
|
|
128
|
+
}>>;
|
|
129
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
130
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
export type MotionMovesQuery = z.infer<typeof motionMovesQuery>;
|
|
133
|
+
export type MotionMovesQueryArgs = z.input<typeof motionMovesQuery>;
|
|
134
|
+
export declare const motionMovesList: z.ZodObject<{
|
|
135
|
+
moves: z.ZodArray<z.ZodObject<{
|
|
136
|
+
name: z.ZodString;
|
|
137
|
+
status: z.ZodEnum<{
|
|
138
|
+
ready: "ready";
|
|
139
|
+
soon: "soon";
|
|
140
|
+
}>;
|
|
141
|
+
purpose: z.ZodString;
|
|
142
|
+
beats: z.ZodArray<z.ZodEnum<{
|
|
143
|
+
cta: "cta";
|
|
144
|
+
demo: "demo";
|
|
145
|
+
hook: "hook";
|
|
146
|
+
offer: "offer";
|
|
147
|
+
problem: "problem";
|
|
148
|
+
proof: "proof";
|
|
149
|
+
social_proof: "social_proof";
|
|
150
|
+
transition: "transition";
|
|
151
|
+
}>>;
|
|
152
|
+
content: z.ZodEnum<{
|
|
153
|
+
footage: "footage";
|
|
154
|
+
link: "link";
|
|
155
|
+
list: "list";
|
|
156
|
+
none: "none";
|
|
157
|
+
number: "number";
|
|
158
|
+
photo: "photo";
|
|
159
|
+
quote: "quote";
|
|
160
|
+
rating: "rating";
|
|
161
|
+
screenshot: "screenshot";
|
|
162
|
+
words: "words";
|
|
163
|
+
}>;
|
|
164
|
+
surface: z.ZodEnum<{
|
|
165
|
+
captions: "captions";
|
|
166
|
+
full: "full";
|
|
167
|
+
layer: "layer";
|
|
168
|
+
over: "over";
|
|
169
|
+
picture: "picture";
|
|
170
|
+
presenter: "presenter";
|
|
171
|
+
transition: "transition";
|
|
172
|
+
}>;
|
|
173
|
+
credits: z.ZodNumber;
|
|
174
|
+
look: z.ZodOptional<z.ZodString>;
|
|
175
|
+
moods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
176
|
+
calm: "calm";
|
|
177
|
+
playful: "playful";
|
|
178
|
+
premium: "premium";
|
|
179
|
+
punchy: "punchy";
|
|
180
|
+
}>>>;
|
|
181
|
+
seconds: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
per_video: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
184
|
+
make_faceless: "make_faceless";
|
|
185
|
+
make_ugc: "make_ugc";
|
|
186
|
+
plan_reference_remake: "plan_reference_remake";
|
|
187
|
+
}>>>;
|
|
188
|
+
needs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
+
pairs_with: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
+
preview_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
|
+
}, z.core.$strict>>;
|
|
193
|
+
total: z.ZodNumber;
|
|
194
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
195
|
+
contract_version: z.ZodString;
|
|
196
|
+
}, z.core.$strict>;
|
|
197
|
+
export type MotionMovesList = z.infer<typeof motionMovesList>;
|
|
198
|
+
/** A move put on the script's words. */
|
|
199
|
+
export declare const ugcMove: z.ZodObject<{
|
|
200
|
+
name: z.ZodString;
|
|
201
|
+
anchor: z.ZodObject<{
|
|
202
|
+
quote: z.ZodString;
|
|
203
|
+
occurrence: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
cover_words: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
placement: z.ZodOptional<z.ZodEnum<{
|
|
207
|
+
full: "full";
|
|
208
|
+
over: "over";
|
|
209
|
+
}>>;
|
|
210
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
211
|
+
}, z.core.$strict>;
|
|
212
|
+
export type UgcMove = z.infer<typeof ugcMove>;
|
|
213
|
+
export declare const MOVES_DESCRIPTION: string;
|
|
214
|
+
/** Moves sit on the script's words: an anchor that names none is refused before any charge. */
|
|
215
|
+
export declare function moveRefusals(input: {
|
|
216
|
+
script?: string | undefined;
|
|
217
|
+
segments?: unknown;
|
|
218
|
+
moves?: readonly UgcMove[] | undefined;
|
|
219
|
+
}): {
|
|
220
|
+
path: (string | number)[];
|
|
221
|
+
message: string;
|
|
222
|
+
}[];
|
package/dist/moves.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { DESIGN_MOTIONS } from "./design.js";
|
|
3
|
+
import { lexicalTokens } from "./semantic-inserts.js";
|
|
4
|
+
import { layerWordRange } from "./ugc-layers.js";
|
|
5
|
+
// Moves (#1175): our catalogue of motion and graphics devices as a client agent reads it and puts it on lines of a script.
|
|
6
|
+
export const MOVES_PATH = "/v1/moves";
|
|
7
|
+
/** The script line a move serves, finer than hook, proof and call to action. */
|
|
8
|
+
export const MOVE_BEATS = ["hook", "problem", "demo", "proof", "social_proof", "offer", "cta", "transition"];
|
|
9
|
+
/** What the move shows, so the agent knows what to pass in data. */
|
|
10
|
+
export const MOVE_CONTENTS = ["none", "words", "number", "list", "quote", "rating", "photo", "screenshot", "footage", "link"];
|
|
11
|
+
/** Where it draws: over the presenter, on the full frame, on the presenter's shot, on the captions, on a picture, on a graphic, or between shots. */
|
|
12
|
+
export const MOVE_SURFACES = ["over", "full", "presenter", "captions", "picture", "layer", "transition"];
|
|
13
|
+
export const MOVE_SKILLS = ["make_ugc", "make_faceless", "plan_reference_remake"];
|
|
14
|
+
/** soon: listed so the agent knows it is coming, refused when named. */
|
|
15
|
+
export const MOVE_STATUSES = ["ready", "soon"];
|
|
16
|
+
export const MAX_MOVES = 12;
|
|
17
|
+
export const MOVES_PAGE_DEFAULT = 40;
|
|
18
|
+
export const MOVES_PAGE_MAX = 100;
|
|
19
|
+
export const moveName = z.string().min(1).max(48).regex(/^[a-z0-9]+(-[a-z0-9]+)*$/, "a move name is as list_moves names it, such as stat-count-up");
|
|
20
|
+
/** One catalogue line: the short read carries the first fields, detail=full all of them. */
|
|
21
|
+
export const motionMove = z.strictObject({
|
|
22
|
+
name: moveName,
|
|
23
|
+
status: z.enum(MOVE_STATUSES),
|
|
24
|
+
purpose: z.string().describe("What it does for the viewer."),
|
|
25
|
+
beats: z.array(z.enum(MOVE_BEATS)).min(1),
|
|
26
|
+
content: z.enum(MOVE_CONTENTS),
|
|
27
|
+
surface: z.enum(MOVE_SURFACES),
|
|
28
|
+
credits: z.number().int().min(0).describe("Credits per use, on the quote; 0 is free."),
|
|
29
|
+
look: z.string().optional().describe("What the viewer sees."),
|
|
30
|
+
moods: z.array(z.enum(DESIGN_MOTIONS)).optional(),
|
|
31
|
+
seconds: z.number().min(0).optional().describe("How long its motion takes."),
|
|
32
|
+
per_video: z.number().int().min(1).optional().describe("The most uses one video takes before it tires."),
|
|
33
|
+
skills: z.array(z.enum(MOVE_SKILLS)).optional().describe("Where it can be drawn."),
|
|
34
|
+
needs: z.string().nullable().optional().describe("What must already be on its line, or null."),
|
|
35
|
+
data: z.string().nullable().optional().describe("The fields moves[].data takes, or null."),
|
|
36
|
+
pairs_with: z.array(moveName).optional(),
|
|
37
|
+
preview_url: z.string().url().nullable().optional(),
|
|
38
|
+
});
|
|
39
|
+
export const motionMovesQuery = z.strictObject({
|
|
40
|
+
beat: z.enum(MOVE_BEATS).optional(),
|
|
41
|
+
content: z.enum(MOVE_CONTENTS).optional(),
|
|
42
|
+
surface: z.enum(MOVE_SURFACES).optional(),
|
|
43
|
+
mood: z.enum(DESIGN_MOTIONS).optional(),
|
|
44
|
+
skill: z.enum(MOVE_SKILLS).optional(),
|
|
45
|
+
q: z.string().trim().min(1).max(60).optional().describe("Words to find in a move's name, purpose and look."),
|
|
46
|
+
names: z.string().min(1).max(600).optional().describe("Comma-separated names: those moves only, as their full lines."),
|
|
47
|
+
detail: z.enum(["short", "full"]).optional().describe("short (default): name, purpose, beats, content, surface, credits, status."),
|
|
48
|
+
limit: z.coerce.number().int().min(1).max(MOVES_PAGE_MAX).optional(),
|
|
49
|
+
cursor: z.string().regex(/^\d{1,4}$/).optional().describe("next_cursor of the page before."),
|
|
50
|
+
});
|
|
51
|
+
export const motionMovesList = z.strictObject({
|
|
52
|
+
moves: z.array(motionMove),
|
|
53
|
+
total: z.number().int().min(0),
|
|
54
|
+
next_cursor: z.string().nullable(),
|
|
55
|
+
contract_version: z.string(),
|
|
56
|
+
});
|
|
57
|
+
/** A move put on the script's words. */
|
|
58
|
+
export const ugcMove = z.strictObject({
|
|
59
|
+
name: moveName,
|
|
60
|
+
anchor: z.strictObject({ quote: z.string().trim().min(1).max(400), occurrence: z.number().int().nonnegative().optional() })
|
|
61
|
+
.describe("The words it lands on, quoted from the script."),
|
|
62
|
+
cover_words: z.number().int().positive().max(10000).optional().describe("How many spoken words it stays, from the anchor's first; omitted, the anchor's."),
|
|
63
|
+
placement: z.enum(["over", "full"]).optional().describe("For a move drawn over or on the full frame, where list_moves allows both."),
|
|
64
|
+
data: z.record(z.string(), z.unknown()).optional().describe("What it shows, as list_moves detail=full names in data."),
|
|
65
|
+
});
|
|
66
|
+
export const MOVES_DESCRIPTION = "Moves from list_moves on your words: each { name, anchor: { quote }, cover_words?, placement?, data? }. " +
|
|
67
|
+
"Each is drawn as its line in list_moves says; data takes the fields it names. A move that cannot be drawn on its words or in this video " +
|
|
68
|
+
"is named in warnings[] and left out, never dropped silently. Its credits are on the quote.";
|
|
69
|
+
/** Moves sit on the script's words: an anchor that names none is refused before any charge. */
|
|
70
|
+
export function moveRefusals(input) {
|
|
71
|
+
if (!input.moves?.length)
|
|
72
|
+
return [];
|
|
73
|
+
if (input.script === undefined || input.segments !== undefined)
|
|
74
|
+
return [{ path: ["moves"], message: "moves require script and cannot be combined with segments" }];
|
|
75
|
+
const tokens = lexicalTokens(input.script);
|
|
76
|
+
return input.moves.flatMap((move, index) => {
|
|
77
|
+
const range = layerWordRange(tokens, { id: move.name, anchor: move.anchor, cover_words: move.cover_words });
|
|
78
|
+
return typeof range === "string" ? [{ path: ["moves", index, "anchor"], message: range }] : [];
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=moves.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moves.js","sourceR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,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/music.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PartsLine } from "./parts-pricing.js";
|
|
3
|
+
/** Credits for the music of one video. */
|
|
4
|
+
export declare const MUSIC_BED_CREDITS = 60;
|
|
5
|
+
export declare const MUSIC_MOOD_MAX_CHARS = 120;
|
|
6
|
+
export declare const MUSIC_DESCRIPTION: string;
|
|
7
|
+
export declare const musicRequest: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodObject<{
|
|
8
|
+
mood: z.ZodString;
|
|
9
|
+
}, z.core.$strict>]>;
|
|
10
|
+
export type MusicRequest = z.infer<typeof musicRequest>;
|
|
11
|
+
/** The quote's and the bill's music line. */
|
|
12
|
+
export declare function musicLine(credits?: number): PartsLine;
|
|
13
|
+
/** Off, the field is refused before any reserve. */
|
|
14
|
+
export declare function isMusicEnabled(env?: Record<string, string | undefined>): boolean;
|
|
15
|
+
export declare const MUSIC_DISABLED_MESSAGE = "music is not available right now; omit it";
|
|
16
|
+
export declare const FACELESS_MUSIC_REFUSAL = "music is not available for make_faceless right now; omit it, or ask make_ugc for it";
|
|
17
|
+
/** A delivered video that asked for music and carries none says why, and the music is not charged. */
|
|
18
|
+
export declare function musicNotAddedWarning(reason: string): string;
|
package/dist/music.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Opt-in music: one track made for the video and mixed under the voice; its own quote line, charged only on delivery.
|
|
3
|
+
/** Credits for the music of one video. */
|
|
4
|
+
export const MUSIC_BED_CREDITS = 60;
|
|
5
|
+
export const MUSIC_MOOD_MAX_CHARS = 120;
|
|
6
|
+
export const MUSIC_DESCRIPTION = 'Background music under the voice, made for this video; off unless you ask. "auto" takes the mood from the ' +
|
|
7
|
+
`script; { mood } says it in your words, such as "calm lo-fi". ${MUSIC_BED_CREDITS} credits per video, its own line on the quote, ` +
|
|
8
|
+
"charged only when the video is delivered with it.";
|
|
9
|
+
export const musicRequest = z.union([
|
|
10
|
+
z.literal("auto"),
|
|
11
|
+
z.strictObject({
|
|
12
|
+
mood: z.string().trim().min(1).max(MUSIC_MOOD_MAX_CHARS).regex(/^[^\p{Cc}]+$/u, "mood must be plain text on one line"),
|
|
13
|
+
}),
|
|
14
|
+
], { error: 'music must be "auto" or { mood: "your words" }' });
|
|
15
|
+
/** The quote's and the bill's music line. */
|
|
16
|
+
export function musicLine(credits = MUSIC_BED_CREDITS) {
|
|
17
|
+
return { label: "music", unit: "track", quantity: 1, unit_credits: credits, credits };
|
|
18
|
+
}
|
|
19
|
+
/** Off, the field is refused before any reserve. */
|
|
20
|
+
export function isMusicEnabled(env = typeof process === "undefined" ? {} : process.env) {
|
|
21
|
+
return env.CLIPWRIGHT_MUSIC === "1";
|
|
22
|
+
}
|
|
23
|
+
export const MUSIC_DISABLED_MESSAGE = "music is not available right now; omit it";
|
|
24
|
+
export const FACELESS_MUSIC_REFUSAL = "music is not available for make_faceless right now; omit it, or ask make_ugc for it";
|
|
25
|
+
/** A delivered video that asked for music and carries none says why, and the music is not charged. */
|
|
26
|
+
export function musicNotAddedWarning(reason) {
|
|
27
|
+
return `music was not added: ${reason}; it was not charged`;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=music.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"music.js","sourceRoot":"","sources":["../src/music.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,sHAAsH;AAEtH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC,MAAM,CAAC,MAAM,iBAAiB,GAAG,4GAA4G;IAC3I,iEAAiE,iBAAiB,iDAAiD;IACnI,mDAAmD,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC;IAClC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACjB,CAAC,CAAC,YAAY,CAAC;QACb,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,KAAK,CAAC,eAAe,EAAE,qCAAqC,CAAC;KACvH,CAAC;CACH,EAAE,EAAE,KAAK,EAAE,gDAAgD,EAAE,CAAC,CAAC;AAGhE,6CAA6C;AAC7C,MAAM,UAAU,SAAS,CAAC,OAAO,GAAW,iBAAiB;IAC3D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACxF,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,cAAc,CAAC,GAAG,GAAuC,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG;IACxH,OAAO,GAAG,CAAC,gBAAgB,KAAK,GAAG,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,2CAA2C,CAAC;AAClF,MAAM,CAAC,MAAM,sBAAsB,GAAG,qFAAqF,CAAC;AAE5H,sGAAsG;AACtG,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,OAAO,wBAAwB,MAAM,sBAAsB,CAAC;AAC9D,CAAC"}
|
package/dist/openapi.d.ts
CHANGED
|
@@ -47,9 +47,11 @@ declare const TAGS: {
|
|
|
47
47
|
readonly Uploads: "Pictures you send for a run, kept for a limited time.";
|
|
48
48
|
readonly Assets: "Pictures and clips kept on the account until you delete them.";
|
|
49
49
|
readonly Actors: "Actors saved on the account and their defaults.";
|
|
50
|
+
readonly Brand: "The look a video draws in: a brand read from a site, and the kit saved on the account.";
|
|
50
51
|
readonly Catalogs: "Voices, template sounds, generation models, skills and prices.";
|
|
51
52
|
readonly "Reference analysis": "A reference video read into a profile a remake plan takes.";
|
|
52
53
|
readonly "Creator profiles": "A creator's latest videos with each one's views against their median.";
|
|
54
|
+
readonly "Trend searches": "Reels on a topic, each with its views against its creator's median.";
|
|
53
55
|
readonly Account: "Balance, debt and holds.";
|
|
54
56
|
readonly Feedback: "What is missing, confusing, wrong or slow; we read every one.";
|
|
55
57
|
};
|
|
@@ -96,7 +98,7 @@ export declare function buildOpenApiDocument(): {
|
|
|
96
98
|
}[];
|
|
97
99
|
tags: {
|
|
98
100
|
name: string;
|
|
99
|
-
description: "A creator's latest videos with each one's views against their median." | "A reference video read into a profile a remake plan takes." | "Actors saved on the account and their defaults." | "Balance, debt and holds." | "One namespace for every run: state, shots, drafts, revisions and shot candidates." | "Pictures and clips kept on the account until you delete them." | "Pictures you send for a run, kept for a limited time." | "Quote and start runs. A quote charges nothing; a run holds credits and answers at once." | "The API host itself." | "Voices, template sounds, generation models, skills and prices." | "What is missing, confusing, wrong or slow; we read every one." | "Workflow methods and account plans compiled into native runs.";
|
|
101
|
+
description: "A creator's latest videos with each one's views against their median." | "A reference video read into a profile a remake plan takes." | "Actors saved on the account and their defaults." | "Balance, debt and holds." | "One namespace for every run: state, shots, drafts, revisions and shot candidates." | "Pictures and clips kept on the account until you delete them." | "Pictures you send for a run, kept for a limited time." | "Quote and start runs. A quote charges nothing; a run holds credits and answers at once." | "Reels on a topic, each with its views against its creator's median." | "The API host itself." | "The look a video draws in: a brand read from a site, and the kit saved on the account." | "Voices, template sounds, generation models, skills and prices." | "What is missing, confusing, wrong or slow; we read every one." | "Workflow methods and account plans compiled into native runs.";
|
|
100
102
|
}[];
|
|
101
103
|
paths: Record<string, Record<string, Json>>;
|
|
102
104
|
components: {
|