@hegemonart/get-design-done 1.52.0 → 1.54.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +90 -0
- package/README.md +4 -0
- package/SKILL.md +2 -1
- package/agents/component-taxonomy-mapper.md +3 -0
- package/agents/design-context-reviewer-gate.md +102 -0
- package/agents/design-context-reviewer.md +186 -0
- package/agents/motion-mapper.md +1 -0
- package/agents/token-mapper.md +3 -0
- package/dist/claude-code/.claude/skills/discover/SKILL.md +7 -1
- package/dist/claude-code/.claude/skills/explore/SKILL.md +3 -1
- package/dist/claude-code/.claude/skills/new-addendum/SKILL.md +81 -0
- package/package.json +1 -1
- package/reference/frameworks/astro.md +43 -0
- package/reference/frameworks/nextjs.md +44 -0
- package/reference/frameworks/remix.md +44 -0
- package/reference/frameworks/storybook.md +44 -0
- package/reference/frameworks/sveltekit.md +43 -0
- package/reference/frameworks/vite-react.md +43 -0
- package/reference/interaction.md +1 -0
- package/reference/motion/framer-motion.md +45 -0
- package/reference/motion/gsap.md +45 -0
- package/reference/motion/motion-one.md +44 -0
- package/reference/motion/react-spring.md +44 -0
- package/reference/motion.md +1 -0
- package/reference/registry.json +163 -1
- package/reference/registry.schema.json +18 -1
- package/reference/skill-graph.md +2 -1
- package/reference/systems/chakra.md +44 -0
- package/reference/systems/css-modules.md +44 -0
- package/reference/systems/mui.md +44 -0
- package/reference/systems/radix-themes.md +43 -0
- package/reference/systems/shadcn.md +45 -0
- package/reference/systems/styled-components.md +44 -0
- package/reference/systems/tailwind.md +44 -0
- package/reference/systems/vanilla-extract.md +44 -0
- package/scripts/lib/detect/stack.cjs +455 -0
- package/scripts/lib/detect/stack.d.cts +44 -0
- package/scripts/lib/explore-parallel-runner/index.ts +196 -1
- package/scripts/lib/explore-parallel-runner/types.ts +85 -0
- package/scripts/lib/health-mirror/index.cjs +73 -1
- package/scripts/lib/manifest/skills.json +10 -2
- package/scripts/lib/mapper-spawn.cjs +257 -0
- package/scripts/lib/mapper-spawn.d.cts +60 -0
- package/scripts/lib/mappers/compute-batches.mjs +625 -0
- package/scripts/lib/mappers/graph-adjacency.mjs +129 -0
- package/scripts/lib/mappers/incremental-discover.cjs +617 -0
- package/scripts/lib/mappers/incremental-discover.d.cts +133 -0
- package/scripts/lib/mappers/neighbor-map.mjs +0 -0
- package/scripts/lib/new-addendum.cjs +204 -0
- package/sdk/cli/index.js +1504 -3
- package/sdk/fingerprint/classify.cjs +406 -0
- package/sdk/fingerprint/index.ts +405 -0
- package/sdk/fingerprint/store.cjs +523 -0
- package/sdk/index.ts +1 -0
- package/sdk/mcp/gdd-mcp/server.js +1047 -0
- package/skills/discover/SKILL.md +7 -1
- package/skills/explore/SKILL.md +3 -1
- package/skills/new-addendum/SKILL.md +81 -0
|
@@ -64,9 +64,26 @@
|
|
|
64
64
|
"layout",
|
|
65
65
|
"performance",
|
|
66
66
|
"component-spec",
|
|
67
|
-
"domain-index"
|
|
67
|
+
"domain-index",
|
|
68
|
+
"stack-addendum"
|
|
68
69
|
]
|
|
69
70
|
},
|
|
71
|
+
"kind": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": [
|
|
74
|
+
"system",
|
|
75
|
+
"framework",
|
|
76
|
+
"motion"
|
|
77
|
+
],
|
|
78
|
+
"description": "Phase 54 stack-addendum category. Drives mapper-spawn.cjs composition (1 system + 1 framework + 1 motion cap). Present only on type:stack-addendum entries; classifyEntry also infers it from the path dir, so it is an explicit reinforcement, not strictly required."
|
|
79
|
+
},
|
|
80
|
+
"composes_into": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"description": "Phase 54 stack-addendum composition targets — the explore mapper names (e.g. token-mapper, component-taxonomy-mapper, motion-mapper) this addendum is appended into pre-spawn. Read by scripts/lib/mapper-spawn.cjs composeAddendums(). Present only on type:stack-addendum entries."
|
|
86
|
+
},
|
|
70
87
|
"tier": {
|
|
71
88
|
"enum": [
|
|
72
89
|
"L0",
|
package/reference/skill-graph.md
CHANGED
|
@@ -9,7 +9,7 @@ is a `composes_with` edge (the source calls the target as sub-orchestration); a
|
|
|
9
9
|
a `next_skills` edge (a pipeline hint for what runs next). Stage grouping is best-effort and
|
|
10
10
|
inferred from the skill name; skills with no stage keyword fall under Utility.
|
|
11
11
|
|
|
12
|
-
Skills:
|
|
12
|
+
Skills: 92. Composition edges: 0 composes_with, 6 next_skills.
|
|
13
13
|
|
|
14
14
|
```mermaid
|
|
15
15
|
flowchart TD
|
|
@@ -85,6 +85,7 @@ flowchart TD
|
|
|
85
85
|
n_list_pins["list-pins"]
|
|
86
86
|
n_locale["locale"]
|
|
87
87
|
n_migrate_context["migrate-context"]
|
|
88
|
+
n_new_addendum["new-addendum"]
|
|
88
89
|
n_new_skill["new-skill"]
|
|
89
90
|
n_next["next"]
|
|
90
91
|
n_note["note"]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chakra
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://chakra-ui.com/docs/theming/customization/colors. -->
|
|
8
|
+
|
|
9
|
+
# Chakra UI
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- v3 builds a system via `createSystem(defineConfig({ theme: { tokens, semanticTokens, recipes, slotRecipes } }))` (Panda-inspired).
|
|
14
|
+
- Two tiers: raw `tokens` are `{value}`-wrapped (for example `colors.brand.500.value`); `semanticTokens` are condition-aware via `_light` and `_dark` and form the real consistency layer.
|
|
15
|
+
- Style props (bg, px, color, rounded) bind to tokens. v2 uses extendTheme plus useColorModeValue(light, dark).
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `theme.ts` or `system.ts` with createSystem.
|
|
20
|
+
- `<ChakraProvider value={system}>` at the root.
|
|
21
|
+
- Identify via: @chakra-ui/react in deps plus createSystem.
|
|
22
|
+
|
|
23
|
+
## Gotchas
|
|
24
|
+
|
|
25
|
+
- v3 tokens are `{value}`-wrapped; the leaf is `.value`.
|
|
26
|
+
- Prefer semanticTokens as the token nodes (they encode light and dark) and treat raw tokens as the backing palette.
|
|
27
|
+
- recipes and slotRecipes are variants; style props are usage, not token nodes.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "tok.color.bg", "type": "token", "subtype": "color", "name": "semanticTokens.colors.bg", "summary": "Condition-aware surface color across light and dark.", "complexity": "simple", "tags": ["color", "surface", "dark-mode", "light-mode"] },
|
|
36
|
+
{ "id": "tok.color.brand-500", "type": "token", "subtype": "color", "name": "colors.brand.500", "summary": "Raw brand palette step backing the semantic tokens.", "complexity": "simple", "tags": ["color", "brand", "palette"] },
|
|
37
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Button recipe bound to semantic surface tokens.", "complexity": "moderate", "tags": ["interactive", "atom"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "tok.color.bg", "target": "tok.color.brand-500", "type": "uses-token", "direction": "forward", "weight": 0.6 },
|
|
41
|
+
{ "source": "cmp.button", "target": "tok.color.bg", "type": "uses-token", "direction": "forward", "weight": 0.8 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: css-modules
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://github.com/css-modules/css-modules. -->
|
|
8
|
+
|
|
9
|
+
# CSS Modules
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- `*.module.css` files scope class names locally (hashed) and import as a JS object (`styles.button`).
|
|
14
|
+
- No JS theme: tokens are CSS custom properties on `:root` in a shared global stylesheet, or `@value` build-time constants.
|
|
15
|
+
- `composes: base from './x.module.css'` merges classes (the composition signal). `.button--primary` is a variant; `&:hover` and `.button:disabled` are states.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `Component.module.css` next to `Component.tsx`.
|
|
20
|
+
- `tokens.css` or `theme.css` with `:root`; `composes:` and `@value` declarations.
|
|
21
|
+
- Identify via: a `*.module.css` import plus a `:root` token sheet.
|
|
22
|
+
|
|
23
|
+
## Gotchas
|
|
24
|
+
|
|
25
|
+
- The `:root` custom properties ARE the tokens; infer subtype from the name and value.
|
|
26
|
+
- `composes:` is a cross-file edge; model it as extends or composes.
|
|
27
|
+
- Read the source `.module.css`, not the hashed output; `@value` constants are tokens too.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "tok.color.primary", "type": "token", "subtype": "color", "name": "--color-primary", "summary": "Primary brand color custom property on :root.", "complexity": "simple", "tags": ["color", "brand", "theme"] },
|
|
36
|
+
{ "id": "cmp.button-base", "type": "component", "name": "button base", "summary": "Base button class others compose from.", "complexity": "simple", "tags": ["primitive", "interactive"] },
|
|
37
|
+
{ "id": "var.button-primary", "type": "variant", "name": "button--primary", "summary": "Primary variant composing the base class.", "complexity": "simple", "tags": ["brand", "state"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "var.button-primary", "target": "cmp.button-base", "type": "composes", "direction": "forward", "weight": 0.8 },
|
|
41
|
+
{ "source": "var.button-primary", "target": "tok.color.primary", "type": "uses-token", "direction": "forward", "weight": 0.9 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mui
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://mui.com/material-ui/customization/theming/. -->
|
|
8
|
+
|
|
9
|
+
# MUI (Material UI)
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- Tokens live in a JS theme via `createTheme({ palette, typography, spacing, breakpoints, shape, shadows, components })` applied through `<ThemeProvider>`.
|
|
14
|
+
- palette.primary holds main, light, dark, contrastText. spacing is a multiplier function: `theme.spacing(2)` returns 16px. shadows is a 25-entry elevation array. typography variants run h1 through caption.
|
|
15
|
+
- Styling uses sx (one-off), styled() (reusable), and theme.components (per-component variants).
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `theme.ts` with createTheme and ThemeProvider.
|
|
20
|
+
- sx props inline; styled() factories co-located with components.
|
|
21
|
+
- CssVarsProvider or extendTheme emit `--mui-*` vars.
|
|
22
|
+
- Identify via: @mui/material in deps plus createTheme.
|
|
23
|
+
|
|
24
|
+
## Gotchas
|
|
25
|
+
|
|
26
|
+
- spacing is a multiplier, not a px value; resolve before recording a spacing token.
|
|
27
|
+
- Customization splits across sx, styled(), and theme.components; gather all three.
|
|
28
|
+
- A shadow is an array index, and `@mui/joy` is not `@mui/material`.
|
|
29
|
+
|
|
30
|
+
## Example output
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"schema_version": "52.0",
|
|
35
|
+
"nodes": [
|
|
36
|
+
{ "id": "tok.color.primary-main", "type": "token", "subtype": "color", "name": "palette.primary.main", "summary": "Primary brand color from the MUI palette.", "complexity": "simple", "tags": ["color", "brand", "theme"] },
|
|
37
|
+
{ "id": "tok.shadow.elev-4", "type": "token", "subtype": "shadow", "name": "shadows[4]", "summary": "Elevation level 4 box-shadow.", "complexity": "simple", "tags": ["shadow", "elevation", "depth"] },
|
|
38
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Contained button bound to primary palette.", "complexity": "moderate", "tags": ["interactive", "atom"] }
|
|
39
|
+
],
|
|
40
|
+
"edges": [
|
|
41
|
+
{ "source": "cmp.button", "target": "tok.color.primary-main", "type": "uses-token", "direction": "forward", "weight": 0.9 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: radix-themes
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://www.radix-ui.com/themes/docs/theme/color. -->
|
|
8
|
+
|
|
9
|
+
# Radix Themes
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- `@radix-ui/themes` is the styled layer, distinct from the headless `@radix-ui/react-*` primitives.
|
|
14
|
+
- Each hue exposes a 12-step color scale per step role: steps 1 to 2 are backgrounds, 3 to 5 component backgrounds, 6 to 8 borders, 9 is solid, 11 is low-contrast text, 12 is high-contrast text.
|
|
15
|
+
- Global config lives on `<Theme>` props: accentColor, grayColor, radius, scaling, appearance.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `import "@radix-ui/themes/styles.css"` plus a `<Theme>` at the app root.
|
|
20
|
+
- Per-step vars `--<accent>-1` through `--<accent>-12`.
|
|
21
|
+
- Identify via: @radix-ui/themes in deps plus styles.css import.
|
|
22
|
+
|
|
23
|
+
## Gotchas
|
|
24
|
+
|
|
25
|
+
- Map the 12 steps as one scale with step roles; the step number encodes intent, so tag accordingly.
|
|
26
|
+
- Do not confuse `@radix-ui/themes` (themed) with `@radix-ui/react-*` (headless, the shadcn substrate).
|
|
27
|
+
- radius and accentColor are theme-level config, not per-component tokens.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "tok.color.accent-9", "type": "token", "subtype": "color", "name": "--accent-9", "summary": "Solid accent step 9 used for filled actions.", "complexity": "simple", "tags": ["color", "brand", "theme"] },
|
|
36
|
+
{ "id": "tok.color.accent-11", "type": "token", "subtype": "color", "name": "--accent-11", "summary": "Low-contrast accent text, step 11.", "complexity": "simple", "tags": ["color", "contrast", "body-text"] },
|
|
37
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Themed solid button using accent step 9.", "complexity": "moderate", "tags": ["interactive", "atom"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "cmp.button", "target": "tok.color.accent-9", "type": "uses-token", "direction": "forward", "weight": 0.9 }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shadcn
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://ui.shadcn.com/docs/theming. -->
|
|
8
|
+
|
|
9
|
+
# shadcn/ui
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- Not an npm dependency: components are copied INTO the repo (you own the source), built on Radix primitives plus Tailwind.
|
|
14
|
+
- Color tokens are CSS vars in `globals.css`, semantic and paired: `--background`/`--foreground`, `--primary`, `--muted`, `--border`, `--ring` with `-foreground` partners. Values are HSL channel triplets (newer installs use OKLCH).
|
|
15
|
+
- Variants come from cva with variant and size axes.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `components.json` (style, tailwind.baseColor, cssVariables, aliases).
|
|
20
|
+
- `lib/utils.ts` exporting the cn() helper (clsx plus tailwind-merge).
|
|
21
|
+
- `components/ui/` source files; `app/globals.css` with `:root` and `.dark`.
|
|
22
|
+
- Identify via: components.json plus lib/utils.ts cn().
|
|
23
|
+
|
|
24
|
+
## Gotchas
|
|
25
|
+
|
|
26
|
+
- Components are first-party source: model relationships to Radix as composes or extends, NOT an external depends-on.
|
|
27
|
+
- Bare channel triplets like `240 10% 4%` are token values; capture them as tokens.
|
|
28
|
+
- cn() is plumbing, not a component node.
|
|
29
|
+
|
|
30
|
+
## Example output
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"schema_version": "52.0",
|
|
35
|
+
"nodes": [
|
|
36
|
+
{ "id": "tok.color.primary", "type": "token", "subtype": "color", "name": "--primary", "summary": "Semantic primary color, HSL channel triplet.", "complexity": "simple", "tags": ["color", "brand", "theme"] },
|
|
37
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Owned button source wrapping Radix Slot.", "complexity": "moderate", "tags": ["interactive", "atom"] },
|
|
38
|
+
{ "id": "var.button.destructive", "type": "variant", "name": "destructive", "summary": "cva destructive variant of Button.", "complexity": "simple", "tags": ["destructive", "state"] }
|
|
39
|
+
],
|
|
40
|
+
"edges": [
|
|
41
|
+
{ "source": "cmp.button", "target": "tok.color.primary", "type": "uses-token", "direction": "forward", "weight": 0.8 },
|
|
42
|
+
{ "source": "var.button.destructive", "target": "cmp.button", "type": "extends", "direction": "forward", "weight": 0.7 }
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: styled-components
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://styled-components.com/docs/advanced#theming. -->
|
|
8
|
+
|
|
9
|
+
# styled-components
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- Runtime CSS-in-JS via tagged templates: ``styled.div`...` `` and ``styled(Base)`...` ``.
|
|
14
|
+
- Tokens live in a plain JS theme passed through `<ThemeProvider theme={}>` and read by interpolation: `${p => p.theme.colors.primary}`.
|
|
15
|
+
- Variants are prop-conditional interpolation (`${p => p.$variant === 'primary' && css`...`}`); ``css`...` `` composes reusable blocks; transient `$`-props drive styles but are not forwarded to the DOM.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `theme.ts` with the theme object; ThemeProvider at the root.
|
|
20
|
+
- `*.styles.ts` co-located; ``styled.X`...` ``, ``css`...` ``, ``createGlobalStyle`...` ``.
|
|
21
|
+
- Identify via: styled-components in deps plus ThemeProvider.
|
|
22
|
+
|
|
23
|
+
## Gotchas
|
|
24
|
+
|
|
25
|
+
- There is no token file format: infer subtype from the key path (`theme.colors.*` to color, `theme.space.*` to spacing).
|
|
26
|
+
- Variants are prop-conditional CSS; derive variant and state from the prop union plus `&:hover` and `&:disabled`.
|
|
27
|
+
- v6 adds createGlobalStyle and RSC createTheme emitting CSS vars; transient `$`-props never reach the DOM.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "tok.color.primary", "type": "token", "subtype": "color", "name": "theme.colors.primary", "summary": "Primary brand color read via theme interpolation.", "complexity": "simple", "tags": ["color", "brand", "theme"] },
|
|
36
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Styled button reading theme.colors.", "complexity": "moderate", "tags": ["interactive", "atom"] },
|
|
37
|
+
{ "id": "st.button.hover", "type": "state", "name": "hover", "summary": "Hover state via the &:hover selector.", "complexity": "simple", "tags": ["hover", "state"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "cmp.button", "target": "tok.color.primary", "type": "uses-token", "direction": "forward", "weight": 0.9 },
|
|
41
|
+
{ "source": "cmp.button", "target": "st.button.hover", "type": "transitions-to", "direction": "forward", "weight": 0.5 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tailwind
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://tailwindcss.com/docs/theme. -->
|
|
8
|
+
|
|
9
|
+
# Tailwind
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- v4 inverts the model: tokens are namespaced CSS custom properties in an `@theme {}` block in the CSS entry. Tailwind generates utilities from token names.
|
|
14
|
+
- Namespaces map to subtypes: `--color-*` to color (drives bg/text/border), `--spacing-*` to spacing, `--font-*` to typography, `--radius-*` to radius.
|
|
15
|
+
- v3 defines tokens in `tailwind.config.{js,ts}` under `theme` or `theme.extend`.
|
|
16
|
+
- Utility-class clusters on one element are that component's variants.
|
|
17
|
+
|
|
18
|
+
## File patterns
|
|
19
|
+
|
|
20
|
+
- v4: `app.css` or `globals.css` with `@import "tailwindcss"` plus an `@theme` block. May ship NO js config.
|
|
21
|
+
- v3: `tailwind.config.{js,ts,cjs,mjs}`.
|
|
22
|
+
- Identify via: tailwindcss in deps plus either config file or `@theme`.
|
|
23
|
+
|
|
24
|
+
## Gotchas
|
|
25
|
+
|
|
26
|
+
- The resolved `--color-*` and `--spacing-*` values are the tokens; utility classes are usage, not token nodes.
|
|
27
|
+
- Arbitrary values `bg-[#1da1f2]` and `p-[3px]` bypass tokens. Flag them as an anti-pattern node, not a token.
|
|
28
|
+
- `@apply` inlines utilities; it is not a token definition.
|
|
29
|
+
|
|
30
|
+
## Example output
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"schema_version": "52.0",
|
|
35
|
+
"nodes": [
|
|
36
|
+
{ "id": "tok.color.primary", "type": "token", "subtype": "color", "name": "--color-primary", "summary": "Brand primary color token from @theme.", "complexity": "simple", "tags": ["color", "brand", "theme"] },
|
|
37
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Primary action button styled with utility clusters.", "complexity": "moderate", "tags": ["interactive", "atom"] },
|
|
38
|
+
{ "id": "ap.arbitrary-bg", "type": "anti-pattern", "name": "Arbitrary bg-[#1da1f2]", "summary": "Hardcoded color bypasses the token system.", "complexity": "simple", "tags": ["anti-pattern", "color"] }
|
|
39
|
+
],
|
|
40
|
+
"edges": [
|
|
41
|
+
{ "source": "cmp.button", "target": "tok.color.primary", "type": "uses-token", "direction": "forward", "weight": 0.9 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vanilla-extract
|
|
3
|
+
kind: system
|
|
4
|
+
composes_into: [token-mapper, component-taxonomy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://vanilla-extract.style/documentation/theming/. -->
|
|
8
|
+
|
|
9
|
+
# vanilla-extract
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- Zero-runtime CSS-in-TS: `*.css.ts` files are extracted to static CSS at build time.
|
|
14
|
+
- `createTheme(tokens)` returns `[themeClass, vars]`. `createThemeContract(shape)` declares a typed token CONTRACT (null leaves) that several `createTheme(contract, values)` implement, the canonical light and dark multi-theme pattern.
|
|
15
|
+
- `style({})` defines a class; `styleVariants({})` and `recipe()` produce variant APIs; sprinkles add atomic utilities.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `*.css.ts` such as `theme.css.ts`, `contract.css.ts`, `sprinkles.css.ts`.
|
|
20
|
+
- `@vanilla-extract/vite-plugin` (or webpack) in config.
|
|
21
|
+
- Identify via: @vanilla-extract/css in deps plus a `*.css.ts` file.
|
|
22
|
+
|
|
23
|
+
## Gotchas
|
|
24
|
+
|
|
25
|
+
- Tokens are the vars from createTheme or contract keys, NOT the literal values in the generated CSS.
|
|
26
|
+
- The contract is the source of truth; each theme mirrors or extends it (model with mirrors or extends edges).
|
|
27
|
+
- styleVariants and recipe are variants. Read the `.css.ts` source, not the generated `.css`.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "tok.color.brand", "type": "token", "subtype": "color", "name": "vars.color.brand", "summary": "Brand color slot declared in the theme contract.", "complexity": "simple", "tags": ["color", "brand", "theme"] },
|
|
36
|
+
{ "id": "tok.space.md", "type": "token", "subtype": "spacing", "name": "vars.space.md", "summary": "Medium spacing scale step.", "complexity": "simple", "tags": ["spacing", "gap"] },
|
|
37
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Recipe-driven button consuming contract vars.", "complexity": "moderate", "tags": ["interactive", "atom"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "cmp.button", "target": "tok.color.brand", "type": "uses-token", "direction": "forward", "weight": 0.9 },
|
|
41
|
+
{ "source": "cmp.button", "target": "tok.space.md", "type": "uses-token", "direction": "forward", "weight": 0.5 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|