@clipwright/core 0.39.0 → 0.41.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 +94 -2
- package/dist/account-actors.js +151 -34
- package/dist/account-actors.js.map +1 -1
- package/dist/actor-bounds.d.ts +3 -3
- package/dist/actor-bounds.js +3 -3
- package/dist/actor-bounds.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 +10764 -2790
- package/dist/contracts/v1/workflow-brief.js +19 -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 +114 -16
- 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.d.ts +1 -1
- package/dist/generations.js +2 -2
- 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/long-form-profile.d.ts +1 -1
- package/dist/long-form-profile.js +1 -1
- 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 +437 -0
- package/dist/reference-profile.js +46 -5
- 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 +16 -5
- 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 +11743 -5428
- package/dist/skills.js +248 -59
- 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 +33 -7
- package/dist/templates/index.js +95 -51
- 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-call.d.ts +4 -4
- package/dist/ugc-call.js +4 -4
- package/dist/ugc-call.js.map +1 -1
- package/dist/ugc-framing.d.ts +3 -2
- package/dist/ugc-framing.js +4 -3
- package/dist/ugc-framing.js.map +1 -1
- package/dist/ugc-interview.d.ts +3 -3
- package/dist/ugc-interview.js +3 -3
- package/dist/ugc-interview.js.map +1 -1
- package/dist/ugc-layers.d.ts +43 -7
- package/dist/ugc-layers.js +43 -11
- 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 +940 -115
- 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,112 @@
|
|
|
1
|
+
import { CAPTION_STYLE_ALIASES } from "./skills.js";
|
|
2
|
+
import { TEMPLATE_KINDS, TEMPLATE_SIZES, templateDataText } from "./templates/index.js";
|
|
3
|
+
import { MAX_OVERLAYS_AT_ONCE } from "./ugc-layers.js";
|
|
4
|
+
import { SCRIPT_LENGTH_DESCRIPTION } from "./voices.js";
|
|
5
|
+
// MCP tools/list stays under the client's 102 KB (#1003), so quote_ugc carries these shorter texts; REST and OpenAPI keep the full ones (#1045).
|
|
6
|
+
/** What each kind is, in a few words, with the rules its data alone does not say; null where its name and data say it all. */
|
|
7
|
+
const TEMPLATE_GISTS = {
|
|
8
|
+
tag: "a short pill; without position it sits in the caption spot",
|
|
9
|
+
lower_third: null,
|
|
10
|
+
end_card: "a site pill and call to action in the caption spot",
|
|
11
|
+
title_card: "a hook card",
|
|
12
|
+
quote: "a quote card",
|
|
13
|
+
stat: "a number counting from 0 to value (2 decimals); over sits at chest level",
|
|
14
|
+
callout: "an arrow or ring on target {x,y}, % of the frame from top left; may point at the face",
|
|
15
|
+
checklist: "rows a cursor clicks in turn (item: row index from 0), each click flipping it",
|
|
16
|
+
phone_call: "an incoming call at the side (right unless side left), answered on answer_at",
|
|
17
|
+
compare: "before, then after sweeping or wiping in on reveal_at, on a 3:5 card",
|
|
18
|
+
notification: "at the top; stack cards drop in on their at",
|
|
19
|
+
progress: "steps checked in turn on advance_at (one per step) or evenly",
|
|
20
|
+
rating: "stars filling up to stars (1–5 in halves)",
|
|
21
|
+
chat_window: "the prompt types in; answer, table rows, cards each on its at or evenly; zoom cuts on them",
|
|
22
|
+
video_grid: "9:16 video tiles popping in turn: 2x2 takes cell_1–4, 3x1 cell_1–3",
|
|
23
|
+
word_title: "the first entry from the start, each later one on its at quote or evenly, replacing the last or (build) adding to it",
|
|
24
|
+
phone_screen: "a phone whose screen states change on states.at or evenly; lock, play, liked replace one another, tags add up, counter and timer stay",
|
|
25
|
+
terminal: "the command types in, the diff changes on diff.at, a checked status on at",
|
|
26
|
+
pointer_chips: "chips in a column below the face, each with a line to target {x,y} (% of the frame), in turn on items.at or evenly",
|
|
27
|
+
chart: null,
|
|
28
|
+
race: null,
|
|
29
|
+
hand_title: "handwritten; mark.word: index from 0",
|
|
30
|
+
word_fill: "one word whose letters show your clip",
|
|
31
|
+
};
|
|
32
|
+
const SIZE_FIELD = `, size? ${TEMPLATE_SIZES.join("|")}`;
|
|
33
|
+
/** The templates catalog in fewer words: every kind's data fields as the full catalog names them. */
|
|
34
|
+
export function compactTemplateCatalogText(kinds = TEMPLATE_KINDS) {
|
|
35
|
+
const sized = kinds.every(kind => templateDataText(kind).includes(SIZE_FIELD));
|
|
36
|
+
const data = (kind) => (sized ? templateDataText(kind).replace(SIZE_FIELD, "") : templateDataText(kind));
|
|
37
|
+
return "Graphic templates { id, kind, anchor, cover_words?, placement?, transition?, data }, on any script run; price unchanged, a covered " +
|
|
38
|
+
"presenter still billed. Ids unique across inserts, overlays, layout_windows and templates. Text: one line of Latin or the " +
|
|
39
|
+
"script's letters, digits and punctuation, no emoji; a wide CJK glyph counts 2. " +
|
|
40
|
+
(sized ? `Every kind's data also takes size? ${TEMPLATE_SIZES.join("|")} (absent: medium). ` : "") +
|
|
41
|
+
"A media field is { asset_id } of a ready asset of that type. An inner quote is a string of words inside the template's own, after the previous " +
|
|
42
|
+
"one, its beat on their first word, not under an insert or full-frame template; without one, clicks and steps spread evenly. A template " +
|
|
43
|
+
"on the caption band hides captions. A full-frame one hides the presenter, overlays and over templates and never meets a wipe or zoom " +
|
|
44
|
+
`insert. At most ${MAX_OVERLAYS_AT_ONCE} overlays and over templates at once, not overlapping. template_theme sets their look. Kinds: ` +
|
|
45
|
+
kinds.map(kind => {
|
|
46
|
+
const gist = kind.kind in TEMPLATE_GISTS ? TEMPLATE_GISTS[kind.kind] : kind.description;
|
|
47
|
+
return `${kind.kind} (${kind.placements.join("|")})${gist === null ? "" : `: ${gist}`}; data ${data(kind)}`;
|
|
48
|
+
}).join(". ") + ".";
|
|
49
|
+
}
|
|
50
|
+
const CAPTION_STYLE_TEXT = "Caption look when captions=true; hormozi is the default. " +
|
|
51
|
+
Object.entries(CAPTION_STYLE_ALIASES).map(([alias, preset]) => `${alias} draws ${preset}`).join("; ") +
|
|
52
|
+
". Every style's look and preview: https://clipwright.io/captions";
|
|
53
|
+
const SCRIPT_TEXT = "The words the actor says; required unless segments supplies the spoken text. Segments and text-anchored inserts require " +
|
|
54
|
+
`long-form qualification on the server. ${SCRIPT_LENGTH_DESCRIPTION} ` +
|
|
55
|
+
"Russian stress: a capital vowel inside a lowercase word (\"потОм\") reaches eleven_v4 and gemini-3.8-flash-tts as the mark U+0301; a " +
|
|
56
|
+
"typed mark is kept; a word-initial capital, all caps or a second capital is left as it is, so write \"Яндекс Еда\", not \"ЯндексЕда\". " +
|
|
57
|
+
"Tell users writing in Russian. eleven_flash_v2_5 and eleven_turbo_v2_5 cost less but misread stress marks.";
|
|
58
|
+
/** quote_ugc's shorter text per field; a field not named keeps the full text REST and OpenAPI carry. */
|
|
59
|
+
export const MCP_UGC_DESCRIPTIONS = {
|
|
60
|
+
script: SCRIPT_TEXT,
|
|
61
|
+
tts_model: "Speech model; omitted, the chosen voice's (list_voices), eleven_v4 for presets, catalog voices and voice_id. eleven_v3 " +
|
|
62
|
+
"speaks eleven_v4 with a warning. eleven_v4 and gemini-3.8-flash-tts read stress marks (see script); eleven_flash_v2_5 and " +
|
|
63
|
+
"eleven_turbo_v2_5 are cheaper outside Russian. gemini-3.8-flash-tts speaks only its own voices (default kore for a female actor, " +
|
|
64
|
+
"else charon), has no word timings or audio tags, and refuses preset and catalog voices, voice_id, captions=true, segments and " +
|
|
65
|
+
"inserts before any charge.",
|
|
66
|
+
caption_style: CAPTION_STYLE_TEXT,
|
|
67
|
+
templates: compactTemplateCatalogText(),
|
|
68
|
+
caption_emphasis: "Script words or phrases to emphasise, every occurrence, matched as an insert quote. An item is the quote or " +
|
|
69
|
+
"{ quote, look }: punch (a lead-in line over a large glowing keyword), pill (alone in a pill), color (accent colour) or box (soft " +
|
|
70
|
+
"accent box). Without look: punch draws punch, hormozi and accent color, others larger in their highlight colour. Needs " +
|
|
71
|
+
"captions=true; a quote not in script is refused before any charge.",
|
|
72
|
+
voice: "Voice name from list_voices (presets sarah | george | eric | daria_ru_female); another name is refused before any charge. " +
|
|
73
|
+
"Omitted: the default voice of the actor's gender (actor_id's or actor_gender's; george for the default actor and for image " +
|
|
74
|
+
"alone). A gemini-3.8-flash-tts voice selects that model; a tts_model not speaking the voice is refused. Not with voice_id.",
|
|
75
|
+
inserts: "Text-anchored image or video inserts over the narration, each over cover_words words from its anchor; need long-form " +
|
|
76
|
+
"qualification on the server, 1080p and broll_policy=anyone. Captions draw over them.",
|
|
77
|
+
segments: "Ordered actor and image segments; need long-form qualification on the server, captions=false and 1080p; image media " +
|
|
78
|
+
"needs broll_policy=anyone.",
|
|
79
|
+
captions: "Burn word-timed captions in, over the presenter and inserts; not with segments.",
|
|
80
|
+
caption_position: "top, middle, lower or bottom (80% of the height); omitted, the caption_style's own place. Requires captions=true.",
|
|
81
|
+
person: "NOT HONORED YET: the default actor is used; pick actor_id from list_actors or pass image.",
|
|
82
|
+
name: "NOT HONORED YET: it does not reach the renderer.",
|
|
83
|
+
look: "NOT HONORED YET: it does not reach the renderer.",
|
|
84
|
+
actor_id: "Saved actor ID from list_actors; not with image, person or actor_gender. Without voice or voice_id the voice follows its gender.",
|
|
85
|
+
voice_id: "Raw vendor voice id (16–32 letters and digits) outside the catalog; an unknown id fails the run, not the request. Not with " +
|
|
86
|
+
"voice or tts_model=gemini-3.8-flash-tts.",
|
|
87
|
+
broll_policy: "anyone allows people and the actor, no_actor excludes the actor, no_people all people and hands. Templates with " +
|
|
88
|
+
"your own picture or video need \"anyone\"; otherwise stored only. Run value wins over the account default; else no_people.",
|
|
89
|
+
overlays: `Text-anchored images or videos over the visible presenter, each at a position or place; at most ${MAX_OVERLAYS_AT_ONCE} at once, ` +
|
|
90
|
+
"not overlapping. Captions move off them to the middle or bottom third, never over the face, and hide while neither is free. Hidden " +
|
|
91
|
+
"under full-frame inserts. Needs what inserts need. Price unchanged.",
|
|
92
|
+
image: "Public https URL of the actor's photo (PNG, JPEG or WebP, up to 10 MB); a local file goes through upload_image first. A private, " +
|
|
93
|
+
"http, unreachable, redirecting, larger or other source is refused (unusable_source) before any charge. Gender is not detected: " +
|
|
94
|
+
"pass actor_gender or voice, else the male default speaks, with a warning.",
|
|
95
|
+
framing: "Text-anchored presenter sizes: each cuts to close or medium on its words and back after them; no overlap with each other, an " +
|
|
96
|
+
"insert or a layout window. One wholly under full-frame templates is named in warnings[]; it wins over a punch_in emphasis. Needs " +
|
|
97
|
+
"script and long-form qualification; price unchanged.",
|
|
98
|
+
actor_gender: "Gender of the face in image, only with image: picks that gender's default voice (sarah or george; kore or charon on " +
|
|
99
|
+
"gemini-3.8-flash-tts). Refused with actor_id. An explicit voice or voice_id wins, with a warning.",
|
|
100
|
+
aspect_ratio: "Output format. Omitted: 9:16, or with an image the supported format nearest its shape, even landscape, so pass it with " +
|
|
101
|
+
"image. A source more than 15% off the request is refused (aspect_conflict) before any charge.",
|
|
102
|
+
caption_mode: "full (default): every spoken word. highlights: only around caption_emphasis quotes (lead-in, quote, short tail); requires " +
|
|
103
|
+
"caption_emphasis. Captions hide under a full-frame insert.",
|
|
104
|
+
visible_ai_label: "Visible AI label, default true. False hides only the visible label; invisible marking and signed provenance stay.",
|
|
105
|
+
layout_windows: "Text-anchored presenter reframings: split (9:16 only) or card; no overlap with each other or an insert; needs what " +
|
|
106
|
+
"inserts need. A covered or blurred presenter is billed as face time.",
|
|
107
|
+
end_hold_s: "Seconds the last frame holds after the last word, the presenter frozen and every layer kept; production seconds. Needs " +
|
|
108
|
+
"script and long-form qualification.",
|
|
109
|
+
edit_sounds: "A short sound on every cut (insert, full-frame template, layout window, framing). Needs one of them; template_sounds.edit " +
|
|
110
|
+
"picks it (list_template_sounds). Price unchanged.",
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=mcp-ugc-descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-ugc-descriptions.js","sourceRoot":"","sources":["../src/mcp-ugc-descriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAA0B,cAAc,EAAE,cA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ly ["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 = 20;
|
|
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 = 20;
|
|
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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,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 = 40;
|
|
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 = 40;
|
|
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(2000), 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","sourceRoot":"","sources":["../src/moves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,2HAA2H;AAE3H,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AACtC,gFAAgF;AAChF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,CAAU,CAAC;AAEtH,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAEvI,qJAAqJ;AACrJ,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE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,GAAG,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,OAAO,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACzC,MAAM,KAAK,GAAG,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAC5G,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,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 = 400;
|
|
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 = 400;
|
|
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,K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