veo-sdk 0.5.23 → 0.5.25

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-5F3DX5VP.mjs';
2
+ import './chunk-ZK4HWKL3.mjs';
3
+ import './chunk-PTG3BTJE.mjs';
4
+ //# sourceMappingURL=builder-HDTWSDJR.mjs.map
5
+ //# sourceMappingURL=builder-HDTWSDJR.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-55UEMBDO.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-HDTWSDJR.mjs"}
package/dist/builder.cjs CHANGED
@@ -1968,11 +1968,17 @@ function mountCodeBlock(block, doc, context) {
1968
1968
  if (typeof block.html === "string" && block.html.trim()) {
1969
1969
  node = doc.createElement("div");
1970
1970
  node.className = "veo-code-html";
1971
- node.innerHTML = block.html;
1972
- for (const old of Array.from(node.querySelectorAll("script"))) {
1971
+ const inner = node.attachShadow({ mode: "open" });
1972
+ for (const sheet of Array.from(hostDoc.querySelectorAll('link[rel="stylesheet"], style'))) {
1973
+ inner.appendChild(sheet.cloneNode(true));
1974
+ }
1975
+ const holder = doc.createElement("div");
1976
+ holder.innerHTML = block.html;
1977
+ for (const old of Array.from(holder.querySelectorAll("script"))) {
1973
1978
  injected.push(runScript(old, hostDoc));
1974
1979
  old.remove();
1975
1980
  }
1981
+ inner.appendChild(holder);
1976
1982
  }
1977
1983
  if (typeof block.js === "string" && block.js.trim()) {
1978
1984
  const s = hostDoc.createElement("script");
@@ -2306,7 +2312,6 @@ var CompositeRenderer = class extends BaseRenderer {
2306
2312
  if (closeColor) closeBtn.style.color = closeColor;
2307
2313
  const closePos = typeof design.closePosition === "string" ? design.closePosition : "top-right";
2308
2314
  applyClosePosition(closeBtn, closePos);
2309
- reserveCloseSpace(card, closePos);
2310
2315
  if (hoverColor) {
2311
2316
  closeBtn.addEventListener("mouseenter", () => {
2312
2317
  closeBtn.style.color = hoverColor;
@@ -2539,16 +2544,6 @@ function applyClosePosition(btn, position) {
2539
2544
  s.setProperty(vertical, CLOSE_INSET);
2540
2545
  s.setProperty(horizontal, CLOSE_INSET);
2541
2546
  }
2542
- var CLOSE_RESERVE = "34px";
2543
- function reserveCloseSpace(card, position) {
2544
- const blocks = Array.from(card.children).filter(
2545
- (c) => c instanceof HTMLElement && !c.classList.contains("veo-guide-close")
2546
- );
2547
- if (blocks.length === 0) return;
2548
- const target = position.includes("bottom") ? blocks[blocks.length - 1] : blocks[0];
2549
- if (!target) return;
2550
- target.style[position.includes("left") ? "paddingLeft" : "paddingRight"] = CLOSE_RESERVE;
2551
- }
2552
2547
  function makeCaret(doc, design) {
2553
2548
  const caret = doc.createElement("div");
2554
2549
  caret.className = "veo-composite-caret";