transitions-refine 0.3.8 → 0.3.10

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.
@@ -64,11 +64,11 @@ never has to re-run `/refine live`.
64
64
  posting suggestions. Everything below (refineType, steps 3–4) is for the
65
65
  normal Refine flow.
66
66
  - `refineType` chooses what kinds of suggestions to make (it mirrors the
67
- panel's two tabs):
67
+ panel's two tabs). The tabs scan **independently**, so answer only the one
68
+ you were asked for:
68
69
  - `"small"` (or missing) → **Small refinements**: nudge the existing
69
- declarations toward the motion tokens (step 3a) **and**, when it's possible
70
- and sensible, *also* suggest swapping the whole transition for a
71
- transitions.dev recipe (step 3b).
70
+ declarations toward the motion tokens **only** (step 3a). Do **not**
71
+ propose a recipe swap here — that's the Replace tab's separate job.
72
72
  - `"replace"` → **Replace transition**: suggest a whole-transition recipe
73
73
  swap **only** (step 3b). Do **not** propose motion-token tweaks — skip
74
74
  step 3a entirely.
@@ -81,50 +81,74 @@ never has to re-run `/refine live`.
81
81
  -d '{"message":"Matching to transitions.dev motion tokens…"}'
82
82
  ```
83
83
 
84
- 3. **Reason about the transition.** Read `transitions-dev` and apply its
85
- `transitions refine` behaviour. Which steps you run depends on `refineType`:
86
- - `refineType === "small"` do step 3a **and** step 3b.
87
- - `refineType === "replace"` do step 3b **only** (skip 3a no token tweaks).
84
+ 3. **Answer in ONE shot — speed matters.** Each click should feel instant, so
85
+ resolve the job from the data below plus what's already in this skill. Do **not**
86
+ spawn subagents or run a broad codebase search, and do **not** open the
87
+ transitions-dev `SKILL.md` its tokens and decision rules are inlined here.
88
+ - `refineType === "small"` → step 3a only, with **zero file reads**.
89
+ - `refineType === "replace"` → step 3b only; open **at most the one** recipe
90
+ reference file you choose.
88
91
 
89
92
  First, infer each declaration's **usage** from `label` + `selector` (modal
90
- close, dropdown open, tooltip, badge, resize, color/theme change…). Every
91
- decision below keys off that usage — match on **intent, not the nearest
92
- number**.
93
-
94
- **3a. Motion-token tweaks (only for `refineType === "small"`).** Using
95
- `## Motion tokens`:
96
- - Pick the motion token that fits the usage — a modal close wants a fast exit;
97
- a color/theme change can be slower; spring/back easings suit playful slides,
98
- not opacity.
99
- - Only propose a change where the current value actually differs.
100
-
101
- **3b. Replace the whole transition (for `small` when sensible, always
102
- considered for `replace`).** Judge whether this transition would be better off
103
- re-built as one of the twenty-one transitions.dev recipes:
104
- - The `transitions-dev` skill stays in the loop — run its `## Decision rules`
105
- against the inferred usage to pick the **single** best-fit recipe, then open
106
- that recipe's reference file (e.g. `06-modal.md`, `05-menu-dropdown.md`) to
107
- read its real timings, easing, distance, scale, and blur.
108
- - Only propose a replacement when it is **possible and sensible**: the current
109
- declarations are clearly a hand-rolled version of a catalogued recipe, or are
110
- missing the structure the usage calls for (e.g. an opacity-only "modal" that
111
- should scale, a width tween that should be the card-resize recipe). If the
112
- transition already *is* the right recipe, or no recipe genuinely fits, **do
113
- not** force one.
114
- - For `refineType === "small"`: skip the replace suggestion and let the 3a
115
- token tweaks stand alone.
116
- - For `refineType === "replace"`: there are no token tweaks to fall back on,
117
- so return an **empty** `suggestions` array with a short `summary` saying the
118
- transition already fits / no recipe applies.
119
- - Emit at most **one** `kind: "replace"` suggestion per job. For `small` it sits
120
- alongside the token tweaks (don't drop those); for `replace` it is the only
121
- suggestion.
122
- - Make its `patch` apply what the panel *can* apply live — the recipe's
123
- recommended duration/easing for the property that already transitions (or
124
- `"all"`). Name the recipe and its reference file in `title` + `reason` so the
125
- user knows the structural parts (keyframes, extra properties, JS hooks) come
126
- from running `transitions apply <recipe>` / pasting that reference file. Never
127
- invent timingsquote the ones from the reference file.
93
+ close, dropdown open, tooltip, badge, resize, color/theme change…). Match on
94
+ **intent, not the nearest number**.
95
+
96
+ **3a. Motion-token tweaks (`refineType === "small"` only — no file reads).**
97
+ Pick the token that fits the usage and propose a change **only where the current
98
+ value actually differs**.
99
+
100
+ - **Durations:** 40ms Stagger (per-item offset) · 80ms Micro (tooltip delay,
101
+ shake segment) · 150ms Quick (modal/dropdown close, text swap, tooltip
102
+ appear) · 250ms Fast (icon swap, dropdown/modal open, tabs slide, page
103
+ slide) · 350ms Medium (panel/toast close) · 400ms Slow (panel open, skeleton
104
+ reveal, input clear) · 500ms Very slow (emphasis, badge appear, text reveal,
105
+ success check).
106
+ - **Default easing "Smooth ease out":** `cubic-bezier(0.22, 1, 0.36, 1)`
107
+ (modal/dropdown/panel open+close, page slide, resize, position change).
108
+ - **Other on-grid easings LEAVE UNCHANGED:** `ease-out` (tooltip),
109
+ `ease-in-out` (icon/text swap, text reveal, skeleton reveal), `linear`
110
+ (shimmer, pulse, spinner), `cubic-bezier(0.34, 1.36, 0.64, 1)` (badge pop),
111
+ `cubic-bezier(0.34, 3.85, 0.64, 1)` (avatar return).
112
+ - **Nudge toward Smooth ease out:** generic `ease`, `ease-in`, or any
113
+ hand-rolled cubic-bezier()/linear() that isn't a token above.
114
+
115
+ **3b. Whole-transition recipe swap (`refineType === "replace"` only no file
116
+ reads).** Match the inferred usage to ONE recipe below (this list *is* the
117
+ decision rules no SKILL.md or reference-file read needed). Emit ONE
118
+ `kind: "replace"` suggestion whose `patch` carries the **motion-token**
119
+ duration/easing for the recipe's phase (open vs close) on the property that
120
+ already transitions (or `"all"`), with a `reference` field naming the file and
121
+ the recipe in `title` + `reason`. The patch only drives the live preview —
122
+ exact keyframes/structure come from the user pasting that reference file, so you
123
+ never need to open it. If no recipe genuinely fits the usage, return an
124
+ **empty** `suggestions` array with a short `summary`.
125
+
126
+ - Card resize a container changes width/height on a layout change (`01-card-resize.md`)
127
+ - Number pop-in a number/digit updates (`02-number-pop-in.md`)
128
+ - Notification badge a small dot/badge appears on a trigger (`03-notification-badge.md`)
129
+ - Text states swap text content changes in place (`04-text-states-swap.md`)
130
+ - Menu dropdown an anchored surface grows from its trigger (`05-menu-dropdown.md`)
131
+ - Modal open/close — a centered dialog scales up, softer scale-down on close (`06-modal.md`)
132
+ - Panel reveal — a surface slides into a region with a cross-blur (`07-panel-reveal.md`)
133
+ - Page side-by-side — slide between list↔detail or step 1↔step 2 (`08-page-side-by-side.md`)
134
+ - Icon swap — two icons cross-fade in the same slot (`09-icon-swap.md`)
135
+ - Success check — a checkmark celebration: fade + rotate + bob + stroke-draw (`10-success-check.md`)
136
+ - Avatar group hover — hover lifts an item in a horizontal stack (`11-avatar-group-hover.md`)
137
+ - Error state shake — invalid-input shake (`12-error-state-shake.md`)
138
+ - Input clear with dissolve — clearing a text field (`13-input-clear-dissolve.md`)
139
+ - Skeleton loader and reveal — placeholder pulses then swaps to real content (`14-skeleton-reveal.md`)
140
+ - Shimmer text — in-progress / "thinking" text shimmer (`15-shimmer-text.md`)
141
+ - Tabs sliding — a moving highlight across segmented options (`16-tabs-sliding.md`)
142
+ - Tooltip open/close — delayed fade+scale in, instant out (`17-tooltip.md`)
143
+ - Texts reveal — staggered blurred rise of stacked text lines (`18-texts-reveal.md`)
144
+ - Card hover tilt — 3D tilt toward the pointer (`19-card-tilt.md`)
145
+ - Plus to menu morph — a circular trigger becomes the surface it opens (`20-plus-menu-morph.md`)
146
+ - Accordion expand — a collapsible body grows/shrinks in height (`21-accordion.md`)
147
+
148
+ Tie-break: prefer the lower-overhead recipe (card resize over panel reveal,
149
+ dropdown over modal). Only propose a swap when the current declarations are
150
+ clearly a hand-rolled version of a recipe or are missing the structure the usage
151
+ calls for; if the transition already *is* the right recipe, return empty.
128
152
 
129
153
  4. **Post the result** (this completes the job and renders cards in the panel):
130
154
 
@@ -148,9 +172,8 @@ never has to re-run `/refine live`.
148
172
  }'
149
173
  ```
150
174
 
151
- The example above is a `small` job (token tweaks). When a recipe genuinely
152
- fits, include a `kind: "replace"` card alongside the token tweaks for
153
- `small`, or as the **only** suggestion for `replace`:
175
+ The example above is a `small` job (token tweaks only). A `replace` job instead
176
+ returns a single `kind: "replace"` card as its **only** suggestion:
154
177
 
155
178
  ```json
156
179
  {