@wevu/compiler 7.11.0-dev.20261112.3 → 7.11.0-dev.20261113.1

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
@@ -18,7 +18,7 @@ export declare const builtinComponentsSet: Set<string>;
18
18
  * 判断标签是否为内置组件。
19
19
  */
20
20
  export declare function isBuiltinComponent(tag: string): boolean;
21
- type CompilerDiagnosticCode = 'WV1002' | 'WV1003' | 'WV2003' | 'WV2002' | 'WV2001' | 'WV1001';
21
+ type CompilerDiagnosticCode = 'WV1001' | 'WV1002' | 'WV1003' | 'WV1004' | 'WV1005' | 'WV1006' | 'WV1007' | 'WV1008' | 'WV1009' | 'WV1010' | 'WV2001' | 'WV2002' | 'WV2003';
22
22
  type CompilerDiagnosticSeverity = 'error' | 'warning';
23
23
  type CompilerDiagnosticSource = 'expression' | 'jsx' | 'script' | 'sfc' | 'style' | 'template';
24
24
  /**
@@ -1983,6 +1983,8 @@ interface MiniProgramPlatform {
1983
1983
  name: string;
1984
1984
  /** 非微信宿主复用 WXML 语法时,显式关闭原生插槽上下文协议。 */
1985
1985
  nativeSlotContext?: boolean;
1986
+ /** 是否支持把 Vue Teleport 映射为原生 root-portal(当前仅微信真机支持)。 */
1987
+ supportsRootPortal?: boolean;
1986
1988
  directives: MiniProgramDirectiveAttrs;
1987
1989
  wrapIf: (exp: string, content: string, renderMustache: (exp: string) => string) => string;
1988
1990
  wrapElseIf: (exp: string, content: string, renderMustache: (exp: string) => string) => string;
@@ -2117,12 +2119,27 @@ interface ForParseResult {
2117
2119
  /** 无法等价降级的循环项模式诊断。 */
2118
2120
  itemPatternError?: string;
2119
2121
  }
2122
+ /**
2123
+ * 不可映射 Teleport 时的诊断级别。
2124
+ */
2125
+ type TeleportUnsupportedMode = 'warn' | 'error';
2126
+ /**
2127
+ * Vue Teleport 映射为 root-portal 的编译选项。
2128
+ */
2129
+ interface TeleportCompileOptions {
2130
+ /** 不可映射时的诊断级别,默认 `warn`。 */
2131
+ unsupported?: TeleportUnsupportedMode;
2132
+ /** 是否启用 Teleport → root-portal 映射,默认 `true`。 */
2133
+ enabled?: boolean;
2134
+ }
2120
2135
  /**
2121
2136
  * 模板编译选项。
2122
2137
  */
2123
2138
  interface TemplateCompileOptions {
2124
2139
  platform?: MiniProgramPlatform;
2125
2140
  isPage?: boolean;
2141
+ /** Vue Teleport 映射为小程序 root-portal 的编译配置。 */
2142
+ teleport?: TeleportCompileOptions;
2126
2143
  /**
2127
2144
  * Vue `<script setup>` props 解构重命名映射,key 为模板中使用的本地别名,value 为原始 prop 名。
2128
2145
  */