@jaimevalasek/aioson 1.3.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 (288) hide show
  1. package/CHANGELOG.md +456 -0
  2. package/CODE_OF_CONDUCT.md +12 -0
  3. package/CONTRIBUTING.md +13 -0
  4. package/LICENSE +21 -0
  5. package/README.md +254 -0
  6. package/bin/aioson.js +4 -0
  7. package/docs/en/cli-reference.md +398 -0
  8. package/docs/en/i18n.md +52 -0
  9. package/docs/en/json-schemas.md +41 -0
  10. package/docs/en/mcp.md +56 -0
  11. package/docs/en/parallel.md +82 -0
  12. package/docs/en/qa-browser.md +339 -0
  13. package/docs/en/release-flow.md +22 -0
  14. package/docs/en/release-notes-template.md +41 -0
  15. package/docs/en/release.md +28 -0
  16. package/docs/en/schemas/agent-prompt.schema.json +17 -0
  17. package/docs/en/schemas/agents.schema.json +32 -0
  18. package/docs/en/schemas/context-validate.schema.json +36 -0
  19. package/docs/en/schemas/doctor.schema.json +89 -0
  20. package/docs/en/schemas/error.schema.json +24 -0
  21. package/docs/en/schemas/i18n-add.schema.json +15 -0
  22. package/docs/en/schemas/index.json +116 -0
  23. package/docs/en/schemas/info.schema.json +39 -0
  24. package/docs/en/schemas/init.schema.json +48 -0
  25. package/docs/en/schemas/install.schema.json +60 -0
  26. package/docs/en/schemas/locale-apply.schema.json +30 -0
  27. package/docs/en/schemas/mcp-doctor.schema.json +95 -0
  28. package/docs/en/schemas/mcp-init.schema.json +122 -0
  29. package/docs/en/schemas/package-test.schema.json +24 -0
  30. package/docs/en/schemas/parallel-assign.schema.json +57 -0
  31. package/docs/en/schemas/parallel-doctor.schema.json +86 -0
  32. package/docs/en/schemas/parallel-init.schema.json +53 -0
  33. package/docs/en/schemas/parallel-status.schema.json +94 -0
  34. package/docs/en/schemas/setup-context.schema.json +39 -0
  35. package/docs/en/schemas/smoke.schema.json +23 -0
  36. package/docs/en/schemas/update.schema.json +48 -0
  37. package/docs/en/schemas/workflow-plan.schema.json +30 -0
  38. package/docs/en/web3.md +54 -0
  39. package/docs/pt/README.md +46 -0
  40. package/docs/pt/advisor-spec.md +335 -0
  41. package/docs/pt/agentes.md +453 -0
  42. package/docs/pt/cenarios.md +1230 -0
  43. package/docs/pt/clientes-ai.md +224 -0
  44. package/docs/pt/comandos-cli.md +511 -0
  45. package/docs/pt/genome-3.0-spec.md +296 -0
  46. package/docs/pt/guia-engineer.md +226 -0
  47. package/docs/pt/inicio-rapido.md +138 -0
  48. package/docs/pt/profiler-system.md +214 -0
  49. package/docs/pt/runtime-observability.md +72 -0
  50. package/docs/pt/squad-genoma.md +777 -0
  51. package/docs/pt/web3.md +797 -0
  52. package/docs/testing/genome-2.0-manual-regression.md +23 -0
  53. package/docs/testing/genome-2.0-matrix.md +36 -0
  54. package/docs/testing/genome-2.0-rollout.md +184 -0
  55. package/package.json +50 -0
  56. package/src/agents.js +56 -0
  57. package/src/cli.js +497 -0
  58. package/src/commands/agents.js +142 -0
  59. package/src/commands/cloud.js +1767 -0
  60. package/src/commands/config.js +90 -0
  61. package/src/commands/context-validate.js +91 -0
  62. package/src/commands/doctor.js +123 -0
  63. package/src/commands/genome-doctor.js +41 -0
  64. package/src/commands/genome-migrate.js +49 -0
  65. package/src/commands/i18n-add.js +56 -0
  66. package/src/commands/info.js +41 -0
  67. package/src/commands/init.js +75 -0
  68. package/src/commands/install.js +68 -0
  69. package/src/commands/locale-apply.js +51 -0
  70. package/src/commands/locale-diff.js +126 -0
  71. package/src/commands/mcp-doctor.js +406 -0
  72. package/src/commands/mcp-init.js +379 -0
  73. package/src/commands/package-e2e.js +273 -0
  74. package/src/commands/parallel-assign.js +403 -0
  75. package/src/commands/parallel-doctor.js +437 -0
  76. package/src/commands/parallel-init.js +249 -0
  77. package/src/commands/parallel-status.js +290 -0
  78. package/src/commands/qa-doctor.js +185 -0
  79. package/src/commands/qa-init.js +161 -0
  80. package/src/commands/qa-report.js +58 -0
  81. package/src/commands/qa-run.js +873 -0
  82. package/src/commands/qa-scan.js +337 -0
  83. package/src/commands/runtime.js +948 -0
  84. package/src/commands/scan-project.js +1107 -0
  85. package/src/commands/setup-context.js +650 -0
  86. package/src/commands/smoke.js +426 -0
  87. package/src/commands/squad-doctor.js +358 -0
  88. package/src/commands/squad-export.js +46 -0
  89. package/src/commands/squad-pipeline.js +97 -0
  90. package/src/commands/squad-repair-genomes.js +39 -0
  91. package/src/commands/squad-status.js +424 -0
  92. package/src/commands/squad-validate.js +230 -0
  93. package/src/commands/test-agents.js +194 -0
  94. package/src/commands/update.js +55 -0
  95. package/src/commands/workflow-next.js +594 -0
  96. package/src/commands/workflow-plan.js +108 -0
  97. package/src/constants.js +314 -0
  98. package/src/context-parse-reason.js +22 -0
  99. package/src/context-writer.js +150 -0
  100. package/src/context.js +217 -0
  101. package/src/detector.js +261 -0
  102. package/src/doctor.js +289 -0
  103. package/src/execution-gateway.js +461 -0
  104. package/src/genome-files.js +198 -0
  105. package/src/genome-format.js +442 -0
  106. package/src/genome-schema.js +215 -0
  107. package/src/genomes/bindings.js +281 -0
  108. package/src/genomes.js +467 -0
  109. package/src/i18n/index.js +103 -0
  110. package/src/i18n/messages/en.js +784 -0
  111. package/src/i18n/messages/es.js +718 -0
  112. package/src/i18n/messages/fr.js +725 -0
  113. package/src/i18n/messages/pt-BR.js +818 -0
  114. package/src/i18n/scaffold.js +64 -0
  115. package/src/installer.js +232 -0
  116. package/src/lib/genomes/compat.js +206 -0
  117. package/src/lib/genomes/migrate.js +90 -0
  118. package/src/lib/squads/genome-repair.js +49 -0
  119. package/src/locales.js +84 -0
  120. package/src/onboarding.js +305 -0
  121. package/src/parser.js +53 -0
  122. package/src/prompt-tool.js +20 -0
  123. package/src/qa-html-report.js +472 -0
  124. package/src/runtime-store.js +1527 -0
  125. package/src/squads/apply-genome.js +21 -0
  126. package/src/squads/genome-binding-service.js +154 -0
  127. package/src/updater.js +32 -0
  128. package/src/utils.js +46 -0
  129. package/src/version.js +50 -0
  130. package/template/.aioson/advisors/.gitkeep +1 -0
  131. package/template/.aioson/agents/analyst.md +225 -0
  132. package/template/.aioson/agents/architect.md +221 -0
  133. package/template/.aioson/agents/dev.md +201 -0
  134. package/template/.aioson/agents/discovery-design-doc.md +196 -0
  135. package/template/.aioson/agents/genoma.md +300 -0
  136. package/template/.aioson/agents/orchestrator.md +107 -0
  137. package/template/.aioson/agents/pm.md +89 -0
  138. package/template/.aioson/agents/product.md +361 -0
  139. package/template/.aioson/agents/profiler-enricher.md +266 -0
  140. package/template/.aioson/agents/profiler-forge.md +188 -0
  141. package/template/.aioson/agents/profiler-researcher.md +245 -0
  142. package/template/.aioson/agents/qa.md +344 -0
  143. package/template/.aioson/agents/setup.md +381 -0
  144. package/template/.aioson/agents/squad.md +837 -0
  145. package/template/.aioson/agents/ux-ui.md +416 -0
  146. package/template/.aioson/config.md +56 -0
  147. package/template/.aioson/context/.gitkeep +0 -0
  148. package/template/.aioson/context/parallel/.gitkeep +0 -0
  149. package/template/.aioson/context/spec.md.template +37 -0
  150. package/template/.aioson/genomas/.gitkeep +0 -0
  151. package/template/.aioson/locales/en/agents/analyst.md +214 -0
  152. package/template/.aioson/locales/en/agents/architect.md +210 -0
  153. package/template/.aioson/locales/en/agents/dev.md +187 -0
  154. package/template/.aioson/locales/en/agents/discovery-design-doc.md +27 -0
  155. package/template/.aioson/locales/en/agents/genoma.md +212 -0
  156. package/template/.aioson/locales/en/agents/orchestrator.md +105 -0
  157. package/template/.aioson/locales/en/agents/pm.md +77 -0
  158. package/template/.aioson/locales/en/agents/product.md +310 -0
  159. package/template/.aioson/locales/en/agents/profiler-enricher.md +5 -0
  160. package/template/.aioson/locales/en/agents/profiler-forge.md +5 -0
  161. package/template/.aioson/locales/en/agents/profiler-researcher.md +5 -0
  162. package/template/.aioson/locales/en/agents/qa.md +214 -0
  163. package/template/.aioson/locales/en/agents/setup.md +342 -0
  164. package/template/.aioson/locales/en/agents/squad.md +247 -0
  165. package/template/.aioson/locales/en/agents/ux-ui.md +320 -0
  166. package/template/.aioson/locales/es/agents/analyst.md +203 -0
  167. package/template/.aioson/locales/es/agents/architect.md +208 -0
  168. package/template/.aioson/locales/es/agents/dev.md +183 -0
  169. package/template/.aioson/locales/es/agents/discovery-design-doc.md +19 -0
  170. package/template/.aioson/locales/es/agents/genoma.md +102 -0
  171. package/template/.aioson/locales/es/agents/orchestrator.md +108 -0
  172. package/template/.aioson/locales/es/agents/pm.md +81 -0
  173. package/template/.aioson/locales/es/agents/product.md +310 -0
  174. package/template/.aioson/locales/es/agents/profiler-enricher.md +5 -0
  175. package/template/.aioson/locales/es/agents/profiler-forge.md +5 -0
  176. package/template/.aioson/locales/es/agents/profiler-researcher.md +5 -0
  177. package/template/.aioson/locales/es/agents/qa.md +163 -0
  178. package/template/.aioson/locales/es/agents/setup.md +347 -0
  179. package/template/.aioson/locales/es/agents/squad.md +247 -0
  180. package/template/.aioson/locales/es/agents/ux-ui.md +201 -0
  181. package/template/.aioson/locales/fr/agents/analyst.md +203 -0
  182. package/template/.aioson/locales/fr/agents/architect.md +208 -0
  183. package/template/.aioson/locales/fr/agents/dev.md +183 -0
  184. package/template/.aioson/locales/fr/agents/discovery-design-doc.md +19 -0
  185. package/template/.aioson/locales/fr/agents/genoma.md +102 -0
  186. package/template/.aioson/locales/fr/agents/orchestrator.md +108 -0
  187. package/template/.aioson/locales/fr/agents/pm.md +81 -0
  188. package/template/.aioson/locales/fr/agents/product.md +310 -0
  189. package/template/.aioson/locales/fr/agents/profiler-enricher.md +5 -0
  190. package/template/.aioson/locales/fr/agents/profiler-forge.md +5 -0
  191. package/template/.aioson/locales/fr/agents/profiler-researcher.md +5 -0
  192. package/template/.aioson/locales/fr/agents/qa.md +163 -0
  193. package/template/.aioson/locales/fr/agents/setup.md +347 -0
  194. package/template/.aioson/locales/fr/agents/squad.md +247 -0
  195. package/template/.aioson/locales/fr/agents/ux-ui.md +201 -0
  196. package/template/.aioson/locales/pt-BR/agents/analyst.md +217 -0
  197. package/template/.aioson/locales/pt-BR/agents/architect.md +213 -0
  198. package/template/.aioson/locales/pt-BR/agents/dev.md +198 -0
  199. package/template/.aioson/locales/pt-BR/agents/discovery-design-doc.md +198 -0
  200. package/template/.aioson/locales/pt-BR/agents/genoma.md +297 -0
  201. package/template/.aioson/locales/pt-BR/agents/orchestrator.md +108 -0
  202. package/template/.aioson/locales/pt-BR/agents/pm.md +81 -0
  203. package/template/.aioson/locales/pt-BR/agents/product.md +316 -0
  204. package/template/.aioson/locales/pt-BR/agents/profiler-enricher.md +5 -0
  205. package/template/.aioson/locales/pt-BR/agents/profiler-forge.md +5 -0
  206. package/template/.aioson/locales/pt-BR/agents/profiler-researcher.md +5 -0
  207. package/template/.aioson/locales/pt-BR/agents/qa.md +217 -0
  208. package/template/.aioson/locales/pt-BR/agents/setup.md +371 -0
  209. package/template/.aioson/locales/pt-BR/agents/squad.md +772 -0
  210. package/template/.aioson/locales/pt-BR/agents/ux-ui.md +322 -0
  211. package/template/.aioson/mcp/servers.md +24 -0
  212. package/template/.aioson/profiler-reports/.gitkeep +1 -0
  213. package/template/.aioson/schemas/content-blueprint.schema.json +30 -0
  214. package/template/.aioson/schemas/genome-meta.schema.json +150 -0
  215. package/template/.aioson/schemas/genome.schema.json +115 -0
  216. package/template/.aioson/schemas/readiness.schema.json +27 -0
  217. package/template/.aioson/schemas/squad-blueprint.schema.json +172 -0
  218. package/template/.aioson/schemas/squad-manifest.schema.json +276 -0
  219. package/template/.aioson/skills/dynamic/README.md +30 -0
  220. package/template/.aioson/skills/dynamic/cardano-docs.md +16 -0
  221. package/template/.aioson/skills/dynamic/ethereum-docs.md +17 -0
  222. package/template/.aioson/skills/dynamic/flux-ui-docs.md +13 -0
  223. package/template/.aioson/skills/dynamic/laravel-docs.md +41 -0
  224. package/template/.aioson/skills/dynamic/npm-packages.md +16 -0
  225. package/template/.aioson/skills/dynamic/solana-docs.md +16 -0
  226. package/template/.aioson/skills/references/premium-command-center-ui/master-application-prompt.md +79 -0
  227. package/template/.aioson/skills/references/premium-command-center-ui/operational-ux-playbook.md +253 -0
  228. package/template/.aioson/skills/references/premium-command-center-ui/quality-validation-checklist.md +82 -0
  229. package/template/.aioson/skills/references/premium-command-center-ui/visual-system-and-component-patterns.md +270 -0
  230. package/template/.aioson/skills/static/django-patterns.md +342 -0
  231. package/template/.aioson/skills/static/fastapi-patterns.md +344 -0
  232. package/template/.aioson/skills/static/filament-patterns.md +267 -0
  233. package/template/.aioson/skills/static/flux-ui-components.md +262 -0
  234. package/template/.aioson/skills/static/git-conventions.md +227 -0
  235. package/template/.aioson/skills/static/interface-design.md +372 -0
  236. package/template/.aioson/skills/static/jetstream-setup.md +200 -0
  237. package/template/.aioson/skills/static/laravel-conventions.md +491 -0
  238. package/template/.aioson/skills/static/nextjs-patterns.md +321 -0
  239. package/template/.aioson/skills/static/node-express-patterns.md +317 -0
  240. package/template/.aioson/skills/static/node-typescript-patterns.md +282 -0
  241. package/template/.aioson/skills/static/premium-command-center-ui.md +190 -0
  242. package/template/.aioson/skills/static/rails-conventions.md +307 -0
  243. package/template/.aioson/skills/static/react-motion-patterns.md +577 -0
  244. package/template/.aioson/skills/static/static-html-patterns.md +1935 -0
  245. package/template/.aioson/skills/static/tall-stack-patterns.md +286 -0
  246. package/template/.aioson/skills/static/ui-ux-modern.md +75 -0
  247. package/template/.aioson/skills/static/web3-cardano-patterns.md +337 -0
  248. package/template/.aioson/skills/static/web3-ethereum-patterns.md +310 -0
  249. package/template/.aioson/skills/static/web3-security-checklist.md +284 -0
  250. package/template/.aioson/skills/static/web3-solana-patterns.md +324 -0
  251. package/template/.aioson/squads/.artisan/.gitkeep +0 -0
  252. package/template/.aioson/squads/.gitkeep +0 -0
  253. package/template/.aioson/squads/memory.md +5 -0
  254. package/template/.aioson/tasks/squad-analyze.md +83 -0
  255. package/template/.aioson/tasks/squad-create.md +99 -0
  256. package/template/.aioson/tasks/squad-design.md +100 -0
  257. package/template/.aioson/tasks/squad-export.md +20 -0
  258. package/template/.aioson/tasks/squad-extend.md +68 -0
  259. package/template/.aioson/tasks/squad-pipeline.md +122 -0
  260. package/template/.aioson/tasks/squad-repair.md +85 -0
  261. package/template/.aioson/tasks/squad-validate.md +58 -0
  262. package/template/.aioson/templates/squads/content-basic/template.json +21 -0
  263. package/template/.aioson/templates/squads/media-channel/template.json +24 -0
  264. package/template/.aioson/templates/squads/research-analysis/template.json +22 -0
  265. package/template/.aioson/templates/squads/software-delivery/template.json +21 -0
  266. package/template/.claude/commands/aioson/analyst.md +5 -0
  267. package/template/.claude/commands/aioson/architect.md +5 -0
  268. package/template/.claude/commands/aioson/dev.md +5 -0
  269. package/template/.claude/commands/aioson/orchestrator.md +5 -0
  270. package/template/.claude/commands/aioson/pm.md +5 -0
  271. package/template/.claude/commands/aioson/qa.md +5 -0
  272. package/template/.claude/commands/aioson/setup.md +5 -0
  273. package/template/.claude/commands/aioson/ux-ui.md +5 -0
  274. package/template/.gemini/GEMINI.md +10 -0
  275. package/template/.gemini/commands/aios-analyst.toml +4 -0
  276. package/template/.gemini/commands/aios-architect.toml +7 -0
  277. package/template/.gemini/commands/aios-dev.toml +8 -0
  278. package/template/.gemini/commands/aios-discovery-design-doc.toml +4 -0
  279. package/template/.gemini/commands/aios-orchestrator.toml +8 -0
  280. package/template/.gemini/commands/aios-pm.toml +8 -0
  281. package/template/.gemini/commands/aios-product.toml +4 -0
  282. package/template/.gemini/commands/aios-qa.toml +6 -0
  283. package/template/.gemini/commands/aios-setup.toml +3 -0
  284. package/template/.gemini/commands/aios-ux-ui.toml +8 -0
  285. package/template/AGENTS.md +67 -0
  286. package/template/CLAUDE.md +31 -0
  287. package/template/OPENCODE.md +24 -0
  288. package/template/aioson-models.json +40 -0
