@vue/compat 3.3.9 → 3.3.10

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.
@@ -12,8 +12,8 @@ const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([])
12
12
  const NOOP = () => {
13
13
  };
14
14
  const NO = () => false;
15
- const onRE = /^on[^a-z]/;
16
- const isOn = (key) => onRE.test(key);
15
+ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
16
+ (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
17
17
  const isModelListener = (key) => key.startsWith("onUpdate:");
18
18
  const extend = Object.assign;
19
19
  const remove = (arr, el) => {
@@ -3324,7 +3324,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3324
3324
  if (delayEnter) {
3325
3325
  activeBranch.transition.afterLeave = () => {
3326
3326
  if (pendingId === suspense.pendingId) {
3327
- move(pendingBranch, container2, anchor2, 0);
3327
+ move(
3328
+ pendingBranch,
3329
+ container2,
3330
+ next(activeBranch),
3331
+ 0
3332
+ );
3328
3333
  queuePostFlushCb(effects);
3329
3334
  }
3330
3335
  };
@@ -3371,7 +3376,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3371
3376
  }
3372
3377
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
3373
3378
  triggerEvent(vnode2, "onFallback");
3374
- const anchor2 = next(activeBranch);
3375
3379
  const mountFallback = () => {
3376
3380
  if (!suspense.isInFallback) {
3377
3381
  return;
@@ -3380,7 +3384,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3380
3384
  null,
3381
3385
  fallbackVNode,
3382
3386
  container2,
3383
- anchor2,
3387
+ next(activeBranch),
3384
3388
  parentComponent2,
3385
3389
  null,
3386
3390
  // fallback tree will not have suspense context
@@ -6252,7 +6256,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6252
6256
  return vm;
6253
6257
  }
6254
6258
  }
6255
- Vue.version = `2.6.14-compat:${"3.3.9"}`;
6259
+ Vue.version = `2.6.14-compat:${"3.3.10"}`;
6256
6260
  Vue.config = singletonApp.config;
6257
6261
  Vue.use = (p, ...options) => {
6258
6262
  if (p && isFunction(p.install)) {
@@ -10714,9 +10718,9 @@ function initCustomFormatter() {
10714
10718
  return;
10715
10719
  }
10716
10720
  const vueStyle = { style: "color:#3ba776" };
10717
- const numberStyle = { style: "color:#0b1bc9" };
10718
- const stringStyle = { style: "color:#b62e24" };
10719
- const keywordStyle = { style: "color:#9d288c" };
10721
+ const numberStyle = { style: "color:#1677ff" };
10722
+ const stringStyle = { style: "color:#f5222d" };
10723
+ const keywordStyle = { style: "color:#eb2f96" };
10720
10724
  const formatter = {
10721
10725
  header(obj) {
10722
10726
  if (!isObject(obj)) {
@@ -10910,7 +10914,7 @@ function isMemoSame(cached, memo) {
10910
10914
  return true;
10911
10915
  }
10912
10916
 
10913
- const version = "3.3.9";
10917
+ const version = "3.3.10";
10914
10918
  const _ssrUtils = {
10915
10919
  createComponentInstance,
10916
10920
  setupComponent,
@@ -11624,7 +11628,8 @@ function patchStopImmediatePropagation(e, value) {
11624
11628
  }
11625
11629
  }
11626
11630
 
11627
- const nativeOnRE = /^on[a-z]/;
11631
+ const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
11632
+ key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
11628
11633
  const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11629
11634
  if (key === "class") {
11630
11635
  patchClass(el, nextValue, isSVG);
@@ -11658,7 +11663,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
11658
11663
  if (key === "innerHTML" || key === "textContent") {
11659
11664
  return true;
11660
11665
  }
11661
- if (key in el && nativeOnRE.test(key) && isFunction(value)) {
11666
+ if (key in el && isNativeOn(key) && isFunction(value)) {
11662
11667
  return true;
11663
11668
  }
11664
11669
  return false;
@@ -11675,7 +11680,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
11675
11680
  if (key === "type" && el.tagName === "TEXTAREA") {
11676
11681
  return false;
11677
11682
  }
11678
- if (nativeOnRE.test(key) && isString(value)) {
11683
+ if (key === "width" || key === "height") {
11684
+ const tag = el.tagName;
11685
+ return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
11686
+ }
11687
+ if (isNativeOn(key) && isString(value)) {
11679
11688
  return false;
11680
11689
  }
11681
11690
  return key in el;
@@ -12399,14 +12408,14 @@ const modifierGuards = {
12399
12408
  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
12400
12409
  };
12401
12410
  const withModifiers = (fn, modifiers) => {
12402
- return (event, ...args) => {
12411
+ return fn._withMods || (fn._withMods = (event, ...args) => {
12403
12412
  for (let i = 0; i < modifiers.length; i++) {
12404
12413
  const guard = modifierGuards[modifiers[i]];
12405
12414
  if (guard && guard(event, modifiers))
12406
12415
  return;
12407
12416
  }
12408
12417
  return fn(event, ...args);
12409
- };
12418
+ });
12410
12419
  };
12411
12420
  const keyNames = {
12412
12421
  esc: "escape",
@@ -12434,7 +12443,7 @@ const withKeys = (fn, modifiers) => {
12434
12443
  );
12435
12444
  }
12436
12445
  }
12437
- return (event) => {
12446
+ return fn._withKeys || (fn._withKeys = (event) => {
12438
12447
  if (!("key" in event)) {
12439
12448
  return;
12440
12449
  }
@@ -12462,7 +12471,7 @@ const withKeys = (fn, modifiers) => {
12462
12471
  }
12463
12472
  }
12464
12473
  }
12465
- };
12474
+ });
12466
12475
  };
12467
12476
 
12468
12477
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -15,8 +15,8 @@ var Vue = (function () {
15
15
  const NOOP = () => {
16
16
  };
17
17
  const NO = () => false;
18
- const onRE = /^on[^a-z]/;
19
- const isOn = (key) => onRE.test(key);
18
+ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
19
+ (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
20
20
  const isModelListener = (key) => key.startsWith("onUpdate:");
21
21
  const extend = Object.assign;
22
22
  const remove = (arr, el) => {
@@ -3310,7 +3310,12 @@ If this is a native custom element, make sure to exclude it from component resol
3310
3310
  if (delayEnter) {
3311
3311
  activeBranch.transition.afterLeave = () => {
3312
3312
  if (pendingId === suspense.pendingId) {
3313
- move(pendingBranch, container2, anchor2, 0);
3313
+ move(
3314
+ pendingBranch,
3315
+ container2,
3316
+ next(activeBranch),
3317
+ 0
3318
+ );
3314
3319
  queuePostFlushCb(effects);
3315
3320
  }
3316
3321
  };
@@ -3357,7 +3362,6 @@ If this is a native custom element, make sure to exclude it from component resol
3357
3362
  }
3358
3363
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
3359
3364
  triggerEvent(vnode2, "onFallback");
3360
- const anchor2 = next(activeBranch);
3361
3365
  const mountFallback = () => {
3362
3366
  if (!suspense.isInFallback) {
3363
3367
  return;
@@ -3366,7 +3370,7 @@ If this is a native custom element, make sure to exclude it from component resol
3366
3370
  null,
3367
3371
  fallbackVNode,
3368
3372
  container2,
3369
- anchor2,
3373
+ next(activeBranch),
3370
3374
  parentComponent2,
3371
3375
  null,
3372
3376
  // fallback tree will not have suspense context
@@ -6207,7 +6211,7 @@ If this is a native custom element, make sure to exclude it from component resol
6207
6211
  return vm;
6208
6212
  }
6209
6213
  }
6210
- Vue.version = `2.6.14-compat:${"3.3.9"}`;
6214
+ Vue.version = `2.6.14-compat:${"3.3.10"}`;
6211
6215
  Vue.config = singletonApp.config;
6212
6216
  Vue.use = (p, ...options) => {
6213
6217
  if (p && isFunction(p.install)) {
@@ -10598,9 +10602,9 @@ Component that was made reactive: `,
10598
10602
  return;
10599
10603
  }
10600
10604
  const vueStyle = { style: "color:#3ba776" };
10601
- const numberStyle = { style: "color:#0b1bc9" };
10602
- const stringStyle = { style: "color:#b62e24" };
10603
- const keywordStyle = { style: "color:#9d288c" };
10605
+ const numberStyle = { style: "color:#1677ff" };
10606
+ const stringStyle = { style: "color:#f5222d" };
10607
+ const keywordStyle = { style: "color:#eb2f96" };
10604
10608
  const formatter = {
10605
10609
  header(obj) {
10606
10610
  if (!isObject(obj)) {
@@ -10794,7 +10798,7 @@ Component that was made reactive: `,
10794
10798
  return true;
10795
10799
  }
10796
10800
 
10797
- const version = "3.3.9";
10801
+ const version = "3.3.10";
10798
10802
  const ssrUtils = null;
10799
10803
  const resolveFilter = resolveFilter$1 ;
10800
10804
  const _compatUtils = {
@@ -11493,7 +11497,8 @@ Component that was made reactive: `,
11493
11497
  }
11494
11498
  }
11495
11499
 
11496
- const nativeOnRE = /^on[a-z]/;
11500
+ const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
11501
+ key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
11497
11502
  const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11498
11503
  if (key === "class") {
11499
11504
  patchClass(el, nextValue, isSVG);
@@ -11527,7 +11532,7 @@ Component that was made reactive: `,
11527
11532
  if (key === "innerHTML" || key === "textContent") {
11528
11533
  return true;
11529
11534
  }
11530
- if (key in el && nativeOnRE.test(key) && isFunction(value)) {
11535
+ if (key in el && isNativeOn(key) && isFunction(value)) {
11531
11536
  return true;
11532
11537
  }
11533
11538
  return false;
@@ -11544,7 +11549,11 @@ Component that was made reactive: `,
11544
11549
  if (key === "type" && el.tagName === "TEXTAREA") {
11545
11550
  return false;
11546
11551
  }
11547
- if (nativeOnRE.test(key) && isString(value)) {
11552
+ if (key === "width" || key === "height") {
11553
+ const tag = el.tagName;
11554
+ return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
11555
+ }
11556
+ if (isNativeOn(key) && isString(value)) {
11548
11557
  return false;
11549
11558
  }
11550
11559
  return key in el;
@@ -12222,14 +12231,14 @@ Component that was made reactive: `,
12222
12231
  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
12223
12232
  };
12224
12233
  const withModifiers = (fn, modifiers) => {
12225
- return (event, ...args) => {
12234
+ return fn._withMods || (fn._withMods = (event, ...args) => {
12226
12235
  for (let i = 0; i < modifiers.length; i++) {
12227
12236
  const guard = modifierGuards[modifiers[i]];
12228
12237
  if (guard && guard(event, modifiers))
12229
12238
  return;
12230
12239
  }
12231
12240
  return fn(event, ...args);
12232
- };
12241
+ });
12233
12242
  };
12234
12243
  const keyNames = {
12235
12244
  esc: "escape",
@@ -12257,7 +12266,7 @@ Component that was made reactive: `,
12257
12266
  );
12258
12267
  }
12259
12268
  }
12260
- return (event) => {
12269
+ return fn._withKeys || (fn._withKeys = (event) => {
12261
12270
  if (!("key" in event)) {
12262
12271
  return;
12263
12272
  }
@@ -12285,7 +12294,7 @@ Component that was made reactive: `,
12285
12294
  }
12286
12295
  }
12287
12296
  }
12288
- };
12297
+ });
12289
12298
  };
12290
12299
 
12291
12300
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);