@atom63/styles 0.1.0-beta.0 → 0.1.0-beta.10

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 (118) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -36
  3. package/generated/atom63.figma-sync.json +23201 -0
  4. package/generated/atom63.tokens.json +19649 -8416
  5. package/generated/z-layers.d.ts +33 -0
  6. package/generated/z-layers.js +31 -0
  7. package/package.json +35 -21
  8. package/src/compat/a63-from-shadcn.css +275 -0
  9. package/src/compat/shadcn.browser.test.ts +23 -0
  10. package/src/compat/shadcn.css +133 -17
  11. package/src/contracts/action.css +4 -3
  12. package/src/contracts/action.native.css +11 -0
  13. package/src/contracts/action.tokens.json +66 -0
  14. package/src/contracts/badge.css +128 -58
  15. package/src/contracts/badge.resolver.json +454 -0
  16. package/src/contracts/choice.css +5 -2
  17. package/src/contracts/choice.native.css +9 -0
  18. package/src/contracts/choice.tokens.json +66 -0
  19. package/src/contracts/control.css +54 -57
  20. package/src/contracts/control.native.css +13 -0
  21. package/src/contracts/control.tokens.json +294 -0
  22. package/src/contracts/environment.css +178 -60
  23. package/src/contracts/environment.native.css +23 -0
  24. package/src/contracts/environment.resolver.json +1210 -0
  25. package/src/contracts/field.css +4 -2
  26. package/src/contracts/field.tokens.json +40 -0
  27. package/src/contracts/marker.css +6 -4
  28. package/src/contracts/marker.tokens.json +15 -0
  29. package/src/contracts/menu.css +25 -61
  30. package/src/contracts/menu.native.css +10 -0
  31. package/src/contracts/menu.resolver.json +122 -0
  32. package/src/contracts/overlay.css +11 -13
  33. package/src/contracts/overlay.native.css +13 -0
  34. package/src/contracts/overlay.tokens.json +103 -0
  35. package/src/contracts/segment.css +22 -68
  36. package/src/contracts/segment.tokens.json +19 -0
  37. package/src/contracts/selection.css +5 -1
  38. package/src/contracts/selection.tokens.json +42 -0
  39. package/src/contracts/skeleton.css +18 -2
  40. package/src/contracts/skeleton.resolver.json +62 -0
  41. package/src/contracts/surface.css +17 -24
  42. package/src/contracts/surface.native.css +17 -0
  43. package/src/contracts/surface.tokens.json +154 -0
  44. package/src/contracts/toggle.css +27 -3
  45. package/src/contracts/toggle.resolver.json +129 -0
  46. package/src/contracts/track.css +3 -1
  47. package/src/contracts/track.tokens.json +39 -0
  48. package/src/contracts/trigger.css +5 -2
  49. package/src/contracts/trigger.native.css +9 -0
  50. package/src/contracts/trigger.tokens.json +58 -0
  51. package/src/contracts/widget.css +76 -51
  52. package/src/contracts/widget.native.css +23 -0
  53. package/src/contracts/widget.resolver.json +1110 -0
  54. package/src/tailwind/roles.json +189 -0
  55. package/src/tailwind/theme.css +216 -24
  56. package/src/tailwind/utilities.css +17 -0
  57. package/src/themes/aqua.css +126 -89
  58. package/src/themes/aqua.native.css +80 -0
  59. package/src/themes/aqua.resolver.json +1304 -0
  60. package/src/themes/modern.css +10 -14
  61. package/src/themes/modern.native.css +16 -0
  62. package/src/themes/modern.resolver.json +350 -0
  63. package/src/themes/retro.css +22 -26
  64. package/src/themes/retro.native.css +16 -0
  65. package/src/themes/retro.resolver.json +794 -0
  66. package/src/themes/terminal.css +151 -41
  67. package/src/themes/terminal.native.css +22 -0
  68. package/src/themes/terminal.resolver.json +585 -0
  69. package/src/tokens/brand-action.css +65 -0
  70. package/src/tokens/brand-action.resolver.json +155 -0
  71. package/src/tokens/brand-ramp.css +108 -0
  72. package/src/tokens/brand-ramp.resolver.json +418 -0
  73. package/src/tokens/brand.css +6 -146
  74. package/src/tokens/color-mix-space.browser.test.ts +101 -0
  75. package/src/tokens/contrast.browser.test.ts +257 -5
  76. package/src/tokens/density.browser.test.ts +167 -0
  77. package/src/tokens/figma-parity.browser.test.ts +270 -0
  78. package/src/tokens/font.css +13 -0
  79. package/src/tokens/font.resolver.json +128 -0
  80. package/src/tokens/form-factor.browser.test.ts +129 -0
  81. package/src/tokens/foundation/effects.css +13 -13
  82. package/src/tokens/foundation/effects.resolver.json +433 -0
  83. package/src/tokens/foundation/fonts.css +11 -5
  84. package/src/tokens/foundation/fonts.tokens.json +45 -0
  85. package/src/tokens/foundation/motion.css +3 -0
  86. package/src/tokens/foundation/motion.tokens.json +53 -0
  87. package/src/tokens/foundation/palette.css +3 -0
  88. package/src/tokens/foundation/palette.tokens.json +1743 -0
  89. package/src/tokens/foundation/primitives.css +20 -43
  90. package/src/tokens/foundation/primitives.tokens.json +3258 -0
  91. package/src/tokens/foundation/radius.css +11 -9
  92. package/src/tokens/foundation/radius.tokens.json +108 -0
  93. package/src/tokens/foundation/typography.css +49 -12
  94. package/src/tokens/foundation/typography.native.css +21 -0
  95. package/src/tokens/foundation/typography.resolver.json +1008 -0
  96. package/src/tokens/foundation.css +0 -1
  97. package/src/tokens/index.css +1 -0
  98. package/src/tokens/motion.css +3 -1
  99. package/src/tokens/motion.resolver.json +135 -0
  100. package/src/tokens/native-values.json +38 -0
  101. package/src/tokens/personalization-axes.browser.test.ts +20 -4
  102. package/src/tokens/plate-scope.browser.test.ts +73 -0
  103. package/src/tokens/radius.css +12 -8
  104. package/src/tokens/radius.resolver.json +138 -0
  105. package/src/tokens/semantics.css +656 -39
  106. package/src/tokens/semantics.resolver.json +1606 -0
  107. package/src/tokens/space.css +8 -6
  108. package/src/tokens/space.tokens.json +78 -0
  109. package/src/tokens/surface.css +13 -19
  110. package/src/tokens/surface.resolver.json +706 -0
  111. package/src/tokens/swift-parity.browser.test.ts +141 -0
  112. package/src/tokens/type-roles.css +88 -0
  113. package/src/tokens/type-roles.resolver.json +419 -0
  114. package/src/tokens/type-scale.css +6 -0
  115. package/src/tokens/type-scale.resolver.json +67 -0
  116. package/generated/atom63.figma-tokens.json +0 -21650
  117. package/src/tokens/foundation/aliases.css +0 -28
  118. package/src/z-layers.ts +0 -40
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 You Zhang (ATOM63)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -16,29 +16,16 @@ Built by You Zhang through Hermes Agent
16
16
 
