@koda-sl/baker-cli 0.265.1-dev.1f1c09c80 → 0.265.2-dev.1f1c09c80
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/cli.js +34 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -32651,8 +32651,9 @@ function buildAdBrandOverlay(opts) {
|
|
|
32651
32651
|
const parts = [
|
|
32652
32652
|
"<!-- Brand layer, emitted by `baker canvas scaffold-ad`. The mark and the closing",
|
|
32653
32653
|
" card are drawn HERE, by the composition \u2014 never generated as a picture, because",
|
|
32654
|
-
" a video model garbles a wordmark every time. Restyle freely
|
|
32655
|
-
"
|
|
32654
|
+
" a video model garbles a wordmark every time. Restyle freely, but keep the",
|
|
32655
|
+
" data-start/data-dur attributes and the script below: that script is what shows",
|
|
32656
|
+
" and hides these, and the host composition has nothing that would. -->"
|
|
32656
32657
|
];
|
|
32657
32658
|
if (logo) {
|
|
32658
32659
|
parts.push(
|
|
@@ -32670,10 +32671,40 @@ function buildAdBrandOverlay(opts) {
|
|
|
32670
32671
|
parts.push(
|
|
32671
32672
|
`<div class="clip endcard" data-start="${cardAtS}" data-dur="${cardDurationS}" data-role="cta">`,
|
|
32672
32673
|
...cardBits.map((b) => ` ${b}`),
|
|
32673
|
-
"</div>"
|
|
32674
|
+
"</div>",
|
|
32675
|
+
brandLayerDriver()
|
|
32674
32676
|
);
|
|
32675
32677
|
return parts.join("\n");
|
|
32676
32678
|
}
|
|
32679
|
+
function brandLayerDriver() {
|
|
32680
|
+
return [
|
|
32681
|
+
"<script>",
|
|
32682
|
+
" (function () {",
|
|
32683
|
+
" var els = Array.prototype.slice.call(document.querySelectorAll('.brand-mark, .endcard'));",
|
|
32684
|
+
" if (!els.length) return;",
|
|
32685
|
+
" els.forEach(function (el) { gsap.set(el, { visibility: 'hidden' }); });",
|
|
32686
|
+
" function attach(tl) {",
|
|
32687
|
+
" if (!tl) return;",
|
|
32688
|
+
" els.forEach(function (el) {",
|
|
32689
|
+
" var at = parseFloat(el.getAttribute('data-start') || '0') || 0;",
|
|
32690
|
+
" var dur = parseFloat(el.getAttribute('data-dur') || '0') || 0;",
|
|
32691
|
+
" tl.set(el, { visibility: 'visible' }, at);",
|
|
32692
|
+
" if (dur > 0) tl.set(el, { visibility: 'hidden' }, at + dur);",
|
|
32693
|
+
" });",
|
|
32694
|
+
" }",
|
|
32695
|
+
" var store = window.__timelines || {};",
|
|
32696
|
+
" var main = store.main;",
|
|
32697
|
+
" if (main) { attach(main); return; }",
|
|
32698
|
+
" Object.defineProperty(store, 'main', {",
|
|
32699
|
+
" configurable: true,",
|
|
32700
|
+
" get: function () { return main; },",
|
|
32701
|
+
" set: function (tl) { main = tl; attach(tl); },",
|
|
32702
|
+
" });",
|
|
32703
|
+
" window.__timelines = store;",
|
|
32704
|
+
" })();",
|
|
32705
|
+
"</script>"
|
|
32706
|
+
].join("\n");
|
|
32707
|
+
}
|
|
32677
32708
|
function adBrandOverlayCss() {
|
|
32678
32709
|
return [
|
|
32679
32710
|
" /* --- brand layer (baker canvas scaffold-ad) --- */",
|