vue 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 +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +191 -116
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +187 -112
- package/dist/vue.global.prod.js +9 -9
- package/dist/vue.runtime-with-vapor.esm-browser.js +925 -610
- package/dist/vue.runtime-with-vapor.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +183 -112
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +183 -108
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +7 -7
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.6.0-alpha.
|
|
2
|
+
* vue 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
|
}
|
|
@@ -9176,7 +9184,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9176
9184
|
return res;
|
|
9177
9185
|
}
|
|
9178
9186
|
const getModelModifiers = (props, modelName, getter) => {
|
|
9179
|
-
return
|
|
9187
|
+
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
9180
9188
|
};
|
|
9181
9189
|
|
|
9182
9190
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -10630,6 +10638,25 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
10630
10638
|
simpleSetCurrentInstance(instance);
|
|
10631
10639
|
}
|
|
10632
10640
|
};
|
|
10641
|
+
const internalOptions = ["ce", "type"];
|
|
10642
|
+
const useInstanceOption = (key, silent = false) => {
|
|
10643
|
+
const instance = getCurrentGenericInstance();
|
|
10644
|
+
if (!instance) {
|
|
10645
|
+
if (!silent) {
|
|
10646
|
+
warn$1(`useInstanceOption called without an active component instance.`);
|
|
10647
|
+
}
|
|
10648
|
+
return { hasInstance: false, value: void 0 };
|
|
10649
|
+
}
|
|
10650
|
+
if (!internalOptions.includes(key)) {
|
|
10651
|
+
{
|
|
10652
|
+
warn$1(
|
|
10653
|
+
`useInstanceOption only accepts ${internalOptions.map((k) => `'${k}'`).join(", ")} as key, got '${key}'.`
|
|
10654
|
+
);
|
|
10655
|
+
}
|
|
10656
|
+
return { hasInstance: true, value: void 0 };
|
|
10657
|
+
}
|
|
10658
|
+
return { hasInstance: true, value: instance[key] };
|
|
10659
|
+
};
|
|
10633
10660
|
|
|
10634
10661
|
const emptyAppContext = createAppContext();
|
|
10635
10662
|
let uid = 0;
|
|
@@ -11264,7 +11291,7 @@ function isMemoSame(cached, memo) {
|
|
|
11264
11291
|
return true;
|
|
11265
11292
|
}
|
|
11266
11293
|
|
|
11267
|
-
const version = "3.6.0-alpha.
|
|
11294
|
+
const version = "3.6.0-alpha.4";
|
|
11268
11295
|
const warn = warn$1 ;
|
|
11269
11296
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11270
11297
|
const devtools = devtools$1 ;
|
|
@@ -12107,12 +12134,9 @@ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOption
|
|
|
12107
12134
|
});
|
|
12108
12135
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
12109
12136
|
};
|
|
12110
|
-
class
|
|
12111
|
-
constructor(
|
|
12137
|
+
class VueElementBase extends BaseClass {
|
|
12138
|
+
constructor(def, props = {}, createAppFn) {
|
|
12112
12139
|
super();
|
|
12113
|
-
this._def = _def;
|
|
12114
|
-
this._props = _props;
|
|
12115
|
-
this._createApp = _createApp;
|
|
12116
12140
|
this._isVueCE = true;
|
|
12117
12141
|
/**
|
|
12118
12142
|
* @internal
|
|
@@ -12122,28 +12146,23 @@ class VueElement extends BaseClass {
|
|
|
12122
12146
|
* @internal
|
|
12123
12147
|
*/
|
|
12124
12148
|
this._app = null;
|
|
12125
|
-
/**
|
|
12126
|
-
* @internal
|
|
12127
|
-
*/
|
|
12128
|
-
this._nonce = this._def.nonce;
|
|
12129
12149
|
this._connected = false;
|
|
12130
12150
|
this._resolved = false;
|
|
12131
|
-
this._patching = false;
|
|
12132
|
-
this._dirty = false;
|
|
12133
12151
|
this._numberProps = null;
|
|
12134
12152
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
12153
|
+
this._patching = false;
|
|
12154
|
+
this._dirty = false;
|
|
12135
12155
|
this._ob = null;
|
|
12136
|
-
|
|
12156
|
+
this._def = def;
|
|
12157
|
+
this._props = props;
|
|
12158
|
+
this._createApp = createAppFn;
|
|
12159
|
+
this._nonce = def.nonce;
|
|
12160
|
+
if (this._needsHydration()) {
|
|
12137
12161
|
this._root = this.shadowRoot;
|
|
12138
12162
|
} else {
|
|
12139
|
-
if (
|
|
12140
|
-
warn(
|
|
12141
|
-
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
12142
|
-
);
|
|
12143
|
-
}
|
|
12144
|
-
if (_def.shadowRoot !== false) {
|
|
12163
|
+
if (def.shadowRoot !== false) {
|
|
12145
12164
|
this.attachShadow(
|
|
12146
|
-
extend({},
|
|
12165
|
+
extend({}, def.shadowRootOptions, {
|
|
12147
12166
|
mode: "open"
|
|
12148
12167
|
})
|
|
12149
12168
|
);
|
|
@@ -12161,14 +12180,14 @@ class VueElement extends BaseClass {
|
|
|
12161
12180
|
this._connected = true;
|
|
12162
12181
|
let parent = this;
|
|
12163
12182
|
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
12164
|
-
if (parent instanceof
|
|
12183
|
+
if (parent instanceof VueElementBase) {
|
|
12165
12184
|
this._parent = parent;
|
|
12166
12185
|
break;
|
|
12167
12186
|
}
|
|
12168
12187
|
}
|
|
12169
12188
|
if (!this._instance) {
|
|
12170
12189
|
if (this._resolved) {
|
|
12171
|
-
this.
|
|
12190
|
+
this._mountComponent(this._def);
|
|
12172
12191
|
} else {
|
|
12173
12192
|
if (parent && parent._pendingResolve) {
|
|
12174
12193
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -12181,20 +12200,6 @@ class VueElement extends BaseClass {
|
|
|
12181
12200
|
}
|
|
12182
12201
|
}
|
|
12183
12202
|
}
|
|
12184
|
-
_setParent(parent = this._parent) {
|
|
12185
|
-
if (parent) {
|
|
12186
|
-
this._instance.parent = parent._instance;
|
|
12187
|
-
this._inheritParentContext(parent);
|
|
12188
|
-
}
|
|
12189
|
-
}
|
|
12190
|
-
_inheritParentContext(parent = this._parent) {
|
|
12191
|
-
if (parent && this._app) {
|
|
12192
|
-
Object.setPrototypeOf(
|
|
12193
|
-
this._app._context.provides,
|
|
12194
|
-
parent._instance.provides
|
|
12195
|
-
);
|
|
12196
|
-
}
|
|
12197
|
-
}
|
|
12198
12203
|
disconnectedCallback() {
|
|
12199
12204
|
this._connected = false;
|
|
12200
12205
|
nextTick(() => {
|
|
@@ -12203,9 +12208,7 @@ class VueElement extends BaseClass {
|
|
|
12203
12208
|
this._ob.disconnect();
|
|
12204
12209
|
this._ob = null;
|
|
12205
12210
|
}
|
|
12206
|
-
this.
|
|
12207
|
-
if (this._instance) this._instance.ce = void 0;
|
|
12208
|
-
this._app = this._instance = null;
|
|
12211
|
+
this._unmount();
|
|
12209
12212
|
if (this._teleportTargets) {
|
|
12210
12213
|
this._teleportTargets.clear();
|
|
12211
12214
|
this._teleportTargets = void 0;
|
|
@@ -12213,6 +12216,20 @@ class VueElement extends BaseClass {
|
|
|
12213
12216
|
}
|
|
12214
12217
|
});
|
|
12215
12218
|
}
|
|
12219
|
+
_setParent(parent = this._parent) {
|
|
12220
|
+
if (parent && this._instance) {
|
|
12221
|
+
this._instance.parent = parent._instance;
|
|
12222
|
+
this._inheritParentContext(parent);
|
|
12223
|
+
}
|
|
12224
|
+
}
|
|
12225
|
+
_inheritParentContext(parent = this._parent) {
|
|
12226
|
+
if (parent && this._app) {
|
|
12227
|
+
Object.setPrototypeOf(
|
|
12228
|
+
this._app._context.provides,
|
|
12229
|
+
parent._instance.provides
|
|
12230
|
+
);
|
|
12231
|
+
}
|
|
12232
|
+
}
|
|
12216
12233
|
_processMutations(mutations) {
|
|
12217
12234
|
for (const m of mutations) {
|
|
12218
12235
|
this._setAttr(m.attributeName);
|
|
@@ -12230,7 +12247,7 @@ class VueElement extends BaseClass {
|
|
|
12230
12247
|
}
|
|
12231
12248
|
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
12232
12249
|
this._ob.observe(this, { attributes: true });
|
|
12233
|
-
const resolve = (def
|
|
12250
|
+
const resolve = (def) => {
|
|
12234
12251
|
this._resolved = true;
|
|
12235
12252
|
this._pendingResolve = void 0;
|
|
12236
12253
|
const { props, styles } = def;
|
|
@@ -12255,29 +12272,25 @@ class VueElement extends BaseClass {
|
|
|
12255
12272
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
12256
12273
|
);
|
|
12257
12274
|
}
|
|
12258
|
-
this.
|
|
12275
|
+
this._mountComponent(def);
|
|
12259
12276
|
};
|
|
12260
12277
|
const asyncDef = this._def.__asyncLoader;
|
|
12261
12278
|
if (asyncDef) {
|
|
12279
|
+
const { configureApp } = this._def;
|
|
12262
12280
|
this._pendingResolve = asyncDef().then((def) => {
|
|
12263
|
-
def.configureApp =
|
|
12264
|
-
|
|
12281
|
+
def.configureApp = configureApp;
|
|
12282
|
+
this._def = def;
|
|
12283
|
+
resolve(def);
|
|
12265
12284
|
});
|
|
12266
12285
|
} else {
|
|
12267
12286
|
resolve(this._def);
|
|
12268
12287
|
}
|
|
12269
12288
|
}
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
this._inheritParentContext();
|
|
12276
|
-
if (def.configureApp) {
|
|
12277
|
-
def.configureApp(this._app);
|
|
12278
|
-
}
|
|
12279
|
-
this._app._ceVNode = this._createVNode();
|
|
12280
|
-
this._app.mount(this._root);
|
|
12289
|
+
_mountComponent(def) {
|
|
12290
|
+
this._mount(def);
|
|
12291
|
+
this._processExposed();
|
|
12292
|
+
}
|
|
12293
|
+
_processExposed() {
|
|
12281
12294
|
const exposed = this._instance && this._instance.exposed;
|
|
12282
12295
|
if (!exposed) return;
|
|
12283
12296
|
for (const key in exposed) {
|
|
@@ -12291,6 +12304,38 @@ class VueElement extends BaseClass {
|
|
|
12291
12304
|
}
|
|
12292
12305
|
}
|
|
12293
12306
|
}
|
|
12307
|
+
_processInstance() {
|
|
12308
|
+
this._instance.ce = this;
|
|
12309
|
+
this._instance.isCE = true;
|
|
12310
|
+
{
|
|
12311
|
+
this._instance.ceReload = (newStyles) => {
|
|
12312
|
+
if (this._styles) {
|
|
12313
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
12314
|
+
this._styles.length = 0;
|
|
12315
|
+
}
|
|
12316
|
+
this._applyStyles(newStyles);
|
|
12317
|
+
if (!this._instance.vapor) {
|
|
12318
|
+
this._instance = null;
|
|
12319
|
+
}
|
|
12320
|
+
this._update();
|
|
12321
|
+
};
|
|
12322
|
+
}
|
|
12323
|
+
const dispatch = (event, args) => {
|
|
12324
|
+
this.dispatchEvent(
|
|
12325
|
+
new CustomEvent(
|
|
12326
|
+
event,
|
|
12327
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
12328
|
+
)
|
|
12329
|
+
);
|
|
12330
|
+
};
|
|
12331
|
+
this._instance.emit = (event, ...args) => {
|
|
12332
|
+
dispatch(event, args);
|
|
12333
|
+
if (hyphenate(event) !== event) {
|
|
12334
|
+
dispatch(hyphenate(event), args);
|
|
12335
|
+
}
|
|
12336
|
+
};
|
|
12337
|
+
this._setParent();
|
|
12338
|
+
}
|
|
12294
12339
|
_resolveProps(def) {
|
|
12295
12340
|
const { props } = def;
|
|
12296
12341
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
@@ -12336,7 +12381,7 @@ class VueElement extends BaseClass {
|
|
|
12336
12381
|
delete this._props[key];
|
|
12337
12382
|
} else {
|
|
12338
12383
|
this._props[key] = val;
|
|
12339
|
-
if (key === "key" && this._app) {
|
|
12384
|
+
if (key === "key" && this._app && this._app._ceVNode) {
|
|
12340
12385
|
this._app._ceVNode.key = val;
|
|
12341
12386
|
}
|
|
12342
12387
|
}
|
|
@@ -12360,52 +12405,6 @@ class VueElement extends BaseClass {
|
|
|
12360
12405
|
}
|
|
12361
12406
|
}
|
|
12362
12407
|
}
|
|
12363
|
-
_update() {
|
|
12364
|
-
const vnode = this._createVNode();
|
|
12365
|
-
if (this._app) vnode.appContext = this._app._context;
|
|
12366
|
-
render(vnode, this._root);
|
|
12367
|
-
}
|
|
12368
|
-
_createVNode() {
|
|
12369
|
-
const baseProps = {};
|
|
12370
|
-
if (!this.shadowRoot) {
|
|
12371
|
-
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
12372
|
-
}
|
|
12373
|
-
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
12374
|
-
if (!this._instance) {
|
|
12375
|
-
vnode.ce = (instance) => {
|
|
12376
|
-
this._instance = instance;
|
|
12377
|
-
instance.ce = this;
|
|
12378
|
-
instance.isCE = true;
|
|
12379
|
-
{
|
|
12380
|
-
instance.ceReload = (newStyles) => {
|
|
12381
|
-
if (this._styles) {
|
|
12382
|
-
this._styles.forEach((s) => this._root.removeChild(s));
|
|
12383
|
-
this._styles.length = 0;
|
|
12384
|
-
}
|
|
12385
|
-
this._applyStyles(newStyles);
|
|
12386
|
-
this._instance = null;
|
|
12387
|
-
this._update();
|
|
12388
|
-
};
|
|
12389
|
-
}
|
|
12390
|
-
const dispatch = (event, args) => {
|
|
12391
|
-
this.dispatchEvent(
|
|
12392
|
-
new CustomEvent(
|
|
12393
|
-
event,
|
|
12394
|
-
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
12395
|
-
)
|
|
12396
|
-
);
|
|
12397
|
-
};
|
|
12398
|
-
instance.emit = (event, ...args) => {
|
|
12399
|
-
dispatch(event, args);
|
|
12400
|
-
if (hyphenate(event) !== event) {
|
|
12401
|
-
dispatch(hyphenate(event), args);
|
|
12402
|
-
}
|
|
12403
|
-
};
|
|
12404
|
-
this._setParent();
|
|
12405
|
-
};
|
|
12406
|
-
}
|
|
12407
|
-
return vnode;
|
|
12408
|
-
}
|
|
12409
12408
|
_applyStyles(styles, owner) {
|
|
12410
12409
|
if (!styles) return;
|
|
12411
12410
|
if (owner) {
|
|
@@ -12454,11 +12453,13 @@ class VueElement extends BaseClass {
|
|
|
12454
12453
|
_renderSlots() {
|
|
12455
12454
|
const outlets = this._getSlots();
|
|
12456
12455
|
const scopeId = this._instance.type.__scopeId;
|
|
12456
|
+
const slotReplacements = /* @__PURE__ */ new Map();
|
|
12457
12457
|
for (let i = 0; i < outlets.length; i++) {
|
|
12458
12458
|
const o = outlets[i];
|
|
12459
12459
|
const slotName = o.getAttribute("name") || "default";
|
|
12460
12460
|
const content = this._slots[slotName];
|
|
12461
12461
|
const parent = o.parentNode;
|
|
12462
|
+
const replacementNodes = [];
|
|
12462
12463
|
if (content) {
|
|
12463
12464
|
for (const n of content) {
|
|
12464
12465
|
if (scopeId && n.nodeType === 1) {
|
|
@@ -12471,12 +12472,19 @@ class VueElement extends BaseClass {
|
|
|
12471
12472
|
}
|
|
12472
12473
|
}
|
|
12473
12474
|
parent.insertBefore(n, o);
|
|
12475
|
+
replacementNodes.push(n);
|
|
12474
12476
|
}
|
|
12475
12477
|
} else {
|
|
12476
|
-
while (o.firstChild)
|
|
12478
|
+
while (o.firstChild) {
|
|
12479
|
+
const child = o.firstChild;
|
|
12480
|
+
parent.insertBefore(child, o);
|
|
12481
|
+
replacementNodes.push(child);
|
|
12482
|
+
}
|
|
12477
12483
|
}
|
|
12478
12484
|
parent.removeChild(o);
|
|
12485
|
+
slotReplacements.set(o, replacementNodes);
|
|
12479
12486
|
}
|
|
12487
|
+
this._updateSlotNodes(slotReplacements);
|
|
12480
12488
|
}
|
|
12481
12489
|
/**
|
|
12482
12490
|
* @internal
|
|
@@ -12533,13 +12541,76 @@ class VueElement extends BaseClass {
|
|
|
12533
12541
|
}
|
|
12534
12542
|
}
|
|
12535
12543
|
}
|
|
12544
|
+
class VueElement extends VueElementBase {
|
|
12545
|
+
constructor(def, props = {}, createAppFn = createApp) {
|
|
12546
|
+
super(def, props, createAppFn);
|
|
12547
|
+
}
|
|
12548
|
+
_needsHydration() {
|
|
12549
|
+
if (this.shadowRoot && this._createApp !== createApp) {
|
|
12550
|
+
return true;
|
|
12551
|
+
} else {
|
|
12552
|
+
if (this.shadowRoot) {
|
|
12553
|
+
warn(
|
|
12554
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
12555
|
+
);
|
|
12556
|
+
}
|
|
12557
|
+
}
|
|
12558
|
+
return false;
|
|
12559
|
+
}
|
|
12560
|
+
_mount(def) {
|
|
12561
|
+
if (!def.name) {
|
|
12562
|
+
def.name = "VueElement";
|
|
12563
|
+
}
|
|
12564
|
+
this._app = this._createApp(def);
|
|
12565
|
+
this._inheritParentContext();
|
|
12566
|
+
if (def.configureApp) {
|
|
12567
|
+
def.configureApp(this._app);
|
|
12568
|
+
}
|
|
12569
|
+
this._app._ceVNode = this._createVNode();
|
|
12570
|
+
this._app.mount(this._root);
|
|
12571
|
+
}
|
|
12572
|
+
_update() {
|
|
12573
|
+
if (!this._app) return;
|
|
12574
|
+
const vnode = this._createVNode();
|
|
12575
|
+
vnode.appContext = this._app._context;
|
|
12576
|
+
render(vnode, this._root);
|
|
12577
|
+
}
|
|
12578
|
+
_unmount() {
|
|
12579
|
+
if (this._app) {
|
|
12580
|
+
this._app.unmount();
|
|
12581
|
+
}
|
|
12582
|
+
if (this._instance && this._instance.ce) {
|
|
12583
|
+
this._instance.ce = void 0;
|
|
12584
|
+
}
|
|
12585
|
+
this._app = this._instance = null;
|
|
12586
|
+
}
|
|
12587
|
+
/**
|
|
12588
|
+
* Only called when shadowRoot is false
|
|
12589
|
+
*/
|
|
12590
|
+
_updateSlotNodes(replacements) {
|
|
12591
|
+
}
|
|
12592
|
+
_createVNode() {
|
|
12593
|
+
const baseProps = {};
|
|
12594
|
+
if (!this.shadowRoot) {
|
|
12595
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
12596
|
+
}
|
|
12597
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
12598
|
+
if (!this._instance) {
|
|
12599
|
+
vnode.ce = (instance) => {
|
|
12600
|
+
this._instance = instance;
|
|
12601
|
+
this._processInstance();
|
|
12602
|
+
};
|
|
12603
|
+
}
|
|
12604
|
+
return vnode;
|
|
12605
|
+
}
|
|
12606
|
+
}
|
|
12536
12607
|
function useHost(caller) {
|
|
12537
|
-
const
|
|
12538
|
-
const el =
|
|
12608
|
+
const { hasInstance, value } = useInstanceOption("ce", true);
|
|
12609
|
+
const el = value;
|
|
12539
12610
|
if (el) {
|
|
12540
12611
|
return el;
|
|
12541
12612
|
} else {
|
|
12542
|
-
if (!
|
|
12613
|
+
if (!hasInstance) {
|
|
12543
12614
|
warn(
|
|
12544
12615
|
`${caller || "useHost"} called without an active component instance.`
|
|
12545
12616
|
);
|
|
@@ -12558,12 +12629,12 @@ function useShadowRoot() {
|
|
|
12558
12629
|
|
|
12559
12630
|
function useCssModule(name = "$style") {
|
|
12560
12631
|
{
|
|
12561
|
-
const
|
|
12562
|
-
if (!
|
|
12632
|
+
const { hasInstance, value: type } = useInstanceOption("type", true);
|
|
12633
|
+
if (!hasInstance) {
|
|
12563
12634
|
warn(`useCssModule must be called inside setup()`);
|
|
12564
12635
|
return EMPTY_OBJ;
|
|
12565
12636
|
}
|
|
12566
|
-
const modules =
|
|
12637
|
+
const modules = type.__cssModules;
|
|
12567
12638
|
if (!modules) {
|
|
12568
12639
|
warn(`Current instance does not have CSS modules injected.`);
|
|
12569
12640
|
return EMPTY_OBJ;
|
|
@@ -13241,6 +13312,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
13241
13312
|
TransitionGroup: TransitionGroup,
|
|
13242
13313
|
TriggerOpTypes: TriggerOpTypes,
|
|
13243
13314
|
VueElement: VueElement,
|
|
13315
|
+
VueElementBase: VueElementBase,
|
|
13244
13316
|
assertNumber: assertNumber,
|
|
13245
13317
|
callWithAsyncErrorHandling: callWithAsyncErrorHandling,
|
|
13246
13318
|
callWithErrorHandling: callWithErrorHandling,
|
|
@@ -13305,6 +13377,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
13305
13377
|
mergeModels: mergeModels,
|
|
13306
13378
|
mergeProps: mergeProps,
|
|
13307
13379
|
nextTick: nextTick,
|
|
13380
|
+
nodeOps: nodeOps,
|
|
13308
13381
|
normalizeClass: normalizeClass,
|
|
13309
13382
|
normalizeProps: normalizeProps,
|
|
13310
13383
|
normalizeStyle: normalizeStyle,
|
|
@@ -13323,6 +13396,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
13323
13396
|
onUpdated: onUpdated,
|
|
13324
13397
|
onWatcherCleanup: onWatcherCleanup,
|
|
13325
13398
|
openBlock: openBlock,
|
|
13399
|
+
patchProp: patchProp,
|
|
13326
13400
|
popScopeId: popScopeId,
|
|
13327
13401
|
provide: provide,
|
|
13328
13402
|
proxyRefs: proxyRefs,
|
|
@@ -13364,6 +13438,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
13364
13438
|
useCssVars: useCssVars,
|
|
13365
13439
|
useHost: useHost,
|
|
13366
13440
|
useId: useId,
|
|
13441
|
+
useInstanceOption: useInstanceOption,
|
|
13367
13442
|
useModel: useModel,
|
|
13368
13443
|
useSSRContext: useSSRContext,
|
|
13369
13444
|
useShadowRoot: useShadowRoot,
|
|
@@ -18211,7 +18286,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
18211
18286
|
];
|
|
18212
18287
|
if (dir.modifiers.length && node.tagType === 1) {
|
|
18213
18288
|
const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
18214
|
-
const modifiersKey = arg ? isStaticExp(arg) ?
|
|
18289
|
+
const modifiersKey = arg ? isStaticExp(arg) ? getModifierPropName(arg.content) : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
|
|
18215
18290
|
props.push(
|
|
18216
18291
|
createObjectProperty(
|
|
18217
18292
|
modifiersKey,
|
|
@@ -18415,7 +18490,7 @@ const parserOptions = {
|
|
|
18415
18490
|
let ns = parent ? parent.ns : rootNamespace;
|
|
18416
18491
|
if (parent && ns === 2) {
|
|
18417
18492
|
if (parent.tag === "annotation-xml") {
|
|
18418
|
-
if (tag
|
|
18493
|
+
if (isSVGTag(tag)) {
|
|
18419
18494
|
return 1;
|
|
18420
18495
|
}
|
|
18421
18496
|
if (parent.props.some(
|
|
@@ -18432,10 +18507,10 @@ const parserOptions = {
|
|
|
18432
18507
|
}
|
|
18433
18508
|
}
|
|
18434
18509
|
if (ns === 0) {
|
|
18435
|
-
if (tag
|
|
18510
|
+
if (isSVGTag(tag)) {
|
|
18436
18511
|
return 1;
|
|
18437
18512
|
}
|
|
18438
|
-
if (tag
|
|
18513
|
+
if (isMathMLTag(tag)) {
|
|
18439
18514
|
return 2;
|
|
18440
18515
|
}
|
|
18441
18516
|
}
|
|
@@ -19048,4 +19123,4 @@ ${codeFrame}` : message);
|
|
|
19048
19123
|
}
|
|
19049
19124
|
registerRuntimeCompiler(compileToFunction);
|
|
19050
19125
|
|
|
19051
|
-
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, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, 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 };
|
|
19126
|
+
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, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, 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 };
|