@vue/runtime-dom 3.4.28 → 3.4.29

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.4.28
2
+ * @vue/runtime-dom v3.4.29
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -736,8 +736,8 @@ function shouldSetAsProp(el, key, value, isSVG) {
736
736
 
737
737
  /*! #__NO_SIDE_EFFECTS__ */
738
738
  // @__NO_SIDE_EFFECTS__
739
- function defineCustomElement(options, hydrate2) {
740
- const Comp = runtimeCore.defineComponent(options);
739
+ function defineCustomElement(options, extraOptions, hydrate2) {
740
+ const Comp = runtimeCore.defineComponent(options, extraOptions);
741
741
  class VueCustomElement extends VueElement {
742
742
  constructor(initialProps) {
743
743
  super(Comp, initialProps, hydrate2);
@@ -747,8 +747,8 @@ function defineCustomElement(options, hydrate2) {
747
747
  return VueCustomElement;
748
748
  }
749
749
  /*! #__NO_SIDE_EFFECTS__ */
750
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
751
- return /* @__PURE__ */ defineCustomElement(options, hydrate);
750
+ const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
751
+ return /* @__PURE__ */ defineCustomElement(options, extraOptions, hydrate);
752
752
  };
753
753
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
754
754
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.4.28
2
+ * @vue/runtime-dom v3.4.29
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -706,8 +706,8 @@ function shouldSetAsProp(el, key, value, isSVG) {
706
706
 
707
707
  /*! #__NO_SIDE_EFFECTS__ */
708
708
  // @__NO_SIDE_EFFECTS__
709
- function defineCustomElement(options, hydrate2) {
710
- const Comp = runtimeCore.defineComponent(options);
709
+ function defineCustomElement(options, extraOptions, hydrate2) {
710
+ const Comp = runtimeCore.defineComponent(options, extraOptions);
711
711
  class VueCustomElement extends VueElement {
712
712
  constructor(initialProps) {
713
713
  super(Comp, initialProps, hydrate2);
@@ -717,8 +717,8 @@ function defineCustomElement(options, hydrate2) {
717
717
  return VueCustomElement;
718
718
  }
719
719
  /*! #__NO_SIDE_EFFECTS__ */
720
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
721
- return /* @__PURE__ */ defineCustomElement(options, hydrate);
720
+ const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
721
+ return /* @__PURE__ */ defineCustomElement(options, extraOptions, hydrate);
722
722
  };
723
723
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
724
724
  };
@@ -1,11 +1,16 @@
1
- import { SetupContext, RenderFunction, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentInjectOptions, SlotsType, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, ExtractPropTypes, DefineComponent, RootHydrateFunction, ConcreteComponent, BaseTransitionProps, FunctionalComponent, ObjectDirective, VNodeRef, RootRenderFunction, CreateAppFunction } from '@vue/runtime-core';
1
+ import { SetupContext, RenderFunction, ComponentOptions, ComponentObjectPropsOptions, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentInjectOptions, SlotsType, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, ExtractPropTypes, DefineComponent, RootHydrateFunction, ConcreteComponent, BaseTransitionProps, FunctionalComponent, ObjectDirective, VNodeRef, RootRenderFunction, CreateAppFunction } from '@vue/runtime-core';
2
2
  export * from '@vue/runtime-core';
3
3
  import * as CSS from 'csstype';
4
4
 
5
5
  export type VueElementConstructor<P = {}> = {
6
6
  new (initialProps?: Record<string, any>): VueElement & P;
7
7
  };
8
- export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): VueElementConstructor<Props>;
8
+ export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: SetupContext) => RawBindings | RenderFunction, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs' | 'emits'> & {
9
+ props?: (keyof Props)[];
10
+ }): VueElementConstructor<Props>;
11
+ export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: SetupContext) => RawBindings | RenderFunction, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs' | 'emits'> & {
12
+ props?: ComponentObjectPropsOptions<Props>;
13
+ }): VueElementConstructor<Props>;
9
14
  export declare function defineCustomElement<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & {
10
15
  styles?: string[];
11
16
  }): VueElementConstructor<Props>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.4.28
