dreative 0.5.0 → 0.5.2
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/README.md +49 -27
- package/dist/cli/audit.js +206 -0
- package/dist/cli/audit.test.js +79 -0
- package/dist/cli/docsCheck.js +163 -0
- package/dist/cli/docsCheck.test.js +8 -0
- package/dist/cli/index.js +81 -8
- package/dist/server/preview.js +73 -73
- package/dist/server/store.js +11 -0
- package/dist/shared/artifacts.js +162 -0
- package/dist/shared/design.js +42 -22
- package/dist/shared/ruleSystem.js +130 -0
- package/dist/shared/ruleSystem.test.js +187 -0
- package/dist/shared/skillSystem.js +173 -0
- package/dist/shared/skillSystem.test.js +110 -0
- package/dist/ui/assets/{index--vztc_MR.js → index-CKwmbx2j.js} +13 -13
- package/dist/ui/index.html +12 -12
- package/package.json +5 -3
- package/skill/dreative/DESIGN.md +290 -95
- package/skill/dreative/PLAN.md +462 -71
- package/skill/dreative/SKILL.md +230 -126
- package/skill/dreative/frameworks/nextjs.md +13 -0
- package/skill/dreative/frameworks/react-vite.md +12 -0
- package/skill/dreative/frameworks/styling.md +14 -0
- package/skill/dreative/frameworks/sveltekit.md +10 -0
- package/skill/dreative/frameworks/vue-nuxt.md +12 -0
- package/skill/dreative/recipes/3d-recipes.md +44 -0
- package/skill/dreative/recipes/cinematic-recipes.md +19 -0
- package/skill/dreative/recipes/immersive-recipes.md +18 -0
- package/skill/dreative/recipes/media-recipes.md +60 -0
- package/skill/dreative/recipes/motion-recipes.md +44 -0
- package/skill/dreative/references/ARTIFACTS.md +180 -0
- package/skill/dreative/references/REFLEX_FONTS.json +44 -0
- package/skill/dreative/references/RULES.json +186 -0
- package/skill/dreative/references/SKILL_CONTRACT.md +30 -0
- package/skill/dreative/references/TIERS.md +42 -0
- package/skill/dreative/schemas/plan.schema.json +241 -0
- package/skill/dreative/schemas/verify.schema.json +61 -0
- package/skill/dreative/skills/3d.md +94 -157
- package/skill/dreative/skills/cinematic.md +56 -232
- package/skill/dreative/skills/experimental.md +111 -0
- package/skill/dreative/skills/immersive.md +61 -223
- package/skill/dreative/skills/interaction.md +9 -1
- package/skill/dreative/skills/media.md +135 -216
- package/skill/dreative/skills/mobile.md +128 -117
- package/skill/dreative/skills/motion.md +89 -229
- package/skill/dreative/skills/refined.md +116 -102
- package/skill/dreative/skills/ux.md +155 -144
- package/dist/server/ai.js +0 -177
|
@@ -1,117 +1,128 @@
|
|
|
1
|
-
# Dreative Specialist Skill — Mobile Excellence
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
rows
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- **
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
1
|
+
# Dreative Specialist Skill — Mobile Excellence
|
|
2
|
+
|
|
3
|
+
## Contract
|
|
4
|
+
|
|
5
|
+
Universal foundation: ux and baseline mobile apply to every web page.
|
|
6
|
+
|
|
7
|
+
Follow `../references/SKILL_CONTRACT.md`. Dependency: `ux`. This skill is
|
|
8
|
+
universal for web work. Deliver a section-by-section mobile translation, touch
|
|
9
|
+
targets, responsive media/effect budgets, and approximately 390px verification.
|
|
10
|
+
It is never satisfied by shrinking desktop. Done means navigation, content,
|
|
11
|
+
forms, orientation/viewport behavior, performance, and reduced motion pass on a
|
|
12
|
+
coarse pointer.
|
|
13
|
+
|
|
14
|
+
Load this file when `plan.skills` includes `mobile`, when the brief says
|
|
15
|
+
mobile-first / most users are on phones / "make the mobile version great", or
|
|
16
|
+
when an app-register product is primarily used on mobile. It EXTENDS DESIGN.md
|
|
17
|
+
§13 (which governs how desktop effects DEGRADE); this file is about designing
|
|
18
|
+
mobile as a first-class surface in its own right — clean, tidy, and still
|
|
19
|
+
genuinely animated and premium, just calibrated to a 390px viewport, a thumb,
|
|
20
|
+
and a battery. It STACKS with whatever treatments were chosen: motion/3d/
|
|
21
|
+
immersive briefs get their mobile-native expression here, never a cropped
|
|
22
|
+
desktop.
|
|
23
|
+
|
|
24
|
+
## 0. The register: calm confidence, not shrunken desktop
|
|
25
|
+
|
|
26
|
+
Mobile premium reads differently from desktop premium: less simultaneous
|
|
27
|
+
motion, more focus per viewport, perfect ergonomics. The dial translation:
|
|
28
|
+
desktop ambition N ≈ mobile ambition N−2. A desktop dial-8 site ships a
|
|
29
|
+
dial-6 phone experience that feels JUST as crafted — one hero moment, silky
|
|
30
|
+
scroll reveals, tactile presses — rather than a stuttering copy of the desktop
|
|
31
|
+
choreography.
|
|
32
|
+
|
|
33
|
+
- **One idea per viewport.** The phone viewport is a frame; compose each
|
|
34
|
+
screenful like one (hero = one headline + one visual + one CTA, nothing
|
|
35
|
+
else). If a desktop section held three things, the mobile version stacks
|
|
36
|
+
them as three clean beats or cuts to the strongest one.
|
|
37
|
+
- **Tidy is the aesthetic.** Consistent gutters (20-24px), one column
|
|
38
|
+
discipline, generous vertical rhythm (56-80px between sections), no element
|
|
39
|
+
closer than 8px to another. Clutter reads twice as loud at 390px.
|
|
40
|
+
- **Type recalibrated, not just clamped**: hero 2-3rem (2 lines max with the
|
|
41
|
+
REAL copy), body stays ≥16px, line-length falls out of the gutters — check
|
|
42
|
+
headlines don't orphan single words (`text-wrap: balance`).
|
|
43
|
+
|
|
44
|
+
## 1. Layout patterns that are mobile-native
|
|
45
|
+
|
|
46
|
+
- Asymmetric desktop grids collapse to intentional single-column ORDER
|
|
47
|
+
(decide what comes first — usually visual → headline → support → CTA), not
|
|
48
|
+
DOM-order accidents. Check the collapsed order reads as a story.
|
|
49
|
+
- Horizontal scroll is mobile's extra axis: card shelves, galleries, and
|
|
50
|
+
chip rows as swipeable strips (`overflow-x-auto` + `scroll-snap-type: x
|
|
51
|
+
mandatory` on short strips, edge inset, visible peek of the next card —
|
|
52
|
+
the peek IS the affordance; no scrollbars, no arrows).
|
|
53
|
+
- Sticky bottom bar for the primary action on conversion/product pages
|
|
54
|
+
(add-to-cart, main CTA): thumb-reach beats footer CTA; respect
|
|
55
|
+
`env(safe-area-inset-bottom)`.
|
|
56
|
+
- Accordions/tabs for secondary density (specs, FAQs) instead of long walls;
|
|
57
|
+
tables become stacked cards or a scrollable container with sticky first
|
|
58
|
+
column — never squeezed 6-column tables.
|
|
59
|
+
- Nav: the fullscreen menu is mobile's one theatrical moment — staggered
|
|
60
|
+
link entrance (line-mask, 60ms stagger), big touch-sized links (≥ 48px
|
|
61
|
+
rows), contact/socials in the footer of the overlay. Wired per ux.md §1
|
|
62
|
+
(focus trap, scroll lock, Esc/back closes).
|
|
63
|
+
|
|
64
|
+
## 2. Motion on mobile (still premium, never crazy)
|
|
65
|
+
|
|
66
|
+
The motion inventory scaled to touch (extends motion.md §5):
|
|
67
|
+
|
|
68
|
+
- **Keep**: one composed hero entrance (≤ 600ms total), line-mask headline
|
|
69
|
+
reveals, in-view section reveals (2-3, `once: true`), press states on
|
|
70
|
+
EVERYTHING tappable (`active:scale-[0.98]` — on mobile this is the main
|
|
71
|
+
interaction feedback, since hover doesn't exist), marquees (pause
|
|
72
|
+
off-screen), counters, accordion springs.
|
|
73
|
+
- **Translate**: parallax halves or dies (§13); pinned sequences → short
|
|
74
|
+
sticky sections (≤ 1.5 viewports) or plain stacked beats; hover-woken media
|
|
75
|
+
→ in-view-woken (loop plays while ≥ 60% visible, pauses off-screen) or
|
|
76
|
+
tap-to-play; magnetic/cursor effects → gone entirely, replaced by press
|
|
77
|
+
feedback; drag-to-explore → swipe carousel or index list as PRIMARY
|
|
78
|
+
(DESIGN.md §13).
|
|
79
|
+
- **Ban on mobile**: smooth-scroll libraries at full strength (Lenis: disable
|
|
80
|
+
or `syncTouch` carefully — fighting native momentum feels broken), more than
|
|
81
|
+
one scrubbed sequence, simultaneous animation of > 4 elements, any effect
|
|
82
|
+
that drops the scroll below 60fps on a mid-range phone.
|
|
83
|
+
- Scroll reveals trigger earlier (`margin: "-10% 0px"` not -20%) — mobile
|
|
84
|
+
viewports are short and users scroll fast; late reveals = users see blank.
|
|
85
|
+
|
|
86
|
+
## 3. 3D and heavy media on mobile
|
|
87
|
+
|
|
88
|
+
- Default: replace live 3D with the poster or a pre-rendered loop (3d.md §5,
|
|
89
|
+
media.md). A generated video loop IS the mobile 3D strategy in most cases —
|
|
90
|
+
visually near-identical, thermally free.
|
|
91
|
+
- If live 3D ships: dpr capped at 2, sim/particle counts halved, post-FX off,
|
|
92
|
+
`frameloop="demand"` where possible, pause on scroll-out and
|
|
93
|
+
`document.hidden`. Test the thermal story: 30s of idling must not heat the
|
|
94
|
+
phone (no full-rate rAF on static scenes).
|
|
95
|
+
- Video: one playing loop per viewport, ≤ 2MB mobile variants
|
|
96
|
+
(`<source media>` or renditions), `playsinline` mandatory, poster always.
|
|
97
|
+
- Images: serve mobile-sized renditions (`srcset/sizes`) — a 2400px hero on a
|
|
98
|
+
390px screen is a failed budget even when it looks fine.
|
|
99
|
+
|
|
100
|
+
## 4. Ergonomics (the thumb is the cursor)
|
|
101
|
+
|
|
102
|
+
- Tap targets ≥ 44px (48px preferred) with ≥ 8px gaps; small text links get
|
|
103
|
+
padded hit areas. Primary actions in the bottom half on app-register
|
|
104
|
+
screens; destructive actions OUT of easy thumb reach.
|
|
105
|
+
- Respect the gesture map: horizontal edge swipes (back), bottom edge (home)
|
|
106
|
+
— don't hang custom gestures on them; carousels stop 16px short of edges.
|
|
107
|
+
- Inputs: correct `type/inputmode/autocomplete` (ux.md §2), font-size ≥ 16px
|
|
108
|
+
(iOS zoom), the focused field scrolls above the keyboard, forms in one
|
|
109
|
+
column, no fixed elements covering inputs while the keyboard is up.
|
|
110
|
+
- Safe areas: `viewport-fit=cover` + `env(safe-area-inset-*)` padding on
|
|
111
|
+
fixed bars/corners; nothing under the notch or home indicator.
|
|
112
|
+
- No hover-dependent anything: whatever desktop hover revealed is visible by
|
|
113
|
+
default, in-view-triggered, or behind an explicit tap (DESIGN.md §13).
|
|
114
|
+
|
|
115
|
+
## 5. Mobile verification (part of the runtime pass)
|
|
116
|
+
|
|
117
|
+
At 390×844 (plus one small check at 320px):
|
|
118
|
+
|
|
119
|
+
1. Walk every section: no horizontal body scroll, no clipped text/controls,
|
|
120
|
+
no element under fixed bars (DESIGN.md §15 at mobile widths).
|
|
121
|
+
2. Run ux.md §7's audit at this width (menu, forms, taps, console).
|
|
122
|
+
3. Scroll the full page fast: reveals keep up, nothing janks, sticky elements
|
|
123
|
+
behave through the URL-bar resize.
|
|
124
|
+
4. Confirm the motion translation shipped (§2): press states everywhere, hero
|
|
125
|
+
≤ 600ms, heavy effects swapped for their mobile strategy — name what runs
|
|
126
|
+
on mobile vs desktop in the final report.
|
|
127
|
+
5. If media/3D shipped: posters load, loops play inline (not fullscreen),
|
|
128
|
+
pause off-screen.
|
|
@@ -1,229 +1,89 @@
|
|
|
1
|
-
# Dreative Specialist Skill — Motion & Scroll Choreography
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- **
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
##
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
fade reads as 2021 template.
|
|
91
|
-
- `aria-label` the original string on the split container; split spans get
|
|
92
|
-
`aria-hidden`. Re-splitting on resize: debounce, or use `SplitText`'s autoSplit.
|
|
93
|
-
- Counters: animate with `useSpring`/gsap `snap: 1`, `tabular-nums` mandatory,
|
|
94
|
-
duration ≤ 1.2s, trigger once in view.
|
|
95
|
-
|
|
96
|
-
## 5. Layout & presence
|
|
97
|
-
|
|
98
|
-
- Motion `layout` prop for reflow (filtering grids, expanding cards, reordering) —
|
|
99
|
-
it's FLIP under the hood, transform-only. `layoutId` for shared-element morphs
|
|
100
|
-
(card → modal). Wrap conditional trees in `AnimatePresence mode="popLayout"`.
|
|
101
|
-
- Accordion/height: `grid-template-rows: 0fr → 1fr` (CSS, cheap) or Motion
|
|
102
|
-
`height: "auto"` (it measures for you). Never `max-height: 9999px`.
|
|
103
|
-
- **View Transitions API** for page-level transitions (`document.startViewTransition`,
|
|
104
|
-
or the framework wrapper e.g. Next `<ViewTransition>`): name persistent elements
|
|
105
|
-
with `view-transition-name` so they morph across routes. Feature-gate; fall back
|
|
106
|
-
to instant navigation, not a JS fade.
|
|
107
|
-
|
|
108
|
-
## 6. Performance and accessibility (non-negotiable)
|
|
109
|
-
|
|
110
|
-
- Transform/opacity only in hot paths; promote animating layers sparingly
|
|
111
|
-
(`will-change` set just-in-time, removed after). > 6 simultaneously-animating
|
|
112
|
-
elements = re-choreograph.
|
|
113
|
-
- All scroll work driven by IntersectionObserver / ScrollTrigger / `useScroll`
|
|
114
|
-
(rAF-batched) — a raw `scroll` listener is a hard ban (DESIGN.md).
|
|
115
|
-
- Test the tab hidden→visible case: loops must not accumulate; `whileInView` must
|
|
116
|
-
not re-fire (`once: true`).
|
|
117
|
-
- `prefers-reduced-motion`: scrubbed narratives get a static end-state, entrances
|
|
118
|
-
become plain fades ≤ 200ms, marquees stop. In Motion use `useReducedMotion()`
|
|
119
|
-
and branch the variants — don't just shorten durations.
|
|
120
|
-
- Content exists without JS: initial styles are the VISIBLE state; animation
|
|
121
|
-
libraries then hide/offset from JS before first paint (`gsap.set`, Motion
|
|
122
|
-
`initial`). An SSR'd page must never flash-then-hide.
|
|
123
|
-
|
|
124
|
-
## 7. Recipes (copy the shape, restyle the skin)
|
|
125
|
-
|
|
126
|
-
- **Hero sequence**: nav fades in (150ms) → headline lines mask-slide up, 80ms
|
|
127
|
-
stagger → subtext + CTA fade-rise together → hero media scales 1.04→1 with 6px
|
|
128
|
-
blur→0. Total 900ms, expo-out.
|
|
129
|
-
- **Sticky product walkthrough**: `sticky` media column + scrolling step copy;
|
|
130
|
-
step index from IntersectionObserver on copy blocks; media crossfades/transforms
|
|
131
|
-
per step (springy, 300ms).
|
|
132
|
-
- **Marquee**: duplicated track, `animation: scroll Xs linear infinite`,
|
|
133
|
-
`width: max-content`, pause on hover, speed from content width (px/s constant,
|
|
134
|
-
~60-90px/s), masked edges with `mask-image: linear-gradient`.
|
|
135
|
-
- **Scrub showcase**: sticky canvas/image sequence, `useScroll` on the wrapper,
|
|
136
|
-
map progress to frame index / rotation; preload frames; ≤ 2.5 viewports tall.
|
|
137
|
-
- **Canvas product story** (capsul-in-pro.com's form): a single-product launch
|
|
138
|
-
page as one scroll-scrubbed narrative — the product renders on a full-page
|
|
139
|
-
canvas (image-sequence or WebGL) and scroll drives its assembly/rotation
|
|
140
|
-
while short copy beats fade in at fixed progress stops; the site ships as
|
|
141
|
-
one bundled app with explicit portrait/landscape variants (it gates on
|
|
142
|
-
orientation rather than half-working in both). Copy the shape: one subject,
|
|
143
|
-
one scrubbed timeline, copy anchored to progress ranges, per-orientation
|
|
144
|
-
choreography decided up front.
|
|
145
|
-
- **Text on a path** (verified on epic.net): a manifesto paragraph flows along a
|
|
146
|
-
curved SVG path (`<textPath>` or per-word transforms sampled from a curve) and
|
|
147
|
-
relaxes toward straight lines as scroll progress advances — the curve
|
|
148
|
-
amplitude is the scrubbed value. One per site; body text elsewhere stays flat.
|
|
149
|
-
- **Orbiting cursor label** (epic.net's video CTA): a circular text ring
|
|
150
|
-
("PLAY VIDEO ⟲") slowly rotates around the pointer while it's over the media
|
|
151
|
-
region — SVG `<textPath>` on a circle, damped position follow, constant
|
|
152
|
-
rotation. Replaces the play button; fine pointers only, real button fallback.
|
|
153
|
-
|
|
154
|
-
## 8. Setup blueprints — install and WIRE the stack (do not skip)
|
|
155
|
-
|
|
156
|
-
Doctrine without dependencies ships a static page. When this skill is active,
|
|
157
|
-
actually add the libraries to the project and wire them before designing
|
|
158
|
-
sections. Pick the stack per §0, then:
|
|
159
|
-
|
|
160
|
-
**GSAP + ScrollTrigger + Lenis (brand pages, the unseen.co-family stack):**
|
|
161
|
-
|
|
162
|
-
```
|
|
163
|
-
npm i gsap lenis
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
```js
|
|
167
|
-
// one module, imported once at app root (e.g. src/lib/motion.ts)
|
|
168
|
-
import gsap from "gsap";
|
|
169
|
-
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
|
170
|
-
import Lenis from "lenis";
|
|
171
|
-
|
|
172
|
-
gsap.registerPlugin(ScrollTrigger);
|
|
173
|
-
export const lenis = new Lenis({ lerp: 0.1, smoothWheel: true });
|
|
174
|
-
lenis.on("scroll", ScrollTrigger.update);
|
|
175
|
-
gsap.ticker.add((t) => lenis.raf(t * 1000));
|
|
176
|
-
gsap.ticker.lagSmoothing(0);
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
React: run that inside a `useEffect` in a `<SmoothScroll>` provider mounted in
|
|
180
|
-
the root layout (destroy on unmount); Next.js needs `"use client"` on it.
|
|
181
|
-
ONE Lenis instance, ONE gsap ticker — never per-component.
|
|
182
|
-
|
|
183
|
-
**motion/react (React product+brand):** `npm i motion` — import from
|
|
184
|
-
`"motion/react"`. Shared transition vocabulary in one exported object
|
|
185
|
-
(`export const spring = { type: "spring", stiffness: 300, damping: 30 }`), used
|
|
186
|
-
everywhere; `MotionConfig reducedMotion="user"` at the root.
|
|
187
|
-
|
|
188
|
-
**Easing tokens (either stack):** commit page-wide —
|
|
189
|
-
`expo.out` / `cubic-bezier(0.16, 1, 0.3, 1)` for entrances/reveals,
|
|
190
|
-
`power2.inOut` for scrubbed/camera moves, springs for interactive. Define once
|
|
191
|
-
(gsap defaults via `gsap.defaults({ ease: "expo.out" })` or CSS custom
|
|
192
|
-
property `--ease-out-expo`), reference everywhere.
|
|
193
|
-
|
|
194
|
-
**Line-mask headline reveal (the canonical premium move, copy this shape):**
|
|
195
|
-
|
|
196
|
-
```jsx
|
|
197
|
-
// each line: <div class="overflow-hidden"><div class="line">…</div></div>
|
|
198
|
-
gsap.set(".line", { yPercent: 110 });
|
|
199
|
-
gsap.to(".line", {
|
|
200
|
-
yPercent: 0, duration: 0.9, ease: "expo.out", stagger: 0.08,
|
|
201
|
-
scrollTrigger: { trigger: el, start: "top 80%", once: true },
|
|
202
|
-
});
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Use GSAP `SplitText` (free) with `type: "lines", mask: "lines"` instead of
|
|
206
|
-
hand-wrapping when available; `aria-label` the original string per §4.
|
|
207
|
-
|
|
208
|
-
## 9. Definition of done — the shipped-motion inventory
|
|
209
|
-
|
|
210
|
-
A motion request is fulfilled only if the final code contains, verifiably
|
|
211
|
-
(grep the imports, name the elements):
|
|
212
|
-
|
|
213
|
-
- **Dial 4–6 (product/calm brand):** composed hero entrance timeline (§2), the
|
|
214
|
-
three global feel constants (interaction.md §0), 1–2 `whileInView`/triggered
|
|
215
|
-
section reveals, animated states (loading/success). No smooth scroll.
|
|
216
|
-
- **Dial 7–8 (expressive brand):** all of the above PLUS Lenis smooth scroll,
|
|
217
|
-
line-mask headline reveals on hero + section headings, one scrubbed scroll
|
|
218
|
-
sequence (pin, parallax system, or progress-bound narrative), one signature
|
|
219
|
-
pointer effect (interaction.md §1), and a page/route transition treatment.
|
|
220
|
-
- **Dial 9–10 (award-site):** all of the above PLUS the immersive.md or
|
|
221
|
-
cinematic.md architecture actually built (persistent stage/canvas, preloader
|
|
222
|
-
choreography, spatial or sim-driven route transitions, custom cursor).
|
|
223
|
-
|
|
224
|
-
Before reporting done, list which inventory items shipped and where (element +
|
|
225
|
-
trigger). "The page has hover states" does not clear dial 7+. If a listed item
|
|
226
|
-
was deliberately cut, say so and why. This inventory is what the SKILL.md
|
|
227
|
-
verification pass checks against — and its runtime stage must PROVE the items
|
|
228
|
-
run (transforms changing, triggers firing, console clean), not just find them
|
|
229
|
-
in the source.
|
|
1
|
+
# Dreative Specialist Skill — Motion & Scroll Choreography
|
|
2
|
+
|
|
3
|
+
## Contract
|
|
4
|
+
|
|
5
|
+
Follow `../references/SKILL_CONTRACT.md`. Dependencies: `ux`, `mobile`. Deliver a
|
|
6
|
+
named motion system, trigger/timing/easing inventory, cleanup strategy, mobile
|
|
7
|
+
translation, reduced-motion fallback, and sampled runtime evidence.
|
|
8
|
+
|
|
9
|
+
Load for animation, parallax, scroll stories, kinetic type, spatial transitions,
|
|
10
|
+
or a motion dial that requires more than state feedback.
|
|
11
|
+
|
|
12
|
+
## 0. Explore before recipes
|
|
13
|
+
|
|
14
|
+
Understand the content sequence, brand physics, inputs, and still layout first.
|
|
15
|
+
Record three original choreography concepts before reading
|
|
16
|
+
`../recipes/motion-recipes.md`. A recipe supplies wiring—not the story.
|
|
17
|
+
|
|
18
|
+
Name the motion signature in physical terms such as precise mechanical settle,
|
|
19
|
+
soft editorial drift, elastic play, or heavy cinematic inertia. One system owns
|
|
20
|
+
the page; independent default animations do not.
|
|
21
|
+
|
|
22
|
+
## 1. Hard gates
|
|
23
|
+
|
|
24
|
+
- Content is visible before enhancement and never depends on a JS callback to
|
|
25
|
+
appear (`content.visible`).
|
|
26
|
+
- Reduced motion removes nonessential travel, pinning, auto-looping, and
|
|
27
|
+
vestibular effects while preserving state and hierarchy
|
|
28
|
+
(`motion.reducedMotion`).
|
|
29
|
+
- Navigation, forms, keyboard, pointer targets, and focus remain functional
|
|
30
|
+
(`ux.functional`, `spatial.noOcclusion`).
|
|
31
|
+
- Timelines/listeners/observers/render loops clean up; hidden tabs and route
|
|
32
|
+
transitions do not multiply work.
|
|
33
|
+
- Heavy choreography has measured runtime and a concrete low-power/mobile/static
|
|
34
|
+
fallback (`effects.runtimeFallback`).
|
|
35
|
+
|
|
36
|
+
## 2. Motion architecture
|
|
37
|
+
|
|
38
|
+
Choose by job:
|
|
39
|
+
|
|
40
|
+
- CSS transitions/animations for local states and simple decorative loops.
|
|
41
|
+
- `motion/react` for component presence, layout, gestures, and springs.
|
|
42
|
+
- GSAP + ScrollTrigger for coordinated timelines and pinned scroll chapters.
|
|
43
|
+
- Lenis only when the concept needs a shared smooth-scroll clock.
|
|
44
|
+
- R3F/three.js render state for scene motion; synchronize with the page clock.
|
|
45
|
+
|
|
46
|
+
Use one provider/ticker/scroll owner. Define tokens for duration, spring, easing,
|
|
47
|
+
distance, stagger, and reduced-motion behavior. Interactive motion uses springs
|
|
48
|
+
or velocity-aware settling; narrative motion uses deliberate timelines.
|
|
49
|
+
|
|
50
|
+
## 3. Evidence-backed creative structure
|
|
51
|
+
|
|
52
|
+
At expressive/award, satisfy `motion.expressive.diversityOrDevelopment` through
|
|
53
|
+
one plan path:
|
|
54
|
+
|
|
55
|
+
- **Diversity:** at least four distinct mechanisms across three input drivers.
|
|
56
|
+
Reusing one mechanism more than twice is a warning that the system is shallow.
|
|
57
|
+
- **Development:** one coherent signature mechanism develops through at least
|
|
58
|
+
three materially different roles/states, supported by two quieter secondary
|
|
59
|
+
mechanisms and at least two drivers.
|
|
60
|
+
|
|
61
|
+
Development is not the same reveal with different distances. A line becoming
|
|
62
|
+
navigation, data plot, and scene boundary qualifies; fade-up repeated across
|
|
63
|
+
three sections does not.
|
|
64
|
+
|
|
65
|
+
## 4. Choreography principles
|
|
66
|
+
|
|
67
|
+
- Build a timeline for the whole journey: setup, anticipation, peak, rest,
|
|
68
|
+
transformation, resolution.
|
|
69
|
+
- Entrances orient; they are not the design. Key media and signatures respond to
|
|
70
|
+
input or develop state.
|
|
71
|
+
- Scroll links progress to meaning. Clamp/damp velocity and avoid raw scroll
|
|
72
|
+
listeners or layout work in every frame.
|
|
73
|
+
- Kinetic type remains readable DOM text; splits restore cleanly and preserve
|
|
74
|
+
accessibility.
|
|
75
|
+
- Presence/exits preserve focus, scroll position, and input continuity.
|
|
76
|
+
- Mobile shortens travel, removes long pins, lowers parallax, and preserves the
|
|
77
|
+
concept through a calmer translation rather than a cropped desktop effect.
|
|
78
|
+
|
|
79
|
+
## 5. Planning and verification
|
|
80
|
+
|
|
81
|
+
For each moment record element, trigger/driver, purpose, state range, duration or
|
|
82
|
+
spring, mobile translation, reduced-motion behavior, fallback, and evidence.
|
|
83
|
+
|
|
84
|
+
Runtime proof includes changing transforms/uniforms/state at two timestamps,
|
|
85
|
+
trigger positions, tested scroll-back, hidden-tab recovery, cleanup after route
|
|
86
|
+
changes, mobile viewport, reduced motion, console count, and frame-time sampling
|
|
87
|
+
for heavy work. A static screenshot cannot prove choreography.
|
|
88
|
+
|
|
89
|
+
Recipe reference: `../recipes/motion-recipes.md`, after concept exploration only.
|