@vue/runtime-dom 3.3.0-alpha.1 → 3.3.0-alpha.11

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.
@@ -10,6 +10,96 @@ var VueRuntimeDOM = (function (exports) {
10
10
  return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
11
11
  }
12
12
 
13
+ const EMPTY_OBJ = Object.freeze({}) ;
14
+ const EMPTY_ARR = Object.freeze([]) ;
15
+ const NOOP = () => {
16
+ };
17
+ const NO = () => false;
18
+ const onRE = /^on[^a-z]/;
19
+ const isOn = (key) => onRE.test(key);
20
+ const isModelListener = (key) => key.startsWith("onUpdate:");
21
+ const extend = Object.assign;
22
+ const remove = (arr, el) => {
23
+ const i = arr.indexOf(el);
24
+ if (i > -1) {
25
+ arr.splice(i, 1);
26
+ }
27
+ };
28
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
29
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
30
+ const isArray = Array.isArray;
31
+ const isMap = (val) => toTypeString(val) === "[object Map]";
32
+ const isSet = (val) => toTypeString(val) === "[object Set]";
33
+ const isDate = (val) => toTypeString(val) === "[object Date]";
34
+ const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
35
+ const isFunction = (val) => typeof val === "function";
36
+ const isString = (val) => typeof val === "string";
37
+ const isSymbol = (val) => typeof val === "symbol";
38
+ const isObject = (val) => val !== null && typeof val === "object";
39
+ const isPromise = (val) => {
40
+ return isObject(val) && isFunction(val.then) && isFunction(val.catch);
41
+ };
42
+ const objectToString = Object.prototype.toString;
43
+ const toTypeString = (value) => objectToString.call(value);
44
+ const toRawType = (value) => {
45
+ return toTypeString(value).slice(8, -1);
46
+ };
47
+ const isPlainObject = (val) => toTypeString(val) === "[object Object]";
48
+ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
49
+ const isReservedProp = /* @__PURE__ */ makeMap(
50
+ // the leading comma is intentional so empty string "" is also included
51
+ ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
52
+ );
53
+ const isBuiltInDirective = /* @__PURE__ */ makeMap(
54
+ "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
55
+ );
56
+ const cacheStringFunction = (fn) => {
57
+ const cache = /* @__PURE__ */ Object.create(null);
58
+ return (str) => {
59
+ const hit = cache[str];
60
+ return hit || (cache[str] = fn(str));
61
+ };
62
+ };
63
+ const camelizeRE = /-(\w)/g;
64
+ const camelize = cacheStringFunction((str) => {
65
+ return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
66
+ });
67
+ const hyphenateRE = /\B([A-Z])/g;
68
+ const hyphenate = cacheStringFunction(
69
+ (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
70
+ );
71
+ const capitalize = cacheStringFunction(
72
+ (str) => str.charAt(0).toUpperCase() + str.slice(1)
73
+ );
74
+ const toHandlerKey = cacheStringFunction(
75
+ (str) => str ? `on${capitalize(str)}` : ``
76
+ );
77
+ const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
78
+ const invokeArrayFns = (fns, arg) => {
79
+ for (let i = 0; i < fns.length; i++) {
80
+ fns[i](arg);
81
+ }
82
+ };
83
+ const def = (obj, key, value) => {
84
+ Object.defineProperty(obj, key, {
85
+ configurable: true,
86
+ enumerable: false,
87
+ value
88
+ });
89
+ };
90
+ const looseToNumber = (val) => {
91
+ const n = parseFloat(val);
92
+ return isNaN(n) ? val : n;
93
+ };
94
+ const toNumber = (val) => {
95
+ const n = isString(val) ? Number(val) : NaN;
96
+ return isNaN(n) ? val : n;
97
+ };
98
+ let _globalThis;
99
+ const getGlobalThis = () => {
100
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
101
+ };
102
+
13
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";
14
104
  const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
15
105
 
@@ -164,96 +254,6 @@ var VueRuntimeDOM = (function (exports) {
164
254
  return val;
165
255
  };
166
256
 
167
- const EMPTY_OBJ = Object.freeze({}) ;
168
- const EMPTY_ARR = Object.freeze([]) ;
169
- const NOOP = () => {
170
- };
171
- const NO = () => false;
172
- const onRE = /^on[^a-z]/;
173
- const isOn = (key) => onRE.test(key);
174
- const isModelListener = (key) => key.startsWith("onUpdate:");
175
- const extend = Object.assign;
176
- const remove = (arr, el) => {
177
- const i = arr.indexOf(el);
178
- if (i > -1) {
179
- arr.splice(i, 1);
180
- }
181
- };
182
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
183
- const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
184
- const isArray = Array.isArray;
185
- const isMap = (val) => toTypeString(val) === "[object Map]";
186
- const isSet = (val) => toTypeString(val) === "[object Set]";
187
- const isDate = (val) => toTypeString(val) === "[object Date]";
188
- const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
189
- const isFunction = (val) => typeof val === "function";
190
- const isString = (val) => typeof val === "string";
191
- const isSymbol = (val) => typeof val === "symbol";
192
- const isObject = (val) => val !== null && typeof val === "object";
193
- const isPromise = (val) => {
194
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
195
- };
196
- const objectToString = Object.prototype.toString;
197
- const toTypeString = (value) => objectToString.call(value);
198
- const toRawType = (value) => {
199
- return toTypeString(value).slice(8, -1);
200
- };
201
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
202
- const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
203
- const isReservedProp = /* @__PURE__ */ makeMap(
204
- // the leading comma is intentional so empty string "" is also included
205
- ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
206
- );
207
- const isBuiltInDirective = /* @__PURE__ */ makeMap(
208
- "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
209
- );
210
- const cacheStringFunction = (fn) => {
211
- const cache = /* @__PURE__ */ Object.create(null);
212
- return (str) => {
213
- const hit = cache[str];
214
- return hit || (cache[str] = fn(str));
215
- };
216
- };
217
- const camelizeRE = /-(\w)/g;
218
- const camelize = cacheStringFunction((str) => {
219
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
220
- });
221
- const hyphenateRE = /\B([A-Z])/g;
222
- const hyphenate = cacheStringFunction(
223
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
224
- );
225
- const capitalize = cacheStringFunction(
226
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
227
- );
228
- const toHandlerKey = cacheStringFunction(
229
- (str) => str ? `on${capitalize(str)}` : ``
230
- );
231
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
232
- const invokeArrayFns = (fns, arg) => {
233
- for (let i = 0; i < fns.length; i++) {
234
- fns[i](arg);
235
- }
236
- };
237
- const def = (obj, key, value) => {
238
- Object.defineProperty(obj, key, {
239
- configurable: true,
240
- enumerable: false,
241
- value
242
- });
243
- };
244
- const looseToNumber = (val) => {
245
- const n = parseFloat(val);
246
- return isNaN(n) ? val : n;
247
- };
248
- const toNumber = (val) => {
249
- const n = isString(val) ? Number(val) : NaN;
250
- return isNaN(n) ? val : n;
251
- };
252
- let _globalThis;
253
- const getGlobalThis = () => {
254
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
255
- };
256
-
257
257
  function warn$1(msg, ...args) {
258
258
  console.warn(`[Vue warn] ${msg}`, ...args);
259
259
  }
@@ -1267,6 +1267,9 @@ var VueRuntimeDOM = (function (exports) {
1267
1267
  function unref(ref2) {
1268
1268
  return isRef(ref2) ? ref2.value : ref2;
1269
1269
  }
1270
+ function toValue(source) {
1271
+ return isFunction(source) ? source() : unref(source);
1272
+ }
1270
1273
  const shallowUnwrapHandlers = {
1271
1274
  get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
1272
1275
  set: (target, key, value, receiver) => {
@@ -1309,7 +1312,7 @@ var VueRuntimeDOM = (function (exports) {
1309
1312
  }
1310
1313
  const ret = isArray(object) ? new Array(object.length) : {};
1311
1314
  for (const key in object) {
1312
- ret[key] = toRef(object, key);
1315
+ ret[key] = propertyToRef(object, key);
1313
1316
  }
1314
1317
  return ret;
1315
1318
  }
@@ -1331,9 +1334,34 @@ var VueRuntimeDOM = (function (exports) {
1331
1334
  return getDepFromReactive(toRaw(this._object), this._key);
1332
1335
  }
1333
1336
  }
1334
- function toRef(object, key, defaultValue) {
1335
- const val = object[key];
1336
- return isRef(val) ? val : new ObjectRefImpl(object, key, defaultValue);
1337
+ class GetterRefImpl {
1338
+ constructor(_getter) {
1339
+ this._getter = _getter;
1340
+ this.__v_isRef = true;
1341
+ this.__v_isReadonly = true;
1342
+ }
1343
+ get value() {
1344
+ return this._getter();
1345
+ }
1346
+ }
1347
+ function toRef(source, key, defaultValue) {
1348
+ if (isRef(source)) {
1349
+ return source;
1350
+ } else if (isFunction(source)) {
1351
+ return new GetterRefImpl(source);
1352
+ } else if (isObject(source) && arguments.length > 1) {
1353
+ return propertyToRef(source, key, defaultValue);
1354
+ } else {
1355
+ return ref(source);
1356
+ }
1357
+ }
1358
+ function propertyToRef(source, key, defaultValue) {
1359
+ const val = source[key];
1360
+ return isRef(val) ? val : new ObjectRefImpl(
1361
+ source,
1362
+ key,
1363
+ defaultValue
1364
+ );
1337
1365
  }
1338
1366
 
1339
1367
  class ComputedRefImpl {
@@ -1831,6 +1859,8 @@ var VueRuntimeDOM = (function (exports) {
1831
1859
  }
1832
1860
  hmrDirtyComponents.add(oldComp);
1833
1861
  }
1862
+ instance.appContext.propsCache.delete(instance.type);
1863
+ instance.appContext.emitsCache.delete(instance.type);
1834
1864
  instance.appContext.optionsCache.delete(instance.type);
1835
1865
  if (instance.ceReload) {
1836
1866
  hmrDirtyComponents.add(oldComp);
@@ -2973,36 +3003,6 @@ var VueRuntimeDOM = (function (exports) {
2973
3003
  }
2974
3004
  }
2975
3005
 
2976
- function provide(key, value) {
2977
- if (!currentInstance) {
2978
- {
2979
- warn(`provide() can only be used inside setup().`);
2980
- }
2981
- } else {
2982
- let provides = currentInstance.provides;
2983
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
2984
- if (parentProvides === provides) {
2985
- provides = currentInstance.provides = Object.create(parentProvides);
2986
- }
2987
- provides[key] = value;
2988
- }
2989
- }
2990
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
2991
- const instance = currentInstance || currentRenderingInstance;
2992
- if (instance) {
2993
- const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides;
2994
- if (provides && key in provides) {
2995
- return provides[key];
2996
- } else if (arguments.length > 1) {
2997
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue;
2998
- } else {
2999
- warn(`injection "${String(key)}" not found.`);
3000
- }
3001
- } else {
3002
- warn(`inject() can only be used inside setup() or functional components.`);
3003
- }
3004
- }
3005
-
3006
3006
  function watchEffect(effect, options) {
3007
3007
  return doWatch(effect, null, options);
3008
3008
  }
@@ -3228,39 +3228,98 @@ var VueRuntimeDOM = (function (exports) {
3228
3228
  return value;
3229
3229
  }
3230
3230
 
3231
- function useTransitionState() {
3232
- const state = {
3233
- isMounted: false,
3234
- isLeaving: false,
3235
- isUnmounting: false,
3236
- leavingVNodes: /* @__PURE__ */ new Map()
3237
- };
3238
- onMounted(() => {
3239
- state.isMounted = true;
3240
- });
3241
- onBeforeUnmount(() => {
3242
- state.isUnmounting = true;
3243
- });
3244
- return state;
3231
+ function validateDirectiveName(name) {
3232
+ if (isBuiltInDirective(name)) {
3233
+ warn("Do not use built-in directive ids as custom directive id: " + name);
3234
+ }
3245
3235
  }
3246
- const TransitionHookValidator = [Function, Array];
3247
- const BaseTransitionPropsValidators = {
3248
- mode: String,
3249
- appear: Boolean,
3250
- persisted: Boolean,
3251
- // enter
3252
- onBeforeEnter: TransitionHookValidator,
3253
- onEnter: TransitionHookValidator,
3254
- onAfterEnter: TransitionHookValidator,
3255
- onEnterCancelled: TransitionHookValidator,
3256
- // leave
3257
- onBeforeLeave: TransitionHookValidator,
3258
- onLeave: TransitionHookValidator,
3259
- onAfterLeave: TransitionHookValidator,
3260
- onLeaveCancelled: TransitionHookValidator,
3261
- // appear
3262
- onBeforeAppear: TransitionHookValidator,
3263
- onAppear: TransitionHookValidator,
3236
+ function withDirectives(vnode, directives) {
3237
+ const internalInstance = currentRenderingInstance;
3238
+ if (internalInstance === null) {
3239
+ warn(`withDirectives can only be used inside render functions.`);
3240
+ return vnode;
3241
+ }
3242
+ const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
3243
+ const bindings = vnode.dirs || (vnode.dirs = []);
3244
+ for (let i = 0; i < directives.length; i++) {
3245
+ let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
3246
+ if (dir) {
3247
+ if (isFunction(dir)) {
3248
+ dir = {
3249
+ mounted: dir,
3250
+ updated: dir
3251
+ };
3252
+ }
3253
+ if (dir.deep) {
3254
+ traverse(value);
3255
+ }
3256
+ bindings.push({
3257
+ dir,
3258
+ instance,
3259
+ value,
3260
+ oldValue: void 0,
3261
+ arg,
3262
+ modifiers
3263
+ });
3264
+ }
3265
+ }
3266
+ return vnode;
3267
+ }
3268
+ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3269
+ const bindings = vnode.dirs;
3270
+ const oldBindings = prevVNode && prevVNode.dirs;
3271
+ for (let i = 0; i < bindings.length; i++) {
3272
+ const binding = bindings[i];
3273
+ if (oldBindings) {
3274
+ binding.oldValue = oldBindings[i].value;
3275
+ }
3276
+ let hook = binding.dir[name];
3277
+ if (hook) {
3278
+ pauseTracking();
3279
+ callWithAsyncErrorHandling(hook, instance, 8, [
3280
+ vnode.el,
3281
+ binding,
3282
+ vnode,
3283
+ prevVNode
3284
+ ]);
3285
+ resetTracking();
3286
+ }
3287
+ }
3288
+ }
3289
+
3290
+ function useTransitionState() {
3291
+ const state = {
3292
+ isMounted: false,
3293
+ isLeaving: false,
3294
+ isUnmounting: false,
3295
+ leavingVNodes: /* @__PURE__ */ new Map()
3296
+ };
3297
+ onMounted(() => {
3298
+ state.isMounted = true;
3299
+ });
3300
+ onBeforeUnmount(() => {
3301
+ state.isUnmounting = true;
3302
+ });
3303
+ return state;
3304
+ }
3305
+ const TransitionHookValidator = [Function, Array];
3306
+ const BaseTransitionPropsValidators = {
3307
+ mode: String,
3308
+ appear: Boolean,
3309
+ persisted: Boolean,
3310
+ // enter
3311
+ onBeforeEnter: TransitionHookValidator,
3312
+ onEnter: TransitionHookValidator,
3313
+ onAfterEnter: TransitionHookValidator,
3314
+ onEnterCancelled: TransitionHookValidator,
3315
+ // leave
3316
+ onBeforeLeave: TransitionHookValidator,
3317
+ onLeave: TransitionHookValidator,
3318
+ onAfterLeave: TransitionHookValidator,
3319
+ onLeaveCancelled: TransitionHookValidator,
3320
+ // appear
3321
+ onBeforeAppear: TransitionHookValidator,
3322
+ onAppear: TransitionHookValidator,
3264
3323
  onAfterAppear: TransitionHookValidator,
3265
3324
  onAppearCancelled: TransitionHookValidator
3266
3325
  };
@@ -3552,8 +3611,8 @@ var VueRuntimeDOM = (function (exports) {
3552
3611
  return ret;
3553
3612
  }
3554
3613
 
3555
- function defineComponent(options) {
3556
- return isFunction(options) ? { setup: options, name: options.name } : options;
3614
+ function defineComponent(options, extraOptions) {
3615
+ return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
3557
3616
  }
3558
3617
 
3559
3618
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -3985,71 +4044,12 @@ var VueRuntimeDOM = (function (exports) {
3985
4044
  injectHook("ec", hook, target);
3986
4045
  }
3987
4046
 
3988
- function validateDirectiveName(name) {
3989
- if (isBuiltInDirective(name)) {
3990
- warn("Do not use built-in directive ids as custom directive id: " + name);
3991
- }
3992
- }
3993
- function withDirectives(vnode, directives) {
3994
- const internalInstance = currentRenderingInstance;
3995
- if (internalInstance === null) {
3996
- warn(`withDirectives can only be used inside render functions.`);
3997
- return vnode;
3998
- }
3999
- const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
4000
- const bindings = vnode.dirs || (vnode.dirs = []);
4001
- for (let i = 0; i < directives.length; i++) {
4002
- let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
4003
- if (dir) {
4004
- if (isFunction(dir)) {
4005
- dir = {
4006
- mounted: dir,
4007
- updated: dir
4008
- };
4009
- }
4010
- if (dir.deep) {
4011
- traverse(value);
4012
- }
4013
- bindings.push({
4014
- dir,
4015
- instance,
4016
- value,
4017
- oldValue: void 0,
4018
- arg,
4019
- modifiers
4020
- });
4021
- }
4022
- }
4023
- return vnode;
4024
- }
4025
- function invokeDirectiveHook(vnode, prevVNode, instance, name) {
4026
- const bindings = vnode.dirs;
4027
- const oldBindings = prevVNode && prevVNode.dirs;
4028
- for (let i = 0; i < bindings.length; i++) {
4029
- const binding = bindings[i];
4030
- if (oldBindings) {
4031
- binding.oldValue = oldBindings[i].value;
4032
- }
4033
- let hook = binding.dir[name];
4034
- if (hook) {
4035
- pauseTracking();
4036
- callWithAsyncErrorHandling(hook, instance, 8, [
4037
- vnode.el,
4038
- binding,
4039
- vnode,
4040
- prevVNode
4041
- ]);
4042
- resetTracking();
4043
- }
4044
- }
4045
- }
4046
-
4047
4047
  const COMPONENTS = "components";
4048
4048
  const DIRECTIVES = "directives";
4049
4049
  function resolveComponent(name, maybeSelfReference) {
4050
4050
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4051
4051
  }
4052
- const NULL_DYNAMIC_COMPONENT = Symbol();
4052
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4053
4053
  function resolveDynamicComponent(component) {
4054
4054
  if (isString(component)) {
4055
4055
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -4461,103 +4461,258 @@ If this is a native custom element, make sure to exclude it from component resol
4461
4461
  });
4462
4462
  }
4463
4463
 
4464
- function createDuplicateChecker() {
4465
- const cache = /* @__PURE__ */ Object.create(null);
4466
- return (type, key) => {
4467
- if (cache[key]) {
4468
- warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
4469
- } else {
4470
- cache[key] = type;
4471
- }
4472
- };
4464
+ const warnRuntimeUsage = (method) => warn(
4465
+ `${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.`
4466
+ );
4467
+ function defineProps() {
4468
+ {
4469
+ warnRuntimeUsage(`defineProps`);
4470
+ }
4471
+ return null;
4473
4472
  }
4474
- let shouldCacheAccess = true;
4475
- function applyOptions(instance) {
4476
- const options = resolveMergedOptions(instance);
4477
- const publicThis = instance.proxy;
4478
- const ctx = instance.ctx;
4479
- shouldCacheAccess = false;
4480
- if (options.beforeCreate) {
4481
- callHook$1(options.beforeCreate, instance, "bc");
4473
+ function defineEmits() {
4474
+ {
4475
+ warnRuntimeUsage(`defineEmits`);
4482
4476
  }
4483
- const {
4484
- // state
4485
- data: dataOptions,
4486
- computed: computedOptions,
4487
- methods,
4488
- watch: watchOptions,
4489
- provide: provideOptions,
4490
- inject: injectOptions,
4491
- // lifecycle
4492
- created,
4493
- beforeMount,
4494
- mounted,
4495
- beforeUpdate,
4496
- updated,
4497
- activated,
4498
- deactivated,
4499
- beforeDestroy,
4500
- beforeUnmount,
4501
- destroyed,
4502
- unmounted,
4503
- render,
4504
- renderTracked,
4505
- renderTriggered,
4506
- errorCaptured,
4507
- serverPrefetch,
4508
- // public API
4509
- expose,
4510
- inheritAttrs,
4511
- // assets
4512
- components,
4513
- directives,
4514
- filters
4515
- } = options;
4516
- const checkDuplicateProperties = createDuplicateChecker() ;
4477
+ return null;
4478
+ }
4479
+ function defineExpose(exposed) {
4517
4480
  {
4518
- const [propsOptions] = instance.propsOptions;
4519
- if (propsOptions) {
4520
- for (const key in propsOptions) {
4521
- checkDuplicateProperties("Props" /* PROPS */, key);
4522
- }
4523
- }
4481
+ warnRuntimeUsage(`defineExpose`);
4524
4482
  }
4525
- if (injectOptions) {
4526
- resolveInjections(
4527
- injectOptions,
4528
- ctx,
4529
- checkDuplicateProperties,
4530
- instance.appContext.config.unwrapInjectedRef
4531
- );
4483
+ }
4484
+ function defineOptions(options) {
4485
+ {
4486
+ warnRuntimeUsage(`defineOptions`);
4532
4487
  }
4533
- if (methods) {
4534
- for (const key in methods) {
4535
- const methodHandler = methods[key];
4536
- if (isFunction(methodHandler)) {
4537
- {
4538
- Object.defineProperty(ctx, key, {
4539
- value: methodHandler.bind(publicThis),
4540
- configurable: true,
4541
- enumerable: true,
4542
- writable: true
4543
- });
4544
- }
4545
- {
4546
- checkDuplicateProperties("Methods" /* METHODS */, key);
4547
- }
4548
- } else {
4549
- warn(
4550
- `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
4551
- );
4552
- }
4553
- }
4488
+ }
4489
+ function defineSlots() {
4490
+ {
4491
+ warnRuntimeUsage(`defineSlots`);
4554
4492
  }
4555
- if (dataOptions) {
4556
- if (!isFunction(dataOptions)) {
4557
- warn(
4558
- `The data option must be a function. Plain object usage is no longer supported.`
4559
- );
4560
- }
4493
+ return null;
4494
+ }
4495
+ function defineModel() {
4496
+ {
4497
+ warnRuntimeUsage("defineModel");
4498
+ }
4499
+ }
4500
+ function withDefaults(props, defaults) {
4501
+ {
4502
+ warnRuntimeUsage(`withDefaults`);
4503
+ }
4504
+ return null;
4505
+ }
4506
+ function useSlots() {
4507
+ return getContext().slots;
4508
+ }
4509
+ function useAttrs() {
4510
+ return getContext().attrs;
4511
+ }
4512
+ function useModel(props, name, options) {
4513
+ const i = getCurrentInstance();
4514
+ if (!i) {
4515
+ warn(`useModel() called without active instance.`);
4516
+ return ref();
4517
+ }
4518
+ if (!i.propsOptions[0][name]) {
4519
+ warn(`useModel() called with prop "${name}" which is not declared.`);
4520
+ return ref();
4521
+ }
4522
+ if (options && options.local) {
4523
+ const proxy = ref(props[name]);
4524
+ watch(
4525
+ () => props[name],
4526
+ (v) => proxy.value = v
4527
+ );
4528
+ watch(proxy, (value) => {
4529
+ if (value !== props[name]) {
4530
+ i.emit(`update:${name}`, value);
4531
+ }
4532
+ });
4533
+ return proxy;
4534
+ } else {
4535
+ return {
4536
+ __v_isRef: true,
4537
+ get value() {
4538
+ return props[name];
4539
+ },
4540
+ set value(value) {
4541
+ i.emit(`update:${name}`, value);
4542
+ }
4543
+ };
4544
+ }
4545
+ }
4546
+ function getContext() {
4547
+ const i = getCurrentInstance();
4548
+ if (!i) {
4549
+ warn(`useContext() called without active instance.`);
4550
+ }
4551
+ return i.setupContext || (i.setupContext = createSetupContext(i));
4552
+ }
4553
+ function normalizePropsOrEmits(props) {
4554
+ return isArray(props) ? props.reduce(
4555
+ (normalized, p) => (normalized[p] = null, normalized),
4556
+ {}
4557
+ ) : props;
4558
+ }
4559
+ function mergeDefaults(raw, defaults) {
4560
+ const props = normalizePropsOrEmits(raw);
4561
+ for (const key in defaults) {
4562
+ if (key.startsWith("__skip"))
4563
+ continue;
4564
+ let opt = props[key];
4565
+ if (opt) {
4566
+ if (isArray(opt) || isFunction(opt)) {
4567
+ opt = props[key] = { type: opt, default: defaults[key] };
4568
+ } else {
4569
+ opt.default = defaults[key];
4570
+ }
4571
+ } else if (opt === null) {
4572
+ opt = props[key] = { default: defaults[key] };
4573
+ } else {
4574
+ warn(`props default key "${key}" has no corresponding declaration.`);
4575
+ }
4576
+ if (opt && defaults[`__skip_${key}`]) {
4577
+ opt.skipFactory = true;
4578
+ }
4579
+ }
4580
+ return props;
4581
+ }
4582
+ function mergeModels(a, b) {
4583
+ if (!a || !b)
4584
+ return a || b;
4585
+ if (isArray(a) && isArray(b))
4586
+ return a.concat(b);
4587
+ return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
4588
+ }
4589
+ function createPropsRestProxy(props, excludedKeys) {
4590
+ const ret = {};
4591
+ for (const key in props) {
4592
+ if (!excludedKeys.includes(key)) {
4593
+ Object.defineProperty(ret, key, {
4594
+ enumerable: true,
4595
+ get: () => props[key]
4596
+ });
4597
+ }
4598
+ }
4599
+ return ret;
4600
+ }
4601
+ function withAsyncContext(getAwaitable) {
4602
+ const ctx = getCurrentInstance();
4603
+ if (!ctx) {
4604
+ warn(
4605
+ `withAsyncContext called without active current instance. This is likely a bug.`
4606
+ );
4607
+ }
4608
+ let awaitable = getAwaitable();
4609
+ unsetCurrentInstance();
4610
+ if (isPromise(awaitable)) {
4611
+ awaitable = awaitable.catch((e) => {
4612
+ setCurrentInstance(ctx);
4613
+ throw e;
4614
+ });
4615
+ }
4616
+ return [awaitable, () => setCurrentInstance(ctx)];
4617
+ }
4618
+
4619
+ function createDuplicateChecker() {
4620
+ const cache = /* @__PURE__ */ Object.create(null);
4621
+ return (type, key) => {
4622
+ if (cache[key]) {
4623
+ warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
4624
+ } else {
4625
+ cache[key] = type;
4626
+ }
4627
+ };
4628
+ }
4629
+ let shouldCacheAccess = true;
4630
+ function applyOptions(instance) {
4631
+ const options = resolveMergedOptions(instance);
4632
+ const publicThis = instance.proxy;
4633
+ const ctx = instance.ctx;
4634
+ shouldCacheAccess = false;
4635
+ if (options.beforeCreate) {
4636
+ callHook$1(options.beforeCreate, instance, "bc");
4637
+ }
4638
+ const {
4639
+ // state
4640
+ data: dataOptions,
4641
+ computed: computedOptions,
4642
+ methods,
4643
+ watch: watchOptions,
4644
+ provide: provideOptions,
4645
+ inject: injectOptions,
4646
+ // lifecycle
4647
+ created,
4648
+ beforeMount,
4649
+ mounted,
4650
+ beforeUpdate,
4651
+ updated,
4652
+ activated,
4653
+ deactivated,
4654
+ beforeDestroy,
4655
+ beforeUnmount,
4656
+ destroyed,
4657
+ unmounted,
4658
+ render,
4659
+ renderTracked,
4660
+ renderTriggered,
4661
+ errorCaptured,
4662
+ serverPrefetch,
4663
+ // public API
4664
+ expose,
4665
+ inheritAttrs,
4666
+ // assets
4667
+ components,
4668
+ directives,
4669
+ filters
4670
+ } = options;
4671
+ const checkDuplicateProperties = createDuplicateChecker() ;
4672
+ {
4673
+ const [propsOptions] = instance.propsOptions;
4674
+ if (propsOptions) {
4675
+ for (const key in propsOptions) {
4676
+ checkDuplicateProperties("Props" /* PROPS */, key);
4677
+ }
4678
+ }
4679
+ }
4680
+ if (injectOptions) {
4681
+ resolveInjections(
4682
+ injectOptions,
4683
+ ctx,
4684
+ checkDuplicateProperties,
4685
+ instance.appContext.config.unwrapInjectedRef
4686
+ );
4687
+ }
4688
+ if (methods) {
4689
+ for (const key in methods) {
4690
+ const methodHandler = methods[key];
4691
+ if (isFunction(methodHandler)) {
4692
+ {
4693
+ Object.defineProperty(ctx, key, {
4694
+ value: methodHandler.bind(publicThis),
4695
+ configurable: true,
4696
+ enumerable: true,
4697
+ writable: true
4698
+ });
4699
+ }
4700
+ {
4701
+ checkDuplicateProperties("Methods" /* METHODS */, key);
4702
+ }
4703
+ } else {
4704
+ warn(
4705
+ `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
4706
+ );
4707
+ }
4708
+ }
4709
+ }
4710
+ if (dataOptions) {
4711
+ if (!isFunction(dataOptions)) {
4712
+ warn(
4713
+ `The data option must be a function. Plain object usage is no longer supported.`
4714
+ );
4715
+ }
4561
4716
  const data = dataOptions.call(publicThis, publicThis);
4562
4717
  if (isPromise(data)) {
4563
4718
  warn(
@@ -4800,10 +4955,8 @@ If this is a native custom element, make sure to exclude it from component resol
4800
4955
  }
4801
4956
  const internalOptionMergeStrats = {
4802
4957
  data: mergeDataFn,
4803
- props: mergeObjectOptions,
4804
- // TODO
4805
- emits: mergeObjectOptions,
4806
- // TODO
4958
+ props: mergeEmitsOrPropsOptions,
4959
+ emits: mergeEmitsOrPropsOptions,
4807
4960
  // objects
4808
4961
  methods: mergeObjectOptions,
4809
4962
  computed: mergeObjectOptions,
@@ -4862,7 +5015,21 @@ If this is a native custom element, make sure to exclude it from component resol
4862
5015
  return to ? [...new Set([].concat(to, from))] : from;
4863
5016
  }
4864
5017
  function mergeObjectOptions(to, from) {
4865
- return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from;
5018
+ return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
5019
+ }
5020
+ function mergeEmitsOrPropsOptions(to, from) {
5021
+ if (to) {
5022
+ if (isArray(to) && isArray(from)) {
5023
+ return [.../* @__PURE__ */ new Set([...to, ...from])];
5024
+ }
5025
+ return extend(
5026
+ /* @__PURE__ */ Object.create(null),
5027
+ normalizePropsOrEmits(to),
5028
+ normalizePropsOrEmits(from != null ? from : {})
5029
+ );
5030
+ } else {
5031
+ return from;
5032
+ }
4866
5033
  }
4867
5034
  function mergeWatchOptions(to, from) {
4868
5035
  if (!to)
@@ -4876,43 +5043,252 @@ If this is a native custom element, make sure to exclude it from component resol
4876
5043
  return merged;
4877
5044
  }
4878
5045
 
4879
- function initProps(instance, rawProps, isStateful, isSSR = false) {
4880
- const props = {};
4881
- const attrs = {};
4882
- def(attrs, InternalObjectKey, 1);
4883
- instance.propsDefaults = /* @__PURE__ */ Object.create(null);
4884
- setFullProps(instance, rawProps, props, attrs);
4885
- for (const key in instance.propsOptions[0]) {
4886
- if (!(key in props)) {
4887
- props[key] = void 0;
5046
+ function createAppContext() {
5047
+ return {
5048
+ app: null,
5049
+ config: {
5050
+ isNativeTag: NO,
5051
+ performance: false,
5052
+ globalProperties: {},
5053
+ optionMergeStrategies: {},
5054
+ errorHandler: void 0,
5055
+ warnHandler: void 0,
5056
+ compilerOptions: {}
5057
+ },
5058
+ mixins: [],
5059
+ components: {},
5060
+ directives: {},
5061
+ provides: /* @__PURE__ */ Object.create(null),
5062
+ optionsCache: /* @__PURE__ */ new WeakMap(),
5063
+ propsCache: /* @__PURE__ */ new WeakMap(),
5064
+ emitsCache: /* @__PURE__ */ new WeakMap()
5065
+ };
5066
+ }
5067
+ let uid$1 = 0;
5068
+ function createAppAPI(render, hydrate) {
5069
+ return function createApp(rootComponent, rootProps = null) {
5070
+ if (!isFunction(rootComponent)) {
5071
+ rootComponent = extend({}, rootComponent);
4888
5072
  }
4889
- }
4890
- {
4891
- validateProps(rawProps || {}, props, instance);
4892
- }
4893
- if (isStateful) {
4894
- instance.props = isSSR ? props : shallowReactive(props);
4895
- } else {
4896
- if (!instance.type.props) {
4897
- instance.props = attrs;
4898
- } else {
4899
- instance.props = props;
5073
+ if (rootProps != null && !isObject(rootProps)) {
5074
+ warn(`root props passed to app.mount() must be an object.`);
5075
+ rootProps = null;
4900
5076
  }
4901
- }
4902
- instance.attrs = attrs;
4903
- }
4904
- function isInHmrContext(instance) {
4905
- while (instance) {
4906
- if (instance.type.__hmrId)
4907
- return true;
4908
- instance = instance.parent;
4909
- }
4910
- }
4911
- function updateProps(instance, rawProps, rawPrevProps, optimized) {
4912
- const {
4913
- props,
4914
- attrs,
4915
- vnode: { patchFlag }
5077
+ const context = createAppContext();
5078
+ const installedPlugins = /* @__PURE__ */ new Set();
5079
+ let isMounted = false;
5080
+ const app = context.app = {
5081
+ _uid: uid$1++,
5082
+ _component: rootComponent,
5083
+ _props: rootProps,
5084
+ _container: null,
5085
+ _context: context,
5086
+ _instance: null,
5087
+ version,
5088
+ get config() {
5089
+ return context.config;
5090
+ },
5091
+ set config(v) {
5092
+ {
5093
+ warn(
5094
+ `app.config cannot be replaced. Modify individual options instead.`
5095
+ );
5096
+ }
5097
+ },
5098
+ use(plugin, ...options) {
5099
+ if (installedPlugins.has(plugin)) {
5100
+ warn(`Plugin has already been applied to target app.`);
5101
+ } else if (plugin && isFunction(plugin.install)) {
5102
+ installedPlugins.add(plugin);
5103
+ plugin.install(app, ...options);
5104
+ } else if (isFunction(plugin)) {
5105
+ installedPlugins.add(plugin);
5106
+ plugin(app, ...options);
5107
+ } else {
5108
+ warn(
5109
+ `A plugin must either be a function or an object with an "install" function.`
5110
+ );
5111
+ }
5112
+ return app;
5113
+ },
5114
+ mixin(mixin) {
5115
+ {
5116
+ if (!context.mixins.includes(mixin)) {
5117
+ context.mixins.push(mixin);
5118
+ } else {
5119
+ warn(
5120
+ "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
5121
+ );
5122
+ }
5123
+ }
5124
+ return app;
5125
+ },
5126
+ component(name, component) {
5127
+ {
5128
+ validateComponentName(name, context.config);
5129
+ }
5130
+ if (!component) {
5131
+ return context.components[name];
5132
+ }
5133
+ if (context.components[name]) {
5134
+ warn(`Component "${name}" has already been registered in target app.`);
5135
+ }
5136
+ context.components[name] = component;
5137
+ return app;
5138
+ },
5139
+ directive(name, directive) {
5140
+ {
5141
+ validateDirectiveName(name);
5142
+ }
5143
+ if (!directive) {
5144
+ return context.directives[name];
5145
+ }
5146
+ if (context.directives[name]) {
5147
+ warn(`Directive "${name}" has already been registered in target app.`);
5148
+ }
5149
+ context.directives[name] = directive;
5150
+ return app;
5151
+ },
5152
+ mount(rootContainer, isHydrate, isSVG) {
5153
+ if (!isMounted) {
5154
+ if (rootContainer.__vue_app__) {
5155
+ warn(
5156
+ `There is already an app instance mounted on the host container.
5157
+ If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
5158
+ );
5159
+ }
5160
+ const vnode = createVNode(
5161
+ rootComponent,
5162
+ rootProps
5163
+ );
5164
+ vnode.appContext = context;
5165
+ {
5166
+ context.reload = () => {
5167
+ render(cloneVNode(vnode), rootContainer, isSVG);
5168
+ };
5169
+ }
5170
+ if (isHydrate && hydrate) {
5171
+ hydrate(vnode, rootContainer);
5172
+ } else {
5173
+ render(vnode, rootContainer, isSVG);
5174
+ }
5175
+ isMounted = true;
5176
+ app._container = rootContainer;
5177
+ rootContainer.__vue_app__ = app;
5178
+ {
5179
+ app._instance = vnode.component;
5180
+ devtoolsInitApp(app, version);
5181
+ }
5182
+ return getExposeProxy(vnode.component) || vnode.component.proxy;
5183
+ } else {
5184
+ warn(
5185
+ `App has already been mounted.
5186
+ If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
5187
+ );
5188
+ }
5189
+ },
5190
+ unmount() {
5191
+ if (isMounted) {
5192
+ render(null, app._container);
5193
+ {
5194
+ app._instance = null;
5195
+ devtoolsUnmountApp(app);
5196
+ }
5197
+ delete app._container.__vue_app__;
5198
+ } else {
5199
+ warn(`Cannot unmount an app that is not mounted.`);
5200
+ }
5201
+ },
5202
+ provide(key, value) {
5203
+ if (key in context.provides) {
5204
+ warn(
5205
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
5206
+ );
5207
+ }
5208
+ context.provides[key] = value;
5209
+ return app;
5210
+ },
5211
+ runWithContext(fn) {
5212
+ currentApp = app;
5213
+ try {
5214
+ return fn();
5215
+ } finally {
5216
+ currentApp = null;
5217
+ }
5218
+ }
5219
+ };
5220
+ return app;
5221
+ };
5222
+ }
5223
+ let currentApp = null;
5224
+
5225
+ function provide(key, value) {
5226
+ if (!currentInstance) {
5227
+ {
5228
+ warn(`provide() can only be used inside setup().`);
5229
+ }
5230
+ } else {
5231
+ let provides = currentInstance.provides;
5232
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
5233
+ if (parentProvides === provides) {
5234
+ provides = currentInstance.provides = Object.create(parentProvides);
5235
+ }
5236
+ provides[key] = value;
5237
+ }
5238
+ }
5239
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
5240
+ const instance = currentInstance || currentRenderingInstance;
5241
+ if (instance || currentApp) {
5242
+ const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
5243
+ if (provides && key in provides) {
5244
+ return provides[key];
5245
+ } else if (arguments.length > 1) {
5246
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
5247
+ } else {
5248
+ warn(`injection "${String(key)}" not found.`);
5249
+ }
5250
+ } else {
5251
+ warn(`inject() can only be used inside setup() or functional components.`);
5252
+ }
5253
+ }
5254
+
5255
+ function initProps(instance, rawProps, isStateful, isSSR = false) {
5256
+ const props = {};
5257
+ const attrs = {};
5258
+ def(attrs, InternalObjectKey, 1);
5259
+ instance.propsDefaults = /* @__PURE__ */ Object.create(null);
5260
+ setFullProps(instance, rawProps, props, attrs);
5261
+ for (const key in instance.propsOptions[0]) {
5262
+ if (!(key in props)) {
5263
+ props[key] = void 0;
5264
+ }
5265
+ }
5266
+ {
5267
+ validateProps(rawProps || {}, props, instance);
5268
+ }
5269
+ if (isStateful) {
5270
+ instance.props = isSSR ? props : shallowReactive(props);
5271
+ } else {
5272
+ if (!instance.type.props) {
5273
+ instance.props = attrs;
5274
+ } else {
5275
+ instance.props = props;
5276
+ }
5277
+ }
5278
+ instance.attrs = attrs;
5279
+ }
5280
+ function isInHmrContext(instance) {
5281
+ while (instance) {
5282
+ if (instance.type.__hmrId)
5283
+ return true;
5284
+ instance = instance.parent;
5285
+ }
5286
+ }
5287
+ function updateProps(instance, rawProps, rawPrevProps, optimized) {
5288
+ const {
5289
+ props,
5290
+ attrs,
5291
+ vnode: { patchFlag }
4916
5292
  } = instance;
4917
5293
  const rawCurrentProps = toRaw(props);
4918
5294
  const [options] = instance.propsOptions;
@@ -5050,7 +5426,7 @@ If this is a native custom element, make sure to exclude it from component resol
5050
5426
  const hasDefault = hasOwn(opt, "default");
5051
5427
  if (hasDefault && value === void 0) {
5052
5428
  const defaultValue = opt.default;
5053
- if (opt.type !== Function && isFunction(defaultValue)) {
5429
+ if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
5054
5430
  const { propsDefaults } = instance;
5055
5431
  if (key in propsDefaults) {
5056
5432
  value = propsDefaults[key];
@@ -5186,358 +5562,188 @@ If this is a native custom element, make sure to exclude it from component resol
5186
5562
  }
5187
5563
  }
5188
5564
  function validateProp(name, value, prop, isAbsent) {
5189
- const { type, required, validator } = prop;
5565
+ const { type, required, validator, skipCheck } = prop;
5190
5566
  if (required && isAbsent) {
5191
5567
  warn('Missing required prop: "' + name + '"');
5192
5568
  return;
5193
5569
  }
5194
- if (value == null && !prop.required) {
5570
+ if (value == null && !required) {
5195
5571
  return;
5196
5572
  }
5197
- if (type != null && type !== true) {
5573
+ if (type != null && type !== true && !skipCheck) {
5198
5574
  let isValid = false;
5199
5575
  const types = isArray(type) ? type : [type];
5200
- const expectedTypes = [];
5201
- for (let i = 0; i < types.length && !isValid; i++) {
5202
- const { valid, expectedType } = assertType(value, types[i]);
5203
- expectedTypes.push(expectedType || "");
5204
- isValid = valid;
5205
- }
5206
- if (!isValid) {
5207
- warn(getInvalidTypeMessage(name, value, expectedTypes));
5208
- return;
5209
- }
5210
- }
5211
- if (validator && !validator(value)) {
5212
- warn('Invalid prop: custom validator check failed for prop "' + name + '".');
5213
- }
5214
- }
5215
- const isSimpleType = /* @__PURE__ */ makeMap(
5216
- "String,Number,Boolean,Function,Symbol,BigInt"
5217
- );
5218
- function assertType(value, type) {
5219
- let valid;
5220
- const expectedType = getType(type);
5221
- if (isSimpleType(expectedType)) {
5222
- const t = typeof value;
5223
- valid = t === expectedType.toLowerCase();
5224
- if (!valid && t === "object") {
5225
- valid = value instanceof type;
5226
- }
5227
- } else if (expectedType === "Object") {
5228
- valid = isObject(value);
5229
- } else if (expectedType === "Array") {
5230
- valid = isArray(value);
5231
- } else if (expectedType === "null") {
5232
- valid = value === null;
5233
- } else {
5234
- valid = value instanceof type;
5235
- }
5236
- return {
5237
- valid,
5238
- expectedType
5239
- };
5240
- }
5241
- function getInvalidTypeMessage(name, value, expectedTypes) {
5242
- let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
5243
- const expectedType = expectedTypes[0];
5244
- const receivedType = toRawType(value);
5245
- const expectedValue = styleValue(value, expectedType);
5246
- const receivedValue = styleValue(value, receivedType);
5247
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
5248
- message += ` with value ${expectedValue}`;
5249
- }
5250
- message += `, got ${receivedType} `;
5251
- if (isExplicable(receivedType)) {
5252
- message += `with value ${receivedValue}.`;
5253
- }
5254
- return message;
5255
- }
5256
- function styleValue(value, type) {
5257
- if (type === "String") {
5258
- return `"${value}"`;
5259
- } else if (type === "Number") {
5260
- return `${Number(value)}`;
5261
- } else {
5262
- return `${value}`;
5263
- }
5264
- }
5265
- function isExplicable(type) {
5266
- const explicitTypes = ["string", "number", "boolean"];
5267
- return explicitTypes.some((elem) => type.toLowerCase() === elem);
5268
- }
5269
- function isBoolean(...args) {
5270
- return args.some((elem) => elem.toLowerCase() === "boolean");
5271
- }
5272
-
5273
- const isInternalKey = (key) => key[0] === "_" || key === "$stable";
5274
- const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
5275
- const normalizeSlot = (key, rawSlot, ctx) => {
5276
- if (rawSlot._n) {
5277
- return rawSlot;
5278
- }
5279
- const normalized = withCtx((...args) => {
5280
- if (currentInstance) {
5281
- warn(
5282
- `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
5283
- );
5284
- }
5285
- return normalizeSlotValue(rawSlot(...args));
5286
- }, ctx);
5287
- normalized._c = false;
5288
- return normalized;
5289
- };
5290
- const normalizeObjectSlots = (rawSlots, slots, instance) => {
5291
- const ctx = rawSlots._ctx;
5292
- for (const key in rawSlots) {
5293
- if (isInternalKey(key))
5294
- continue;
5295
- const value = rawSlots[key];
5296
- if (isFunction(value)) {
5297
- slots[key] = normalizeSlot(key, value, ctx);
5298
- } else if (value != null) {
5299
- {
5300
- warn(
5301
- `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
5302
- );
5303
- }
5304
- const normalized = normalizeSlotValue(value);
5305
- slots[key] = () => normalized;
5306
- }
5307
- }
5308
- };
5309
- const normalizeVNodeSlots = (instance, children) => {
5310
- if (!isKeepAlive(instance.vnode) && true) {
5311
- warn(
5312
- `Non-function value encountered for default slot. Prefer function slots for better performance.`
5313
- );
5314
- }
5315
- const normalized = normalizeSlotValue(children);
5316
- instance.slots.default = () => normalized;
5317
- };
5318
- const initSlots = (instance, children) => {
5319
- if (instance.vnode.shapeFlag & 32) {
5320
- const type = children._;
5321
- if (type) {
5322
- instance.slots = toRaw(children);
5323
- def(children, "_", type);
5324
- } else {
5325
- normalizeObjectSlots(
5326
- children,
5327
- instance.slots = {});
5328
- }
5329
- } else {
5330
- instance.slots = {};
5331
- if (children) {
5332
- normalizeVNodeSlots(instance, children);
5333
- }
5334
- }
5335
- def(instance.slots, InternalObjectKey, 1);
5336
- };
5337
- const updateSlots = (instance, children, optimized) => {
5338
- const { vnode, slots } = instance;
5339
- let needDeletionCheck = true;
5340
- let deletionComparisonTarget = EMPTY_OBJ;
5341
- if (vnode.shapeFlag & 32) {
5342
- const type = children._;
5343
- if (type) {
5344
- if (isHmrUpdating) {
5345
- extend(slots, children);
5346
- } else if (optimized && type === 1) {
5347
- needDeletionCheck = false;
5348
- } else {
5349
- extend(slots, children);
5350
- if (!optimized && type === 1) {
5351
- delete slots._;
5352
- }
5353
- }
5354
- } else {
5355
- needDeletionCheck = !children.$stable;
5356
- normalizeObjectSlots(children, slots);
5357
- }
5358
- deletionComparisonTarget = children;
5359
- } else if (children) {
5360
- normalizeVNodeSlots(instance, children);
5361
- deletionComparisonTarget = { default: 1 };
5362
- }
5363
- if (needDeletionCheck) {
5364
- for (const key in slots) {
5365
- if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {
5366
- delete slots[key];
5367
- }
5368
- }
5369
- }
5370
- };
5371
-
5372
- function createAppContext() {
5373
- return {
5374
- app: null,
5375
- config: {
5376
- isNativeTag: NO,
5377
- performance: false,
5378
- globalProperties: {},
5379
- optionMergeStrategies: {},
5380
- errorHandler: void 0,
5381
- warnHandler: void 0,
5382
- compilerOptions: {}
5383
- },
5384
- mixins: [],
5385
- components: {},
5386
- directives: {},
5387
- provides: /* @__PURE__ */ Object.create(null),
5388
- optionsCache: /* @__PURE__ */ new WeakMap(),
5389
- propsCache: /* @__PURE__ */ new WeakMap(),
5390
- emitsCache: /* @__PURE__ */ new WeakMap()
5391
- };
5392
- }
5393
- let uid$1 = 0;
5394
- function createAppAPI(render, hydrate) {
5395
- return function createApp(rootComponent, rootProps = null) {
5396
- if (!isFunction(rootComponent)) {
5397
- rootComponent = extend({}, rootComponent);
5398
- }
5399
- if (rootProps != null && !isObject(rootProps)) {
5400
- warn(`root props passed to app.mount() must be an object.`);
5401
- rootProps = null;
5402
- }
5403
- const context = createAppContext();
5404
- const installedPlugins = /* @__PURE__ */ new Set();
5405
- let isMounted = false;
5406
- const app = context.app = {
5407
- _uid: uid$1++,
5408
- _component: rootComponent,
5409
- _props: rootProps,
5410
- _container: null,
5411
- _context: context,
5412
- _instance: null,
5413
- version,
5414
- get config() {
5415
- return context.config;
5416
- },
5417
- set config(v) {
5418
- {
5419
- warn(
5420
- `app.config cannot be replaced. Modify individual options instead.`
5421
- );
5422
- }
5423
- },
5424
- use(plugin, ...options) {
5425
- if (installedPlugins.has(plugin)) {
5426
- warn(`Plugin has already been applied to target app.`);
5427
- } else if (plugin && isFunction(plugin.install)) {
5428
- installedPlugins.add(plugin);
5429
- plugin.install(app, ...options);
5430
- } else if (isFunction(plugin)) {
5431
- installedPlugins.add(plugin);
5432
- plugin(app, ...options);
5433
- } else {
5434
- warn(
5435
- `A plugin must either be a function or an object with an "install" function.`
5436
- );
5437
- }
5438
- return app;
5439
- },
5440
- mixin(mixin) {
5441
- {
5442
- if (!context.mixins.includes(mixin)) {
5443
- context.mixins.push(mixin);
5444
- } else {
5445
- warn(
5446
- "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
5447
- );
5448
- }
5449
- }
5450
- return app;
5451
- },
5452
- component(name, component) {
5453
- {
5454
- validateComponentName(name, context.config);
5455
- }
5456
- if (!component) {
5457
- return context.components[name];
5458
- }
5459
- if (context.components[name]) {
5460
- warn(`Component "${name}" has already been registered in target app.`);
5461
- }
5462
- context.components[name] = component;
5463
- return app;
5464
- },
5465
- directive(name, directive) {
5466
- {
5467
- validateDirectiveName(name);
5468
- }
5469
- if (!directive) {
5470
- return context.directives[name];
5471
- }
5472
- if (context.directives[name]) {
5473
- warn(`Directive "${name}" has already been registered in target app.`);
5474
- }
5475
- context.directives[name] = directive;
5476
- return app;
5477
- },
5478
- mount(rootContainer, isHydrate, isSVG) {
5479
- if (!isMounted) {
5480
- if (rootContainer.__vue_app__) {
5481
- warn(
5482
- `There is already an app instance mounted on the host container.
5483
- If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
5484
- );
5485
- }
5486
- const vnode = createVNode(
5487
- rootComponent,
5488
- rootProps
5489
- );
5490
- vnode.appContext = context;
5491
- {
5492
- context.reload = () => {
5493
- render(cloneVNode(vnode), rootContainer, isSVG);
5494
- };
5495
- }
5496
- if (isHydrate && hydrate) {
5497
- hydrate(vnode, rootContainer);
5498
- } else {
5499
- render(vnode, rootContainer, isSVG);
5500
- }
5501
- isMounted = true;
5502
- app._container = rootContainer;
5503
- rootContainer.__vue_app__ = app;
5504
- {
5505
- app._instance = vnode.component;
5506
- devtoolsInitApp(app, version);
5507
- }
5508
- return getExposeProxy(vnode.component) || vnode.component.proxy;
5509
- } else {
5510
- warn(
5511
- `App has already been mounted.
5512
- If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
5513
- );
5514
- }
5515
- },
5516
- unmount() {
5517
- if (isMounted) {
5518
- render(null, app._container);
5519
- {
5520
- app._instance = null;
5521
- devtoolsUnmountApp(app);
5522
- }
5523
- delete app._container.__vue_app__;
5524
- } else {
5525
- warn(`Cannot unmount an app that is not mounted.`);
5526
- }
5527
- },
5528
- provide(key, value) {
5529
- if (key in context.provides) {
5530
- warn(
5531
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
5532
- );
5533
- }
5534
- context.provides[key] = value;
5535
- return app;
5536
- }
5537
- };
5538
- return app;
5576
+ const expectedTypes = [];
5577
+ for (let i = 0; i < types.length && !isValid; i++) {
5578
+ const { valid, expectedType } = assertType(value, types[i]);
5579
+ expectedTypes.push(expectedType || "");
5580
+ isValid = valid;
5581
+ }
5582
+ if (!isValid) {
5583
+ warn(getInvalidTypeMessage(name, value, expectedTypes));
5584
+ return;
5585
+ }
5586
+ }
5587
+ if (validator && !validator(value)) {
5588
+ warn('Invalid prop: custom validator check failed for prop "' + name + '".');
5589
+ }
5590
+ }
5591
+ const isSimpleType = /* @__PURE__ */ makeMap(
5592
+ "String,Number,Boolean,Function,Symbol,BigInt"
5593
+ );
5594
+ function assertType(value, type) {
5595
+ let valid;
5596
+ const expectedType = getType(type);
5597
+ if (isSimpleType(expectedType)) {
5598
+ const t = typeof value;
5599
+ valid = t === expectedType.toLowerCase();
5600
+ if (!valid && t === "object") {
5601
+ valid = value instanceof type;
5602
+ }
5603
+ } else if (expectedType === "Object") {
5604
+ valid = isObject(value);
5605
+ } else if (expectedType === "Array") {
5606
+ valid = isArray(value);
5607
+ } else if (expectedType === "null") {
5608
+ valid = value === null;
5609
+ } else {
5610
+ valid = value instanceof type;
5611
+ }
5612
+ return {
5613
+ valid,
5614
+ expectedType
5539
5615
  };
5540
5616
  }
5617
+ function getInvalidTypeMessage(name, value, expectedTypes) {
5618
+ let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
5619
+ const expectedType = expectedTypes[0];
5620
+ const receivedType = toRawType(value);
5621
+ const expectedValue = styleValue(value, expectedType);
5622
+ const receivedValue = styleValue(value, receivedType);
5623
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
5624
+ message += ` with value ${expectedValue}`;
5625
+ }
5626
+ message += `, got ${receivedType} `;
5627
+ if (isExplicable(receivedType)) {
5628
+ message += `with value ${receivedValue}.`;
5629
+ }
5630
+ return message;
5631
+ }
5632
+ function styleValue(value, type) {
5633
+ if (type === "String") {
5634
+ return `"${value}"`;
5635
+ } else if (type === "Number") {
5636
+ return `${Number(value)}`;
5637
+ } else {
5638
+ return `${value}`;
5639
+ }
5640
+ }
5641
+ function isExplicable(type) {
5642
+ const explicitTypes = ["string", "number", "boolean"];
5643
+ return explicitTypes.some((elem) => type.toLowerCase() === elem);
5644
+ }
5645
+ function isBoolean(...args) {
5646
+ return args.some((elem) => elem.toLowerCase() === "boolean");
5647
+ }
5648
+
5649
+ const isInternalKey = (key) => key[0] === "_" || key === "$stable";
5650
+ const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
5651
+ const normalizeSlot = (key, rawSlot, ctx) => {
5652
+ if (rawSlot._n) {
5653
+ return rawSlot;
5654
+ }
5655
+ const normalized = withCtx((...args) => {
5656
+ if (currentInstance) {
5657
+ warn(
5658
+ `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
5659
+ );
5660
+ }
5661
+ return normalizeSlotValue(rawSlot(...args));
5662
+ }, ctx);
5663
+ normalized._c = false;
5664
+ return normalized;
5665
+ };
5666
+ const normalizeObjectSlots = (rawSlots, slots, instance) => {
5667
+ const ctx = rawSlots._ctx;
5668
+ for (const key in rawSlots) {
5669
+ if (isInternalKey(key))
5670
+ continue;
5671
+ const value = rawSlots[key];
5672
+ if (isFunction(value)) {
5673
+ slots[key] = normalizeSlot(key, value, ctx);
5674
+ } else if (value != null) {
5675
+ {
5676
+ warn(
5677
+ `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
5678
+ );
5679
+ }
5680
+ const normalized = normalizeSlotValue(value);
5681
+ slots[key] = () => normalized;
5682
+ }
5683
+ }
5684
+ };
5685
+ const normalizeVNodeSlots = (instance, children) => {
5686
+ if (!isKeepAlive(instance.vnode) && true) {
5687
+ warn(
5688
+ `Non-function value encountered for default slot. Prefer function slots for better performance.`
5689
+ );
5690
+ }
5691
+ const normalized = normalizeSlotValue(children);
5692
+ instance.slots.default = () => normalized;
5693
+ };
5694
+ const initSlots = (instance, children) => {
5695
+ if (instance.vnode.shapeFlag & 32) {
5696
+ const type = children._;
5697
+ if (type) {
5698
+ instance.slots = toRaw(children);
5699
+ def(children, "_", type);
5700
+ } else {
5701
+ normalizeObjectSlots(
5702
+ children,
5703
+ instance.slots = {});
5704
+ }
5705
+ } else {
5706
+ instance.slots = {};
5707
+ if (children) {
5708
+ normalizeVNodeSlots(instance, children);
5709
+ }
5710
+ }
5711
+ def(instance.slots, InternalObjectKey, 1);
5712
+ };
5713
+ const updateSlots = (instance, children, optimized) => {
5714
+ const { vnode, slots } = instance;
5715
+ let needDeletionCheck = true;
5716
+ let deletionComparisonTarget = EMPTY_OBJ;
5717
+ if (vnode.shapeFlag & 32) {
5718
+ const type = children._;
5719
+ if (type) {
5720
+ if (isHmrUpdating) {
5721
+ extend(slots, children);
5722
+ } else if (optimized && type === 1) {
5723
+ needDeletionCheck = false;
5724
+ } else {
5725
+ extend(slots, children);
5726
+ if (!optimized && type === 1) {
5727
+ delete slots._;
5728
+ }
5729
+ }
5730
+ } else {
5731
+ needDeletionCheck = !children.$stable;
5732
+ normalizeObjectSlots(children, slots);
5733
+ }
5734
+ deletionComparisonTarget = children;
5735
+ } else if (children) {
5736
+ normalizeVNodeSlots(instance, children);
5737
+ deletionComparisonTarget = { default: 1 };
5738
+ }
5739
+ if (needDeletionCheck) {
5740
+ for (const key in slots) {
5741
+ if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {
5742
+ delete slots[key];
5743
+ }
5744
+ }
5745
+ }
5746
+ };
5541
5747
 
5542
5748
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
5543
5749
  if (isArray(rawRef)) {
@@ -7807,10 +8013,10 @@ If you want to remount the same app, move your app creation logic into a factory
7807
8013
  }
7808
8014
  }
7809
8015
 
7810
- const Fragment = Symbol("Fragment" );
7811
- const Text = Symbol("Text" );
7812
- const Comment = Symbol("Comment" );
7813
- const Static = Symbol("Static" );
8016
+ const Fragment = Symbol.for("v-fgt");
8017
+ const Text = Symbol.for("v-txt");
8018
+ const Comment = Symbol.for("v-cmt");
8019
+ const Static = Symbol.for("v-stc");
7814
8020
  const blockStack = [];
7815
8021
  let currentBlock = null;
7816
8022
  function openBlock(disableTracking = false) {
@@ -8262,13 +8468,19 @@ Component that was made reactive: `,
8262
8468
  }
8263
8469
  let currentInstance = null;
8264
8470
  const getCurrentInstance = () => currentInstance || currentRenderingInstance;
8471
+ let internalSetCurrentInstance;
8472
+ {
8473
+ internalSetCurrentInstance = (i) => {
8474
+ currentInstance = i;
8475
+ };
8476
+ }
8265
8477
  const setCurrentInstance = (instance) => {
8266
- currentInstance = instance;
8478
+ internalSetCurrentInstance(instance);
8267
8479
  instance.scope.on();
8268
8480
  };
8269
8481
  const unsetCurrentInstance = () => {
8270
8482
  currentInstance && currentInstance.scope.off();
8271
- currentInstance = null;
8483
+ internalSetCurrentInstance(null);
8272
8484
  };
8273
8485
  const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
8274
8486
  function validateComponentName(name, config) {
@@ -8557,96 +8769,6 @@ Component that was made reactive: `,
8557
8769
  return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
8558
8770
  };
8559
8771
 
8560
- const warnRuntimeUsage = (method) => warn(
8561
- `${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.`
8562
- );
8563
- function defineProps() {
8564
- {
8565
- warnRuntimeUsage(`defineProps`);
8566
- }
8567
- return null;
8568
- }
8569
- function defineEmits() {
8570
- {
8571
- warnRuntimeUsage(`defineEmits`);
8572
- }
8573
- return null;
8574
- }
8575
- function defineExpose(exposed) {
8576
- {
8577
- warnRuntimeUsage(`defineExpose`);
8578
- }
8579
- }
8580
- function withDefaults(props, defaults) {
8581
- {
8582
- warnRuntimeUsage(`withDefaults`);
8583
- }
8584
- return null;
8585
- }
8586
- function useSlots() {
8587
- return getContext().slots;
8588
- }
8589
- function useAttrs() {
8590
- return getContext().attrs;
8591
- }
8592
- function getContext() {
8593
- const i = getCurrentInstance();
8594
- if (!i) {
8595
- warn(`useContext() called without active instance.`);
8596
- }
8597
- return i.setupContext || (i.setupContext = createSetupContext(i));
8598
- }
8599
- function mergeDefaults(raw, defaults) {
8600
- const props = isArray(raw) ? raw.reduce(
8601
- (normalized, p) => (normalized[p] = {}, normalized),
8602
- {}
8603
- ) : raw;
8604
- for (const key in defaults) {
8605
- const opt = props[key];
8606
- if (opt) {
8607
- if (isArray(opt) || isFunction(opt)) {
8608
- props[key] = { type: opt, default: defaults[key] };
8609
- } else {
8610
- opt.default = defaults[key];
8611
- }
8612
- } else if (opt === null) {
8613
- props[key] = { default: defaults[key] };
8614
- } else {
8615
- warn(`props default key "${key}" has no corresponding declaration.`);
8616
- }
8617
- }
8618
- return props;
8619
- }
8620
- function createPropsRestProxy(props, excludedKeys) {
8621
- const ret = {};
8622
- for (const key in props) {
8623
- if (!excludedKeys.includes(key)) {
8624
- Object.defineProperty(ret, key, {
8625
- enumerable: true,
8626
- get: () => props[key]
8627
- });
8628
- }
8629
- }
8630
- return ret;
8631
- }
8632
- function withAsyncContext(getAwaitable) {
8633
- const ctx = getCurrentInstance();
8634
- if (!ctx) {
8635
- warn(
8636
- `withAsyncContext called without active current instance. This is likely a bug.`
8637
- );
8638
- }
8639
- let awaitable = getAwaitable();
8640
- unsetCurrentInstance();
8641
- if (isPromise(awaitable)) {
8642
- awaitable = awaitable.catch((e) => {
8643
- setCurrentInstance(ctx);
8644
- throw e;
8645
- });
8646
- }
8647
- return [awaitable, () => setCurrentInstance(ctx)];
8648
- }
8649
-
8650
8772
  function h(type, propsOrChildren, children) {
8651
8773
  const l = arguments.length;
8652
8774
  if (l === 2) {
@@ -8668,7 +8790,7 @@ Component that was made reactive: `,
8668
8790
  }
8669
8791
  }
8670
8792
 
8671
- const ssrContextKey = Symbol(`ssrContext` );
8793
+ const ssrContextKey = Symbol.for("v-scx");
8672
8794
  const useSSRContext = () => {
8673
8795
  {
8674
8796
  warn(`useSSRContext() is not supported in the global build.`);
@@ -8876,7 +8998,7 @@ Component that was made reactive: `,
8876
8998
  return true;
8877
8999
  }
8878
9000
 
8879
- const version = "3.3.0-alpha.1";
9001
+ const version = "3.3.0-alpha.11";
8880
9002
  const ssrUtils = null;
8881
9003
  const resolveFilter = null;
8882
9004
  const compatUtils = null;
@@ -10374,8 +10496,11 @@ Component that was made reactive: `,
10374
10496
  exports.defineCustomElement = defineCustomElement;
10375
10497
  exports.defineEmits = defineEmits;
10376
10498
  exports.defineExpose = defineExpose;
10499
+ exports.defineModel = defineModel;
10500
+ exports.defineOptions = defineOptions;
10377
10501
  exports.defineProps = defineProps;
10378
10502
  exports.defineSSRCustomElement = defineSSRCustomElement;
10503
+ exports.defineSlots = defineSlots;
10379
10504
  exports.effect = effect;
10380
10505
  exports.effectScope = effectScope;
10381
10506
  exports.getCurrentInstance = getCurrentInstance;
@@ -10398,6 +10523,7 @@ Component that was made reactive: `,
10398
10523
  exports.isVNode = isVNode;
10399
10524
  exports.markRaw = markRaw;
10400
10525
  exports.mergeDefaults = mergeDefaults;
10526
+ exports.mergeModels = mergeModels;
10401
10527
  exports.mergeProps = mergeProps;
10402
10528
  exports.nextTick = nextTick;
10403
10529
  exports.normalizeClass = normalizeClass;
@@ -10449,12 +10575,14 @@ Component that was made reactive: `,
10449
10575
  exports.toRaw = toRaw;
10450
10576
  exports.toRef = toRef;
10451
10577
  exports.toRefs = toRefs;
10578
+ exports.toValue = toValue;
10452
10579
  exports.transformVNodeArgs = transformVNodeArgs;
10453
10580
  exports.triggerRef = triggerRef;
10454
10581
  exports.unref = unref;
10455
10582
  exports.useAttrs = useAttrs;
10456
10583
  exports.useCssModule = useCssModule;
10457
10584
  exports.useCssVars = useCssVars;
10585
+ exports.useModel = useModel;
10458
10586
  exports.useSSRContext = useSSRContext;
10459
10587
  exports.useSlots = useSlots;
10460
10588
  exports.useTransitionState = useTransitionState;