@danhachuel/thunderbolt 0.5.35 → 0.5.36

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.
@@ -177,6 +177,20 @@ def _first_page(value: Any) -> tuple[str, list[dict[str, Any]]]:
177
177
  return page_id, pages
178
178
 
179
179
 
180
+ def _thumbnail_layout_instructions() -> str:
181
+ """Return hard layout constraints for Canva's generated editable designs."""
182
+ return (
183
+ "LAYOUT REQUIREMENTS (mandatory): use separate editable bounding boxes for every text item; "
184
+ "never stack or merge text, numbers, badges, or icons. Keep a safe margin of at least 5% on all sides. "
185
+ "Use a clear 16:9 grid: primary headline in the left 58% of the canvas, secondary text below it with "
186
+ "at least 4% vertical separation, and any number/stat badge in the upper-right 30% inside its own box. "
187
+ "Place icons or decorative symbols in the right-side visual area, separated from every text box by at least 3% "
188
+ "of canvas width. Each box must have its own position, size, alignment, and layer; do not place two elements "
189
+ "at the same coordinates. Preserve readable contrast and leave breathing room between all elements. "
190
+ "Before finishing, check that no text, number, or icon intersects another element."
191
+ )
192
+
193
+
180
194
  def run_direct_canva_thumbnail(
181
195
  *,
182
196
  title: str,
@@ -231,11 +245,12 @@ def run_direct_canva_thumbnail(
231
245
  "query": (
232
246
  "Create one editable YouTube thumbnail in 16:9 format for this topic: "
233
247
  f"{title}. Context: {topic}. Thumbnail prompt: {prompt[:1200]}. "
234
- "Use clearly editable headline text boxes, a strong background, readable text "
235
- "background shapes, relevant icons, depth/effects, and high-contrast lettering. "
248
+ "Use clearly editable headline text boxes as independent headline and secondary text boxes, a strong background, "
249
+ "readable text background shapes, relevant icons, depth/effects, and high-contrast lettering. "
250
+ f"{_thumbnail_layout_instructions()} "
236
251
  "Follow these local Thumbnail Blueprint rules: " + blueprint_text
237
252
  ),
238
- "user_intent": "Create an editable YouTube thumbnail with text boxes and visual elements when searched designs are not editable.",
253
+ "user_intent": "Create an editable YouTube thumbnail with separate non-overlapping text boxes, number/stat boxes and visual elements when searched designs are not editable.",
239
254
  }))
240
255
  job_id = _generation_job_id(generated)
241
256
  generated_candidates = _items(generated)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.5.35",
3
+ "version": "0.5.36",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",