@vue/compiler-sfc 3.4.0-rc.1 → 3.4.0-rc.3

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.
@@ -2019,7 +2019,7 @@ function generateSourceMap(filename, source, generated, sourceRoot, lineOffset,
2019
2019
  generatedLine,
2020
2020
  generatedColumn: i,
2021
2021
  source: filename,
2022
- // @ts-ignore
2022
+ // @ts-expect-error
2023
2023
  name: null
2024
2024
  });
2025
2025
  }
@@ -17862,7 +17862,7 @@ function innerResolveTypeElements(ctx, node, scope, typeParameters) {
17862
17862
  );
17863
17863
  }
17864
17864
  if (
17865
- // @ts-ignore
17865
+ // @ts-expect-error
17866
17866
  SupportedBuiltinsSet.has(typeName)
17867
17867
  ) {
17868
17868
  return resolveBuiltin(
@@ -17964,7 +17964,7 @@ function mergeElements(maps, type) {
17964
17964
  baseProps[key].key,
17965
17965
  {
17966
17966
  type,
17967
- // @ts-ignore
17967
+ // @ts-expect-error
17968
17968
  types: [baseProps[key], props[key]]
17969
17969
  },
17970
17970
  baseProps[key]._ownerScope,
@@ -19094,33 +19094,38 @@ function processDefineModel(ctx, node, declId) {
19094
19094
  if (ctx.modelDecls[modelName]) {
19095
19095
  ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node);
19096
19096
  }
19097
- const optionsString = options && ctx.getString(options);
19098
- ctx.modelDecls[modelName] = {
19099
- type,
19100
- options: optionsString,
19101
- identifier: declId && declId.type === "Identifier" ? declId.name : void 0
19102
- };
19103
- ctx.bindingMetadata[modelName] = "props";
19097
+ let optionsString = options && ctx.getString(options);
19104
19098
  let runtimeOptions = "";
19099
+ let transformOptions = "";
19105
19100
  if (options) {
19106
19101
  if (options.type === "ObjectExpression") {
19107
- const local = options.properties.find(
19108
- (p) => p.type === "ObjectProperty" && (p.key.type === "Identifier" && p.key.name === "local" || p.key.type === "StringLiteral" && p.key.value === "local")
19109
- );
19110
- if (local) {
19111
- runtimeOptions = `{ ${ctx.getString(local)} }`;
19112
- } else {
19113
- for (const p of options.properties) {
19114
- if (p.type === "SpreadElement" || p.computed) {
19115
- runtimeOptions = optionsString;
19116
- break;
19117
- }
19102
+ for (let i = options.properties.length - 1; i >= 0; i--) {
19103
+ const p = options.properties[i];
19104
+ if (p.type === "SpreadElement" || p.computed) {
19105
+ runtimeOptions = optionsString;
19106
+ break;
19118
19107
  }
19108
+ if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) {
19109
+ transformOptions = ctx.getString(p) + ", " + transformOptions;
19110
+ const offset = p.start - options.start;
19111
+ const next = options.properties[i + 1];
19112
+ const end = (next ? next.start : options.end - 1) - options.start;
19113
+ optionsString = optionsString.slice(0, offset) + optionsString.slice(end);
19114
+ }
19115
+ }
19116
+ if (!runtimeOptions && transformOptions) {
19117
+ runtimeOptions = `{ ${transformOptions} }`;
19119
19118
  }
19120
19119
  } else {
19121
19120
  runtimeOptions = optionsString;
19122
19121
  }
19123
19122
  }
19123
+ ctx.modelDecls[modelName] = {
19124
+ type,
19125
+ options: optionsString,
19126
+ identifier: declId && declId.type === "Identifier" ? declId.name : void 0
19127
+ };
19128
+ ctx.bindingMetadata[modelName] = "props";
19124
19129
  ctx.s.overwrite(
19125
19130
  ctx.startOffset + node.start,
19126
19131
  ctx.startOffset + node.end,
@@ -19158,6 +19163,11 @@ function genModelProps(ctx) {
19158
19163
  }
19159
19164
  modelPropsDecl += `
19160
19165
  ${JSON.stringify(name)}: ${decl},`;
19166
+ const modifierPropName = JSON.stringify(
19167
+ name === "modelValue" ? `modelModifiers` : `${name}Modifiers`
19168
+ );
19169
+ modelPropsDecl += `
19170
+ ${modifierPropName}: {},`;
19161
19171
  }
19162
19172
  return `{${modelPropsDecl}
19163
19173
  }`;
@@ -20567,8 +20577,12 @@ function isStaticNode(node) {
20567
20577
  return false;
20568
20578
  }
20569
20579
 
20570
- const version = "3.4.0-rc.1";
20580
+ const version = "3.4.0-rc.3";
20571
20581
  const parseCache = parseCache$1;
20582
+ const errorMessages = {
20583
+ ...CompilerDOM.errorMessages,
20584
+ ...CompilerDOM.DOMErrorMessages
20585
+ };
20572
20586
  const walk = estreeWalker.walk;
20573
20587
  const shouldTransformRef = () => false;
20574
20588
 
@@ -20583,6 +20597,7 @@ exports.compileScript = compileScript;
20583
20597
  exports.compileStyle = compileStyle;
20584
20598
  exports.compileStyleAsync = compileStyleAsync;
20585
20599
  exports.compileTemplate = compileTemplate;
20600
+ exports.errorMessages = errorMessages;
20586
20601
  exports.extractRuntimeEmits = extractRuntimeEmits;
20587
20602
  exports.extractRuntimeProps = extractRuntimeProps;
20588
20603
  exports.inferRuntimeType = inferRuntimeType;
@@ -221,7 +221,7 @@ export interface SFCParseResult {
221
221
  descriptor: SFCDescriptor;
222
222
  errors: (CompilerError | SyntaxError)[];
223
223
  }
224
- export declare function parse(source: string, { sourceMap, filename, sourceRoot, pad, ignoreEmpty, compiler, parseExpressions }?: SFCParseOptions): SFCParseResult;
224
+ export declare function parse(source: string, { sourceMap, filename, sourceRoot, pad, ignoreEmpty, compiler, parseExpressions, }?: SFCParseOptions): SFCParseResult;
225
225
 
226
226
  type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus';
227
227
 
@@ -468,6 +468,61 @@ export declare function extractRuntimeEmits(ctx: TypeResolveContext): Set<string
468
468
  export declare const version: string;
469
469
 
470
470
  export declare const parseCache: Map<string, SFCParseResult>;
471
+ export declare const errorMessages: {
472
+ 0: string;
473
+ 1: string;
474
+ 2: string;
475
+ 3: string;
476
+ 4: string;
477
+ 5: string;
478
+ 6: string;
479
+ 7: string;
480
+ 8: string;
481
+ 9: string;
482
+ 10: string;
483
+ 11: string;
484
+ 12: string;
485
+ 13: string;
486
+ 14: string;
487
+ 15: string;
488
+ 16: string;
489
+ 17: string;
490
+ 18: string;
491
+ 19: string;
492
+ 20: string;
493
+ 21: string;
494
+ 22: string;
495
+ 23: string;
496
+ 24: string;
497
+ 25: string;
498
+ 26: string;
499
+ 27: string;
500
+ 28: string;
501
+ 29: string;
502
+ 30: string;
503
+ 31: string;
504
+ 32: string;
505
+ 33: string;
506
+ 34: string;
507
+ 35: string;
508
+ 36: string;
509
+ 37: string;
510
+ 38: string;
511
+ 39: string;
512
+ 40: string;
513
+ 41: string;
514
+ 42: string;
515
+ 43: string;
516
+ 44: string;
517
+ 45: string;
518
+ 46: string;
519
+ 47: string;
520
+ 48: string;
521
+ 49: string;
522
+ 50: string;
523
+ 51: string;
524
+ 52: string;
525
+ };
471
526
 
472
527
  export declare const walk: any;
473
528
 
@@ -2150,7 +2150,7 @@ function defaultOnWarn(msg) {
2150
2150
  console.warn(`[Vue warn] ${msg.message}`);
2151
2151
  }
2152
2152
  function createCompilerError(code, loc, messages, additionalMessage) {
2153
- const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ;
2153
+ const msg = (messages || errorMessages$1)[code] + (additionalMessage || ``) ;
2154
2154
  const error = new SyntaxError(String(msg));
2155
2155
  error.code = code;
2156
2156
  error.loc = loc;
@@ -2264,7 +2264,7 @@ const ErrorCodes = {
2264
2264
  "__EXTEND_POINT__": 52,
2265
2265
  "52": "__EXTEND_POINT__"
2266
2266
  };
2267
- const errorMessages = {
2267
+ const errorMessages$1 = {
2268
2268
  // parse errors
2269
2269
  [0]: "Illegal comment.",
2270
2270
  [1]: "CDATA section is allowed only in XML context.",
@@ -18752,7 +18752,6 @@ function createRootCodegen(root, context) {
18752
18752
  true,
18753
18753
  void 0,
18754
18754
  false
18755
- /* isComponent */
18756
18755
  );
18757
18756
  } else ;
18758
18757
  }
@@ -22264,7 +22263,7 @@ function createCodegenContext(ast, {
22264
22263
  generatedLine: context.line,
22265
22264
  generatedColumn: context.column - 1,
22266
22265
  source: filename,
22267
- // @ts-ignore it is possible to be null
22266
+ // @ts-expect-error it is possible to be null
22268
22267
  name
22269
22268
  });
22270
22269
  }
@@ -23457,7 +23456,6 @@ const transformFor = createStructuralDirectiveTransform(
23457
23456
  true,
23458
23457
  void 0,
23459
23458
  false
23460
- /* isComponent */
23461
23459
  );
23462
23460
  } else {
23463
23461
  childBlock = children[0].codegenNode;
@@ -23514,7 +23512,6 @@ const transformFor = createStructuralDirectiveTransform(
23514
23512
  createForLoopParams(forNode.parseResult),
23515
23513
  childBlock,
23516
23514
  true
23517
- /* force newline */
23518
23515
  )
23519
23516
  );
23520
23517
  }
@@ -23772,13 +23769,15 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
23772
23769
  createForLoopParams(parseResult),
23773
23770
  buildDynamicSlot(slotName, slotFunction),
23774
23771
  true
23775
- /* force newline */
23776
23772
  )
23777
23773
  ])
