veo-sdk 0.6.0 → 0.6.1
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-BKPMANUB.mjs +5 -0
- package/dist/{builder-3QPHB2VJ.mjs.map → builder-BKPMANUB.mjs.map} +1 -1
- package/dist/builder.cjs +79 -7
- package/dist/builder.cjs.map +1 -1
- package/dist/builder.mjs +4 -4
- package/dist/{chunk-GMXQMZ4X.mjs → chunk-GVPAJFNW.mjs} +3 -3
- package/dist/{chunk-GMXQMZ4X.mjs.map → chunk-GVPAJFNW.mjs.map} +1 -1
- package/dist/{chunk-O6USA4TU.mjs → chunk-NGP7IJVE.mjs} +81 -9
- package/dist/chunk-NGP7IJVE.mjs.map +1 -0
- package/dist/{chunk-N4VFMZFA.mjs → chunk-VWF4UHUU.mjs} +3 -3
- package/dist/{chunk-N4VFMZFA.mjs.map → chunk-VWF4UHUU.mjs.map} +1 -1
- package/dist/index.cjs +80 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/veo-builder.js +14 -14
- package/dist/veo-builder.js.map +1 -1
- package/dist/veo-guides.js +6 -6
- package/dist/veo-guides.js.map +1 -1
- package/package.json +1 -1
- package/dist/builder-3QPHB2VJ.mjs +0 -5
- package/dist/chunk-O6USA4TU.mjs.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { VEO_BLOCK_MIME, attachBlockDropTarget, attachDesignManipulator, createBuilderSession, initBuilderMode, startElementPicker, stopElementPicker } from './chunk-VWF4UHUU.mjs';
|
|
2
|
+
import './chunk-NGP7IJVE.mjs';
|
|
3
|
+
import './chunk-PTG3BTJE.mjs';
|
|
4
|
+
//# sourceMappingURL=builder-BKPMANUB.mjs.map
|
|
5
|
+
//# sourceMappingURL=builder-BKPMANUB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"builder-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"builder-BKPMANUB.mjs"}
|
package/dist/builder.cjs
CHANGED
|
@@ -3238,13 +3238,83 @@ function markerOffset(anchor, marker, position, offset6) {
|
|
|
3238
3238
|
}
|
|
3239
3239
|
return { x: x + offset6.x, y: y + offset6.y };
|
|
3240
3240
|
}
|
|
3241
|
+
var NO_CHILDREN = /* @__PURE__ */ new Set([
|
|
3242
|
+
"img",
|
|
3243
|
+
"input",
|
|
3244
|
+
"textarea",
|
|
3245
|
+
"select",
|
|
3246
|
+
"iframe",
|
|
3247
|
+
"video",
|
|
3248
|
+
"audio",
|
|
3249
|
+
"canvas",
|
|
3250
|
+
"br",
|
|
3251
|
+
"hr",
|
|
3252
|
+
"svg",
|
|
3253
|
+
"object",
|
|
3254
|
+
"embed"
|
|
3255
|
+
]);
|
|
3256
|
+
function canNest(anchor) {
|
|
3257
|
+
const win = anchor.ownerDocument.defaultView;
|
|
3258
|
+
if (!win || !(anchor instanceof win.HTMLElement)) return false;
|
|
3259
|
+
if (NO_CHILDREN.has(anchor.tagName.toLowerCase())) return false;
|
|
3260
|
+
const cs = win.getComputedStyle(anchor);
|
|
3261
|
+
if (cs.display === "contents") return false;
|
|
3262
|
+
const tokens = `${cs.overflow} ${cs.overflowX} ${cs.overflowY}`.split(/\s+/).filter(Boolean);
|
|
3263
|
+
return tokens.every((t) => t === "visible");
|
|
3264
|
+
}
|
|
3241
3265
|
function attachMarker(anchor, host, marker) {
|
|
3242
3266
|
host.style.position = "absolute";
|
|
3243
3267
|
host.style.zIndex = String(num(marker.zIndex, DEFAULT_MARKER_Z));
|
|
3244
3268
|
host.style.margin = "0";
|
|
3269
|
+
const position = marker.position ?? "top-right";
|
|
3270
|
+
const offset6 = { x: num(marker.offsetX, 0), y: num(marker.offsetY, 0) };
|
|
3271
|
+
const markerSize = () => {
|
|
3272
|
+
const m = host.getBoundingClientRect();
|
|
3273
|
+
return { width: m.width, height: m.height };
|
|
3274
|
+
};
|
|
3275
|
+
if (canNest(anchor)) {
|
|
3276
|
+
const win = anchor.ownerDocument.defaultView;
|
|
3277
|
+
const prevPosition = anchor.style.position;
|
|
3278
|
+
const computed = win.getComputedStyle(anchor).position;
|
|
3279
|
+
if (!computed || computed === "static") anchor.style.position = "relative";
|
|
3280
|
+
anchor.appendChild(host);
|
|
3281
|
+
const swallowClick = (e) => {
|
|
3282
|
+
e.preventDefault();
|
|
3283
|
+
e.stopPropagation();
|
|
3284
|
+
};
|
|
3285
|
+
const swallow = (e) => e.stopPropagation();
|
|
3286
|
+
host.addEventListener("click", swallowClick);
|
|
3287
|
+
host.addEventListener("pointerdown", swallow);
|
|
3288
|
+
host.addEventListener("mousedown", swallow);
|
|
3289
|
+
const update2 = () => {
|
|
3290
|
+
const { x, y } = markerOffset(
|
|
3291
|
+
{
|
|
3292
|
+
left: -anchor.clientLeft,
|
|
3293
|
+
top: -anchor.clientTop,
|
|
3294
|
+
width: anchor.offsetWidth,
|
|
3295
|
+
height: anchor.offsetHeight
|
|
3296
|
+
},
|
|
3297
|
+
markerSize(),
|
|
3298
|
+
position,
|
|
3299
|
+
offset6
|
|
3300
|
+
);
|
|
3301
|
+
host.style.left = `${Math.round(x)}px`;
|
|
3302
|
+
host.style.top = `${Math.round(y)}px`;
|
|
3303
|
+
};
|
|
3304
|
+
update2();
|
|
3305
|
+
const stop2 = dom.autoUpdate(anchor, host, update2, { ancestorScroll: false, layoutShift: false });
|
|
3306
|
+
return () => {
|
|
3307
|
+
stop2();
|
|
3308
|
+
host.removeEventListener("click", swallowClick);
|
|
3309
|
+
host.removeEventListener("pointerdown", swallow);
|
|
3310
|
+
host.removeEventListener("mousedown", swallow);
|
|
3311
|
+
host.remove();
|
|
3312
|
+
anchor.style.position = prevPosition;
|
|
3313
|
+
};
|
|
3314
|
+
}
|
|
3315
|
+
anchor.ownerDocument.body.appendChild(host);
|
|
3245
3316
|
const update = () => {
|
|
3246
3317
|
const a = anchor.getBoundingClientRect();
|
|
3247
|
-
const m = host.getBoundingClientRect();
|
|
3248
3318
|
const { x, y } = markerOffset(
|
|
3249
3319
|
{
|
|
3250
3320
|
left: a.left + window.scrollX,
|
|
@@ -3252,15 +3322,19 @@ function attachMarker(anchor, host, marker) {
|
|
|
3252
3322
|
width: a.width,
|
|
3253
3323
|
height: a.height
|
|
3254
3324
|
},
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3325
|
+
markerSize(),
|
|
3326
|
+
position,
|
|
3327
|
+
offset6
|
|
3258
3328
|
);
|
|
3259
3329
|
host.style.left = `${Math.round(x)}px`;
|
|
3260
3330
|
host.style.top = `${Math.round(y)}px`;
|
|
3261
3331
|
};
|
|
3262
3332
|
update();
|
|
3263
|
-
|
|
3333
|
+
const stop = dom.autoUpdate(anchor, host, update);
|
|
3334
|
+
return () => {
|
|
3335
|
+
stop();
|
|
3336
|
+
host.remove();
|
|
3337
|
+
};
|
|
3264
3338
|
}
|
|
3265
3339
|
|
|
3266
3340
|
// src/plugins/guides/renderers/composite-renderer.ts
|
|
@@ -3789,9 +3863,7 @@ var CompositeRenderer = class extends BaseRenderer {
|
|
|
3789
3863
|
root.appendChild(wrapper);
|
|
3790
3864
|
if (marker) {
|
|
3791
3865
|
host.style.display = "inline-block";
|
|
3792
|
-
(anchor.ownerDocument ?? document).body.appendChild(host);
|
|
3793
3866
|
this.registerCleanup(attachMarker(anchor, host, marker));
|
|
3794
|
-
this.registerCleanup(() => host.remove());
|
|
3795
3867
|
} else {
|
|
3796
3868
|
host.style.display = "inline-block";
|
|
3797
3869
|
const pos = inlinePosOf(step.inlinePosition);
|