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.
- package/dist/builder-Q3V33JIO.mjs +5 -0
- package/dist/{builder-CMSFET5V.mjs.map → builder-Q3V33JIO.mjs.map} +1 -1
- package/dist/builder.cjs +18 -1
- package/dist/builder.cjs.map +1 -1
- package/dist/builder.d.cts +2 -2
- package/dist/builder.d.ts +2 -2
- package/dist/builder.mjs +4 -4
- package/dist/{chunk-Z73XWYE3.mjs → chunk-345TTBZM.mjs} +4 -4
- package/dist/chunk-345TTBZM.mjs.map +1 -0
- package/dist/{chunk-5Q6CFNW4.mjs → chunk-JRUCBH2I.mjs} +19 -2
- package/dist/chunk-JRUCBH2I.mjs.map +1 -0
- package/dist/{chunk-L3KS6G7T.mjs → chunk-JYTQQ623.mjs} +3 -3
- package/dist/{chunk-L3KS6G7T.mjs.map → chunk-JYTQQ623.mjs.map} +1 -1
- package/dist/{guide-preview-XUnTmzUO.d.cts → guide-preview-BiufCjq9.d.cts} +7 -0
- package/dist/{guide-preview-XUnTmzUO.d.ts → guide-preview-BiufCjq9.d.ts} +7 -0
- package/dist/index.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +5 -5
- package/dist/veo-builder.js +6 -6
- package/dist/veo-builder.js.map +1 -1
- package/dist/veo-guides.js +3 -3
- package/dist/veo-guides.js.map +1 -1
- package/package.json +1 -1
- package/dist/builder-CMSFET5V.mjs +0 -5
- package/dist/chunk-5Q6CFNW4.mjs.map +0 -1
- package/dist/chunk-Z73XWYE3.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2135,6 +2135,10 @@ function mountCodeBlock(block, doc, context) {
|
|
|
2135
2135
|
wrapper.appendChild(iframe);
|
|
2136
2136
|
return { node: wrapper, cleanup };
|
|
2137
2137
|
}
|
|
2138
|
+
if (context.editorPreview) {
|
|
2139
|
+
return { node: buildHostPlaceholder(doc), cleanup: () => {
|
|
2140
|
+
} };
|
|
2141
|
+
}
|
|
2138
2142
|
const hostDoc = doc;
|
|
2139
2143
|
const injected = [];
|
|
2140
2144
|
if (typeof block.css === "string" && block.css.trim()) {
|
|
@@ -2166,6 +2170,18 @@ function mountCodeBlock(block, doc, context) {
|
|
|
2166
2170
|
}
|
|
2167
2171
|
};
|
|
2168
2172
|
}
|
|
2173
|
+
function buildHostPlaceholder(doc) {
|
|
2174
|
+
const box = doc.createElement("div");
|
|
2175
|
+
box.className = "veo-code-placeholder";
|
|
2176
|
+
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;";
|
|
2177
|
+
const t = doc.createElement("strong");
|
|
2178
|
+
t.textContent = "\u27E8 \u27E9 Bloque de c\xF3digo";
|
|
2179
|
+
t.style.cssText = "display:block;color:#475569;margin-bottom:2px;";
|
|
2180
|
+
const s = doc.createElement("span");
|
|
2181
|
+
s.textContent = "Se ejecuta en tu app al publicar (no corre en el editor).";
|
|
2182
|
+
box.append(t, s);
|
|
2183
|
+
return box;
|
|
2184
|
+
}
|
|
2169
2185
|
function runScript(old, hostDoc) {
|
|
2170
2186
|
const s = hostDoc.createElement("script");
|
|
2171
2187
|
for (const attr of Array.from(old.attributes)) s.setAttribute(attr.name, attr.value);
|
|
@@ -3499,6 +3515,7 @@ var init_guide_preview = __esm({
|
|
|
3499
3515
|
// el caller puede pasar `formSubmit` real (link de preview).
|
|
3500
3516
|
onFormSubmit: this.input?.formSubmit ?? (() => Promise.resolve(true)),
|
|
3501
3517
|
isPreview: true,
|
|
3518
|
+
editorPreview: this.input?.editorPreview === true,
|
|
3502
3519
|
...this.input?.formSubmit && this.input.formSubmitNote !== void 0 ? { previewNote: this.input.formSubmitNote } : {}
|
|
3503
3520
|
});
|
|
3504
3521
|
} catch {
|
|
@@ -4363,7 +4380,7 @@ function initBuilderMode() {
|
|
|
4363
4380
|
dropTarget?.detach();
|
|
4364
4381
|
dropTarget = null;
|
|
4365
4382
|
previewStepIndex = cmd.guide.startStepIndex ?? 0;
|
|
4366
|
-
const handle = previewGuide(cmd.guide);
|
|
4383
|
+
const handle = previewGuide({ ...cmd.guide, editorPreview: true });
|
|
4367
4384
|
if (!cmd.editable) return;
|
|
4368
4385
|
void handle.ready.then((result) => {
|
|
4369
4386
|
if (!result.rendered) return;
|