@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.
- package/LICENSE +21 -0
- package/README.md +33 -36
- package/generated/atom63.figma-sync.json +23201 -0
- package/generated/atom63.tokens.json +19649 -8416
- package/generated/z-layers.d.ts +33 -0
- package/generated/z-layers.js +31 -0
- package/package.json +35 -21
- package/src/compat/a63-from-shadcn.css +275 -0
- package/src/compat/shadcn.browser.test.ts +23 -0
- package/src/compat/shadcn.css +133 -17
- package/src/contracts/action.css +4 -3
- package/src/contracts/action.native.css +11 -0
- package/src/contracts/action.tokens.json +66 -0
- package/src/contracts/badge.css +128 -58
- package/src/contracts/badge.resolver.json +454 -0
- package/src/contracts/choice.css +5 -2
- package/src/contracts/choice.native.css +9 -0
- package/src/contracts/choice.tokens.json +66 -0
- package/src/contracts/control.css +54 -57
- package/src/contracts/control.native.css +13 -0
- package/src/contracts/control.tokens.json +294 -0
- package/src/contracts/environment.css +178 -60
- package/src/contracts/environment.native.css +23 -0
- package/src/contracts/environment.resolver.json +1210 -0
- package/src/contracts/field.css +4 -2
- package/src/contracts/field.tokens.json +40 -0
- package/src/contracts/marker.css +6 -4
- package/src/contracts/marker.tokens.json +15 -0
- package/src/contracts/menu.css +25 -61
- package/src/contracts/menu.native.css +10 -0
- package/src/contracts/menu.resolver.json +122 -0
- package/src/contracts/overlay.css +11 -13
- package/src/contracts/overlay.native.css +13 -0
- package/src/contracts/overlay.tokens.json +103 -0
- package/src/contracts/segment.css +22 -68
- package/src/contracts/segment.tokens.json +19 -0
- package/src/contracts/selection.css +5 -1
- package/src/contracts/selection.tokens.json +42 -0
- package/src/contracts/skeleton.css +18 -2
- package/src/contracts/skeleton.resolver.json +62 -0
- package/src/contracts/surface.css +17 -24
- package/src/contracts/surface.native.css +17 -0
- package/src/contracts/surface.tokens.json +154 -0
- package/src/contracts/toggle.css +27 -3
- package/src/contracts/toggle.resolver.json +129 -0
- package/src/contracts/track.css +3 -1
- package/src/contracts/track.tokens.json +39 -0
- package/src/contracts/trigger.css +5 -2
- package/src/contracts/trigger.native.css +9 -0
- package/src/contracts/trigger.tokens.json +58 -0
- package/src/contracts/widget.css +76 -51
- package/src/contracts/widget.native.css +23 -0
- package/src/contracts/widget.resolver.json +1110 -0
- package/src/tailwind/roles.json +189 -0
- package/src/tailwind/theme.css +216 -24
- package/src/tailwind/utilities.css +17 -0
- package/src/themes/aqua.css +126 -89
- package/src/themes/aqua.native.css +80 -0
- package/src/themes/aqua.resolver.json +1304 -0
- package/src/themes/modern.css +10 -14
- package/src/themes/modern.native.css +16 -0
- package/src/themes/modern.resolver.json +350 -0
- package/src/themes/retro.css +22 -26
- package/src/themes/retro.native.css +16 -0
- package/src/themes/retro.resolver.json +794 -0
- package/src/themes/terminal.css +151 -41
- package/src/themes/terminal.native.css +22 -0
- package/src/themes/terminal.resolver.json +585 -0
- package/src/tokens/brand-action.css +65 -0
- package/src/tokens/brand-action.resolver.json +155 -0
- package/src/tokens/brand-ramp.css +108 -0
- package/src/tokens/brand-ramp.resolver.json +418 -0
- package/src/tokens/brand.css +6 -146
- package/src/tokens/color-mix-space.browser.test.ts +101 -0
- package/src/tokens/contrast.browser.test.ts +257 -5
- package/src/tokens/density.browser.test.ts +167 -0
- package/src/tokens/figma-parity.browser.test.ts +270 -0
- package/src/tokens/font.css +13 -0
- package/src/tokens/font.resolver.json +128 -0
- package/src/tokens/form-factor.browser.test.ts +129 -0
- package/src/tokens/foundation/effects.css +13 -13
- package/src/tokens/foundation/effects.resolver.json +433 -0
- package/src/tokens/foundation/fonts.css +11 -5
- package/src/tokens/foundation/fonts.tokens.json +45 -0
- package/src/tokens/foundation/motion.css +3 -0
- package/src/tokens/foundation/motion.tokens.json +53 -0
- package/src/tokens/foundation/palette.css +3 -0
- package/src/tokens/foundation/palette.tokens.json +1743 -0
- package/src/tokens/foundation/primitives.css +20 -43
- package/src/tokens/foundation/primitives.tokens.json +3258 -0
- package/src/tokens/foundation/radius.css +11 -9
- package/src/tokens/foundation/radius.tokens.json +108 -0
- package/src/tokens/foundation/typography.css +49 -12
- package/src/tokens/foundation/typography.native.css +21 -0
- package/src/tokens/foundation/typography.resolver.json +1008 -0
- package/src/tokens/foundation.css +0 -1
- package/src/tokens/index.css +1 -0
- package/src/tokens/motion.css +3 -1
- package/src/tokens/motion.resolver.json +135 -0
- package/src/tokens/native-values.json +38 -0
- package/src/tokens/personalization-axes.browser.test.ts +20 -4
- package/src/tokens/plate-scope.browser.test.ts +73 -0
- package/src/tokens/radius.css +12 -8
- package/src/tokens/radius.resolver.json +138 -0
- package/src/tokens/semantics.css +656 -39
- package/src/tokens/semantics.resolver.json +1606 -0
- package/src/tokens/space.css +8 -6
- package/src/tokens/space.tokens.json +78 -0
- package/src/tokens/surface.css +13 -19
- package/src/tokens/surface.resolver.json +706 -0
- package/src/tokens/swift-parity.browser.test.ts +141 -0
- package/src/tokens/type-roles.css +88 -0
- package/src/tokens/type-roles.resolver.json +419 -0
- package/src/tokens/type-scale.css +6 -0
- package/src/tokens/type-scale.resolver.json +67 -0
- package/generated/atom63.figma-tokens.json +0 -21650
- package/src/tokens/foundation/aliases.css +0 -28
- 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
|
-
|
|
20
|
-
|
|
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
|
-
|
|
41
|
-
|
|
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.
|
|
90
|
-
|
|
91
|
-
|
|
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.
|
|
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
|
|
121
|
-
| **Theme** | `themes
|
|
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
|
|
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.
|
|
172
|
-
`:root, [data-a63-brand]` so they re-resolve per
|
|
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
|
|
181
|
-
| Status | `--a63-status-info`, `--a63-status-success`, `--a63-status-warning` (+ `-foreground`) | `semantics.css` |
|
|
182
|
-
| Focus | `--a63-focus-ring` | `
|
|
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-*`,
|