@mevdragon/vidfarm-devcli 0.2.10 → 0.2.12

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.
@@ -919,6 +919,24 @@ npx @mevdragon/vidfarm-devcli session
919
919
 
920
920
  The current standard version is `2026-05-30`. The CLI response includes `caption_standard_version`, `fonts`, `text_background_colors`, `presets`, `package_dependencies`, the source standard file, and the starter template style file.
921
921
 
922
+ Text background rendering rule:
923
+
924
+ - any selected text background color must render as an inline highlight chip that hugs the text only
925
+ - apply visible per-line padding around the glyph bounds; the background should feel intentional, not cramped
926
+ - use slightly curved corners like TikTok's native text highlight shape
927
+ - do not render full-width bars, paragraph washes, large caption panels, or loose boxes behind text
928
+ - for multi-line captions, each line should get its own tight chip or a chip shape that follows the actual text block closely
929
+ - support chip strength levels where practical: `subtle` for light editor-style chips, `standard` for normal TikTok color chips, and `strong` for high-contrast emphatic captions
930
+
931
+ Multiline caption rendering rule:
932
+
933
+ - wrap the caption once, choose one font size and line height for the whole caption, and render it as one multiline text block
934
+ - do not render each wrapped line as a separate trimmed text image; per-line trim bounds change apparent glyph scale, weight, line height, and shadow placement
935
+ - apply shadow or outline to the whole multiline text block, then composite the block into the frame
936
+ - optional background chips may still be per-line, but their geometry should be derived from measured line bounds after the shared multiline layout is decided
937
+ - tune TikTok Sans wrapping, size, and line spacing independently from Montserrat or generic sans assumptions
938
+ - validate with a caption that wraps into one long line and one short line; both lines must look like the same font size and weight with consistent shadow strength
939
+
922
940
  Canonical font IDs:
923
941
 
924
942
  - `tiktok_sans_semibold`: default native TikTok caption font, backed by `@fontsource/tiktok-sans` or the bundled `TikTokSans-SemiBold.ttf` starter asset
@@ -969,8 +987,8 @@ Canonical text background color IDs:
969
987
  Canonical style presets:
970
988
 
971
989
  - `tiktok_native_white`: TikTok Sans SemiBold, white fill, no color chip, native black shadow
972
- - `tiktok_native_chip`: TikTok Sans SemiBold, white fill, red default color chip, native black shadow
973
- - `tiktok_editor_gray`: TikTok Sans SemiBold, dark fill, light gray default chip, no shadow
990
+ - `tiktok_native_chip`: TikTok Sans SemiBold, white fill, red default inline highlight chip, `standard` chip strength, native black shadow
991
+ - `tiktok_editor_gray`: TikTok Sans SemiBold, dark fill, light gray default inline highlight chip, `subtle` chip strength, no shadow
974
992
 
975
993
  Templates that expose caption styling should use these IDs in `configSchema`, operation payloads, manifests, and docs instead of inventing local names or hardcoding unrelated font stacks. If a template intentionally uses a format-specific typography system, document the exception in the template-local `SKILL.md`.
976
994
 
@@ -381,6 +381,14 @@ Every video-producing template should make timing explicit. The default input sh
381
381
 
382
382
  Every captioned template should strongly prefer TikTok-native typography. Use checked-in fonts when available, especially `TikTokSans-SemiBold.ttf` from the reference template assets, with practical fallbacks such as Montserrat or system sans. Expose caption styling in config only where it is useful; otherwise default to the closest source-matching TikTok style.
383
383
 
384
+ Multiline caption renderer requirement:
385
+
386
+ - wrap each caption once, choose one font size and line height for the whole caption block, and render it as one multiline text block
387
+ - do not render each wrapped line as an independently trimmed image; that makes shorter lines look larger or heavier because trim bounds, line height, and shadow placement vary per line
388
+ - apply shadow/outline to the whole multiline block, then composite the block; line chips can be measured per line after the block layout is fixed
389
+ - tune TikTok Sans wrapping, size, and line spacing separately from Montserrat or generic sans defaults
390
+ - validate with mixed-length wrapped captions and confirm both lines retain the same apparent size, weight, baseline rhythm, and shadow strength
391
+
384
392
  For simple image formats:
385
393
 
386
394
  - `create_image`: exact/director-controlled path
@@ -33,7 +33,8 @@ Return only JSON matching `production-graph.schema.json`.
33
33
  - Identify which elements are fixed, variable, optional, or generated.
34
34
  - Extract exact or inferred durations for scenes, captions, overlays, transitions, zooms, holds, and loop points.
