@@ -36,7 +36,7 @@ devup-ui/
3636| Add CSS property | ` libs/css/src/constant.rs ` | Property mappings |
3737| Add pseudo selector | ` packages/react/src/types/props/selector/ ` | TypeScript types |
3838| Modify extraction | ` libs/extractor/src/lib.rs ` | Core logic + tests |
39- | Theme system | ` libs/sheet/src/theme.rs ` | Color/typography |
39+ | Theme system | ` libs/sheet/src/theme.rs ` | Color/typography/length/shadow |
4040| Plugin behavior | ` packages/*-plugin/src/plugin.ts ` | All follow same pattern |
4141| Component API | ` packages/react/src/components/ ` | Box, Flex, Text... |
4242| WASM exports | ` bindings/devup-ui-wasm/src/lib.rs ` | JS-exposed functions |
@@ -49,7 +49,7 @@ devup-ui/
4949| --------| ------| -------| ------|
5050| extractor | ` lib.rs ` | 9,094 | Main extraction + tests |
5151| sheet | ` lib.rs ` | 1,821 | CSS output generation |
52- | theme | ` theme.rs ` | 1,526 | Color/typography system |
52+ | theme | ` theme.rs ` | 1,526 | Color/typography/length/shadow system |
5353| css_utils | ` css_utils.rs ` | 1,239 | Template literal parsing |
5454| visit | ` visit.rs ` | 669 | AST visitor pattern |
5555
@@ -105,11 +105,19 @@ All React components throw `Error('Cannot run on the runtime')` - they're compil
105105{
106106 "theme" : {
107107 "colors" : { "default" : {... }, "dark" : {... } },
108- "typography" : { "heading" : {... } }
108+ "typography" : { "heading" : {... } },
109+ "length" : { "default" : { "containerX" : [" 1px" , null , " 2px" ] } },
110+ "shadow" : { "default" : { "card" : [" 0 1px 2px #0003" , null , null , " 0 4px 8px #0003" ] } }
109111 }
110112}
111113```
112114
115+ ### Length & Shadow Tokens
116+ - Defined responsively like typography (arrays with ` null ` for skipped breakpoints)
117+ - Used with ` $ ` prefix: ` <Box w="$containerX" /> ` , ` <Box boxShadow="$card" /> `
118+ - ` "$token" ` and ` {"$token"} ` both expand to multiple breakpoint classes
119+ - ` {["$token"]} ` inside a responsive array stays single class (array defines breakpoints)
120+
113121### Plugin Pattern
114122All plugins wrap bundler config:
115123``` ts
0 commit comments