Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changepacks/changepack_log_J7kZ5wcihsOAeZHW9L3kE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"changes":{"bindings/devup-ui-wasm/package.json":"Patch"},"note":"Support variable","date":"2026-04-01T07:11:17.490320600Z"}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ storybook-static
.sisyphus
test-results
playwright-report
.omc
14 changes: 11 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ devup-ui/
| Add CSS property | `libs/css/src/constant.rs` | Property mappings |
| Add pseudo selector | `packages/react/src/types/props/selector/` | TypeScript types |
| Modify extraction | `libs/extractor/src/lib.rs` | Core logic + tests |
| Theme system | `libs/sheet/src/theme.rs` | Color/typography |
| Theme system | `libs/sheet/src/theme.rs` | Color/typography/length/shadow |
| Plugin behavior | `packages/*-plugin/src/plugin.ts` | All follow same pattern |
| Component API | `packages/react/src/components/` | Box, Flex, Text... |
| WASM exports | `bindings/devup-ui-wasm/src/lib.rs` | JS-exposed functions |
Expand All @@ -49,7 +49,7 @@ devup-ui/
|--------|------|-------|------|
| extractor | `lib.rs` | 9,094 | Main extraction + tests |
| sheet | `lib.rs` | 1,821 | CSS output generation |
| theme | `theme.rs` | 1,526 | Color/typography system |
| theme | `theme.rs` | 1,526 | Color/typography/length/shadow system |
| css_utils | `css_utils.rs` | 1,239 | Template literal parsing |
| visit | `visit.rs` | 669 | AST visitor pattern |

Expand Down Expand Up @@ -105,11 +105,19 @@ All React components throw `Error('Cannot run on the runtime')` - they're compil
{
"theme": {
"colors": { "default": {...}, "dark": {...} },
"typography": { "heading": {...} }
"typography": { "heading": {...} },
"length": { "default": { "containerX": ["1px", null, "2px"] } },
"shadow": { "default": { "card": ["0 1px 2px #0003", null, null, "0 4px 8px #0003"] } }
}
}
```

### Length & Shadow Tokens
- Defined responsively like typography (arrays with `null` for skipped breakpoints)
- Used with `$` prefix: `<Box w="$containerX" />`, `<Box boxShadow="$card" />`
- `"$token"` and `{"$token"}` both expand to multiple breakpoint classes
- `{["$token"]}` inside a responsive array stays single class (array defines breakpoints)

### Plugin Pattern
All plugins wrap bundler config:
```ts
Expand Down
Loading
Loading