Files
heroui-vue/tests/package
maoyingjie dc859fb8ae feat(styles): export shared field variant maps and restore the border fallback
HD-05 scope, against heroui ce90ea3 styles sources:

- add labelVariants/descriptionVariants/fieldErrorVariants/
  textFieldVariants/switchGroupVariants (+ VariantProps types) to
  @heroui-vue/styles and re-export them from @heroui-vue/components;
  variant keys, defaultVariants and slot sets match the pinned
  *.styles.ts files key for key (hv- namespace only)
- Label/Description/FieldError/useTextField/SwitchGroup now consume
  those mappings instead of inline class strings, so the state classes
  have a single source; rendered class output is unchanged and pinned
  by tests/shared-field-styles.test.ts (mapping output <-> component
  output)
- restore the global border-color fallback
  (*, ::after, ::before, ::backdrop, ::file-selector-button ->
  border-color: var(--border, currentColor)) in a new base/base.css,
  imported layer(base) right after preflight like the pinned entry:
  a low-priority default that components, utilities and consumer CSS
  override without !important
- view-transition globals from the pinned base.css stay unported: no
  View Transitions API usage exists in the library or docs site
- shared-styles package contract: packed runtime exports from both
  entries, variant-output assertions, CSS tokens incl. the fallback,
  strict nodenext+bundler type contract, and a real-browser consumer
  fixture (light/dark --border, explicit colors, consumer overrides,
  currentColor fallback) wired into check-package.mjs
- docs: styling layers/border fallback/exports notes, five component
  API pages, compatibility matrix and upstream source records

Full suite 111 files / 1634 tests, typecheck and build:docs pass;
shared-styles + api-root-aliases + handbook-styles verified against
the final tarballs.
2026-10-28 23:36:59 +08:00
..

独立客户端产物验收

统一入口,参数只选受影响的契约:

node scripts/check-package.mjs b02-pickers
node scripts/check-package.mjs calendar date-field select --offline

入口先构建库/样式,在工作区外新建临时消费者,打包并安装最终tarball,检查所选公共导出/CSS/变体,再运行相应*-contract.ts的strict NodeNext/bundler正反例。不会启动服务或执行SSR/水合。NodeNext只是类型解析模式。支持的ID见client-checks.json;无效ID会在构建前失败。

一次选择多个受影响ID,共享同次构建/安装;不要为每组件手动复制一套安装流程。默认消费者保留供检查,路径打印在日志中,不是新项目或长期工作目录。--offline仅在所需依赖已缓存时使用,安装失败不是验收通过。

契约与浏览器

  • client-checks.json:导出、CSS标记、暂不公开组件的边界;check-client.mjs:共用检查和少数变体断言。
  • *-contract.ts:公开Props/事件/插槽类型正反例;@ts-expect-error出现unused必须修复,不能删反例。源码typecheck不能替代发布类型。
  • B02浏览器夹具和B01浏览器夹具保留。选择b02-pickers时,入口会把浏览器文件放入独立消费者;按输出命令显式启动,验可见/点击/焦点等核心路径。未启动时不能声称已验浏览器。
  • 新公共组件在已有数据与契约上增量扩展,不再新增consume-某批次.mjs脚本或手写另一套消费者流程。

旧15份consume脚本已移除;客户端导出/CSS/变体检查统一保留,服务端HTML/无document运行等断言不再维护。SSR/水合/Nuxt集成不支持。逐像素自动对比、完整读屏矩阵、真机矩阵暂不投入;基础键盘/可访问性与重点浏览器交互仍验证。