17
17
  ### Install
18
18
 
19
- The package name is `@atom63/styles`. Public npm availability is not promised
20
- yet: the currently verified paths are a workspace dependency or a locally
21
- packed tarball. Public publishing requires YZ approval and confirmation of the
22
- npm organization policy.
23
-
24
- After an approved public release, install by package name:
19
+ `@atom63/styles` is available as a public npm beta. It is not yet a stable API,
20
+ so install from the explicit `beta` dist-tag:
25
21
 
26
22
  ```sh
27
- pnpm add @atom63/styles
28
- ```
29
-
30
- Until then, use the workspace dependency:
31
-
32
- ```json
33
- {
34
- "dependencies": {
35
- "@atom63/styles": "workspace:*"
36
- }
37
- }
23
+ pnpm add @atom63/styles@beta
38
24
  ```
39
25
 
40
- For a non-workspace consumer, pack the package and install the generated
41
- `atom63-styles-*.tgz` file by path.
26
+ React adopters should start with the
27
+ [public beta quickstart](../../docs/design-system/quickstart.md), which covers
28
+ both `@atom63/styles` and `@atom63/ui-react`.
42
29
 
43
30
  ### Minimum setup
44
31
 
@@ -86,13 +73,14 @@ variable names can import `@atom63/styles/compat/shadcn`.
86
73
  ### Stable vs preview
87
74
 
