picasso-skill 1.5.1 → 2.0.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.
Files changed (44) hide show
  1. package/agents/picasso.md +14 -2
  2. package/checklists/pre-ship.md +83 -0
  3. package/commands/backlog.md +34 -0
  4. package/commands/variants.md +18 -0
  5. package/package.json +3 -1
  6. package/references/accessibility-wcag.md +245 -0
  7. package/references/anti-patterns.md +184 -0
  8. package/references/color-and-contrast.md +477 -0
  9. package/references/component-patterns.md +113 -0
  10. package/references/conversion-design.md +193 -0
  11. package/references/data-visualization.md +226 -0
  12. package/references/depth-and-elevation.md +211 -0
  13. package/references/design-system.md +176 -0
  14. package/references/generative-art.md +648 -0
  15. package/references/interaction-design.md +162 -0
  16. package/references/modern-css-performance.md +361 -0
  17. package/references/motion-and-animation.md +267 -0
  18. package/references/performance-optimization.md +746 -0
  19. package/references/react-patterns.md +318 -0
  20. package/references/responsive-design.md +452 -0
  21. package/references/sensory-design.md +369 -0
  22. package/references/spatial-design.md +176 -0
  23. package/references/style-presets.md +502 -0
  24. package/references/tools-catalog.md +103 -0
  25. package/references/typography.md +415 -0
  26. package/references/ux-psychology.md +235 -0
  27. package/references/ux-writing.md +513 -0
  28. package/skills/picasso/SKILL.md +58 -2
  29. package/skills/picasso/references/animation-performance.md +244 -0
  30. package/skills/picasso/references/brand-and-identity.md +136 -0
  31. package/skills/picasso/references/code-typography.md +222 -0
  32. package/skills/picasso/references/color-and-contrast.md +56 -2
  33. package/skills/picasso/references/dark-mode.md +199 -0
  34. package/skills/picasso/references/depth-and-elevation.md +211 -0
  35. package/skills/picasso/references/i18n-visual-patterns.md +177 -0
  36. package/skills/picasso/references/images-and-media.md +222 -0
  37. package/skills/picasso/references/loading-and-states.md +258 -0
  38. package/skills/picasso/references/micro-interactions.md +291 -0
  39. package/skills/picasso/references/motion-and-animation.md +9 -2
  40. package/skills/picasso/references/navigation-patterns.md +247 -0
  41. package/skills/picasso/references/style-presets.md +1 -1
  42. package/skills/picasso/references/tables-and-forms.md +227 -0
  43. package/skills/picasso/references/tools-catalog.md +103 -0
  44. package/skills/picasso/references/typography.md +45 -2
