picasso-skill 2.5.0 → 2.6.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/agents/picasso.md +2 -4
- package/package.json +1 -1
- package/references/accessibility-wcag.md +3 -0
- package/references/code-typography.md +36 -166
- package/references/color-and-contrast.md +78 -345
- package/references/generative-art.md +49 -561
- package/references/modern-css-performance.md +46 -258
- package/references/motion-and-animation.md +225 -88
- package/references/navigation-patterns.md +29 -186
- package/references/performance-optimization.md +42 -678
- package/references/react-patterns.md +56 -216
- package/references/responsive-design.md +77 -379
- package/references/sensory-design.md +62 -263
- package/references/ux-writing.md +64 -354
- package/references/animation-performance.md +0 -244
- package/references/interaction-design.md +0 -162
package/agents/picasso.md
CHANGED
|
@@ -169,7 +169,7 @@ Do NOT jump to code. Present a **Design Brief** -- a short, opinionated creative
|
|
|
169
169
|
|
|
170
170
|
After the user confirms the brief, load the SPECIFIC reference files for what they selected. Do not load all 30+ references. Load only what's relevant:
|
|
171
171
|
|
|
172
|
-
- Selected motion Tier 2+? Load `motion-and-animation.md` + `micro-interactions.md`
|
|
172
|
+
- Selected motion Tier 2+? Load `motion-and-animation.md` + `micro-interactions.md`
|
|
173
173
|
- Selected sounds? Load `sensory-design.md` (Section 1: UI Sound Design)
|
|
174
174
|
- Selected haptics? Load `sensory-design.md` (Section 2: Haptic Feedback)
|
|
175
175
|
- Selected animated icons? Load `micro-interactions.md` (Section 5: Toggle and Switch Animations)
|
|
@@ -288,10 +288,8 @@ skills/picasso/references/typography.md # Fonts, scales, pairing
|
|
|
288
288
|
skills/picasso/references/color-and-contrast.md # OKLCH, tinted neutrals
|
|
289
289
|
skills/picasso/references/spatial-design.md # Spacing, grids, hierarchy
|
|
290
290
|
skills/picasso/references/depth-and-elevation.md # Shadows, z-index, layering
|
|
291
|
-
skills/picasso/references/motion-and-animation.md # Easing, staggering, duration
|
|
291
|
+
skills/picasso/references/motion-and-animation.md # Easing, staggering, duration, performance (compositor props, will-change, contain)
|
|
292
292
|
skills/picasso/references/micro-interactions.md # Scroll animations, gestures, View Transitions
|
|
293
|
-
skills/picasso/references/animation-performance.md # Compositor props, will-change, contain
|
|
294
|
-
skills/picasso/references/interaction-design.md # Forms, focus, states, Popover API
|
|
295
293
|
skills/picasso/references/navigation-patterns.md # Breadcrumbs, sidebar, tabs, bottom bar
|
|
296
294
|
skills/picasso/references/tables-and-forms.md # Sortable tables, validation, multi-step
|
|
297
295
|
skills/picasso/references/loading-and-states.md # Skeletons, empty states, error boundaries
|
package/package.json
CHANGED
|
@@ -86,6 +86,9 @@ Move focus to `<h1>` of new view (add `tabindex="-1"`) or main content landmark.
|
|
|
86
86
|
<main id="main" tabindex="-1">...</main>
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
### Focus Indicator Rule
|
|
90
|
+
Never remove focus outlines without replacement. Use `:focus-visible` (not `:focus`) to show focus rings only for keyboard navigation, not mouse clicks.
|
|
91
|
+
|
|
89
92
|
### Focus Trapping
|
|
90
93
|
Contain Tab/Shift+Tab within overlays. Use `inert` attribute on background content (modern browsers) or manage via JS. On last focusable element, Tab wraps to first.
|
|
91
94
|
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
# Code Typography Reference
|
|
2
2
|
|
|
3
|
-
## Table of Contents
|
|
4
|
-
1. Monospace Font Selection
|
|
5
|
-
2. Code Block Design
|
|
6
|
-
3. Syntax Highlighting Accessibility
|
|
7
|
-
4. Copy-to-Clipboard
|
|
8
|
-
5. Responsive Code Blocks
|
|
9
|
-
6. Inline Code Styling
|
|
10
|
-
7. Diff Views
|
|
11
|
-
8. Terminal Output
|
|
12
|
-
9. Common Mistakes
|
|
13
|
-
|
|
14
3
|
---
|
|
15
4
|
|
|
16
5
|
## 1. Monospace Font Selection
|
|
@@ -19,204 +8,85 @@
|
|
|
19
8
|
|---|---|---|---|
|
|
20
9
|
| JetBrains Mono | Yes | Clean, geometric | General purpose, IDEs |
|
|
21
10
|
| Fira Code | Yes | Slightly rounded | Tutorials, docs |
|
|
22
|
-
| Source Code Pro | No | Adobe, professional | Enterprise
|
|
11
|
+
| Source Code Pro | No | Adobe, professional | Enterprise |
|
|
23
12
|
| IBM Plex Mono | No | Corporate, legible | Documentation |
|
|
24
13
|
| Geist Mono | No | Vercel, modern | Next.js projects |
|
|
25
14
|
| Cascadia Code | Yes | Microsoft, playful | Terminals |
|
|
26
15
|
|
|
27
|
-
|
|
28
|
-
code, pre, .mono {
|
|
29
|
-
font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
|
|
30
|
-
font-feature-settings: 'liga' 1, 'calt' 1; /* enable ligatures */
|
|
31
|
-
font-variant-ligatures: common-ligatures;
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Ligatures: `=>` becomes ⇒, `!==` becomes ≢, `>=` becomes ≥. Enable for display, disable for editing if users copy code.
|
|
16
|
+
Always specify a modern monospace font first, then fallback to `monospace`. Enable ligatures with `font-feature-settings: 'liga' 1, 'calt' 1` for display; disable for editing if users copy code.
|
|
36
17
|
|
|
37
18
|
---
|
|
38
19
|
|
|
39
20
|
## 2. Code Block Design
|
|
40
21
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
padding: 1rem 1.25rem;
|
|
47
|
-
font-size: 0.875rem; /* 14px — slightly smaller than body */
|
|
48
|
-
line-height: 1.65; /* Looser than body text for readability */
|
|
49
|
-
overflow-x: auto;
|
|
50
|
-
tab-size: 2;
|
|
51
|
-
-moz-tab-size: 2;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Dark mode code blocks on light sites */
|
|
55
|
-
[data-theme="light"] pre {
|
|
56
|
-
background: oklch(0.14 0.02 230);
|
|
57
|
-
color: oklch(0.90 0.01 230);
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Line numbers (optional):
|
|
62
|
-
```css
|
|
63
|
-
pre.line-numbers {
|
|
64
|
-
counter-reset: line;
|
|
65
|
-
padding-left: 3.5rem;
|
|
66
|
-
position: relative;
|
|
67
|
-
}
|
|
68
|
-
pre.line-numbers .line::before {
|
|
69
|
-
counter-increment: line;
|
|
70
|
-
content: counter(line);
|
|
71
|
-
position: absolute;
|
|
72
|
-
left: 1rem;
|
|
73
|
-
color: var(--text-muted);
|
|
74
|
-
font-size: 0.75rem;
|
|
75
|
-
user-select: none; /* don't copy line numbers */
|
|
76
|
-
}
|
|
77
|
-
```
|
|
22
|
+
- Background: `var(--surface-1)` with 1px border, 8px radius
|
|
23
|
+
- Font size: 0.875rem (14px), line-height: 1.65 (looser than body for readability)
|
|
24
|
+
- `overflow-x: auto; tab-size: 2`
|
|
25
|
+
- Dark code blocks on light sites: `oklch(0.14 0.02 230)` background
|
|
26
|
+
- Line numbers: use CSS counters with `user-select: none` so they don't get copied
|
|
78
27
|
|
|
79
28
|
---
|
|
80
29
|
|
|
81
30
|
## 3. Syntax Highlighting Accessibility
|
|
82
31
|
|
|
83
|
-
Every token color must have **minimum 3:1 contrast** against the code block background. Don't rely on color alone
|
|
32
|
+
Every token color must have **minimum 3:1 contrast** against the code block background. Don't rely on color alone; use font-weight or font-style for emphasis.
|
|
84
33
|
|
|
85
|
-
| Token Type | Suggested OKLCH (dark bg) |
|
|
34
|
+
| Token Type | Suggested OKLCH (dark bg) | Style |
|
|
86
35
|
|---|---|---|
|
|
87
|
-
| Keywords | `oklch(0.75 0.15 300)` |
|
|
88
|
-
| Strings | `oklch(0.72 0.14 150)` |
|
|
89
|
-
| Numbers | `oklch(0.75 0.12 60)` |
|
|
90
|
-
| Comments | `oklch(0.50 0.01 230)` |
|
|
91
|
-
| Functions | `oklch(0.78 0.10 230)` |
|
|
92
|
-
| Variables | `oklch(0.85 0.01 230)` |
|
|
93
|
-
|
|
94
|
-
```css
|
|
95
|
-
.token-keyword { color: oklch(0.75 0.15 300); font-weight: 600; }
|
|
96
|
-
.token-string { color: oklch(0.72 0.14 150); }
|
|
97
|
-
.token-comment { color: oklch(0.50 0.01 230); font-style: italic; }
|
|
98
|
-
```
|
|
36
|
+
| Keywords | `oklch(0.75 0.15 300)` | bold |
|
|
37
|
+
| Strings | `oklch(0.72 0.14 150)` | normal |
|
|
38
|
+
| Numbers | `oklch(0.75 0.12 60)` | normal |
|
|
39
|
+
| Comments | `oklch(0.50 0.01 230)` | italic |
|
|
40
|
+
| Functions | `oklch(0.78 0.10 230)` | normal |
|
|
41
|
+
| Variables | `oklch(0.85 0.01 230)` | normal |
|
|
99
42
|
|
|
100
43
|
---
|
|
101
44
|
|
|
102
45
|
## 4. Copy-to-Clipboard
|
|
103
46
|
|
|
104
|
-
Position
|
|
105
|
-
|
|
106
|
-
```jsx
|
|
107
|
-
function CopyButton({ code }) {
|
|
108
|
-
const [copied, setCopied] = useState(false);
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
<button
|
|
112
|
-
onClick={() => {
|
|
113
|
-
navigator.clipboard.writeText(code);
|
|
114
|
-
setCopied(true);
|
|
115
|
-
setTimeout(() => setCopied(false), 2000);
|
|
116
|
-
}}
|
|
117
|
-
className="absolute top-2 right-2 p-1.5 rounded-md bg-white/5 hover:bg-white/10 text-xs text-muted"
|
|
118
|
-
aria-label="Copy code"
|
|
119
|
-
>
|
|
120
|
-
{copied ? 'Copied' : 'Copy'}
|
|
121
|
-
</button>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
```
|
|
47
|
+
Position top-right, show on hover, visual feedback ("Copied" for 2s). Use `navigator.clipboard.writeText()`. Add `aria-label="Copy code"`.
|
|
125
48
|
|
|
126
49
|
---
|
|
127
50
|
|
|
128
51
|
## 5. Responsive Code Blocks
|
|
129
52
|
|
|
130
|
-
Code
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
overflow-x: auto;
|
|
135
|
-
white-space: pre; /* code: no wrap */
|
|
136
|
-
-webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
pre.terminal {
|
|
140
|
-
white-space: pre-wrap; /* terminal: wrap is OK */
|
|
141
|
-
word-break: break-all;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* Hide scrollbar but keep functionality */
|
|
145
|
-
pre::-webkit-scrollbar { height: 4px; }
|
|
146
|
-
pre::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
On very small screens (< 375px), consider reducing code font-size to 12px.
|
|
53
|
+
- Code: `white-space: pre; overflow-x: auto` (never wrap)
|
|
54
|
+
- Terminal output: `white-space: pre-wrap` (wrapping OK)
|
|
55
|
+
- Thin scrollbar: 4px height, subtle thumb color
|
|
56
|
+
- Below 375px, consider reducing to 12px font size
|
|
150
57
|
|
|
151
58
|
---
|
|
152
59
|
|
|
153
60
|
## 6. Inline Code Styling
|
|
154
61
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
```css
|
|
158
|
-
code:not(pre code) {
|
|
159
|
-
background: var(--surface-2);
|
|
160
|
-
padding: 0.15em 0.4em;
|
|
161
|
-
border-radius: 4px;
|
|
162
|
-
font-size: 0.9em; /* slightly smaller than surrounding text */
|
|
163
|
-
font-weight: 500;
|
|
164
|
-
border: 1px solid var(--border);
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Never use inline code for emphasis. It's for code references (`useState`, `border-radius`, `GET /api/users`), not for highlighting words.
|
|
62
|
+
Subtle distinction from body text: light background, 0.15em/0.4em padding, 4px radius, 0.9em font-size, 1px border. Never use inline code for emphasis; it's for code references (`useState`, `GET /api/users`).
|
|
169
63
|
|
|
170
64
|
---
|
|
171
65
|
|
|
172
66
|
## 7. Diff Views
|
|
173
67
|
|
|
174
|
-
Use color + icon
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.diff-add {
|
|
178
|
-
background: oklch(0.62 0.19 150 / 0.1);
|
|
179
|
-
border-left: 3px solid oklch(0.62 0.19 150);
|
|
180
|
-
}
|
|
181
|
-
.diff-add::before { content: '+'; color: oklch(0.62 0.19 150); }
|
|
182
|
-
|
|
183
|
-
.diff-remove {
|
|
184
|
-
background: oklch(0.55 0.22 25 / 0.1);
|
|
185
|
-
border-left: 3px solid oklch(0.55 0.22 25);
|
|
186
|
-
text-decoration: line-through;
|
|
187
|
-
opacity: 0.7;
|
|
188
|
-
}
|
|
189
|
-
.diff-remove::before { content: '-'; color: oklch(0.55 0.22 25); }
|
|
190
|
-
```
|
|
68
|
+
Use color + icon (not color alone, for colorblind users):
|
|
69
|
+
- Added: green-tinted background + left border + `+` prefix
|
|
70
|
+
- Removed: red-tinted background + left border + `-` prefix + `line-through` + reduced opacity
|
|
191
71
|
|
|
192
72
|
---
|
|
193
73
|
|
|
194
74
|
## 8. Terminal Output
|
|
195
75
|
|
|
196
|
-
Terminal
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
background: oklch(0.08 0.01 230);
|
|
201
|
-
color: oklch(0.80 0.01 150); /* slight green tint for terminal feel */
|
|
202
|
-
font-family: 'JetBrains Mono', monospace;
|
|
203
|
-
padding: 1rem;
|
|
204
|
-
border-radius: 8px;
|
|
205
|
-
}
|
|
206
|
-
.terminal .prompt { color: oklch(0.65 0.10 230); } /* blue prompt */
|
|
207
|
-
.terminal .output { color: oklch(0.75 0.01 230); } /* neutral output */
|
|
208
|
-
.terminal .error { color: oklch(0.65 0.22 25); } /* red errors */
|
|
209
|
-
```
|
|
76
|
+
Terminal styling should feel distinct from code blocks:
|
|
77
|
+
- Darker background: `oklch(0.08 0.01 230)`
|
|
78
|
+
- Slight green tint for text: `oklch(0.80 0.01 150)`
|
|
79
|
+
- Blue prompt, neutral output, red errors
|
|
210
80
|
|
|
211
81
|
---
|
|
212
82
|
|
|
213
83
|
## 9. Common Mistakes
|
|
214
84
|
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
85
|
+
- Code font too large (14px for blocks, 0.9em for inline)
|
|
86
|
+
- No horizontal scroll on code blocks
|
|
87
|
+
- Syntax colors with < 3:1 contrast (especially comments)
|
|
88
|
+
- Color-only diff indication (add +/- markers)
|
|
89
|
+
- Copying includes line numbers (use `user-select: none`)
|
|
90
|
+
- Same styling for code blocks and terminal (different purposes)
|
|
91
|
+
- `font-family: monospace` without named fonts (defaults to Courier New)
|
|
92
|
+
- No copy button
|