@symbo.ls/mcp 1.0.24 → 1.0.25
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/package.json
CHANGED
|
@@ -298,3 +298,33 @@ Dropdown: {
|
|
|
298
298
|
```
|
|
299
299
|
|
|
300
300
|
Use `show` only for elements that should be fully removed from layout with no animation. For modals, dropdowns, tooltips, drawers — always use the opacity pattern.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## 17. CSS selectors — nest media and pseudo, never chain into one string
|
|
305
|
+
|
|
306
|
+
```js
|
|
307
|
+
// ❌ WRONG — chained selector string
|
|
308
|
+
'@dark :hover': { background: 'blue' }
|
|
309
|
+
'@mobileL :focus': { outline: 'none' }
|
|
310
|
+
|
|
311
|
+
// ✅ CORRECT — nested objects
|
|
312
|
+
'@dark': { ':hover': { background: 'blue' } }
|
|
313
|
+
'@mobileL': { ':focus': { outline: 'none' } }
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## 18. Colors — define once, shade with modifiers, not Tailwind-style palettes
|
|
319
|
+
|
|
320
|
+
```js
|
|
321
|
+
// ❌ WRONG — multiple shade definitions
|
|
322
|
+
color: {
|
|
323
|
+
blue50: '#eff6ff', blue100: '#dbeafe', blue200: '#bfdbfe',
|
|
324
|
+
blue300: '#93c5fd', blue400: '#60a5fa', blue500: '#3b82f6',
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// ✅ CORRECT — single base, use modifiers in components
|
|
328
|
+
color: { blue: '#0474f2' }
|
|
329
|
+
// Then: 'blue.7' (opacity), 'blue+20' (lighten), 'blue-30' (darken)
|
|
330
|
+
```
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
}
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
**Note:** Array values
|
|
67
|
+
**Note:** Array values are `[@dark, @light]` theme pairs. Format: `'--colorName opacity tone'` where `--` is the color reference prefix, opacity is 0-1, and tone is `+N`/`-N` (RGB delta) or `=N` (HSL lightness %). Use semantic names (`title`, `caption`, `paragraph`, `disabled`, `line`) for text colors.
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
@@ -53,28 +53,63 @@ Card: {
|
|
|
53
53
|
|
|
54
54
|
### Adaptive semantic colors
|
|
55
55
|
|
|
56
|
-
Array syntax `[darkValue, lightValue]` with
|
|
56
|
+
Array syntax `[darkValue, lightValue]` — values prefixed with `--` are resolved as color references using space-separated format: `'--colorName opacity tone'`.
|
|
57
|
+
|
|
58
|
+
The `--` prefix tells the parser to resolve the value as a color reference (strip `--`, split by space, look up the color, apply opacity and tone). This is NOT a CSS variable — it's the Symbols color reference syntax.
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
title: ['--gray 1 -168', '--gray 1 +168'],
|
|
62
|
+
// ↑name ↑alpha ↑tone
|
|
63
|
+
// Dark: gray at full opacity, darkened 168 RGB
|
|
64
|
+
// Light: gray at full opacity, lightened 168 RGB
|
|
65
|
+
```
|
|
57
66
|
|
|
58
67
|
| Token | Dark | Light | Use |
|
|
59
68
|
|---|---|---|---|
|
|
60
|
-
| `title` |
|
|
61
|
-
| `caption` |
|
|
62
|
-
| `paragraph` |
|
|
63
|
-
| `disabled` |
|
|
64
|
-
| `line` |
|
|
69
|
+
| `title` | `'--gray 1 -168'` | `'--gray 1 +168'` | Primary text |
|
|
70
|
+
| `caption` | `'--gray 1 -68'` | `'--gray 1 +68'` | Secondary/meta |
|
|
71
|
+
| `paragraph` | `'--gray 1 -42'` | `'--gray 1 +42'` | Body copy |
|
|
72
|
+
| `disabled` | `'--gray 1 -26'` | `'--gray 1 +26'` | Disabled state |
|
|
73
|
+
| `line` | `'--gray 1 -16'` | `'--gray 1 +16'` | Borders/dividers |
|
|
65
74
|
|
|
66
|
-
### Color modifier syntax
|
|
75
|
+
### Color modifier syntax — the Symbols shading system
|
|
67
76
|
|
|
68
|
-
|
|
77
|
+
**Define each color ONCE as a single base value.** Generate all shades dynamically using modifiers — never define multiple shade variants of the same color (no `blue100`, `blue200`, `blue300` etc.).
|
|
69
78
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'gray
|
|
77
|
-
|
|
79
|
+
| Modifier | Syntax | Example | Effect |
|
|
80
|
+
|----------|--------|---------|--------|
|
|
81
|
+
| Opacity | `.XX` | `'blue.7'` | 70% opacity (0.7) |
|
|
82
|
+
| Lighten | `+N` | `'gray+50'` | Add N to each RGB channel (0-255) |
|
|
83
|
+
| Darken | `-N` | `'gray-68'` | Subtract N from each RGB channel |
|
|
84
|
+
| Absolute | `=N` | `'gray=90'` | Set HSL lightness to N% |
|
|
85
|
+
| Combined | `.XX+N` | `'gray.85+8'` | 85% opacity + lighten by 8 RGB |
|
|
86
|
+
|
|
87
|
+
```js
|
|
88
|
+
// ✅ CORRECT — one base color, shades via modifiers
|
|
89
|
+
color: {
|
|
90
|
+
blue: '#0474f2',
|
|
91
|
+
gray: '#4e4e50',
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Use in components:
|
|
95
|
+
background: 'blue' // base
|
|
96
|
+
background: 'blue.8' // 80% opacity
|
|
97
|
+
background: 'blue+20' // lightened
|
|
98
|
+
background: 'blue-30' // darkened
|
|
99
|
+
color: 'gray.5+15' // 50% opacity + 15 lighter
|
|
100
|
+
borderColor: 'gray+100' // light gray border
|
|
101
|
+
|
|
102
|
+
// ❌ WRONG — Tailwind-style shade palette (DO NOT DO THIS)
|
|
103
|
+
color: {
|
|
104
|
+
blue50: '#eff6ff',
|
|
105
|
+
blue100: '#dbeafe',
|
|
106
|
+
blue200: '#bfdbfe',
|
|
107
|
+
blue300: '#93c5fd',
|
|
108
|
+
blue400: '#60a5fa',
|
|
109
|
+
blue500: '#3b82f6',
|
|
110
|
+
blue600: '#2563eb',
|
|
111
|
+
// ... redundant — just use 'blue+N' / 'blue-N' modifiers
|
|
112
|
+
}
|
|
78
113
|
```
|
|
79
114
|
|
|
80
115
|
Opacity rules:
|
|
@@ -1213,3 +1213,42 @@ When creating new apps, always base the design system on the default template at
|
|
|
1213
1213
|
|
|
1214
1214
|
Never use font sizes smaller than what the default template defines. The default template enforces recommended, readable sizing for all new projects.
|
|
1215
1215
|
|
|
1216
|
+
---
|
|
1217
|
+
|
|
1218
|
+
## Rule 45 — Define each color ONCE — use modifier syntax for shades, not Tailwind-style palettes
|
|
1219
|
+
|
|
1220
|
+
Never define multiple shade variants of the same color (`blue100`, `blue200`, `blue300`). Define one base value and use the Symbols shading system: `.XX` (opacity), `+N` (lighten), `-N` (darken), `=N` (absolute lightness).
|
|
1221
|
+
|
|
1222
|
+
```js
|
|
1223
|
+
// ✅ CORRECT — single base, shades via modifiers in components
|
|
1224
|
+
color: { blue: '#0474f2' }
|
|
1225
|
+
// → 'blue', 'blue.7', 'blue+20', 'blue-30', 'blue.5+15'
|
|
1226
|
+
|
|
1227
|
+
// ❌ WRONG — Tailwind-style shade palette
|
|
1228
|
+
color: { blue50: '#eff6ff', blue100: '#dbeafe', blue200: '#bfdbfe', blue300: '#93c5fd' }
|
|
1229
|
+
```
|
|
1230
|
+
|
|
1231
|
+
---
|
|
1232
|
+
|
|
1233
|
+
## Rule 44 — Never chain CSS selectors — use nesting instead
|
|
1234
|
+
|
|
1235
|
+
Media queries (`@dark`, `@mobileL`) and pseudo-classes (`:hover`, `:active`) must be nested as separate objects, never chained into a single key string.
|
|
1236
|
+
|
|
1237
|
+
```js
|
|
1238
|
+
// ❌ WRONG — chained selector string
|
|
1239
|
+
Button: {
|
|
1240
|
+
'@dark :hover': { background: 'blue' },
|
|
1241
|
+
'@mobileL :active': { opacity: '0.5' },
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
// ✅ CORRECT — nested objects
|
|
1245
|
+
Button: {
|
|
1246
|
+
'@dark': {
|
|
1247
|
+
':hover': { background: 'blue' },
|
|
1248
|
+
},
|
|
1249
|
+
'@mobileL': {
|
|
1250
|
+
':active': { opacity: '0.5' },
|
|
1251
|
+
},
|
|
1252
|
+
}
|
|
1253
|
+
```
|
|
1254
|
+
|