35
35
  - Treat timing as a reusable control surface. If a source slot has a duration, decide whether future users should be able to override it.
36
- - Strongly identify TikTok-native typography: font family match, weight, case, outline, shadow, background chip, word highlight, line wrapping, and fallback font stack.
36
+ - Strongly identify TikTok-native typography: font family match, weight, case, outline, shadow, background chip, word highlight, line wrapping, line height, and fallback font stack.
37
+ - When captions wrap across lines, record block-level rendering requirements: one shared font size and line height for the full multiline caption, shadow/outline applied to the whole block, and any per-line chip geometry derived after the shared layout. Do not recommend independently trimmed per-line text images.
37
38
  - Prefer deterministic Remotion/HTML composition for layout, captions, overlays, app UI, and final edit.
38
39
  - Do not force Remotion when it would become brittle. If the format depends on organic visual detail, character acting, cinematic continuity, generated texture, painterly style, or complex physical motion, mark it as AI-native prompt/reference or hybrid.
39
40
  - Use AI image/video only for assets that require generative content.
@@ -106,7 +107,7 @@ Bad: "Use engaging captions and quick cuts."
106
107
 
107
108
  Good: "Render 2-line white uppercase captions centered at y=178 with black 2px shadow, max 22 characters per line, timed to word groups of 700-1400 ms. Insert 1.08x punch-in zoom on every sentence start."
108
109
 
109
- Typography bias: if the format uses creator-authored captions or overlays, default to TikTok-native typography. Prefer TikTok Sans Semibold when available; otherwise choose the closest checked-in or system fallback and record the fallback explicitly.
110
+ Typography bias: if the format uses creator-authored captions or overlays, default to TikTok-native typography. Prefer TikTok Sans Semibold when available; otherwise choose the closest checked-in or system fallback and record the fallback explicitly. Tune TikTok Sans wrapping, size, and line spacing separately from Montserrat or generic sans defaults.
110
111
 
111
112
  Viral preservation bias: if a choice conflicts between visual sameness and viral effectiveness, preserve the viral mechanism first. Example: if the source wins because of a shocking first-frame claim, preserve the claim structure and pacing even if the background scene changes. If it wins because of a recognizable fake-chat, notification, or game UI container, then visual preservation is likely critical.
112
113
 
@@ -16,6 +16,7 @@ The template must persist and actively use the source format's viral DNA. Viral
16
16
  - Do not force Remotion for formats whose complexity ceiling is better handled by AI-native image/video generation with source references. Use Remotion only for final stitching, captions, timing wrappers, or end cards in those cases.
17
17
  - Expose timing controls as operation inputs or config where users will reasonably want bulk variation: scene duration, slide duration, clip slot duration, caption timing mode, transition length, hold length, and total duration target.
18
18
  - Prefer TikTok-native caption typography. When captions or overlays matter, default to TikTok Sans Semibold or the closest available local fallback, and make font/styling configurable when the source format depends on it.
19
+ - For multiline captions, require a block-level renderer: wrap once, pick one font size and line height for the whole caption, render one multiline text block, and apply shadow/outline to the whole block. Do not render wrapped lines as separate trimmed images. Tune TikTok Sans wrapping, size, and leading separately from Montserrat defaults.
19
20
  - Use AI providers for text, image, video, TTS, STT, and layout analysis only where needed.
20
21
  - Store generated media with `ctx.storage`; return artifact URLs, manifests, and render inputs.
21
22
  - Include `about.proposal_generator`, `about.skeleton_prompt`, and `about.sample_prompts`.
package/dist/src/cli.js CHANGED
@@ -7,7 +7,7 @@ import path from "node:path";
7
7
  import { parseArgs } from "node:util";
8
8
  import { promisify } from "node:util";
9
9
  import dotenv from "dotenv";
10
- import { CAPTION_STANDARD_VERSION, STARTER_TEMPLATE_FONT_OPTIONS, STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS, TIKTOK_CAPTION_STYLE_PRESETS } from "./lib/template-style-options.js";
10
+ import { CAPTION_STANDARD_VERSION, STARTER_TEMPLATE_FONT_OPTIONS, STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS, TIKTOK_CAPTION_RENDERING_RULES, TIKTOK_CAPTION_STYLE_PRESETS, TIKTOK_TEXT_BACKGROUND_RENDERING } from "./lib/template-style-options.js";
11
11
  import { analyzeTemplateDna, hasTemplatePreviewMedia, stageTemplateDnaInputs, syncTemplateDnaModule } from "./lib/template-dna.js";
