Commit Graph

5 Commits

Author SHA1 Message Date
68e6cc3b80 Merge pull request 'feat: @bchen/ui v0.1.0 — dark-mode token palette and 16px base rule' (#2) from feat/v0.1.0-tokens-extraction into main 2026-05-14 01:02:12 +00:00
8511e0c720 refactor: deduplicate CSS parser helpers and drop redundant base test
- Collapse extractRootBlock + extractDarkBlock into a single extractBlock
  helper; the two functions shared identical body logic (same regex, same
  return) and differed only in the string they received — now the call
  sites pass the appropriate slice inline.
- Remove the second test in base.test.ts ("covers all three form control
  selectors in one rule"): the first test's regex already asserts all
  three selectors appear together with font-size: 16px, so the individual
  /input/, /textarea/, /select/ matches added no coverage.
2026-05-13 17:58:47 -07:00
6b06d00115 feat: add @bchen/ui v0.1.0 — dark-mode token palette and 16px base rule
- dist/tokens.css: canonical light + @media dark semantic-token palette
  extracted from inventory (cross-checked against authd and buchinese).
  Covers --fg, --fg-muted, --bg, --bg-elevated, --surface, --accent*,
  --danger*, --border*, --input-*, --warning, primitive --gray-* scale.
- dist/base.css: `input, textarea, select { font-size: 16px; }` prevents
  iOS Safari auto-zoom on focus.
- tests/tokens.test.ts: vitest — token presence in both light and dark
  blocks; WCAG AA contrast (>=4.5:1 body, >=3.0:1 UI) via inline
  hex-to-luminance math. All 10 tests green.
- tests/base.test.ts: vitest — asserts 16px rule covers all three selectors.
- .gitea/workflows/release.yml: tag-triggered CI — npm ci + npm test,
  CHANGELOG version gate, dist/scripts security grep, Gitea release
  artifact upload.
- README.md: four-step consumer integration guide with copy-pasteable
  snippets (package.json dep, Dockerfile cp, HTML link tags, app CSS).
- CHANGELOG.md: v0.1.0 entry.

npm audit --omit=dev: 0 vulnerabilities

Closes #1
2026-05-13 17:56:08 -07:00
da38554c17 chore: add .gitignore (exclude node_modules, .env, settings.local.json) 2026-05-13 17:29:10 -07:00
d349886691 Initial commit 2026-05-13 19:00:54 +00:00