@vue/runtime-dom 3.6.0-rc.5 → 3.6.0-rc.7

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.6.0-rc.5
2
+ * @vue/runtime-dom v3.6.0-rc.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -13,7 +13,7 @@ let _vue_shared = require("@vue/shared");
13
13
  let policy = void 0;
14
14
  const tt = typeof window !== "undefined" && window.trustedTypes;
15
15
  if (tt) try {
16
- policy = /* @__PURE__ */ tt.createPolicy("vue", { createHTML: (val) => val });
16
+ policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
17
17
  } catch (e) {
18
18
  (0, _vue_runtime_core.warn)(`Error creating trusted types policy: ${e}`);
19
19
  }
@@ -21,7 +21,7 @@ const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) =>
21
21
  const svgNS = "http://www.w3.org/2000/svg";
22
22
  const mathmlNS = "http://www.w3.org/1998/Math/MathML";
23
23
  const doc = typeof document !== "undefined" ? document : null;
24
- const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
24
+ const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
25
25
  const nodeOps = {
26
26
  insert: (child, parent, anchor) => {
27
27
  parent.insertBefore(child, anchor || null);
@@ -95,7 +95,7 @@ const DOMTransitionPropsValidators = {
95
95
  leaveActiveClass: String,
96
96
  leaveToClass: String
97
97
  };
98
- const TransitionPropsValidators = /* @__PURE__ */ (0, _vue_shared.extend)({}, _vue_runtime_core.BaseTransitionPropsValidators, DOMTransitionPropsValidators);
98
+ const TransitionPropsValidators = /*@__PURE__*/ (0, _vue_shared.extend)({}, _vue_runtime_core.BaseTransitionPropsValidators, DOMTransitionPropsValidators);
99
99
  /**
100
100
  * Wrap logic that attaches extra properties to Transition in a function
101
101
  * so that it can be annotated as pure
@@ -109,7 +109,7 @@ const decorate$1 = (t) => {
109
109
  * DOM Transition is a higher-order-component based on the platform-agnostic
110
110
  * base Transition component, with DOM-specific logic.
111
111
  */
112
- const Transition = /* @__PURE__ */ decorate$1((props, { slots }) => (0, _vue_runtime_core.h)(_vue_runtime_core.BaseTransition, resolveTransitionProps(props), slots));
112
+ const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => (0, _vue_runtime_core.h)(_vue_runtime_core.BaseTransition, resolveTransitionProps(props), slots));
113
113
  /**
114
114
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
115
115
  * with custom HOCs.
@@ -331,14 +331,15 @@ const vShow = {
331
331
  },
332
332
  updated(el, { value, oldValue }, { transition }) {
333
333
  if (!value === !oldValue) return;
334
- if (transition) if (value) {
335
- transition.beforeEnter(el);
336
- setDisplay(el, true);
337
- transition.enter(el);
338
- } else transition.leave(el, () => {
339
- setDisplay(el, false);
340
- });
341
- else setDisplay(el, value);
334
+ if (transition) {
335
+ if (value) {
336
+ transition.beforeEnter(el);
337
+ setDisplay(el, true);
338
+ transition.enter(el);
339
+ } else transition.leave(el, () => {
340
+ setDisplay(el, false);
341
+ });
342
+ } else setDisplay(el, value);
342
343
  },
343
344
  beforeUnmount(el, { value }) {
344
345
  setDisplay(el, value);
@@ -369,11 +370,13 @@ function patchStyle(el, prev, next) {
369
370
  const isCssString = (0, _vue_shared.isString)(next);
370
371
  let hasControlledDisplay = false;
371
372
  if (next && !isCssString) {
372
- if (prev) if (!(0, _vue_shared.isString)(prev)) {
373
- for (const key in prev) if (next[key] == null) setStyle(style, key, "");
374
- } else for (const prevStyle of prev.split(";")) {
375
- const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
376
- if (next[key] == null) setStyle(style, key, "");
373
+ if (prev) {
374
+ if (!(0, _vue_shared.isString)(prev)) {
375
+ for (const key in prev) if (next[key] == null) setStyle(style, key, "");
376
+ } else for (const prevStyle of prev.split(";")) {
377
+ const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
378
+ if (next[key] == null) setStyle(style, key, "");
379
+ }
377
380
  }
378
381
  for (const key in next) {
379
382
  if (key === "display") hasControlledDisplay = true;
@@ -402,8 +405,10 @@ function setStyle(style, name, rawVal) {
402
405
  else {
403
406
  const val = rawVal == null ? "" : String(rawVal);
404
407
  if (semicolonRE.test(val)) (0, _vue_runtime_core.warn)(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
405
- if (name.startsWith("--")) style.setProperty(name, val);
406
- else {
408
+ if (name.startsWith("--")) {
409
+ if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
410
+ else style.setProperty(name, val);
411
+ } else {
407
412
  const prefixed = autoPrefix(style, name);
408
413
  if (importantRE.test(val)) style.setProperty((0, _vue_shared.hyphenate)(prefixed), val.replace(importantRE, ""), "important");
409
414
  else style[prefixed] = val;
@@ -440,9 +445,10 @@ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
440
445
  //#region packages/runtime-dom/src/modules/attrs.ts
441
446
  const xlinkNS = "http://www.w3.org/1999/xlink";
442
447
  function patchAttr(el, key, value, isSVG, instance, isBoolean = (0, _vue_shared.isSpecialBooleanAttr)(key)) {
443
- if (isSVG && key.startsWith("xlink:")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
444
- else el.setAttributeNS(xlinkNS, key, value);
445
- else if (value == null || isBoolean && !(0, _vue_shared.includeBooleanAttr)(value)) el.removeAttribute(key);
448
+ if (isSVG && key.startsWith("xlink:")) {
449
+ if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
450
+ else el.setAttributeNS(xlinkNS, key, value);
451
+ } else if (value == null || isBoolean && !(0, _vue_shared.includeBooleanAttr)(value)) el.removeAttribute(key);
446
452
  else el.setAttribute(key, isBoolean ? "" : (0, _vue_shared.isSymbol)(value) ? String(value) : value);
447
453
  }
448
454
  //#endregion
@@ -515,7 +521,7 @@ function parseEventName(name) {
515
521
  return [name[2] === ":" ? name.slice(3) : (0, _vue_shared.hyphenate)(name.slice(2)), options];
516
522
  }
517
523
  let cachedNow = 0;
518
- const p = /* @__PURE__ */ Promise.resolve();
524
+ const p = /*@__PURE__*/ Promise.resolve();
519
525
  const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
520
526
  function createInvoker(initialValue, instance) {
521
527
  const invoker = (e) => {
@@ -583,7 +589,7 @@ function shouldSetAsPropForVueCE(el, key) {
583
589
  //#endregion
584
590
  //#region packages/runtime-dom/src/apiCustomElement.ts
585
591
  const REMOVAL = {};
586
- /* @__NO_SIDE_EFFECTS__ */
592
+ /*@__NO_SIDE_EFFECTS__*/
587
593
  function defineCustomElement(options, extraOptions, _createApp) {
588
594
  let Comp = (0, _vue_runtime_core.defineComponent)(options, extraOptions);
589
595
  if ((0, _vue_shared.isPlainObject)(Comp)) Comp = (0, _vue_shared.extend)({}, Comp, extraOptions);
@@ -632,12 +638,14 @@ var VueElementBase = class VueElementBase extends BaseClass {
632
638
  this._parent = parent;
633
639
  break;
634
640
  }
635
- if (!this._instance) if (this._resolved) this._mountComponent(this._def);
636
- else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
637
- this._pendingResolve = void 0;
638
- if (this.isConnected) return this._resolveDef();
639
- });
640
- else this._resolveDef();
641
+ if (!this._instance) {
642
+ if (this._resolved) this._mountComponent(this._def);
643
+ else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
644
+ this._pendingResolve = void 0;
645
+ if (this.isConnected) return this._resolveDef();
646
+ });
647
+ else this._resolveDef();
648
+ }
641
649
  }