88
75
  The production consumption path is verified by `pnpm check:ds-pack-smoke`
89
- against packed tarballs. Public publishing still requires YZ approval and npm
90
- organization policy. Some token, adapter, and package surfaces may remain
91
- preview while API hardening continues; do not infer stability from an export
92
- alone.
76
+ against packed tarballs. The package is publicly available under the `beta`
77
+ tag, but some token, adapter, and package surfaces may remain preview while API
78
+ hardening continues; do not infer stability from an export alone.
93
79
 
94
80
  ### Docs
95
81
 
82
+ - [Public beta quickstart](../../docs/design-system/quickstart.md)
83
+ - [Support and governance policy](../../docs/design-system/support-governance.md)
96
84
  - [Design system handbook](../../docs/design-system/README.md)
97
85
  - [Authoring surfaces](../../docs/design-system/authoring-surfaces.md)
98
86
  - [Production readiness audit](../../docs/design-system/production-readiness-audit.md)
@@ -112,13 +100,16 @@ Tailwind/shadcn names are the day-to-day design surface. Shared-scale drift
112
100
  Default entry `@atom63/styles` (`src/index.css`) imports **tokens → contracts →
113
101
  themes → os → animations → utils only** — never `tailwind/`, never `compat/`.
114
102
 
103
+ Most layers are authored as DTCG sources (`*.tokens.json`, `*.resolver.json`); the `.css` next to
104
+ each source is generated by `pnpm --filter @atom63/styles generate:tokens` and must not be edited.
105
+
115
106
  | Layer | Path | Purpose | May reference |
116
107
  | --- | --- | --- | --- |
117
108
  | **Foundation** | `tokens/foundation/*` | **Shared dictionaries** — palette, spacing, sizes, z, radius, fonts, typography, generic shadow/blur scales, motion | nothing (literals) or other foundation |
118
- | **Semantic** (canonical) | `tokens/semantics.css` + `tokens/brand.css` | `--a63-*` intent roles (surface/text/border/status; primary + focus in brand). Alias/compose foundation; light/dark resolution lives here | foundation |
109
+ | **Semantic** (canonical) | `tokens/semantics.resolver.json` + `tokens/brand-{ramp,action}.resolver.json` (generated `semantics.css`, `brand.css`) | `--a63-*` intent roles (surface/text/border/status; primary + focus in brand). Alias/compose foundation; light/dark resolution lives here | foundation |
119
110
  | **Scale bridges** | `tokens/{space,radius,type-scale,font,motion}.css` | `--a63-*` semantic scale aliases over the foundation | foundation |
120
- | **Contract** | `contracts/*` | Shared component-family contracts (`control`, `field`, `overlay`, `badge`, …) + environment dimensions (`environment.css`) | semantic + scale bridges |
121
- | **Theme** | `themes/*` | Skin character under `[data-a63-theme]` — assigns contracts; **may** own theme-private material (gel/bevel/CRT). No new shared scales; never structure | semantic + foundation |
111
+ | **Contract** | `contracts/*.tokens.json`, `contracts/*.resolver.json` | Shared component-family contracts (`control`, `field`, `overlay`, `badge`, …) + environment dimensions (`environment.resolver.json`) | semantic + scale bridges |
112
+ | **Theme** | `themes/*.resolver.json` | Skin character under `[data-a63-theme]` — assigns contracts; **may** own theme-private material (gel/bevel/CRT). No new shared scales; never structure | semantic + foundation |
122
113
  | **OS** | `os/*` | Chrome **structure** + chrome-specific paint tokens that compose from semantics (`--a63-os-*`) under `[data-a63-os]` — peer of theme | foundation + semantic |
123
114
  | **Animations** | `animations/*` | Generic executable CSS (keyframes) | foundation |
124
115
  | **Utils** | `utils/*` | Reusable utilities (scrollbars, masks, code highlighting, view transitions, debug) | semantic + foundation |
