veo-sdk 0.5.14 → 0.5.16

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.
@@ -0,0 +1,5 @@
1
+ export { VEO_BLOCK_MIME, attachBlockDropTarget, attachDesignManipulator, createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-362B5ACY.mjs';
2
+ import './chunk-KSQJQ2UU.mjs';
3
+ import './chunk-PTG3BTJE.mjs';
4
+ //# sourceMappingURL=builder-M6QP7H3A.mjs.map
5
+ //# sourceMappingURL=builder-M6QP7H3A.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-T7233XIB.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-M6QP7H3A.mjs"}
package/dist/builder.cjs CHANGED
@@ -2328,6 +2328,9 @@ var CompositeRenderer = class extends BaseRenderer {
2328
2328
  const closeColor = typeof design.closeColor === "string" ? design.closeColor : null;
2329
2329
  const hoverColor = typeof design.closeHoverColor === "string" ? design.closeHoverColor : null;
2330
2330
  if (closeColor) closeBtn.style.color = closeColor;
2331
+ const closePos = typeof design.closePosition === "string" ? design.closePosition : "top-right";
2332
+ applyClosePosition(closeBtn, closePos);
2333
+ reserveCloseSpace(card, closePos);
2331
2334
  if (hoverColor) {
2332
2335
  closeBtn.addEventListener("mouseenter", () => {
2333
2336
  closeBtn.style.color = hoverColor;
@@ -2554,6 +2557,28 @@ function applyViewportPosition(card, position, design) {
2554
2557
  const ty = v === "middle" ? "-50%" : "0";
2555
2558
  s.transform = tx === "0" && ty === "0" ? "" : `translate(${tx}, ${ty})`;
2556
2559
  }
2560
+ var CLOSE_INSET = "10px";
2561
+ function applyClosePosition(btn, position) {
2562
+ const s = btn.style;
2563
+ s.top = "auto";
2564
+ s.right = "auto";
2565
+ s.bottom = "auto";
2566
+ s.left = "auto";
2567
+ const vertical = position.includes("bottom") ? "bottom" : "top";
2568
+ const horizontal = position.includes("left") ? "left" : "right";
2569
+ s.setProperty(vertical, CLOSE_INSET);
2570
+ s.setProperty(horizontal, CLOSE_INSET);
2571
+ }
2572
+ var CLOSE_RESERVE = "34px";
2573
+ function reserveCloseSpace(card, position) {
2574
+ const blocks = Array.from(card.children).filter(
2575
+ (c) => c instanceof HTMLElement && !c.classList.contains("veo-guide-close")
2576
+ );
2577
+ if (blocks.length === 0) return;
2578
+ const target = position.includes("bottom") ? blocks[blocks.length - 1] : blocks[0];
2579
+ if (!target) return;
2580
+ target.style[position.includes("left") ? "paddingLeft" : "paddingRight"] = CLOSE_RESERVE;
2581
+ }
2557
2582
  function makeCaret(doc, design) {
2558
2583
  const caret = doc.createElement("div");
2559
2584
  caret.className = "veo-composite-caret";