@fractaldesign/fractalstyler 0.0.0-stage → 0.9.0

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 (46) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +123 -2
  3. package/cli/main.mjs +141 -0
  4. package/cli/scaffold.mjs +406 -0
  5. package/data/recipes.json +61 -0
  6. package/dist/asset.d.ts +3 -0
  7. package/dist/css/fractalstyler.css +2453 -0
  8. package/dist/css/fractalstyler.min.css +2 -0
  9. package/dist/index.d.ts +6 -0
  10. package/dist/index.js +6 -0
  11. package/dist/styles/_00_config.sass +29 -0
  12. package/dist/styles/_00_fonts.sass +58 -0
  13. package/dist/styles/_00_tokens.sass +211 -0
  14. package/dist/styles/_01_base.sass +58 -0
  15. package/dist/styles/_02_dimensions.sass +70 -0
  16. package/dist/styles/_03_typography.sass +170 -0
  17. package/dist/styles/_04_containers.sass +173 -0
  18. package/dist/styles/_05_layouts.sass +104 -0
  19. package/dist/styles/_06_shells.sass +135 -0
  20. package/dist/styles/_07_interactions.sass +212 -0
  21. package/dist/styles/_08_visuals.sass +136 -0
  22. package/dist/styles/_09_own.sass +174 -0
  23. package/dist/styles/colorpacks.sass +119 -0
  24. package/dist/styles/index.sass +14 -0
  25. package/dist/styles/themeplates.sass +159 -0
  26. package/docs/REGISTRY.api.md +477 -0
  27. package/docs/REGISTRY.md +14 -0
  28. package/docs/references/configurations-api.md +220 -0
  29. package/docs/references/configurations.md +258 -0
  30. package/lint/browser.mjs +79 -0
  31. package/lint/cli.mjs +212 -0
  32. package/lint/lib/agent-reporter.mjs +51 -0
  33. package/lint/lib/fuzzy.mjs +45 -0
  34. package/lint/lib/registry.mjs +107 -0
  35. package/lint/lib/sass-linter.mjs +71 -0
  36. package/lint/lib/svelte-linter.mjs +116 -0
  37. package/lint/lib/token-linter.mjs +97 -0
  38. package/package.json +112 -5
  39. package/registry.json +3999 -0
  40. package/scripts/class-vocab.js +197 -0
  41. package/scripts/update-registry.js +934 -0
  42. package/skills/fractal-styler/references/fractals.md +630 -0
  43. package/skills/fractal-styler/references/tokens.md +226 -0
  44. package/skills/fractalstyler/SKILL.md +59 -0
  45. package/skills/fractalstyler/references/fractals.md +630 -0
  46. package/skills/fractalstyler/references/tokens.md +226 -0
@@ -0,0 +1,226 @@
1
+ # Fractalstyler2 — Token Reference
2
+
3
+ GENERATED FILE — do not edit. Emitted by `scripts/update-registry.js`
4
+ from `_00_tokens.sass` (light/dark mixins + `:root`) and the shadow specs in
5
+ `_00_config.sass`.
6
+
7
+ Every `--space-*` step is a class family: if `--space-md` exists, so do
8
+ `.gap-md`, `.pad-md` and `.mar-md` (plus the `.px`/`.py`/`.pt`… sides).
9
+ There is no second vocabulary to learn.
10
+
11
+ ## Type Scale
12
+
13
+ Fixed rem rungs up to base, then compounded by `--text-scaling` (1.25).
14
+
15
+ | Token | Class | Value |
16
+ |:---|:---|:---|
17
+ | `--text-xs` | `.text-xs` | `0.67rem` |
18
+ | `--text-sm` | `.text-sm` | `0.75rem` |
19
+ | `--text-md` | `.text-md` | `0.875rem` |
20
+ | `--text-bs` | `.text-bs` | `1rem` |
21
+ | `--text-lg` | `.text-lg` | `calc(var(--text-bs) * var(--text-scaling))` |
22
+ | `--text-xl` | `.text-xl` | `calc(var(--text-lg) * var(--text-scaling))` |
23
+ | `--text-2xl` | `.text-2xl` | `calc(var(--text-xl) * var(--text-scaling))` |
24
+ | `--text-3xl` | `.text-3xl` | `calc(var(--text-2xl) * var(--text-scaling))` |
25
+ | `--text-4xl` | `.text-4xl` | `calc(var(--text-3xl) * var(--text-scaling))` |
26
+ | `--text-5xl` | `.text-5xl` | `calc(var(--text-4xl) * var(--text-scaling))` |
27
+
28
+ | Token | Class | Value |
29
+ |:---|:---|:---|
30
+ | `--text-scaling` | — | `1.25` |
31
+
32
+ ## Space Scale
33
+
34
+ `--unit-space` (0.25rem) times a step multiplier. Every step feeds the
35
+ gap/pad/mar families in L1.
36
+
37
+ | Token | Class | Value |
38
+ |:---|:---|:---|
39
+ | `--unit-space` | — | `0.25rem` |
40
+
41
+ | Token | Class | Value |
42
+ |:---|:---|:---|
43
+ | `--space-xs` | `.gap-xs` `.pad-xs` `.mar-xs` + sides | `var(--unit-space)` |
44
+ | `--space-sm` | `.gap-sm` `.pad-sm` `.mar-sm` + sides | `calc(var(--unit-space) * 2)` |
45
+ | `--space-md` | `.gap-md` `.pad-md` `.mar-md` + sides | `calc(var(--unit-space) * 3)` |
46
+ | `--space-bs` | `.gap-bs` `.pad-bs` `.mar-bs` + sides | `calc(var(--unit-space) * 4)` |
47
+ | `--space-lg` | `.gap-lg` `.pad-lg` `.mar-lg` + sides | `calc(var(--unit-space) * 6)` |
48
+ | `--space-xl` | `.gap-xl` `.pad-xl` `.mar-xl` + sides | `calc(var(--unit-space) * 8)` |
49
+ | `--space-2xl` | `.gap-2xl` `.pad-2xl` `.mar-2xl` + sides | `calc(var(--unit-space) * 12)` |
50
+ | `--space-3xl` | `.gap-3xl` `.pad-3xl` `.mar-3xl` + sides | `calc(var(--unit-space) * 16)` |
51
+
52
+ ## Radius
53
+
54
+ Six channels. Compositions read the tokens, never a literal radius.
55
+
56
+ | Token | Class | Value |
57
+ |:---|:---|:---|
58
+ | `--radius-xs` | `.radius-xs` | `2px` |
59
+ | `--radius-sm` | `.radius-sm` | `4px` |
60
+ | `--radius-md` | `.radius-md` | `8px` |
61
+ | `--radius-bs` | `.radius-bs` | `16px` |
62
+ | `--radius-lg` | `.radius-lg` | `32px` |
63
+ | `--radius-full` | `.radius-full` | `9999px` |
64
+
65
+ ## Control & Component Metrics
66
+
67
+ Heights for inputs, selects and buttons; avatar and switch channels.
68
+
69
+ | Token | Class | Value |
70
+ |:---|:---|:---|
71
+ | `--control-h-sm` | — | `21px` |
72
+ | `--control-h-bs` | — | `32px` |
73
+ | `--control-h-lg` | — | `38px` |
74
+ | `--avatar-size` | — | `32px` |
75
+ | `--switch-w` | — | `40px` |
76
+ | `--switch-h` | — | `22px` |
77
+ | `--switch-thumb` | — | `16px` |
78
+ | `--height-sm` | `.h-sm` | `16px` |
79
+ | `--height-md` | `.h-md` | `20px` |
80
+ | `--height-bs` | `.h-bs` | `27px` |
81
+ | `--height-lg` | `.h-lg` | `32px` |
82
+
83
+ ## Motion Language
84
+
85
+ Durations, easings and the composed `--motion*` channels every transition reads.
86
+
87
+ | Token | Class | Value |
88
+ |:---|:---|:---|
89
+ | `--transin1` | — | `cubic-bezier(0.470, 0.000, 0.745, 0.715)` |
90
+ | `--transin2` | — | `cubic-bezier(0.550, 0.055, 0.675, 0.190)` |
91
+ | `--transin3` | — | `cubic-bezier(0.755, 0.050, 0.855, 0.060)` |
92
+ | `--transout1` | — | `cubic-bezier(0.390, 0.575, 0.565, 1.000)` |
93
+ | `--transout2` | — | `cubic-bezier(0.215, 0.610, 0.355, 1.000)` |
94
+ | `--transout3` | — | `cubic-bezier(0.230, 1.000, 0.320, 1.000)` |
95
+ | `--speed0` | — | `50ms` |
96
+ | `--speed1` | — | `90ms` |
97
+ | `--speed2` | — | `140ms` |
98
+ | `--speed3` | — | `220ms` |
99
+ | `--motionin1` | — | `var(--speed0) var(--transin1)` |
100
+ | `--motionout1` | — | `var(--speed1) var(--transout1)` |
101
+ | `--motionin2` | — | `var(--speed2) var(--transin2)` |
102
+ | `--motionout2` | — | `var(--speed2) var(--transout2)` |
103
+ | `--motionin3` | — | `var(--speed3) var(--transin3)` |
104
+ | `--motionout3` | — | `var(--speed3) var(--transout3)` |
105
+
106
+ ## Colour Roles
107
+
108
+ Name the role, never the hex. Values shown are the light default;
109
+ `[data-mode='dark']` remaps them via `=dark-theme-tokens`.
110
+
111
+ | Token | Class | Value |
112
+ |:---|:---|:---|
113
+ | `--white-fixed` | `.text-white` | `#FFFFFF` |
114
+ | `--black-fixed` | `.text-black` | `#171717` |
115
+ | `--bg` | — | `#ffffff` |
116
+ | `--bg-surface` | — | `#FBFBF9` |
117
+ | `--bg-panel` | — | `#FBFBF9` |
118
+ | `--bg-sunken` | — | `#F7F6F0` |
119
+ | `--bg-raised` | — | `#F4F4F5` |
120
+ | `--bg-extra` | — | `rgb(247, 248, 249)` |
121
+ | `--bg-input` | — | `#f8f9fa` |
122
+ | `--bg-button` | — | `#CED8D3` |
123
+ | `--text-primary` | .text-primary | `#262627` |
124
+ | `--text-secondary` | .text-secondary | `#777777` |
125
+ | `--text-muted` | .text-muted | `#a3a4a7` |
126
+ | `--text-inverse` | .text-inverse | `#ffffff` |
127
+ | `--state-surface` | — | `#F2EFE9` |
128
+ | `--state-hover` | — | `#ECE7DF` |
129
+ | `--state-selected` | — | `#E4DFD5` |
130
+ | `--border` | — | `#d8d8d8` |
131
+ | `--border-subtle` | — | `#eceaea` |
132
+ | `--border-strong` | — | `#cfcfcf` |
133
+ | `--theme-color` | `.text-theme` | `#ff4400` |
134
+ | `--theme-color-alt` | — | `#be2f00` |
135
+ | `--theme-color-sub` | — | `#feb18a` |
136
+ | `--success` | `.text-success` `.bg-success` | `#10B981` |
137
+ | `--success-hover` | — | `#059669` |
138
+ | `--warning` | `.text-warning` `.bg-warning` | `#F59E0B` |
139
+ | `--warning-hover` | — | `#D97706` |
140
+ | `--danger` | `.text-danger` `.bg-danger` | `#bf2a2a` |
141
+ | `--danger-hover` | — | `#DC2626` |
142
+ | `--info` | `.text-info` `.bg-info` | `#3B82F6` |
143
+ | `--info-hover` | — | `#2563EB` |
144
+ | `--ring` | — | `rgba(0, 127, 78, 0.35)` |
145
+
146
+ ## Elevation
147
+
148
+ `--shadow-*` channels are what the `.shadow-*` classes read; `--shade-*` are
149
+ loop-generated from `$shadow-specs` in `_00_config.sass` (rim + key + ambient).
150
+
151
+ | Token | Class | Value |
152
+ |:---|:---|:---|
153
+ | `--shadow-color` | — | `15 13 42` |
154
+ | `--shadow-rim` | — | `transparent` |
155
+ | `--shadow-xs` | `.shadow-xs` | `0 1px 2px rgb(var(--shadow-color) / 0.14)` |
156
+ | `--shadow-sm` | `.shadow-sm` | `0 1px 2px rgb(var(--shadow-color) / 0.10), 0 2px 4px rgb(var(--shadow-color) / 0.06)` |
157
+ | `--shadow-md` | `.shadow-md` | `0 2px 4px rgb(var(--shadow-color) / 0.06), 0 8px 16px rgb(var(--shadow-color) / 0.06)` |
158
+ | `--shadow-bs` | `.shadow-bs` | `0 2px 4px rgb(var(--shadow-color) / 0.06), 0 6px 14px rgb(var(--shadow-color) / 0.06)` |
159
+ | `--shadow-lg` | `.shadow-lg` | `0 4px 8px rgb(var(--shadow-color) / 0.06), 0 12px 24px rgb(var(--shadow-color) / 0.06)` |
160
+ | `--shadow-xl` | `.shadow-xl` | `0 8px 16px rgb(var(--shadow-color) / 0.06), 0 20px 36px rgb(var(--shadow-color) / 0.06)` |
161
+ | `--shadow-2xl` | `.shadow-2xl` | `0 12px 24px rgb(var(--shadow-color) / 0.06), 0 28px 48px rgb(var(--shadow-color) / 0.06)` |
162
+ | `--shadow-3xl` | `.shadow-3xl` | `0 16px 32px rgb(var(--shadow-color) / 0.06), 0 36px 64px rgb(var(--shadow-color) / 0.06)` |
163
+ | `--shadow-umbra` | — | `rgb(0 0 0 / 0.50)` |
164
+ | `--shade-xs` | — | `var(--shadow-rim), 0 1px 1px rgb(var(--shadow-color) / 0.14), 0 0px 0px rgb(var(--shadow-color) / 0.00)` |
165
+ | `--shade-sm` | — | `var(--shadow-rim), 0 1px 2px rgb(var(--shadow-color) / 0.12), 0 1px 3px rgb(var(--shadow-color) / 0.02)` |
166
+ | `--shade-md` | — | `var(--shadow-rim), 0 2px 4px rgb(var(--shadow-color) / 0.09), 0 3px 6px rgb(var(--shadow-color) / 0.04)` |
167
+ | `--shade-bs` | — | `var(--shadow-rim), 0 2px 4px rgb(var(--shadow-color) / 0.06), 0 6px 14px rgb(var(--shadow-color) / 0.06)` |
168
+ | `--shade-lg` | — | `var(--shadow-rim), 0 4px 8px rgb(var(--shadow-color) / 0.04), 0 12px 24px rgb(var(--shadow-color) / 0.08)` |
169
+ | `--shade-xl` | — | `var(--shadow-rim), 0 6px 12px rgb(var(--shadow-color) / 0.03), 0 20px 36px rgb(var(--shadow-color) / 0.09)` |
170
+ | `--shade-2xl` | — | `var(--shadow-rim), 0 8px 16px rgb(var(--shadow-color) / 0.02), 0 28px 48px rgb(var(--shadow-color) / 0.09)` |
171
+ | `--shade-3xl` | — | `var(--shadow-rim), 0 12px 24px rgb(var(--shadow-color) / 0.02), 0 36px 64px rgb(var(--shadow-color) / 0.08)` |
172
+ | `--shadow-color` | — | `15 13 42` |
173
+ | `--shadow-rim` | — | `transparent` |
174
+
175
+ ## Fonts, Layout Constants & Page Chrome
176
+
177
+ Font stacks plus the page geometry the shells and viewport classes read.
178
+
179
+ | Token | Class | Value |
180
+ |:---|:---|:---|
181
+ | `--font-sans` | — | `"Timeless Sans", sans-serif` |
182
+ | `--timeless-sans` | — | `"Timeless Sans", sans-serif` |
183
+ | `--timeless-grotesk` | — | `"Timeless Grotesk", sans-serif` |
184
+ | `--header-height` | — | `64px` |
185
+ | `--footer-height` | — | `32px` |
186
+ | `--fit-height` | — | `calc(var(--header-height) + var(--footer-height))` |
187
+ | `--prose-clamp` | — | `65ch` |
188
+ | `--content-clamp` | — | `1600px` |
189
+ | `--app-inline` | — | `var(--space-lg)` |
190
+ | `--card-min` | — | `240px` |
191
+ | `--sidebar-width` | — | `280px` |
192
+ | `--sidebar-width-left` | — | `280px` |
193
+ | `--sidebar-width-right` | — | `280px` |
194
+ | `--z-sticky` | — | `100` |
195
+ | `--z-raised` | — | `200` |
196
+ | `--z-modal` | — | `300` |
197
+ | `--z-toast` | — | `500` |
198
+
199
+ ## Pop Colors
200
+
201
+ Named accent literals. The `.orange1`…`.orange6` ink classes read
202
+ `--orangepop*`; the green set is reserved for future use.
203
+
204
+ | Token | Class | Value |
205
+ |:---|:---|:---|
206
+ | `--greenpop1` | — | `#70e000` |
207
+ | `--greenpop2` | — | `#00df89` |
208
+ | `--greenpop3` | — | `#69ff97` |
209
+ | `--greenpop4` | — | `#00e676` |
210
+ | `--orangepop1` | `.orange1` | `#ff7700` |
211
+ | `--orangepop2` | `.orange2` | `#ff4400` |
212
+ | `--orangepop3` | `.orange3` | `#ff0055` |
213
+ | `--orangepop4` | `.orange4` | `#ff5e36` |
214
+ | `--orangepop5` | `.orange5` | `#ff9966` |
215
+ | `--orangepop6` | `.orange6` | `#ff9f1c` |
216
+
217
+ ## Modes & Attribute Axes
218
+
219
+ `data-mode` on the root selects the token mixin: `light` (default) or `dark`.
220
+
221
+ | Attribute | Where | Values | Effect |
222
+ |:---|:---|:---|:---|
223
+ | `data-mode` | `<html>` | `light` \| `dark` | Swaps `=light-theme-tokens` / `=dark-theme-tokens` |
224
+ | `data-shape` | `.card`, `button` | `modern` \| `curved` \| `round` | Corner treatment of the component |
225
+ | `data-variant` | `button` | `primary` \| `secondary` \| `soft` \| `outline` \| `ghost` \| `link` \| `destructive` | Paint variant of the button quartet |
226
+ | `data-size` | `button` | `sm` \| `md` \| `bs` \| `lg` | Metrics variant of the button quartet |