@vue/runtime-dom 3.3.0-alpha.9 → 3.3.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.
|
@@ -100,7 +100,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
100
100
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
-
const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt";
|
|
103
|
+
const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
|
|
104
104
|
const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
|
|
105
105
|
|
|
106
106
|
function normalizeStyle(value) {
|
|
@@ -1859,6 +1859,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
hmrDirtyComponents.add(oldComp);
|
|
1861
1861
|
}
|
|
1862
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
1863
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
1862
1864
|
instance.appContext.optionsCache.delete(instance.type);
|
|
1863
1865
|
if (instance.ceReload) {
|
|
1864
1866
|
hmrDirtyComponents.add(oldComp);
|
|
@@ -2701,7 +2703,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2701
2703
|
}
|
|
2702
2704
|
}
|
|
2703
2705
|
let hasWarned = false;
|
|
2704
|
-
function createSuspenseBoundary(vnode,
|
|
2706
|
+
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
2707
|
+
var _a;
|
|
2705
2708
|
if (!hasWarned) {
|
|
2706
2709
|
hasWarned = true;
|
|
2707
2710
|
console[console.info ? "info" : "log"](
|
|
@@ -2715,13 +2718,21 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2715
2718
|
n: next,
|
|
2716
2719
|
o: { parentNode, remove }
|
|
2717
2720
|
} = rendererInternals;
|
|
2721
|
+
let parentSuspenseId;
|
|
2722
|
+
const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
|
|
2723
|
+
if (isSuspensible) {
|
|
2724
|
+
if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
|
|
2725
|
+
parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
|
|
2726
|
+
parentSuspense.deps++;
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2718
2729
|
const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
|
|
2719
2730
|
{
|
|
2720
2731
|
assertNumber(timeout, `Suspense timeout`);
|
|
2721
2732
|
}
|
|
2722
2733
|
const suspense = {
|
|
2723
2734
|
vnode,
|
|
2724
|
-
parent,
|
|
2735
|
+
parent: parentSuspense,
|
|
2725
2736
|
parentComponent,
|
|
2726
2737
|
isSVG,
|
|
2727
2738
|
container,
|
|
@@ -2781,20 +2792,28 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2781
2792
|
setActiveBranch(suspense, pendingBranch);
|
|
2782
2793
|
suspense.pendingBranch = null;
|
|
2783
2794
|
suspense.isInFallback = false;
|
|
2784
|
-
let
|
|
2795
|
+
let parent = suspense.parent;
|
|
2785
2796
|
let hasUnresolvedAncestor = false;
|
|
2786
|
-
while (
|
|
2787
|
-
if (
|
|
2788
|
-
|
|
2797
|
+
while (parent) {
|
|
2798
|
+
if (parent.pendingBranch) {
|
|
2799
|
+
parent.effects.push(...effects);
|
|
2789
2800
|
hasUnresolvedAncestor = true;
|
|
2790
2801
|
break;
|
|
2791
2802
|
}
|
|
2792
|
-
|
|
2803
|
+
parent = parent.parent;
|
|
2793
2804
|
}
|
|
2794
2805
|
if (!hasUnresolvedAncestor) {
|
|
2795
2806
|
queuePostFlushCb(effects);
|
|
2796
2807
|
}
|
|
2797
2808
|
suspense.effects = [];
|
|
2809
|
+
if (isSuspensible) {
|
|
2810
|
+
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
2811
|
+
parentSuspense.deps--;
|
|
2812
|
+
if (parentSuspense.deps === 0) {
|
|
2813
|
+
parentSuspense.resolve();
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2798
2817
|
triggerEvent(vnode2, "onResolve");
|
|
2799
2818
|
},
|
|
2800
2819
|
fallback(fallbackVNode) {
|
|
@@ -2894,13 +2913,13 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2894
2913
|
}
|
|
2895
2914
|
});
|
|
2896
2915
|
},
|
|
2897
|
-
unmount(
|
|
2916
|
+
unmount(parentSuspense2, doRemove) {
|
|
2898
2917
|
suspense.isUnmounted = true;
|
|
2899
2918
|
if (suspense.activeBranch) {
|
|
2900
2919
|
unmount(
|
|
2901
2920
|
suspense.activeBranch,
|
|
2902
2921
|
parentComponent,
|
|
2903
|
-
|
|
2922
|
+
parentSuspense2,
|
|
2904
2923
|
doRemove
|
|
2905
2924
|
);
|
|
2906
2925
|
}
|
|
@@ -2908,7 +2927,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2908
2927
|
unmount(
|
|
2909
2928
|
suspense.pendingBranch,
|
|
2910
2929
|
parentComponent,
|
|
2911
|
-
|
|
2930
|
+
parentSuspense2,
|
|
2912
2931
|
doRemove
|
|
2913
2932
|
);
|
|
2914
2933
|
}
|
|
@@ -4290,6 +4309,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4290
4309
|
if (key === "$attrs") {
|
|
4291
4310
|
track(instance, "get", key);
|
|
4292
4311
|
markAttrsAccessed();
|
|
4312
|
+
} else if (key === "$slots") {
|
|
4313
|
+
track(instance, "get", key);
|
|
4293
4314
|
}
|
|
4294
4315
|
return publicGetter(instance);
|
|
4295
4316
|
} else if (
|
|
@@ -4459,6 +4480,161 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4459
4480
|
});
|
|
4460
4481
|
}
|
|
4461
4482
|
|
|
4483
|
+
const warnRuntimeUsage = (method) => warn(
|
|
4484
|
+
`${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
|
|
4485
|
+
);
|
|
4486
|
+
function defineProps() {
|
|
4487
|
+
{
|
|
4488
|
+
warnRuntimeUsage(`defineProps`);
|
|
4489
|
+
}
|
|
4490
|
+
return null;
|
|
4491
|
+
}
|
|
4492
|
+
function defineEmits() {
|
|
4493
|
+
{
|
|
4494
|
+
warnRuntimeUsage(`defineEmits`);
|
|
4495
|
+
}
|
|
4496
|
+
return null;
|
|
4497
|
+
}
|
|
4498
|
+
function defineExpose(exposed) {
|
|
4499
|
+
{
|
|
4500
|
+
warnRuntimeUsage(`defineExpose`);
|
|
4501
|
+
}
|
|
4502
|
+
}
|
|
4503
|
+
function defineOptions(options) {
|
|
4504
|
+
{
|
|
4505
|
+
warnRuntimeUsage(`defineOptions`);
|
|
4506
|
+
}
|
|
4507
|
+
}
|
|
4508
|
+
function defineSlots() {
|
|
4509
|
+
{
|
|
4510
|
+
warnRuntimeUsage(`defineSlots`);
|
|
4511
|
+
}
|
|
4512
|
+
return null;
|
|
4513
|
+
}
|
|
4514
|
+
function defineModel() {
|
|
4515
|
+
{
|
|
4516
|
+
warnRuntimeUsage("defineModel");
|
|
4517
|
+
}
|
|
4518
|
+
}
|
|
4519
|
+
function withDefaults(props, defaults) {
|
|
4520
|
+
{
|
|
4521
|
+
warnRuntimeUsage(`withDefaults`);
|
|
4522
|
+
}
|
|
4523
|
+
return null;
|
|
4524
|
+
}
|
|
4525
|
+
function useSlots() {
|
|
4526
|
+
return getContext().slots;
|
|
4527
|
+
}
|
|
4528
|
+
function useAttrs() {
|
|
4529
|
+
return getContext().attrs;
|
|
4530
|
+
}
|
|
4531
|
+
function useModel(props, name, options) {
|
|
4532
|
+
const i = getCurrentInstance();
|
|
4533
|
+
if (!i) {
|
|
4534
|
+
warn(`useModel() called without active instance.`);
|
|
4535
|
+
return ref();
|
|
4536
|
+
}
|
|
4537
|
+
if (!i.propsOptions[0][name]) {
|
|
4538
|
+
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
4539
|
+
return ref();
|
|
4540
|
+
}
|
|
4541
|
+
if (options && options.local) {
|
|
4542
|
+
const proxy = ref(props[name]);
|
|
4543
|
+
watch(
|
|
4544
|
+
() => props[name],
|
|
4545
|
+
(v) => proxy.value = v
|
|
4546
|
+
);
|
|
4547
|
+
watch(proxy, (value) => {
|
|
4548
|
+
if (value !== props[name]) {
|
|
4549
|
+
i.emit(`update:${name}`, value);
|
|
4550
|
+
}
|
|
4551
|
+
});
|
|
4552
|
+
return proxy;
|
|
4553
|
+
} else {
|
|
4554
|
+
return {
|
|
4555
|
+
__v_isRef: true,
|
|
4556
|
+
get value() {
|
|
4557
|
+
return props[name];
|
|
4558
|
+
},
|
|
4559
|
+
set value(value) {
|
|
4560
|
+
i.emit(`update:${name}`, value);
|
|
4561
|
+
}
|
|
4562
|
+
};
|
|
4563
|
+
}
|
|
4564
|
+
}
|
|
4565
|
+
function getContext() {
|
|
4566
|
+
const i = getCurrentInstance();
|
|
4567
|
+
if (!i) {
|
|
4568
|
+
warn(`useContext() called without active instance.`);
|
|
4569
|
+
}
|
|
4570
|
+
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
4571
|
+
}
|
|
4572
|
+
function normalizePropsOrEmits(props) {
|
|
4573
|
+
return isArray(props) ? props.reduce(
|
|
4574
|
+
(normalized, p) => (normalized[p] = null, normalized),
|
|
4575
|
+
{}
|
|
4576
|
+
) : props;
|
|
4577
|
+
}
|
|
4578
|
+
function mergeDefaults(raw, defaults) {
|
|
4579
|
+
const props = normalizePropsOrEmits(raw);
|
|
4580
|
+
for (const key in defaults) {
|
|
4581
|
+
if (key.startsWith("__skip"))
|
|
4582
|
+
continue;
|
|
4583
|
+
let opt = props[key];
|
|
4584
|
+
if (opt) {
|
|
4585
|
+
if (isArray(opt) || isFunction(opt)) {
|
|
4586
|
+
opt = props[key] = { type: opt, default: defaults[key] };
|
|
4587
|
+
} else {
|
|
4588
|
+
opt.default = defaults[key];
|
|
4589
|
+
}
|
|
4590
|
+
} else if (opt === null) {
|
|
4591
|
+
opt = props[key] = { default: defaults[key] };
|
|
4592
|
+
} else {
|
|
4593
|
+
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
4594
|
+
}
|
|
4595
|
+
if (opt && defaults[`__skip_${key}`]) {
|
|
4596
|
+
opt.skipFactory = true;
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
return props;
|
|
4600
|
+
}
|
|
4601
|
+
function mergeModels(a, b) {
|
|
4602
|
+
if (!a || !b)
|
|
4603
|
+
return a || b;
|
|
4604
|
+
if (isArray(a) && isArray(b))
|
|
4605
|
+
return a.concat(b);
|
|
4606
|
+
return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
4607
|
+
}
|
|
4608
|
+
function createPropsRestProxy(props, excludedKeys) {
|
|
4609
|
+
const ret = {};
|
|
4610
|
+
for (const key in props) {
|
|
4611
|
+
if (!excludedKeys.includes(key)) {
|
|
4612
|
+
Object.defineProperty(ret, key, {
|
|
4613
|
+
enumerable: true,
|
|
4614
|
+
get: () => props[key]
|
|
4615
|
+
});
|
|
4616
|
+
}
|
|
4617
|
+
}
|
|
4618
|
+
return ret;
|
|
4619
|
+
}
|
|
4620
|
+
function withAsyncContext(getAwaitable) {
|
|
4621
|
+
const ctx = getCurrentInstance();
|
|
4622
|
+
if (!ctx) {
|
|
4623
|
+
warn(
|
|
4624
|
+
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
4625
|
+
);
|
|
4626
|
+
}
|
|
4627
|
+
let awaitable = getAwaitable();
|
|
4628
|
+
unsetCurrentInstance();
|
|
4629
|
+
if (isPromise(awaitable)) {
|
|
4630
|
+
awaitable = awaitable.catch((e) => {
|
|
4631
|
+
setCurrentInstance(ctx);
|
|
4632
|
+
throw e;
|
|
4633
|
+
});
|
|
4634
|
+
}
|
|
4635
|
+
return [awaitable, () => setCurrentInstance(ctx)];
|
|
4636
|
+
}
|
|
4637
|
+
|
|
4462
4638
|
function createDuplicateChecker() {
|
|
4463
4639
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
4464
4640
|
return (type, key) => {
|
|
@@ -4521,12 +4697,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4521
4697
|
}
|
|
4522
4698
|
}
|
|
4523
4699
|
if (injectOptions) {
|
|
4524
|
-
resolveInjections(
|
|
4525
|
-
injectOptions,
|
|
4526
|
-
ctx,
|
|
4527
|
-
checkDuplicateProperties,
|
|
4528
|
-
instance.appContext.config.unwrapInjectedRef
|
|
4529
|
-
);
|
|
4700
|
+
resolveInjections(injectOptions, ctx, checkDuplicateProperties);
|
|
4530
4701
|
}
|
|
4531
4702
|
if (methods) {
|
|
4532
4703
|
for (const key in methods) {
|
|
@@ -4666,7 +4837,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4666
4837
|
if (directives)
|
|
4667
4838
|
instance.directives = directives;
|
|
4668
4839
|
}
|
|
4669
|
-
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP
|
|
4840
|
+
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
|
|
4670
4841
|
if (isArray(injectOptions)) {
|
|
4671
4842
|
injectOptions = normalizeInject(injectOptions);
|
|
4672
4843
|
}
|
|
@@ -4688,21 +4859,12 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4688
4859
|
injected = inject(opt);
|
|
4689
4860
|
}
|
|
4690
4861
|
if (isRef(injected)) {
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
});
|
|
4698
|
-
} else {
|
|
4699
|
-
{
|
|
4700
|
-
warn(
|
|
4701
|
-
`injected property "${key}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`
|
|
4702
|
-
);
|
|
4703
|
-
}
|
|
4704
|
-
ctx[key] = injected;
|
|
4705
|
-
}
|
|
4862
|
+
Object.defineProperty(ctx, key, {
|
|
4863
|
+
enumerable: true,
|
|
4864
|
+
configurable: true,
|
|
4865
|
+
get: () => injected.value,
|
|
4866
|
+
set: (v) => injected.value = v
|
|
4867
|
+
});
|
|
4706
4868
|
} else {
|
|
4707
4869
|
ctx[key] = injected;
|
|
4708
4870
|
}
|
|
@@ -4798,10 +4960,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4798
4960
|
}
|
|
4799
4961
|
const internalOptionMergeStrats = {
|
|
4800
4962
|
data: mergeDataFn,
|
|
4801
|
-
props:
|
|
4802
|
-
|
|
4803
|
-
emits: mergeObjectOptions,
|
|
4804
|
-
// TODO
|
|
4963
|
+
props: mergeEmitsOrPropsOptions,
|
|
4964
|
+
emits: mergeEmitsOrPropsOptions,
|
|
4805
4965
|
// objects
|
|
4806
4966
|
methods: mergeObjectOptions,
|
|
4807
4967
|
computed: mergeObjectOptions,
|
|
@@ -4860,7 +5020,21 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4860
5020
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
4861
5021
|
}
|
|
4862
5022
|
function mergeObjectOptions(to, from) {
|
|
4863
|
-
return to ? extend(
|
|
5023
|
+
return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
|
|
5024
|
+
}
|
|
5025
|
+
function mergeEmitsOrPropsOptions(to, from) {
|
|
5026
|
+
if (to) {
|
|
5027
|
+
if (isArray(to) && isArray(from)) {
|
|
5028
|
+
return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
5029
|
+
}
|
|
5030
|
+
return extend(
|
|
5031
|
+
/* @__PURE__ */ Object.create(null),
|
|
5032
|
+
normalizePropsOrEmits(to),
|
|
5033
|
+
normalizePropsOrEmits(from != null ? from : {})
|
|
5034
|
+
);
|
|
5035
|
+
} else {
|
|
5036
|
+
return from;
|
|
5037
|
+
}
|
|
4864
5038
|
}
|
|
4865
5039
|
function mergeWatchOptions(to, from) {
|
|
4866
5040
|
if (!to)
|
|
@@ -4906,6 +5080,18 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4906
5080
|
rootProps = null;
|
|
4907
5081
|
}
|
|
4908
5082
|
const context = createAppContext();
|
|
5083
|
+
{
|
|
5084
|
+
Object.defineProperty(context.config, "unwrapInjectedRef", {
|
|
5085
|
+
get() {
|
|
5086
|
+
return true;
|
|
5087
|
+
},
|
|
5088
|
+
set() {
|
|
5089
|
+
warn(
|
|
5090
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.`
|
|
5091
|
+
);
|
|
5092
|
+
}
|
|
5093
|
+
});
|
|
5094
|
+
}
|
|
4909
5095
|
const installedPlugins = /* @__PURE__ */ new Set();
|
|
4910
5096
|
let isMounted = false;
|
|
4911
5097
|
const app = context.app = {
|
|
@@ -5082,6 +5268,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5082
5268
|
warn(`inject() can only be used inside setup() or functional components.`);
|
|
5083
5269
|
}
|
|
5084
5270
|
}
|
|
5271
|
+
function hasInjectionContext() {
|
|
5272
|
+
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
5273
|
+
}
|
|
5085
5274
|
|
|
5086
5275
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
5087
5276
|
const props = {};
|
|
@@ -5550,6 +5739,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5550
5739
|
if (type) {
|
|
5551
5740
|
if (isHmrUpdating) {
|
|
5552
5741
|
extend(slots, children);
|
|
5742
|
+
trigger(instance, "set", "$slots");
|
|
5553
5743
|
} else if (optimized && type === 1) {
|
|
5554
5744
|
needDeletionCheck = false;
|
|
5555
5745
|
} else {
|
|
@@ -6478,7 +6668,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6478
6668
|
areChildrenSVG,
|
|
6479
6669
|
slotScopeIds
|
|
6480
6670
|
);
|
|
6481
|
-
|
|
6671
|
+
{
|
|
6482
6672
|
traverseStaticChildren(n1, n2);
|
|
6483
6673
|
}
|
|
6484
6674
|
} else if (!optimized) {
|
|
@@ -6674,21 +6864,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6674
6864
|
isSVG,
|
|
6675
6865
|
slotScopeIds
|
|
6676
6866
|
);
|
|
6677
|
-
|
|
6867
|
+
{
|
|
6678
6868
|
traverseStaticChildren(n1, n2);
|
|
6679
|
-
} else if (
|
|
6680
|
-
// #2080 if the stable fragment has a key, it's a <template v-for> that may
|
|
6681
|
-
// get moved around. Make sure all root level vnodes inherit el.
|
|
6682
|
-
// #2134 or if it's a component root, it may also get moved around
|
|
6683
|
-
// as the component is being moved.
|
|
6684
|
-
n2.key != null || parentComponent && n2 === parentComponent.subTree
|
|
6685
|
-
) {
|
|
6686
|
-
traverseStaticChildren(
|
|
6687
|
-
n1,
|
|
6688
|
-
n2,
|
|
6689
|
-
true
|
|
6690
|
-
/* shallow */
|
|
6691
|
-
);
|
|
6692
6869
|
}
|
|
6693
6870
|
} else {
|
|
6694
6871
|
patchChildren(
|
|
@@ -8262,6 +8439,8 @@ Component that was made reactive: `,
|
|
|
8262
8439
|
refs: EMPTY_OBJ,
|
|
8263
8440
|
setupState: EMPTY_OBJ,
|
|
8264
8441
|
setupContext: null,
|
|
8442
|
+
attrsProxy: null,
|
|
8443
|
+
slotsProxy: null,
|
|
8265
8444
|
// suspense related
|
|
8266
8445
|
suspense,
|
|
8267
8446
|
suspenseId: suspense ? suspense.pendingId : 0,
|
|
@@ -8489,8 +8668,8 @@ Component that was made reactive: `,
|
|
|
8489
8668
|
}
|
|
8490
8669
|
}
|
|
8491
8670
|
}
|
|
8492
|
-
function
|
|
8493
|
-
return new Proxy(
|
|
8671
|
+
function getAttrsProxy(instance) {
|
|
8672
|
+
return instance.attrsProxy || (instance.attrsProxy = new Proxy(
|
|
8494
8673
|
instance.attrs,
|
|
8495
8674
|
{
|
|
8496
8675
|
get(target, key) {
|
|
@@ -8507,7 +8686,23 @@ Component that was made reactive: `,
|
|
|
8507
8686
|
return false;
|
|
8508
8687
|
}
|
|
8509
8688
|
}
|
|
8510
|
-
);
|
|
8689
|
+
));
|
|
8690
|
+
}
|
|
8691
|
+
function getSlotsProxy(instance) {
|
|
8692
|
+
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
8693
|
+
get(target, key) {
|
|
8694
|
+
track(instance, "get", "$slots");
|
|
8695
|
+
return target[key];
|
|
8696
|
+
},
|
|
8697
|
+
set() {
|
|
8698
|
+
warn(`setupContext.slots is readonly.`);
|
|
8699
|
+
return false;
|
|
8700
|
+
},
|
|
8701
|
+
deleteProperty() {
|
|
8702
|
+
warn(`setupContext.slots is readonly.`);
|
|
8703
|
+
return false;
|
|
8704
|
+
}
|
|
8705
|
+
}));
|
|
8511
8706
|
}
|
|
8512
8707
|
function createSetupContext(instance) {
|
|
8513
8708
|
const expose = (exposed) => {
|
|
@@ -8533,14 +8728,13 @@ Component that was made reactive: `,
|
|
|
8533
8728
|
}
|
|
8534
8729
|
instance.exposed = exposed || {};
|
|
8535
8730
|
};
|
|
8536
|
-
let attrs;
|
|
8537
8731
|
{
|
|
8538
8732
|
return Object.freeze({
|
|
8539
8733
|
get attrs() {
|
|
8540
|
-
return
|
|
8734
|
+
return getAttrsProxy(instance);
|
|
8541
8735
|
},
|
|
8542
8736
|
get slots() {
|
|
8543
|
-
return
|
|
8737
|
+
return getSlotsProxy(instance);
|
|
8544
8738
|
},
|
|
8545
8739
|
get emit() {
|
|
8546
8740
|
return (event, ...args) => instance.emit(event, ...args);
|
|
@@ -8600,161 +8794,6 @@ Component that was made reactive: `,
|
|
|
8600
8794
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
8601
8795
|
};
|
|
8602
8796
|
|
|
8603
|
-
const warnRuntimeUsage = (method) => warn(
|
|
8604
|
-
`${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
|
|
8605
|
-
);
|
|
8606
|
-
function defineProps() {
|
|
8607
|
-
{
|
|
8608
|
-
warnRuntimeUsage(`defineProps`);
|
|
8609
|
-
}
|
|
8610
|
-
return null;
|
|
8611
|
-
}
|
|
8612
|
-
function defineEmits() {
|
|
8613
|
-
{
|
|
8614
|
-
warnRuntimeUsage(`defineEmits`);
|
|
8615
|
-
}
|
|
8616
|
-
return null;
|
|
8617
|
-
}
|
|
8618
|
-
function defineExpose(exposed) {
|
|
8619
|
-
{
|
|
8620
|
-
warnRuntimeUsage(`defineExpose`);
|
|
8621
|
-
}
|
|
8622
|
-
}
|
|
8623
|
-
function defineOptions(options) {
|
|
8624
|
-
{
|
|
8625
|
-
warnRuntimeUsage(`defineOptions`);
|
|
8626
|
-
}
|
|
8627
|
-
}
|
|
8628
|
-
function defineSlots() {
|
|
8629
|
-
{
|
|
8630
|
-
warnRuntimeUsage(`defineSlots`);
|
|
8631
|
-
}
|
|
8632
|
-
return null;
|
|
8633
|
-
}
|
|
8634
|
-
function defineModel() {
|
|
8635
|
-
{
|
|
8636
|
-
warnRuntimeUsage("defineModel");
|
|
8637
|
-
}
|
|
8638
|
-
}
|
|
8639
|
-
function withDefaults(props, defaults) {
|
|
8640
|
-
{
|
|
8641
|
-
warnRuntimeUsage(`withDefaults`);
|
|
8642
|
-
}
|
|
8643
|
-
return null;
|
|
8644
|
-
}
|
|
8645
|
-
function useSlots() {
|
|
8646
|
-
return getContext().slots;
|
|
8647
|
-
}
|
|
8648
|
-
function useAttrs() {
|
|
8649
|
-
return getContext().attrs;
|
|
8650
|
-
}
|
|
8651
|
-
function useModel(props, name, options) {
|
|
8652
|
-
const i = getCurrentInstance();
|
|
8653
|
-
if (!i) {
|
|
8654
|
-
warn(`useModel() called without active instance.`);
|
|
8655
|
-
return ref();
|
|
8656
|
-
}
|
|
8657
|
-
if (!i.propsOptions[0][name]) {
|
|
8658
|
-
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
8659
|
-
return ref();
|
|
8660
|
-
}
|
|
8661
|
-
if (options && options.local) {
|
|
8662
|
-
const proxy = ref(props[name]);
|
|
8663
|
-
watch(
|
|
8664
|
-
() => props[name],
|
|
8665
|
-
(v) => proxy.value = v
|
|
8666
|
-
);
|
|
8667
|
-
watch(proxy, (value) => {
|
|
8668
|
-
if (value !== props[name]) {
|
|
8669
|
-
i.emit(`update:${name}`, value);
|
|
8670
|
-
}
|
|
8671
|
-
});
|
|
8672
|
-
return proxy;
|
|
8673
|
-
} else {
|
|
8674
|
-
return {
|
|
8675
|
-
__v_isRef: true,
|
|
8676
|
-
get value() {
|
|
8677
|
-
return props[name];
|
|
8678
|
-
},
|
|
8679
|
-
set value(value) {
|
|
8680
|
-
i.emit(`update:${name}`, value);
|
|
8681
|
-
}
|
|
8682
|
-
};
|
|
8683
|
-
}
|
|
8684
|
-
}
|
|
8685
|
-
function getContext() {
|
|
8686
|
-
const i = getCurrentInstance();
|
|
8687
|
-
if (!i) {
|
|
8688
|
-
warn(`useContext() called without active instance.`);
|
|
8689
|
-
}
|
|
8690
|
-
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
8691
|
-
}
|
|
8692
|
-
function normalizePropsOrEmits(props) {
|
|
8693
|
-
return isArray(props) ? props.reduce(
|
|
8694
|
-
(normalized, p) => (normalized[p] = {}, normalized),
|
|
8695
|
-
{}
|
|
8696
|
-
) : props;
|
|
8697
|
-
}
|
|
8698
|
-
function mergeDefaults(raw, defaults) {
|
|
8699
|
-
const props = normalizePropsOrEmits(raw);
|
|
8700
|
-
for (const key in defaults) {
|
|
8701
|
-
if (key.startsWith("__skip"))
|
|
8702
|
-
continue;
|
|
8703
|
-
let opt = props[key];
|
|
8704
|
-
if (opt) {
|
|
8705
|
-
if (isArray(opt) || isFunction(opt)) {
|
|
8706
|
-
opt = props[key] = { type: opt, default: defaults[key] };
|
|
8707
|
-
} else {
|
|
8708
|
-
opt.default = defaults[key];
|
|
8709
|
-
}
|
|
8710
|
-
} else if (opt === null) {
|
|
8711
|
-
opt = props[key] = { default: defaults[key] };
|
|
8712
|
-
} else {
|
|
8713
|
-
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
8714
|
-
}
|
|
8715
|
-
if (opt && defaults[`__skip_${key}`]) {
|
|
8716
|
-
opt.skipFactory = true;
|
|
8717
|
-
}
|
|
8718
|
-
}
|
|
8719
|
-
return props;
|
|
8720
|
-
}
|
|
8721
|
-
function mergeModels(a, b) {
|
|
8722
|
-
if (!a || !b)
|
|
8723
|
-
return a || b;
|
|
8724
|
-
if (isArray(a) && isArray(b))
|
|
8725
|
-
return a.concat(b);
|
|
8726
|
-
return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
|
|
8727
|
-
}
|
|
8728
|
-
function createPropsRestProxy(props, excludedKeys) {
|
|
8729
|
-
const ret = {};
|
|
8730
|
-
for (const key in props) {
|
|
8731
|
-
if (!excludedKeys.includes(key)) {
|
|
8732
|
-
Object.defineProperty(ret, key, {
|
|
8733
|
-
enumerable: true,
|
|
8734
|
-
get: () => props[key]
|
|
8735
|
-
});
|
|
8736
|
-
}
|
|
8737
|
-
}
|
|
8738
|
-
return ret;
|
|
8739
|
-
}
|
|
8740
|
-
function withAsyncContext(getAwaitable) {
|
|
8741
|
-
const ctx = getCurrentInstance();
|
|
8742
|
-
if (!ctx) {
|
|
8743
|
-
warn(
|
|
8744
|
-
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
8745
|
-
);
|
|
8746
|
-
}
|
|
8747
|
-
let awaitable = getAwaitable();
|
|
8748
|
-
unsetCurrentInstance();
|
|
8749
|
-
if (isPromise(awaitable)) {
|
|
8750
|
-
awaitable = awaitable.catch((e) => {
|
|
8751
|
-
setCurrentInstance(ctx);
|
|
8752
|
-
throw e;
|
|
8753
|
-
});
|
|
8754
|
-
}
|
|
8755
|
-
return [awaitable, () => setCurrentInstance(ctx)];
|
|
8756
|
-
}
|
|
8757
|
-
|
|
8758
8797
|
function h(type, propsOrChildren, children) {
|
|
8759
8798
|
const l = arguments.length;
|
|
8760
8799
|
if (l === 2) {
|
|
@@ -8984,7 +9023,7 @@ Component that was made reactive: `,
|
|
|
8984
9023
|
return true;
|
|
8985
9024
|
}
|
|
8986
9025
|
|
|
8987
|
-
const version = "3.3.0-
|
|
9026
|
+
const version = "3.3.0-beta.1";
|
|
8988
9027
|
const ssrUtils = null;
|
|
8989
9028
|
const resolveFilter = null;
|
|
8990
9029
|
const compatUtils = null;
|
|
@@ -10495,6 +10534,7 @@ Component that was made reactive: `,
|
|
|
10495
10534
|
exports.guardReactiveProps = guardReactiveProps;
|
|
10496
10535
|
exports.h = h;
|
|
10497
10536
|
exports.handleError = handleError;
|
|
10537
|
+
exports.hasInjectionContext = hasInjectionContext;
|
|
10498
10538
|
exports.hydrate = hydrate;
|
|
10499
10539
|
exports.initCustomFormatter = initCustomFormatter;
|
|
10500
10540
|
exports.initDirectivesForSSR = initDirectivesForSSR;
|