@vue/compat 3.5.0-alpha.5 → 3.5.0-beta.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/README.md +80 -80
- package/dist/vue-compat.d.ts +2 -2
- package/dist/vue.cjs.js +541 -191
- package/dist/vue.cjs.prod.js +479 -165
- package/dist/vue.esm-browser.js +526 -186
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +526 -186
- package/dist/vue.global.js +515 -181
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +456 -162
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +456 -162
- package/dist/vue.runtime.global.js +445 -157
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +3 -3
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.0-
|
|
2
|
+
* @vue/compat v3.5.0-beta.1
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -64,9 +64,11 @@ var Vue = (function () {
|
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
const camelizeRE = /-(\w)/g;
|
|
67
|
-
const camelize = cacheStringFunction(
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
const camelize = cacheStringFunction(
|
|
68
|
+
(str) => {
|
|
69
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
70
|
+
}
|
|
71
|
+
);
|
|
70
72
|
const hyphenateRE = /\B([A-Z])/g;
|
|
71
73
|
const hyphenate = cacheStringFunction(
|
|
72
74
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
@@ -74,10 +76,12 @@ var Vue = (function () {
|
|
|
74
76
|
const capitalize = cacheStringFunction((str) => {
|
|
75
77
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
76
78
|
});
|
|
77
|
-
const toHandlerKey = cacheStringFunction(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
const toHandlerKey = cacheStringFunction(
|
|
80
|
+
(str) => {
|
|
81
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
82
|
+
return s;
|
|
83
|
+
}
|
|
84
|
+
);
|
|
81
85
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
82
86
|
const invokeArrayFns = (fns, ...arg) => {
|
|
83
87
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -389,6 +393,7 @@ var Vue = (function () {
|
|
|
389
393
|
* @internal
|
|
390
394
|
*/
|
|
391
395
|
this.cleanups = [];
|
|
396
|
+
this._isPaused = false;
|
|
392
397
|
this.parent = activeEffectScope;
|
|
393
398
|
if (!detached && activeEffectScope) {
|
|
394
399
|
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
|
|
@@ -399,6 +404,37 @@ var Vue = (function () {
|
|
|
399
404
|
get active() {
|
|
400
405
|
return this._active;
|
|
401
406
|
}
|
|
407
|
+
pause() {
|
|
408
|
+
if (this._active) {
|
|
409
|
+
this._isPaused = true;
|
|
410
|
+
if (this.scopes) {
|
|
411
|
+
for (let i = 0, l = this.scopes.length; i < l; i++) {
|
|
412
|
+
this.scopes[i].pause();
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
for (let i = 0, l = this.effects.length; i < l; i++) {
|
|
416
|
+
this.effects[i].pause();
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Resumes the effect scope, including all child scopes and effects.
|
|
422
|
+
*/
|
|
423
|
+
resume() {
|
|
424
|
+
if (this._active) {
|
|
425
|
+
if (this._isPaused) {
|
|
426
|
+
this._isPaused = false;
|
|
427
|
+
if (this.scopes) {
|
|
428
|
+
for (let i = 0, l = this.scopes.length; i < l; i++) {
|
|
429
|
+
this.scopes[i].resume();
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
for (let i = 0, l = this.effects.length; i < l; i++) {
|
|
433
|
+
this.effects[i].resume();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
402
438
|
run(fn) {
|
|
403
439
|
if (this._active) {
|
|
404
440
|
const currentEffectScope = activeEffectScope;
|
|
@@ -469,6 +505,7 @@ var Vue = (function () {
|
|
|
469
505
|
}
|
|
470
506
|
|
|
471
507
|
let activeSub;
|
|
508
|
+
const pausedQueueEffects = /* @__PURE__ */ new WeakSet();
|
|
472
509
|
class ReactiveEffect {
|
|
473
510
|
constructor(fn) {
|
|
474
511
|
this.fn = fn;
|
|
@@ -497,6 +534,18 @@ var Vue = (function () {
|
|
|
497
534
|
activeEffectScope.effects.push(this);
|
|
498
535
|
}
|
|
499
536
|
}
|
|
537
|
+
pause() {
|
|
538
|
+
this.flags |= 128;
|
|
539
|
+
}
|
|
540
|
+
resume() {
|
|
541
|
+
if (this.flags & 128) {
|
|
542
|
+
this.flags &= ~128;
|
|
543
|
+
if (pausedQueueEffects.has(this)) {
|
|
544
|
+
pausedQueueEffects.delete(this);
|
|
545
|
+
this.trigger();
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
500
549
|
/**
|
|
501
550
|
* @internal
|
|
502
551
|
*/
|
|
@@ -550,7 +599,9 @@ var Vue = (function () {
|
|
|
550
599
|
}
|
|
551
600
|
}
|
|
552
601
|
trigger() {
|
|
553
|
-
if (this.
|
|
602
|
+
if (this.flags & 128) {
|
|
603
|
+
pausedQueueEffects.add(this);
|
|
604
|
+
} else if (this.scheduler) {
|
|
554
605
|
this.scheduler();
|
|
555
606
|
} else {
|
|
556
607
|
this.runIfDirty();
|
|
@@ -870,9 +921,15 @@ var Vue = (function () {
|
|
|
870
921
|
link.dep.subs = link;
|
|
871
922
|
}
|
|
872
923
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
873
|
-
const ITERATE_KEY = Symbol(
|
|
874
|
-
|
|
875
|
-
|
|
924
|
+
const ITERATE_KEY = Symbol(
|
|
925
|
+
"Object iterate"
|
|
926
|
+
);
|
|
927
|
+
const MAP_KEY_ITERATE_KEY = Symbol(
|
|
928
|
+
"Map keys iterate"
|
|
929
|
+
);
|
|
930
|
+
const ARRAY_ITERATE_KEY = Symbol(
|
|
931
|
+
"Array iterate"
|
|
932
|
+
);
|
|
876
933
|
function track(target, type, key) {
|
|
877
934
|
if (shouldTrack && activeSub) {
|
|
878
935
|
let depsMap = targetMap.get(target);
|
|
@@ -1162,7 +1219,7 @@ var Vue = (function () {
|
|
|
1162
1219
|
return isShallow2;
|
|
1163
1220
|
} else if (key === "__v_raw") {
|
|
1164
1221
|
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
1165
|
-
// this means the
|
|
1222
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
1166
1223
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
1167
1224
|
return target;
|
|
1168
1225
|
}
|
|
@@ -1286,9 +1343,7 @@ var Vue = (function () {
|
|
|
1286
1343
|
}
|
|
1287
1344
|
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
1288
1345
|
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
1289
|
-
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
1290
|
-
true
|
|
1291
|
-
);
|
|
1346
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
|
|
1292
1347
|
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
1293
1348
|
|
|
1294
1349
|
const toShallow = (value) => value;
|
|
@@ -1783,13 +1838,14 @@ var Vue = (function () {
|
|
|
1783
1838
|
class CustomRefImpl {
|
|
1784
1839
|
constructor(factory) {
|
|
1785
1840
|
this["__v_isRef"] = true;
|
|
1841
|
+
this._value = void 0;
|
|
1786
1842
|
const dep = this.dep = new Dep();
|
|
1787
1843
|
const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
|
|
1788
1844
|
this._get = get;
|
|
1789
1845
|
this._set = set;
|
|
1790
1846
|
}
|
|
1791
1847
|
get value() {
|
|
1792
|
-
return this._get();
|
|
1848
|
+
return this._value = this._get();
|
|
1793
1849
|
}
|
|
1794
1850
|
set value(newVal) {
|
|
1795
1851
|
this._set(newVal);
|
|
@@ -1814,10 +1870,11 @@ var Vue = (function () {
|
|
|
1814
1870
|
this._key = _key;
|
|
1815
1871
|
this._defaultValue = _defaultValue;
|
|
1816
1872
|
this["__v_isRef"] = true;
|
|
1873
|
+
this._value = void 0;
|
|
1817
1874
|
}
|
|
1818
1875
|
get value() {
|
|
1819
1876
|
const val = this._object[this._key];
|
|
1820
|
-
return val === void 0 ? this._defaultValue : val;
|
|
1877
|
+
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1821
1878
|
}
|
|
1822
1879
|
set value(newVal) {
|
|
1823
1880
|
this._object[this._key] = newVal;
|
|
@@ -1831,9 +1888,10 @@ var Vue = (function () {
|
|
|
1831
1888
|
this._getter = _getter;
|
|
1832
1889
|
this["__v_isRef"] = true;
|
|
1833
1890
|
this["__v_isReadonly"] = true;
|
|
1891
|
+
this._value = void 0;
|
|
1834
1892
|
}
|
|
1835
1893
|
get value() {
|
|
1836
|
-
return this._getter();
|
|
1894
|
+
return this._value = this._getter();
|
|
1837
1895
|
}
|
|
1838
1896
|
}
|
|
1839
1897
|
function toRef(source, key, defaultValue) {
|
|
@@ -1867,7 +1925,8 @@ var Vue = (function () {
|
|
|
1867
1925
|
/**
|
|
1868
1926
|
* @internal
|
|
1869
1927
|
*/
|
|
1870
|
-
this
|
|
1928
|
+
this.__v_isRef = true;
|
|
1929
|
+
// TODO isolatedDeclarations "__v_isReadonly"
|
|
1871
1930
|
// A computed is also a subscriber that tracks other deps
|
|
1872
1931
|
/**
|
|
1873
1932
|
* @internal
|
|
@@ -2492,6 +2551,9 @@ var Vue = (function () {
|
|
|
2492
2551
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
2493
2552
|
);
|
|
2494
2553
|
}
|
|
2554
|
+
if (instance.root.ce && instance !== instance.root) {
|
|
2555
|
+
instance.root.ce._removeChildStyle(oldComp);
|
|
2556
|
+
}
|
|
2495
2557
|
}
|
|
2496
2558
|
queuePostFlushCb(() => {
|
|
2497
2559
|
hmrDirtyComponents.clear();
|
|
@@ -2571,9 +2633,7 @@ var Vue = (function () {
|
|
|
2571
2633
|
function devtoolsUnmountApp(app) {
|
|
2572
2634
|
emit$2("app:unmount" /* APP_UNMOUNT */, app);
|
|
2573
2635
|
}
|
|
2574
|
-
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
2575
|
-
"component:added" /* COMPONENT_ADDED */
|
|
2576
|
-
);
|
|
2636
|
+
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
|
|
2577
2637
|
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
2578
2638
|
const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
2579
2639
|
"component:removed" /* COMPONENT_REMOVED */
|
|
@@ -2597,12 +2657,8 @@ var Vue = (function () {
|
|
|
2597
2657
|
);
|
|
2598
2658
|
};
|
|
2599
2659
|
}
|
|
2600
|
-
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
2601
|
-
|
|
2602
|
-
);
|
|
2603
|
-
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
2604
|
-
"perf:end" /* PERFORMANCE_END */
|
|
2605
|
-
);
|
|
2660
|
+
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
|
|
2661
|
+
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
|
|
2606
2662
|
function createDevtoolsPerformanceHook(hook) {
|
|
2607
2663
|
return (component, type, time) => {
|
|
2608
2664
|
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -4311,6 +4367,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4311
4367
|
}
|
|
4312
4368
|
if (props) {
|
|
4313
4369
|
{
|
|
4370
|
+
const isCustomElement = el.tagName.includes("-");
|
|
4314
4371
|
for (const key in props) {
|
|
4315
4372
|
if (// #11189 skip if this node has directives that have created hooks
|
|
4316
4373
|
// as it could have mutated the DOM in any possible way
|
|
@@ -4318,7 +4375,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4318
4375
|
logMismatchError();
|
|
4319
4376
|
}
|
|
4320
4377
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4321
|
-
key[0] === ".") {
|
|
4378
|
+
key[0] === "." || isCustomElement) {
|
|
4322
4379
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
4323
4380
|
}
|
|
4324
4381
|
}
|
|
@@ -4643,24 +4700,19 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4643
4700
|
}
|
|
4644
4701
|
}
|
|
4645
4702
|
|
|
4646
|
-
const hydrateOnIdle = () => (hydrate) => {
|
|
4647
|
-
const id = requestIdleCallback(hydrate);
|
|
4703
|
+
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4704
|
+
const id = requestIdleCallback(hydrate, { timeout });
|
|
4648
4705
|
return () => cancelIdleCallback(id);
|
|
4649
4706
|
};
|
|
4650
|
-
const hydrateOnVisible = (
|
|
4651
|
-
const ob = new IntersectionObserver(
|
|
4652
|
-
(entries)
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
break;
|
|
4658
|
-
}
|
|
4659
|
-
},
|
|
4660
|
-
{
|
|
4661
|
-
rootMargin: isString(margin) ? margin : margin + "px"
|
|
4707
|
+
const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
4708
|
+
const ob = new IntersectionObserver((entries) => {
|
|
4709
|
+
for (const e of entries) {
|
|
4710
|
+
if (!e.isIntersecting) continue;
|
|
4711
|
+
ob.disconnect();
|
|
4712
|
+
hydrate();
|
|
4713
|
+
break;
|
|
4662
4714
|
}
|
|
4663
|
-
);
|
|
4715
|
+
}, opts);
|
|
4664
4716
|
forEach((el) => ob.observe(el));
|
|
4665
4717
|
return () => ob.disconnect();
|
|
4666
4718
|
};
|
|
@@ -4969,7 +5021,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4969
5021
|
}
|
|
4970
5022
|
function pruneCacheEntry(key) {
|
|
4971
5023
|
const cached = cache.get(key);
|
|
4972
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
5024
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
4973
5025
|
unmount(cached);
|
|
4974
5026
|
} else if (current) {
|
|
4975
5027
|
resetShapeFlag(current);
|
|
@@ -5031,6 +5083,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5031
5083
|
return rawVNode;
|
|
5032
5084
|
}
|
|
5033
5085
|
let vnode = getInnerChild(rawVNode);
|
|
5086
|
+
if (vnode.type === Comment) {
|
|
5087
|
+
current = null;
|
|
5088
|
+
return vnode;
|
|
5089
|
+
}
|
|
5034
5090
|
const comp = vnode.type;
|
|
5035
5091
|
const name = getComponentName(
|
|
5036
5092
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -5163,17 +5219,19 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5163
5219
|
};
|
|
5164
5220
|
const onBeforeMount = createHook("bm");
|
|
5165
5221
|
const onMounted = createHook("m");
|
|
5166
|
-
const onBeforeUpdate = createHook(
|
|
5222
|
+
const onBeforeUpdate = createHook(
|
|
5223
|
+
"bu"
|
|
5224
|
+
);
|
|
5167
5225
|
const onUpdated = createHook("u");
|
|
5168
|
-
const onBeforeUnmount = createHook(
|
|
5169
|
-
|
|
5170
|
-
const onServerPrefetch = createHook("sp");
|
|
5171
|
-
const onRenderTriggered = createHook(
|
|
5172
|
-
"rtg"
|
|
5226
|
+
const onBeforeUnmount = createHook(
|
|
5227
|
+
"bum"
|
|
5173
5228
|
);
|
|
5174
|
-
const
|
|
5175
|
-
|
|
5229
|
+
const onUnmounted = createHook("um");
|
|
5230
|
+
const onServerPrefetch = createHook(
|
|
5231
|
+
"sp"
|
|
5176
5232
|
);
|
|
5233
|
+
const onRenderTriggered = createHook("rtg");
|
|
5234
|
+
const onRenderTracked = createHook("rtc");
|
|
5177
5235
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
5178
5236
|
injectHook("ec", hook, target);
|
|
5179
5237
|
}
|
|
@@ -5587,9 +5645,14 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5587
5645
|
}
|
|
5588
5646
|
|
|
5589
5647
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5590
|
-
if (currentRenderingInstance.
|
|
5648
|
+
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
5591
5649
|
if (name !== "default") props.name = name;
|
|
5592
|
-
return
|
|
5650
|
+
return openBlock(), createBlock(
|
|
5651
|
+
Fragment,
|
|
5652
|
+
null,
|
|
5653
|
+
[createVNode("slot", props, fallback && fallback())],
|
|
5654
|
+
64
|
|
5655
|
+
);
|
|
5593
5656
|
}
|
|
5594
5657
|
let slot = slots[name];
|
|
5595
5658
|
if (slot && slot.length > 1) {
|
|
@@ -5891,6 +5954,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5891
5954
|
$refs: (i) => shallowReadonly(i.refs) ,
|
|
5892
5955
|
$parent: (i) => getPublicInstance(i.parent),
|
|
5893
5956
|
$root: (i) => getPublicInstance(i.root),
|
|
5957
|
+
$host: (i) => i.ce,
|
|
5894
5958
|
$emit: (i) => i.emit,
|
|
5895
5959
|
$options: (i) => resolveMergedOptions(i) ,
|
|
5896
5960
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
@@ -6051,29 +6115,25 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6051
6115
|
return Reflect.ownKeys(target);
|
|
6052
6116
|
};
|
|
6053
6117
|
}
|
|
6054
|
-
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
6055
|
-
{
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
key
|
|
6070
|
-
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
6071
|
-
);
|
|
6072
|
-
}
|
|
6073
|
-
return has;
|
|
6118
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
|
|
6119
|
+
get(target, key) {
|
|
6120
|
+
if (key === Symbol.unscopables) {
|
|
6121
|
+
return;
|
|
6122
|
+
}
|
|
6123
|
+
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
6124
|
+
},
|
|
6125
|
+
has(_, key) {
|
|
6126
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
6127
|
+
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
6128
|
+
warn$1(
|
|
6129
|
+
`Property ${JSON.stringify(
|
|
6130
|
+
key
|
|
6131
|
+
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
6132
|
+
);
|
|
6074
6133
|
}
|
|
6134
|
+
return has;
|
|
6075
6135
|
}
|
|
6076
|
-
);
|
|
6136
|
+
});
|
|
6077
6137
|
function createDevRenderContext(instance) {
|
|
6078
6138
|
const target = {};
|
|
6079
6139
|
Object.defineProperty(target, `_`, {
|
|
@@ -6757,7 +6817,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6757
6817
|
return vm;
|
|
6758
6818
|
}
|
|
6759
6819
|
}
|
|
6760
|
-
Vue.version = `2.6.14-compat:${"3.5.0-
|
|
6820
|
+
Vue.version = `2.6.14-compat:${"3.5.0-beta.1"}`;
|
|
6761
6821
|
Vue.config = singletonApp.config;
|
|
6762
6822
|
Vue.use = (plugin, ...options) => {
|
|
6763
6823
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7030,7 +7090,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7030
7090
|
/* skip options */
|
|
7031
7091
|
);
|
|
7032
7092
|
}
|
|
7033
|
-
container.
|
|
7093
|
+
container.textContent = "";
|
|
7034
7094
|
render(vnode, container, namespace);
|
|
7035
7095
|
if (container instanceof Element) {
|
|
7036
7096
|
container.removeAttribute("v-cloak");
|
|
@@ -7242,7 +7302,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7242
7302
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
7243
7303
|
);
|
|
7244
7304
|
}
|
|
7245
|
-
const vnode = createVNode(rootComponent, rootProps);
|
|
7305
|
+
const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
|
|
7246
7306
|
vnode.appContext = context;
|
|
7247
7307
|
if (namespace === true) {
|
|
7248
7308
|
namespace = "svg";
|
|
@@ -7347,7 +7407,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7347
7407
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
7348
7408
|
const instance = currentInstance || currentRenderingInstance;
|
|
7349
7409
|
if (instance || currentApp) {
|
|
7350
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
7410
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
7351
7411
|
if (provides && key in provides) {
|
|
7352
7412
|
return provides[key];
|
|
7353
7413
|
} else if (arguments.length > 1) {
|
|
@@ -7621,6 +7681,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7621
7681
|
} else {
|
|
7622
7682
|
value = defaultValue;
|
|
7623
7683
|
}
|
|
7684
|
+
if (instance.ce) {
|
|
7685
|
+
instance.ce._setProp(key, value);
|
|
7686
|
+
}
|
|
7624
7687
|
}
|
|
7625
7688
|
if (opt[0 /* shouldCast */]) {
|
|
7626
7689
|
if (isAbsent && !hasDefault) {
|
|
@@ -8623,8 +8686,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8623
8686
|
const componentUpdateFn = () => {
|
|
8624
8687
|
if (!instance.isMounted) {
|
|
8625
8688
|
let vnodeHook;
|
|
8626
|
-
const { el, props
|
|
8627
|
-
const { bm, m, parent } = instance;
|
|
8689
|
+
const { el, props } = initialVNode;
|
|
8690
|
+
const { bm, m, parent, root, type } = instance;
|
|
8628
8691
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
8629
8692
|
toggleRecurse(instance, false);
|
|
8630
8693
|
if (bm) {
|
|
@@ -8670,6 +8733,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8670
8733
|
hydrateSubTree();
|
|
8671
8734
|
}
|
|
8672
8735
|
} else {
|
|
8736
|
+
if (root.ce) {
|
|
8737
|
+
root.ce._injectChildStyle(type);
|
|
8738
|
+
}
|
|
8673
8739
|
{
|
|
8674
8740
|
startMeasure(instance, `render`);
|
|
8675
8741
|
}
|
|
@@ -9373,13 +9439,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9373
9439
|
namespace
|
|
9374
9440
|
);
|
|
9375
9441
|
}
|
|
9442
|
+
container._vnode = vnode;
|
|
9376
9443
|
if (!isFlushing) {
|
|
9377
9444
|
isFlushing = true;
|
|
9378
9445
|
flushPreFlushCbs();
|
|
9379
9446
|
flushPostFlushCbs();
|
|
9380
9447
|
isFlushing = false;
|
|
9381
9448
|
}
|
|
9382
|
-
container._vnode = vnode;
|
|
9383
9449
|
};
|
|
9384
9450
|
const internals = {
|
|
9385
9451
|
p: patch,
|
|
@@ -9547,14 +9613,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9547
9613
|
const _cb = cb;
|
|
9548
9614
|
cb = (...args) => {
|
|
9549
9615
|
_cb(...args);
|
|
9550
|
-
|
|
9616
|
+
watchHandle();
|
|
9551
9617
|
};
|
|
9552
9618
|
}
|
|
9553
|
-
if (deep !== void 0 && typeof deep === "number") {
|
|
9554
|
-
warn$1(
|
|
9555
|
-
`watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
|
|
9556
|
-
);
|
|
9557
|
-
}
|
|
9558
9619
|
if (!cb) {
|
|
9559
9620
|
if (immediate !== void 0) {
|
|
9560
9621
|
warn$1(
|
|
@@ -9580,10 +9641,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9580
9641
|
);
|
|
9581
9642
|
};
|
|
9582
9643
|
const instance = currentInstance;
|
|
9583
|
-
const reactiveGetter = (source2) =>
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9644
|
+
const reactiveGetter = (source2) => {
|
|
9645
|
+
if (deep) return source2;
|
|
9646
|
+
if (isShallow(source2) || deep === false || deep === 0)
|
|
9647
|
+
return traverse(source2, 1);
|
|
9648
|
+
return traverse(source2);
|
|
9649
|
+
};
|
|
9587
9650
|
let getter;
|
|
9588
9651
|
let forceTrigger = false;
|
|
9589
9652
|
let isMultiSource = false;
|
|
@@ -9639,7 +9702,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9639
9702
|
}
|
|
9640
9703
|
if (cb && deep) {
|
|
9641
9704
|
const baseGetter = getter;
|
|
9642
|
-
|
|
9705
|
+
const depth = deep === true ? Infinity : deep;
|
|
9706
|
+
getter = () => traverse(baseGetter(), depth);
|
|
9643
9707
|
}
|
|
9644
9708
|
let cleanup;
|
|
9645
9709
|
let onCleanup = (fn) => {
|
|
@@ -9686,12 +9750,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9686
9750
|
}
|
|
9687
9751
|
effect.scheduler = scheduler;
|
|
9688
9752
|
const scope = getCurrentScope();
|
|
9689
|
-
const
|
|
9753
|
+
const watchHandle = () => {
|
|
9690
9754
|
effect.stop();
|
|
9691
9755
|
if (scope) {
|
|
9692
9756
|
remove(scope.effects, effect);
|
|
9693
9757
|
}
|
|
9694
9758
|
};
|
|
9759
|
+
watchHandle.pause = effect.pause.bind(effect);
|
|
9760
|
+
watchHandle.resume = effect.resume.bind(effect);
|
|
9761
|
+
watchHandle.stop = watchHandle;
|
|
9695
9762
|
{
|
|
9696
9763
|
effect.onTrack = onTrack;
|
|
9697
9764
|
effect.onTrigger = onTrigger;
|
|
@@ -9710,7 +9777,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9710
9777
|
} else {
|
|
9711
9778
|
effect.run();
|
|
9712
9779
|
}
|
|
9713
|
-
return
|
|
9780
|
+
return watchHandle;
|
|
9714
9781
|
}
|
|
9715
9782
|
function instanceWatch(source, value, options) {
|
|
9716
9783
|
const publicThis = this.proxy;
|
|
@@ -9800,7 +9867,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9800
9867
|
return options.get ? options.get(localValue) : localValue;
|
|
9801
9868
|
},
|
|
9802
9869
|
set(value) {
|
|
9803
|
-
|
|
9870
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
9871
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
9804
9872
|
return;
|
|
9805
9873
|
}
|
|
9806
9874
|
const rawProps = i.vnode.props;
|
|
@@ -9809,7 +9877,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9809
9877
|
localValue = value;
|
|
9810
9878
|
trigger();
|
|
9811
9879
|
}
|
|
9812
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
9813
9880
|
i.emit(`update:${name}`, emittedValue);
|
|
9814
9881
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
9815
9882
|
trigger();
|
|
@@ -9847,9 +9914,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9847
9914
|
} = instance;
|
|
9848
9915
|
if (emitsOptions) {
|
|
9849
9916
|
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
9850
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
9917
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
9851
9918
|
warn$1(
|
|
9852
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
9919
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
9853
9920
|
);
|
|
9854
9921
|
}
|
|
9855
9922
|
} else {
|
|
@@ -11766,11 +11833,16 @@ Component that was made reactive: `,
|
|
|
11766
11833
|
const r = shallowRef(null);
|
|
11767
11834
|
if (i) {
|
|
11768
11835
|
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11836
|
+
let desc;
|
|
11837
|
+
if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
11838
|
+
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
11839
|
+
} else {
|
|
11840
|
+
Object.defineProperty(refs, key, {
|
|
11841
|
+
enumerable: true,
|
|
11842
|
+
get: () => r.value,
|
|
11843
|
+
set: (val) => r.value = val
|
|
11844
|
+
});
|
|
11845
|
+
}
|
|
11774
11846
|
} else {
|
|
11775
11847
|
warn$1(
|
|
11776
11848
|
`useTemplateRef() is called when there is no active component instance to be associated with.`
|
|
@@ -12004,7 +12076,7 @@ Component that was made reactive: `,
|
|
|
12004
12076
|
return true;
|
|
12005
12077
|
}
|
|
12006
12078
|
|
|
12007
|
-
const version = "3.5.0-
|
|
12079
|
+
const version = "3.5.0-beta.1";
|
|
12008
12080
|
const warn = warn$1 ;
|
|
12009
12081
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12010
12082
|
const devtools = devtools$1 ;
|
|
@@ -12021,6 +12093,18 @@ Component that was made reactive: `,
|
|
|
12021
12093
|
const compatUtils = _compatUtils ;
|
|
12022
12094
|
const DeprecationTypes = DeprecationTypes$1 ;
|
|
12023
12095
|
|
|
12096
|
+
let policy = void 0;
|
|
12097
|
+
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
12098
|
+
if (tt) {
|
|
12099
|
+
try {
|
|
12100
|
+
policy = /* @__PURE__ */ tt.createPolicy("vue", {
|
|
12101
|
+
createHTML: (val) => val
|
|
12102
|
+
});
|
|
12103
|
+
} catch (e) {
|
|
12104
|
+
warn(`Error creating trusted types policy: ${e}`);
|
|
12105
|
+
}
|
|
12106
|
+
}
|
|
12107
|
+
const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
|
|
12024
12108
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
12025
12109
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
12026
12110
|
const doc = typeof document !== "undefined" ? document : null;
|
|
@@ -12068,7 +12152,9 @@ Component that was made reactive: `,
|
|
|
12068
12152
|
if (start === end || !(start = start.nextSibling)) break;
|
|
12069
12153
|
}
|
|
12070
12154
|
} else {
|
|
12071
|
-
templateContainer.innerHTML =
|
|
12155
|
+
templateContainer.innerHTML = unsafeToTrustedHTML(
|
|
12156
|
+
namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
|
|
12157
|
+
);
|
|
12072
12158
|
const template = templateContainer.content;
|
|
12073
12159
|
if (namespace === "svg" || namespace === "mathml") {
|
|
12074
12160
|
const wrapper = template.firstChild;
|
|
@@ -12468,11 +12554,17 @@ Component that was made reactive: `,
|
|
|
12468
12554
|
}
|
|
12469
12555
|
const setVars = () => {
|
|
12470
12556
|
const vars = getter(instance.proxy);
|
|
12471
|
-
|
|
12557
|
+
if (instance.ce) {
|
|
12558
|
+
setVarsOnNode(instance.ce, vars);
|
|
12559
|
+
} else {
|
|
12560
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
12561
|
+
}
|
|
12472
12562
|
updateTeleports(vars);
|
|
12473
12563
|
};
|
|
12474
|
-
|
|
12564
|
+
onBeforeMount(() => {
|
|
12475
12565
|
watchPostEffect(setVars);
|
|
12566
|
+
});
|
|
12567
|
+
onMounted(() => {
|
|
12476
12568
|
const ob = new MutationObserver(setVars);
|
|
12477
12569
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
12478
12570
|
onUnmounted(() => ob.disconnect());
|
|
@@ -12869,16 +12961,24 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12869
12961
|
if (isNativeOn(key) && isString(value)) {
|
|
12870
12962
|
return false;
|
|
12871
12963
|
}
|
|
12872
|
-
|
|
12964
|
+
if (key in el) {
|
|
12965
|
+
return true;
|
|
12966
|
+
}
|
|
12967
|
+
if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
|
|
12968
|
+
return true;
|
|
12969
|
+
}
|
|
12970
|
+
return false;
|
|
12873
12971
|
}
|
|
12874
12972
|
|
|
12973
|
+
const REMOVAL = {};
|
|
12875
12974
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
12876
12975
|
// @__NO_SIDE_EFFECTS__
|
|
12877
|
-
function defineCustomElement(options, extraOptions,
|
|
12976
|
+
function defineCustomElement(options, extraOptions, _createApp) {
|
|
12878
12977
|
const Comp = defineComponent(options, extraOptions);
|
|
12978
|
+
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
12879
12979
|
class VueCustomElement extends VueElement {
|
|
12880
12980
|
constructor(initialProps) {
|
|
12881
|
-
super(Comp, initialProps,
|
|
12981
|
+
super(Comp, initialProps, _createApp);
|
|
12882
12982
|
}
|
|
12883
12983
|
}
|
|
12884
12984
|
VueCustomElement.def = Comp;
|
|
@@ -12886,47 +12986,88 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12886
12986
|
}
|
|
12887
12987
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
12888
12988
|
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
12889
|
-
return /* @__PURE__ */ defineCustomElement(options, extraOptions,
|
|
12989
|
+
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
12890
12990
|
};
|
|
12891
12991
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
12892
12992
|
};
|
|
12893
12993
|
class VueElement extends BaseClass {
|
|
12894
|
-
constructor(_def, _props = {},
|
|
12994
|
+
constructor(_def, _props = {}, _createApp = createApp) {
|
|
12895
12995
|
super();
|
|
12896
12996
|
this._def = _def;
|
|
12897
12997
|
this._props = _props;
|
|
12998
|
+
this._createApp = _createApp;
|
|
12999
|
+
this._isVueCE = true;
|
|
12898
13000
|
/**
|
|
12899
13001
|
* @internal
|
|
12900
13002
|
*/
|
|
12901
13003
|
this._instance = null;
|
|
13004
|
+
/**
|
|
13005
|
+
* @internal
|
|
13006
|
+
*/
|
|
13007
|
+
this._app = null;
|
|
13008
|
+
/**
|
|
13009
|
+
* @internal
|
|
13010
|
+
*/
|
|
13011
|
+
this._nonce = this._def.nonce;
|
|
12902
13012
|
this._connected = false;
|
|
12903
13013
|
this._resolved = false;
|
|
12904
13014
|
this._numberProps = null;
|
|
13015
|
+
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
12905
13016
|
this._ob = null;
|
|
12906
|
-
if (this.shadowRoot &&
|
|
12907
|
-
|
|
13017
|
+
if (this.shadowRoot && _createApp !== createApp) {
|
|
13018
|
+
this._root = this.shadowRoot;
|
|
13019
|
+
this._mount(_def);
|
|
12908
13020
|
} else {
|
|
12909
13021
|
if (this.shadowRoot) {
|
|
12910
13022
|
warn(
|
|
12911
13023
|
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
12912
13024
|
);
|
|
12913
13025
|
}
|
|
12914
|
-
|
|
13026
|
+
if (_def.shadowRoot !== false) {
|
|
13027
|
+
this.attachShadow({ mode: "open" });
|
|
13028
|
+
this._root = this.shadowRoot;
|
|
13029
|
+
} else {
|
|
13030
|
+
this._root = this;
|
|
13031
|
+
}
|
|
12915
13032
|
if (!this._def.__asyncLoader) {
|
|
12916
13033
|
this._resolveProps(this._def);
|
|
12917
13034
|
}
|
|
12918
13035
|
}
|
|
12919
13036
|
}
|
|
12920
13037
|
connectedCallback() {
|
|
13038
|
+
if (!this.shadowRoot) {
|
|
13039
|
+
this._parseSlots();
|
|
13040
|
+
}
|
|
12921
13041
|
this._connected = true;
|
|
13042
|
+
let parent = this;
|
|
13043
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
13044
|
+
if (parent instanceof VueElement) {
|
|
13045
|
+
this._parent = parent;
|
|
13046
|
+
break;
|
|
13047
|
+
}
|
|
13048
|
+
}
|
|
12922
13049
|
if (!this._instance) {
|
|
12923
13050
|
if (this._resolved) {
|
|
13051
|
+
this._setParent();
|
|
12924
13052
|
this._update();
|
|
12925
13053
|
} else {
|
|
12926
|
-
|
|
13054
|
+
if (parent && parent._pendingResolve) {
|
|
13055
|
+
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
13056
|
+
this._pendingResolve = void 0;
|
|
13057
|
+
this._resolveDef();
|
|
13058
|
+
});
|
|
13059
|
+
} else {
|
|
13060
|
+
this._resolveDef();
|
|
13061
|
+
}
|
|
12927
13062
|
}
|
|
12928
13063
|
}
|
|
12929
13064
|
}
|
|
13065
|
+
_setParent(parent = this._parent) {
|
|
13066
|
+
if (parent) {
|
|
13067
|
+
this._instance.parent = parent._instance;
|
|
13068
|
+
this._instance.provides = parent._instance.provides;
|
|
13069
|
+
}
|
|
13070
|
+
}
|
|
12930
13071
|
disconnectedCallback() {
|
|
12931
13072
|
this._connected = false;
|
|
12932
13073
|
nextTick(() => {
|
|
@@ -12935,8 +13076,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12935
13076
|
this._ob.disconnect();
|
|
12936
13077
|
this._ob = null;
|
|
12937
13078
|
}
|
|
12938
|
-
|
|
12939
|
-
this._instance =
|
|
13079
|
+
this._app && this._app.unmount();
|
|
13080
|
+
this._instance.ce = void 0;
|
|
13081
|
+
this._app = this._instance = null;
|
|
12940
13082
|
}
|
|
12941
13083
|
});
|
|
12942
13084
|
}
|
|
@@ -12944,7 +13086,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12944
13086
|
* resolve inner component definition (handle possible async component)
|
|
12945
13087
|
*/
|
|
12946
13088
|
_resolveDef() {
|
|
12947
|
-
this.
|
|
13089
|
+
if (this._pendingResolve) {
|
|
13090
|
+
return;
|
|
13091
|
+
}
|
|
12948
13092
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
12949
13093
|
this._setAttr(this.attributes[i].name);
|
|
12950
13094
|
}
|
|
@@ -12955,6 +13099,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12955
13099
|
});
|
|
12956
13100
|
this._ob.observe(this, { attributes: true });
|
|
12957
13101
|
const resolve = (def, isAsync = false) => {
|
|
13102
|
+
this._resolved = true;
|
|
13103
|
+
this._pendingResolve = void 0;
|
|
12958
13104
|
const { props, styles } = def;
|
|
12959
13105
|
let numberProps;
|
|
12960
13106
|
if (props && !isArray(props)) {
|
|
@@ -12972,22 +13118,53 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12972
13118
|
if (isAsync) {
|
|
12973
13119
|
this._resolveProps(def);
|
|
12974
13120
|
}
|
|
12975
|
-
this.
|
|
12976
|
-
|
|
13121
|
+
if (this.shadowRoot) {
|
|
13122
|
+
this._applyStyles(styles);
|
|
13123
|
+
} else if (styles) {
|
|
13124
|
+
warn(
|
|
13125
|
+
"Custom element style injection is not supported when using shadowRoot: false"
|
|
13126
|
+
);
|
|
13127
|
+
}
|
|
13128
|
+
this._mount(def);
|
|
12977
13129
|
};
|
|
12978
13130
|
const asyncDef = this._def.__asyncLoader;
|
|
12979
13131
|
if (asyncDef) {
|
|
12980
|
-
asyncDef().then(
|
|
13132
|
+
this._pendingResolve = asyncDef().then(
|
|
13133
|
+
(def) => resolve(this._def = def, true)
|
|
13134
|
+
);
|
|
12981
13135
|
} else {
|
|
12982
13136
|
resolve(this._def);
|
|
12983
13137
|
}
|
|
12984
13138
|
}
|
|
13139
|
+
_mount(def) {
|
|
13140
|
+
if (!def.name) {
|
|
13141
|
+
def.name = "VueElement";
|
|
13142
|
+
}
|
|
13143
|
+
this._app = this._createApp(def);
|
|
13144
|
+
if (def.configureApp) {
|
|
13145
|
+
def.configureApp(this._app);
|
|
13146
|
+
}
|
|
13147
|
+
this._app._ceVNode = this._createVNode();
|
|
13148
|
+
this._app.mount(this._root);
|
|
13149
|
+
const exposed = this._instance && this._instance.exposed;
|
|
13150
|
+
if (!exposed) return;
|
|
13151
|
+
for (const key in exposed) {
|
|
13152
|
+
if (!hasOwn(this, key)) {
|
|
13153
|
+
Object.defineProperty(this, key, {
|
|
13154
|
+
// unwrap ref to be consistent with public instance behavior
|
|
13155
|
+
get: () => unref(exposed[key])
|
|
13156
|
+
});
|
|
13157
|
+
} else {
|
|
13158
|
+
warn(`Exposed property "${key}" already exists on custom element.`);
|
|
13159
|
+
}
|
|
13160
|
+
}
|
|
13161
|
+
}
|
|
12985
13162
|
_resolveProps(def) {
|
|
12986
13163
|
const { props } = def;
|
|
12987
13164
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
12988
13165
|
for (const key of Object.keys(this)) {
|
|
12989
13166
|
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
12990
|
-
this._setProp(key, this[key]
|
|
13167
|
+
this._setProp(key, this[key]);
|
|
12991
13168
|
}
|
|
12992
13169
|
}
|
|
12993
13170
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
@@ -12996,18 +13173,20 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12996
13173
|
return this._getProp(key);
|
|
12997
13174
|
},
|
|
12998
13175
|
set(val) {
|
|
12999
|
-
this._setProp(key, val);
|
|
13176
|
+
this._setProp(key, val, true, true);
|
|
13000
13177
|
}
|
|
13001
13178
|
});
|
|
13002
13179
|
}
|
|
13003
13180
|
}
|
|
13004
13181
|
_setAttr(key) {
|
|
13005
|
-
|
|
13182
|
+
if (key.startsWith("data-v-")) return;
|
|
13183
|
+
const has = this.hasAttribute(key);
|
|
13184
|
+
let value = has ? this.getAttribute(key) : REMOVAL;
|
|
13006
13185
|
const camelKey = camelize(key);
|
|
13007
|
-
if (this._numberProps && this._numberProps[camelKey]) {
|
|
13186
|
+
if (has && this._numberProps && this._numberProps[camelKey]) {
|
|
13008
13187
|
value = toNumber(value);
|
|
13009
13188
|
}
|
|
13010
|
-
this._setProp(camelKey, value, false);
|
|
13189
|
+
this._setProp(camelKey, value, false, true);
|
|
13011
13190
|
}
|
|
13012
13191
|
/**
|
|
13013
13192
|
* @internal
|
|
@@ -13018,9 +13197,13 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13018
13197
|
/**
|
|
13019
13198
|
* @internal
|
|
13020
13199
|
*/
|
|
13021
|
-
_setProp(key, val, shouldReflect = true, shouldUpdate =
|
|
13200
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
13022
13201
|
if (val !== this._props[key]) {
|
|
13023
|
-
|
|
13202
|
+
if (val === REMOVAL) {
|
|
13203
|
+
delete this._props[key];
|
|
13204
|
+
} else {
|
|
13205
|
+
this._props[key] = val;
|
|
13206
|
+
}
|
|
13024
13207
|
if (shouldUpdate && this._instance) {
|
|
13025
13208
|
this._update();
|
|
13026
13209
|
}
|
|
@@ -13036,18 +13219,22 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13036
13219
|
}
|
|
13037
13220
|
}
|
|
13038
13221
|
_update() {
|
|
13039
|
-
render(this._createVNode(), this.
|
|
13222
|
+
render(this._createVNode(), this._root);
|
|
13040
13223
|
}
|
|
13041
13224
|
_createVNode() {
|
|
13042
|
-
const
|
|
13225
|
+
const baseProps = {};
|
|
13226
|
+
if (!this.shadowRoot) {
|
|
13227
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
13228
|
+
}
|
|
13229
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
13043
13230
|
if (!this._instance) {
|
|
13044
13231
|
vnode.ce = (instance) => {
|
|
13045
13232
|
this._instance = instance;
|
|
13046
|
-
instance.
|
|
13233
|
+
instance.ce = this;
|
|
13047
13234
|
{
|
|
13048
13235
|
instance.ceReload = (newStyles) => {
|
|
13049
13236
|
if (this._styles) {
|
|
13050
|
-
this._styles.forEach((s) => this.
|
|
13237
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
13051
13238
|
this._styles.length = 0;
|
|
13052
13239
|
}
|
|
13053
13240
|
this._applyStyles(newStyles);
|
|
@@ -13057,9 +13244,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13057
13244
|
}
|
|
13058
13245
|
const dispatch = (event, args) => {
|
|
13059
13246
|
this.dispatchEvent(
|
|
13060
|
-
new CustomEvent(
|
|
13061
|
-
|
|
13062
|
-
|
|
13247
|
+
new CustomEvent(
|
|
13248
|
+
event,
|
|
13249
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
13250
|
+
)
|
|
13063
13251
|
);
|
|
13064
13252
|
};
|
|
13065
13253
|
instance.emit = (event, ...args) => {
|
|
@@ -13068,31 +13256,127 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13068
13256
|
dispatch(hyphenate(event), args);
|
|
13069
13257
|
}
|
|
13070
13258
|
};
|
|
13071
|
-
|
|
13072
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
13073
|
-
if (parent instanceof VueElement) {
|
|
13074
|
-
instance.parent = parent._instance;
|
|
13075
|
-
instance.provides = parent._instance.provides;
|
|
13076
|
-
break;
|
|
13077
|
-
}
|
|
13078
|
-
}
|
|
13259
|
+
this._setParent();
|
|
13079
13260
|
};
|
|
13080
13261
|
}
|
|
13081
13262
|
return vnode;
|
|
13082
13263
|
}
|
|
13083
|
-
_applyStyles(styles) {
|
|
13084
|
-
if (styles)
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13264
|
+
_applyStyles(styles, owner) {
|
|
13265
|
+
if (!styles) return;
|
|
13266
|
+
if (owner) {
|
|
13267
|
+
if (owner === this._def || this._styleChildren.has(owner)) {
|
|
13268
|
+
return;
|
|
13269
|
+
}
|
|
13270
|
+
this._styleChildren.add(owner);
|
|
13271
|
+
}
|
|
13272
|
+
const nonce = this._nonce;
|
|
13273
|
+
for (let i = styles.length - 1; i >= 0; i--) {
|
|
13274
|
+
const s = document.createElement("style");
|
|
13275
|
+
if (nonce) s.setAttribute("nonce", nonce);
|
|
13276
|
+
s.textContent = styles[i];
|
|
13277
|
+
this.shadowRoot.prepend(s);
|
|
13278
|
+
{
|
|
13279
|
+
if (owner) {
|
|
13280
|
+
if (owner.__hmrId) {
|
|
13281
|
+
if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
|
|
13282
|
+
let entry = this._childStyles.get(owner.__hmrId);
|
|
13283
|
+
if (!entry) {
|
|
13284
|
+
this._childStyles.set(owner.__hmrId, entry = []);
|
|
13285
|
+
}
|
|
13286
|
+
entry.push(s);
|
|
13287
|
+
}
|
|
13288
|
+
} else {
|
|
13090
13289
|
(this._styles || (this._styles = [])).push(s);
|
|
13091
13290
|
}
|
|
13092
|
-
}
|
|
13291
|
+
}
|
|
13292
|
+
}
|
|
13293
|
+
}
|
|
13294
|
+
/**
|
|
13295
|
+
* Only called when shaddowRoot is false
|
|
13296
|
+
*/
|
|
13297
|
+
_parseSlots() {
|
|
13298
|
+
const slots = this._slots = {};
|
|
13299
|
+
let n;
|
|
13300
|
+
while (n = this.firstChild) {
|
|
13301
|
+
const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
|
|
13302
|
+
(slots[slotName] || (slots[slotName] = [])).push(n);
|
|
13303
|
+
this.removeChild(n);
|
|
13304
|
+
}
|
|
13305
|
+
}
|
|
13306
|
+
/**
|
|
13307
|
+
* Only called when shaddowRoot is false
|
|
13308
|
+
*/
|
|
13309
|
+
_renderSlots() {
|
|
13310
|
+
const outlets = this.querySelectorAll("slot");
|
|
13311
|
+
const scopeId = this._instance.type.__scopeId;
|
|
13312
|
+
for (let i = 0; i < outlets.length; i++) {
|
|
13313
|
+
const o = outlets[i];
|
|
13314
|
+
const slotName = o.getAttribute("name") || "default";
|
|
13315
|
+
const content = this._slots[slotName];
|
|
13316
|
+
const parent = o.parentNode;
|
|
13317
|
+
if (content) {
|
|
13318
|
+
for (const n of content) {
|
|
13319
|
+
if (scopeId && n.nodeType === 1) {
|
|
13320
|
+
const id = scopeId + "-s";
|
|
13321
|
+
const walker = document.createTreeWalker(n, 1);
|
|
13322
|
+
n.setAttribute(id, "");
|
|
13323
|
+
let child;
|
|
13324
|
+
while (child = walker.nextNode()) {
|
|
13325
|
+
child.setAttribute(id, "");
|
|
13326
|
+
}
|
|
13327
|
+
}
|
|
13328
|
+
parent.insertBefore(n, o);
|
|
13329
|
+
}
|
|
13330
|
+
} else {
|
|
13331
|
+
while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
13332
|
+
}
|
|
13333
|
+
parent.removeChild(o);
|
|
13334
|
+
}
|
|
13335
|
+
}
|
|
13336
|
+
/**
|
|
13337
|
+
* @internal
|
|
13338
|
+
*/
|
|
13339
|
+
_injectChildStyle(comp) {
|
|
13340
|
+
this._applyStyles(comp.styles, comp);
|
|
13341
|
+
}
|
|
13342
|
+
/**
|
|
13343
|
+
* @internal
|
|
13344
|
+
*/
|
|
13345
|
+
_removeChildStyle(comp) {
|
|
13346
|
+
{
|
|
13347
|
+
this._styleChildren.delete(comp);
|
|
13348
|
+
if (this._childStyles && comp.__hmrId) {
|
|
13349
|
+
const oldStyles = this._childStyles.get(comp.__hmrId);
|
|
13350
|
+
if (oldStyles) {
|
|
13351
|
+
oldStyles.forEach((s) => this._root.removeChild(s));
|
|
13352
|
+
oldStyles.length = 0;
|
|
13353
|
+
}
|
|
13354
|
+
}
|
|
13093
13355
|
}
|
|
13094
13356
|
}
|
|
13095
13357
|
}
|
|
13358
|
+
function useHost(caller) {
|
|
13359
|
+
const instance = getCurrentInstance();
|
|
13360
|
+
const el = instance && instance.ce;
|
|
13361
|
+
if (el) {
|
|
13362
|
+
return el;
|
|
13363
|
+
} else {
|
|
13364
|
+
if (!instance) {
|
|
13365
|
+
warn(
|
|
13366
|
+
`${caller || "useHost"} called without an active component instance.`
|
|
13367
|
+
);
|
|
13368
|
+
} else {
|
|
13369
|
+
warn(
|
|
13370
|
+
`${caller || "useHost"} can only be used in components defined via defineCustomElement.`
|
|
13371
|
+
);
|
|
13372
|
+
}
|
|
13373
|
+
}
|
|
13374
|
+
return null;
|
|
13375
|
+
}
|
|
13376
|
+
function useShadowRoot() {
|
|
13377
|
+
const el = useHost("useShadowRoot") ;
|
|
13378
|
+
return el && el.shadowRoot;
|
|
13379
|
+
}
|
|
13096
13380
|
|
|
13097
13381
|
function useCssModule(name = "$style") {
|
|
13098
13382
|
{
|
|
@@ -13604,7 +13888,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13604
13888
|
const component = app._component;
|
|
13605
13889
|
if (!isFunction(component) && !component.render && !component.template) {
|
|
13606
13890
|
component.template = container.innerHTML;
|
|
13607
|
-
{
|
|
13891
|
+
if (container.nodeType === 1) {
|
|
13608
13892
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
13609
13893
|
const attr = container.attributes[i];
|
|
13610
13894
|
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
@@ -13617,7 +13901,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13617
13901
|
}
|
|
13618
13902
|
}
|
|
13619
13903
|
}
|
|
13620
|
-
container.
|
|
13904
|
+
if (container.nodeType === 1) {
|
|
13905
|
+
container.textContent = "";
|
|
13906
|
+
}
|
|
13621
13907
|
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
13622
13908
|
if (container instanceof Element) {
|
|
13623
13909
|
container.removeAttribute("v-cloak");
|
|
@@ -13844,9 +14130,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13844
14130
|
useAttrs: useAttrs,
|
|
13845
14131
|
useCssModule: useCssModule,
|
|
13846
14132
|
useCssVars: useCssVars,
|
|
14133
|
+
useHost: useHost,
|
|
13847
14134
|
useId: useId,
|
|
13848
14135
|
useModel: useModel,
|
|
13849
14136
|
useSSRContext: useSSRContext,
|
|
14137
|
+
useShadowRoot: useShadowRoot,
|
|
13850
14138
|
useSlots: useSlots,
|
|
13851
14139
|
useTemplateRef: useTemplateRef,
|
|
13852
14140
|
useTransitionState: useTransitionState,
|
|
@@ -13908,36 +14196,70 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
13908
14196
|
const TELEPORT = Symbol(`Teleport` );
|
|
13909
14197
|
const SUSPENSE = Symbol(`Suspense` );
|
|
13910
14198
|
const KEEP_ALIVE = Symbol(`KeepAlive` );
|
|
13911
|
-
const BASE_TRANSITION = Symbol(
|
|
14199
|
+
const BASE_TRANSITION = Symbol(
|
|
14200
|
+
`BaseTransition`
|
|
14201
|
+
);
|
|
13912
14202
|
const OPEN_BLOCK = Symbol(`openBlock` );
|
|
13913
14203
|
const CREATE_BLOCK = Symbol(`createBlock` );
|
|
13914
|
-
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
14204
|
+
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
14205
|
+
`createElementBlock`
|
|
14206
|
+
);
|
|
13915
14207
|
const CREATE_VNODE = Symbol(`createVNode` );
|
|
13916
|
-
const CREATE_ELEMENT_VNODE = Symbol(
|
|
13917
|
-
|
|
13918
|
-
|
|
13919
|
-
const
|
|
13920
|
-
|
|
14208
|
+
const CREATE_ELEMENT_VNODE = Symbol(
|
|
14209
|
+
`createElementVNode`
|
|
14210
|
+
);
|
|
14211
|
+
const CREATE_COMMENT = Symbol(
|
|
14212
|
+
`createCommentVNode`
|
|
14213
|
+
);
|
|
14214
|
+
const CREATE_TEXT = Symbol(
|
|
14215
|
+
`createTextVNode`
|
|
14216
|
+
);
|
|
14217
|
+
const CREATE_STATIC = Symbol(
|
|
14218
|
+
`createStaticVNode`
|
|
14219
|
+
);
|
|
14220
|
+
const RESOLVE_COMPONENT = Symbol(
|
|
14221
|
+
`resolveComponent`
|
|
14222
|
+
);
|
|
13921
14223
|
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
13922
14224
|
`resolveDynamicComponent`
|
|
13923
14225
|
);
|
|
13924
|
-
const RESOLVE_DIRECTIVE = Symbol(
|
|
13925
|
-
|
|
13926
|
-
|
|
14226
|
+
const RESOLVE_DIRECTIVE = Symbol(
|
|
14227
|
+
`resolveDirective`
|
|
14228
|
+
);
|
|
14229
|
+
const RESOLVE_FILTER = Symbol(
|
|
14230
|
+
`resolveFilter`
|
|
14231
|
+
);
|
|
14232
|
+
const WITH_DIRECTIVES = Symbol(
|
|
14233
|
+
`withDirectives`
|
|
14234
|
+
);
|
|
13927
14235
|
const RENDER_LIST = Symbol(`renderList` );
|
|
13928
14236
|
const RENDER_SLOT = Symbol(`renderSlot` );
|
|
13929
14237
|
const CREATE_SLOTS = Symbol(`createSlots` );
|
|
13930
|
-
const TO_DISPLAY_STRING = Symbol(
|
|
14238
|
+
const TO_DISPLAY_STRING = Symbol(
|
|
14239
|
+
`toDisplayString`
|
|
14240
|
+
);
|
|
13931
14241
|
const MERGE_PROPS = Symbol(`mergeProps` );
|
|
13932
|
-
const NORMALIZE_CLASS = Symbol(
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
const
|
|
14242
|
+
const NORMALIZE_CLASS = Symbol(
|
|
14243
|
+
`normalizeClass`
|
|
14244
|
+
);
|
|
14245
|
+
const NORMALIZE_STYLE = Symbol(
|
|
14246
|
+
`normalizeStyle`
|
|
14247
|
+
);
|
|
14248
|
+
const NORMALIZE_PROPS = Symbol(
|
|
14249
|
+
`normalizeProps`
|
|
14250
|
+
);
|
|
14251
|
+
const GUARD_REACTIVE_PROPS = Symbol(
|
|
14252
|
+
`guardReactiveProps`
|
|
14253
|
+
);
|
|
13936
14254
|
const TO_HANDLERS = Symbol(`toHandlers` );
|
|
13937
14255
|
const CAMELIZE = Symbol(`camelize` );
|
|
13938
14256
|
const CAPITALIZE = Symbol(`capitalize` );
|
|
13939
|
-
const TO_HANDLER_KEY = Symbol(
|
|
13940
|
-
|
|
14257
|
+
const TO_HANDLER_KEY = Symbol(
|
|
14258
|
+
`toHandlerKey`
|
|
14259
|
+
);
|
|
14260
|
+
const SET_BLOCK_TRACKING = Symbol(
|
|
14261
|
+
`setBlockTracking`
|
|
14262
|
+
);
|
|
13941
14263
|
const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
|
|
13942
14264
|
const POP_SCOPE_ID = Symbol(`popScopeId` );
|
|
13943
14265
|
const WITH_CTX = Symbol(`withCtx` );
|
|
@@ -18159,7 +18481,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18159
18481
|
} else {
|
|
18160
18482
|
exp = isProp.exp;
|
|
18161
18483
|
if (!exp) {
|
|
18162
|
-
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
18484
|
+
exp = createSimpleExpression(`is`, false, isProp.arg.loc);
|
|
18163
18485
|
}
|
|
18164
18486
|
}
|
|
18165
18487
|
if (exp) {
|
|
@@ -19132,15 +19454,27 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
19132
19454
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
19133
19455
|
|
|
19134
19456
|
const V_MODEL_RADIO = Symbol(`vModelRadio` );
|
|
19135
|
-
const V_MODEL_CHECKBOX = Symbol(
|
|
19457
|
+
const V_MODEL_CHECKBOX = Symbol(
|
|
19458
|
+
`vModelCheckbox`
|
|
19459
|
+
);
|
|
19136
19460
|
const V_MODEL_TEXT = Symbol(`vModelText` );
|
|
19137
|
-
const V_MODEL_SELECT = Symbol(
|
|
19138
|
-
|
|
19139
|
-
|
|
19140
|
-
const
|
|
19461
|
+
const V_MODEL_SELECT = Symbol(
|
|
19462
|
+
`vModelSelect`
|
|
19463
|
+
);
|
|
19464
|
+
const V_MODEL_DYNAMIC = Symbol(
|
|
19465
|
+
`vModelDynamic`
|
|
19466
|
+
);
|
|
19467
|
+
const V_ON_WITH_MODIFIERS = Symbol(
|
|
19468
|
+
`vOnModifiersGuard`
|
|
19469
|
+
);
|
|
19470
|
+
const V_ON_WITH_KEYS = Symbol(
|
|
19471
|
+
`vOnKeysGuard`
|
|
19472
|
+
);
|
|
19141
19473
|
const V_SHOW = Symbol(`vShow` );
|
|
19142
19474
|
const TRANSITION = Symbol(`Transition` );
|
|
19143
|
-
const TRANSITION_GROUP = Symbol(
|
|
19475
|
+
const TRANSITION_GROUP = Symbol(
|
|
19476
|
+
`TransitionGroup`
|
|
19477
|
+
);
|
|
19144
19478
|
registerRuntimeHelpers({
|
|
19145
19479
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
19146
19480
|
[V_MODEL_CHECKBOX]: `vModelCheckbox`,
|