@vue/runtime-dom 3.3.0-beta.4 → 3.3.0-beta.5
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 +7 -8
- package/dist/runtime-dom.cjs.prod.js +5 -6
- package/dist/runtime-dom.esm-browser.js +22 -16
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +7 -8
- package/dist/runtime-dom.global.js +22 -16
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -192,14 +192,13 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
192
192
|
el[key] = value == null ? "" : value;
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
const tag = el.tagName;
|
|
196
|
+
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
197
|
+
!tag.includes("-")) {
|
|
197
198
|
el._value = value;
|
|
199
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
198
200
|
const newValue = value == null ? "" : value;
|
|
199
|
-
if (
|
|
200
|
-
// textContent if no value attribute is present. And setting .value for
|
|
201
|
-
// OPTION has no side effect
|
|
202
|
-
el.tagName === "OPTION") {
|
|
201
|
+
if (oldValue !== newValue) {
|
|
203
202
|
el.value = newValue;
|
|
204
203
|
}
|
|
205
204
|
if (value == null) {
|
|
@@ -225,7 +224,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
225
224
|
} catch (e) {
|
|
226
225
|
if (!needRemove) {
|
|
227
226
|
runtimeCore.warn(
|
|
228
|
-
`Failed setting prop "${key}" on <${
|
|
227
|
+
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
229
228
|
e
|
|
230
229
|
);
|
|
231
230
|
}
|
|
@@ -1424,7 +1423,7 @@ function injectCompilerOptionsCheck(app) {
|
|
|
1424
1423
|
const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
|
|
1425
1424
|
- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
|
|
1426
1425
|
- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
|
|
1427
|
-
- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-
|
|
1426
|
+
- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
|
|
1428
1427
|
Object.defineProperty(app.config, "compilerOptions", {
|
|
1429
1428
|
get() {
|
|
1430
1429
|
runtimeCore.warn(msg);
|
|
@@ -184,14 +184,13 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
184
184
|
el[key] = value == null ? "" : value;
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
const tag = el.tagName;
|
|
188
|
+
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
189
|
+
!tag.includes("-")) {
|
|
189
190
|
el._value = value;
|
|
191
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
190
192
|
const newValue = value == null ? "" : value;
|
|
191
|
-
if (
|
|
192
|
-
// textContent if no value attribute is present. And setting .value for
|
|
193
|
-
// OPTION has no side effect
|
|
194
|
-
el.tagName === "OPTION") {
|
|
193
|
+
if (oldValue !== newValue) {
|
|
195
194
|
el.value = newValue;
|
|
196
195
|
}
|
|
197
196
|
if (value == null) {
|
|
@@ -2542,7 +2542,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
|
|
|
2542
2542
|
);
|
|
2543
2543
|
setActiveBranch(suspense, vnode.ssFallback);
|
|
2544
2544
|
} else {
|
|
2545
|
-
suspense.resolve();
|
|
2545
|
+
suspense.resolve(false, true);
|
|
2546
2546
|
}
|
|
2547
2547
|
}
|
|
2548
2548
|
function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
|
|
@@ -2701,7 +2701,6 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
2701
2701
|
}
|
|
2702
2702
|
let hasWarned = false;
|
|
2703
2703
|
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
2704
|
-
var _a;
|
|
2705
2704
|
if (!hasWarned) {
|
|
2706
2705
|
hasWarned = true;
|
|
2707
2706
|
console[console.info ? "info" : "log"](
|
|
@@ -2716,10 +2715,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2716
2715
|
o: { parentNode, remove }
|
|
2717
2716
|
} = rendererInternals;
|
|
2718
2717
|
let parentSuspenseId;
|
|
2719
|
-
const isSuspensible = (
|
|
2718
|
+
const isSuspensible = isVNodeSuspensible(vnode);
|
|
2720
2719
|
if (isSuspensible) {
|
|
2721
2720
|
if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
|
|
2722
|
-
parentSuspenseId = parentSuspense
|
|
2721
|
+
parentSuspenseId = parentSuspense.pendingId;
|
|
2723
2722
|
parentSuspense.deps++;
|
|
2724
2723
|
}
|
|
2725
2724
|
}
|
|
@@ -2744,7 +2743,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2744
2743
|
isHydrating,
|
|
2745
2744
|
isUnmounted: false,
|
|
2746
2745
|
effects: [],
|
|
2747
|
-
resolve(resume = false) {
|
|
2746
|
+
resolve(resume = false, sync = false) {
|
|
2748
2747
|
{
|
|
2749
2748
|
if (!resume && !suspense.pendingBranch) {
|
|
2750
2749
|
throw new Error(
|
|
@@ -2806,7 +2805,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2806
2805
|
if (isSuspensible) {
|
|
2807
2806
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
2808
2807
|
parentSuspense.deps--;
|
|
2809
|
-
if (parentSuspense.deps === 0) {
|
|
2808
|
+
if (parentSuspense.deps === 0 && !sync) {
|
|
2810
2809
|
parentSuspense.resolve();
|
|
2811
2810
|
}
|
|
2812
2811
|
}
|
|
@@ -3016,6 +3015,10 @@ function setActiveBranch(suspense, branch) {
|
|
|
3016
3015
|
updateHOCHostEl(parentComponent, el);
|
|
3017
3016
|
}
|
|
3018
3017
|
}
|
|
3018
|
+
function isVNodeSuspensible(vnode) {
|
|
3019
|
+
var _a;
|
|
3020
|
+
return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
|
|
3021
|
+
}
|
|
3019
3022
|
|
|
3020
3023
|
function watchEffect(effect, options) {
|
|
3021
3024
|
return doWatch(effect, null, options);
|
|
@@ -3626,7 +3629,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3626
3629
|
}
|
|
3627
3630
|
|
|
3628
3631
|
function defineComponent(options, extraOptions) {
|
|
3629
|
-
return isFunction(options) ?
|
|
3632
|
+
return isFunction(options) ? (
|
|
3633
|
+
// #8326: extend call and options.name access are considered side-effects
|
|
3634
|
+
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
|
3635
|
+
/* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
|
|
3636
|
+
) : options;
|
|
3630
3637
|
}
|
|
3631
3638
|
|
|
3632
3639
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
@@ -9021,7 +9028,7 @@ function isMemoSame(cached, memo) {
|
|
|
9021
9028
|
return true;
|
|
9022
9029
|
}
|
|
9023
9030
|
|
|
9024
|
-
const version = "3.3.0-beta.
|
|
9031
|
+
const version = "3.3.0-beta.5";
|
|
9025
9032
|
const ssrUtils = null;
|
|
9026
9033
|
const resolveFilter = null;
|
|
9027
9034
|
const compatUtils = null;
|
|
@@ -9213,14 +9220,13 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
9213
9220
|
el[key] = value == null ? "" : value;
|
|
9214
9221
|
return;
|
|
9215
9222
|
}
|
|
9216
|
-
|
|
9217
|
-
|
|
9223
|
+
const tag = el.tagName;
|
|
9224
|
+
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
9225
|
+
!tag.includes("-")) {
|
|
9218
9226
|
el._value = value;
|
|
9227
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
9219
9228
|
const newValue = value == null ? "" : value;
|
|
9220
|
-
if (
|
|
9221
|
-
// textContent if no value attribute is present. And setting .value for
|
|
9222
|
-
// OPTION has no side effect
|
|
9223
|
-
el.tagName === "OPTION") {
|
|
9229
|
+
if (oldValue !== newValue) {
|
|
9224
9230
|
el.value = newValue;
|
|
9225
9231
|
}
|
|
9226
9232
|
if (value == null) {
|
|
@@ -9246,7 +9252,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
9246
9252
|
} catch (e) {
|
|
9247
9253
|
if (!needRemove) {
|
|
9248
9254
|
warn(
|
|
9249
|
-
`Failed setting prop "${key}" on <${
|
|
9255
|
+
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
9250
9256
|
e
|
|
9251
9257
|
);
|
|
9252
9258
|
}
|
|
@@ -10459,7 +10465,7 @@ function injectCompilerOptionsCheck(app) {
|
|
|
10459
10465
|
const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
|
|
10460
10466
|
- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
|
|
10461
10467
|
- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
|
|
10462
|
-
- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-
|
|
10468
|
+
- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
|
|
10463
10469
|
Object.defineProperty(app.config, "compilerOptions", {
|
|
10464
10470
|
get() {
|
|
10465
10471
|
warn(msg);
|