23778
23774
  );
23779
23775
  } else {
23780
23776
  context.onError(
23781
- createCompilerError(32, vFor.loc)
23777
+ createCompilerError(
23778
+ 32,
23779
+ vFor.loc
23780
+ )
23782
23781
  );
23783
23782
  }
23784
23783
  } else {
@@ -25778,7 +25777,7 @@ var CompilerDOM = /*#__PURE__*/Object.freeze({
25778
25777
  createTemplateLiteral: createTemplateLiteral,
25779
25778
  createTransformContext: createTransformContext,
25780
25779
  createVNodeCall: createVNodeCall,
25781
- errorMessages: errorMessages,
25780
+ errorMessages: errorMessages$1,
25782
25781
  extractIdentifiers: extractIdentifiers$1,
25783
25782
  findDir: findDir,
25784
25783
  findProp: findProp,
@@ -26851,7 +26850,7 @@ function generateSourceMap(filename, source, generated, sourceRoot, lineOffset,
26851
26850
  generatedLine,
26852
26851
  generatedColumn: i,
26853
26852
  source: filename,
26854
- // @ts-ignore
26853
+ // @ts-expect-error
26855
26854
  name: null
26856
26855
  });
26857
26856
  }
@@ -30834,21 +30833,21 @@ function parseUriParts(urlString) {
30834
30833
  return urlParse(isString$2(urlString) ? urlString : "", false, true);
30835
30834
  }
30836
30835
 
30837
- var __defProp$8 = Object.defineProperty;
30836
+ var __defProp$9 = Object.defineProperty;
30838
30837
  var __defProps$8 = Object.defineProperties;
30839
30838
  var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
30840
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
30841
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
30842
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
30843
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
30844
- var __spreadValues$8 = (a, b) => {
30839
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
30840
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
30841
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
30842
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
30843
+ var __spreadValues$9 = (a, b) => {
30845
30844
  for (var prop in b || (b = {}))
30846
- if (__hasOwnProp$8.call(b, prop))
30847
- __defNormalProp$8(a, prop, b[prop]);
30848
- if (__getOwnPropSymbols$8)
30849
- for (var prop of __getOwnPropSymbols$8(b)) {
30850
- if (__propIsEnum$8.call(b, prop))
30851
- __defNormalProp$8(a, prop, b[prop]);
30845
+ if (__hasOwnProp$9.call(b, prop))
30846
+ __defNormalProp$9(a, prop, b[prop]);
30847
+ if (__getOwnPropSymbols$9)
30848
+ for (var prop of __getOwnPropSymbols$9(b)) {
30849
+ if (__propIsEnum$9.call(b, prop))
30850
+ __defNormalProp$9(a, prop, b[prop]);
30852
30851
  }
30853
30852
  return a;
30854
30853
  };
@@ -30866,11 +30865,11 @@ const defaultAssetUrlOptions = {
30866
30865
  };
30867
30866
  const normalizeOptions = (options) => {
30868
30867
  if (Object.keys(options).some((key) => isArray$3(options[key]))) {
30869
- return __spreadProps$8(__spreadValues$8({}, defaultAssetUrlOptions), {
30868
+ return __spreadProps$8(__spreadValues$9({}, defaultAssetUrlOptions), {
30870
30869
  tags: options
30871
30870
  });
30872
30871
  }
30873
- return __spreadValues$8(__spreadValues$8({}, defaultAssetUrlOptions), options);
30872
+ return __spreadValues$9(__spreadValues$9({}, defaultAssetUrlOptions), options);
30874
30873
  };
30875
30874
  const createAssetUrlTransformWithOptions = (options) => {
30876
30875
  return (node, context) => transformAssetUrl(node, context, options);
@@ -31367,7 +31366,6 @@ const ssrTransformElement = (node, context) => {
31367
31366
  false,
31368
31367
  false,
31369
31368
  true
31370
- /* ssr */
31371
31369
  );
31372
31370
  if (props || directives.length) {
31373
31371
  const mergedProps = buildSSRProps(props, directives, context);
@@ -31503,7 +31501,6 @@ const ssrTransformElement = (node, context) => {
31503
31501
  createSimpleExpression(" " + attrName, true),
31504
31502
  createSimpleExpression("", true),
31505
31503
  false
31506
- /* no newline */
31507
31504
  )
31508
31505
  );
31509
31506
  } else if (isSSRSafeAttrName(attrName)) {
@@ -31649,7 +31646,6 @@ function ssrTransformTransitionGroup(node, context) {
31649
31646
  true,
31650
31647
  false,
31651
31648
  true
31652
- /* ssr (skip event listeners) */
31653
31649
  );
31654
31650
  let propsExp = null;
31655
31651
  if (props || directives.length) {
@@ -31730,21 +31726,21 @@ function ssrProcessTransition(node, context) {
31730
31726
  }
31731
31727
  }
31732
31728
 
31733
- var __defProp$7 = Object.defineProperty;
31729
+ var __defProp$8 = Object.defineProperty;
31734
31730
  var __defProps$7 = Object.defineProperties;
31735
31731
  var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
31736
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
31737
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
31738
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
31739
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
31740
- var __spreadValues$7 = (a, b) => {
31732
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
31733
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
31734
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
31735
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
31736
+ var __spreadValues$8 = (a, b) => {
31741
31737
  for (var prop in b || (b = {}))
31742
- if (__hasOwnProp$7.call(b, prop))
31743
- __defNormalProp$7(a, prop, b[prop]);
31744
- if (__getOwnPropSymbols$7)
31745
- for (var prop of __getOwnPropSymbols$7(b)) {
31746
- if (__propIsEnum$7.call(b, prop))
31747
- __defNormalProp$7(a, prop, b[prop]);
31738
+ if (__hasOwnProp$8.call(b, prop))
31739
+ __defNormalProp$8(a, prop, b[prop]);
31740
+ if (__getOwnPropSymbols$8)
31741
+ for (var prop of __getOwnPropSymbols$8(b)) {
31742
+ if (__propIsEnum$8.call(b, prop))
31743
+ __defNormalProp$8(a, prop, b[prop]);
31748
31744
  }
31749
31745
  return a;
31750
31746
  };
@@ -31872,7 +31868,6 @@ function ssrProcessComponent(node, context, parent) {
31872
31868
  context,
31873
31869
  false,
31874
31870
  true
31875
- /* withSlotScopeId */
31876
31871
  ),
31877
31872
  vnodeBranch
31878
31873
  );
@@ -31892,16 +31887,16 @@ function ssrProcessComponent(node, context, parent) {
31892
31887
  const rawOptionsMap = /* @__PURE__ */ new WeakMap();
31893
31888
  const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(true);
31894
31889
  const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms];
31895
- const vnodeDirectiveTransforms = __spreadValues$7(__spreadValues$7({}, baseDirectiveTransforms), DOMDirectiveTransforms);
31890
+ const vnodeDirectiveTransforms = __spreadValues$8(__spreadValues$8({}, baseDirectiveTransforms), DOMDirectiveTransforms);
31896
31891
  function createVNodeSlotBranch(slotProps, vFor, children, parentContext) {
31897
31892
  const rawOptions = rawOptionsMap.get(parentContext.root);
31898
- const subOptions = __spreadProps$7(__spreadValues$7({}, rawOptions), {
31893
+ const subOptions = __spreadProps$7(__spreadValues$8({}, rawOptions), {
31899
31894
  // overwrite with vnode-based transforms
31900
31895
  nodeTransforms: [
31901
31896
  ...vnodeNodeTransforms,
31902
31897
  ...rawOptions.nodeTransforms || []
31903
31898
  ],
31904
- directiveTransforms: __spreadValues$7(__spreadValues$7({}, vnodeDirectiveTransforms), rawOptions.directiveTransforms || {})
31899
+ directiveTransforms: __spreadValues$8(__spreadValues$8({}, vnodeDirectiveTransforms), rawOptions.directiveTransforms || {})
31905
31900
  });
31906
31901
  const wrapperProps = [];
31907
31902
  if (slotProps) {
@@ -31934,8 +31929,8 @@ function subTransform(node, options, parentContext) {
31934
31929
  const childRoot = createRoot([node]);
31935
31930
  const childContext = createTransformContext(childRoot, options);
31936
31931
  childContext.ssr = false;
31937
- childContext.scopes = __spreadValues$7({}, parentContext.scopes);
31938
- childContext.identifiers = __spreadValues$7({}, parentContext.identifiers);
31932
+ childContext.scopes = __spreadValues$8({}, parentContext.scopes);
31933
+ childContext.identifiers = __spreadValues$8({}, parentContext.identifiers);
31939
31934
  childContext.imports = parentContext.imports;
31940
31935
  traverseNode(childRoot, childContext);
31941
31936
  ["helpers", "components", "directives"].forEach((key) => {
@@ -32078,7 +32073,9 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
32078
32073
  break;
32079
32074
  case 5:
32080
32075
  context.pushStringPart(
32081
- createCallExpression(context.helper(SSR_INTERPOLATE), [child.content])
32076
+ createCallExpression(context.helper(SSR_INTERPOLATE), [
32077
+ child.content
32078
+ ])
32082
32079
  );
32083
32080
  break;
32084
32081
  case 9:
@@ -32148,7 +32145,6 @@ const ssrTransformModel = (dir, node, context) => {
32148
32145
  createSimpleExpression(" selected", true),
32149
32146
  createSimpleExpression("", true),
32150
32147
  false
32151
- /* no newline */
32152
32148
  )
32153
32149
  );
32154
32150
  }
@@ -32283,7 +32279,6 @@ const ssrTransformShow = (dir, node, context) => {
32283
32279
  )
32284
32280
  ]),
32285
32281
  false
32286
- /* no newline */
32287
32282
  )
32288
32283
  )
32289
32284
  ]
@@ -32384,27 +32379,27 @@ function injectCssVars(node) {
32384
32379
  }
32385
32380
  }
32386
32381
 
32387
- var __defProp$6 = Object.defineProperty;
32382
+ var __defProp$7 = Object.defineProperty;
32388
32383
  var __defProps$6 = Object.defineProperties;
32389
32384
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
32390
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
32391
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
32392
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
32393
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32394
- var __spreadValues$6 = (a, b) => {
32385
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
32386
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
32387
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
32388
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32389
+ var __spreadValues$7 = (a, b) => {
32395
32390
  for (var prop in b || (b = {}))
32396
- if (__hasOwnProp$6.call(b, prop))
32397
- __defNormalProp$6(a, prop, b[prop]);
32398
- if (__getOwnPropSymbols$6)
32399
- for (var prop of __getOwnPropSymbols$6(b)) {
32400
- if (__propIsEnum$6.call(b, prop))
32401
- __defNormalProp$6(a, prop, b[prop]);
32391
+ if (__hasOwnProp$7.call(b, prop))
32392
+ __defNormalProp$7(a, prop, b[prop]);
32393
+ if (__getOwnPropSymbols$7)
32394
+ for (var prop of __getOwnPropSymbols$7(b)) {
32395
+ if (__propIsEnum$7.call(b, prop))
32396
+ __defNormalProp$7(a, prop, b[prop]);
32402
32397
  }
32403
32398
  return a;
32404
32399
  };
32405
32400
  var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
32406
32401
  function compile(source, options = {}) {
32407
- options = __spreadProps$6(__spreadValues$6(__spreadValues$6({}, options), parserOptions), {
32402
+ options = __spreadProps$6(__spreadValues$7(__spreadValues$7({}, options), parserOptions), {
32408
32403
  ssr: true,
32409
32404
  inSSR: true,
32410
32405
  scopeId: options.mode === "function" ? null : options.scopeId,
@@ -32416,7 +32411,7 @@ function compile(source, options = {}) {
32416
32411
  });
32417
32412
  const ast = typeof source === "string" ? baseParse(source, options) : source;
32418
32413
  rawOptionsMap.set(ast, options);
32419
- transform(ast, __spreadProps$6(__spreadValues$6({}, options), {
32414
+ transform(ast, __spreadProps$6(__spreadValues$7({}, options), {
32420
32415
  hoistStatic: false,
32421
32416
  nodeTransforms: [
32422
32417
  ssrTransformIf,
@@ -32433,7 +32428,7 @@ function compile(source, options = {}) {
32433
32428
  ...options.nodeTransforms || []
32434
32429
  // user transforms
32435
32430
  ],
32436
- directiveTransforms: __spreadValues$6({
32431
+ directiveTransforms: __spreadValues$7({
32437
32432
  // reusing core v-bind
32438
32433
  bind: transformBind,
32439
32434
  on: transformOn$1,
@@ -32484,21 +32479,21 @@ function warn(msg) {
32484
32479
  );
32485
32480
  }
32486
32481
 
32487
- var __defProp$5 = Object.defineProperty;
32482
+ var __defProp$6 = Object.defineProperty;
32488
32483
  var __defProps$5 = Object.defineProperties;
32489
32484
  var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
32490
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
32491
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
32492
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
32493
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32494
- var __spreadValues$5 = (a, b) => {
32485
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
32486
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
32487
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
32488
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32489
+ var __spreadValues$6 = (a, b) => {
32495
32490
  for (var prop in b || (b = {}))
32496
- if (__hasOwnProp$5.call(b, prop))
32497
- __defNormalProp$5(a, prop, b[prop]);
32498
- if (__getOwnPropSymbols$5)
32499
- for (var prop of __getOwnPropSymbols$5(b)) {
32500
- if (__propIsEnum$5.call(b, prop))
32501
- __defNormalProp$5(a, prop, b[prop]);
32491
+ if (__hasOwnProp$6.call(b, prop))
32492
+ __defNormalProp$6(a, prop, b[prop]);
32493
+ if (__getOwnPropSymbols$6)
32494
+ for (var prop of __getOwnPropSymbols$6(b)) {
32495
+ if (__propIsEnum$6.call(b, prop))
32496
+ __defNormalProp$6(a, prop, b[prop]);
32502
32497
  }
32503
32498
  return a;
32504
32499
  };
@@ -32508,7 +32503,7 @@ function preprocess$1({ source, filename, preprocessOptions }, preprocessor) {
32508
32503
  let err = null;
32509
32504
  preprocessor.render(
32510
32505
  source,
32511
- __spreadValues$5({ filename }, preprocessOptions),
32506
+ __spreadValues$6({ filename }, preprocessOptions),
32512
32507
  (_err, _res) => {
32513
32508
  if (_err)
32514
32509
  err = _err;
@@ -32529,7 +32524,7 @@ function compileTemplate(options) {
32529
32524
  const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : void 0 : false;
32530
32525
  if (preprocessor) {
32531
32526
  try {
32532
- return doCompileTemplate(__spreadProps$5(__spreadValues$5({}, options), {
32527
+ return doCompileTemplate(__spreadProps$5(__spreadValues$6({}, options), {
32533
32528
  source: preprocess$1(options, preprocessor),
32534
32529
  ast: void 0
32535
32530
  // invalidate AST if template goes through preprocessor
@@ -32610,7 +32605,7 @@ function doCompileTemplate({
32610
32605
  );
32611
32606
  inAST = createRoot(template.children, inAST.source);
32612
32607
  }
32613
- let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$5({
32608
+ let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$6({
32614
32609
  mode: "module",
32615
32610
  prefixIdentifiers: true,
32616
32611
  hoistStatic: true,
@@ -43915,28 +43910,28 @@ function merge(oldMap, newMap) {
43915
43910
 
43916
43911
  var merge$1 = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMap);
43917
43912
 
43918
- var __defProp$4 = Object.defineProperty;
43913
+ var __defProp$5 = Object.defineProperty;
43919
43914
  var __defProps$4 = Object.defineProperties;
43920
43915
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
43921
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
43922
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
43923
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
43924
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
43925
- var __spreadValues$4 = (a, b) => {
43916
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
43917
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
43918
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
43919
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
43920
+ var __spreadValues$5 = (a, b) => {
43926
43921
  for (var prop in b || (b = {}))
43927
- if (__hasOwnProp$4.call(b, prop))
43928
- __defNormalProp$4(a, prop, b[prop]);
43929
- if (__getOwnPropSymbols$4)
43930
- for (var prop of __getOwnPropSymbols$4(b)) {
43931
- if (__propIsEnum$4.call(b, prop))
43932
- __defNormalProp$4(a, prop, b[prop]);
43922
+ if (__hasOwnProp$5.call(b, prop))
43923
+ __defNormalProp$5(a, prop, b[prop]);
43924
+ if (__getOwnPropSymbols$5)
43925
+ for (var prop of __getOwnPropSymbols$5(b)) {
43926
+ if (__propIsEnum$5.call(b, prop))
43927
+ __defNormalProp$5(a, prop, b[prop]);
43933
43928
  }
43934
43929
  return a;
43935
43930
  };
43936
43931
  var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
43937
43932
  const scss = (source, map, options, load = require) => {
43938
43933
  const nodeSass = load("sass");
43939
- const finalOptions = __spreadProps$4(__spreadValues$4({}, options), {
43934
+ const finalOptions = __spreadProps$4(__spreadValues$5({}, options), {
43940
43935
  data: getSource(source, options.filename, options.additionalData),
43941
43936
  file: options.filename,
43942
43937
  outFile: options.filename,
@@ -43964,7 +43959,7 @@ const scss = (source, map, options, load = require) => {
43964
43959
  const sass = (source, map, options, load) => scss(
43965
43960
  source,
43966
43961
  map,
43967
- __spreadProps$4(__spreadValues$4({}, options), {
43962
+ __spreadProps$4(__spreadValues$5({}, options), {
43968
43963
  indentedSyntax: true
43969
43964
  }),
43970
43965
  load
@@ -43975,7 +43970,7 @@ const less = (source, map, options, load = require) => {
43975
43970
  let error = null;
43976
43971
  nodeLess.render(
43977
43972
  getSource(source, options.filename, options.additionalData),
43978
- __spreadProps$4(__spreadValues$4({}, options), { syncImport: true }),
43973
+ __spreadProps$4(__spreadValues$5({}, options), { syncImport: true }),
43979
43974
  (err, output) => {
43980
43975
  error = err;
43981
43976
  result = output;
@@ -44035,32 +44030,32 @@ const processors = {
44035
44030
  stylus: styl
44036
44031
  };
44037
44032
 
44038
- var __defProp$3 = Object.defineProperty;
44033
+ var __defProp$4 = Object.defineProperty;
44039
44034
  var __defProps$3 = Object.defineProperties;
44040
44035
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
44041
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
44042
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
44043
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
44044
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
44045
- var __spreadValues$3 = (a, b) => {
44036
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
44037
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
44038
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
44039
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
44040
+ var __spreadValues$4 = (a, b) => {
44046
44041
  for (var prop in b || (b = {}))
44047
- if (__hasOwnProp$3.call(b, prop))
44048
- __defNormalProp$3(a, prop, b[prop]);
44049
- if (__getOwnPropSymbols$3)
44050
- for (var prop of __getOwnPropSymbols$3(b)) {
44051
- if (__propIsEnum$3.call(b, prop))
44052
- __defNormalProp$3(a, prop, b[prop]);
44042
+ if (__hasOwnProp$4.call(b, prop))
44043
+ __defNormalProp$4(a, prop, b[prop]);
44044
+ if (__getOwnPropSymbols$4)
44045
+ for (var prop of __getOwnPropSymbols$4(b)) {
44046
+ if (__propIsEnum$4.call(b, prop))
44047
+ __defNormalProp$4(a, prop, b[prop]);
44053
44048
  }
44054
44049
  return a;
44055
44050
  };
44056
44051
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
44057
44052
  function compileStyle(options) {
44058
- return doCompileStyle(__spreadProps$3(__spreadValues$3({}, options), {
44053
+ return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), {
44059
44054
  isAsync: false
44060
44055
  }));
44061
44056
  }
44062
44057
  function compileStyleAsync(options) {
44063
- return doCompileStyle(__spreadProps$3(__spreadValues$3({}, options), {
44058
+ return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), {
44064
44059
  isAsync: true
44065
44060
  }));
44066
44061
  }
@@ -44099,7 +44094,7 @@ function doCompileStyle(options) {
44099
44094
  );
44100
44095
  }
44101
44096
  }
44102
- const postCSSOptions = __spreadProps$3(__spreadValues$3({}, postcssOptions), {
44097
+ const postCSSOptions = __spreadProps$3(__spreadValues$4({}, postcssOptions), {
44103
44098
  to: filename,
44104
44099
  from: filename
44105
44100
  });
@@ -44170,7 +44165,7 @@ function preprocess(options, preprocessor) {
44170
44165
  return preprocessor(
44171
44166
  options.source,
44172
44167
  options.inMap || options.map,
44173
- __spreadValues$3({
44168
+ __spreadValues$4({
44174
44169
  filename: options.filename
44175
44170
  }, options.preprocessOptions),
44176
44171
  options.preprocessCustomRequire
@@ -45737,21 +45732,21 @@ function specifierEnd(s, end, nodeEnd) {
45737
45732
  return hasCommas ? end : oldEnd;
45738
45733
  }
45739
45734
 
45740
- var __defProp$2 = Object.defineProperty;
45735
+ var __defProp$3 = Object.defineProperty;
45741
45736
  var __defProps$2 = Object.defineProperties;
45742
45737
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
45743
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
45744
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
45745
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
45746
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
45747
- var __spreadValues$2 = (a, b) => {
45738
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
45739
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
45740
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
45741
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
45742
+ var __spreadValues$3 = (a, b) => {
45748
45743
  for (var prop in b || (b = {}))
45749
- if (__hasOwnProp$2.call(b, prop))
45750
- __defNormalProp$2(a, prop, b[prop]);
45751
- if (__getOwnPropSymbols$2)
45752
- for (var prop of __getOwnPropSymbols$2(b)) {
45753
- if (__propIsEnum$2.call(b, prop))
45754
- __defNormalProp$2(a, prop, b[prop]);
45744
+ if (__hasOwnProp$3.call(b, prop))
45745
+ __defNormalProp$3(a, prop, b[prop]);
45746
+ if (__getOwnPropSymbols$3)
45747
+ for (var prop of __getOwnPropSymbols$3(b)) {
45748
+ if (__propIsEnum$3.call(b, prop))
45749
+ __defNormalProp$3(a, prop, b[prop]);
45755
45750
  }
45756
45751
  return a;
45757
45752
  };
@@ -45789,7 +45784,7 @@ function processNormalScript(ctx, scopeId) {
45789
45784
  export default ${defaultVar}`;
45790
45785
  }
45791
45786
  }
45792
- return __spreadProps$2(__spreadValues$2({}, script), {
45787
+ return __spreadProps$2(__spreadValues$3({}, script), {
45793
45788
  content,
45794
45789
  map,
45795
45790
  bindings,
@@ -45800,21 +45795,21 @@ export default ${defaultVar}`;
45800
45795
  }
45801
45796
  }
45802
45797
 
45803
- var __defProp$1 = Object.defineProperty;
45798
+ var __defProp$2 = Object.defineProperty;
45804
45799
  var __defProps$1 = Object.defineProperties;
45805
45800
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
45806
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
45807
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
45808
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
45809
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
45810
- var __spreadValues$1 = (a, b) => {
45801
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
45802
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
45803
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
45804
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
45805
+ var __spreadValues$2 = (a, b) => {
45811
45806
  for (var prop in b || (b = {}))
45812
- if (__hasOwnProp$1.call(b, prop))
45813
- __defNormalProp$1(a, prop, b[prop]);
45814
- if (__getOwnPropSymbols$1)
45815
- for (var prop of __getOwnPropSymbols$1(b)) {
45816
- if (__propIsEnum$1.call(b, prop))
45817
- __defNormalProp$1(a, prop, b[prop]);
45807
+ if (__hasOwnProp$2.call(b, prop))
45808
+ __defNormalProp$2(a, prop, b[prop]);
45809
+ if (__getOwnPropSymbols$2)
45810
+ for (var prop of __getOwnPropSymbols$2(b)) {
45811
+ if (__propIsEnum$2.call(b, prop))
45812
+ __defNormalProp$2(a, prop, b[prop]);
45818
45813
  }
45819
45814
  return a;
45820
45815
  };
@@ -45922,7 +45917,7 @@ function innerResolveTypeElements(ctx, node, scope, typeParameters) {
45922
45917
  );
45923
45918
  }
45924
45919
  if (
45925
- // @ts-ignore
45920
+ // @ts-expect-error
45926
45921
  SupportedBuiltinsSet.has(typeName)
45927
45922
  ) {
45928
45923
  return resolveBuiltin(
@@ -46024,7 +46019,7 @@ function mergeElements(maps, type) {
46024
46019
  baseProps[key].key,
46025
46020
  {
46026
46021
  type,
46027
- // @ts-ignore
46022
+ // @ts-expect-error
46028
46023
  types: [baseProps[key], props[key]]
46029
46024
  },
46030
46025
  baseProps[key]._ownerScope,
@@ -46211,7 +46206,7 @@ function resolveTemplateKeys(ctx, node, scope) {
46211
46206
  const resolved = resolveStringType(ctx, e, scope);
46212
46207
  const restResolved = resolveTemplateKeys(
46213
46208
  ctx,
46214
- __spreadProps$1(__spreadValues$1({}, node), {
46209
+ __spreadProps$1(__spreadValues$2({}, node), {
46215
46210
  expressions: node.expressions.slice(1),
46216
46211
  quasis: q ? node.quasis.slice(1) : node.quasis
46217
46212
  }),
@@ -46242,14 +46237,14 @@ function resolveBuiltin(ctx, node, name, scope, typeParameters) {
46242
46237
  case "Partial": {
46243
46238
  const res2 = { props: {}, calls: t.calls };
46244
46239
  Object.keys(t.props).forEach((key) => {
46245
- res2.props[key] = __spreadProps$1(__spreadValues$1({}, t.props[key]), { optional: true });
46240
+ res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: true });
46246
46241
  });
46247
46242
  return res2;
46248
46243
  }
46249
46244
  case "Required": {
46250
46245
  const res2 = { props: {}, calls: t.calls };
46251
46246
  Object.keys(t.props).forEach((key) => {
46252
- res2.props[key] = __spreadProps$1(__spreadValues$1({}, t.props[key]), { optional: false });
46247
+ res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: false });
46253
46248
  });
46254
46249
  return res2;
46255
46250
  }
@@ -47069,33 +47064,38 @@ function processDefineModel(ctx, node, declId) {
47069
47064
  if (ctx.modelDecls[modelName]) {
47070
47065
  ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node);
47071
47066
  }
47072
- const optionsString = options && ctx.getString(options);
47073
- ctx.modelDecls[modelName] = {
47074
- type,
47075
- options: optionsString,
47076
- identifier: declId && declId.type === "Identifier" ? declId.name : void 0
47077
- };
47078
- ctx.bindingMetadata[modelName] = "props";
47067
+ let optionsString = options && ctx.getString(options);
47079
47068
  let runtimeOptions = "";
47069
+ let transformOptions = "";
47080
47070
  if (options) {
47081
47071
  if (options.type === "ObjectExpression") {
47082
- const local = options.properties.find(
47083
- (p) => p.type === "ObjectProperty" && (p.key.type === "Identifier" && p.key.name === "local" || p.key.type === "StringLiteral" && p.key.value === "local")
47084
- );
47085
- if (local) {
47086
- runtimeOptions = `{ ${ctx.getString(local)} }`;
47087
- } else {
47088
- for (const p of options.properties) {
47089
- if (p.type === "SpreadElement" || p.computed) {
47090
- runtimeOptions = optionsString;
47091
- break;
47092
- }
47072
+ for (let i = options.properties.length - 1; i >= 0; i--) {
47073
+ const p = options.properties[i];
47074
+ if (p.type === "SpreadElement" || p.computed) {
47075
+ runtimeOptions = optionsString;
47076
+ break;
47077
+ }
47078
+ if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) {
47079
+ transformOptions = ctx.getString(p) + ", " + transformOptions;
47080
+ const offset = p.start - options.start;
47081
+ const next = options.properties[i + 1];
47082
+ const end = (next ? next.start : options.end - 1) - options.start;
47083
+ optionsString = optionsString.slice(0, offset) + optionsString.slice(end);
47093
47084
  }
47094
47085
  }
47086
+ if (!runtimeOptions && transformOptions) {
47087
+ runtimeOptions = `{ ${transformOptions} }`;
47088
+ }
47095
47089
  } else {
47096
47090
  runtimeOptions = optionsString;
47097
47091
  }
47098
47092
  }
47093
+ ctx.modelDecls[modelName] = {
47094
+ type,
47095
+ options: optionsString,
47096
+ identifier: declId && declId.type === "Identifier" ? declId.name : void 0
47097
+ };
47098
+ ctx.bindingMetadata[modelName] = "props";
47099
47099
  ctx.s.overwrite(
47100
47100
  ctx.startOffset + node.start,
47101
47101
  ctx.startOffset + node.end,
@@ -47133,6 +47133,11 @@ function genModelProps(ctx) {
47133
47133
  }
47134
47134
  modelPropsDecl += `
47135
47135
  ${JSON.stringify(name)}: ${decl},`;
47136
+ const modifierPropName = JSON.stringify(
47137
+ name === "modelValue" ? `modelModifiers` : `${name}Modifiers`
47138
+ );
47139
+ modelPropsDecl += `
47140
+ ${modifierPropName}: {},`;
47136
47141
  }
47137
47142
  return `{${modelPropsDecl}
47138
47143
  }`;
@@ -47766,21 +47771,21 @@ function processAwait(ctx, node, needSemi, isStatement) {
47766
47771
  );
47767
47772
  }
47768
47773
 
47769
- var __defProp = Object.defineProperty;
47774
+ var __defProp$1 = Object.defineProperty;
47770
47775
  var __defProps = Object.defineProperties;
47771
47776
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
47772
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
47773
- var __hasOwnProp = Object.prototype.hasOwnProperty;
47774
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
47775
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
47776
- var __spreadValues = (a, b) => {
47777
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
47778
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
47779
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
47780
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
47781
+ var __spreadValues$1 = (a, b) => {
47777
47782
  for (var prop in b || (b = {}))
47778
- if (__hasOwnProp.call(b, prop))
47779
- __defNormalProp(a, prop, b[prop]);
47780
- if (__getOwnPropSymbols)
47781
- for (var prop of __getOwnPropSymbols(b)) {
47782
- if (__propIsEnum.call(b, prop))
47783
- __defNormalProp(a, prop, b[prop]);
47783
+ if (__hasOwnProp$1.call(b, prop))
47784
+ __defNormalProp$1(a, prop, b[prop]);
47785
+ if (__getOwnPropSymbols$1)
47786
+ for (var prop of __getOwnPropSymbols$1(b)) {
47787
+ if (__propIsEnum$1.call(b, prop))
47788
+ __defNormalProp$1(a, prop, b[prop]);
47784
47789
  }
47785
47790
  return a;
47786
47791
  };
@@ -48231,7 +48236,7 @@ let __temp${any}, __restore${any}
48231
48236
  }
48232
48237
  let returned;
48233
48238
  if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) {
48234
- const allBindings = __spreadValues(__spreadValues({}, scriptBindings), setupBindings);
48239
+ const allBindings = __spreadValues$1(__spreadValues$1({}, scriptBindings), setupBindings);
48235
48240
  for (const key in ctx.userImports) {
48236
48241
  if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) {
48237
48242
  allBindings[key] = true;
@@ -48254,7 +48259,7 @@ let __temp${any}, __restore${any}
48254
48259
  if (options.templateOptions && options.templateOptions.ssr) {
48255
48260
  hasInlinedSsrRenderFn = true;
48256
48261
  }
48257
- const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues({
48262
+ const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues$1({
48258
48263
  filename,
48259
48264
  ast: sfc.template.ast,
48260
48265
  source: sfc.template.content,
@@ -48264,7 +48269,7 @@ let __temp${any}, __restore${any}
48264
48269
  scoped: sfc.styles.some((s) => s.scoped),
48265
48270
  isProd: options.isProd,
48266
48271
  ssrCssVars: sfc.cssVars,
48267
- compilerOptions: __spreadProps(__spreadValues({}, options.templateOptions && options.templateOptions.compilerOptions), {
48272
+ compilerOptions: __spreadProps(__spreadValues$1({}, options.templateOptions && options.templateOptions.compilerOptions), {
48268
48273
  inline: true,
48269
48274
  isTS: ctx.isTS,
48270
48275
  bindingMetadata: ctx.bindingMetadata
@@ -48386,7 +48391,7 @@ ${exposeCall}`
48386
48391
  `
48387
48392
  );
48388
48393
  }
48389
- return __spreadProps(__spreadValues({}, scriptSetup), {
48394
+ return __spreadProps(__spreadValues$1({}, scriptSetup), {
48390
48395
  bindings: ctx.bindingMetadata,
48391
48396
  imports: ctx.userImports,
48392
48397
  content: ctx.s.toString(),
@@ -48556,9 +48561,26 @@ function isStaticNode(node) {
48556
48561
  return false;
48557
48562
  }
48558
48563
 
48559
- const version = "3.4.0-rc.1";
48564
+ var __defProp = Object.defineProperty;
48565
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
48566
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
48567
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
48568
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
48569
+ var __spreadValues = (a, b) => {
48570
+ for (var prop in b || (b = {}))
48571
+ if (__hasOwnProp.call(b, prop))
48572
+ __defNormalProp(a, prop, b[prop]);
48573
+ if (__getOwnPropSymbols)
48574
+ for (var prop of __getOwnPropSymbols(b)) {
48575
+ if (__propIsEnum.call(b, prop))
48576
+ __defNormalProp(a, prop, b[prop]);
48577
+ }
48578
+ return a;
48579
+ };
48580
+ const version = "3.4.0-rc.3";
48560
48581
  const parseCache = parseCache$1;
48582
+ const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
48561
48583
  const walk = walk$2;
48562
48584
  const shouldTransformRef = () => false;
48563
48585
 
48564
- export { MagicString, parse_1$1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, extractIdentifiers$1 as extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$7 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers };
48586
+ export { MagicString, parse_1$1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, errorMessages, extractIdentifiers$1 as extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$7 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.4.0-rc.1",
3
+ "version": "3.4.0-rc.3",
4
4
  "description": "@vue/compiler-sfc",
5
5
  "main": "dist/compiler-sfc.cjs.js",
6
6
  "module": "dist/compiler-sfc.esm-browser.js",
@@ -37,10 +37,10 @@
37
37
  "magic-string": "^0.30.5",
38
38
  "postcss": "^8.4.32",
39
39
  "source-map-js": "^1.0.2",
40
- "@vue/compiler-core": "3.4.0-rc.1",
41
- "@vue/compiler-ssr": "3.4.0-rc.1",
42
- "@vue/compiler-dom": "3.4.0-rc.1",
43
- "@vue/shared": "3.4.0-rc.1"
40
+ "@vue/compiler-dom": "3.4.0-rc.3",
41
+ "@vue/compiler-core": "3.4.0-rc.3",
42
+ "@vue/shared": "3.4.0-rc.3",
43
+ "@vue/compiler-ssr": "3.4.0-rc.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@babel/types": "^7.23.6",