@@ -135,8 +126,11 @@ Primitive → Semantic (--a63-*) → Design Language → Mode → Theme → OS
135
126
  ```
136
127
 
137
128
  - **Primitive / Semantic** — `tokens/foundation/*`, `tokens/semantics.css`
138
- - **Design Language / Input / Density** — `contracts/environment.css`
139
- (`[data-a63-design-language]`, `[data-a63-input]`, `[data-a63-density]`)
129
+ - **Design Language / Input / Density / Form factor** — `contracts/environment.css`
130
+ (`[data-a63-design-language]`, `[data-a63-input]`, `[data-a63-density]`,
131
+ `[data-a63-form-factor='phone']`). The phone form factor sets the type steps
132
+ to the iOS text sizes (body 17px) and the iOS control ramp inside a phone
133
+ screen; `AppView layout="phone"` stamps it, viewport width does not.
140
134
  - **Mode** — `.light` / `.dark` (`[data-a63-mode]`) on the semantic layer
141
135
  - **Theme** — `themes/*.css` under `[data-a63-theme]` (visual skin / paint)
142
136
  - **OS** — `os/*.css` under `[data-a63-os]` (chrome structure + chrome paint
@@ -166,21 +160,24 @@ of bug; run it after touching the token layers.
166
160
 
167
161
  ## Canonical `--a63-*` semantic tokens
168
162
 
169
- Surfaces, text, borders, danger/status, and scrim are defined in
163
+ Surfaces, text, borders, danger/status, scrim and media colors are defined in
164
+ `tokens/semantics.resolver.json`, one resolver context per mode, generated into
170
165
  `tokens/semantics.css` (`:root, .light` + `.dark` overrides). Primary action and
171
- focus ring are brand-derived in `tokens/brand.css` (scoped to
172
- `:root, [data-a63-brand]` so they re-resolve per ramp). Together these are the
173
- single source of semantic truth.
166
+ focus ring are brand-derived in `tokens/brand-action.resolver.json`, generated into
167
+ `tokens/brand.css` (scoped to `:root, [data-a63-brand]` so they re-resolve per
168
+ ramp). Together these are the single source of semantic truth.
174
169
 
175
170
  | Group | Tokens | Home |
176
171
  | --- | --- | --- |
177
172
  | Surface | `--a63-surface-page`, `--a63-surface-panel`, `--a63-surface-overlay`, `--a63-surface-muted`, `--a63-surface-control`, `--a63-surface-control-hover` | `semantics.css` |
178
- | Text | `--a63-text-primary`, `--a63-text-secondary` | `semantics.css` |
173
+ | Text | `--a63-text-primary`, `--a63-text-secondary`, `--a63-text-danger` (error and destructive text; `--a63-action-danger` is the fill) | `semantics.css` |
179
174
  | Border | `--a63-border-subtle`, `--a63-border-control` | `semantics.css` |
180
- | Action | `--a63-action-primary` (+ `-hover`, `-foreground`), `--a63-action-danger` (+ `-hover`, `-foreground`), `--a63-action-neutral` (+ `-foreground`) | primary/focus in `brand.css`; danger/neutral in `semantics.css` |
181
- | Status | `--a63-status-info`, `--a63-status-success`, `--a63-status-warning` (+ `-foreground`) | `semantics.css` |
182
- | Focus | `--a63-focus-ring` | `brand.css` |
175
+ | Action | `--a63-action-primary` (+ `-hover`, `-foreground`), `--a63-action-danger` (+ `-hover`, `-foreground`), `--a63-action-neutral` (+ `-foreground`) | primary in `brand-action.css`; danger/neutral in `semantics.css` |
176
+ | Status | `--a63-status-info`, `--a63-status-success`, `--a63-status-warning`, `--a63-status-danger` (+ `-foreground`) | `semantics.css` |
177
+ | Focus | `--a63-focus-ring` (brand step 600 in light, 400 in dark: 3:1 against surfaces, WCAG 1.4.11) | `semantics.css` |
183
178
  | Scrim | `--a63-scrim` | `semantics.css` |
179
+ | Media | `--a63-media-stage`, `--a63-media-scrim` (behind full-screen photos and video, black in every theme) | `semantics.css` |
180
+ | On media | `--a63-on-media-foreground`, `--a63-on-media-surface` (+ `-strong`), `--a63-on-media-border`, `--a63-on-media-ring`, `--a63-on-media-veil` (+ `-strong`) — controls over photos and video, whose colors are unknowable, so these hold in every theme | `semantics.css` |
184
181
 
185
182
  Contract tokens (`--a63-control-*`, `--a63-field-*`, `--a63-overlay-*`,
186
183
  `--a63-badge-*`, `--a63-space-*`, `--a63-radius-*`, `--a63-motion-*`,