sisyo 1.7.0 → 1.9.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 (61) hide show
  1. package/LICENSE +16 -16
  2. package/README.md +177 -166
  3. package/bin/known-hashes.json +8 -1
  4. package/bin/sisyo.js +285 -285
  5. package/package.json +30 -30
  6. package/templates/.claude/rules/agents-and-tests.md +32 -24
  7. package/templates/.claude/rules/docs.md +39 -19
  8. package/templates/.claude/skills/fastapi-best-practices/ASYNC-PATTERNS.md +121 -121
  9. package/templates/.claude/skills/fastapi-best-practices/DATABASE.md +153 -153
  10. package/templates/.claude/skills/fastapi-best-practices/DEPENDENCIES.md +140 -140
  11. package/templates/.claude/skills/fastapi-best-practices/PROJECT-STRUCTURE.md +90 -90
  12. package/templates/.claude/skills/fastapi-best-practices/PYDANTIC-GUIDE.md +155 -155
  13. package/templates/.claude/skills/fastapi-best-practices/SKILL.md +123 -123
  14. package/templates/.claude/skills/g6-style/SKILL.md +125 -125
  15. package/templates/.claude/skills/g6-style/references/checks.md +58 -58
  16. package/templates/.claude/skills/g6-style/references/imagery.md +103 -103
  17. package/templates/.claude/skills/g6-style/references/motion.md +121 -121
  18. package/templates/.claude/skills/g6-style/references/sections.md +263 -263
  19. package/templates/.claude/skills/g6-style/references/tokens.md +197 -197
  20. package/templates/.claude/skills/hindsight/SKILL.md +175 -175
  21. package/templates/.claude/skills/hoang-auth/SKILL.md +188 -0
  22. package/templates/.claude/skills/html-docs/SKILL.md +207 -207
  23. package/templates/.claude/skills/i18n-multilang/SKILL.md +153 -153
  24. package/templates/.claude/skills/i18n-multilang/assets/languages.json +47 -47
  25. package/templates/.claude/skills/i18n-multilang/assets/plural-vectors.json +46 -46
  26. package/templates/.claude/skills/i18n-multilang/assets/project/README.md +17 -17
  27. package/templates/.claude/skills/i18n-multilang/assets/project/gitattributes.txt +6 -6
  28. package/templates/.claude/skills/i18n-multilang/assets/project/gitignore.txt +4 -4
  29. package/templates/.claude/skills/i18n-multilang/assets/project/glossary.json +6 -6
  30. package/templates/.claude/skills/i18n-multilang/assets/project/i18n.config.json +22 -22
  31. package/templates/.claude/skills/i18n-multilang/assets/project/locales/__source__/common.json +10 -10
  32. package/templates/.claude/skills/i18n-multilang/assets/project/notes/common.json +5 -5
  33. package/templates/.claude/skills/i18n-multilang/assets/project/style.md +20 -20
  34. package/templates/.claude/skills/i18n-multilang/references/format.md +100 -100
  35. package/templates/.claude/skills/i18n-multilang/references/languages.md +97 -97
  36. package/templates/.claude/skills/i18n-multilang/references/layout-and-versioning.md +256 -256
  37. package/templates/.claude/skills/i18n-multilang/references/numbers.md +161 -161
  38. package/templates/.claude/skills/i18n-multilang/references/platform-unity.md +142 -142
  39. package/templates/.claude/skills/i18n-multilang/references/platform-web.md +107 -107
  40. package/templates/.claude/skills/i18n-multilang/references/translation.md +143 -143
  41. package/templates/.claude/skills/i18n-multilang/references/voice.md +271 -271
  42. package/templates/.claude/skills/i18n-multilang/scripts/i18n.py +1041 -1041
  43. package/templates/.claude/skills/i18n-multilang/scripts/numwords.py +1013 -1013
  44. package/templates/.claude/skills/i18n-multilang/scripts/voice.py +478 -478
  45. package/templates/.claude/skills/neon-game-ui-ux-skill/COMPONENTS.md +490 -490
  46. package/templates/.claude/skills/neon-game-ui-ux-skill/GAMIFICATION.md +246 -246
  47. package/templates/.claude/skills/neon-game-ui-ux-skill/ICONS.md +249 -249
  48. package/templates/.claude/skills/neon-game-ui-ux-skill/LAYOUT-NAV.md +362 -362
  49. package/templates/.claude/skills/neon-game-ui-ux-skill/MOTION-A11Y.md +168 -168
  50. package/templates/.claude/skills/neon-game-ui-ux-skill/SKILL.md +137 -137
  51. package/templates/.claude/skills/neon-game-ui-ux-skill/TOKENS.md +323 -323
  52. package/templates/.claude/skills/react-page-oriented/SKILL.md +407 -407
  53. package/templates/.claude/skills/react-page-oriented/triggers.md +12 -12
  54. package/templates/.claude/skills/terraform-best-practices/SKILL.md +341 -341
  55. package/templates/.claude/skills/typesafe-jev/SKILL.md +148 -148
  56. package/templates/.claude/skills/vibe-docs/SKILL.md +139 -242
  57. package/templates/SISYO.md +39 -37
  58. package/templates/docs/99_progress/features.md +7 -7
  59. package/templates/docs/99_progress/handoff.md +19 -19
  60. package/templates/docs/99_progress/todo.md +15 -15
  61. package/templates/docs/MAP.md +26 -26