@@ -0,0 +1,577 @@
1
+ # React Motion Patterns
2
+
3
+ > React equivalents of the wow effects from static-html-patterns.md.
4
+ > Use Framer Motion as the primary animation library. Plain CSS animations as fallback when Framer Motion is not installed.
5
+
6
+ ---
7
+
8
+ ## When to apply this skill
9
+
10
+ Read this skill when:
11
+ - `framework=React` or `framework=Next.js`
12
+ - The project has visual/marketing pages, landing sections, or dashboards that need motion
13
+ - The user asks for "wow", "animado", "animação", "efeito", "moderno"
14
+ - `ui_style=Bold & Cinematic` in `project.context.md`
15
+
16
+ Do NOT apply heavy motion to pure admin/CRUD interfaces — motion must serve the user, not decorate data.
17
+
18
+ ---
19
+
20
+ ## Dependencies
21
+
22
+ ```bash
23
+ # Primary — install when any motion pattern is needed
24
+ npm install framer-motion
25
+
26
+ # For scroll-driven animations without Framer Motion
27
+ # Use Intersection Observer (built-in browser API — no install needed)
28
+
29
+ # For sliders
30
+ npm install swiper
31
+
32
+ # For tilt (lightweight, no Framer Motion dependency)
33
+ npm install vanilla-tilt
34
+ # or use the custom hook below (zero dependencies)
35
+ ```
36
+
37
+ ---
38
+
39
+ ## 1. Animated mesh background (hero section)
40
+
41
+ CSS-only. Works in React, Next.js, Vue — no JS library needed.
42
+
43
+ ```tsx
44
+ // components/ui/MeshBackground.tsx
45
+ export function MeshBackground() {
46
+ return (
47
+ <div className="mesh-bg" aria-hidden="true" />
48
+ )
49
+ }
50
+ ```
51
+
52
+ ```css
53
+ /* styles/mesh.css — or inside CSS Module / Tailwind @layer */
54
+ .mesh-bg {
55
+ position: absolute;
56
+ inset: 0;
57
+ background:
58
+ radial-gradient(ellipse 120% 80% at -15% -10%, hsla(265, 70%, 55%, 0.28), transparent 60%),
59
+ radial-gradient(ellipse 80% 60% at 110% 20%, hsla(190, 80%, 55%, 0.22), transparent 55%),
60
+ radial-gradient(ellipse 60% 50% at 50% 110%, hsla(310, 75%, 65%, 0.18), transparent 60%),
61
+ hsl(240, 15%, 6%);
62
+ background-size: 200% 200%;
63
+ animation: meshDrift 20s ease infinite alternate;
64
+ z-index: 0;
65
+ }
66
+
67
+ @keyframes meshDrift {
68
+ 0% { background-position: 0% 0%; }
69
+ 33% { background-position: 60% 40%; }
70
+ 66% { background-position: 40% 80%; }
71
+ 100% { background-position: 100% 100%; }
72
+ }
73
+
74
+ @media (prefers-reduced-motion: reduce) {
75
+ .mesh-bg { animation: none; }
76
+ }
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 2. Animated gradient text
82
+
83
+ ```tsx
84
+ // components/ui/GradientText.tsx
85
+ interface GradientTextProps {
86
+ children: React.ReactNode
87
+ className?: string
88
+ }
89
+
90
+ export function GradientText({ children, className }: GradientTextProps) {
91
+ return (
92
+ <span className={`gradient-text ${className ?? ''}`}>
93
+ {children}
94
+ </span>
95
+ )
96
+ }
97
+ ```
98
+
99
+ ```css
100
+ .gradient-text {
101
+ background: linear-gradient(
102
+ 135deg,
103
+ hsl(265, 80%, 65%),
104
+ hsl(190, 80%, 55%),
105
+ hsl(310, 75%, 65%),
106
+ hsl(265, 80%, 65%)
107
+ );
108
+ background-size: 300% 300%;
109
+ -webkit-background-clip: text;
110
+ background-clip: text;
111
+ -webkit-text-fill-color: transparent;
112
+ animation: textGradient 8s ease infinite;
113
+ }
114
+
115
+ @keyframes textGradient {
116
+ 0%, 100% { background-position: 0% 50%; }
117
+ 50% { background-position: 100% 50%; }
118
+ }
119
+
120
+ @media (prefers-reduced-motion: reduce) {
121
+ .gradient-text {
122
+ animation: none;
123
+ background-position: 0% 50%;
124
+ }
125
+ }
126
+ ```
127
+
128
+ Usage:
129
+ ```tsx
130
+ <h1>The future of <GradientText>everything</GradientText></h1>
131
+ ```
132
+
133
+ ---
134
+
135
+ ## 3. Scroll reveal (Framer Motion)
136
+
137
+ ```tsx
138
+ // components/ui/Reveal.tsx
139
+ 'use client' // Next.js only
140
+ import { motion } from 'framer-motion'
141
+ import { useInView } from 'framer-motion'
142
+ import { useRef } from 'react'
143
+
144
+ interface RevealProps {
145
+ children: React.ReactNode
146
+ delay?: number
147
+ className?: string
148
+ }
149
+
150
+ export function Reveal({ children, delay = 0, className }: RevealProps) {
151
+ const ref = useRef(null)
152
+ const isInView = useInView(ref, { once: true, margin: '-80px' })
153
+
154
+ return (
155
+ <motion.div
156
+ ref={ref}
157
+ className={className}
158
+ initial={{ opacity: 0, y: 40 }}
159
+ animate={isInView ? { opacity: 1, y: 0 } : {}}
160
+ transition={{ duration: 0.6, delay, ease: [0.16, 1, 0.3, 1] }}
161
+ >
162
+ {children}
163
+ </motion.div>
164
+ )
165
+ }
166
+ ```
167
+
168
+ Usage — staggered reveal:
169
+ ```tsx
170
+ <Reveal><SectionLabel>Features</SectionLabel></Reveal>
171
+ <Reveal delay={0.1}><h2>Everything you need</h2></Reveal>
172
+ <Reveal delay={0.2}><p>Supporting text here.</p></Reveal>
173
+ ```
174
+
175
+ **Without Framer Motion** — Intersection Observer hook:
176
+ ```tsx
177
+ // hooks/useReveal.ts
178
+ import { useEffect, useRef, useState } from 'react'
179
+
180
+ export function useReveal(margin = '-80px') {
181
+ const ref = useRef<HTMLDivElement>(null)
182
+ const [visible, setVisible] = useState(false)
183
+
184
+ useEffect(() => {
185
+ const el = ref.current
186
+ if (!el) return
187
+ const observer = new IntersectionObserver(
188
+ ([entry]) => { if (entry.isIntersecting) { setVisible(true); observer.disconnect() } },
189
+ { rootMargin: margin }
190
+ )
191
+ observer.observe(el)
192
+ return () => observer.disconnect()
193
+ }, [margin])
194
+
195
+ return { ref, visible }
196
+ }
197
+
198
+ // Usage
199
+ function FeatureCard() {
200
+ const { ref, visible } = useReveal()
201
+ return (
202
+ <div
203
+ ref={ref}
204
+ style={{
205
+ opacity: visible ? 1 : 0,
206
+ transform: visible ? 'none' : 'translateY(40px)',
207
+ transition: 'opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1)',
208
+ }}
209
+ >
210
+ ...
211
+ </div>
212
+ )
213
+ }
214
+ ```
215
+
216
+ ---
217
+
218
+ ## 4. 3D card tilt on hover
219
+
220
+ ```tsx
221
+ // hooks/useTilt.ts
222
+ import { useRef } from 'react'
223
+
224
+ export function useTilt(intensity = 14) {
225
+ const ref = useRef<HTMLDivElement>(null)
226
+
227
+ function onMouseMove(e: React.MouseEvent<HTMLDivElement>) {
228
+ const card = ref.current
229
+ if (!card) return
230
+ const r = card.getBoundingClientRect()
231
+ const x = (e.clientX - r.left) / r.width - 0.5
232
+ const y = (e.clientY - r.top) / r.height - 0.5
233
+ card.style.transform = `perspective(700px) rotateY(${x * intensity}deg) rotateX(${-y * intensity}deg) translateZ(10px)`
234
+ }
235
+
236
+ function onMouseLeave() {
237
+ if (ref.current) ref.current.style.transform = ''
238
+ }
239
+
240
+ return { ref, onMouseMove, onMouseLeave }
241
+ }
242
+ ```
243
+
244
+ ```tsx
245
+ // components/ui/TiltCard.tsx
246
+ import { useTilt } from '@/hooks/useTilt'
247
+
248
+ interface TiltCardProps {
249
+ children: React.ReactNode
250
+ className?: string
251
+ }
252
+
253
+ export function TiltCard({ children, className }: TiltCardProps) {
254
+ const { ref, onMouseMove, onMouseLeave } = useTilt()
255
+
256
+ return (
257
+ <div
258
+ ref={ref}
259
+ className={className}
260
+ onMouseMove={onMouseMove}
261
+ onMouseLeave={onMouseLeave}
262
+ style={{ transition: 'transform 0.15s ease', willChange: 'transform' }}
263
+ >
264
+ {children}
265
+ </div>
266
+ )
267
+ }
268
+ ```
269
+
270
+ Usage:
271
+ ```tsx
272
+ <div className="features-grid">
273
+ {features.map(f => (
274
+ <TiltCard key={f.id} className="feature-card">
275
+ <span className="feature-icon">{f.icon}</span>
276
+ <h3>{f.title}</h3>
277
+ <p>{f.description}</p>
278
+ </TiltCard>
279
+ ))}
280
+ </div>
281
+ ```
282
+
283
+ > Disable on touch devices and `prefers-reduced-motion`:
284
+ ```tsx
285
+ // In useTilt.ts — add guard at top of onMouseMove:
286
+ if (window.matchMedia('(hover: none)').matches) return
287
+ if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return
288
+ ```
289
+
290
+ ---
291
+
292
+ ## 5. Hero intro — staggered entrance (Framer Motion)
293
+
294
+ ```tsx
295
+ // components/sections/Hero.tsx
296
+ 'use client'
297
+ import { motion } from 'framer-motion'
298
+
299
+ const item = {
300
+ hidden: { opacity: 0, y: 30 },
301
+ show: { opacity: 1, y: 0, transition: { duration: 0.6, ease: [0.16, 1, 0.3, 1] } },
302
+ }
303
+
304
+ const container = {
305
+ hidden: {},
306
+ show: { transition: { staggerChildren: 0.12, delayChildren: 0.1 } },
307
+ }
308
+
309
+ export function Hero() {
310
+ return (
311
+ <section className="hero">
312
+ <MeshBackground />
313
+ <motion.div
314
+ className="hero__content"
315
+ variants={container}
316
+ initial="hidden"
317
+ animate="show"
318
+ >
319
+ <motion.span variants={item} className="hero__label">
320
+ Category / Tagline
321
+ </motion.span>
322
+ <motion.h1 variants={item} className="hero__title">
323
+ Bold headline that <GradientText>changes everything</GradientText>
324
+ </motion.h1>
325
+ <motion.p variants={item} className="hero__subtitle">
326
+ Supporting text with real context — who benefits, how, what outcome.
327
+ </motion.p>
328
+ <motion.div variants={item} className="hero__actions">
329
+ <a href="#signup" className="btn btn--primary">Get started</a>
330
+ <a href="#demo" className="btn btn--ghost">Watch demo</a>
331
+ </motion.div>
332
+ </motion.div>
333
+ </section>
334
+ )
335
+ }
336
+ ```
337
+
338
+ ---
339
+
340
+ ## 6. Infinite logo marquee (CSS only)
341
+
342
+ ```tsx
343
+ // components/ui/Marquee.tsx
344
+ interface MarqueeProps {
345
+ items: React.ReactNode[]
346
+ speed?: number // seconds for one full loop
347
+ }
348
+
349
+ export function Marquee({ items, speed = 24 }: MarqueeProps) {
350
+ // Duplicate items to create seamless loop
351
+ const doubled = [...items, ...items]
352
+
353
+ return (
354
+ <div className="marquee" aria-hidden="true">
355
+ <div
356
+ className="marquee__track"
357
+ style={{ animationDuration: `${speed}s` }}
358
+ >
359
+ {doubled.map((item, i) => (
360
+ <div key={i} className="marquee__item">{item}</div>
361
+ ))}
362
+ </div>
363
+ </div>
364
+ )
365
+ }
366
+ ```
367
+
368
+ ```css
369
+ .marquee {
370
+ overflow: hidden;
371
+ mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
372
+ }
373
+
374
+ .marquee__track {
375
+ display: flex;
376
+ gap: 3rem;
377
+ width: max-content;
378
+ animation: infiniteSlide linear infinite;
379
+ }
380
+
381
+ .marquee:hover .marquee__track {
382
+ animation-play-state: paused;
383
+ }
384
+
385
+ @keyframes infiniteSlide {
386
+ from { transform: translateX(0); }
387
+ to { transform: translateX(-50%); }
388
+ }
389
+
390
+ @media (prefers-reduced-motion: reduce) {
391
+ .marquee__track { animation: none; }
392
+ }
393
+ ```
394
+
395
+ ---
396
+
397
+ ## 7. Scroll progress bar
398
+
399
+ ```tsx
400
+ // components/ui/ScrollProgress.tsx
401
+ 'use client'
402
+ import { useScroll, useSpring, motion } from 'framer-motion'
403
+
404
+ export function ScrollProgress() {
405
+ const { scrollYProgress } = useScroll()
406
+ const scaleX = useSpring(scrollYProgress, { stiffness: 100, damping: 30 })
407
+
408
+ return (
409
+ <motion.div
410
+ className="scroll-progress"
411
+ style={{ scaleX, transformOrigin: 'left' }}
412
+ />
413
+ )
414
+ }
415
+ ```
416
+
417
+ ```css
418
+ .scroll-progress {
419
+ position: fixed;
420
+ top: 0;
421
+ left: 0;
422
+ right: 0;
423
+ height: 3px;
424
+ background: linear-gradient(to right, hsl(265, 80%, 65%), hsl(190, 80%, 55%));
425
+ z-index: 1000;
426
+ }
427
+ ```
428
+
429
+ ---
430
+
431
+ ## 8. Glassmorphism card
432
+
433
+ ```tsx
434
+ // components/ui/GlassCard.tsx
435
+ export function GlassCard({ children, className }: { children: React.ReactNode; className?: string }) {
436
+ return (
437
+ <div className={`glass-card ${className ?? ''}`}>
438
+ {children}
439
+ </div>
440
+ )
441
+ }
442
+ ```
443
+
444
+ ```css
445
+ .glass-card {
446
+ background: hsla(240, 20%, 100%, 0.04);
447
+ border: 1px solid hsla(240, 20%, 100%, 0.08);
448
+ backdrop-filter: blur(12px);
449
+ -webkit-backdrop-filter: blur(12px);
450
+ border-radius: 16px;
451
+ padding: 1.5rem;
452
+ /* Subtle inner glow */
453
+ box-shadow:
454
+ 0 0 0 1px hsla(265, 70%, 65%, 0.08),
455
+ inset 0 1px 0 hsla(240, 100%, 100%, 0.05);
456
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
457
+ }
458
+
459
+ .glass-card:hover {
460
+ border-color: hsla(265, 70%, 65%, 0.25);
461
+ box-shadow:
462
+ 0 0 0 1px hsla(265, 70%, 65%, 0.15),
463
+ 0 8px 32px hsla(265, 70%, 55%, 0.12),
464
+ inset 0 1px 0 hsla(240, 100%, 100%, 0.08);
465
+ }
466
+ ```
467
+
468
+ ---
469
+
470
+ ## 9. Floating orbs (decorative)
471
+
472
+ ```tsx
473
+ // components/ui/FloatingOrbs.tsx
474
+ export function FloatingOrbs() {
475
+ return (
476
+ <div className="orbs" aria-hidden="true">
477
+ <div className="orb orb--1" />
478
+ <div className="orb orb--2" />
479
+ <div className="orb orb--3" />
480
+ </div>
481
+ )
482
+ }
483
+ ```
484
+
485
+ ```css
486
+ .orbs {
487
+ position: absolute;
488
+ inset: 0;
489
+ overflow: hidden;
490
+ pointer-events: none;
491
+ z-index: 0;
492
+ }
493
+
494
+ .orb {
495
+ position: absolute;
496
+ border-radius: 50%;
497
+ filter: blur(60px);
498
+ opacity: 0.35;
499
+ animation: orbFloat 12s ease-in-out infinite;
500
+ }
501
+
502
+ .orb--1 {
503
+ width: 500px; height: 500px;
504
+ top: -200px; left: -100px;
505
+ background: radial-gradient(circle, hsl(265, 80%, 60%), transparent 70%);
506
+ animation-delay: 0s;
507
+ }
508
+
509
+ .orb--2 {
510
+ width: 400px; height: 400px;
511
+ top: 30%; right: -150px;
512
+ background: radial-gradient(circle, hsl(190, 80%, 55%), transparent 70%);
513
+ animation-delay: -4s;
514
+ }
515
+
516
+ .orb--3 {
517
+ width: 350px; height: 350px;
518
+ bottom: -100px; left: 40%;
519
+ background: radial-gradient(circle, hsl(310, 75%, 60%), transparent 70%);
520
+ animation-delay: -8s;
521
+ }
522
+
523
+ @keyframes orbFloat {
524
+ 0%, 100% { transform: translate(0, 0) scale(1); }
525
+ 33% { transform: translate(30px, -40px) scale(1.05); }
526
+ 66% { transform: translate(-20px, 20px) scale(0.95); }
527
+ }
528
+
529
+ @media (prefers-reduced-motion: reduce) {
530
+ .orb { animation: none; }
531
+ }
532
+ ```
533
+
534
+ ---
535
+
536
+ ## 10. Page transition (Next.js App Router)
537
+
538
+ ```tsx
539
+ // components/ui/PageTransition.tsx
540
+ 'use client'
541
+ import { motion, AnimatePresence } from 'framer-motion'
542
+ import { usePathname } from 'next/navigation'
543
+
544
+ export function PageTransition({ children }: { children: React.ReactNode }) {
545
+ const pathname = usePathname()
546
+
547
+ return (
548
+ <AnimatePresence mode="wait">
549
+ <motion.div
550
+ key={pathname}
551
+ initial={{ opacity: 0, y: 8 }}
552
+ animate={{ opacity: 1, y: 0 }}
553
+ exit={{ opacity: 0, y: -8 }}
554
+ transition={{ duration: 0.25, ease: 'easeInOut' }}
555
+ >
556
+ {children}
557
+ </motion.div>
558
+ </AnimatePresence>
559
+ )
560
+ }
561
+ ```
562
+
563
+ Add to `app/layout.tsx`:
564
+ ```tsx
565
+ <PageTransition>{children}</PageTransition>
566
+ ```
567
+
568
+ ---
569
+
570
+ ## Hard rules
571
+
572
+ - Always include `prefers-reduced-motion` fallback for every animation
573
+ - Never animate layout properties (width, height, top, left) — animate `transform` and `opacity` only
574
+ - Keep animation durations short for UI (150–300ms), longer for hero/decorative (600ms–20s)
575
+ - Tilt and 3D effects must be disabled on touch devices (`hover: none` media query)
576
+ - Do not install Framer Motion just for one CSS animation — use plain CSS keyframes instead
577
+ - Keep decorative elements (`orbs`, `mesh`, `marquee`) `aria-hidden="true"` and `pointer-events: none`