transitions-refine 0.3.9 → 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.
- package/.agents/skills/refine-live/SKILL.md +72 -49
- package/demo.html +480 -110
- package/package.json +2 -1
- package/server/relay.mjs +70 -7
|
@@ -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) **
|
|
70
|
-
|
|
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. **
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
- `
|
|
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…).
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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).
|
|
152
|
-
|
|
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
|
{
|