veo-sdk 0.5.17 → 0.5.18

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-345TTBZM.mjs';
2
+ import './chunk-JRUCBH2I.mjs';
3
+ import './chunk-PTG3BTJE.mjs';
4
+ //# sourceMappingURL=builder-Q3V33JIO.mjs.map
5
+ //# sourceMappingURL=builder-Q3V33JIO.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-CMSFET5V.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"builder-Q3V33JIO.mjs"}
package/dist/builder.cjs CHANGED
@@ -1956,6 +1956,10 @@ function mountCodeBlock(block, doc, context) {
1956
1956
  wrapper.appendChild(iframe);
1957
1957
  return { node: wrapper, cleanup };
1958
1958
  }
1959
+ if (context.editorPreview) {
1960
+ return { node: buildHostPlaceholder(doc), cleanup: () => {
1961
+ } };
1962
+ }
1959
1963
  const hostDoc = doc;
1960
1964
  const injected = [];
1961
1965
  if (typeof block.css === "string" && block.css.trim()) {
@@ -1987,6 +1991,18 @@ function mountCodeBlock(block, doc, context) {
1987
1991
  }
1988
1992
  };
1989
1993
  }
1994
+ function buildHostPlaceholder(doc) {
1995
+ const box = doc.createElement("div");
1996
+ box.className = "veo-code-placeholder";
1997
+ box.style.cssText = "border:1px dashed #cbd5e1;border-radius:8px;padding:12px;text-align:center;font:13px/1.4 system-ui,sans-serif;color:#64748b;background:#f8fafc;";
1998
+ const t = doc.createElement("strong");
1999
+ t.textContent = "\u27E8 \u27E9 Bloque de c\xF3digo";
2000
+ t.style.cssText = "display:block;color:#475569;margin-bottom:2px;";
2001
+ const s = doc.createElement("span");
2002
+ s.textContent = "Se ejecuta en tu app al publicar (no corre en el editor).";
2003
+ box.append(t, s);
2004
+ return box;
2005
+ }
1990
2006
  function runScript(old, hostDoc) {
1991
2007
  const s = hostDoc.createElement("script");
1992
2008
  for (const attr of Array.from(old.attributes)) s.setAttribute(attr.name, attr.value);
@@ -3153,6 +3169,7 @@ var GuidePreviewController = class {
3153
3169
  // el caller puede pasar `formSubmit` real (link de preview).
3154
3170
  onFormSubmit: this.input?.formSubmit ?? (() => Promise.resolve(true)),
3155
3171
  isPreview: true,
3172
+ editorPreview: this.input?.editorPreview === true,
3156
3173
  ...this.input?.formSubmit && this.input.formSubmitNote !== void 0 ? { previewNote: this.input.formSubmitNote } : {}
3157
3174
  });
3158
3175
  } catch {
@@ -4028,7 +4045,7 @@ function initBuilderMode() {
4028
4045
  dropTarget?.detach();
4029
4046
  dropTarget = null;
4030
4047
  previewStepIndex = cmd.guide.startStepIndex ?? 0;
4031
- const handle = previewGuide(cmd.guide);
4048
+ const handle = previewGuide({ ...cmd.guide, editorPreview: true });
4032
4049
  if (!cmd.editable) return;
4033
4050
  void handle.ready.then((result) => {
4034
4051
  if (!result.rendered) return;