@wevu/compiler 7.1.2 → 7.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -471,6 +471,14 @@ interface InlineExpressionScopeResolverAsset {
471
471
  key: string;
472
472
  expression: string;
473
473
  }
474
+ /**
475
+ * 内联表达式生成函数的参数名。
476
+ */
477
+ interface InlineExpressionParameterNames {
478
+ context: string;
479
+ scope: string;
480
+ event: string;
481
+ }
474
482
  /**
475
483
  * 内联表达式资源描述。
476
484
  */
@@ -478,6 +486,8 @@ interface InlineExpressionAsset {
478
486
  id: string;
479
487
  expression: string;
480
488
  scopeKeys: string[];
489
+ /** @internal */
490
+ parameterNames: InlineExpressionParameterNames;
481
491
  indexBindings?: InlineExpressionIndexBindingAsset[];
482
492
  scopeResolvers?: InlineExpressionScopeResolverAsset[];
483
493
  }
@@ -518,6 +528,12 @@ interface ForParseResult {
518
528
  index?: string;
519
529
  key?: string;
520
530
  itemAliases?: Record<string, string>;
531
+ /** 需要在逻辑层完整执行的原始循环项模式。 */
532
+ itemPattern?: string;
533
+ /** 当前循环项模式是否需要投影,避免模板层近似执行。 */
534
+ itemPatternRequiresProjection?: boolean;
535
+ /** 无法等价降级的循环项模式诊断。 */
536
+ itemPatternError?: string;
521
537
  }
522
538
  /**
523
539
  * 模板编译选项。
@@ -739,6 +755,8 @@ interface VueTransformResult {
739
755
  jsonMacroHash?: string;
740
756
  defineOptionsHash?: string;
741
757
  sfcSrcDeps?: string[];
758
+ /** 已解析样式中的 CSS 变量表达式快照。@internal */
759
+ cssVars?: string[];
742
760
  styleBlocks?: SFCStyleBlock[];
743
761
  /**
744
762
  * JSON-only HMR 重算所需的稳定编译输入。
@@ -813,6 +831,12 @@ interface CompileVueFileOptions {
813
831
  * 是否根据绑定清单自动合并 setData.pick。
814
832
  */
815
833
  autoSetDataPick?: boolean;
834
+ /**
835
+ * 在开发期保持 CSS 变量运行时依赖与导出形状稳定。
836
+ *
837
+ * @internal
838
+ */
839
+ stabilizeCssVarsRuntime?: boolean;
816
840
  /**
817
841
  * 绑定清单中记录的源码文件名;默认使用当前编译文件名。
818
842
  */
@@ -1074,18 +1098,20 @@ export declare function mayContainJsonMacro(content: string): boolean;
1074
1098
  export declare function stripJsonMacroCallsFromCode(code: string, filename: string): string;
1075
1099
  //#endregion
1076
1100
  //#region src/plugins/vue/transform/jsonMacros/index.d.ts
1077
- /**
1078
- * 从 `<script setup>` 中提取 JSON 宏配置并返回剥离后的代码。
1079
- */
1080
- export declare function extractJsonMacroFromScriptSetup(content: string, filename: string, lang?: string, options?: {
1101
+ interface JsonMacroExtractionOptions {
1081
1102
  merge?: (target: Record<string, any>, source: Record<string, any>) => Record<string, any> | void;
1082
1103
  preambleContent?: string;
1083
- }): Promise<{
1104
+ }
1105
+ interface JsonMacroExtractionResult {
1084
1106
  stripped: string;
1085
1107
  config?: Record<string, any>;
1086
1108
  macroHash?: string;
1087
1109
  dependencies?: string[];
1088
- }>;
1110
+ }
1111
+ /**
1112
+ * 从 `<script setup>` 中提取 JSON 宏配置并返回剥离后的代码。
1113
+ */
1114
+ export declare function extractJsonMacroFromScriptSetup(content: string, filename: string, lang?: string, options?: JsonMacroExtractionOptions): Promise<JsonMacroExtractionResult>;
1089
1115
  //#endregion
1090
1116
  //#region src/plugins/vue/transform/jsonMerge.d.ts
1091
1117
  /**
@@ -1221,6 +1247,12 @@ interface TransformScriptOptions {
1221
1247
  * 当前 SFC 的 CSS Modules 映射。
1222
1248
  */
1223
1249
  cssModules?: Record<string, Record<string, string>>;
1250
+ /**
1251
+ * 注入空 CSS 变量注册,保持开发期运行时模块图稳定。
1252
+ *
1253
+ * @internal
1254
+ */
1255
+ stabilizeCssVarsRuntime?: boolean;
1224
1256
  }
1225
1257
  //#endregion
1226
1258
  //#region src/plugins/vue/transform/transformScript/index.d.ts