@vue/runtime-dom 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/runtime-dom.cjs.js +155 -108
- package/dist/runtime-dom.cjs.prod.js +132 -88
- package/dist/runtime-dom.d.ts +56 -31
- package/dist/runtime-dom.esm-browser.js +183 -112
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +155 -111
- package/dist/runtime-dom.global.js +183 -108
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-alpha.
|
|
2
|
+
* @vue/runtime-dom 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++) {
|
|
@@ -2838,7 +2841,12 @@ function reload(id, newComp) {
|
|
|
2838
2841
|
newComp = normalizeClassComponent(newComp);
|
|
2839
2842
|
updateComponentDef(record.initialDef, newComp);
|
|
2840
2843
|
const instances = [...record.instances];
|
|
2841
|
-
if (newComp.__vapor) {
|
|
2844
|
+
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2845
|
+
for (const instance of instances) {
|
|
2846
|
+
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
2847
|
+
instance.root.ce._removeChildStyle(instance.type);
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2842
2850
|
for (const instance of instances) {
|
|
2843
2851
|
instance.hmrReload(newComp);
|
|
2844
2852
|
}
|
|
@@ -9103,7 +9111,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9103
9111
|
return res;
|
|
9104
9112
|
}
|
|
9105
9113
|
const getModelModifiers = (props, modelName, getter) => {
|
|
9106
|
-
return
|
|
9114
|
+
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
9107
9115
|
};
|
|
9108
9116
|
|
|
9109
9117
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -10557,6 +10565,25 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
10557
10565
|
simpleSetCurrentInstance(instance);
|
|
10558
10566
|
}
|
|
10559
10567
|
};
|
|
10568
|
+
const internalOptions = ["ce", "type"];
|
|
10569
|
+
const useInstanceOption = (key, silent = false) => {
|
|
10570
|
+
const instance = getCurrentGenericInstance();
|
|
10571
|
+
if (!instance) {
|
|
10572
|
+
if (!silent) {
|
|
10573
|
+
warn$1(`useInstanceOption called without an active component instance.`);
|
|
10574
|
+
}
|
|
10575
|
+
return { hasInstance: false, value: void 0 };
|
|
10576
|
+
}
|
|
10577
|
+
if (!internalOptions.includes(key)) {
|
|
10578
|
+
{
|
|
10579
|
+
warn$1(
|
|
10580
|
+
`useInstanceOption only accepts ${internalOptions.map((k) => `'${k}'`).join(", ")} as key, got '${key}'.`
|
|
10581
|
+
);
|
|
10582
|
+
}
|
|
10583
|
+
return { hasInstance: true, value: void 0 };
|
|
10584
|
+
}
|
|
10585
|
+
return { hasInstance: true, value: instance[key] };
|
|
10586
|
+
};
|
|
10560
10587
|
|
|
10561
10588
|
const emptyAppContext = createAppContext();
|
|
10562
10589
|
let uid = 0;
|
|
@@ -11191,7 +11218,7 @@ function isMemoSame(cached, memo) {
|
|
|
11191
11218
|
return true;
|
|
11192
11219
|
}
|
|
11193
11220
|
|
|
11194
|
-
const version = "3.6.0-alpha.
|
|
11221
|
+
const version = "3.6.0-alpha.4";
|
|
11195
11222
|
const warn = warn$1 ;
|
|
11196
11223
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11197
11224
|
const devtools = devtools$1 ;
|
|
@@ -12034,12 +12061,9 @@ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOption
|
|
|
12034
12061
|
});
|
|
12035
12062
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
12036
12063
|
};
|
|
12037
|
-
class
|
|
12038
|
-
constructor(
|
|
12064
|
+
class VueElementBase extends BaseClass {
|
|
12065
|
+
constructor(def, props = {}, createAppFn) {
|
|
12039
12066
|
super();
|
|
12040
|
-
this._def = _def;
|
|
12041
|
-
this._props = _props;
|
|
12042
|
-
this._createApp = _createApp;
|
|
12043
12067
|
this._isVueCE = true;
|
|
12044
12068
|
/**
|
|
12045
12069
|
* @internal
|
|
@@ -12049,28 +12073,23 @@ class VueElement extends BaseClass {
|
|
|
12049
12073
|
* @internal
|
|
12050
12074
|
*/
|
|
12051
12075
|
this._app = null;
|
|
12052
|
-
/**
|
|
12053
|
-
* @internal
|
|
12054
|
-
*/
|
|
12055
|
-
this._nonce = this._def.nonce;
|
|
12056
12076
|
this._connected = false;
|
|
12057
12077
|
this._resolved = false;
|
|
12058
|
-
this._patching = false;
|
|
12059
|
-
this._dirty = false;
|
|
12060
12078
|
this._numberProps = null;
|
|
12061
12079
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
12080
|
+
this._patching = false;
|
|
12081
|
+
this._dirty = false;
|
|
12062
12082
|
this._ob = null;
|
|
12063
|
-
|
|
12083
|
+
this._def = def;
|
|
12084
|
+
this._props = props;
|
|
12085
|
+
this._createApp = createAppFn;
|
|
12086
|
+
this._nonce = def.nonce;
|
|
12087
|
+
if (this._needsHydration()) {
|
|
12064
12088
|
this._root = this.shadowRoot;
|
|
12065
12089
|
} else {
|
|
12066
|
-
if (
|
|
12067
|
-
warn(
|
|
12068
|
-
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
12069
|
-
);
|
|
12070
|
-
}
|
|
12071
|
-
if (_def.shadowRoot !== false) {
|
|
12090
|
+
if (def.shadowRoot !== false) {
|
|
12072
12091
|
this.attachShadow(
|
|
12073
|
-
extend({},
|
|
12092
|
+
extend({}, def.shadowRootOptions, {
|
|
12074
12093
|
mode: "open"
|
|
12075
12094
|
})
|
|
12076
12095
|
);
|
|
@@ -12088,14 +12107,14 @@ class VueElement extends BaseClass {
|
|
|
12088
12107
|
this._connected = true;
|
|
12089
12108
|
let parent = this;
|
|
12090
12109
|
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
12091
|
-
if (parent instanceof
|
|
12110
|
+
if (parent instanceof VueElementBase) {
|
|
12092
12111
|
this._parent = parent;
|
|
12093
12112
|
break;
|
|
12094
12113
|
}
|
|
12095
12114
|
}
|
|
12096
12115
|
if (!this._instance) {
|
|
12097
12116
|
if (this._resolved) {
|
|
12098
|
-
this.
|
|
12117
|
+
this._mountComponent(this._def);
|
|
12099
12118
|
} else {
|
|
12100
12119
|
if (parent && parent._pendingResolve) {
|
|
12101
12120
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -12108,20 +12127,6 @@ class VueElement extends BaseClass {
|
|
|
12108
12127
|
}
|
|
12109
12128
|
}
|
|
12110
12129
|
}
|
|
12111
|
-
_setParent(parent = this._parent) {
|
|
12112
|
-
if (parent) {
|
|
12113
|
-
this._instance.parent = parent._instance;
|
|
12114
|
-
this._inheritParentContext(parent);
|
|
12115
|
-
}
|
|
12116
|
-
}
|
|
12117
|
-
_inheritParentContext(parent = this._parent) {
|
|
12118
|
-
if (parent && this._app) {
|
|
12119
|
-
Object.setPrototypeOf(
|
|
12120
|
-
this._app._context.provides,
|
|
12121
|
-
parent._instance.provides
|
|
12122
|
-
);
|
|
12123
|
-
}
|
|
12124
|
-
}
|
|
12125
12130
|
disconnectedCallback() {
|
|
12126
12131
|
this._connected = false;
|
|
12127
12132
|
nextTick(() => {
|
|
@@ -12130,9 +12135,7 @@ class VueElement extends BaseClass {
|
|
|
12130
12135
|
this._ob.disconnect();
|
|
12131
12136
|
this._ob = null;
|
|
12132
12137
|
}
|
|
12133
|
-
this.
|
|
12134
|
-
if (this._instance) this._instance.ce = void 0;
|
|
12135
|
-
this._app = this._instance = null;
|
|
12138
|
+
this._unmount();
|
|
12136
12139
|
if (this._teleportTargets) {
|
|
12137
12140
|
this._teleportTargets.clear();
|
|
12138
12141
|
this._teleportTargets = void 0;
|
|
@@ -12140,6 +12143,20 @@ class VueElement extends BaseClass {
|
|
|
12140
12143
|
}
|
|
12141
12144
|
});
|
|
12142
12145
|
}
|
|
12146
|
+
_setParent(parent = this._parent) {
|
|
12147
|
+
if (parent && this._instance) {
|
|
12148
|
+
this._instance.parent = parent._instance;
|
|
12149
|
+
this._inheritParentContext(parent);
|
|
12150
|
+
}
|
|
12151
|
+
}
|
|
12152
|
+
_inheritParentContext(parent = this._parent) {
|
|
12153
|
+
if (parent && this._app) {
|
|
12154
|
+
Object.setPrototypeOf(
|
|
12155
|
+
this._app._context.provides,
|
|
12156
|
+
parent._instance.provides
|
|
12157
|
+
);
|
|
12158
|
+
}
|
|
12159
|
+
}
|
|
12143
12160
|
_processMutations(mutations) {
|
|
12144
12161
|
for (const m of mutations) {
|
|
12145
12162
|
this._setAttr(m.attributeName);
|
|
@@ -12157,7 +12174,7 @@ class VueElement extends BaseClass {
|
|
|
12157
12174
|
}
|
|
12158
12175
|
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
12159
12176
|
this._ob.observe(this, { attributes: true });
|
|
12160
|
-
const resolve = (def
|
|
12177
|
+
const resolve = (def) => {
|
|
12161
12178
|
this._resolved = true;
|
|
12162
12179
|
this._pendingResolve = void 0;
|
|
12163
12180
|
const { props, styles } = def;
|
|
@@ -12182,29 +12199,25 @@ class VueElement extends BaseClass {
|
|
|
12182
12199
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
12183
12200
|
);
|
|
12184
12201
|
}
|
|
12185
|
-
this.
|
|
12202
|
+
this._mountComponent(def);
|
|
12186
12203
|
};
|
|
12187
12204
|
const asyncDef = this._def.__asyncLoader;
|
|
12188
12205
|
if (asyncDef) {
|
|
12206
|
+
const { configureApp } = this._def;
|
|
12189
12207
|
this._pendingResolve = asyncDef().then((def) => {
|
|
12190
|
-
def.configureApp =
|
|
12191
|
-
|
|
12208
|
+
def.configureApp = configureApp;
|
|
12209
|
+
this._def = def;
|
|
12210
|
+
resolve(def);
|
|
12192
12211
|
});
|
|
12193
12212
|
} else {
|
|
12194
12213
|
resolve(this._def);
|
|
12195
12214
|
}
|
|
12196
12215
|
}
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
this._inheritParentContext();
|
|
12203
|
-
if (def.configureApp) {
|
|
12204
|
-
def.configureApp(this._app);
|
|
12205
|
-
}
|
|
12206
|
-
this._app._ceVNode = this._createVNode();
|
|
12207
|
-
this._app.mount(this._root);
|
|
12216
|
+
_mountComponent(def) {
|
|
12217
|
+
this._mount(def);
|
|
12218
|
+
this._processExposed();
|
|
12219
|
+
}
|
|
12220
|
+
_processExposed() {
|
|
12208
12221
|
const exposed = this._instance && this._instance.exposed;
|
|
12209
12222
|
if (!exposed) return;
|
|
12210
12223
|
for (const key in exposed) {
|
|
@@ -12218,6 +12231,38 @@ class VueElement extends BaseClass {
|
|
|
12218
12231
|
}
|
|
12219
12232
|
}
|
|
12220
12233
|
}
|
|
12234
|
+
_processInstance() {
|
|
12235
|
+
this._instance.ce = this;
|
|
12236
|
+
this._instance.isCE = true;
|
|
12237
|
+
{
|
|
12238
|
+
this._instance.ceReload = (newStyles) => {
|
|
12239
|
+
if (this._styles) {
|
|
12240
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
12241
|
+
this._styles.length = 0;
|
|
12242
|
+
}
|
|
12243
|
+
this._applyStyles(newStyles);
|
|
12244
|
+
if (!this._instance.vapor) {
|
|
12245
|
+
this._instance = null;
|
|
12246
|
+
}
|
|
12247
|
+
this._update();
|
|
12248
|
+
};
|
|
12249
|
+
}
|
|
12250
|
+
const dispatch = (event, args) => {
|
|
12251
|
+
this.dispatchEvent(
|
|
12252
|
+
new CustomEvent(
|
|
12253
|
+
event,
|
|
12254
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
12255
|
+
)
|
|
12256
|
+
);
|
|
12257
|
+
};
|
|
12258
|
+
this._instance.emit = (event, ...args) => {
|
|
12259
|
+
dispatch(event, args);
|
|
12260
|
+
if (hyphenate(event) !== event) {
|
|
12261
|
+
dispatch(hyphenate(event), args);
|
|
12262
|
+
}
|
|
12263
|
+
};
|
|
12264
|
+
this._setParent();
|
|
12265
|
+
}
|
|
12221
12266
|
_resolveProps(def) {
|
|
12222
12267
|
const { props } = def;
|
|
12223
12268
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
@@ -12263,7 +12308,7 @@ class VueElement extends BaseClass {
|
|
|
12263
12308
|
delete this._props[key];
|
|
12264
12309
|
} else {
|
|
12265
12310
|
this._props[key] = val;
|
|
12266
|
-
if (key === "key" && this._app) {
|
|
12311
|
+
if (key === "key" && this._app && this._app._ceVNode) {
|
|
12267
12312
|
this._app._ceVNode.key = val;
|
|
12268
12313
|
}
|
|
12269
12314
|
}
|
|
@@ -12287,52 +12332,6 @@ class VueElement extends BaseClass {
|
|
|
12287
12332
|
}
|
|
12288
12333
|
}
|
|
12289
12334
|
}
|
|
12290
|
-
_update() {
|
|
12291
|
-
const vnode = this._createVNode();
|
|
12292
|
-
if (this._app) vnode.appContext = this._app._context;
|
|
12293
|
-
render(vnode, this._root);
|
|
12294
|
-
}
|
|
12295
|
-
_createVNode() {
|
|
12296
|
-
const baseProps = {};
|
|
12297
|
-
if (!this.shadowRoot) {
|
|
12298
|
-
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
12299
|
-
}
|
|
12300
|
-
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
12301
|
-
if (!this._instance) {
|
|
12302
|
-
vnode.ce = (instance) => {
|
|
12303
|
-
this._instance = instance;
|
|
12304
|
-
instance.ce = this;
|
|
12305
|
-
instance.isCE = true;
|
|
12306
|
-
{
|
|
12307
|
-
instance.ceReload = (newStyles) => {
|
|
12308
|
-
if (this._styles) {
|
|
12309
|
-
this._styles.forEach((s) => this._root.removeChild(s));
|
|
12310
|
-
this._styles.length = 0;
|
|
12311
|
-
}
|
|
12312
|
-
this._applyStyles(newStyles);
|
|
12313
|
-
this._instance = null;
|
|
12314
|
-
this._update();
|
|
12315
|
-
};
|
|
12316
|
-
}
|
|
12317
|
-
const dispatch = (event, args) => {
|
|
12318
|
-
this.dispatchEvent(
|
|
12319
|
-
new CustomEvent(
|
|
12320
|
-
event,
|
|
12321
|
-
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
12322
|
-
)
|
|
12323
|
-
);
|
|
12324
|
-
};
|
|
12325
|
-
instance.emit = (event, ...args) => {
|
|
12326
|
-
dispatch(event, args);
|
|
12327
|
-
if (hyphenate(event) !== event) {
|
|
12328
|
-
dispatch(hyphenate(event), args);
|
|
12329
|
-
}
|
|
12330
|
-
};
|
|
12331
|
-
this._setParent();
|
|
12332
|
-
};
|
|
12333
|
-
}
|
|
12334
|
-
return vnode;
|
|
12335
|
-
}
|
|
12336
12335
|
_applyStyles(styles, owner) {
|
|
12337
12336
|
if (!styles) return;
|
|
12338
12337
|
if (owner) {
|
|
@@ -12381,11 +12380,13 @@ class VueElement extends BaseClass {
|
|
|
12381
12380
|
_renderSlots() {
|
|
12382
12381
|
const outlets = this._getSlots();
|
|
12383
12382
|
const scopeId = this._instance.type.__scopeId;
|
|
12383
|
+
const slotReplacements = /* @__PURE__ */ new Map();
|
|
12384
12384
|
for (let i = 0; i < outlets.length; i++) {
|
|
12385
12385
|
const o = outlets[i];
|
|
12386
12386
|
const slotName = o.getAttribute("name") || "default";
|
|
12387
12387
|
const content = this._slots[slotName];
|
|
12388
12388
|
const parent = o.parentNode;
|
|
12389
|
+
const replacementNodes = [];
|
|
12389
12390
|
if (content) {
|
|
12390
12391
|
for (const n of content) {
|
|
12391
12392
|
if (scopeId && n.nodeType === 1) {
|
|
@@ -12398,12 +12399,19 @@ class VueElement extends BaseClass {
|
|
|
12398
12399
|
}
|
|
12399
12400
|
}
|
|
12400
12401
|
parent.insertBefore(n, o);
|
|
12402
|
+
replacementNodes.push(n);
|
|
12401
12403
|
}
|
|
12402
12404
|
} else {
|
|
12403
|
-
while (o.firstChild)
|
|
12405
|
+
while (o.firstChild) {
|
|
12406
|
+
const child = o.firstChild;
|
|
12407
|
+
parent.insertBefore(child, o);
|
|
12408
|
+
replacementNodes.push(child);
|
|
12409
|
+
}
|
|
12404
12410
|
}
|
|
12405
12411
|
parent.removeChild(o);
|
|
12412
|
+
slotReplacements.set(o, replacementNodes);
|
|
12406
12413
|
}
|
|
12414
|
+
this._updateSlotNodes(slotReplacements);
|
|
12407
12415
|
}
|
|
12408
12416
|
/**
|
|
12409
12417
|
* @internal
|
|
@@ -12460,13 +12468,76 @@ class VueElement extends BaseClass {
|
|
|
12460
12468
|
}
|
|
12461
12469
|
}
|
|
12462
12470
|
}
|
|
12471
|
+
class VueElement extends VueElementBase {
|
|
12472
|
+
constructor(def, props = {}, createAppFn = createApp) {
|
|
12473
|
+
super(def, props, createAppFn);
|
|
12474
|
+
}
|
|
12475
|
+
_needsHydration() {
|
|
12476
|
+
if (this.shadowRoot && this._createApp !== createApp) {
|
|
12477
|
+
return true;
|
|
12478
|
+
} else {
|
|
12479
|
+
if (this.shadowRoot) {
|
|
12480
|
+
warn(
|
|
12481
|
+
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
12482
|
+
);
|
|
12483
|
+
}
|
|
12484
|
+
}
|
|
12485
|
+
return false;
|
|
12486
|
+
}
|
|
12487
|
+
_mount(def) {
|
|
12488
|
+
if (!def.name) {
|
|
12489
|
+
def.name = "VueElement";
|
|
12490
|
+
}
|
|
12491
|
+
this._app = this._createApp(def);
|
|
12492
|
+
this._inheritParentContext();
|
|
12493
|
+
if (def.configureApp) {
|
|
12494
|
+
def.configureApp(this._app);
|
|
12495
|
+
}
|
|
12496
|
+
this._app._ceVNode = this._createVNode();
|
|
12497
|
+
this._app.mount(this._root);
|
|
12498
|
+
}
|
|
12499
|
+
_update() {
|
|
12500
|
+
if (!this._app) return;
|
|
12501
|
+
const vnode = this._createVNode();
|
|
12502
|
+
vnode.appContext = this._app._context;
|
|
12503
|
+
render(vnode, this._root);
|
|
12504
|
+
}
|
|
12505
|
+
_unmount() {
|
|
12506
|
+
if (this._app) {
|
|
12507
|
+
this._app.unmount();
|
|
12508
|
+
}
|
|
12509
|
+
if (this._instance && this._instance.ce) {
|
|
12510
|
+
this._instance.ce = void 0;
|
|
12511
|
+
}
|
|
12512
|
+
this._app = this._instance = null;
|
|
12513
|
+
}
|
|
12514
|
+
/**
|
|
12515
|
+
* Only called when shadowRoot is false
|
|
12516
|
+
*/
|
|
12517
|
+
_updateSlotNodes(replacements) {
|
|
12518
|
+
}
|
|
12519
|
+
_createVNode() {
|
|
12520
|
+
const baseProps = {};
|
|
12521
|
+
if (!this.shadowRoot) {
|
|
12522
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
12523
|
+
}
|
|
12524
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
12525
|
+
if (!this._instance) {
|
|
12526
|
+
vnode.ce = (instance) => {
|
|
12527
|
+
this._instance = instance;
|
|
12528
|
+
this._processInstance();
|
|
12529
|
+
};
|
|
12530
|
+
}
|
|
12531
|
+
return vnode;
|
|
12532
|
+
}
|
|
12533
|
+
}
|
|
12463
12534
|
function useHost(caller) {
|
|
12464
|
-
const
|
|
12465
|
-
const el =
|
|
12535
|
+
const { hasInstance, value } = useInstanceOption("ce", true);
|
|
12536
|
+
const el = value;
|
|
12466
12537
|
if (el) {
|
|
12467
12538
|
return el;
|
|
12468
12539
|
} else {
|
|
12469
|
-
if (!
|
|
12540
|
+
if (!hasInstance) {
|
|
12470
12541
|
warn(
|
|
12471
12542
|
`${caller || "useHost"} called without an active component instance.`
|
|
12472
12543
|
);
|
|
@@ -12485,12 +12556,12 @@ function useShadowRoot() {
|
|
|
12485
12556
|
|
|
12486
12557
|
function useCssModule(name = "$style") {
|
|
12487
12558
|
{
|
|
12488
|
-
const
|
|
12489
|
-
if (!
|
|
12559
|
+
const { hasInstance, value: type } = useInstanceOption("type", true);
|
|
12560
|
+
if (!hasInstance) {
|
|
12490
12561
|
warn(`useCssModule must be called inside setup()`);
|
|
12491
12562
|
return EMPTY_OBJ;
|
|
12492
12563
|
}
|
|
12493
|
-
const modules =
|
|
12564
|
+
const modules = type.__cssModules;
|
|
12494
12565
|
if (!modules) {
|
|
12495
12566
|
warn(`Current instance does not have CSS modules injected.`);
|
|
12496
12567
|
return EMPTY_OBJ;
|
|
@@ -13147,4 +13218,4 @@ const initDirectivesForSSR = () => {
|
|
|
13147
13218
|
}
|
|
13148
13219
|
} ;
|
|
13149
13220
|
|
|
13150
|
-
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, 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 };
|
|
13221
|
+
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, 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 };
|