12
12
  import { assertTemplateFolderNameHasPrefix, defaultSkillPathForTemplateModule, deriveTemplateRootDirFromModulePath } from "./lib/template-paths.js";
13
13
  const execFileAsync = promisify(execFile);
@@ -857,6 +857,8 @@ async function runSessionCommand(argv) {
857
857
  caption_standard_version: CAPTION_STANDARD_VERSION,
858
858
  fonts: STARTER_TEMPLATE_FONT_OPTIONS,
859
859
  text_background_colors: STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS,
860
+ text_background_rendering: TIKTOK_TEXT_BACKGROUND_RENDERING,
861
+ caption_rendering_rules: TIKTOK_CAPTION_RENDERING_RULES,
860
862
  presets: TIKTOK_CAPTION_STYLE_PRESETS,
861
863
  package_dependencies: [
862
864
  "@fontsource/tiktok-sans",
@@ -99,6 +99,50 @@ export const TIKTOK_TEXT_BACKGROUND_COLOR_OPTIONS = [
99
99
  { id: "dark_gray", label: "Dark Gray", hex: "#333333" }
100
100
  ];
101
101
  export const STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS = TIKTOK_TEXT_BACKGROUND_COLOR_OPTIONS;
102
+ export const TIKTOK_TEXT_BACKGROUND_RENDERING = {
103
+ mode: "inline_highlight_chip",
104
+ rule: "Text background colors must render as inline highlight chips that hug the text only.",
105
+ padding: "Use visible per-line padding around glyph bounds; do not render full-width bars, paragraph washes, or loose caption boxes.",
106
+ shape: "Use slightly curved corners, similar to native TikTok text highlight chips.",
107
+ strengths: {
108
+ none: {
109
+ paddingX: 0,
110
+ paddingY: 0,
111
+ radius: 0,
112
+ opacity: 0
113
+ },
114
+ subtle: {
115
+ paddingX: 14,
116
+ paddingY: 8,
117
+ radius: 9,
118
+ opacity: 0.72
119
+ },
120
+ standard: {
121
+ paddingX: 20,
122
+ paddingY: 12,
123
+ radius: 12,
124
+ opacity: 0.86
125
+ },
126
+ strong: {
127
+ paddingX: 26,
128
+ paddingY: 14,
129
+ radius: 14,
130
+ opacity: 0.94
131
+ }
132
+ }
133
+ };
134
+ export const TIKTOK_CAPTION_RENDERING_RULES = {
135
+ multilineText: {
136
+ rule: "Render each caption as one multiline text block after wrapping, not as independently trimmed per-line text images.",
137
+ reason: "Per-line trimmed rendering makes line height, trim bounds, and shadow placement vary per line, which can make shorter wrapped lines look heavier or larger at the same nominal font size.",
138
+ implementation: "Choose the font size, line height, wrap width, and line breaks once for the whole caption; render the full block on a stable canvas; apply shadow/outline to the whole text block; then place optional line chips from measured line bounds.",
139
+ validation: "Test a wrapped caption with one short line and one long line; both lines must keep the same glyph scale, weight, baseline rhythm, and shadow strength."
140
+ },
141
+ tiktokSansSizing: {
142
+ rule: "Tune TikTok Sans wrapping, font size, and line spacing separately from Montserrat or generic sans defaults.",
143
+ reason: "TikTok Sans metrics differ enough from Montserrat that reused sizing assumptions can produce wrong wrap points, cramped leading, or off-weight captions."
144
+ }
145
+ };
102
146
  export const TIKTOK_CAPTION_STYLE_PRESETS = [
103
147
  {
104
148
  id: "tiktok_native_white",
@@ -114,6 +158,8 @@ export const TIKTOK_CAPTION_STYLE_PRESETS = [
114
158
  fontId: "tiktok_sans_semibold",
115
159
  fill: "#ffffff",
116
160
  defaultBackgroundColorId: "red",
161
+ backgroundRendering: "inline_highlight_chip",
162
+ chipStrength: "standard",
117
163
  shadow: "native_black_shadow"
118
164
  },
119
165
  {
@@ -122,6 +168,8 @@ export const TIKTOK_CAPTION_STYLE_PRESETS = [
122
168
  fontId: "tiktok_sans_semibold",
123
169
  fill: "#111111",
124
170
  defaultBackgroundColorId: "light_gray",
171
+ backgroundRendering: "inline_highlight_chip",
172
+ chipStrength: "subtle",
125
173
  shadow: "none"
126
174
  }
127
175
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mevdragon/vidfarm-devcli",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "Developer CLI for running the Vidfarm local template platform.",
5
5
  "type": "module",
6
6
  "bin": {