@sepveneto/free-dom 0.14.4 → 0.14.6
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/index.css +4 -6
- package/dist/index.js +53 -58
- package/dist/index.mjs +57 -62
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ../../../../../../../tmp/tmp-
|
|
1
|
+
/* ../../../../../../../tmp/tmp-2010-fxwWsKC9UXF9/core/src/style/index.css */
|
|
2
2
|
:root {
|
|
3
3
|
--vv-free-dom--theme: rgb(64, 137, 239);
|
|
4
4
|
--vv-free-dom--line: var(--vv-free-dom--theme);
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
.vv-free-dom--draggable__disabled {
|
|
22
22
|
cursor: initial;
|
|
23
23
|
}
|
|
24
|
-
.vv-free-dom--draggable__mask.vv-free-dom--draggable__selected::after
|
|
25
|
-
.vv-free-dom--draggable__mask.vv-free-dom--draggable__selected:focus-visible {
|
|
24
|
+
.vv-free-dom--draggable__mask.vv-free-dom--draggable__selected::after {
|
|
26
25
|
content: "";
|
|
27
26
|
z-index: 1;
|
|
28
27
|
display: block;
|
|
@@ -32,10 +31,9 @@
|
|
|
32
31
|
top: 0;
|
|
33
32
|
left: 0;
|
|
34
33
|
background: var(--vv-free-dom--selected);
|
|
35
|
-
|
|
34
|
+
border: 2px dashed var(--vv-free-dom--theme);
|
|
36
35
|
}
|
|
37
|
-
.vv-free-dom--draggable__mask.vv-free-dom--draggable__selected::after::selection
|
|
38
|
-
.vv-free-dom--draggable__mask.vv-free-dom--draggable__selected:focus-visible::selection {
|
|
36
|
+
.vv-free-dom--draggable__mask.vv-free-dom--draggable__selected::after::selection {
|
|
39
37
|
background-color: transparent !important;
|
|
40
38
|
}
|
|
41
39
|
.vv-free-dom--line {
|
package/dist/index.js
CHANGED
|
@@ -179,11 +179,11 @@ var require_common = __commonJS({
|
|
|
179
179
|
let enableOverride = null;
|
|
180
180
|
let namespacesCache;
|
|
181
181
|
let enabledCache;
|
|
182
|
-
function
|
|
183
|
-
if (!
|
|
182
|
+
function debug2(...args) {
|
|
183
|
+
if (!debug2.enabled) {
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
const self2 =
|
|
186
|
+
const self2 = debug2;
|
|
187
187
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
188
188
|
const ms = curr - (prevTime || curr);
|
|
189
189
|
self2.diff = ms;
|
|
@@ -213,12 +213,12 @@ var require_common = __commonJS({
|
|
|
213
213
|
const logFn = self2.log || createDebug.log;
|
|
214
214
|
logFn.apply(self2, args);
|
|
215
215
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
Object.defineProperty(
|
|
216
|
+
debug2.namespace = namespace;
|
|
217
|
+
debug2.useColors = createDebug.useColors();
|
|
218
|
+
debug2.color = createDebug.selectColor(namespace);
|
|
219
|
+
debug2.extend = extend;
|
|
220
|
+
debug2.destroy = createDebug.destroy;
|
|
221
|
+
Object.defineProperty(debug2, "enabled", {
|
|
222
222
|
enumerable: true,
|
|
223
223
|
configurable: false,
|
|
224
224
|
get: () => {
|
|
@@ -236,9 +236,9 @@ var require_common = __commonJS({
|
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
if (typeof createDebug.init === "function") {
|
|
239
|
-
createDebug.init(
|
|
239
|
+
createDebug.init(debug2);
|
|
240
240
|
}
|
|
241
|
-
return
|
|
241
|
+
return debug2;
|
|
242
242
|
}
|
|
243
243
|
function extend(namespace, delimiter) {
|
|
244
244
|
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
@@ -763,11 +763,11 @@ var require_node = __commonJS({
|
|
|
763
763
|
function load() {
|
|
764
764
|
return process.env.DEBUG;
|
|
765
765
|
}
|
|
766
|
-
function init(
|
|
767
|
-
|
|
766
|
+
function init(debug2) {
|
|
767
|
+
debug2.inspectOpts = {};
|
|
768
768
|
const keys = Object.keys(exports.inspectOpts);
|
|
769
769
|
for (let i = 0; i < keys.length; i++) {
|
|
770
|
-
|
|
770
|
+
debug2.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
module2.exports = require_common()(exports);
|
|
@@ -38170,7 +38170,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
38170
38170
|
isUnmounting: false,
|
|
38171
38171
|
leavingVNodes: /* @__PURE__ */ new Map()
|
|
38172
38172
|
};
|
|
38173
|
-
|
|
38173
|
+
onMounted7(() => {
|
|
38174
38174
|
state2.isMounted = true;
|
|
38175
38175
|
});
|
|
38176
38176
|
onBeforeUnmount3(() => {
|
|
@@ -39489,7 +39489,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
39489
39489
|
}
|
|
39490
39490
|
}
|
|
39491
39491
|
};
|
|
39492
|
-
|
|
39492
|
+
onMounted7(cacheSubtree);
|
|
39493
39493
|
onUpdated2(cacheSubtree);
|
|
39494
39494
|
onBeforeUnmount3(() => {
|
|
39495
39495
|
cache.forEach((cached) => {
|
|
@@ -39647,7 +39647,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
39647
39647
|
}
|
|
39648
39648
|
};
|
|
39649
39649
|
var onBeforeMount2 = createHook("bm");
|
|
39650
|
-
var
|
|
39650
|
+
var onMounted7 = createHook("m");
|
|
39651
39651
|
var onBeforeUpdate2 = createHook(
|
|
39652
39652
|
"bu"
|
|
39653
39653
|
);
|
|
@@ -40162,7 +40162,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
40162
40162
|
}
|
|
40163
40163
|
}
|
|
40164
40164
|
registerLifecycleHook(onBeforeMount2, beforeMount);
|
|
40165
|
-
registerLifecycleHook(
|
|
40165
|
+
registerLifecycleHook(onMounted7, mounted);
|
|
40166
40166
|
registerLifecycleHook(onBeforeUpdate2, beforeUpdate);
|
|
40167
40167
|
registerLifecycleHook(onUpdated2, updated);
|
|
40168
40168
|
registerLifecycleHook(onActivated, activated);
|
|
@@ -42296,7 +42296,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
42296
42296
|
return ctx;
|
|
42297
42297
|
}
|
|
42298
42298
|
};
|
|
42299
|
-
function
|
|
42299
|
+
function watchEffect6(effect, options) {
|
|
42300
42300
|
return doWatch(effect, null, options);
|
|
42301
42301
|
}
|
|
42302
42302
|
function watchPostEffect(effect, options) {
|
|
@@ -44128,7 +44128,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
44128
44128
|
exports.onBeforeUpdate = onBeforeUpdate2;
|
|
44129
44129
|
exports.onDeactivated = onDeactivated;
|
|
44130
44130
|
exports.onErrorCaptured = onErrorCaptured;
|
|
44131
|
-
exports.onMounted =
|
|
44131
|
+
exports.onMounted = onMounted7;
|
|
44132
44132
|
exports.onRenderTracked = onRenderTracked;
|
|
44133
44133
|
exports.onRenderTriggered = onRenderTriggered;
|
|
44134
44134
|
exports.onServerPrefetch = onServerPrefetch;
|
|
@@ -44164,7 +44164,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
44164
44164
|
exports.version = version3;
|
|
44165
44165
|
exports.warn = warn$1;
|
|
44166
44166
|
exports.watch = watch8;
|
|
44167
|
-
exports.watchEffect =
|
|
44167
|
+
exports.watchEffect = watchEffect6;
|
|
44168
44168
|
exports.watchPostEffect = watchPostEffect;
|
|
44169
44169
|
exports.watchSyncEffect = watchSyncEffect;
|
|
44170
44170
|
exports.withAsyncContext = withAsyncContext;
|
|
@@ -45300,7 +45300,7 @@ var require_runtime_core_cjs = __commonJS({
|
|
|
45300
45300
|
isUnmounting: false,
|
|
45301
45301
|
leavingVNodes: /* @__PURE__ */ new Map()
|
|
45302
45302
|
};
|
|
45303
|
-
|
|
45303
|
+
onMounted7(() => {
|
|
45304
45304
|
state2.isMounted = true;
|
|
45305
45305
|
});
|
|
45306
45306
|
onBeforeUnmount3(() => {
|
|
@@ -46851,7 +46851,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
46851
46851
|
}
|
|
46852
46852
|
}
|
|
46853
46853
|
};
|
|
46854
|
-
|
|
46854
|
+
onMounted7(cacheSubtree);
|
|
46855
46855
|
onUpdated2(cacheSubtree);
|
|
46856
46856
|
onBeforeUnmount3(() => {
|
|
46857
46857
|
cache.forEach((cached) => {
|
|
@@ -47017,7 +47017,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
47017
47017
|
}
|
|
47018
47018
|
};
|
|
47019
47019
|
var onBeforeMount2 = createHook("bm");
|
|
47020
|
-
var
|
|
47020
|
+
var onMounted7 = createHook("m");
|
|
47021
47021
|
var onBeforeUpdate2 = createHook(
|
|
47022
47022
|
"bu"
|
|
47023
47023
|
);
|
|
@@ -47754,7 +47754,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
47754
47754
|
}
|
|
47755
47755
|
}
|
|
47756
47756
|
registerLifecycleHook(onBeforeMount2, beforeMount);
|
|
47757
|
-
registerLifecycleHook(
|
|
47757
|
+
registerLifecycleHook(onMounted7, mounted);
|
|
47758
47758
|
registerLifecycleHook(onBeforeUpdate2, beforeUpdate);
|
|
47759
47759
|
registerLifecycleHook(onUpdated2, updated);
|
|
47760
47760
|
registerLifecycleHook(onActivated, activated);
|
|
@@ -50302,7 +50302,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
50302
50302
|
return ctx;
|
|
50303
50303
|
}
|
|
50304
50304
|
};
|
|
50305
|
-
function
|
|
50305
|
+
function watchEffect6(effect, options) {
|
|
50306
50306
|
return doWatch(effect, null, options);
|
|
50307
50307
|
}
|
|
50308
50308
|
function watchPostEffect(effect, options) {
|
|
@@ -52670,7 +52670,7 @@ Component that was made reactive: `,
|
|
|
52670
52670
|
exports.onBeforeUpdate = onBeforeUpdate2;
|
|
52671
52671
|
exports.onDeactivated = onDeactivated;
|
|
52672
52672
|
exports.onErrorCaptured = onErrorCaptured;
|
|
52673
|
-
exports.onMounted =
|
|
52673
|
+
exports.onMounted = onMounted7;
|
|
52674
52674
|
exports.onRenderTracked = onRenderTracked;
|
|
52675
52675
|
exports.onRenderTriggered = onRenderTriggered;
|
|
52676
52676
|
exports.onServerPrefetch = onServerPrefetch;
|
|
@@ -52706,7 +52706,7 @@ Component that was made reactive: `,
|
|
|
52706
52706
|
exports.version = version3;
|
|
52707
52707
|
exports.warn = warn2;
|
|
52708
52708
|
exports.watch = watch8;
|
|
52709
|
-
exports.watchEffect =
|
|
52709
|
+
exports.watchEffect = watchEffect6;
|
|
52710
52710
|
exports.watchPostEffect = watchPostEffect;
|
|
52711
52711
|
exports.watchSyncEffect = watchSyncEffect;
|
|
52712
52712
|
exports.withAsyncContext = withAsyncContext;
|
|
@@ -56752,8 +56752,8 @@ function useDraggableData(props) {
|
|
|
56752
56752
|
props.dragStartFn(evt, data);
|
|
56753
56753
|
};
|
|
56754
56754
|
const handleDrag = (evt, data) => {
|
|
56755
|
-
x.value =
|
|
56756
|
-
y.value =
|
|
56755
|
+
x.value = data.x;
|
|
56756
|
+
y.value = data.y;
|
|
56757
56757
|
deltaX.value = data.deltaX;
|
|
56758
56758
|
deltaY.value = data.deltaY;
|
|
56759
56759
|
props.dragFn(evt, data);
|
|
@@ -57706,8 +57706,8 @@ function useMask(target, props, nodes, size) {
|
|
|
57706
57706
|
return Math.max(a, c) - Math.min(b, d) <= -standard;
|
|
57707
57707
|
}
|
|
57708
57708
|
function offsetFormat(evt) {
|
|
57709
|
-
const offsetX = evt.clientX - rect.x.value;
|
|
57710
|
-
const offsetY = evt.clientY - rect.y.value;
|
|
57709
|
+
const offsetX = (evt.clientX - rect.x.value) / props.transformScale;
|
|
57710
|
+
const offsetY = (evt.clientY - rect.y.value) / props.transformScale;
|
|
57711
57711
|
return {
|
|
57712
57712
|
x: offsetX,
|
|
57713
57713
|
y: offsetY
|
|
@@ -58278,9 +58278,13 @@ var freeDom = (0, import_vue_demi17.defineComponent)({
|
|
|
58278
58278
|
}
|
|
58279
58279
|
handleDragStop(evt, coreData);
|
|
58280
58280
|
sceneContext.emit("moveup");
|
|
58281
|
-
|
|
58282
|
-
|
|
58283
|
-
|
|
58281
|
+
const roundX = Math.round(x.value);
|
|
58282
|
+
const roundY = Math.round(y.value);
|
|
58283
|
+
const roundW = Math.round(width.value || 0);
|
|
58284
|
+
const roundH = Math.round(height.value || 0);
|
|
58285
|
+
emit("update:x", roundX);
|
|
58286
|
+
emit("update:y", roundY);
|
|
58287
|
+
emit("update:modelValue", { x: roundX, y: roundY, w: roundW, h: roundH });
|
|
58284
58288
|
sceneContext.history?.push({ type: "move-end" });
|
|
58285
58289
|
};
|
|
58286
58290
|
const onDragStart = (evt, coreData) => {
|
|
@@ -58469,8 +58473,6 @@ var freeDom = (0, import_vue_demi17.defineComponent)({
|
|
|
58469
58473
|
var freeDom_default = freeDom;
|
|
58470
58474
|
|
|
58471
58475
|
// src/components/freeDomWrap.ts
|
|
58472
|
-
var import_debug2 = __toESM(require_src());
|
|
58473
|
-
var debug2 = (0, import_debug2.default)("freeDom:wrap");
|
|
58474
58476
|
var freeDomWrapProps = {
|
|
58475
58477
|
diff: {
|
|
58476
58478
|
type: Number,
|
|
@@ -58521,32 +58523,23 @@ var FreeDomWrap = (0, import_vue_demi18.defineComponent)({
|
|
|
58521
58523
|
const eventBus = useEventBus();
|
|
58522
58524
|
const nodes = (0, import_vue_demi18.ref)([]);
|
|
58523
58525
|
const history = useOperateHistory(nodes);
|
|
58524
|
-
const width = (0, import_vue_demi18.ref)(
|
|
58525
|
-
const height = (0, import_vue_demi18.ref)(
|
|
58526
|
+
const width = (0, import_vue_demi18.ref)();
|
|
58527
|
+
const height = (0, import_vue_demi18.ref)();
|
|
58526
58528
|
const rectRef = (0, import_vue_demi18.shallowRef)();
|
|
58527
|
-
const wrapRect = useElementBounding(rectRef);
|
|
58528
58529
|
const wrapStyle = (0, import_vue_demi18.computed)(() => ({
|
|
58529
58530
|
height: height.value + "px",
|
|
58530
58531
|
width: width.value + "px"
|
|
58531
58532
|
}));
|
|
58532
|
-
(0, import_vue_demi18.
|
|
58533
|
-
|
|
58534
|
-
|
|
58533
|
+
(0, import_vue_demi18.onMounted)(() => {
|
|
58534
|
+
if (rectRef.value) {
|
|
58535
|
+
const { width: w, height: h7 } = window.getComputedStyle(rectRef.value);
|
|
58536
|
+
width.value = props.width || Math.round(parseFloat(w)) || 0;
|
|
58537
|
+
height.value = props.height || Math.round(parseFloat(h7)) || 0;
|
|
58538
|
+
}
|
|
58535
58539
|
});
|
|
58536
|
-
(0, import_vue_demi18.watch)([
|
|
58537
|
-
wrapRect.width,
|
|
58538
|
-
wrapRect.height,
|
|
58539
|
-
() => nodes.value.length
|
|
58540
|
-
], ([w, h7]) => {
|
|
58541
|
-
debug2("update size");
|
|
58542
|
-
if (!w || !h7)
|
|
58543
|
-
return;
|
|
58544
|
-
width.value = w;
|
|
58545
|
-
height.value = h7;
|
|
58546
|
-
emit("update:width", w);
|
|
58547
|
-
emit("update:height", h7);
|
|
58540
|
+
(0, import_vue_demi18.watch)([width, height, () => nodes.value.length], () => {
|
|
58548
58541
|
runCorrect();
|
|
58549
|
-
}
|
|
58542
|
+
});
|
|
58550
58543
|
const selectedNodes = (0, import_vue_demi18.computed)(() => nodes.value.filter((node) => node.node.selected));
|
|
58551
58544
|
const expandSize = (node) => {
|
|
58552
58545
|
let expandWidth = props.autoExpand;
|
|
@@ -58696,14 +58689,16 @@ var FreeDomWrap = (0, import_vue_demi18.defineComponent)({
|
|
|
58696
58689
|
const main = createRender(
|
|
58697
58690
|
"section",
|
|
58698
58691
|
{
|
|
58699
|
-
ref: "rectRef",
|
|
58700
58692
|
class: "vv-free-dom--scene",
|
|
58701
58693
|
style: this.wrapStyle
|
|
58702
58694
|
}
|
|
58703
58695
|
)(slotList);
|
|
58704
58696
|
const wrap = (comp) => createRender(
|
|
58705
58697
|
"section",
|
|
58706
|
-
{
|
|
58698
|
+
{
|
|
58699
|
+
ref: "rectRef",
|
|
58700
|
+
style: "overflow: hidden;"
|
|
58701
|
+
},
|
|
58707
58702
|
{},
|
|
58708
58703
|
{
|
|
58709
58704
|
onMousedown: this.mask.handleMousedown,
|
package/dist/index.mjs
CHANGED
|
@@ -180,11 +180,11 @@ var require_common = __commonJS({
|
|
|
180
180
|
let enableOverride = null;
|
|
181
181
|
let namespacesCache;
|
|
182
182
|
let enabledCache;
|
|
183
|
-
function
|
|
184
|
-
if (!
|
|
183
|
+
function debug2(...args) {
|
|
184
|
+
if (!debug2.enabled) {
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
|
-
const self2 =
|
|
187
|
+
const self2 = debug2;
|
|
188
188
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
189
189
|
const ms = curr - (prevTime || curr);
|
|
190
190
|
self2.diff = ms;
|
|
@@ -214,12 +214,12 @@ var require_common = __commonJS({
|
|
|
214
214
|
const logFn = self2.log || createDebug.log;
|
|
215
215
|
logFn.apply(self2, args);
|
|
216
216
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
Object.defineProperty(
|
|
217
|
+
debug2.namespace = namespace;
|
|
218
|
+
debug2.useColors = createDebug.useColors();
|
|
219
|
+
debug2.color = createDebug.selectColor(namespace);
|
|
220
|
+
debug2.extend = extend;
|
|
221
|
+
debug2.destroy = createDebug.destroy;
|
|
222
|
+
Object.defineProperty(debug2, "enabled", {
|
|
223
223
|
enumerable: true,
|
|
224
224
|
configurable: false,
|
|
225
225
|
get: () => {
|
|
@@ -237,9 +237,9 @@ var require_common = __commonJS({
|
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
if (typeof createDebug.init === "function") {
|
|
240
|
-
createDebug.init(
|
|
240
|
+
createDebug.init(debug2);
|
|
241
241
|
}
|
|
242
|
-
return
|
|
242
|
+
return debug2;
|
|
243
243
|
}
|
|
244
244
|
function extend(namespace, delimiter) {
|
|
245
245
|
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
@@ -764,11 +764,11 @@ var require_node = __commonJS({
|
|
|
764
764
|
function load() {
|
|
765
765
|
return process.env.DEBUG;
|
|
766
766
|
}
|
|
767
|
-
function init(
|
|
768
|
-
|
|
767
|
+
function init(debug2) {
|
|
768
|
+
debug2.inspectOpts = {};
|
|
769
769
|
const keys = Object.keys(exports.inspectOpts);
|
|
770
770
|
for (let i = 0; i < keys.length; i++) {
|
|
771
|
-
|
|
771
|
+
debug2.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
module.exports = require_common()(exports);
|
|
@@ -38171,7 +38171,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
38171
38171
|
isUnmounting: false,
|
|
38172
38172
|
leavingVNodes: /* @__PURE__ */ new Map()
|
|
38173
38173
|
};
|
|
38174
|
-
|
|
38174
|
+
onMounted7(() => {
|
|
38175
38175
|
state2.isMounted = true;
|
|
38176
38176
|
});
|
|
38177
38177
|
onBeforeUnmount3(() => {
|
|
@@ -39490,7 +39490,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
39490
39490
|
}
|
|
39491
39491
|
}
|
|
39492
39492
|
};
|
|
39493
|
-
|
|
39493
|
+
onMounted7(cacheSubtree);
|
|
39494
39494
|
onUpdated2(cacheSubtree);
|
|
39495
39495
|
onBeforeUnmount3(() => {
|
|
39496
39496
|
cache.forEach((cached) => {
|
|
@@ -39648,7 +39648,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
39648
39648
|
}
|
|
39649
39649
|
};
|
|
39650
39650
|
var onBeforeMount2 = createHook("bm");
|
|
39651
|
-
var
|
|
39651
|
+
var onMounted7 = createHook("m");
|
|
39652
39652
|
var onBeforeUpdate2 = createHook(
|
|
39653
39653
|
"bu"
|
|
39654
39654
|
);
|
|
@@ -40163,7 +40163,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
40163
40163
|
}
|
|
40164
40164
|
}
|
|
40165
40165
|
registerLifecycleHook(onBeforeMount2, beforeMount);
|
|
40166
|
-
registerLifecycleHook(
|
|
40166
|
+
registerLifecycleHook(onMounted7, mounted);
|
|
40167
40167
|
registerLifecycleHook(onBeforeUpdate2, beforeUpdate);
|
|
40168
40168
|
registerLifecycleHook(onUpdated2, updated);
|
|
40169
40169
|
registerLifecycleHook(onActivated, activated);
|
|
@@ -42297,7 +42297,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
42297
42297
|
return ctx;
|
|
42298
42298
|
}
|
|
42299
42299
|
};
|
|
42300
|
-
function
|
|
42300
|
+
function watchEffect6(effect, options) {
|
|
42301
42301
|
return doWatch(effect, null, options);
|
|
42302
42302
|
}
|
|
42303
42303
|
function watchPostEffect(effect, options) {
|
|
@@ -44129,7 +44129,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
44129
44129
|
exports.onBeforeUpdate = onBeforeUpdate2;
|
|
44130
44130
|
exports.onDeactivated = onDeactivated;
|
|
44131
44131
|
exports.onErrorCaptured = onErrorCaptured;
|
|
44132
|
-
exports.onMounted =
|
|
44132
|
+
exports.onMounted = onMounted7;
|
|
44133
44133
|
exports.onRenderTracked = onRenderTracked;
|
|
44134
44134
|
exports.onRenderTriggered = onRenderTriggered;
|
|
44135
44135
|
exports.onServerPrefetch = onServerPrefetch;
|
|
@@ -44165,7 +44165,7 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
44165
44165
|
exports.version = version3;
|
|
44166
44166
|
exports.warn = warn$1;
|
|
44167
44167
|
exports.watch = watch8;
|
|
44168
|
-
exports.watchEffect =
|
|
44168
|
+
exports.watchEffect = watchEffect6;
|
|
44169
44169
|
exports.watchPostEffect = watchPostEffect;
|
|
44170
44170
|
exports.watchSyncEffect = watchSyncEffect;
|
|
44171
44171
|
exports.withAsyncContext = withAsyncContext;
|
|
@@ -45301,7 +45301,7 @@ var require_runtime_core_cjs = __commonJS({
|
|
|
45301
45301
|
isUnmounting: false,
|
|
45302
45302
|
leavingVNodes: /* @__PURE__ */ new Map()
|
|
45303
45303
|
};
|
|
45304
|
-
|
|
45304
|
+
onMounted7(() => {
|
|
45305
45305
|
state2.isMounted = true;
|
|
45306
45306
|
});
|
|
45307
45307
|
onBeforeUnmount3(() => {
|
|
@@ -46852,7 +46852,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
46852
46852
|
}
|
|
46853
46853
|
}
|
|
46854
46854
|
};
|
|
46855
|
-
|
|
46855
|
+
onMounted7(cacheSubtree);
|
|
46856
46856
|
onUpdated2(cacheSubtree);
|
|
46857
46857
|
onBeforeUnmount3(() => {
|
|
46858
46858
|
cache.forEach((cached) => {
|
|
@@ -47018,7 +47018,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
47018
47018
|
}
|
|
47019
47019
|
};
|
|
47020
47020
|
var onBeforeMount2 = createHook("bm");
|
|
47021
|
-
var
|
|
47021
|
+
var onMounted7 = createHook("m");
|
|
47022
47022
|
var onBeforeUpdate2 = createHook(
|
|
47023
47023
|
"bu"
|
|
47024
47024
|
);
|
|
@@ -47755,7 +47755,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
47755
47755
|
}
|
|
47756
47756
|
}
|
|
47757
47757
|
registerLifecycleHook(onBeforeMount2, beforeMount);
|
|
47758
|
-
registerLifecycleHook(
|
|
47758
|
+
registerLifecycleHook(onMounted7, mounted);
|
|
47759
47759
|
registerLifecycleHook(onBeforeUpdate2, beforeUpdate);
|
|
47760
47760
|
registerLifecycleHook(onUpdated2, updated);
|
|
47761
47761
|
registerLifecycleHook(onActivated, activated);
|
|
@@ -50303,7 +50303,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
50303
50303
|
return ctx;
|
|
50304
50304
|
}
|
|
50305
50305
|
};
|
|
50306
|
-
function
|
|
50306
|
+
function watchEffect6(effect, options) {
|
|
50307
50307
|
return doWatch(effect, null, options);
|
|
50308
50308
|
}
|
|
50309
50309
|
function watchPostEffect(effect, options) {
|
|
@@ -52671,7 +52671,7 @@ Component that was made reactive: `,
|
|
|
52671
52671
|
exports.onBeforeUpdate = onBeforeUpdate2;
|
|
52672
52672
|
exports.onDeactivated = onDeactivated;
|
|
52673
52673
|
exports.onErrorCaptured = onErrorCaptured;
|
|
52674
|
-
exports.onMounted =
|
|
52674
|
+
exports.onMounted = onMounted7;
|
|
52675
52675
|
exports.onRenderTracked = onRenderTracked;
|
|
52676
52676
|
exports.onRenderTriggered = onRenderTriggered;
|
|
52677
52677
|
exports.onServerPrefetch = onServerPrefetch;
|
|
@@ -52707,7 +52707,7 @@ Component that was made reactive: `,
|
|
|
52707
52707
|
exports.version = version3;
|
|
52708
52708
|
exports.warn = warn2;
|
|
52709
52709
|
exports.watch = watch8;
|
|
52710
|
-
exports.watchEffect =
|
|
52710
|
+
exports.watchEffect = watchEffect6;
|
|
52711
52711
|
exports.watchPostEffect = watchPostEffect;
|
|
52712
52712
|
exports.watchSyncEffect = watchSyncEffect;
|
|
52713
52713
|
exports.withAsyncContext = withAsyncContext;
|
|
@@ -56371,13 +56371,13 @@ var require_vue = __commonJS({
|
|
|
56371
56371
|
import {
|
|
56372
56372
|
computed as computed11,
|
|
56373
56373
|
defineComponent as defineComponent6,
|
|
56374
|
+
onMounted as onMounted5,
|
|
56374
56375
|
provide as provide2,
|
|
56375
56376
|
reactive as reactive5,
|
|
56376
56377
|
ref as ref13,
|
|
56377
56378
|
shallowRef as shallowRef6,
|
|
56378
56379
|
toRefs as toRefs2,
|
|
56379
|
-
watch as watch6
|
|
56380
|
-
watchEffect as watchEffect6
|
|
56380
|
+
watch as watch6
|
|
56381
56381
|
} from "vue-demi";
|
|
56382
56382
|
|
|
56383
56383
|
// src/util/tokens.ts
|
|
@@ -56752,8 +56752,8 @@ function useDraggableData(props) {
|
|
|
56752
56752
|
props.dragStartFn(evt, data);
|
|
56753
56753
|
};
|
|
56754
56754
|
const handleDrag = (evt, data) => {
|
|
56755
|
-
x.value =
|
|
56756
|
-
y.value =
|
|
56755
|
+
x.value = data.x;
|
|
56756
|
+
y.value = data.y;
|
|
56757
56757
|
deltaX.value = data.deltaX;
|
|
56758
56758
|
deltaY.value = data.deltaY;
|
|
56759
56759
|
props.dragFn(evt, data);
|
|
@@ -57706,8 +57706,8 @@ function useMask(target, props, nodes, size) {
|
|
|
57706
57706
|
return Math.max(a, c) - Math.min(b, d) <= -standard;
|
|
57707
57707
|
}
|
|
57708
57708
|
function offsetFormat(evt) {
|
|
57709
|
-
const offsetX = evt.clientX - rect.x.value;
|
|
57710
|
-
const offsetY = evt.clientY - rect.y.value;
|
|
57709
|
+
const offsetX = (evt.clientX - rect.x.value) / props.transformScale;
|
|
57710
|
+
const offsetY = (evt.clientY - rect.y.value) / props.transformScale;
|
|
57711
57711
|
return {
|
|
57712
57712
|
x: offsetX,
|
|
57713
57713
|
y: offsetY
|
|
@@ -58278,9 +58278,13 @@ var freeDom = defineComponent5({
|
|
|
58278
58278
|
}
|
|
58279
58279
|
handleDragStop(evt, coreData);
|
|
58280
58280
|
sceneContext.emit("moveup");
|
|
58281
|
-
|
|
58282
|
-
|
|
58283
|
-
|
|
58281
|
+
const roundX = Math.round(x.value);
|
|
58282
|
+
const roundY = Math.round(y.value);
|
|
58283
|
+
const roundW = Math.round(width.value || 0);
|
|
58284
|
+
const roundH = Math.round(height.value || 0);
|
|
58285
|
+
emit("update:x", roundX);
|
|
58286
|
+
emit("update:y", roundY);
|
|
58287
|
+
emit("update:modelValue", { x: roundX, y: roundY, w: roundW, h: roundH });
|
|
58284
58288
|
sceneContext.history?.push({ type: "move-end" });
|
|
58285
58289
|
};
|
|
58286
58290
|
const onDragStart = (evt, coreData) => {
|
|
@@ -58469,8 +58473,6 @@ var freeDom = defineComponent5({
|
|
|
58469
58473
|
var freeDom_default = freeDom;
|
|
58470
58474
|
|
|
58471
58475
|
// src/components/freeDomWrap.ts
|
|
58472
|
-
var import_debug2 = __toESM(require_src());
|
|
58473
|
-
var debug2 = (0, import_debug2.default)("freeDom:wrap");
|
|
58474
58476
|
var freeDomWrapProps = {
|
|
58475
58477
|
diff: {
|
|
58476
58478
|
type: Number,
|
|
@@ -58521,32 +58523,23 @@ var FreeDomWrap = defineComponent6({
|
|
|
58521
58523
|
const eventBus = useEventBus();
|
|
58522
58524
|
const nodes = ref13([]);
|
|
58523
58525
|
const history = useOperateHistory(nodes);
|
|
58524
|
-
const width = ref13(
|
|
58525
|
-
const height = ref13(
|
|
58526
|
+
const width = ref13();
|
|
58527
|
+
const height = ref13();
|
|
58526
58528
|
const rectRef = shallowRef6();
|
|
58527
|
-
const wrapRect = useElementBounding(rectRef);
|
|
58528
58529
|
const wrapStyle = computed11(() => ({
|
|
58529
58530
|
height: height.value + "px",
|
|
58530
58531
|
width: width.value + "px"
|
|
58531
58532
|
}));
|
|
58532
|
-
|
|
58533
|
-
|
|
58534
|
-
|
|
58533
|
+
onMounted5(() => {
|
|
58534
|
+
if (rectRef.value) {
|
|
58535
|
+
const { width: w, height: h7 } = window.getComputedStyle(rectRef.value);
|
|
58536
|
+
width.value = props.width || Math.round(parseFloat(w)) || 0;
|
|
58537
|
+
height.value = props.height || Math.round(parseFloat(h7)) || 0;
|
|
58538
|
+
}
|
|
58535
58539
|
});
|
|
58536
|
-
watch6([
|
|
58537
|
-
wrapRect.width,
|
|
58538
|
-
wrapRect.height,
|
|
58539
|
-
() => nodes.value.length
|
|
58540
|
-
], ([w, h7]) => {
|
|
58541
|
-
debug2("update size");
|
|
58542
|
-
if (!w || !h7)
|
|
58543
|
-
return;
|
|
58544
|
-
width.value = w;
|
|
58545
|
-
height.value = h7;
|
|
58546
|
-
emit("update:width", w);
|
|
58547
|
-
emit("update:height", h7);
|
|
58540
|
+
watch6([width, height, () => nodes.value.length], () => {
|
|
58548
58541
|
runCorrect();
|
|
58549
|
-
}
|
|
58542
|
+
});
|
|
58550
58543
|
const selectedNodes = computed11(() => nodes.value.filter((node) => node.node.selected));
|
|
58551
58544
|
const expandSize = (node) => {
|
|
58552
58545
|
let expandWidth = props.autoExpand;
|
|
@@ -58696,14 +58689,16 @@ var FreeDomWrap = defineComponent6({
|
|
|
58696
58689
|
const main = createRender(
|
|
58697
58690
|
"section",
|
|
58698
58691
|
{
|
|
58699
|
-
ref: "rectRef",
|
|
58700
58692
|
class: "vv-free-dom--scene",
|
|
58701
58693
|
style: this.wrapStyle
|
|
58702
58694
|
}
|
|
58703
58695
|
)(slotList);
|
|
58704
58696
|
const wrap = (comp) => createRender(
|
|
58705
58697
|
"section",
|
|
58706
|
-
{
|
|
58698
|
+
{
|
|
58699
|
+
ref: "rectRef",
|
|
58700
|
+
style: "overflow: hidden;"
|
|
58701
|
+
},
|
|
58707
58702
|
{},
|
|
58708
58703
|
{
|
|
58709
58704
|
onMousedown: this.mask.handleMousedown,
|
|
@@ -58724,7 +58719,7 @@ var FreeDomWrap = defineComponent6({
|
|
|
58724
58719
|
import { Fragment as Fragment2, defineComponent as defineComponent8, h as h6, provide as provide3, reactive as reactive6, ref as ref16, toRefs as toRefs3 } from "vue-demi";
|
|
58725
58720
|
|
|
58726
58721
|
// src/components/gridItem.ts
|
|
58727
|
-
import { defineComponent as defineComponent7, inject as inject5, onMounted as
|
|
58722
|
+
import { defineComponent as defineComponent7, inject as inject5, onMounted as onMounted6, ref as ref14, watch as watch7 } from "vue-demi";
|
|
58728
58723
|
|
|
58729
58724
|
// src/components/tokens.ts
|
|
58730
58725
|
var gridLayoutContextKey = Symbol("gridLayoutContext");
|
|
@@ -58795,7 +58790,7 @@ var GridItem = defineComponent7({
|
|
|
58795
58790
|
if (!layout) {
|
|
58796
58791
|
throw new Error("TODO");
|
|
58797
58792
|
}
|
|
58798
|
-
|
|
58793
|
+
onMounted6(() => {
|
|
58799
58794
|
moveDroppingItem();
|
|
58800
58795
|
});
|
|
58801
58796
|
watch7(() => props.droppingPosition, (currPos, prevPos) => {
|