@wevu/compiler 6.16.28 → 6.16.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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -10
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -6964,13 +6964,8 @@ function matchesSlotFallbackWrapperMatcher(matcher, value) {
6964
6964
  if (Array.isArray(matcher)) return matcher.some((item) => matchesSlotFallbackWrapperMatcher(item, value));
6965
6965
  return typeof matcher === "string" ? matcher === value : matcher.test(value);
6966
6966
  }
6967
- function normalizeSlotFallbackWrapperTag(tag, context) {
6968
- const normalized = tag?.trim() || "view";
6969
- if (normalized === "block") {
6970
- context.warnings.push("slot fallback wrapper 不支持配置为 block,已回退为 view。");
6971
- return "view";
6972
- }
6973
- return normalized;
6967
+ function normalizeSlotFallbackWrapperTag(tag) {
6968
+ return tag?.trim() || "view";
6974
6969
  }
6975
6970
  function mergeSlotFallbackWrapperAttrs(base, override) {
6976
6971
  if (!base) return override;
@@ -6982,16 +6977,16 @@ function mergeSlotFallbackWrapperAttrs(base, override) {
6982
6977
  }
6983
6978
  function resolveSlotFallbackWrapper(context, info) {
6984
6979
  const resolved = {
6985
- tag: normalizeSlotFallbackWrapperTag(context.slotFallbackWrapper.tag, context),
6980
+ tag: normalizeSlotFallbackWrapperTag(context.slotFallbackWrapper.tag),
6986
6981
  attrs: context.slotFallbackWrapper.attrs,
6987
6982
  singleRootNoWrapper: context.slotFallbackWrapper.singleRootNoWrapper ?? context.slotSingleRootNoWrapper
6988
6983
  };
6989
6984
  for (const rule of context.slotFallbackWrapper.rules) if (matchesSlotFallbackWrapperMatcher(rule.component, info.component) && matchesSlotFallbackWrapperMatcher(rule.componentName, info.componentName) && matchesSlotFallbackWrapperMatcher(rule.slot, info.slot)) {
6990
- if (rule.tag) resolved.tag = normalizeSlotFallbackWrapperTag(rule.tag, context);
6985
+ if (rule.tag) resolved.tag = normalizeSlotFallbackWrapperTag(rule.tag);
6991
6986
  if (rule.attrs) resolved.attrs = mergeSlotFallbackWrapperAttrs(resolved.attrs, rule.attrs);
6992
6987
  if (rule.singleRootNoWrapper !== void 0) resolved.singleRootNoWrapper = rule.singleRootNoWrapper;
6993
6988
  }
6994
- if (info.local?.tag) resolved.tag = normalizeSlotFallbackWrapperTag(info.local.tag, context);
6989
+ if (info.local?.tag) resolved.tag = normalizeSlotFallbackWrapperTag(info.local.tag);
6995
6990
  if (info.local?.staticClass !== void 0) resolved.staticClass = info.local.staticClass;
6996
6991
  if (info.local?.dynamicClassExp !== void 0) resolved.dynamicClassExp = info.local.dynamicClassExp;
6997
6992
  if (info.local?.staticStyle !== void 0) resolved.staticStyle = info.local.staticStyle;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wevu/compiler",
3
3
  "type": "module",
4
- "version": "6.16.28",
4
+ "version": "6.16.29",
5
5
  "description": "wevu 编译器基础包,面向小程序模板的编译与转换",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -50,9 +50,9 @@
50
50
  "merge": "^2.1.1",
51
51
  "pathe": "^2.0.3",
52
52
  "vue": "^3.5.35",
53
- "@weapp-core/constants": "0.1.11",
53
+ "@weapp-core/constants": "0.1.12",
54
54
  "@weapp-core/shared": "3.0.4",
55
- "@weapp-vite/ast": "6.16.28",
55
+ "@weapp-vite/ast": "6.16.29",
56
56
  "rolldown-require": "2.0.18"
57
57
  },
58
58
  "publishConfig": {