@@ -0,0 +1,267 @@
1
+ # Motion and Animation Reference
2
+
3
+ ## Table of Contents
4
+ 1. Principles
5
+ 2. Easing Functions
6
+ 3. Duration Guidelines
7
+ 4. Staggered Reveals
8
+ 5. Scroll-Triggered Animation
9
+ 6. Text Morphing
10
+ 7. Micro-Interactions
11
+ 8. Reduced Motion
12
+ 9. Common Mistakes
13
+
14
+ ---
15
+
16
+ ## 1. Principles
17
+
18
+ Motion serves three purposes: feedback (confirming an action), orientation (showing where something went), and delight (making the interface feel alive). If an animation does not serve one of these, remove it.
19
+
20
+ ### Priority of Animation Investment
21
+ 1. Page load choreography (highest impact, seen by everyone)
22
+ 2. State transitions (tabs, modals, accordions)
23
+ 3. Hover/focus states
24
+ 4. Scroll-triggered reveals
25
+ 5. Loading states and skeletons
26
+ 6. Micro-interactions (button press effects, toggle animations)
27
+
28
+ Invest time in this order. A well-choreographed page load does more than fifty micro-interactions.
29
+
30
+ ---
31
+
32
+ ## 2. Easing Functions
33
+
34
+ ### Use These
35
+ ```css
36
+ /* Named exponential curves — graduated drama for arrivals */
37
+ --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* standard arrivals */
38
+ --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* smooth arrivals */
39
+ --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* dramatic arrivals */
40
+
41
+ /* Shorthand alias — default to expo for most cases */
42
+ --ease-out: var(--ease-out-expo);
43
+
44
+ /* Standard ease-in: elements departing */
45
+ --ease-in: cubic-bezier(0.55, 0.085, 0.68, 0.53);
46
+
47
+ /* Standard ease-in-out: elements transforming in place */
48
+ --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
49
+
50
+ /* Spring-like (subtle): natural deceleration */
51
+ --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
52
+ ```
53
+
54
+ Use `--ease-out-quart` for routine UI (tooltips, dropdowns), `--ease-out-quint` for smooth page reveals, and `--ease-out-expo` for dramatic hero entrances. Having three named curves lets you dial drama without reaching for custom values.
55
+
56
+ ### Never Use
57
+ - `linear` for UI animations (looks mechanical)
58
+ - `ease` (the CSS default is mediocre)
59
+ - `bounce` / elastic easing with visible oscillation (looks dated and gimmicky). Subtle single-pass overshoot (like `--ease-spring` above) is acceptable.
60
+ - Spring animations with multiple bounces (too playful for most UIs)
61
+
62
+ ---
63
+
64
+ ## 3. Duration Guidelines
65
+
66
+ | Type | Duration | Why |
67
+ |---|---|---|
68
+ | Hover state change | 100-150ms | Must feel instant |
69
+ | Button press | 80-120ms | Tactile response |
70
+ | Tooltip appear | 150-200ms | Quick but not jarring |
71
+ | Fade in/out | 150-250ms | Smooth perception |
72
+ | Slide/expand | 200-350ms | Visible movement |
73
+ | Page transition | 300-500ms | Substantial change |
74
+ | Complex choreography | 400-800ms total | Entrance sequence |
75
+
76
+ Rule of thumb: if the user is waiting for it, it should be fast (under 200ms). If the user is watching it, it can be slower (200-500ms).
77
+
78
+ ---
79
+
80
+ ## 4. Staggered Reveals
81
+
82
+ The most impactful animation pattern. Elements enter one after another with increasing delay.
83
+
84
+ ### CSS-Only Pattern
85
+ ```css
86
+ .reveal-item {
87
+ opacity: 0;
88
+ transform: translateY(12px);
89
+ animation: reveal 0.5s var(--ease-out) forwards;
90
+ }
91
+
92
+ @keyframes reveal {
93
+ to {
94
+ opacity: 1;
95
+ transform: translateY(0);
96
+ }
97
+ }
98
+
99
+ .reveal-item:nth-child(1) { animation-delay: 0ms; }
100
+ .reveal-item:nth-child(2) { animation-delay: 60ms; }
101
+ .reveal-item:nth-child(3) { animation-delay: 120ms; }
102
+ .reveal-item:nth-child(4) { animation-delay: 180ms; }
103
+ .reveal-item:nth-child(5) { animation-delay: 240ms; }
104
+ ```
105
+
106
+ ### Key Parameters
107
+ - **Stagger interval**: 40-80ms between items (shorter for many items, longer for few)
108
+ - **Translate distance**: 8-16px (subtle is better)
109
+ - **Do not stagger more than 6-8 items**. After that, group them.
110
+
111
+ ### React with Motion Library
112
+ ```jsx
113
+ import { motion } from "framer-motion";
114
+
115
+ const container = {
116
+ hidden: {},
117
+ show: { transition: { staggerChildren: 0.06 } }
118
+ };
119
+
120
+ const item = {
121
+ hidden: { opacity: 0, y: 12 },
122
+ show: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.16, 1, 0.3, 1] } }
123
+ };
124
+ ```
125
+
126
+ ---
127
+
128
+ ## 5. Scroll-Triggered Animation
129
+
130
+ ### CSS-Only with Scroll-Driven Animations
131
+ ```css
132
+ @keyframes fade-in {
133
+ from { opacity: 0; transform: translateY(20px); }
134
+ to { opacity: 1; transform: translateY(0); }
135
+ }
136
+
137
+ .scroll-reveal {
138
+ animation: fade-in linear both;
139
+ animation-timeline: view();
140
+ animation-range: entry 0% entry 30%;
141
+ }
142
+ ```
143
+
144
+ ### Intersection Observer Pattern
145
+ ```js
146
+ const observer = new IntersectionObserver(
147
+ (entries) => {
148
+ entries.forEach(entry => {
149
+ if (entry.isIntersecting) {
150
+ entry.target.classList.add('visible');
151
+ observer.unobserve(entry.target);
152
+ }
153
+ });
154
+ },
155
+ { threshold: 0.15, rootMargin: '0px 0px -50px 0px' }
156
+ );
157
+
158
+ document.querySelectorAll('.animate-on-scroll').forEach(el => observer.observe(el));
159
+ ```
160
+
161
+ ---
162
+
163
+ ## 6. Text Morphing
164
+
165
+ For animated text transitions (changing labels, counters, status updates), use **Torph** (dependency-free).
166
+
167
+ ### Installation
168
+ ```
169
+ npm i torph
170
+ ```
171
+
172
+ ### Usage
173
+ ```jsx
174
+ import { TextMorph } from 'torph/react';
175
+
176
+ // Automatically animates between text values
177
+ <TextMorph>{status}</TextMorph>
178
+
179
+ // Works with any dynamic text
180
+ <button>
181
+ <TextMorph>{isLoading ? "Processing..." : `Buy for $${price}`}</TextMorph>
182
+ </button>
183
+ ```
184
+
185
+ Torph morphs individual characters with smooth enter/exit animations. It works with React, Vue, Svelte, and vanilla TypeScript.
186
+
187
+ ### When to Use
188
+ - Tab labels that change on selection
189
+ - Button text that updates (Add to Cart -> Added!)
190
+ - Counter values that increment
191
+ - Status indicators that cycle through states
192
+ - Any text that changes in response to user action
193
+
194
+ ---
195
+
196
+ ## 7. Micro-Interactions
197
+
198
+ ### Button Press
199
+ ```css
200
+ button:active {
201
+ transform: scale(0.97);
202
+ transition: transform 80ms var(--ease-in);
203
+ }
204
+ ```
205
+
206
+ ### Toggle Switch
207
+ Animate the knob position and background color simultaneously. The knob should arrive slightly before the color finishes changing.
208
+
209
+ ### Checkbox
210
+ Scale the checkmark from 0 to 1 with a slight overshoot:
211
+ ```css
212
+ .checkbox-mark {
213
+ transform: scale(0);
214
+ transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
215
+ }
216
+ .checkbox:checked .checkbox-mark {
217
+ transform: scale(1);
218
+ }
219
+ ```
220
+
221
+ ### Skeleton Loading
222
+ Shimmer from left to right using a gradient animation:
223
+ ```css
224
+ .skeleton {
225
+ background: linear-gradient(90deg,
226
+ var(--surface-2) 25%,
227
+ var(--surface-3) 50%,
228
+ var(--surface-2) 75%
229
+ );
230
+ background-size: 200% 100%;
231
+ animation: shimmer 1.5s infinite;
232
+ }
233
+ @keyframes shimmer {
234
+ 0% { background-position: 200% 0; }
235
+ 100% { background-position: -200% 0; }
236
+ }
237
+ ```
238
+
239
+ ---
240
+
241
+ ## 8. Reduced Motion
242
+
243
+ Always respect the user's motion preference:
244
+ ```css
245
+ @media (prefers-reduced-motion: reduce) {
246
+ *, *::before, *::after {
247
+ animation-duration: 0.01ms !important;
248
+ animation-iteration-count: 1 !important;
249
+ transition-duration: 0.01ms !important;
250
+ scroll-behavior: auto !important;
251
+ }
252
+ }
253
+ ```
254
+
255
+ This does not mean removing all visual feedback. Opacity changes (fades) are still acceptable. Remove translation, scaling, and rotation animations.
256
+
257
+ ---
258
+
259
+ ## 9. Common Mistakes
260
+
261
+ - Animating everything on the page (creates visual noise, reduces perceived performance)
262
+ - Using `animation-duration: 0` for reduced motion (some browsers behave unexpectedly; use 0.01ms)
263
+ - Bounce/elastic easing on UI elements (acceptable only in game-like or toy-like contexts)
264
+ - Animating layout properties (width, height, top, left) instead of transforms (causes layout thrashing)
265
+ - Forgetting `will-change` on frequently animated elements (or overusing it on everything)
266
+ - Staggering 20+ items with visible delays (group them or animate the container)
267
+ - Using `transition: all 0.3s` (animates properties you did not intend; be explicit about which properties to transition)