@vue/runtime-dom 3.6.0-beta.3 → 3.6.0-beta.4
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/runtime-dom.cjs.js +7 -1
- package/dist/runtime-dom.cjs.prod.js +7 -1
- package/dist/runtime-dom.d.ts +13 -1
- package/dist/runtime-dom.esm-browser.js +67 -40
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +19 -6
- package/dist/runtime-dom.global.js +67 -40
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-beta.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-beta.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -490,17 +490,24 @@ function baseUseCssVars(instance, getParentNode, getVars, setVars) {
|
|
|
490
490
|
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
491
491
|
).forEach((node) => setVarsOnNode(node, vars));
|
|
492
492
|
};
|
|
493
|
-
const
|
|
494
|
-
const vars = getVars();
|
|
493
|
+
const applyCssVars = (vars = getVars()) => {
|
|
495
494
|
setVars(vars);
|
|
496
495
|
updateTeleports(vars);
|
|
497
496
|
};
|
|
498
497
|
onBeforeUpdate(() => {
|
|
499
|
-
queuePostFlushCb(
|
|
498
|
+
queuePostFlushCb(applyCssVars);
|
|
500
499
|
});
|
|
501
500
|
onMounted(() => {
|
|
502
|
-
watch(
|
|
503
|
-
|
|
501
|
+
watch(
|
|
502
|
+
() => {
|
|
503
|
+
const vars = getVars();
|
|
504
|
+
extend({}, vars);
|
|
505
|
+
applyCssVars(vars);
|
|
506
|
+
},
|
|
507
|
+
NOOP,
|
|
508
|
+
{ flush: "post" }
|
|
509
|
+
);
|
|
510
|
+
const ob = new MutationObserver(() => applyCssVars());
|
|
504
511
|
ob.observe(getParentNode(), { childList: true });
|
|
505
512
|
onUnmounted(() => ob.disconnect());
|
|
506
513
|
});
|
|
@@ -1231,6 +1238,12 @@ class VueElementBase extends BaseClass {
|
|
|
1231
1238
|
this._update();
|
|
1232
1239
|
}
|
|
1233
1240
|
}
|
|
1241
|
+
/**
|
|
1242
|
+
* @internal
|
|
1243
|
+
*/
|
|
1244
|
+
_hasShadowRoot() {
|
|
1245
|
+
return this._def.shadowRoot !== false;
|
|
1246
|
+
}
|
|
1234
1247
|
/**
|
|
1235
1248
|
* @internal
|
|
1236
1249
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-beta.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-beta.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1250,20 +1250,20 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1250
1250
|
"iterate",
|
|
1251
1251
|
isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
|
|
1252
1252
|
);
|
|
1253
|
-
return
|
|
1254
|
-
// iterator
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
done
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1253
|
+
return extend(
|
|
1254
|
+
// inheriting all iterator properties
|
|
1255
|
+
Object.create(innerIterator),
|
|
1256
|
+
{
|
|
1257
|
+
// iterator protocol
|
|
1258
|
+
next() {
|
|
1259
|
+
const { value, done } = innerIterator.next();
|
|
1260
|
+
return done ? { value, done } : {
|
|
1261
|
+
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
1262
|
+
done
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
1265
|
}
|
|
1266
|
-
|
|
1266
|
+
);
|
|
1267
1267
|
};
|
|
1268
1268
|
}
|
|
1269
1269
|
function createReadonlyMethod(type) {
|
|
@@ -1477,8 +1477,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1477
1477
|
function getTargetType(value) {
|
|
1478
1478
|
return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
|
|
1479
1479
|
}
|
|
1480
|
+
// @__NO_SIDE_EFFECTS__
|
|
1480
1481
|
function reactive(target) {
|
|
1481
|
-
if (isReadonly(target)) {
|
|
1482
|
+
if (/* @__PURE__ */ isReadonly(target)) {
|
|
1482
1483
|
return target;
|
|
1483
1484
|
}
|
|
1484
1485
|
return createReactiveObject(
|
|
@@ -1489,6 +1490,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1489
1490
|
reactiveMap
|
|
1490
1491
|
);
|
|
1491
1492
|
}
|
|
1493
|
+
// @__NO_SIDE_EFFECTS__
|
|
1492
1494
|
function shallowReactive(target) {
|
|
1493
1495
|
return createReactiveObject(
|
|
1494
1496
|
target,
|
|
@@ -1498,6 +1500,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1498
1500
|
shallowReactiveMap
|
|
1499
1501
|
);
|
|
1500
1502
|
}
|
|
1503
|
+
// @__NO_SIDE_EFFECTS__
|
|
1501
1504
|
function readonly(target) {
|
|
1502
1505
|
return createReactiveObject(
|
|
1503
1506
|
target,
|
|
@@ -1507,6 +1510,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1507
1510
|
readonlyMap
|
|
1508
1511
|
);
|
|
1509
1512
|
}
|
|
1513
|
+
// @__NO_SIDE_EFFECTS__
|
|
1510
1514
|
function shallowReadonly(target) {
|
|
1511
1515
|
return createReactiveObject(
|
|
1512
1516
|
target,
|
|
@@ -1545,24 +1549,29 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1545
1549
|
proxyMap.set(target, proxy);
|
|
1546
1550
|
return proxy;
|
|
1547
1551
|
}
|
|
1552
|
+
// @__NO_SIDE_EFFECTS__
|
|
1548
1553
|
function isReactive(value) {
|
|
1549
|
-
if (isReadonly(value)) {
|
|
1550
|
-
return isReactive(value["__v_raw"]);
|
|
1554
|
+
if (/* @__PURE__ */ isReadonly(value)) {
|
|
1555
|
+
return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1551
1556
|
}
|
|
1552
1557
|
return !!(value && value["__v_isReactive"]);
|
|
1553
1558
|
}
|
|
1559
|
+
// @__NO_SIDE_EFFECTS__
|
|
1554
1560
|
function isReadonly(value) {
|
|
1555
1561
|
return !!(value && value["__v_isReadonly"]);
|
|
1556
1562
|
}
|
|
1563
|
+
// @__NO_SIDE_EFFECTS__
|
|
1557
1564
|
function isShallow(value) {
|
|
1558
1565
|
return !!(value && value["__v_isShallow"]);
|
|
1559
1566
|
}
|
|
1567
|
+
// @__NO_SIDE_EFFECTS__
|
|
1560
1568
|
function isProxy(value) {
|
|
1561
1569
|
return value ? !!value["__v_raw"] : false;
|
|
1562
1570
|
}
|
|
1571
|
+
// @__NO_SIDE_EFFECTS__
|
|
1563
1572
|
function toRaw(observed) {
|
|
1564
1573
|
const raw = observed && observed["__v_raw"];
|
|
1565
|
-
return raw ? toRaw(raw) : observed;
|
|
1574
|
+
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
1566
1575
|
}
|
|
1567
1576
|
function markRaw(value) {
|
|
1568
1577
|
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
|
|
@@ -1570,20 +1579,23 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1570
1579
|
}
|
|
1571
1580
|
return value;
|
|
1572
1581
|
}
|
|
1573
|
-
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
1574
|
-
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1582
|
+
const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
|
|
1583
|
+
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1575
1584
|
|
|
1585
|
+
// @__NO_SIDE_EFFECTS__
|
|
1576
1586
|
function isRef(r) {
|
|
1577
1587
|
return r ? r["__v_isRef"] === true : false;
|
|
1578
1588
|
}
|
|
1589
|
+
// @__NO_SIDE_EFFECTS__
|
|
1579
1590
|
function ref(value) {
|
|
1580
1591
|
return createRef(value, toReactive);
|
|
1581
1592
|
}
|
|
1593
|
+
// @__NO_SIDE_EFFECTS__
|
|
1582
1594
|
function shallowRef(value) {
|
|
1583
1595
|
return createRef(value);
|
|
1584
1596
|
}
|
|
1585
1597
|
function createRef(rawValue, wrap) {
|
|
1586
|
-
if (isRef(rawValue)) {
|
|
1598
|
+
if (/* @__PURE__ */ isRef(rawValue)) {
|
|
1587
1599
|
return rawValue;
|
|
1588
1600
|
}
|
|
1589
1601
|
return new RefImpl(rawValue, wrap);
|
|
@@ -1678,7 +1690,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1678
1690
|
}
|
|
1679
1691
|
}
|
|
1680
1692
|
function unref(ref2) {
|
|
1681
|
-
return isRef(ref2) ? ref2.value : ref2;
|
|
1693
|
+
return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
|
|
1682
1694
|
}
|
|
1683
1695
|
function toValue(source) {
|
|
1684
1696
|
return isFunction(source) ? source() : unref(source);
|
|
@@ -1687,7 +1699,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1687
1699
|
get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
|
|
1688
1700
|
set: (target, key, value, receiver) => {
|
|
1689
1701
|
const oldValue = target[key];
|
|
1690
|
-
if (isRef(oldValue) &&
|
|
1702
|
+
if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1691
1703
|
oldValue.value = value;
|
|
1692
1704
|
return true;
|
|
1693
1705
|
} else {
|
|
@@ -1725,6 +1737,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1725
1737
|
function customRef(factory) {
|
|
1726
1738
|
return new CustomRefImpl(factory);
|
|
1727
1739
|
}
|
|
1740
|
+
// @__NO_SIDE_EFFECTS__
|
|
1728
1741
|
function toRefs(object) {
|
|
1729
1742
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1730
1743
|
for (const key in object) {
|
|
@@ -1757,9 +1770,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1757
1770
|
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1758
1771
|
}
|
|
1759
1772
|
set value(newVal) {
|
|
1760
|
-
if (this._shallow && isRef(this._raw[this._key])) {
|
|
1773
|
+
if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
|
|
1761
1774
|
const nestedRef = this._object[this._key];
|
|
1762
|
-
if (isRef(nestedRef)) {
|
|
1775
|
+
if (/* @__PURE__ */ isRef(nestedRef)) {
|
|
1763
1776
|
nestedRef.value = newVal;
|
|
1764
1777
|
return;
|
|
1765
1778
|
}
|
|
@@ -1781,15 +1794,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1781
1794
|
return this._value = this._getter();
|
|
1782
1795
|
}
|
|
1783
1796
|
}
|
|
1797
|
+
// @__NO_SIDE_EFFECTS__
|
|
1784
1798
|
function toRef(source, key, defaultValue) {
|
|
1785
|
-
if (isRef(source)) {
|
|
1799
|
+
if (/* @__PURE__ */ isRef(source)) {
|
|
1786
1800
|
return source;
|
|
1787
1801
|
} else if (isFunction(source)) {
|
|
1788
1802
|
return new GetterRefImpl(source);
|
|
1789
1803
|
} else if (isObject(source) && arguments.length > 1) {
|
|
1790
1804
|
return propertyToRef(source, key, defaultValue);
|
|
1791
1805
|
} else {
|
|
1792
|
-
return ref(source);
|
|
1806
|
+
return /* @__PURE__ */ ref(source);
|
|
1793
1807
|
}
|
|
1794
1808
|
}
|
|
1795
1809
|
function propertyToRef(source, key, defaultValue) {
|
|
@@ -2155,6 +2169,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2155
2169
|
{
|
|
2156
2170
|
setupOnTrigger(ComputedRefImpl);
|
|
2157
2171
|
}
|
|
2172
|
+
// @__NO_SIDE_EFFECTS__
|
|
2158
2173
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2159
2174
|
let getter;
|
|
2160
2175
|
let setter;
|
|
@@ -4617,7 +4632,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4617
4632
|
logMismatchError();
|
|
4618
4633
|
}
|
|
4619
4634
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4620
|
-
key[0] === "." || isCustomElement) {
|
|
4635
|
+
key[0] === "." || isCustomElement && !isReservedProp(key)) {
|
|
4621
4636
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
4622
4637
|
}
|
|
4623
4638
|
}
|
|
@@ -8129,7 +8144,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8129
8144
|
optimized
|
|
8130
8145
|
);
|
|
8131
8146
|
} else {
|
|
8132
|
-
const customElement =
|
|
8147
|
+
const customElement = n1.el && n1.el._isVueCE ? n1.el : null;
|
|
8133
8148
|
try {
|
|
8134
8149
|
if (customElement) {
|
|
8135
8150
|
customElement._beginPatch();
|
|
@@ -8665,7 +8680,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8665
8680
|
if (!instance.isMounted) {
|
|
8666
8681
|
let vnodeHook;
|
|
8667
8682
|
const { el, props } = initialVNode;
|
|
8668
|
-
const { bm,
|
|
8683
|
+
const { bm, parent, root, type } = instance;
|
|
8669
8684
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
8670
8685
|
toggleRecurse(instance, false);
|
|
8671
8686
|
if (bm) {
|
|
@@ -8708,8 +8723,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8708
8723
|
hydrateSubTree();
|
|
8709
8724
|
}
|
|
8710
8725
|
} else {
|
|
8711
|
-
if (root.ce &&
|
|
8712
|
-
root.ce._def.shadowRoot !== false) {
|
|
8726
|
+
if (root.ce && root.ce._hasShadowRoot()) {
|
|
8713
8727
|
root.ce._injectChildStyle(type);
|
|
8714
8728
|
}
|
|
8715
8729
|
{
|
|
@@ -8736,8 +8750,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8736
8750
|
}
|
|
8737
8751
|
initialVNode.el = subTree.el;
|
|
8738
8752
|
}
|
|
8739
|
-
if (m) {
|
|
8740
|
-
queuePostRenderEffect(m, void 0, parentSuspense);
|
|
8753
|
+
if (instance.m) {
|
|
8754
|
+
queuePostRenderEffect(instance.m, void 0, parentSuspense);
|
|
8741
8755
|
}
|
|
8742
8756
|
if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
|
|
8743
8757
|
const scopedInitialVNode = initialVNode;
|
|
@@ -11294,7 +11308,7 @@ Component that was made reactive: `,
|
|
|
11294
11308
|
return true;
|
|
11295
11309
|
}
|
|
11296
11310
|
|
|
11297
|
-
const version = "3.6.0-beta.
|
|
11311
|
+
const version = "3.6.0-beta.4";
|
|
11298
11312
|
const warn = warn$1 ;
|
|
11299
11313
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11300
11314
|
const devtools = devtools$1 ;
|
|
@@ -11780,17 +11794,24 @@ Component that was made reactive: `,
|
|
|
11780
11794
|
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11781
11795
|
).forEach((node) => setVarsOnNode(node, vars));
|
|
11782
11796
|
};
|
|
11783
|
-
const
|
|
11784
|
-
const vars = getVars();
|
|
11797
|
+
const applyCssVars = (vars = getVars()) => {
|
|
11785
11798
|
setVars(vars);
|
|
11786
11799
|
updateTeleports(vars);
|
|
11787
11800
|
};
|
|
11788
11801
|
onBeforeUpdate(() => {
|
|
11789
|
-
queuePostFlushCb(
|
|
11802
|
+
queuePostFlushCb(applyCssVars);
|
|
11790
11803
|
});
|
|
11791
11804
|
onMounted(() => {
|
|
11792
|
-
watch(
|
|
11793
|
-
|
|
11805
|
+
watch(
|
|
11806
|
+
() => {
|
|
11807
|
+
const vars = getVars();
|
|
11808
|
+
extend({}, vars);
|
|
11809
|
+
applyCssVars(vars);
|
|
11810
|
+
},
|
|
11811
|
+
NOOP,
|
|
11812
|
+
{ flush: "post" }
|
|
11813
|
+
);
|
|
11814
|
+
const ob = new MutationObserver(() => applyCssVars());
|
|
11794
11815
|
ob.observe(getParentNode(), { childList: true });
|
|
11795
11816
|
onUnmounted(() => ob.disconnect());
|
|
11796
11817
|
});
|
|
@@ -12521,6 +12542,12 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12521
12542
|
this._update();
|
|
12522
12543
|
}
|
|
12523
12544
|
}
|
|
12545
|
+
/**
|
|
12546
|
+
* @internal
|
|
12547
|
+
*/
|
|
12548
|
+
_hasShadowRoot() {
|
|
12549
|
+
return this._def.shadowRoot !== false;
|
|
12550
|
+
}
|
|
12524
12551
|
/**
|
|
12525
12552
|
* @internal
|
|
12526
12553
|
*/
|