@@ -1,103 +1,103 @@
1
- # g6-style imagery: photos, real screens, video
2
-
3
- The style mixes three kinds of picture. Use each where it is strongest:
4
-
5
- | Kind | Where | Why |
6
- |---|---|---|
7
- | Real screen captures of the product, in CSS phones | hero stack, "more than X", product tour | proof: the visitor sees the actual product, not an illustration |
8
- | Generated photos in the gold light | "N ways" (a hand tapping a card), closing CTA (an atrium) | mood and the human moment; same warm gold as the UI |
9
- | CSS-drawn mini scenes | the animated tiles (QR, NFC, wallet, URL) | crisp at any size, theme-aware, cost no download |
10
-
11
- ## Generating photos with `codex exec`
12
-
13
- Work in a folder outside the repo (e.g. `<project>/videos/landing-gold/`), put reference images in `ref/`, write
14
- the brief to `prompt.md`, then run (codex's built-in `image_gen` tool, no API key needed):
15
-
16
- ```bash
17
- cd <work-folder>
18
- codex exec -s workspace-write --skip-git-repo-check \
19
- -i ref/mood.png -i ref/layout.png -o last-message.md - < prompt.md > codex.log 2>&1
20
- ```
21
-
22
- Ask in the brief for: the exact file names, the aspect (`wide landscape 16:9, at least 1600 px` / `vertical 9:16
23
- about 941x1672`), "check each result yourself and regenerate if it breaks a rule", and an `image-prompts.md` with
24
- the final prompts. A mood photo the user gives (e.g. a real department-store atrium) is a MOOD reference only:
25
- "do NOT copy this building, invent an original space, no recognisable real building, no store names".
26
-
27
- Prompts that worked (adapt the subject):
28
-
29
- - **Atrium (closing CTA)**: *photorealistic architectural interior, wide 16:9: an original luxurious multi-storey
30
- atrium in Tokyo at evening, ivory and cream stone, slim champagne-gold metal fins and balustrades, a luminous
31
- skylight made of a fine triangular lattice glowing warm white, thin warm gold LED light lines along each floor
32
- edge, criss-crossing escalators in the middle distance, polished light floor with soft reflections. Symmetric,
33
- calm, premium. The centre of the frame must be quiet enough for white headline text over a dark overlay. A few
34
- people far away, small and motion-blurred, no faces. No text, no letters, no logos, no shop signs.*
35
- - **Hand + device (a "tap" moment)**: *photorealistic, vertical 9:16: one hand holds a matte black card with a very
36
- thin champagne-gold edge against the upper BACK of another person's smartphone; the phone's FRONT SCREEN FACES THE
37
- CAMERA, slightly angled; physically plausible (the card touches the rear upper edge, never through the screen). The
38
- phone screen is completely blank, uniform, flat very light grey, no UI, no reflections, all four screen corners
39
- clearly visible and not covered by fingers. A soft warm champagne-gold glow at the contact point. Warm evening
40
- interior, cream and gold, blurred gold bokeh. Realistic hands. No text, no logos.*
41
-
42
- Always: "No text, no letters, no logos, no watermarks" (generated text is garbage and logos are a legal risk), and
43
- blank screens / blank cards so the real product goes on them.
44
-
45
- ## A real screen into a generated phone
46
-
47
- 1. **Capture** the app at phone width (e.g. 390 px at 3x → 1170×2532, or 900×1948 stills from a recording).
48
- 2. **Find the screen in the photo** with a small script (Node or Python; read the pixels with ffmpeg as raw RGB24,
49
- or with any image library). Input: the photo, a seed pixel inside the blank screen (look at the photo), the
50
- capture's width and height, a tolerance (default 48). Method:
51
- 1. The screen's colour = the average of a 9×9 window around the seed.
52
- 2. Flood fill (4-neighbour) from the seed over pixels whose `|ΔR| + |ΔG| + |ΔB|` to that colour is below the
53
- tolerance. Fewer than ~1000 pixels means a bad seed: stop and say so.
54
- 3. Boundary pixels = filled pixels with a non-filled neighbour.
55
- 4. First guess of the four corners (a phone held roughly upright, tilts up to ~40°): the boundary points with the
56
- smallest `x + y` (top left), `−x + y` (top right), `−x − y` (bottom right), `x − y` (bottom left).
57
- 5. For each side, fit a line (total least squares, angle `½·atan2(2·Sxy, Sxx − Syy)` through the mean) to the
58
- boundary points between 20 % and 80 % of the way from one corner to the next and within 25 px of that segment:
59
- the rounded corners are left out. The four line intersections are the sharp corners. Repeat this step 3 times.
60
- 6. Homography from the capture rectangle `(0,0) (w,0) (w,h) (0,h)` to the corners `tl tr br bl`: the usual
61
- 8 × 8 linear system (Gaussian elimination with pivoting), then the CSS `matrix3d` in column-major order:
62
- `h0, h3, 0, h6, h1, h4, 0, h7, 0, 0, 1, 0, h2, h5, 0, 1`.
63
- 7. Print JSON `{ width, height, corners, matrix3d }`.
64
- 3. **Composite** in a small HTML page rendered by headless Chrome at the photo's size (`--headless=new
65
- --disable-gpu --hide-scrollbars --force-device-scale-factor=1 --window-size=W,H --screenshot=out.png
66
- file://…/composite.html`), body `margin: 0; overflow: hidden` at exactly the photo's size:
67
- - the photo as an absolute image filling the page;
68
- - optionally a glow where a card meets the phone: a 300 px circle centred on that point,
69
- `radial-gradient(circle, rgba(255,226,160,.95) 0%, rgba(242,199,110,.55) 26%, rgba(184,134,44,.18) 52%,
70
- rgba(184,134,44,0) 70%)`, `mix-blend-mode: screen; opacity: .55`;
71
- - the screen: a div of the capture's size at `left: 0; top: 0`, `transform-origin: 0 0; transform:
72
- matrix3d(…)`, `overflow: hidden; border-radius: ~12 % of the capture's width; background: #fff`, holding the
73
- capture, a warm wash `linear-gradient(160deg, rgba(255,236,200,.1), rgba(255,214,150,.06) 55%,
74
- rgba(60,40,10,.08))` and a soft sheen `linear-gradient(120deg, transparent 30%, rgba(255,255,255,.16) 42%,
75
- transparent 54%)` so the screen sits in the room's light; a dynamic island (`#0b0906`, 210 × 62 px pill,
76
- 34 px from the top) when the capture has no status bar of its own.
77
- Then `cwebp -q 78`.
78
- 4. **Look at the result zoomed in**: the screen must sit exactly in the bezel; if it leaks, lower the tolerance or
79
- move the seed (raise the tolerance for a screen with a soft gradient).
80
-
81
- ## Video (when the page has any)
82
-
83
- - Every video plays only when the visitor presses play: `preload="none"` + a poster, a dialog (sections.md, Video
84
- dialog) or an inline player with controls. A looping product tour starts on ▶, not on scroll.
85
- - Re-encode: `ffmpeg -i in.mp4 -vf scale=720:1280:flags=lanczos -c:v libx264 -profile:v high -preset slow -crf 27
86
- -pix_fmt yuv420p -movflags +faststart -c:a aac -b:a 96k out.mp4` (a 45 s vertical promo ≈ 2.5–3 MB). Silent screen
87
- clips: `-vf scale=540:-2 -an -crf 29` (≈ 100–300 KB each). Poster: one frame, `-c:v libwebp -quality 76`.
88
- - Captions burned in, so it reads with the sound off; say on the page what the video contains (length, narration).
89
- - Serve every byte from the site's own origin.
90
-
91
- ## QR codes in pictures
92
-
93
- A QR in a screenshot points wherever the capture was made (often a demo account that does not exist on the live
94
- site): a visitor who scans it lands on a 404. Replace it before publishing: generate a QR of the real home page
95
- (`qrcode` npm, `toFile(…, { width, margin: 0 })`), measure the old code's box (dark-pixel bounds), overlay with
96
- ffmpeg (`overlay=x:y`, `scale=…:flags=neighbor`). QRs drawn by the page itself: generate them from the site's own
97
- origin at runtime, lazily (`import('qrcode')` when the element comes near).
98
-
99
- ## Images on the page
100
-
101
- WebP, sized to what they show at 2x (screens 600 px wide, photos ~940 px or 1600 px wide for full-width bands);
102
- `next/image` with `fill` + `sizes`; one map file for every image with its alt text per language; "写真はイメージです"
103
- / "photo for illustration" on generated photos, "画面はデモ用サンプルです" / "demo data" on screens with made-up data.
1
+ # g6-style imagery: photos, real screens, video
2
+
3
+ The style mixes three kinds of picture. Use each where it is strongest:
4
+
5
+ | Kind | Where | Why |
6
+ |---|---|---|
7
+ | Real screen captures of the product, in CSS phones | hero stack, "more than X", product tour | proof: the visitor sees the actual product, not an illustration |
8
+ | Generated photos in the gold light | "N ways" (a hand tapping a card), closing CTA (an atrium) | mood and the human moment; same warm gold as the UI |
9
+ | CSS-drawn mini scenes | the animated tiles (QR, NFC, wallet, URL) | crisp at any size, theme-aware, cost no download |
10
+
11
+ ## Generating photos with `codex exec`
12
+
13
+ Work in a folder outside the repo (e.g. `<project>/videos/landing-gold/`), put reference images in `ref/`, write
14
+ the brief to `prompt.md`, then run (codex's built-in `image_gen` tool, no API key needed):
15
+
16
+ ```bash
17
+ cd <work-folder>
18
+ codex exec -s workspace-write --skip-git-repo-check \
19
+ -i ref/mood.png -i ref/layout.png -o last-message.md - < prompt.md > codex.log 2>&1
20
+ ```
21
+
22
+ Ask in the brief for: the exact file names, the aspect (`wide landscape 16:9, at least 1600 px` / `vertical 9:16
23
+ about 941x1672`), "check each result yourself and regenerate if it breaks a rule", and an `image-prompts.md` with
24
+ the final prompts. A mood photo the user gives (e.g. a real department-store atrium) is a MOOD reference only:
25
+ "do NOT copy this building, invent an original space, no recognisable real building, no store names".
26
+
27
+ Prompts that worked (adapt the subject):
28
+
29
+ - **Atrium (closing CTA)**: *photorealistic architectural interior, wide 16:9: an original luxurious multi-storey
30
+ atrium in Tokyo at evening, ivory and cream stone, slim champagne-gold metal fins and balustrades, a luminous
31
+ skylight made of a fine triangular lattice glowing warm white, thin warm gold LED light lines along each floor
32
+ edge, criss-crossing escalators in the middle distance, polished light floor with soft reflections. Symmetric,
33
+ calm, premium. The centre of the frame must be quiet enough for white headline text over a dark overlay. A few
34
+ people far away, small and motion-blurred, no faces. No text, no letters, no logos, no shop signs.*
35
+ - **Hand + device (a "tap" moment)**: *photorealistic, vertical 9:16: one hand holds a matte black card with a very
36
+ thin champagne-gold edge against the upper BACK of another person's smartphone; the phone's FRONT SCREEN FACES THE
37
+ CAMERA, slightly angled; physically plausible (the card touches the rear upper edge, never through the screen). The
38
+ phone screen is completely blank, uniform, flat very light grey, no UI, no reflections, all four screen corners
39
+ clearly visible and not covered by fingers. A soft warm champagne-gold glow at the contact point. Warm evening
40
+ interior, cream and gold, blurred gold bokeh. Realistic hands. No text, no logos.*
41
+
42
+ Always: "No text, no letters, no logos, no watermarks" (generated text is garbage and logos are a legal risk), and
43
+ blank screens / blank cards so the real product goes on them.
44
+
45
+ ## A real screen into a generated phone
46
+
47
+ 1. **Capture** the app at phone width (e.g. 390 px at 3x → 1170×2532, or 900×1948 stills from a recording).
48
+ 2. **Find the screen in the photo** with a small script (Node or Python; read the pixels with ffmpeg as raw RGB24,
49
+ or with any image library). Input: the photo, a seed pixel inside the blank screen (look at the photo), the
50
+ capture's width and height, a tolerance (default 48). Method:
51
+ 1. The screen's colour = the average of a 9×9 window around the seed.
52
+ 2. Flood fill (4-neighbour) from the seed over pixels whose `|ΔR| + |ΔG| + |ΔB|` to that colour is below the
53
+ tolerance. Fewer than ~1000 pixels means a bad seed: stop and say so.
54
+ 3. Boundary pixels = filled pixels with a non-filled neighbour.
55
+ 4. First guess of the four corners (a phone held roughly upright, tilts up to ~40°): the boundary points with the
56
+ smallest `x + y` (top left), `−x + y` (top right), `−x − y` (bottom right), `x − y` (bottom left).
57
+ 5. For each side, fit a line (total least squares, angle `½·atan2(2·Sxy, Sxx − Syy)` through the mean) to the
58
+ boundary points between 20 % and 80 % of the way from one corner to the next and within 25 px of that segment:
59
+ the rounded corners are left out. The four line intersections are the sharp corners. Repeat this step 3 times.
60
+ 6. Homography from the capture rectangle `(0,0) (w,0) (w,h) (0,h)` to the corners `tl tr br bl`: the usual
61
+ 8 × 8 linear system (Gaussian elimination with pivoting), then the CSS `matrix3d` in column-major order:
62
+ `h0, h3, 0, h6, h1, h4, 0, h7, 0, 0, 1, 0, h2, h5, 0, 1`.
63
+ 7. Print JSON `{ width, height, corners, matrix3d }`.
64
+ 3. **Composite** in a small HTML page rendered by headless Chrome at the photo's size (`--headless=new
65
+ --disable-gpu --hide-scrollbars --force-device-scale-factor=1 --window-size=W,H --screenshot=out.png
66
+ file://…/composite.html`), body `margin: 0; overflow: hidden` at exactly the photo's size:
67
+ - the photo as an absolute image filling the page;
68
+ - optionally a glow where a card meets the phone: a 300 px circle centred on that point,
69
+ `radial-gradient(circle, rgba(255,226,160,.95) 0%, rgba(242,199,110,.55) 26%, rgba(184,134,44,.18) 52%,
70
+ rgba(184,134,44,0) 70%)`, `mix-blend-mode: screen; opacity: .55`;
71
+ - the screen: a div of the capture's size at `left: 0; top: 0`, `transform-origin: 0 0; transform:
72
+ matrix3d(…)`, `overflow: hidden; border-radius: ~12 % of the capture's width; background: #fff`, holding the
73
+ capture, a warm wash `linear-gradient(160deg, rgba(255,236,200,.1), rgba(255,214,150,.06) 55%,
74
+ rgba(60,40,10,.08))` and a soft sheen `linear-gradient(120deg, transparent 30%, rgba(255,255,255,.16) 42%,
75
+ transparent 54%)` so the screen sits in the room's light; a dynamic island (`#0b0906`, 210 × 62 px pill,
76
+ 34 px from the top) when the capture has no status bar of its own.
77
+ Then `cwebp -q 78`.
78
+ 4. **Look at the result zoomed in**: the screen must sit exactly in the bezel; if it leaks, lower the tolerance or
79
+ move the seed (raise the tolerance for a screen with a soft gradient).
80
+
81
+ ## Video (when the page has any)
82
+
83
+ - Every video plays only when the visitor presses play: `preload="none"` + a poster, a dialog (sections.md, Video
84
+ dialog) or an inline player with controls. A looping product tour starts on ▶, not on scroll.
85
+ - Re-encode: `ffmpeg -i in.mp4 -vf scale=720:1280:flags=lanczos -c:v libx264 -profile:v high -preset slow -crf 27
86
+ -pix_fmt yuv420p -movflags +faststart -c:a aac -b:a 96k out.mp4` (a 45 s vertical promo ≈ 2.5–3 MB). Silent screen
87
+ clips: `-vf scale=540:-2 -an -crf 29` (≈ 100–300 KB each). Poster: one frame, `-c:v libwebp -quality 76`.
88
+ - Captions burned in, so it reads with the sound off; say on the page what the video contains (length, narration).
89
+ - Serve every byte from the site's own origin.
90
+
91
+ ## QR codes in pictures
92
+
93
+ A QR in a screenshot points wherever the capture was made (often a demo account that does not exist on the live
94
+ site): a visitor who scans it lands on a 404. Replace it before publishing: generate a QR of the real home page
95
+ (`qrcode` npm, `toFile(…, { width, margin: 0 })`), measure the old code's box (dark-pixel bounds), overlay with
96
+ ffmpeg (`overlay=x:y`, `scale=…:flags=neighbor`). QRs drawn by the page itself: generate them from the site's own
97
+ origin at runtime, lazily (`import('qrcode')` when the element comes near).
98
+
99
+ ## Images on the page
100
+
101
+ WebP, sized to what they show at 2x (screens 600 px wide, photos ~940 px or 1600 px wide for full-width bands);
102
+ `next/image` with `fill` + `sizes`; one map file for every image with its alt text per language; "写真はイメージです"
103
+ / "photo for illustration" on generated photos, "画面はデモ用サンプルです" / "demo data" on screens with made-up data.
@@ -1,121 +1,121 @@
1
- # g6-style motion
2
-
3
- Easings, every animation and its keyframes, the reduced-motion rule and the few JavaScript loops. The rules for when
4
- to use which are in `SKILL.md` (Motion rules); this file holds the numbers.
5
-
6
- ## 1. Easings and the reveal
7
-
8
- | Token | Value | Use |
9
- |---|---|---|
10
- | `--ease-glide` | `cubic-bezier(0.22, 1, 0.36, 1)` | Entrances, hovers, list and tour transitions |
11
- | `--ease-pop` | `cubic-bezier(0.34, 1.56, 0.64, 1)` | Things that land with a small overshoot: toast, pass, switch knob, icon tile hover scale |
12
-
13
- Hover on cards: `transition-[transform,box-shadow] duration-300 ease-glide hover:-translate-y-1 hover:shadow-float`
14
- (benefit cards `-translate-y-0.5`); the icon tile inside scales to 110 % with `ease-pop`.
15
-
16
- **Reveal** (below the fold, framer-motion): `initial={{ opacity: 0, y: 16 }}`, `whileInView={{ opacity: 1, y: 0 }}`,
17
- `viewport={{ once: true }}`, 0.5 s, glide ease, optional `delay` (tile `index × 0.08`, a 2-column grid
18
- `(index % 2) × 0.06 + floor(index / 2) × 0.05`). With reduced motion: no delay. About ten lines; never
19
- use it on the hero (see §2).
20
-
21
- ## 2. Animation tokens (`@theme`)
22
-
23
- | Utility | Value | What it does |
24
- |---|---|---|
25
- | `animate-rise` | `rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both` | First-paint entrance: from `opacity 0, translateY(18px)` to none. Stagger with an inline `animationDelay` of `0.08 s + 0.09 s × step`. |
26
- | `animate-flow` | `flow 5s ease-in-out infinite` | `background-position` 0 % 0 % → 100 % 100 % → back; with `bg-[length:200%_200%]` a light band travels through a metallic gradient |
27
- | `animate-shimmer` | `shimmer 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite` | A band crossing: `translateX(-120%)` → `translateX(260%)` |
28
- | `animate-glow-pulse` | `glow-pulse 2.4s ease-in-out infinite` | Opacity .5 → 1 → .5 with scale 1 → 1.1 → 1: the halo behind a logo or a play button |
29
- | `animate-pop-in` | `pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both` | 0 % `opacity 0, scale(.6)`, 60 % `opacity 1, scale(1.08)`, 100 % `scale(1)`: dialogs (`open:animate-pop-in`) |
30
- | `animate-aurora` | `aurora 16s ease-in-out infinite alternate` | 0 % `translate3d(0,0,0) scale(1)`, 50 % `translate3d(5%,-4%,0) scale(1.08)`, 100 % `translate3d(-4%,5%,0) scale(.95)`: soft pools of light |
31
- | `animate-drift` | `drift 6s ease-in-out infinite` | `translateY` 0 → -10px → 0: floating chips and phones (offset the phase with a negative `animation-delay`) |
32
- | `animate-marquee` | `marquee 40s linear infinite` | `translateX(0)` → `translateX(-50%)` over a row duplicated twice |
33
- | `animate-tap` | `tap 5s ease-out infinite` | A finger tap: 0–28 % `opacity 0, scale(.4)`; 32 % `opacity .85, scale(.6)`; 48–100 % `opacity 0, scale(1.9)` |
34
- | `animate-toast` | `toast 5s cubic-bezier(0.34, 1.56, 0.64, 1) infinite` | 0–36 % `opacity 0, translateY(14px) scale(.92)`; 44–86 % visible, no transform; 94–100 % `opacity 0, translateY(-6px)`. Same 5 s clock as `tap`, so it answers the tap. |
35
- | `animate-scan` | `scan 2.6s ease-in-out infinite` | `translateY(0)` → `translateY(var(--scan-travel, 100%))` → back. Set `--scan-travel` to the height the line runs over (e.g. `[--scan-travel:5.9rem]` over a 104 px QR). |
36
-
37
- Large soft light is always a radial gradient (`bg-[radial-gradient(closest-side,rgb(242_199_110/.32),transparent)]`)
38
- on a rounded div with `animate-aurora`, never `filter: blur()`: blur on big layers is what makes phones stutter.
39
-
40
- ## 3. Story loops of the "N ways" tiles
41
-
42
- Each loops on its own clock. Their **static style is the end state** (the card on the phone, the page open, the pass
43
- up): with reduced motion only that static style stays (§6). Design every new loop that way.
44
-
45
- **NFC** (4.8 s; card on a glide ease, rings ease-out, banner on the pop ease, page ease-in-out):
46
-
47
- | Class | Static style | Keyframes |
48
- |---|---|---|
49
- | `.nfc-card` | `transform: rotate(-10deg)` | 0 % `opacity 0, translate(-75%, 35%) rotate(-22deg)`; 12 % `opacity 1`; 32–72 % `opacity 1, rotate(-10deg)`; 92–100 % back to the 0 % state |
50
- | `.nfc-ring` | `opacity: 0` | 0–31 % `opacity 0, scale(.3)`; 36 % `opacity .9, scale(.5)`; 58–100 % `opacity 0, scale(1.9)`. Two rings, the second `animation-delay: .18s`, thinner border |
51
- | `.nfc-banner` | (visible) | 0–36 % `opacity 0, translateY(-140%)`; 44–88 % visible; 96–100 % hidden again |
52
- | `.nfc-page` | (visible) | 0–52 % `opacity 0`; 62–90 % `opacity 1`; 100 % `opacity 0` |
53
-
54
- **Wallet** (5.2 s; pass on a glide ease, QR ease-in-out, tap ease-out):
55
-
56
- | Class | Static style | Keyframes |
57
- |---|---|---|
58
- | `.wallet-pass` | (risen) | 0–24 % `translateY(var(--stack-y, 58%))`; 38–84 % `none`; 96–100 % back in the stack |
59
- | `.wallet-qr` | (visible) | 0–34 % `opacity 0, scale(.8)`; 44–84 % visible; 92–100 % `opacity 0` |
60
- | `.wallet-tap` | `opacity: 0` | 0–12 % `opacity 0, scale(.4)`; 16 % `opacity .85, scale(.6)`; 30–100 % `opacity 0, scale(1.8)` |
61
-
62
- **Value flip** (6 s, glide ease; a title that changed, static = the new one):
63
- `.swap-out` static `opacity 0`; 0 % `opacity 0`, 6–38 % visible, 46–100 % `opacity 0, translateY(-110%)`.
64
- `.swap-in` 0–38 % `opacity 0, translateY(110%)`, 46–92 % visible, 100 % `opacity 0`.
65
-
66
- **An edit going live** (3.6 s): `.fill-bar` (glide) 0 % `scaleX(0)`, 45–88 % `scaleX(1)` opacity 1, 100 % opacity 0
67
- (`origin-left`); `.fill-tick` (pop) 0–42 % `opacity 0, scale(.7)`, 52–90 % visible, 100 % `opacity 0`.
68
-
69
- ## 4. Lines of light meeting at one card
70
-
71
- SVG under the tile row (desktop only), `viewBox="0 0 1000 120"`, one path per tile from its centre to the middle:
72
- `M{x} 0 C {x} 80, 500 30, 500 120` with `x` = 125, 375, 625, 875 for four columns. Each path is drawn twice with
73
- `pathLength="100"`:
74
-
75
- - `.way-line`: `fill: none; stroke: var(--c-way-line); stroke-width: 1.5; stroke-dasharray: 1 2.2` (dotted).
76
- - `.way-light`: `fill: none; stroke: var(--c-way-light); stroke-width: 3; stroke-linecap: round;
77
- stroke-dasharray: 14 200; stroke-dashoffset: 14; filter: drop-shadow(0 0 6px var(--c-way-glow));
78
- animation: way-light 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite` with `stroke-dashoffset` 14 → -100, and a
79
- delay of `i × 0.35 s` per path so the lights arrive one after the other.
80
-
81
- ## 5. A field filled by the app (OCR, autofill)
82
-
83
- - `.fill-in`: `animation: fill-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both`. 0 %: `color: transparent;
84
- text-shadow: 0 0 10px var(--c-gold-ink); background-color: rgb(242 199 110 / .16); box-shadow: 0 0 0 3px
85
- rgb(242 199 110 / .55), 0 0 22px rgb(242 199 110 / .4)`. 45 %: `color: transparent; text-shadow: 0 0 3px
86
- var(--c-title)`. 100 %: `text-shadow: 0 0 0 transparent`. The text comes in from a blur and the field glows gold
87
- once.
88
- - `.scan-down`: a line running down over a photo while it is read (absolute, `h-0.5`, in a relative box).
89
- `top: 0; animation: scan-down 1.4s ease-in-out infinite alternate`, `top` 0 → `calc(100% - 2px)`.
90
-
91
- The behaviour around it is in `sections.md` (Small controls).
92
-
93
- ## 6. Reduced motion
94
-
95
- ```css
96
- @media (prefers-reduced-motion: reduce) {
97
- *, *::before, *::after {
98
- animation-duration: 1ms !important; animation-iteration-count: 1 !important;
99
- transition-duration: 1ms !important; scroll-behavior: auto !important;
100
- }
101
- .animate-rise { animation-delay: 0s !important; }
102
- }
103
- ```
104
-
105
- 1 ms, not `animation: none`: end states with `both` fill still apply (the hero text is visible at once), and story
106
- loops (no fill) fall back to their static end state. Only the entrance loses its delay: a real delay elsewhere may be
107
- a fallback timer. In JavaScript, `useReducedMotion()` turns off the pointer tilt, the scroll spread and the typing
108
- loop, and the Reveal delay.
109
-
110
- ## 7. JavaScript loops (only while visible)
111
-
112
- - **Typing address** (URL tile): `useInView(ref, { amount: 0.6 })` and not reduced motion → type one character every
113
- 90 ms with a 1 px blinking caret, then "loading" (a `bg-cta` bar `h-0.5` scaling 0 → 1 over 700 ms, `origin-left`),
114
- after 800 ms "done" (bar fades, the mini page fades in over 500 ms), next round 3.6 s after typing ended. Off screen
115
- or reduced: the full address and the page, still. Clear every interval and timeout in the effect's cleanup.
116
- - **Product tour**: plays only after a press (▶ or a step) and only while `useInView(ref, { amount: 0.4 })`; see
117
- `sections.md` §5.
118
- - **Pointer tilt / scroll spread** (hero): framer-motion `useMotionValue` + `useSpring` and `useScroll` +
119
- `useTransform`; numbers in `sections.md` §1.
120
- - **Lazy libraries**: anything heavy for a decorative stage (the QR generator) loads with `import()` when the element
121
- comes near (`useInView(ref, { once: true, margin: '200px' })`), never with the page.
1
+ # g6-style motion
2
+
3
+ Easings, every animation and its keyframes, the reduced-motion rule and the few JavaScript loops. The rules for when
4
+ to use which are in `SKILL.md` (Motion rules); this file holds the numbers.
5
+
6
+ ## 1. Easings and the reveal
7
+
8
+ | Token | Value | Use |
9
+ |---|---|---|
10
+ | `--ease-glide` | `cubic-bezier(0.22, 1, 0.36, 1)` | Entrances, hovers, list and tour transitions |
11
+ | `--ease-pop` | `cubic-bezier(0.34, 1.56, 0.64, 1)` | Things that land with a small overshoot: toast, pass, switch knob, icon tile hover scale |
12
+
13
+ Hover on cards: `transition-[transform,box-shadow] duration-300 ease-glide hover:-translate-y-1 hover:shadow-float`
14
+ (benefit cards `-translate-y-0.5`); the icon tile inside scales to 110 % with `ease-pop`.
15
+
16
+ **Reveal** (below the fold, framer-motion): `initial={{ opacity: 0, y: 16 }}`, `whileInView={{ opacity: 1, y: 0 }}`,
17
+ `viewport={{ once: true }}`, 0.5 s, glide ease, optional `delay` (tile `index × 0.08`, a 2-column grid
18
+ `(index % 2) × 0.06 + floor(index / 2) × 0.05`). With reduced motion: no delay. About ten lines; never
19
+ use it on the hero (see §2).
20
+
21
+ ## 2. Animation tokens (`@theme`)
22
+
23
+ | Utility | Value | What it does |
24
+ |---|---|---|
25
+ | `animate-rise` | `rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both` | First-paint entrance: from `opacity 0, translateY(18px)` to none. Stagger with an inline `animationDelay` of `0.08 s + 0.09 s × step`. |
26
+ | `animate-flow` | `flow 5s ease-in-out infinite` | `background-position` 0 % 0 % → 100 % 100 % → back; with `bg-[length:200%_200%]` a light band travels through a metallic gradient |
27
+ | `animate-shimmer` | `shimmer 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite` | A band crossing: `translateX(-120%)` → `translateX(260%)` |
28
+ | `animate-glow-pulse` | `glow-pulse 2.4s ease-in-out infinite` | Opacity .5 → 1 → .5 with scale 1 → 1.1 → 1: the halo behind a logo or a play button |
29
+ | `animate-pop-in` | `pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both` | 0 % `opacity 0, scale(.6)`, 60 % `opacity 1, scale(1.08)`, 100 % `scale(1)`: dialogs (`open:animate-pop-in`) |
30
+ | `animate-aurora` | `aurora 16s ease-in-out infinite alternate` | 0 % `translate3d(0,0,0) scale(1)`, 50 % `translate3d(5%,-4%,0) scale(1.08)`, 100 % `translate3d(-4%,5%,0) scale(.95)`: soft pools of light |
31
+ | `animate-drift` | `drift 6s ease-in-out infinite` | `translateY` 0 → -10px → 0: floating chips and phones (offset the phase with a negative `animation-delay`) |
32
+ | `animate-marquee` | `marquee 40s linear infinite` | `translateX(0)` → `translateX(-50%)` over a row duplicated twice |
33
+ | `animate-tap` | `tap 5s ease-out infinite` | A finger tap: 0–28 % `opacity 0, scale(.4)`; 32 % `opacity .85, scale(.6)`; 48–100 % `opacity 0, scale(1.9)` |
34
+ | `animate-toast` | `toast 5s cubic-bezier(0.34, 1.56, 0.64, 1) infinite` | 0–36 % `opacity 0, translateY(14px) scale(.92)`; 44–86 % visible, no transform; 94–100 % `opacity 0, translateY(-6px)`. Same 5 s clock as `tap`, so it answers the tap. |
35
+ | `animate-scan` | `scan 2.6s ease-in-out infinite` | `translateY(0)` → `translateY(var(--scan-travel, 100%))` → back. Set `--scan-travel` to the height the line runs over (e.g. `[--scan-travel:5.9rem]` over a 104 px QR). |
36
+
37
+ Large soft light is always a radial gradient (`bg-[radial-gradient(closest-side,rgb(242_199_110/.32),transparent)]`)
38
+ on a rounded div with `animate-aurora`, never `filter: blur()`: blur on big layers is what makes phones stutter.
39
+
40
+ ## 3. Story loops of the "N ways" tiles
41
+
42
+ Each loops on its own clock. Their **static style is the end state** (the card on the phone, the page open, the pass
43
+ up): with reduced motion only that static style stays (§6). Design every new loop that way.
44
+
45
+ **NFC** (4.8 s; card on a glide ease, rings ease-out, banner on the pop ease, page ease-in-out):
46
+
47
+ | Class | Static style | Keyframes |
48
+ |---|---|---|
49
+ | `.nfc-card` | `transform: rotate(-10deg)` | 0 % `opacity 0, translate(-75%, 35%) rotate(-22deg)`; 12 % `opacity 1`; 32–72 % `opacity 1, rotate(-10deg)`; 92–100 % back to the 0 % state |
50
+ | `.nfc-ring` | `opacity: 0` | 0–31 % `opacity 0, scale(.3)`; 36 % `opacity .9, scale(.5)`; 58–100 % `opacity 0, scale(1.9)`. Two rings, the second `animation-delay: .18s`, thinner border |
51
+ | `.nfc-banner` | (visible) | 0–36 % `opacity 0, translateY(-140%)`; 44–88 % visible; 96–100 % hidden again |
52
+ | `.nfc-page` | (visible) | 0–52 % `opacity 0`; 62–90 % `opacity 1`; 100 % `opacity 0` |
53
+
54
+ **Wallet** (5.2 s; pass on a glide ease, QR ease-in-out, tap ease-out):
55
+
56
+ | Class | Static style | Keyframes |
57
+ |---|---|---|
58
+ | `.wallet-pass` | (risen) | 0–24 % `translateY(var(--stack-y, 58%))`; 38–84 % `none`; 96–100 % back in the stack |
59
+ | `.wallet-qr` | (visible) | 0–34 % `opacity 0, scale(.8)`; 44–84 % visible; 92–100 % `opacity 0` |
60
+ | `.wallet-tap` | `opacity: 0` | 0–12 % `opacity 0, scale(.4)`; 16 % `opacity .85, scale(.6)`; 30–100 % `opacity 0, scale(1.8)` |
61
+
62
+ **Value flip** (6 s, glide ease; a title that changed, static = the new one):
63
+ `.swap-out` static `opacity 0`; 0 % `opacity 0`, 6–38 % visible, 46–100 % `opacity 0, translateY(-110%)`.
64
+ `.swap-in` 0–38 % `opacity 0, translateY(110%)`, 46–92 % visible, 100 % `opacity 0`.
65
+
66
+ **An edit going live** (3.6 s): `.fill-bar` (glide) 0 % `scaleX(0)`, 45–88 % `scaleX(1)` opacity 1, 100 % opacity 0
67
+ (`origin-left`); `.fill-tick` (pop) 0–42 % `opacity 0, scale(.7)`, 52–90 % visible, 100 % `opacity 0`.
68
+
69
+ ## 4. Lines of light meeting at one card
70
+
71
+ SVG under the tile row (desktop only), `viewBox="0 0 1000 120"`, one path per tile from its centre to the middle:
72
+ `M{x} 0 C {x} 80, 500 30, 500 120` with `x` = 125, 375, 625, 875 for four columns. Each path is drawn twice with
73
+ `pathLength="100"`:
74
+
75
+ - `.way-line`: `fill: none; stroke: var(--c-way-line); stroke-width: 1.5; stroke-dasharray: 1 2.2` (dotted).
76
+ - `.way-light`: `fill: none; stroke: var(--c-way-light); stroke-width: 3; stroke-linecap: round;
77
+ stroke-dasharray: 14 200; stroke-dashoffset: 14; filter: drop-shadow(0 0 6px var(--c-way-glow));
78
+ animation: way-light 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite` with `stroke-dashoffset` 14 → -100, and a
79
+ delay of `i × 0.35 s` per path so the lights arrive one after the other.
80
+
81
+ ## 5. A field filled by the app (OCR, autofill)
82
+
83
+ - `.fill-in`: `animation: fill-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both`. 0 %: `color: transparent;
84
+ text-shadow: 0 0 10px var(--c-gold-ink); background-color: rgb(242 199 110 / .16); box-shadow: 0 0 0 3px
85
+ rgb(242 199 110 / .55), 0 0 22px rgb(242 199 110 / .4)`. 45 %: `color: transparent; text-shadow: 0 0 3px
86
+ var(--c-title)`. 100 %: `text-shadow: 0 0 0 transparent`. The text comes in from a blur and the field glows gold
87
+ once.
88
+ - `.scan-down`: a line running down over a photo while it is read (absolute, `h-0.5`, in a relative box).
89
+ `top: 0; animation: scan-down 1.4s ease-in-out infinite alternate`, `top` 0 → `calc(100% - 2px)`.
90
+
91
+ The behaviour around it is in `sections.md` (Small controls).
92
+
93
+ ## 6. Reduced motion
94
+
95
+ ```css
96
+ @media (prefers-reduced-motion: reduce) {
97
+ *, *::before, *::after {
98
+ animation-duration: 1ms !important; animation-iteration-count: 1 !important;
99
+ transition-duration: 1ms !important; scroll-behavior: auto !important;
100
+ }
101
+ .animate-rise { animation-delay: 0s !important; }
102
+ }
103
+ ```
104
+
105
+ 1 ms, not `animation: none`: end states with `both` fill still apply (the hero text is visible at once), and story
106
+ loops (no fill) fall back to their static end state. Only the entrance loses its delay: a real delay elsewhere may be
107
+ a fallback timer. In JavaScript, `useReducedMotion()` turns off the pointer tilt, the scroll spread and the typing
108
+ loop, and the Reveal delay.
109
+
110
+ ## 7. JavaScript loops (only while visible)
111
+
112
+ - **Typing address** (URL tile): `useInView(ref, { amount: 0.6 })` and not reduced motion → type one character every
113
+ 90 ms with a 1 px blinking caret, then "loading" (a `bg-cta` bar `h-0.5` scaling 0 → 1 over 700 ms, `origin-left`),
114
+ after 800 ms "done" (bar fades, the mini page fades in over 500 ms), next round 3.6 s after typing ended. Off screen
115
+ or reduced: the full address and the page, still. Clear every interval and timeout in the effect's cleanup.
116
+ - **Product tour**: plays only after a press (▶ or a step) and only while `useInView(ref, { amount: 0.4 })`; see
117
+ `sections.md` §5.
118
+ - **Pointer tilt / scroll spread** (hero): framer-motion `useMotionValue` + `useSpring` and `useScroll` +
119
+ `useTransform`; numbers in `sections.md` §1.
120
+ - **Lazy libraries**: anything heavy for a decorative stage (the QR generator) loads with `import()` when the element
121
+ comes near (`useInView(ref, { once: true, margin: '200px' })`), never with the page.