2
+ * @vue/runtime-dom v3.4.29
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -411,7 +411,7 @@ class ReactiveEffect {
411
411
  /**
412
412
  * @internal
413
413
  */
414
- this._dirtyLevel = 4;
414
+ this._dirtyLevel = 5;
415
415
  /**
416
416
  * @internal
417
417
  */
@@ -431,14 +431,18 @@ class ReactiveEffect {
431
431
  recordEffectScope(this, scope);
432
432
  }
433
433
  get dirty() {
434
- if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
434
+ if (this._dirtyLevel === 2)
435
+ return false;
436
+ if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
435
437
  this._dirtyLevel = 1;
436
438
  pauseTracking();
437
439
  for (let i = 0; i < this._depsLength; i++) {
438
440
  const dep = this.deps[i];
439
441
  if (dep.computed) {
442
+ if (dep.computed.effect._dirtyLevel === 2)
443
+ return true;
440
444
  triggerComputed(dep.computed);
441
- if (this._dirtyLevel >= 4) {
445
+ if (this._dirtyLevel >= 5) {
442
446
  break;
443
447
  }
444
448
  }
@@ -448,10 +452,10 @@ class ReactiveEffect {
448
452
  }
449
453
  resetTracking();
450
454
  }
451
- return this._dirtyLevel >= 4;
455
+ return this._dirtyLevel >= 5;
452
456
  }
453
457
  set dirty(v) {
454
- this._dirtyLevel = v ? 4 : 0;
458
+ this._dirtyLevel = v ? 5 : 0;
455
459
  }
456
460
  run() {
457
461
  this._dirtyLevel = 0;
@@ -572,9 +576,18 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
572
576
  var _a;
573
577
  pauseScheduling();
574
578
  for (const effect2 of dep.keys()) {
579
+ if (!dep.computed && effect2.computed) {
580
+ if (dep.get(effect2) === effect2._trackId && effect2._runnings > 0) {
581
+ effect2._dirtyLevel = 2;
582
+ continue;
583
+ }
584
+ }
575
585
  let tracking;
576
586
  if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
577
587
  effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
588
+ if (effect2.computed && effect2._dirtyLevel === 2) {
589
+ effect2._shouldSchedule = true;
590
+ }
578
591
  effect2._dirtyLevel = dirtyLevel;
579
592
  }
580
593
  if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
@@ -582,7 +595,7 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
582
595
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
583
596
  }
584
597
  effect2.trigger();
585
- if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
598
+ if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
586
599
  effect2._shouldSchedule = false;
587
600
  if (effect2.scheduler) {
588
601
  queueEffectSchedulers.push(effect2.scheduler);
@@ -674,7 +687,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
674
687
  if (dep) {
675
688
  triggerEffects(
676
689
  dep,
677
- 4,
690
+ 5,
678
691
  {
679
692
  target,
680
693
  type,
@@ -1277,7 +1290,7 @@ class ComputedRefImpl {
1277
1290
  () => getter(this._value),
1278
1291
  () => triggerRefValue(
1279
1292
  this,
1280
- this.effect._dirtyLevel === 2 ? 2 : 3
1293
+ this.effect._dirtyLevel === 3 ? 3 : 4
1281
1294
  )
1282
1295
  );
1283
1296
  this.effect.computed = this;
@@ -1287,7 +1300,7 @@ class ComputedRefImpl {
1287
1300
  get value() {
1288
1301
  const self = toRaw(this);
1289
1302
  if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
1290
- triggerRefValue(self, 4);
1303
+ triggerRefValue(self, 5);
1291
1304
  }
1292
1305
  trackRefValue(self);
1293
1306
  if (self.effect._dirtyLevel >= 2) {
@@ -1296,7 +1309,7 @@ class ComputedRefImpl {
1296
1309
 
1297
1310
  getter: `, this.getter);
1298
1311
  }
1299
- triggerRefValue(self, 2);
1312
+ triggerRefValue(self, 3);
1300
1313
  }
1301
1314
  return self._value;
1302
1315
  }
@@ -1351,7 +1364,7 @@ function trackRefValue(ref2) {
1351
1364
  );
1352
1365
  }
1353
1366
  }
1354
- function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
1367
+ function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
1355
1368
  ref2 = toRaw(ref2);
1356
1369
  const dep = ref2.dep;
1357
1370
  if (dep) {
@@ -1402,12 +1415,12 @@ class RefImpl {
1402
1415
  const oldVal = this._rawValue;
1403
1416
  this._rawValue = newVal;
1404
1417
  this._value = useDirectValue ? newVal : toReactive(newVal);
1405
- triggerRefValue(this, 4, newVal, oldVal);
1418
+ triggerRefValue(this, 5, newVal, oldVal);
1406
1419
  }
1407
1420
  }
1408
1421
  }
1409
1422
  function triggerRef(ref2) {
1410
- triggerRefValue(ref2, 4, ref2.value );
1423
+ triggerRefValue(ref2, 5, ref2.value );
1411
1424
  }
1412
1425
  function unref(ref2) {
1413
1426
  return isRef(ref2) ? ref2.value : ref2;
@@ -9569,7 +9582,7 @@ function isMemoSame(cached, memo) {
9569
9582
  return true;
9570
9583
  }
9571
9584
 
9572
- const version = "3.4.28";
9585
+ const version = "3.4.29";
9573
9586
  const warn = warn$1 ;
9574
9587
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9575
9588
  const devtools = devtools$1 ;
@@ -10358,8 +10371,8 @@ function shouldSetAsProp(el, key, value, isSVG) {
10358
10371
 
10359
10372
  /*! #__NO_SIDE_EFFECTS__ */
10360
10373
  // @__NO_SIDE_EFFECTS__
10361
- function defineCustomElement(options, hydrate2) {
10362
- const Comp = defineComponent(options);
10374
+ function defineCustomElement(options, extraOptions, hydrate2) {
10375
+ const Comp = defineComponent(options, extraOptions);
10363
10376
  class VueCustomElement extends VueElement {
10364
10377
  constructor(initialProps) {
10365
10378
  super(Comp, initialProps, hydrate2);
@@ -10369,8 +10382,8 @@ function defineCustomElement(options, hydrate2) {
10369
10382
  return VueCustomElement;
10370
10383
  }
10371
10384
  /*! #__NO_SIDE_EFFECTS__ */
10372
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
10373
- return /* @__PURE__ */ defineCustomElement(options, hydrate);
10385
+ const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
10386
+ return /* @__PURE__ */ defineCustomElement(options, extraOptions, hydrate);
10374
10387
  };
10375
10388
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
10376
10389
  };