Skip to content

Feat/taro next - #32

Merged
heiazu merged 7 commits into
masterfrom
feat/taro-next
Oct 3, 2026
Merged

heiazu merged 7 commits into
masterfrom
feat/taro-next

Conversation

@heiazu

@heiazu heiazu commented Oct 3, 2026

Copy link
Copy Markdown
Member

No description provided.

heiazu and others added 7 commits September 22, 2026 17:42
Grid 支持(feat/grid 分支原定范围):
- display: grid/inline-grid,grid-template-columns/rows(含 repeat 展平)、
  grid-template 语法糖展开、grid-row/column(-start/end)、grid-area、
  justify-items/justify-self。
- 产物为扁平数值槽位编码(Plan A),运行时无需二次解析;
  minmax/fit-content/auto-fill 回退字符串,命名网格线丢弃。

架构优化第一步:
- 新增 property_registry.rs 单一事实源(128 条注册表),
  CSSPropertyType 枚举与 string_to_css_property_type 由同一张表宏生成;
  数值 id 与线上格式完全一致,ava 46 个快照零变化。
- 新增 registry_is_consistent 单测防回归。

文档:docs/grid-support.md(编码协议、回退策略、运行时消费)。

Co-Authored-By: Claude <noreply@anthropic.com>
- 新增 docs/architecture-refactor.md:
  记录痛点、单一事实源注册表、registry_is_consistent 一致性测试、
  注册表派发(#2)与 StyleValueType 宏化(#3)的完整落地方案、
  46 项 ava 快照零改动的验收红线、Value IR 路线图。
- README 增加架构文档入口链接。

Co-Authored-By: Claude <noreply@anthropic.com>
- property_registry 行追加 src ∈ {pname, id, special, skip} 元数据
- parse_style_properties 由 73 臂 match 改为注册表驱动的 registry_dispatch_property
  + 9 条手写特殊臂(fontFamily / gridTemplate 简写 / content / zIndex / lineClamp /
  textUnderlineOffset / filter / backdropFilter / pointerEvents 走 id)
- style_value_type 枚举与 to_expr 由 for_each_style_value_type! 宏展开
  (Normal/Expr/Variable 仍手写,Animation 占位保留)
- style_property_type 消费侧 pattern 适配新 row 格式
- docs/architecture-refactor §7/§8 改写为『已落地』并补充实现细节

46 个 ava 快照在 --no-update 下全数通过,产物 0 差异。

Co-Authored-By: Claude <noreply@anthropic.com>
测试补正:
- 新增 -webkit-line-clamp 测试:覆盖 vendor-strip 走上 lineClamp 特殊臂
  → Normal::new(WebkitLineClamp, value) = [81]
- 新增 -webkit-appearance -moz-appearance 测试:覆盖 vendor-strip 后无
  注册表条目时走兜底逻辑、产出空 declarations
- 原 typo 用例 (-webkt-line-clamp) 保留快照行不变,仅补注释说明它是
  『确证 typo 不映射到正规属性』的负向样本,避免与真实 webkit 行为混淆

代码清理(register/registry 派发后遗):
- parse_style_properties.rs: 删除 5 个 dead import
  (swc_core::ecma::ast::*, DUMMY_SP, quote_ident, Platform, Animation,
   generate_expr_by_length_value, KeyFrameItem, ToStyleValue)
- json_writer.rs / style_parser.rs: 各删除 1 个 use ...DeclsAndVars 死引用

48 个 ava 全数通过(46 个原有 + 2 个新增快照)。

Co-Authored-By: Claude <noreply@anthropic.com>
@heiazu
heiazu merged commit 248ab9a into master Oct 3, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant