@dedesfr/prompter 0.8.23 → 1.0.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.
- package/CHANGELOG.md +70 -0
- package/README.md +105 -77
- package/dist/cli/index.js +25 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -7
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +60 -299
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +56 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +4 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +14 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +31 -41
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/whoami.d.ts +4 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +42 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/core/auth-store.d.ts +10 -0
- package/dist/core/auth-store.d.ts.map +1 -0
- package/dist/core/auth-store.js +39 -0
- package/dist/core/auth-store.js.map +1 -0
- package/dist/core/configurators/slash/antigravity.d.ts +2 -5
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +2 -57
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/base.d.ts +6 -18
- package/dist/core/configurators/slash/base.d.ts.map +1 -1
- package/dist/core/configurators/slash/base.js +8 -77
- package/dist/core/configurators/slash/base.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts +2 -5
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +2 -57
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts +2 -5
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +2 -57
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/droid.d.ts +2 -5
- package/dist/core/configurators/slash/droid.d.ts.map +1 -1
- package/dist/core/configurators/slash/droid.js +2 -32
- package/dist/core/configurators/slash/droid.js.map +1 -1
- package/dist/core/configurators/slash/forge.d.ts +2 -5
- package/dist/core/configurators/slash/forge.d.ts.map +1 -1
- package/dist/core/configurators/slash/forge.js +2 -32
- package/dist/core/configurators/slash/forge.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts +2 -7
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +2 -96
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/index.d.ts +1 -1
- package/dist/core/configurators/slash/index.d.ts.map +1 -1
- package/dist/core/configurators/slash/index.js +1 -1
- package/dist/core/configurators/slash/index.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts +2 -5
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +2 -57
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts +2 -5
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +2 -57
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/configurators/slash/registry.d.ts +4 -4
- package/dist/core/configurators/slash/registry.d.ts.map +1 -1
- package/dist/core/configurators/slash/registry.js.map +1 -1
- package/dist/core/registry.d.ts +18 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +94 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/templates/index.d.ts +0 -1
- package/dist/core/templates/index.d.ts.map +1 -1
- package/dist/core/templates/index.js +0 -1
- package/dist/core/templates/index.js.map +1 -1
- package/package.json +7 -1
- package/AGENTS.md +0 -123
- package/CLAUDE.md +0 -17
- package/build.js +0 -20
- package/convex-setup.md +0 -403
- package/dist/core/templates/slash-command-templates.d.ts +0 -7
- package/dist/core/templates/slash-command-templates.d.ts.map +0 -1
- package/dist/core/templates/slash-command-templates.js +0 -1041
- package/dist/core/templates/slash-command-templates.js.map +0 -1
- package/prompt/ai-humanizer.md +0 -45
- package/prompt/api-contract-generator.md +0 -234
- package/prompt/apply.md +0 -17
- package/prompt/archive.md +0 -21
- package/prompt/design-system.md +0 -210
- package/prompt/document-explainer.md +0 -149
- package/prompt/epic-generator.md +0 -198
- package/prompt/epic-single.md +0 -47
- package/prompt/erd-generator.md +0 -130
- package/prompt/fsd-generator.md +0 -157
- package/prompt/prd-agent-generator.md +0 -147
- package/prompt/prd-generator.md +0 -195
- package/prompt/product-brief.md +0 -289
- package/prompt/proposal.md +0 -22
- package/prompt/qa-test-scenario.md +0 -133
- package/prompt/skill-creator.md +0 -350
- package/prompt/story-generator.md +0 -278
- package/prompt/story-single.md +0 -70
- package/prompt/tdd-generator.md +0 -294
- package/prompt/tdd-lite-generator.md +0 -224
- package/prompt/wireframe-generator.md +0 -219
- package/skills/ai-context-generator/SKILL.md +0 -54
- package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
- package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
- package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
- package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
- package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
- package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
- package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
- package/skills/cerebro/SKILL.md +0 -187
- package/skills/cerebro/references/agents.md +0 -213
- package/skills/code-review/SKILL.md +0 -373
- package/skills/code-review/assets/report-template-agent.md +0 -212
- package/skills/code-review/assets/report-template-compact.md +0 -81
- package/skills/code-review/assets/report-template-full.md +0 -264
- package/skills/code-review/assets/report-template-human.md +0 -168
- package/skills/code-review/references/universal-patterns.md +0 -495
- package/skills/design-md/README.md +0 -34
- package/skills/design-md/SKILL.md +0 -172
- package/skills/design-md/examples/DESIGN.md +0 -154
- package/skills/design-system-generator/SKILL.md +0 -324
- package/skills/design-system-generator/assets/design-system-template.md +0 -348
- package/skills/design-system-generator/references/extraction-patterns.md +0 -321
- package/skills/doc-builder/SKILL.md +0 -115
- package/skills/doc-builder/references/ui-patterns.md +0 -394
- package/skills/document-translator/SKILL.md +0 -58
- package/skills/enhance-prompt/README.md +0 -34
- package/skills/enhance-prompt/SKILL.md +0 -204
- package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
- package/skills/feature-planner/SKILL.md +0 -305
- package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
- package/skills/frontend-design/LICENSE.txt +0 -177
- package/skills/frontend-design/SKILL.md +0 -42
- package/skills/gamma-builder/SKILL.md +0 -134
- package/skills/laravel-code-review/SKILL.md +0 -383
- package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
- package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
- package/skills/laravel-code-review/assets/report-template-full.md +0 -253
- package/skills/laravel-code-review/assets/report-template-human.md +0 -159
- package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
- package/skills/laravel-code-review/references/php84-features.md +0 -442
- package/skills/mcp-builder/LICENSE.txt +0 -202
- package/skills/mcp-builder/SKILL.md +0 -236
- package/skills/mcp-builder/reference/evaluation.md +0 -602
- package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
- package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
- package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
- package/skills/mcp-builder/scripts/connections.py +0 -151
- package/skills/mcp-builder/scripts/evaluation.py +0 -373
- package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
- package/skills/mcp-builder/scripts/requirements.txt +0 -2
- package/skills/meeting-notes/SKILL.md +0 -159
- package/skills/meeting-notes/evals/evals.json +0 -23
- package/skills/project-orchestrator/SKILL.md +0 -487
- package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
- package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
- package/skills/prompter-specs/SKILL.md +0 -115
- package/skills/prompter-workflow/SKILL.md +0 -166
- package/skills/prompter-workflow/evals/evals.json +0 -89
- package/skills/sph-generator/SKILL.md +0 -488
- package/skills/ui-ux-pro/SKILL.md +0 -199
- package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
- package/skills/ui-ux-pro/references/component-patterns.md +0 -255
- package/skills/ui-ux-pro/references/design-principles.md +0 -167
- package/src/cli/index.ts +0 -223
- package/src/commands/archive.ts +0 -302
- package/src/commands/change.ts +0 -292
- package/src/commands/config.ts +0 -233
- package/src/commands/guide.ts +0 -50
- package/src/commands/init.ts +0 -899
- package/src/commands/list.ts +0 -194
- package/src/commands/show.ts +0 -138
- package/src/commands/spec.ts +0 -251
- package/src/commands/update.ts +0 -156
- package/src/commands/upgrade.ts +0 -30
- package/src/commands/validate.ts +0 -326
- package/src/core/artifact-graph/graph.ts +0 -167
- package/src/core/artifact-graph/index.ts +0 -44
- package/src/core/artifact-graph/instruction-loader.ts +0 -302
- package/src/core/artifact-graph/resolver.ts +0 -226
- package/src/core/artifact-graph/schema.ts +0 -124
- package/src/core/artifact-graph/state.ts +0 -64
- package/src/core/artifact-graph/types.ts +0 -65
- package/src/core/completions/command-registry.ts +0 -382
- package/src/core/completions/completion-provider.ts +0 -128
- package/src/core/completions/generators/bash-generator.ts +0 -191
- package/src/core/completions/generators/fish-generator.ts +0 -188
- package/src/core/completions/generators/powershell-generator.ts +0 -223
- package/src/core/completions/generators/zsh-generator.ts +0 -281
- package/src/core/completions/templates/bash-templates.ts +0 -24
- package/src/core/completions/templates/fish-templates.ts +0 -40
- package/src/core/completions/templates/powershell-templates.ts +0 -25
- package/src/core/completions/templates/zsh-templates.ts +0 -36
- package/src/core/completions/types.ts +0 -90
- package/src/core/config-schema.ts +0 -230
- package/src/core/config.ts +0 -181
- package/src/core/configurators/slash/antigravity.ts +0 -70
- package/src/core/configurators/slash/base.ts +0 -203
- package/src/core/configurators/slash/claude.ts +0 -70
- package/src/core/configurators/slash/codex.ts +0 -70
- package/src/core/configurators/slash/droid.ts +0 -44
- package/src/core/configurators/slash/forge.ts +0 -44
- package/src/core/configurators/slash/github-copilot.ts +0 -114
- package/src/core/configurators/slash/index.ts +0 -10
- package/src/core/configurators/slash/kilocode.ts +0 -70
- package/src/core/configurators/slash/opencode.ts +0 -70
- package/src/core/configurators/slash/registry.ts +0 -51
- package/src/core/converters/json-converter.ts +0 -62
- package/src/core/global-config.ts +0 -136
- package/src/core/parsers/change-parser.ts +0 -234
- package/src/core/parsers/markdown-parser.ts +0 -237
- package/src/core/parsers/requirement-blocks.ts +0 -234
- package/src/core/prompt-templates.ts +0 -3504
- package/src/core/schemas/base.schema.ts +0 -20
- package/src/core/schemas/change.schema.ts +0 -42
- package/src/core/schemas/index.ts +0 -20
- package/src/core/schemas/spec.schema.ts +0 -17
- package/src/core/skill-discovery.ts +0 -68
- package/src/core/specs-apply.ts +0 -483
- package/src/core/styles/palette.ts +0 -8
- package/src/core/templates/agents-template.ts +0 -459
- package/src/core/templates/claude-template.ts +0 -2
- package/src/core/templates/index.ts +0 -4
- package/src/core/templates/project-template.ts +0 -32
- package/src/core/templates/slash-command-templates.ts +0 -1068
- package/src/core/validation/constants.ts +0 -48
- package/src/core/validation/types.ts +0 -19
- package/src/core/validation/validator.ts +0 -449
- package/src/core/view.ts +0 -219
- package/src/index.ts +0 -1
- package/src/utils/change-metadata.ts +0 -171
- package/src/utils/change-utils.ts +0 -131
- package/src/utils/file-system.ts +0 -252
- package/src/utils/index.ts +0 -12
- package/src/utils/interactive.ts +0 -29
- package/src/utils/item-discovery.ts +0 -66
- package/src/utils/match.ts +0 -26
- package/src/utils/shell-detection.ts +0 -62
- package/src/utils/task-progress.ts +0 -43
- package/tsconfig.json +0 -28
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
# {{PROJECT_NAME}} Design System
|
|
2
|
-
|
|
3
|
-
> **Generated:** {{TIMESTAMP}}
|
|
4
|
-
> **Source:** {{INPUT_DESCRIPTION}}
|
|
5
|
-
> **Format Version:** 1.0
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Table of Contents
|
|
10
|
-
|
|
11
|
-
- [Colors](#colors)
|
|
12
|
-
- [Typography](#typography)
|
|
13
|
-
- [Spacing](#spacing)
|
|
14
|
-
- [Layout & Breakpoints](#layout--breakpoints)
|
|
15
|
-
- [Borders & Radii](#borders--radii)
|
|
16
|
-
- [Shadows & Elevation](#shadows--elevation)
|
|
17
|
-
- [Transitions & Animation](#transitions--animation)
|
|
18
|
-
- [Z-Index Scale](#z-index-scale)
|
|
19
|
-
- [Components](#components)
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Colors
|
|
24
|
-
|
|
25
|
-
### Primary
|
|
26
|
-
|
|
27
|
-
| Token | Value | Swatch | HSL |
|
|
28
|
-
|-------|-------|--------|-----|
|
|
29
|
-
| `--ds-primary-50` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
30
|
-
| `--ds-primary-100` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
31
|
-
| `--ds-primary-200` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
32
|
-
| `--ds-primary-300` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
33
|
-
| `--ds-primary-400` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
34
|
-
| `--ds-primary-500` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
35
|
-
| `--ds-primary-600` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
36
|
-
| `--ds-primary-700` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
37
|
-
| `--ds-primary-800` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
38
|
-
| `--ds-primary-900` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
39
|
-
| `--ds-primary-950` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | `{{HSL}}` |
|
|
40
|
-
|
|
41
|
-
<!-- Repeat for: Secondary, Accent, Neutral, Success, Warning, Error, Info -->
|
|
42
|
-
<!-- Remove any color group that has no extracted tokens -->
|
|
43
|
-
|
|
44
|
-
### Secondary
|
|
45
|
-
|
|
46
|
-
| Token | Value | Swatch | HSL |
|
|
47
|
-
|-------|-------|--------|-----|
|
|
48
|
-
| `--ds-secondary-*` | ... | ... | ... |
|
|
49
|
-
|
|
50
|
-
### Accent
|
|
51
|
-
|
|
52
|
-
| Token | Value | Swatch | HSL |
|
|
53
|
-
|-------|-------|--------|-----|
|
|
54
|
-
| `--ds-accent-*` | ... | ... | ... |
|
|
55
|
-
|
|
56
|
-
### Neutral
|
|
57
|
-
|
|
58
|
-
| Token | Value | Swatch | HSL |
|
|
59
|
-
|-------|-------|--------|-----|
|
|
60
|
-
| `--ds-neutral-*` | ... | ... | ... |
|
|
61
|
-
|
|
62
|
-
### Semantic
|
|
63
|
-
|
|
64
|
-
| Token | Value | Swatch | Usage |
|
|
65
|
-
|-------|-------|--------|-------|
|
|
66
|
-
| `--ds-success` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Positive actions, confirmations |
|
|
67
|
-
| `--ds-warning` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Caution states, alerts |
|
|
68
|
-
| `--ds-error` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Error states, destructive actions |
|
|
69
|
-
| `--ds-info` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Informational states |
|
|
70
|
-
|
|
71
|
-
### Surface & Background
|
|
72
|
-
|
|
73
|
-
| Token | Value | Swatch | Usage |
|
|
74
|
-
|-------|-------|--------|-------|
|
|
75
|
-
| `--ds-bg-base` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle;border:1px solid #ddd"></span> | Page background |
|
|
76
|
-
| `--ds-bg-surface` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle;border:1px solid #ddd"></span> | Card/panel background |
|
|
77
|
-
| `--ds-bg-muted` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle;border:1px solid #ddd"></span> | Subtle background fills |
|
|
78
|
-
| `--ds-bg-overlay` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Modal/dialog overlays |
|
|
79
|
-
|
|
80
|
-
### Text Colors
|
|
81
|
-
|
|
82
|
-
| Token | Value | Swatch | Usage |
|
|
83
|
-
|-------|-------|--------|-------|
|
|
84
|
-
| `--ds-text-primary` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Primary body text |
|
|
85
|
-
| `--ds-text-secondary` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Secondary/muted text |
|
|
86
|
-
| `--ds-text-disabled` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> | Disabled state text |
|
|
87
|
-
| `--ds-text-inverse` | `{{VALUE}}` | <span style="background:{{VALUE}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle;border:1px solid #ddd"></span> | Text on dark backgrounds |
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Typography
|
|
92
|
-
|
|
93
|
-
### Font Families
|
|
94
|
-
|
|
95
|
-
| Token | Value | Usage |
|
|
96
|
-
|-------|-------|-------|
|
|
97
|
-
| `--ds-font-heading` | `{{VALUE}}` | Headings, display text |
|
|
98
|
-
| `--ds-font-body` | `{{VALUE}}` | Body text, paragraphs |
|
|
99
|
-
| `--ds-font-mono` | `{{VALUE}}` | Code, technical content |
|
|
100
|
-
|
|
101
|
-
### Font Sizes
|
|
102
|
-
|
|
103
|
-
| Token | Value (px) | Value (rem) | Usage |
|
|
104
|
-
|-------|-----------|-------------|-------|
|
|
105
|
-
| `--ds-text-xs` | `{{PX}}` | `{{REM}}` | Fine print, captions |
|
|
106
|
-
| `--ds-text-sm` | `{{PX}}` | `{{REM}}` | Secondary text, labels |
|
|
107
|
-
| `--ds-text-base` | `{{PX}}` | `{{REM}}` | Body text (default) |
|
|
108
|
-
| `--ds-text-lg` | `{{PX}}` | `{{REM}}` | Emphasized body text |
|
|
109
|
-
| `--ds-text-xl` | `{{PX}}` | `{{REM}}` | Section headers |
|
|
110
|
-
| `--ds-text-2xl` | `{{PX}}` | `{{REM}}` | Page headers |
|
|
111
|
-
| `--ds-text-3xl` | `{{PX}}` | `{{REM}}` | Large display text |
|
|
112
|
-
| `--ds-text-4xl` | `{{PX}}` | `{{REM}}` | Hero text |
|
|
113
|
-
|
|
114
|
-
### Font Weights
|
|
115
|
-
|
|
116
|
-
| Token | Value | Usage |
|
|
117
|
-
|-------|-------|-------|
|
|
118
|
-
| `--ds-font-light` | `300` | Light emphasis |
|
|
119
|
-
| `--ds-font-normal` | `400` | Body text |
|
|
120
|
-
| `--ds-font-medium` | `500` | Subtle emphasis |
|
|
121
|
-
| `--ds-font-semibold` | `600` | Strong emphasis |
|
|
122
|
-
| `--ds-font-bold` | `700` | Headings, CTAs |
|
|
123
|
-
|
|
124
|
-
### Line Heights
|
|
125
|
-
|
|
126
|
-
| Token | Value | Usage |
|
|
127
|
-
|-------|-------|-------|
|
|
128
|
-
| `--ds-leading-tight` | `{{VALUE}}` | Headings, compact text |
|
|
129
|
-
| `--ds-leading-normal` | `{{VALUE}}` | Body text |
|
|
130
|
-
| `--ds-leading-relaxed` | `{{VALUE}}` | Long-form reading |
|
|
131
|
-
|
|
132
|
-
### Letter Spacing
|
|
133
|
-
|
|
134
|
-
| Token | Value | Usage |
|
|
135
|
-
|-------|-------|-------|
|
|
136
|
-
| `--ds-tracking-tight` | `{{VALUE}}` | Large headings |
|
|
137
|
-
| `--ds-tracking-normal` | `{{VALUE}}` | Body text |
|
|
138
|
-
| `--ds-tracking-wide` | `{{VALUE}}` | Uppercase labels, buttons |
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Spacing
|
|
143
|
-
|
|
144
|
-
**Base unit:** `{{BASE_UNIT}}px`
|
|
145
|
-
|
|
146
|
-
| Token | Value (px) | Value (rem) | Multiplier |
|
|
147
|
-
|-------|-----------|-------------|------------|
|
|
148
|
-
| `--ds-space-0` | `0` | `0` | 0× |
|
|
149
|
-
| `--ds-space-1` | `{{VALUE}}` | `{{REM}}` | 1× |
|
|
150
|
-
| `--ds-space-2` | `{{VALUE}}` | `{{REM}}` | 2× |
|
|
151
|
-
| `--ds-space-3` | `{{VALUE}}` | `{{REM}}` | 3× |
|
|
152
|
-
| `--ds-space-4` | `{{VALUE}}` | `{{REM}}` | 4× |
|
|
153
|
-
| `--ds-space-5` | `{{VALUE}}` | `{{REM}}` | 5× |
|
|
154
|
-
| `--ds-space-6` | `{{VALUE}}` | `{{REM}}` | 6× |
|
|
155
|
-
| `--ds-space-8` | `{{VALUE}}` | `{{REM}}` | 8× |
|
|
156
|
-
| `--ds-space-10` | `{{VALUE}}` | `{{REM}}` | 10× |
|
|
157
|
-
| `--ds-space-12` | `{{VALUE}}` | `{{REM}}` | 12× |
|
|
158
|
-
| `--ds-space-16` | `{{VALUE}}` | `{{REM}}` | 16× |
|
|
159
|
-
| `--ds-space-20` | `{{VALUE}}` | `{{REM}}` | 20× |
|
|
160
|
-
| `--ds-space-24` | `{{VALUE}}` | `{{REM}}` | 24× |
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## Layout & Breakpoints
|
|
165
|
-
|
|
166
|
-
### Breakpoints
|
|
167
|
-
|
|
168
|
-
| Token | Value | Description |
|
|
169
|
-
|-------|-------|-------------|
|
|
170
|
-
| `--ds-screen-sm` | `{{VALUE}}` | Small devices (phones landscape) |
|
|
171
|
-
| `--ds-screen-md` | `{{VALUE}}` | Medium devices (tablets) |
|
|
172
|
-
| `--ds-screen-lg` | `{{VALUE}}` | Large devices (desktops) |
|
|
173
|
-
| `--ds-screen-xl` | `{{VALUE}}` | Extra large devices (wide desktops) |
|
|
174
|
-
| `--ds-screen-2xl` | `{{VALUE}}` | Ultra wide displays |
|
|
175
|
-
|
|
176
|
-
### Container
|
|
177
|
-
|
|
178
|
-
| Token | Value | Usage |
|
|
179
|
-
|-------|-------|-------|
|
|
180
|
-
| `--ds-container-sm` | `{{VALUE}}` | Narrow content (articles) |
|
|
181
|
-
| `--ds-container-md` | `{{VALUE}}` | Standard content |
|
|
182
|
-
| `--ds-container-lg` | `{{VALUE}}` | Wide content |
|
|
183
|
-
| `--ds-container-xl` | `{{VALUE}}` | Full-width content |
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Borders & Radii
|
|
188
|
-
|
|
189
|
-
### Border Widths
|
|
190
|
-
|
|
191
|
-
| Token | Value | Usage |
|
|
192
|
-
|-------|-------|-------|
|
|
193
|
-
| `--ds-border-0` | `0px` | No border |
|
|
194
|
-
| `--ds-border-1` | `1px` | Default borders |
|
|
195
|
-
| `--ds-border-2` | `2px` | Emphasized borders |
|
|
196
|
-
| `--ds-border-4` | `4px` | Heavy borders |
|
|
197
|
-
|
|
198
|
-
### Border Radii
|
|
199
|
-
|
|
200
|
-
| Token | Value | Preview | Usage |
|
|
201
|
-
|-------|-------|---------|-------|
|
|
202
|
-
| `--ds-radius-none` | `0px` | <span style="width:24px;height:24px;display:inline-block;background:#6366f1;border-radius:0px"></span> | Sharp corners |
|
|
203
|
-
| `--ds-radius-sm` | `{{VALUE}}` | <span style="width:24px;height:24px;display:inline-block;background:#6366f1;border-radius:{{VALUE}}"></span> | Subtle rounding |
|
|
204
|
-
| `--ds-radius-md` | `{{VALUE}}` | <span style="width:24px;height:24px;display:inline-block;background:#6366f1;border-radius:{{VALUE}}"></span> | Default rounding |
|
|
205
|
-
| `--ds-radius-lg` | `{{VALUE}}` | <span style="width:24px;height:24px;display:inline-block;background:#6366f1;border-radius:{{VALUE}}"></span> | Prominent rounding |
|
|
206
|
-
| `--ds-radius-xl` | `{{VALUE}}` | <span style="width:24px;height:24px;display:inline-block;background:#6366f1;border-radius:{{VALUE}}"></span> | Heavy rounding |
|
|
207
|
-
| `--ds-radius-full` | `9999px` | <span style="width:24px;height:24px;display:inline-block;background:#6366f1;border-radius:9999px"></span> | Circular/pill shapes |
|
|
208
|
-
|
|
209
|
-
---
|
|
210
|
-
|
|
211
|
-
## Shadows & Elevation
|
|
212
|
-
|
|
213
|
-
| Token | Value | Usage |
|
|
214
|
-
|-------|-------|-------|
|
|
215
|
-
| `--ds-shadow-sm` | `{{VALUE}}` | Subtle depth (cards at rest) |
|
|
216
|
-
| `--ds-shadow-md` | `{{VALUE}}` | Medium depth (dropdowns) |
|
|
217
|
-
| `--ds-shadow-lg` | `{{VALUE}}` | Strong depth (modals, popovers) |
|
|
218
|
-
| `--ds-shadow-xl` | `{{VALUE}}` | Maximum depth (floating elements) |
|
|
219
|
-
| `--ds-shadow-inner` | `{{VALUE}}` | Inset shadow (pressed states) |
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## Transitions & Animation
|
|
224
|
-
|
|
225
|
-
### Durations
|
|
226
|
-
|
|
227
|
-
| Token | Value | Usage |
|
|
228
|
-
|-------|-------|-------|
|
|
229
|
-
| `--ds-duration-fast` | `{{VALUE}}` | Micro-interactions (hover, focus) |
|
|
230
|
-
| `--ds-duration-normal` | `{{VALUE}}` | Standard transitions |
|
|
231
|
-
| `--ds-duration-slow` | `{{VALUE}}` | Complex animations, page transitions |
|
|
232
|
-
|
|
233
|
-
### Easing Functions
|
|
234
|
-
|
|
235
|
-
| Token | Value | Usage |
|
|
236
|
-
|-------|-------|-------|
|
|
237
|
-
| `--ds-ease-default` | `{{VALUE}}` | General purpose |
|
|
238
|
-
| `--ds-ease-in` | `{{VALUE}}` | Elements exiting view |
|
|
239
|
-
| `--ds-ease-out` | `{{VALUE}}` | Elements entering view |
|
|
240
|
-
| `--ds-ease-in-out` | `{{VALUE}}` | Elements moving in view |
|
|
241
|
-
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
## Z-Index Scale
|
|
245
|
-
|
|
246
|
-
| Token | Value | Usage |
|
|
247
|
-
|-------|-------|-------|
|
|
248
|
-
| `--ds-z-base` | `0` | Default stacking |
|
|
249
|
-
| `--ds-z-dropdown` | `{{VALUE}}` | Dropdown menus |
|
|
250
|
-
| `--ds-z-sticky` | `{{VALUE}}` | Sticky headers |
|
|
251
|
-
| `--ds-z-overlay` | `{{VALUE}}` | Backdrop overlays |
|
|
252
|
-
| `--ds-z-modal` | `{{VALUE}}` | Modal dialogs |
|
|
253
|
-
| `--ds-z-popover` | `{{VALUE}}` | Popovers, tooltips |
|
|
254
|
-
| `--ds-z-toast` | `{{VALUE}}` | Toast notifications |
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Components
|
|
259
|
-
|
|
260
|
-
<!-- Repeat this block for each identified component -->
|
|
261
|
-
|
|
262
|
-
### {{ComponentName}}
|
|
263
|
-
|
|
264
|
-
**Description:** {{Brief description of the component}}
|
|
265
|
-
|
|
266
|
-
#### Variants
|
|
267
|
-
|
|
268
|
-
| Variant | Preview | Usage |
|
|
269
|
-
|---------|---------|-------|
|
|
270
|
-
| `primary` | {{visual or code example}} | Main CTA |
|
|
271
|
-
| `secondary` | {{visual or code example}} | Secondary actions |
|
|
272
|
-
| `outline` | {{visual or code example}} | Tertiary actions |
|
|
273
|
-
| `ghost` | {{visual or code example}} | Subtle actions |
|
|
274
|
-
|
|
275
|
-
#### Sizes
|
|
276
|
-
|
|
277
|
-
| Size | Font Size | Padding | Height |
|
|
278
|
-
|------|-----------|---------|--------|
|
|
279
|
-
| `sm` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
280
|
-
| `md` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
281
|
-
| `lg` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
282
|
-
|
|
283
|
-
#### States
|
|
284
|
-
|
|
285
|
-
| State | Background | Border | Text | Shadow |
|
|
286
|
-
|-------|-----------|--------|------|--------|
|
|
287
|
-
| Default | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
288
|
-
| Hover | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
289
|
-
| Focus | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
290
|
-
| Active | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
291
|
-
| Disabled | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` | `{{VALUE}}` |
|
|
292
|
-
|
|
293
|
-
#### Tokens Used
|
|
294
|
-
|
|
295
|
-
```
|
|
296
|
-
--ds-primary-500, --ds-primary-600 (hover)
|
|
297
|
-
--ds-radius-md
|
|
298
|
-
--ds-shadow-sm
|
|
299
|
-
--ds-font-medium
|
|
300
|
-
--ds-text-sm (sm), --ds-text-base (md), --ds-text-lg (lg)
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
<!-- End component block -->
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
|
-
## Dark Mode
|
|
308
|
-
|
|
309
|
-
<!-- Include only if dark mode tokens were detected -->
|
|
310
|
-
|
|
311
|
-
| Light Token | Light Value | Dark Value | Swatch (Dark) |
|
|
312
|
-
|-------------|------------|------------|----------------|
|
|
313
|
-
| `--ds-bg-base` | `{{LIGHT}}` | `{{DARK}}` | <span style="background:{{DARK}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> |
|
|
314
|
-
| `--ds-bg-surface` | `{{LIGHT}}` | `{{DARK}}` | <span style="background:{{DARK}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> |
|
|
315
|
-
| `--ds-text-primary` | `{{LIGHT}}` | `{{DARK}}` | <span style="background:{{DARK}};width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span> |
|
|
316
|
-
|
|
317
|
-
---
|
|
318
|
-
|
|
319
|
-
## Quick Reference — CSS Variables
|
|
320
|
-
|
|
321
|
-
```css
|
|
322
|
-
:root {
|
|
323
|
-
/* Colors */
|
|
324
|
-
{{COLOR_VARIABLES}}
|
|
325
|
-
|
|
326
|
-
/* Typography */
|
|
327
|
-
{{TYPOGRAPHY_VARIABLES}}
|
|
328
|
-
|
|
329
|
-
/* Spacing */
|
|
330
|
-
{{SPACING_VARIABLES}}
|
|
331
|
-
|
|
332
|
-
/* Borders & Radii */
|
|
333
|
-
{{BORDER_VARIABLES}}
|
|
334
|
-
|
|
335
|
-
/* Shadows */
|
|
336
|
-
{{SHADOW_VARIABLES}}
|
|
337
|
-
|
|
338
|
-
/* Transitions */
|
|
339
|
-
{{TRANSITION_VARIABLES}}
|
|
340
|
-
|
|
341
|
-
/* Z-Index */
|
|
342
|
-
{{ZINDEX_VARIABLES}}
|
|
343
|
-
}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
*Generated by Design System Generator skill*
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
# Extraction Patterns Reference
|
|
2
|
-
|
|
3
|
-
Mapping rules and regex patterns for extracting design tokens from CSS, HTML, React, and Tailwind sources.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## CSS Custom Properties
|
|
8
|
-
|
|
9
|
-
Extract all `--` prefixed declarations from `:root`, `html`, `body`, or theme selectors.
|
|
10
|
-
|
|
11
|
-
```regex
|
|
12
|
-
--[\w-]+\s*:\s*[^;]+
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Group by prefix conventions:
|
|
16
|
-
- `--color-*`, `--c-*` → Colors
|
|
17
|
-
- `--font-*`, `--text-*`, `--fs-*` → Typography
|
|
18
|
-
- `--space-*`, `--spacing-*`, `--gap-*` → Spacing
|
|
19
|
-
- `--radius-*`, `--rounded-*`, `--br-*` → Border Radii
|
|
20
|
-
- `--shadow-*`, `--elevation-*` → Shadows
|
|
21
|
-
- `--z-*`, `--zindex-*` → Z-Index
|
|
22
|
-
- `--duration-*`, `--transition-*`, `--ease-*` → Transitions
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Color Extraction
|
|
27
|
-
|
|
28
|
-
### From CSS declarations
|
|
29
|
-
|
|
30
|
-
Target properties:
|
|
31
|
-
```
|
|
32
|
-
color, background-color, background, border-color, outline-color,
|
|
33
|
-
fill, stroke, text-decoration-color, accent-color, caret-color,
|
|
34
|
-
box-shadow (color component), --*-color
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Color format normalization
|
|
38
|
-
|
|
39
|
-
Convert all formats to hex with HSL annotation:
|
|
40
|
-
- `#RGB` → expand to `#RRGGBB`
|
|
41
|
-
- `rgb(R, G, B)` → convert to hex
|
|
42
|
-
- `rgba(R, G, B, A)` → note alpha separately
|
|
43
|
-
- `hsl(H, S%, L%)` → convert to hex, keep HSL as annotation
|
|
44
|
-
- `oklch(L C H)` → convert to hex equivalent
|
|
45
|
-
- Named colors (`red`, `blue`) → convert to hex
|
|
46
|
-
|
|
47
|
-
### Semantic color grouping heuristics
|
|
48
|
-
|
|
49
|
-
| CSS Pattern | Likely Category |
|
|
50
|
-
|-------------|----------------|
|
|
51
|
-
| `--primary*`, `--brand*`, `--accent*` | Primary/Accent |
|
|
52
|
-
| `--secondary*` | Secondary |
|
|
53
|
-
| `--gray*`, `--grey*`, `--neutral*`, `--slate*` | Neutral |
|
|
54
|
-
| `--success*`, `--green*`, `--positive*` | Success |
|
|
55
|
-
| `--warning*`, `--yellow*`, `--amber*`, `--caution*` | Warning |
|
|
56
|
-
| `--error*`, `--red*`, `--danger*`, `--destructive*` | Error |
|
|
57
|
-
| `--info*`, `--blue*` | Info |
|
|
58
|
-
| `--bg*`, `--background*`, `--surface*` | Surface |
|
|
59
|
-
| `--text*`, `--fg*`, `--foreground*` | Text |
|
|
60
|
-
|
|
61
|
-
### Color scale detection
|
|
62
|
-
|
|
63
|
-
If multiple shades of the same hue exist, sort by lightness and assign scale numbers:
|
|
64
|
-
- Lightest → 50
|
|
65
|
-
- Darkest → 950
|
|
66
|
-
- Map intermediate values to nearest: 100, 200, 300, 400, 500, 600, 700, 800, 900
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Typography Extraction
|
|
71
|
-
|
|
72
|
-
### Font family detection
|
|
73
|
-
|
|
74
|
-
Target properties: `font-family`, `--font-*`
|
|
75
|
-
|
|
76
|
-
Classify by usage:
|
|
77
|
-
- Serif/Sans-serif → heading or body
|
|
78
|
-
- Monospace → code/mono
|
|
79
|
-
- If only one family found → assign to both heading + body
|
|
80
|
-
|
|
81
|
-
### Font size scale building
|
|
82
|
-
|
|
83
|
-
Target properties: `font-size`, `--text-*`, `--fs-*`
|
|
84
|
-
|
|
85
|
-
1. Collect all unique `font-size` values
|
|
86
|
-
2. Sort ascending
|
|
87
|
-
3. Map to scale:
|
|
88
|
-
|
|
89
|
-
| Range (px) | Token |
|
|
90
|
-
|-----------|-------|
|
|
91
|
-
| 10–11 | `xs` |
|
|
92
|
-
| 12–13 | `sm` |
|
|
93
|
-
| 14–16 | `base` |
|
|
94
|
-
| 17–19 | `lg` |
|
|
95
|
-
| 20–23 | `xl` |
|
|
96
|
-
| 24–29 | `2xl` |
|
|
97
|
-
| 30–35 | `3xl` |
|
|
98
|
-
| 36+ | `4xl` |
|
|
99
|
-
|
|
100
|
-
### Font weight mapping
|
|
101
|
-
|
|
102
|
-
Collect all `font-weight` values. Map to named tokens:
|
|
103
|
-
- `100` → thin, `200` → extralight, `300` → light
|
|
104
|
-
- `400` → normal, `500` → medium, `600` → semibold
|
|
105
|
-
- `700` → bold, `800` → extrabold, `900` → black
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Spacing Extraction
|
|
110
|
-
|
|
111
|
-
### Collecting spacing values
|
|
112
|
-
|
|
113
|
-
Target properties:
|
|
114
|
-
```
|
|
115
|
-
margin, margin-top/right/bottom/left,
|
|
116
|
-
padding, padding-top/right/bottom/left,
|
|
117
|
-
gap, row-gap, column-gap, grid-gap,
|
|
118
|
-
top, right, bottom, left (when used for spacing)
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Base unit detection
|
|
122
|
-
|
|
123
|
-
1. Collect all spacing values
|
|
124
|
-
2. Find GCD (Greatest Common Divisor) of the most common values
|
|
125
|
-
3. Typical base units: `4px`, `8px`
|
|
126
|
-
4. If values follow `4, 8, 12, 16, 20, 24, 32` → base = 4px
|
|
127
|
-
5. If values follow `8, 16, 24, 32, 40, 48, 64` → base = 8px
|
|
128
|
-
|
|
129
|
-
### Scale normalization
|
|
130
|
-
|
|
131
|
-
Sort unique values and assign multipliers relative to base:
|
|
132
|
-
```
|
|
133
|
-
0px → space-0 (0×)
|
|
134
|
-
4px → space-1 (1×)
|
|
135
|
-
8px → space-2 (2×)
|
|
136
|
-
12px → space-3 (3×)
|
|
137
|
-
16px → space-4 (4×)
|
|
138
|
-
...
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Border & Radius Extraction
|
|
144
|
-
|
|
145
|
-
### Border radius values
|
|
146
|
-
|
|
147
|
-
Target: `border-radius`, `border-*-radius`, `--radius-*`
|
|
148
|
-
|
|
149
|
-
Map to scale:
|
|
150
|
-
| Range (px) | Token |
|
|
151
|
-
|-----------|-------|
|
|
152
|
-
| 0 | `none` |
|
|
153
|
-
| 1–3 | `sm` |
|
|
154
|
-
| 4–7 | `md` |
|
|
155
|
-
| 8–11 | `lg` |
|
|
156
|
-
| 12–15 | `xl` |
|
|
157
|
-
| 16+ | `2xl` |
|
|
158
|
-
| 9999px, 50% | `full` |
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Shadow Extraction
|
|
163
|
-
|
|
164
|
-
Target: `box-shadow`, `text-shadow`, `--shadow-*`
|
|
165
|
-
|
|
166
|
-
Parse shadow values into components:
|
|
167
|
-
```
|
|
168
|
-
box-shadow: <offset-x> <offset-y> <blur> <spread> <color>
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
Map to elevation scale by blur radius:
|
|
172
|
-
| Blur (px) | Token |
|
|
173
|
-
|----------|-------|
|
|
174
|
-
| 1–4 | `sm` |
|
|
175
|
-
| 5–10 | `md` |
|
|
176
|
-
| 11–20 | `lg` |
|
|
177
|
-
| 21+ | `xl` |
|
|
178
|
-
| `inset` keyword | `inner` |
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## Breakpoint Extraction
|
|
183
|
-
|
|
184
|
-
Target: `@media` queries with `min-width` or `max-width`
|
|
185
|
-
|
|
186
|
-
```regex
|
|
187
|
-
@media\s*\([^)]*(?:min|max)-width\s*:\s*([\d.]+(?:px|em|rem))[^)]*\)
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
Common breakpoint conventions:
|
|
191
|
-
| Value | Token |
|
|
192
|
-
|-------|-------|
|
|
193
|
-
| 640px / 40em | `sm` |
|
|
194
|
-
| 768px / 48em | `md` |
|
|
195
|
-
| 1024px / 64em | `lg` |
|
|
196
|
-
| 1280px / 80em | `xl` |
|
|
197
|
-
| 1536px / 96em | `2xl` |
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Transition Extraction
|
|
202
|
-
|
|
203
|
-
Target: `transition`, `transition-duration`, `transition-timing-function`, `animation-duration`
|
|
204
|
-
|
|
205
|
-
### Duration bucketing
|
|
206
|
-
|
|
207
|
-
| Range (ms) | Token |
|
|
208
|
-
|-----------|-------|
|
|
209
|
-
| 50–100 | `fast` |
|
|
210
|
-
| 150–300 | `normal` |
|
|
211
|
-
| 300–500 | `slow` |
|
|
212
|
-
|
|
213
|
-
### Easing classification
|
|
214
|
-
|
|
215
|
-
| Value | Token |
|
|
216
|
-
|-------|-------|
|
|
217
|
-
| `ease` | `default` |
|
|
218
|
-
| `ease-in`, `cubic-bezier(0.4, 0, 1, 1)` | `in` |
|
|
219
|
-
| `ease-out`, `cubic-bezier(0, 0, 0.2, 1)` | `out` |
|
|
220
|
-
| `ease-in-out`, `cubic-bezier(0.4, 0, 0.2, 1)` | `in-out` |
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Z-Index Extraction
|
|
225
|
-
|
|
226
|
-
Target: `z-index`, `--z-*`
|
|
227
|
-
|
|
228
|
-
### Semantic assignment heuristics
|
|
229
|
-
|
|
230
|
-
Assign names based on context (selector or class name):
|
|
231
|
-
| Selector Pattern | Token |
|
|
232
|
-
|-----------------|-------|
|
|
233
|
-
| `.dropdown*`, `.menu*`, `.select*` | `dropdown` |
|
|
234
|
-
| `.sticky*`, `.fixed-header*` | `sticky` |
|
|
235
|
-
| `.overlay*`, `.backdrop*` | `overlay` |
|
|
236
|
-
| `.modal*`, `.dialog*` | `modal` |
|
|
237
|
-
| `.popover*`, `.tooltip*` | `popover` |
|
|
238
|
-
| `.toast*`, `.notification*`, `.snackbar*` | `toast` |
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## Tailwind Class Extraction
|
|
243
|
-
|
|
244
|
-
When input uses Tailwind utility classes, map classes to tokens:
|
|
245
|
-
|
|
246
|
-
### Color classes
|
|
247
|
-
```regex
|
|
248
|
-
(?:bg|text|border|ring|fill|stroke)-(?:[\w]+-)?(?:\d{2,3}|black|white)
|
|
249
|
-
```
|
|
250
|
-
Map to theme colors via `tailwind.config.js` or default palette.
|
|
251
|
-
|
|
252
|
-
### Spacing classes
|
|
253
|
-
```regex
|
|
254
|
-
(?:m|p|gap|space-[xy])-(?:\d+(?:\.\d+)?|px|auto)
|
|
255
|
-
```
|
|
256
|
-
Convert Tailwind spacing units: multiply by 4px (default).
|
|
257
|
-
|
|
258
|
-
### Typography classes
|
|
259
|
-
```regex
|
|
260
|
-
(?:text|font|leading|tracking)-(?:xs|sm|base|lg|xl|[\d]xl|thin|light|normal|medium|semibold|bold|extrabold|black|tight|snug|normal|relaxed|loose|tighter|wider)
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
### Border/Radius classes
|
|
264
|
-
```regex
|
|
265
|
-
rounded(?:-(?:sm|md|lg|xl|2xl|3xl|full|none))?
|
|
266
|
-
border(?:-(?:\d+))?
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## React/JSX Pattern Extraction
|
|
272
|
-
|
|
273
|
-
### Styled-components / Emotion
|
|
274
|
-
|
|
275
|
-
Extract template literals from `styled.*` or `css` tagged templates:
|
|
276
|
-
```regex
|
|
277
|
-
styled\.(\w+)`([^`]*)`
|
|
278
|
-
css`([^`]*)`
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### Style objects
|
|
282
|
-
|
|
283
|
-
Extract from `style={{ }}` JSX attributes:
|
|
284
|
-
```regex
|
|
285
|
-
style=\{\{([^}]*)\}\}
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
Convert camelCase properties to kebab-case for token extraction.
|
|
289
|
-
|
|
290
|
-
### Theme objects
|
|
291
|
-
|
|
292
|
-
Look for theme/token files:
|
|
293
|
-
- `theme.ts`, `theme.js`, `tokens.ts`, `tokens.js`
|
|
294
|
-
- `ThemeProvider` usage pointing to theme config
|
|
295
|
-
- `createTheme()`, `extendTheme()` calls
|
|
296
|
-
|
|
297
|
-
Extract nested token objects and flatten to design tokens.
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## Dark Mode Detection
|
|
302
|
-
|
|
303
|
-
### CSS strategies
|
|
304
|
-
- `@media (prefers-color-scheme: dark)` blocks
|
|
305
|
-
- `.dark` class selector overrides
|
|
306
|
-
- `[data-theme="dark"]` attribute selectors
|
|
307
|
-
|
|
308
|
-
### Tailwind dark mode
|
|
309
|
-
- `dark:` prefix classes
|
|
310
|
-
- Check `darkMode` config in `tailwind.config.js`
|
|
311
|
-
|
|
312
|
-
When dark mode is detected, create a parallel token set documenting both light and dark values.
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## Deduplication Rules
|
|
317
|
-
|
|
318
|
-
1. **Near-identical colors**: Merge colors within ΔE < 3 (perceptual difference). Keep the more frequently used value.
|
|
319
|
-
2. **Similar spacing**: If two values differ by ≤1px, keep the one that fits the base unit grid.
|
|
320
|
-
3. **Duplicate fonts**: Same family with different quoting → keep one.
|
|
321
|
-
4. **Shadow variants**: If two shadows only differ by color, document as one shadow with color token reference.
|