642
650
  disconnectedCallback() {
643
651
  this._connected = false;
@@ -853,13 +861,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
853
861
  _renderSlots() {
854
862
  const outlets = this._getSlots();
855
863
  const scopeId = this._instance.type.__scopeId;
856
- const slotReplacements = /* @__PURE__ */ new Map();
857
864
  for (let i = 0; i < outlets.length; i++) {
858
865
  const o = outlets[i];
859
866
  const slotName = o.getAttribute("name") || "default";
860
867
  const content = this._slots[slotName];
861
868
  const parent = o.parentNode;
862
- const replacementNodes = [];
863
869
  if (content) for (const n of content) {
864
870
  if (scopeId && n.nodeType === 1) {
865
871
  const id = scopeId + "-s";
@@ -869,20 +875,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
869
875
  while (child = walker.nextNode()) child.setAttribute(id, "");
870
876
  }
871
877
  parent.insertBefore(n, o);
872
- replacementNodes.push(n);
873
- }
874
- else while (o.firstChild) {
875
- const child = o.firstChild;
876
- parent.insertBefore(child, o);
877
- replacementNodes.push(child);
878
878
  }
879
+ else while (o.firstChild) parent.insertBefore(o.firstChild, o);
879
880
  parent.removeChild(o);
880
- slotReplacements.set(o, {
881
- nodes: replacementNodes,
882
- usedFallback: !content
883
- });
884
881
  }
885
- this._updateSlotNodes(slotReplacements);
886
882
  }
887
883
  /**
888
884
  * @internal
@@ -921,7 +917,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
921
917
  * @internal
922
918
  */
923
919
  _hasShadowRoot() {
924
- return this._def.shadowRoot !== false;
920
+ return this._root !== this;
925
921
  }
926
922
  /**
927
923
  * @internal
@@ -966,10 +962,6 @@ var VueElement = class extends VueElementBase {
966
962
  if (this._instance && this._instance.ce) this._instance.ce = void 0;
967
963
  this._app = this._instance = null;
968
964
  }
969
- /**
970
- * Only called when shadowRoot is false
971
- */
972
- _updateSlotNodes(replacements) {}
973
965
  _createVNode() {
974
966
  const baseProps = {};
975
967
  if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
@@ -1035,7 +1027,7 @@ const decorate = (t) => {
1035
1027
  };
1036
1028
  const TransitionGroup = /* @__PURE__ */ decorate({
1037
1029
  name: "TransitionGroup",
1038
- props: /* @__PURE__ */ (0, _vue_shared.extend)({}, TransitionPropsValidators, {
1030
+ props: /*@__PURE__*/ (0, _vue_shared.extend)({}, TransitionPropsValidators, {
1039
1031
  tag: String,
1040
1032
  moveClass: String
1041
1033
  }),
@@ -1316,19 +1308,39 @@ const vModelSelectInit = (el, value, number, set) => {
1316
1308
  el._modelValue = value;
1317
1309
  addEventListener(el, "change", () => {
1318
1310
  const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? (0, _vue_shared.looseToNumber)(getValue(o)) : getValue(o));
1319
- (set || el[assignKey])(el.multiple ? (0, _vue_shared.isSet)(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
1320
- el._assigning = true;
1321
- (0, _vue_runtime_core.nextTick)(() => {
1322
- el._assigning = false;
1323
- });
1311
+ const multiple = el.multiple;
1312
+ const assignedValue = multiple ? (0, _vue_shared.isSet)(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
1313
+ const pending = el._pendingValue = [multiple, multiple ? (0, _vue_shared.isArray)(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
1314
+ try {
1315
+ (set || el[assignKey])(assignedValue);
1316
+ } finally {
1317
+ (0, _vue_runtime_core.nextTick)(() => {
1318
+ if (el._pendingValue === pending) el._pendingValue = void 0;
1319
+ });
1320
+ }
1324
1321
  });
1325
1322
  };
1323
+ function isSameSelectValue(value, assignedValue, multiple) {
1324
+ if (!multiple) return (0, _vue_shared.looseEqual)(value, assignedValue);
1325
+ if ((0, _vue_shared.isArray)(value)) return (0, _vue_shared.looseEqual)(value, assignedValue);
1326
+ if ((0, _vue_shared.isSet)(value)) {
1327
+ if (value.size !== assignedValue.length) return false;
1328
+ for (const item of assignedValue) if (!value.has(item)) return false;
1329
+ return true;
1330
+ }
1331
+ return false;
1332
+ }
1326
1333
  /**
1327
1334
  * @internal
1328
1335
  */
1329
1336
  const vModelSetSelected = (el, value) => {
1330
1337
  el._modelValue = value;
1331
- if (el._assigning) return;
1338
+ const pending = el._pendingValue;
1339
+ el._pendingValue = void 0;
1340
+ if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
1341
+ setSelected(el, value);
1342
+ };
1343
+ function setSelected(el, value) {
1332
1344
  const isMultiple = el.multiple;
1333
1345
  const isArrayValue = (0, _vue_shared.isArray)(value);
1334
1346
  if (isMultiple && !isArrayValue && !(0, _vue_shared.isSet)(value)) {
@@ -1338,18 +1350,19 @@ const vModelSetSelected = (el, value) => {
1338
1350
  for (let i = 0, l = el.options.length; i < l; i++) {
1339
1351
  const option = el.options[i];
1340
1352
  const optionValue = getValue(option);
1341
- if (isMultiple) if (isArrayValue) {
1342
- const optionType = typeof optionValue;
1343
- if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
1344
- else option.selected = (0, _vue_shared.looseIndexOf)(value, optionValue) > -1;
1345
- } else option.selected = value.has(optionValue);
1346
- else if ((0, _vue_shared.looseEqual)(getValue(option), value)) {
1353
+ if (isMultiple) {
1354
+ if (isArrayValue) {
1355
+ const optionType = typeof optionValue;
1356
+ if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
1357
+ else option.selected = (0, _vue_shared.looseIndexOf)(value, optionValue) > -1;
1358
+ } else option.selected = value.has(optionValue);
1359
+ } else if ((0, _vue_shared.looseEqual)(getValue(option), value)) {
1347
1360
  if (el.selectedIndex !== i) el.selectedIndex = i;
1348
1361
  return;
1349
1362
  }
1350
1363
  }
1351
1364
  if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
1352
- };
1365
+ }
1353
1366
  /**
1354
1367
  * @internal retrieve raw value set via :value bindings
1355
1368
  */
@@ -1469,7 +1482,7 @@ const withKeys = (fn, modifiers) => {
1469
1482
  };
1470
1483
  //#endregion
1471
1484
  //#region packages/runtime-dom/src/index.ts
1472
- const rendererOptions = /* @__PURE__ */ (0, _vue_shared.extend)({ patchProp }, nodeOps);
1485
+ const rendererOptions = /*@__PURE__*/ (0, _vue_shared.extend)({ patchProp }, nodeOps);
1473
1486
  let renderer;
1474
1487
  let enabledHydration = false;
1475
1488
  function ensureRenderer() {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.6.0-rc.5
2
+ * @vue/runtime-dom v3.6.0-rc.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -13,13 +13,13 @@ let _vue_shared = require("@vue/shared");
13
13
  let policy = void 0;
14
14
  const tt = typeof window !== "undefined" && window.trustedTypes;
15
15
  if (tt) try {
16
- policy = /* @__PURE__ */ tt.createPolicy("vue", { createHTML: (val) => val });
16
+ policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
17
17
  } catch (e) {}
18
18
  const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
19
19
  const svgNS = "http://www.w3.org/2000/svg";
20
20
  const mathmlNS = "http://www.w3.org/1998/Math/MathML";
21
21
  const doc = typeof document !== "undefined" ? document : null;
22
- const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
22
+ const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
23
23
  const nodeOps = {
24
24
  insert: (child, parent, anchor) => {
25
25
  parent.insertBefore(child, anchor || null);
@@ -93,7 +93,7 @@ const DOMTransitionPropsValidators = {
93
93
  leaveActiveClass: String,
94
94
  leaveToClass: String
95
95
  };
96
- const TransitionPropsValidators = /* @__PURE__ */ (0, _vue_shared.extend)({}, _vue_runtime_core.BaseTransitionPropsValidators, DOMTransitionPropsValidators);
96
+ const TransitionPropsValidators = /*@__PURE__*/ (0, _vue_shared.extend)({}, _vue_runtime_core.BaseTransitionPropsValidators, DOMTransitionPropsValidators);
97
97
  /**
98
98
  * Wrap logic that attaches extra properties to Transition in a function
99
99
  * so that it can be annotated as pure
@@ -107,7 +107,7 @@ const decorate$1 = (t) => {
107
107
  * DOM Transition is a higher-order-component based on the platform-agnostic
108
108
  * base Transition component, with DOM-specific logic.
109
109
  */
110
- const Transition = /* @__PURE__ */ decorate$1((props, { slots }) => (0, _vue_runtime_core.h)(_vue_runtime_core.BaseTransition, resolveTransitionProps(props), slots));
110
+ const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => (0, _vue_runtime_core.h)(_vue_runtime_core.BaseTransition, resolveTransitionProps(props), slots));
111
111
  /**
112
112
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
113
113
  * with custom HOCs.
@@ -327,14 +327,15 @@ const vShow = {
327
327
  },
328
328
  updated(el, { value, oldValue }, { transition }) {
329
329
  if (!value === !oldValue) return;
330
- if (transition) if (value) {
331
- transition.beforeEnter(el);
332
- setDisplay(el, true);
333
- transition.enter(el);
334
- } else transition.leave(el, () => {
335
- setDisplay(el, false);
336
- });
337
- else setDisplay(el, value);
330
+ if (transition) {
331
+ if (value) {
332
+ transition.beforeEnter(el);
333
+ setDisplay(el, true);
334
+ transition.enter(el);
335
+ } else transition.leave(el, () => {
336
+ setDisplay(el, false);
337
+ });
338
+ } else setDisplay(el, value);
338
339
  },
339
340
  beforeUnmount(el, { value }) {
340
341
  setDisplay(el, value);
@@ -365,11 +366,13 @@ function patchStyle(el, prev, next) {
365
366
  const isCssString = (0, _vue_shared.isString)(next);
366
367
  let hasControlledDisplay = false;
367
368
  if (next && !isCssString) {
368
- if (prev) if (!(0, _vue_shared.isString)(prev)) {
369
- for (const key in prev) if (next[key] == null) setStyle(style, key, "");
370
- } else for (const prevStyle of prev.split(";")) {
371
- const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
372
- if (next[key] == null) setStyle(style, key, "");
369
+ if (prev) {
370
+ if (!(0, _vue_shared.isString)(prev)) {
371
+ for (const key in prev) if (next[key] == null) setStyle(style, key, "");
372
+ } else for (const prevStyle of prev.split(";")) {
373
+ const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
374
+ if (next[key] == null) setStyle(style, key, "");
375
+ }
373
376
  }
374
377
  for (const key in next) {
375
378
  if (key === "display") hasControlledDisplay = true;
@@ -396,8 +399,10 @@ function setStyle(style, name, rawVal) {
396
399
  if ((0, _vue_shared.isArray)(rawVal)) rawVal.forEach((v) => setStyle(style, name, v));
397
400
  else {
398
401
  const val = rawVal == null ? "" : String(rawVal);
399
- if (name.startsWith("--")) style.setProperty(name, val);
400
- else {
402
+ if (name.startsWith("--")) {
403
+ if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
404
+ else style.setProperty(name, val);
405
+ } else {
401
406
  const prefixed = autoPrefix(style, name);
402
407
  if (importantRE.test(val)) style.setProperty((0, _vue_shared.hyphenate)(prefixed), val.replace(importantRE, ""), "important");
403
408
  else style[prefixed] = val;
@@ -434,9 +439,10 @@ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
434
439
  //#region packages/runtime-dom/src/modules/attrs.ts
435
440
  const xlinkNS = "http://www.w3.org/1999/xlink";
436
441
  function patchAttr(el, key, value, isSVG, instance, isBoolean = (0, _vue_shared.isSpecialBooleanAttr)(key)) {
437
- if (isSVG && key.startsWith("xlink:")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
438
- else el.setAttributeNS(xlinkNS, key, value);
439
- else if (value == null || isBoolean && !(0, _vue_shared.includeBooleanAttr)(value)) el.removeAttribute(key);
442
+ if (isSVG && key.startsWith("xlink:")) {
443
+ if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
444
+ else el.setAttributeNS(xlinkNS, key, value);
445
+ } else if (value == null || isBoolean && !(0, _vue_shared.includeBooleanAttr)(value)) el.removeAttribute(key);
440
446
  else el.setAttribute(key, isBoolean ? "" : (0, _vue_shared.isSymbol)(value) ? String(value) : value);
441
447
  }
442
448
  //#endregion
@@ -507,7 +513,7 @@ function parseEventName(name) {
507
513
  return [name[2] === ":" ? name.slice(3) : (0, _vue_shared.hyphenate)(name.slice(2)), options];
508
514
  }
509
515
  let cachedNow = 0;
510
- const p = /* @__PURE__ */ Promise.resolve();
516
+ const p = /*@__PURE__*/ Promise.resolve();
511
517
  const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
512
518
  function createInvoker(initialValue, instance) {
513
519
  const invoker = (e) => {
@@ -570,7 +576,7 @@ function shouldSetAsPropForVueCE(el, key) {
570
576
  //#endregion
571
577
  //#region packages/runtime-dom/src/apiCustomElement.ts
572
578
  const REMOVAL = {};
573
- /* @__NO_SIDE_EFFECTS__ */
579
+ /*@__NO_SIDE_EFFECTS__*/
574
580
  function defineCustomElement(options, extraOptions, _createApp) {
575
581
  let Comp = (0, _vue_runtime_core.defineComponent)(options, extraOptions);
576
582
  if ((0, _vue_shared.isPlainObject)(Comp)) Comp = (0, _vue_shared.extend)({}, Comp, extraOptions);
@@ -619,12 +625,14 @@ var VueElementBase = class VueElementBase extends BaseClass {
619
625
  this._parent = parent;
620
626
  break;
621
627
  }
622
- if (!this._instance) if (this._resolved) this._mountComponent(this._def);
623
- else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
624
- this._pendingResolve = void 0;
625
- if (this.isConnected) return this._resolveDef();
626
- });
627
- else this._resolveDef();
628
+ if (!this._instance) {
629
+ if (this._resolved) this._mountComponent(this._def);
630
+ else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
631
+ this._pendingResolve = void 0;
632
+ if (this.isConnected) return this._resolveDef();
633
+ });
634
+ else this._resolveDef();
635
+ }
628
636
  }
629
637
  disconnectedCallback() {
630
638
  this._connected = false;
@@ -817,13 +825,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
817
825
  _renderSlots() {
818
826
  const outlets = this._getSlots();
819
827
  const scopeId = this._instance.type.__scopeId;
820
- const slotReplacements = /* @__PURE__ */ new Map();
821
828
  for (let i = 0; i < outlets.length; i++) {
822
829
  const o = outlets[i];
823
830
  const slotName = o.getAttribute("name") || "default";
824
831
  const content = this._slots[slotName];
825
832
  const parent = o.parentNode;
826
- const replacementNodes = [];
827
833
  if (content) for (const n of content) {
828
834
  if (scopeId && n.nodeType === 1) {
829
835
  const id = scopeId + "-s";
@@ -833,20 +839,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
833
839
  while (child = walker.nextNode()) child.setAttribute(id, "");
834
840
  }
835
841
  parent.insertBefore(n, o);
836
- replacementNodes.push(n);
837
- }
838
- else while (o.firstChild) {
839
- const child = o.firstChild;
840
- parent.insertBefore(child, o);
841
- replacementNodes.push(child);
842
842
  }
843
+ else while (o.firstChild) parent.insertBefore(o.firstChild, o);
843
844
  parent.removeChild(o);
844
- slotReplacements.set(o, {
845
- nodes: replacementNodes,
846
- usedFallback: !content
847
- });
848
845
  }
849
- this._updateSlotNodes(slotReplacements);
850
846
  }
851
847
  /**
852
848
  * @internal
@@ -885,7 +881,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
885
881
  * @internal
886
882
  */
887
883
  _hasShadowRoot() {
888
- return this._def.shadowRoot !== false;
884
+ return this._root !== this;
889
885
  }
890
886
  /**
891
887
  * @internal
@@ -918,10 +914,6 @@ var VueElement = class extends VueElementBase {
918
914
  if (this._instance && this._instance.ce) this._instance.ce = void 0;
919
915
  this._app = this._instance = null;
920
916
  }
921
- /**
922
- * Only called when shadowRoot is false
923
- */
924
- _updateSlotNodes(replacements) {}
925
917
  _createVNode() {
926
918
  const baseProps = {};
927
919
  if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
@@ -976,7 +968,7 @@ const decorate = (t) => {
976
968
  };
977
969
  const TransitionGroup = /* @__PURE__ */ decorate({
978
970
  name: "TransitionGroup",
979
- props: /* @__PURE__ */ (0, _vue_shared.extend)({}, TransitionPropsValidators, {
971
+ props: /*@__PURE__*/ (0, _vue_shared.extend)({}, TransitionPropsValidators, {
980
972
  tag: String,
981
973
  moveClass: String
982
974
  }),
@@ -1256,37 +1248,58 @@ const vModelSelectInit = (el, value, number, set) => {
1256
1248
  el._modelValue = value;
1257
1249
  addEventListener(el, "change", () => {
1258
1250
  const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? (0, _vue_shared.looseToNumber)(getValue(o)) : getValue(o));
1259
- (set || el[assignKey])(el.multiple ? (0, _vue_shared.isSet)(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
1260
- el._assigning = true;
1261
- (0, _vue_runtime_core.nextTick)(() => {
1262
- el._assigning = false;
1263
- });
1251
+ const multiple = el.multiple;
1252
+ const assignedValue = multiple ? (0, _vue_shared.isSet)(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
1253
+ const pending = el._pendingValue = [multiple, multiple ? (0, _vue_shared.isArray)(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
1254
+ try {
1255
+ (set || el[assignKey])(assignedValue);
1256
+ } finally {
1257
+ (0, _vue_runtime_core.nextTick)(() => {
1258
+ if (el._pendingValue === pending) el._pendingValue = void 0;
1259
+ });
1260
+ }
1264
1261
  });
1265
1262
  };
1263
+ function isSameSelectValue(value, assignedValue, multiple) {
1264
+ if (!multiple) return (0, _vue_shared.looseEqual)(value, assignedValue);
1265
+ if ((0, _vue_shared.isArray)(value)) return (0, _vue_shared.looseEqual)(value, assignedValue);
1266
+ if ((0, _vue_shared.isSet)(value)) {
1267
+ if (value.size !== assignedValue.length) return false;
1268
+ for (const item of assignedValue) if (!value.has(item)) return false;
1269
+ return true;
1270
+ }
1271
+ return false;
1272
+ }
1266
1273
  /**
1267
1274
  * @internal
1268
1275
  */
1269
1276
  const vModelSetSelected = (el, value) => {
1270
1277
  el._modelValue = value;
1271
- if (el._assigning) return;
1278
+ const pending = el._pendingValue;
1279
+ el._pendingValue = void 0;
1280
+ if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
1281
+ setSelected(el, value);
1282
+ };
1283
+ function setSelected(el, value) {
1272
1284
  const isMultiple = el.multiple;
1273
1285
  const isArrayValue = (0, _vue_shared.isArray)(value);
1274
1286
  if (isMultiple && !isArrayValue && !(0, _vue_shared.isSet)(value)) return;
1275
1287
  for (let i = 0, l = el.options.length; i < l; i++) {
1276
1288
  const option = el.options[i];
1277
1289
  const optionValue = getValue(option);
1278
- if (isMultiple) if (isArrayValue) {
1279
- const optionType = typeof optionValue;
1280
- if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
1281
- else option.selected = (0, _vue_shared.looseIndexOf)(value, optionValue) > -1;
1282
- } else option.selected = value.has(optionValue);
1283
- else if ((0, _vue_shared.looseEqual)(getValue(option), value)) {
1290
+ if (isMultiple) {
1291
+ if (isArrayValue) {
1292
+ const optionType = typeof optionValue;
1293
+ if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
1294
+ else option.selected = (0, _vue_shared.looseIndexOf)(value, optionValue) > -1;
1295
+ } else option.selected = value.has(optionValue);
1296
+ } else if ((0, _vue_shared.looseEqual)(getValue(option), value)) {
1284
1297
  if (el.selectedIndex !== i) el.selectedIndex = i;
1285
1298
  return;
1286
1299
  }
1287
1300
  }
1288
1301
  if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
1289
- };
1302
+ }
1290
1303
  /**
1291
1304
  * @internal retrieve raw value set via :value bindings
1292
1305
  */
@@ -1406,7 +1419,7 @@ const withKeys = (fn, modifiers) => {
1406
1419
  };
1407
1420
  //#endregion
1408
1421
  //#region packages/runtime-dom/src/index.ts
1409
- const rendererOptions = /* @__PURE__ */ (0, _vue_shared.extend)({ patchProp }, nodeOps);
1422
+ const rendererOptions = /*@__PURE__*/ (0, _vue_shared.extend)({ patchProp }, nodeOps);
1410
1423
  let renderer;
1411
1424
  let enabledHydration = false;
1412
1425
  function ensureRenderer() {