@vue/compat 3.6.0-alpha.3 → 3.6.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +195 -123
- package/dist/vue.cjs.prod.js +158 -102
- package/dist/vue.esm-browser.js +192 -117
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +195 -121
- package/dist/vue.global.js +188 -113
- package/dist/vue.global.prod.js +9 -9
- package/dist/vue.runtime.esm-browser.js +192 -117
- package/dist/vue.runtime.esm-browser.prod.js +8 -8
- package/dist/vue.runtime.esm-bundler.js +195 -121
- package/dist/vue.runtime.global.js +188 -113
- package/dist/vue.runtime.global.prod.js +9 -9
- package/package.json +2 -2
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-alpha.
|
|
2
|
+
* @vue/compat v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -81,6 +81,9 @@ const toHandlerKey = cacheStringFunction(
|
|
|
81
81
|
return s;
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
|
+
const getModifierPropName = (name) => {
|
|
85
|
+
return `${name === "modelValue" || name === "model-value" ? "model" : name}Modifiers${name === "model" ? "$" : ""}`;
|
|
86
|
+
};
|
|
84
87
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
85
88
|
const invokeArrayFns = (fns, ...arg) => {
|
|
86
89
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -2911,7 +2914,12 @@ function reload(id, newComp) {
|
|
|
2911
2914
|
newComp = normalizeClassComponent(newComp);
|
|
2912
2915
|
updateComponentDef(record.initialDef, newComp);
|
|
2913
2916
|
const instances = [...record.instances];
|
|
2914
|
-
if (newComp.__vapor) {
|
|
2917
|
+
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2918
|
+
for (const instance of instances) {
|
|
2919
|
+
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
2920
|
+
instance.root.ce._removeChildStyle(instance.type);
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2915
2923
|
for (const instance of instances) {
|
|
2916
2924
|
instance.hmrReload(newComp);
|
|
2917
2925
|
}
|
|
@@ -7638,7 +7646,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7638
7646
|
return vm;
|
|
7639
7647
|
}
|
|
7640
7648
|
}
|
|
7641
|
-
Vue.version = `2.6.14-compat:${"3.6.0-alpha.
|
|
7649
|
+
Vue.version = `2.6.14-compat:${"3.6.0-alpha.4"}`;
|
|
7642
7650
|
Vue.config = singletonApp.config;
|
|
7643
7651
|
Vue.use = (plugin, ...options) => {
|
|
7644
7652
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -10843,7 +10851,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
10843
10851
|
return res;
|
|
10844
10852
|
}
|
|
10845
10853
|
const getModelModifiers = (props, modelName, getter) => {
|
|
10846
|
-
return
|
|
10854
|
+
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
10847
10855
|
};
|
|
10848
10856
|
|
|
10849
10857
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -12397,6 +12405,25 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
12397
12405
|
simpleSetCurrentInstance(instance);
|
|
12398
12406
|
}
|
|
12399
12407
|
};
|
|
12408
|
+
const internalOptions = ["ce", "type"];
|
|
12409
|
+
const useInstanceOption = (key, silent = false) => {
|
|
12410
|
+
const instance = getCurrentGenericInstance();
|
|
12411
|
+
if (!instance) {
|
|
12412
|
+
if (!silent) {
|
|
12413
|
+
warn$1(`useInstanceOption called without an active component instance.`);
|
|
12414
|
+
}
|
|
12415
|
+
return { hasInstance: false, value: void 0 };
|
|
12416
|
+
}
|
|
12417
|
+
if (!internalOptions.includes(key)) {
|
|
12418
|
+
{
|
|
12419
|
+
warn$1(
|
|
12420
|
+
`useInstanceOption only accepts ${internalOptions.map((k) => `'${k}'`).join(", ")} as key, got '${key}'.`
|
|
12421
|
+
);
|
|
12422
|
+
}
|
|
12423
|
+
return { hasInstance: true, value: void 0 };
|
|
12424
|
+
}
|
|
12425
|
+
return { hasInstance: true, value: instance[key] };
|
|
12426
|
+
};
|
|
12400
12427
|
|
|
12401
12428
|
const emptyAppContext = createAppContext();
|
|
12402
12429
|
let uid = 0;
|
|
@@ -13043,7 +13070,7 @@ function isMemoSame(cached, memo) {
|
|
|
13043
13070
|
return true;
|
|
13044
13071
|
}
|
|
13045
13072
|
|
|
13046
|
-
const version = "3.6.0-alpha.
|
|
13073
|
+
const version = "3.6.0-alpha.4";
|
|
13047
13074
|
const warn = warn$1 ;
|
|
13048
13075
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
13049
13076
|
const devtools = devtools$1 ;
|
|
@@ -13974,12 +14001,9 @@ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOption
|
|
|
13974
14001
|
});
|
|
13975
14002
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
13976
14003
|
};
|
|
13977
|
-
class
|
|
13978
|
-
constructor(
|
|
14004
|
+
class VueElementBase extends BaseClass {
|
|
14005
|
+
constructor(def, props = {}, createAppFn) {
|
|
13979
14006
|
super();
|
|
13980
|
-
this._def = _def;
|
|
13981
|
-
this._props = _props;
|
|
13982
|
-
this._createApp = _createApp;
|
|
13983
14007
|
this._isVueCE = true;
|
|
13984
14008
|
/**
|
|
13985
14009
|
* @internal
|
|
@@ -13989,28 +14013,23 @@ class VueElement extends BaseClass {
|
|
|
13989
14013
|
* @internal
|
|
13990
14014
|
*/
|
|
13991
14015
|
this._app = null;
|
|
13992
|
-
/**
|
|
13993
|
-
* @internal
|
|
13994
|
-
*/
|
|
13995
|
-
this._nonce = this._def.nonce;
|
|
13996
14016
|
this._connected = false;
|
|
13997
14017
|
this._resolved = false;
|
|
13998
|
-
this._patching = false;
|
|
13999
|
-
this._dirty = false;
|
|
14000
14018
|
this._numberProps = null;
|
|
14001
14019
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
14020
|
+
this._patching = false;
|
|
14021
|
+
this._dirty = false;
|
|
14002
14022
|
this._ob = null;
|
|
14003
|
-
|
|
14023
|
+
this._def = def;
|
|
14024
|
+
this._props = props;
|
|
14025
|
+
this._createApp = createAppFn;
|
|
14026
|
+
this._nonce = def.nonce;
|
|
14027
|
+
if (this._needsHydration()) {
|
|
14004
14028
|
this._root = this.shadowRoot;
|
|
14005
14029
|
} else {
|
|
14006
|
-
if (
|
|
14007
|
-
warn(
|
|
14008
|
-
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
14009
|
-
);
|
|
14010
|
-
}
|
|
14011
|
-
if (_def.shadowRoot !== false) {
|
|
14030
|
+
if (def.shadowRoot !== false) {
|
|
14012
14031
|
this.attachShadow(
|
|
14013
|
-
extend({},
|
|
14032
|
+
extend({}, def.shadowRootOptions, {
|
|
14014
14033
|
mode: "open"
|
|
14015
14034
|
})
|
|
14016
14035
|
);
|
|
@@ -14028,14 +14047,14 @@ class VueElement extends BaseClass {
|
|
|
14028
14047
|
this._connected = true;
|
|
14029
14048
|
let parent = this;
|
|
14030
14049
|
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
14031
|
-
if (parent instanceof
|
|
14050
|
+
if (parent instanceof VueElementBase) {
|
|
14032
14051
|
this._parent = parent;
|
|
14033
14052
|
break;
|
|
14034
14053
|
}
|
|
14035
14054
|
}
|
|
14036
14055
|
if (!this._instance) {
|
|
14037
14056
|
if (this._resolved) {
|
|
14038
|
-
this.
|
|
14057
|
+
this._mountComponent(this._def);
|
|
14039
14058
|
} else {
|
|
14040
14059
|
if (parent && parent._pendingResolve) {
|
|
14041
14060
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -14048,20 +14067,6 @@ class VueElement extends BaseClass {
|
|
|
14048
14067
|
}
|
|
14049
14068
|
}
|
|
14050
14069
|
}
|
|
14051
|
-
_setParent(parent = this._parent) {
|
|
14052
|
-
if (parent) {
|
|
14053
|
-
this._instance.parent = parent._instance;
|
|
14054
|
-
this._inheritParentContext(parent);
|
|
14055
|
-
}
|
|
14056
|
-
}
|
|
14057
|
-
_inheritParentContext(parent = this._parent) {
|
|
14058
|
-
if (parent && this._app) {
|
|
14059
|
-
Object.setPrototypeOf(
|
|
14060
|
-
this._app._context.provides,
|
|
14061
|
-
parent._instance.provides
|
|
14062
|
-
);
|
|
14063
|
-
}
|
|
14064
|
-
}
|
|
14065
14070
|
disconnectedCallback() {
|
|
14066
14071
|
this._connected = false;
|
|
14067
14072
|
nextTick(() => {
|
|
@@ -14070,9 +14075,7 @@ class VueElement extends BaseClass {
|
|
|
14070
14075
|
this._ob.disconnect();
|
|
14071
14076
|
this._ob = null;
|
|
14072
14077
|
}
|
|
14073
|
-
this.
|
|
14074
|
-
if (this._instance) this._instance.ce = void 0;
|
|
14075
|
-
this._app = this._instance = null;
|
|
14078
|
+
this._unmount();
|
|
14076
14079
|
if (this._teleportTargets) {
|
|
14077
14080
|
this._teleportTargets.clear();
|
|
14078
14081
|
this._teleportTargets = void 0;
|
|
@@ -14080,6 +14083,20 @@ class VueElement extends BaseClass {
|
|
|
14080
14083
|
}
|
|
14081
14084
|
});
|
|
14082
14085
|
}
|
|
14086
|
+
_setParent(parent = this._parent) {
|
|
14087
|
+
if (parent && this._instance) {
|
|
14088
|
+
this._instance.parent = parent._instance;
|
|
14089
|
+
this._inheritParentContext(parent);
|
|
14090
|
+
}
|
|
14091
|
+
}
|
|
14092
|
+
_inheritParentContext(parent = this._parent) {
|
|
14093
|
+
if (parent && this._app) {
|
|
14094
|
+
Object.setPrototypeOf(
|
|
14095
|
+
this._app._context.provides,
|
|
14096
|
+
parent._instance.provides
|
|
14097
|
+
);
|
|
14098
|
+
}
|
|
14099
|
+
}
|
|
14083
14100
|
_processMutations(mutations) {
|
|
14084
14101
|
for (const m of mutations) {
|
|
14085
14102
|
this._setAttr(m.attributeName);
|
|
@@ -14097,7 +14114,7 @@ class VueElement extends BaseClass {
|
|
|
14097
14114
|
}
|
|
14098
14115
|
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
14099
14116
|
this._ob.observe(this, { attributes: true });
|
|
14100
|
-
const resolve = (def
|
|
14117
|
+
const resolve = (def) => {
|
|
14101
14118
|
this._resolved = true;
|
|
14102
14119
|
this._pendingResolve = void 0;
|
|
14103
14120
|
const { props, styles } = def;
|
|
@@ -14122,29 +14139,25 @@ class VueElement extends BaseClass {
|
|
|
14122
14139
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
14123
14140
|
);
|
|
14124
14141
|
}
|
|
14125
|
-
this.
|
|
14142
|
+
this._mountComponent(def);
|
|
14126
14143
|
};
|
|
14127
14144
|
const asyncDef = this._def.__asyncLoader;
|
|
14128
14145
|
if (asyncDef) {
|
|
14146
|
+
const { configureApp } = this._def;
|
|
14129
14147
|
this._pendingResolve = asyncDef().then((def) => {
|
|
14130
|
-
def.configureApp =
|
|
14131
|
-
|
|
14148
|
+
def.configureApp = configureApp;
|
|
14149
|
+
this._def = def;
|
|
14150
|
+
resolve(def);
|
|
14132
14151
|
});
|
|
14133
14152
|
} else {
|
|
14134
14153
|
resolve(this._def);
|
|
14135
14154
|
}
|
|
14136
14155
|
}
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
this._inheritParentContext();
|
|
14143
|
-
if (def.configureApp) {
|
|
14144
|
-
def.configureApp(this._app);
|
|
14145
|
-
}
|
|
14146
|
-
this._app._ceVNode = this._createVNode();
|
|
14147
|
-
this._app.mount(this._root);
|
|
14156
|
+
_mountComponent(def) {
|
|
14157
|
+
this._mount(def);
|
|
14158
|
+
this._processExposed();
|
|
14159
|
+
}
|
|
14160
|
+
_processExposed() {
|
|
14148
14161
|
const exposed = this._instance && this._instance.exposed;
|
|
14149
14162
|
if (!exposed) return;
|
|
14150
14163
|
for (const key in exposed) {
|
|
@@ -14158,6 +14171,38 @@ class VueElement extends BaseClass {
|
|
|
14158
14171
|
}
|
|
14159
14172
|
}
|
|
14160
14173
|
}
|
|
14174
|
+
_processInstance() {
|
|
14175
|
+
this._instance.ce = this;
|
|
14176
|
+
this._instance.isCE = true;
|
|
14177
|
+
{
|
|
14178
|
+
this._instance.ceReload = (newStyles) => {
|
|
14179
|
+
if (this._styles) {
|
|
14180
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
14181
|
+
this._styles.length = 0;
|
|
14182
|
+
}
|
|
14183
|
+
this._applyStyles(newStyles);
|
|
14184
|
+
if (!this._instance.vapor) {
|
|
14185
|
+
this._instance = null;
|
|
14186
|
+
}
|
|
14187
|
+
this._update();
|
|
14188
|
+
};
|
|
14189
|
+
}
|
|
14190
|
+
const dispatch = (event, args) => {
|
|
14191
|
+
this.dispatchEvent(
|
|
14192
|
+
new CustomEvent(
|
|
14193
|
+
event,
|
|
14194
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
14195
|
+
)
|
|
14196
|
+
);
|
|
14197
|
+
};
|
|
14198
|
+
this._instance.emit = (event, ...args) => {
|
|
14199
|
+
dispatch(event, args);
|
|
14200
|
+
if (hyphenate(event) !== event) {
|
|
14201
|
+
dispatch(hyphenate(event), args);
|
|
14202
|
+
}
|
|
14203
|
+
};
|
|
14204
|
+
this._setParent();
|
|
14205
|
+
}
|
|
14161
14206
|
_resolveProps(def) {
|
|
14162
14207
|
const { props } = def;
|
|
14163
14208
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
@@ -14203,7 +14248,7 @@ class VueElement extends BaseClass {
|
|
|
14203
14248
|
delete this._props[key];
|
|
14204
14249
|
} else {
|
|
14205
14250
|
this._props[key] = val;
|
|
14206
|
-
if (key === "key" && this._app) {
|
|
14251
|
+
if (key === "key" && this._app && this._app._ceVNode) {
|
|
14207
14252
|
this._app._ceVNode.key = val;
|
|
14208
14253
|
}
|
|
14209
14254
|
}
|
|
@@ -14227,52 +14272,6 @@ class VueElement extends BaseClass {
|
|
|
14227
14272
|
}
|
|
14228
14273
|
}
|
|
14229
14274
|
}
|
|
14230
|
-
_update() {
|
|
14231
|
-
const vnode = this._createVNode();
|
|
14232
|
-
if (this._app) vnode.appContext = this._app._context;
|
|
14233
|
-
render(vnode, this._root);
|
|
14234
|
-
}
|
|
14235
|
-
_createVNode() {
|
|
14236
|
-
const baseProps = {};
|
|
14237
|
-
if (!this.shadowRoot) {
|
|
14238
|
-
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
14239
|
-
}
|
|
14240
|
-
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
14241
|
-
if (!this._instance) {
|
|
14242
|
-
vnode.ce = (instance) => {
|
|
14243
|
-
this._instance = instance;
|
|
14244
|
-
instance.ce = this;
|
|
14245
|
-
instance.isCE = true;
|
|
14246
|
-
{
|
|
14247
|
-
instance.ceReload = (newStyles) => {
|
|
14248
|
-
if (this._styles) {
|
|
14249
|
-
this._styles.forEach((s) => this._root.removeChild(s));
|
|
14250
|
-
this._styles.length = 0;
|
|
14251
|
-
}
|
|
14252
|
-
this._applyStyles(newStyles);
|
|
14253
|
-
this._instance = null;
|
|
14254
|
-
this._update();
|
|
14255
|
-
};
|
|
14256
|
-
}
|
|
14257
|
-
const dispatch = (event, args) => {
|
|
14258
|
-
this.dispatchEvent(
|
|
14259
|
-
new CustomEvent(
|
|
14260
|
-
event,
|
|
14261
|
-
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
14262
|
-
)
|
|
14263
|
-
);
|
|
14264
|
-
};
|
|
14265
|
-
instance.emit = (event, ...args) => {
|
|
14266
|
-
dispatch(event, args);
|
|
14267
|
-
if (hyphenate(event) !== event) {
|
|
14268
|
-
dispatch(hyphenate(event), args);
|
|
14269
|
-
}
|
|
14270
|
-
};
|
|
14271
|
-
this._setParent();
|
|
14272
|
-
};
|
|
14273
|
-
}
|
|
14274
|
-
return vnode;
|
|
14275
|
-
}
|
|
14276
14275
|
_applyStyles(styles, owner) {
|
|
14277
14276
|
if (!styles) return;
|
|
14278
14277
|
if (owner) {
|
|
@@ -14321,11 +14320,13 @@ class VueElement extends BaseClass {
|
|
|
14321
14320
|
_renderSlots() {
|
|
14322
14321
|
const outlets = this._getSlots();
|
|
14323
14322
|
const scopeId = this._instance.type.__scopeId;
|
|
14323
|
+
const slotReplacements = /* @__PURE__ */ new Map();
|
|
14324
14324
|
for (let i = 0; i < outlets.length; i++) {
|
|
14325
14325
|
const o = outlets[i];
|
|
14326
14326
|
const slotName = o.getAttribute("name") || "default";
|
|
14327
14327
|
const content = this._slots[slotName];
|
|
14328
14328
|
const parent = o.parentNode;
|
|
14329
|
+
const replacementNodes = [];
|
|
14329
14330
|
if (content) {
|
|
14330
14331
|
for (const n of content) {
|
|
14331
14332
|
if (scopeId && n.nodeType === 1) {
|
|
@@ -14338,12 +14339,19 @@ class VueElement extends BaseClass {
|
|
|
14338
14339
|
}
|
|
14339
14340
|
}
|
|
14340
14341
|
parent.insertBefore(n, o);
|
|
14342
|
+
replacementNodes.push(n);
|
|
14341
14343
|
}
|
|
14342
14344
|
} else {
|
|
14343
|
-
while (o.firstChild)
|
|
14345
|
+
while (o.firstChild) {
|
|
14346
|
+
const child = o.firstChild;
|
|
14347
|
+
parent.insertBefore(child, o);
|
|
14348
|
+
replacementNodes.push(child);
|
|
14349
|
+
}
|
|
14344
14350
|
}
|
|
14345
14351
|
parent.removeChild(o);
|
|
14352
|
+
slotReplacements.set(o, replacementNodes);
|
|
14346
14353
|
}
|
|
14354
|
+
this._updateSlotNodes(slotReplacements);
|
|
14347
14355
|
}
|
|
14348
14356
|
/**
|
|
14349
14357
|
* @internal
|
|
@@ -14400,13 +14408,76 @@ class VueElement extends BaseClass {
|
|
|
14400
14408
|
}
|
|
14401
14409
|
}
|
|
14402
14410
|
}
|
|
14411
|
+
class VueElement extends VueElementBase {
|
|
14412
|
+
constructor(def, props = {}, createAppFn = createApp) {
|
|
14413
|
+
super(def, props, createAppFn);
|
|
14414
|
+
}
|
|
14415
|
+
_needsHydration() {
|
|
14416
|
+
if (this.shadowRoot && this._createApp !== createApp) {
|
|
14417
|
+
return true;
|
|
14418
|
+
} else {
|
|
14419
|
+
if (this.shadowRoot) {
|
|
14420
|
+
warn(
|
|
14421
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
14422
|
+
);
|
|
14423
|
+
}
|
|
14424
|
+
}
|
|
14425
|
+
return false;
|
|
14426
|
+
}
|
|
14427
|
+
_mount(def) {
|
|
14428
|
+
if (!def.name) {
|
|
14429
|
+
def.name = "VueElement";
|
|
14430
|
+
}
|
|
14431
|
+
this._app = this._createApp(def);
|
|
14432
|
+
this._inheritParentContext();
|
|
14433
|
+
if (def.configureApp) {
|
|
14434
|
+
def.configureApp(this._app);
|
|
14435
|
+
}
|
|
14436
|
+
this._app._ceVNode = this._createVNode();
|
|
14437
|
+
this._app.mount(this._root);
|
|
14438
|
+
}
|
|
14439
|
+
_update() {
|
|
14440
|
+
if (!this._app) return;
|
|
14441
|
+
const vnode = this._createVNode();
|
|
14442
|
+
vnode.appContext = this._app._context;
|
|
14443
|
+
render(vnode, this._root);
|
|
14444
|
+
}
|
|
14445
|
+
_unmount() {
|
|
14446
|
+
if (this._app) {
|
|
14447
|
+
this._app.unmount();
|
|
14448
|
+
}
|
|
14449
|
+
if (this._instance && this._instance.ce) {
|
|
14450
|
+
this._instance.ce = void 0;
|
|
14451
|
+
}
|
|
14452
|
+
this._app = this._instance = null;
|
|
14453
|
+
}
|
|
14454
|
+
/**
|
|
14455
|
+
* Only called when shadowRoot is false
|
|
14456
|
+
*/
|
|
14457
|
+
_updateSlotNodes(replacements) {
|
|
14458
|
+
}
|
|
14459
|
+
_createVNode() {
|
|
14460
|
+
const baseProps = {};
|
|
14461
|
+
if (!this.shadowRoot) {
|
|
14462
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
14463
|
+
}
|
|
14464
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
14465
|
+
if (!this._instance) {
|
|
14466
|
+
vnode.ce = (instance) => {
|
|
14467
|
+
this._instance = instance;
|
|
14468
|
+
this._processInstance();
|
|
14469
|
+
};
|
|
14470
|
+
}
|
|
14471
|
+
return vnode;
|
|
14472
|
+
}
|
|
14473
|
+
}
|
|
14403
14474
|
function useHost(caller) {
|
|
14404
|
-
const
|
|
14405
|
-
const el =
|
|
14475
|
+
const { hasInstance, value } = useInstanceOption("ce", true);
|
|
14476
|
+
const el = value;
|
|
14406
14477
|
if (el) {
|
|
14407
14478
|
return el;
|
|
14408
14479
|
} else {
|
|
14409
|
-
if (!
|
|
14480
|
+
if (!hasInstance) {
|
|
14410
14481
|
warn(
|
|
14411
14482
|
`${caller || "useHost"} called without an active component instance.`
|
|
14412
14483
|
);
|
|
@@ -14425,12 +14496,12 @@ function useShadowRoot() {
|
|
|
14425
14496
|
|
|
14426
14497
|
function useCssModule(name = "$style") {
|
|
14427
14498
|
{
|
|
14428
|
-
const
|
|
14429
|
-
if (!
|
|
14499
|
+
const { hasInstance, value: type } = useInstanceOption("type", true);
|
|
14500
|
+
if (!hasInstance) {
|
|
14430
14501
|
warn(`useCssModule must be called inside setup()`);
|
|
14431
14502
|
return EMPTY_OBJ;
|
|
14432
14503
|
}
|
|
14433
|
-
const modules =
|
|
14504
|
+
const modules = type.__cssModules;
|
|
14434
14505
|
if (!modules) {
|
|
14435
14506
|
warn(`Current instance does not have CSS modules injected.`);
|
|
14436
14507
|
return EMPTY_OBJ;
|
|
@@ -15165,6 +15236,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15165
15236
|
TransitionGroup: TransitionGroup,
|
|
15166
15237
|
TriggerOpTypes: TriggerOpTypes,
|
|
15167
15238
|
VueElement: VueElement,
|
|
15239
|
+
VueElementBase: VueElementBase,
|
|
15168
15240
|
assertNumber: assertNumber,
|
|
15169
15241
|
callWithAsyncErrorHandling: callWithAsyncErrorHandling,
|
|
15170
15242
|
callWithErrorHandling: callWithErrorHandling,
|
|
@@ -15229,6 +15301,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15229
15301
|
mergeModels: mergeModels,
|
|
15230
15302
|
mergeProps: mergeProps,
|
|
15231
15303
|
nextTick: nextTick,
|
|
15304
|
+
nodeOps: nodeOps,
|
|
15232
15305
|
normalizeClass: normalizeClass,
|
|
15233
15306
|
normalizeProps: normalizeProps,
|
|
15234
15307
|
normalizeStyle: normalizeStyle,
|
|
@@ -15247,6 +15320,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15247
15320
|
onUpdated: onUpdated,
|
|
15248
15321
|
onWatcherCleanup: onWatcherCleanup,
|
|
15249
15322
|
openBlock: openBlock,
|
|
15323
|
+
patchProp: patchProp,
|
|
15250
15324
|
popScopeId: popScopeId,
|
|
15251
15325
|
provide: provide,
|
|
15252
15326
|
proxyRefs: proxyRefs,
|
|
@@ -15288,6 +15362,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
15288
15362
|
useCssVars: useCssVars,
|
|
15289
15363
|
useHost: useHost,
|
|
15290
15364
|
useId: useId,
|
|
15365
|
+
useInstanceOption: useInstanceOption,
|
|
15291
15366
|
useModel: useModel,
|
|
15292
15367
|
useSSRContext: useSSRContext,
|
|
15293
15368
|
useShadowRoot: useShadowRoot,
|
|
@@ -20362,7 +20437,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
20362
20437
|
];
|
|
20363
20438
|
if (dir.modifiers.length && node.tagType === 1) {
|
|
20364
20439
|
const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
20365
|
-
const modifiersKey = arg ? isStaticExp(arg) ?
|
|
20440
|
+
const modifiersKey = arg ? isStaticExp(arg) ? getModifierPropName(arg.content) : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
|
|
20366
20441
|
props.push(
|
|
20367
20442
|
createObjectProperty(
|
|
20368
20443
|
modifiersKey,
|
|
@@ -20715,7 +20790,7 @@ const parserOptions = {
|
|
|
20715
20790
|
let ns = parent ? parent.ns : rootNamespace;
|
|
20716
20791
|
if (parent && ns === 2) {
|
|
20717
20792
|
if (parent.tag === "annotation-xml") {
|
|
20718
|
-
if (tag
|
|
20793
|
+
if (isSVGTag(tag)) {
|
|
20719
20794
|
return 1;
|
|
20720
20795
|
}
|
|
20721
20796
|
if (parent.props.some(
|
|
@@ -20732,10 +20807,10 @@ const parserOptions = {
|
|
|
20732
20807
|
}
|
|
20733
20808
|
}
|
|
20734
20809
|
if (ns === 0) {
|
|
20735
|
-
if (tag
|
|
20810
|
+
if (isSVGTag(tag)) {
|
|
20736
20811
|
return 1;
|
|
20737
20812
|
}
|
|
20738
|
-
if (tag
|
|
20813
|
+
if (isMathMLTag(tag)) {
|
|
20739
20814
|
return 2;
|
|
20740
20815
|
}
|
|
20741
20816
|
}
|
|
@@ -21358,4 +21433,4 @@ Vue.compile = compileToFunction;
|
|
|
21358
21433
|
|
|
21359
21434
|
const configureCompat = Vue.configureCompat;
|
|
21360
21435
|
|
|
21361
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
21436
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|