@jaimevalasek/aioson 1.5.1 → 1.6.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.
- package/README.md +6 -0
- package/docs/design-previews/aurora-command-ui-website.html +884 -0
- package/docs/design-previews/aurora-command-ui.html +682 -0
- package/docs/design-previews/bold-editorial-ui-website.html +658 -0
- package/docs/design-previews/bold-editorial-ui.html +717 -0
- package/docs/design-previews/clean-saas-ui-website.html +1202 -0
- package/docs/design-previews/clean-saas-ui.html +549 -0
- package/docs/design-previews/cognitive-core-ui-website.html +1009 -0
- package/docs/design-previews/cognitive-core-ui.html +463 -0
- package/docs/design-previews/glassmorphism-ui-website.html +572 -0
- package/docs/design-previews/glassmorphism-ui.html +886 -0
- package/docs/design-previews/index.html +699 -0
- package/docs/design-previews/interface-design-website.html +1187 -0
- package/docs/design-previews/interface-design.html +513 -0
- package/docs/design-previews/neo-brutalist-ui-website.html +621 -0
- package/docs/design-previews/neo-brutalist-ui.html +797 -0
- package/docs/design-previews/premium-command-center-ui-website.html +1217 -0
- package/docs/design-previews/premium-command-center-ui.html +552 -0
- package/docs/design-previews/warm-craft-ui-website.html +684 -0
- package/docs/design-previews/warm-craft-ui.html +739 -0
- package/docs/en/cli-reference.md +20 -9
- package/docs/pt/README.md +7 -0
- package/docs/pt/agent-sharding.md +132 -0
- package/docs/pt/agentes.md +8 -2
- package/docs/pt/busca-de-contexto.md +129 -0
- package/docs/pt/cache-de-contexto.md +156 -0
- package/docs/pt/comandos-cli.md +28 -0
- package/docs/pt/design-hybrid-forge.md +107 -0
- package/docs/pt/inicio-rapido.md +54 -3
- package/docs/pt/inteligencia-adaptativa.md +324 -0
- package/docs/pt/monitor-de-contexto.md +104 -0
- package/docs/pt/recuperacao-de-sessao.md +125 -0
- package/docs/pt/sandbox.md +125 -0
- package/docs/pt/skills.md +98 -6
- package/package.json +1 -1
- package/src/agent-loader.js +280 -0
- package/src/cli.js +94 -0
- package/src/commands/agent-loader.js +85 -0
- package/src/commands/context-cache.js +90 -0
- package/src/commands/context-monitor.js +92 -0
- package/src/commands/context-search.js +66 -0
- package/src/commands/design-hybrid-options.js +385 -0
- package/src/commands/health.js +214 -0
- package/src/commands/init.js +54 -13
- package/src/commands/install.js +52 -13
- package/src/commands/learning-evolve.js +355 -0
- package/src/commands/live.js +34 -0
- package/src/commands/recovery.js +43 -0
- package/src/commands/sandbox.js +37 -0
- package/src/commands/setup-context.js +22 -2
- package/src/commands/setup.js +178 -0
- package/src/commands/skill.js +79 -32
- package/src/commands/tool-registry-cmd.js +232 -0
- package/src/commands/update.js +7 -0
- package/src/constants.js +9 -0
- package/src/context-cache.js +159 -0
- package/src/context-search.js +326 -0
- package/src/design-variation-catalog.js +503 -0
- package/src/i18n/messages/en.js +32 -2
- package/src/i18n/messages/es.js +30 -2
- package/src/i18n/messages/fr.js +30 -2
- package/src/i18n/messages/pt-BR.js +32 -2
- package/src/install-animation.js +260 -0
- package/src/install-profile.js +143 -0
- package/src/install-wizard.js +474 -0
- package/src/installer.js +38 -10
- package/src/parser.js +7 -1
- package/src/recovery-context-session.js +154 -0
- package/src/runtime-store.js +97 -1
- package/src/sandbox.js +177 -0
- package/src/tool-executor.js +94 -0
- package/src/updater.js +11 -3
- package/template/.aioson/agents/analyst.md +58 -3
- package/template/.aioson/agents/architect.md +38 -0
- package/template/.aioson/agents/design-hybrid-forge.md +127 -0
- package/template/.aioson/agents/dev.md +103 -0
- package/template/.aioson/agents/deyvin.md +57 -0
- package/template/.aioson/agents/pm.md +58 -0
- package/template/.aioson/agents/product.md +28 -0
- package/template/.aioson/agents/qa.md +79 -0
- package/template/.aioson/agents/setup.md +65 -3
- package/template/.aioson/agents/sheldon.md +107 -6
- package/template/.aioson/agents/tester.md +156 -0
- package/template/.aioson/config.md +15 -0
- package/template/.aioson/context/forensics/.gitkeep +0 -0
- package/template/.aioson/context/seeds/seed-example.md +27 -0
- package/template/.aioson/context/user-profile.md +42 -0
- package/template/.aioson/locales/en/agents/setup.md +33 -1
- package/template/.aioson/locales/es/agents/setup.md +33 -1
- package/template/.aioson/locales/fr/agents/setup.md +33 -1
- package/template/.aioson/locales/pt-BR/agents/setup.md +33 -1
- package/template/.aioson/skills/design/aurora-command-ui/SKILL.md +243 -0
- package/template/.aioson/skills/design/aurora-command-ui/references/art-direction.md +293 -0
- package/template/.aioson/skills/design/aurora-command-ui/references/components.md +827 -0
- package/template/.aioson/skills/design/aurora-command-ui/references/dashboards.md +250 -0
- package/template/.aioson/skills/design/aurora-command-ui/references/design-tokens.md +585 -0
- package/template/.aioson/skills/design/aurora-command-ui/references/motion.md +365 -0
- package/template/.aioson/skills/design/aurora-command-ui/references/patterns.md +482 -0
- package/template/.aioson/skills/design/aurora-command-ui/references/websites.md +387 -0
- package/template/.aioson/skills/design/glassmorphism-ui/SKILL.md +222 -0
- package/template/.aioson/skills/design/glassmorphism-ui/references/art-direction.md +159 -0
- package/template/.aioson/skills/design/glassmorphism-ui/references/components.md +498 -0
- package/template/.aioson/skills/design/glassmorphism-ui/references/dashboards.md +236 -0
- package/template/.aioson/skills/design/glassmorphism-ui/references/design-tokens.md +274 -0
- package/template/.aioson/skills/design/glassmorphism-ui/references/motion.md +355 -0
- package/template/.aioson/skills/design/glassmorphism-ui/references/patterns.md +198 -0
- package/template/.aioson/skills/design/glassmorphism-ui/references/websites.md +307 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/SKILL.md +213 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/references/art-direction.md +228 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/references/components.md +855 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/references/dashboards.md +334 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/references/design-tokens.md +342 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/references/motion.md +286 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/references/patterns.md +458 -0
- package/template/.aioson/skills/design/neo-brutalist-ui/references/websites.md +723 -0
- package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +45 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/approval-gates.md +109 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/artifact-map.md +44 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/classification-map.md +37 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/hardening-lane.md +49 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/maintenance-and-state.md +66 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/ui-language.md +75 -0
- package/template/.aioson/skills/process/design-hybrid-forge/SKILL.md +144 -0
- package/template/.aioson/skills/process/design-hybrid-forge/references/crossover-protocol.md +221 -0
- package/template/.aioson/skills/process/design-hybrid-forge/references/naming-registry.md +88 -0
- package/template/.aioson/skills/process/design-hybrid-forge/references/output-contract.md +291 -0
- package/template/.aioson/skills/process/design-hybrid-forge/references/pair-compatibility.md +117 -0
- package/template/.aioson/skills/process/design-hybrid-forge/references/quality-gates.md +188 -0
- package/template/.aioson/skills/process/design-hybrid-forge/references/variation-library.md +125 -0
- package/template/AGENTS.md +23 -1
- package/template/CLAUDE.md +1 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
# Motion — Glassmorphism UI
|
|
2
|
+
|
|
3
|
+
Animation and transition specifications. Glass motion is defined by blur transitions, opacity shifts, and fluid easing — not bounce or spring.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Principles
|
|
8
|
+
|
|
9
|
+
- **Fluid**: movements smooth as a surface of water. Generous ease-out, never bounce, never overshoot.
|
|
10
|
+
- **Layered**: animations respect the depth layers — elements closer to the user animate faster than those further away. Cards animate faster than the background gradient.
|
|
11
|
+
- **Luminous**: opacity and blur transitions are first-class citizens (not just position/scale). The "frosting" of a surface appearing or disappearing is a core motion type.
|
|
12
|
+
- **Effortless**: nothing should look like it is "trying". Natural movements, no dramatic entrances unless the product is explicitly theatrical (media player, landing hero).
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Timing Tokens
|
|
17
|
+
|
|
18
|
+
```css
|
|
19
|
+
--transition-fast: 120ms ease;
|
|
20
|
+
--transition-base: 200ms ease;
|
|
21
|
+
--transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
22
|
+
--transition-glass: backdrop-filter 300ms ease,
|
|
23
|
+
background 300ms ease,
|
|
24
|
+
border-color 300ms ease,
|
|
25
|
+
box-shadow 300ms ease;
|
|
26
|
+
--transition-hero: 600ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`cubic-bezier(0.16, 1, 0.3, 1)` is the smooth deceleration curve — fast start, elegant stop. Use it for entrances and meaningful state changes. Use `ease` for hover/micro-interactions.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Entrance Animations
|
|
34
|
+
|
|
35
|
+
### 1. Glass Fade In
|
|
36
|
+
Card appears as if condensing from air — opacity and blur materialize simultaneously.
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
@keyframes glass-fade-in {
|
|
40
|
+
from {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
backdrop-filter: blur(0px);
|
|
43
|
+
}
|
|
44
|
+
to {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
backdrop-filter: var(--glass-blur-md);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.glass-fade-in {
|
|
50
|
+
animation: glass-fade-in 400ms ease-out forwards;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Use for: initial page load of glass cards, modal appearance.
|
|
55
|
+
|
|
56
|
+
### 2. Float Up
|
|
57
|
+
Card floats up and materializes — the primary entrance for dashboards and stagger lists.
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
@keyframes float-up {
|
|
61
|
+
from {
|
|
62
|
+
opacity: 0;
|
|
63
|
+
transform: translateY(16px);
|
|
64
|
+
backdrop-filter: blur(0px);
|
|
65
|
+
}
|
|
66
|
+
to {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
transform: translateY(0);
|
|
69
|
+
backdrop-filter: var(--glass-blur-md);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
.float-up {
|
|
73
|
+
animation: float-up 450ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Use for: dashboard cards on load, stagger card groups, stat cards appearing.
|
|
78
|
+
|
|
79
|
+
### 3. Scale Materialize
|
|
80
|
+
Element scales up from 95% and solidifies — for modals, dropdowns, and menus.
|
|
81
|
+
|
|
82
|
+
```css
|
|
83
|
+
@keyframes scale-materialize {
|
|
84
|
+
from {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
transform: scale(0.95);
|
|
87
|
+
backdrop-filter: blur(0px);
|
|
88
|
+
}
|
|
89
|
+
to {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
transform: scale(1);
|
|
92
|
+
backdrop-filter: var(--glass-blur-lg);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.scale-materialize {
|
|
96
|
+
animation: scale-materialize 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Use for: modal open, dropdown menu, context menu, tooltip appearance.
|
|
101
|
+
|
|
102
|
+
### 4. Glass Slide
|
|
103
|
+
Slides in from a direction and materializes — for drawers, panels, and side sheets.
|
|
104
|
+
|
|
105
|
+
```css
|
|
106
|
+
@keyframes glass-slide-right {
|
|
107
|
+
from {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
transform: translateX(-20px);
|
|
110
|
+
backdrop-filter: blur(0px);
|
|
111
|
+
}
|
|
112
|
+
to {
|
|
113
|
+
opacity: 1;
|
|
114
|
+
transform: translateX(0);
|
|
115
|
+
backdrop-filter: var(--glass-blur-lg);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
@keyframes glass-slide-up {
|
|
119
|
+
from {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
transform: translateY(20px);
|
|
122
|
+
backdrop-filter: blur(0px);
|
|
123
|
+
}
|
|
124
|
+
to {
|
|
125
|
+
opacity: 1;
|
|
126
|
+
transform: translateY(0);
|
|
127
|
+
backdrop-filter: var(--glass-blur-lg);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Use for: sidebar opening (slide-right), bottom sheet (slide-up on mobile), toast notifications (slide-up from bottom-right).
|
|
133
|
+
|
|
134
|
+
### 5. Orb Pulse
|
|
135
|
+
Background decorative gradient orbs appear softly — for landing pages and auth pages.
|
|
136
|
+
|
|
137
|
+
```css
|
|
138
|
+
@keyframes orb-pulse {
|
|
139
|
+
from {
|
|
140
|
+
opacity: 0;
|
|
141
|
+
transform: scale(0.8);
|
|
142
|
+
}
|
|
143
|
+
to {
|
|
144
|
+
opacity: 0.45;
|
|
145
|
+
transform: scale(1);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
.orb {
|
|
149
|
+
animation: orb-pulse 800ms ease-out forwards;
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Use for: decorative gradient blobs on landing pages, auth backgrounds. These should be slow and atmospheric.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Glass-Specific Animations
|
|
158
|
+
|
|
159
|
+
### 1. Blur Shift (nav on scroll)
|
|
160
|
+
Navigation glass becomes more opaque and blurred as the user scrolls — structural, not decorative.
|
|
161
|
+
|
|
162
|
+
```css
|
|
163
|
+
/* Applied via JS, toggling a class based on scrollY */
|
|
164
|
+
.nav-bar {
|
|
165
|
+
background: var(--glass-bg);
|
|
166
|
+
transition: var(--transition-glass);
|
|
167
|
+
}
|
|
168
|
+
.nav-bar.scrolled {
|
|
169
|
+
background: var(--glass-bg-hover);
|
|
170
|
+
}
|
|
171
|
+
.nav-bar.deep-scrolled {
|
|
172
|
+
background: var(--glass-bg-active);
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Breakpoints: `scrollY > 20` → scrolled, `scrollY > 80` → deep-scrolled.
|
|
177
|
+
|
|
178
|
+
### 2. Opacity Frost (card hover)
|
|
179
|
+
The card's glass becomes more opaque on hover — the primary hover behavior for all glass cards.
|
|
180
|
+
|
|
181
|
+
```css
|
|
182
|
+
.glass-card {
|
|
183
|
+
background: var(--glass-bg);
|
|
184
|
+
box-shadow: var(--shadow-sm), var(--shadow-inner);
|
|
185
|
+
transition: var(--transition-glass);
|
|
186
|
+
}
|
|
187
|
+
.glass-card:hover {
|
|
188
|
+
background: var(--glass-bg-hover);
|
|
189
|
+
box-shadow: var(--shadow-md), var(--shadow-inner);
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Duration: 200ms — fast enough to feel responsive, slow enough to feel smooth.
|
|
194
|
+
|
|
195
|
+
### 3. Glow Pulse (featured/highlighted elements)
|
|
196
|
+
Subtle accent glow pulsing for featured cards, stat heroes, and highlighted elements.
|
|
197
|
+
|
|
198
|
+
```css
|
|
199
|
+
@keyframes glow-pulse {
|
|
200
|
+
0%, 100% { box-shadow: var(--shadow-md), 0 0 20px rgba(124, 58, 237, 0.10); }
|
|
201
|
+
50% { box-shadow: var(--shadow-md), 0 0 40px rgba(124, 58, 237, 0.20); }
|
|
202
|
+
}
|
|
203
|
+
.glass-card--glow {
|
|
204
|
+
animation: glow-pulse 2s ease-in-out infinite;
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Use sparingly — only for the 1 "hero" element per screen. Not for every card.
|
|
209
|
+
|
|
210
|
+
### 4. Shimmer (skeleton loaders)
|
|
211
|
+
Gradient light sweeping across glass surface — the loading state for glass components.
|
|
212
|
+
|
|
213
|
+
```css
|
|
214
|
+
@keyframes shimmer {
|
|
215
|
+
to { transform: translateX(100%); }
|
|
216
|
+
}
|
|
217
|
+
.skeleton {
|
|
218
|
+
position: relative;
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
background: var(--glass-bg);
|
|
221
|
+
}
|
|
222
|
+
.skeleton::after {
|
|
223
|
+
content: '';
|
|
224
|
+
position: absolute;
|
|
225
|
+
inset: 0;
|
|
226
|
+
background: linear-gradient(
|
|
227
|
+
90deg,
|
|
228
|
+
transparent 0%,
|
|
229
|
+
rgba(255, 255, 255, 0.10) 50%,
|
|
230
|
+
transparent 100%
|
|
231
|
+
);
|
|
232
|
+
transform: translateX(-100%);
|
|
233
|
+
animation: shimmer 1.5s infinite;
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 5. Aurora Shift (animated background — landing only)
|
|
238
|
+
Very slow color hue shift on the aurora gradient background.
|
|
239
|
+
|
|
240
|
+
```css
|
|
241
|
+
@keyframes aurora-shift {
|
|
242
|
+
0% { filter: hue-rotate(0deg); }
|
|
243
|
+
50% { filter: hue-rotate(15deg); }
|
|
244
|
+
100% { filter: hue-rotate(0deg); }
|
|
245
|
+
}
|
|
246
|
+
body[data-aurora] {
|
|
247
|
+
animation: aurora-shift 10s ease-in-out infinite;
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Constraint: only use on landing pages. Never inside apps or dashboards. Keep cycle slow (8-12s). Intensity very low (max 20deg hue rotation).
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Stagger
|
|
256
|
+
|
|
257
|
+
When animating multiple cards into view simultaneously:
|
|
258
|
+
|
|
259
|
+
- **Delay per item**: 50ms (between warm-craft at 60ms and clean-saas at 40ms)
|
|
260
|
+
- **Maximum stagger group**: 6 items
|
|
261
|
+
- **Default animation**: `float-up` with staggered delay
|
|
262
|
+
- **Implementation**: CSS custom property or inline `animation-delay`
|
|
263
|
+
|
|
264
|
+
```css
|
|
265
|
+
.stagger-item:nth-child(1) { animation-delay: 0ms; }
|
|
266
|
+
.stagger-item:nth-child(2) { animation-delay: 50ms; }
|
|
267
|
+
.stagger-item:nth-child(3) { animation-delay: 100ms; }
|
|
268
|
+
.stagger-item:nth-child(4) { animation-delay: 150ms; }
|
|
269
|
+
.stagger-item:nth-child(5) { animation-delay: 200ms; }
|
|
270
|
+
.stagger-item:nth-child(6) { animation-delay: 250ms; }
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Hover States (summary)
|
|
276
|
+
|
|
277
|
+
| Element | Hover behavior | Duration |
|
|
278
|
+
|---------|---------------|----------|
|
|
279
|
+
| Glass Card | `glass-bg` → `glass-bg-hover` + `shadow-sm` → `shadow-md` | 200ms |
|
|
280
|
+
| Primary Button | `brightness(1.05)` + `shadow-sm` → `shadow-md` | 120ms |
|
|
281
|
+
| Glass Button | `glass-bg` → `glass-bg-hover` | 120ms |
|
|
282
|
+
| Nav items (sidebar) | `transparent` → `glass-bg-hover` | 150ms |
|
|
283
|
+
| Nav links (website) | `text-secondary` → `text-heading` | 150ms |
|
|
284
|
+
| Logo cloud | `grayscale opacity-50` → `color opacity-100` | 200ms |
|
|
285
|
+
| Links | underline opacity `0` → `1` | 150ms |
|
|
286
|
+
| Images in glass frame | `scale(1)` → `scale(1.02)` inside `overflow: hidden` | 300ms |
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Scroll Animations (websites only)
|
|
291
|
+
|
|
292
|
+
### Parallax Orbs
|
|
293
|
+
Background gradient orbs move at a slower rate than the scroll:
|
|
294
|
+
```css
|
|
295
|
+
/* Applied via JS with requestAnimationFrame */
|
|
296
|
+
.orb {
|
|
297
|
+
transform: translateY(calc(var(--scroll-y) * 0.3px));
|
|
298
|
+
}
|
|
299
|
+
```
|
|
300
|
+
Multiplier: 0.3-0.5 (orbs move at 30-50% of scroll speed).
|
|
301
|
+
|
|
302
|
+
### Section Reveal
|
|
303
|
+
Glass cards and sections fade up as they enter the viewport:
|
|
304
|
+
```javascript
|
|
305
|
+
const observer = new IntersectionObserver(
|
|
306
|
+
(entries) => entries.forEach(e => {
|
|
307
|
+
if (e.isIntersecting) e.target.classList.add('float-up');
|
|
308
|
+
}),
|
|
309
|
+
{ threshold: 0.1 }
|
|
310
|
+
);
|
|
311
|
+
document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
|
|
312
|
+
```
|
|
313
|
+
Threshold: 0.1 — triggers when 10% of element is visible.
|
|
314
|
+
|
|
315
|
+
### Nav Frost (scroll-triggered)
|
|
316
|
+
Navigation glass increases opacity as scroll position increases — see Blur Shift above.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Page Transitions
|
|
321
|
+
|
|
322
|
+
| Transition | In | Out |
|
|
323
|
+
|-----------|-----|-----|
|
|
324
|
+
| Route change (SPA) | `glass-fade-in` 350ms + `float-up` 350ms | `opacity` 0, 200ms |
|
|
325
|
+
| Modal open | `scale-materialize` 300ms | `opacity + scale(0.97)` 150ms |
|
|
326
|
+
| Bottom sheet open | `glass-slide-up` 350ms | `glass-slide-up` reversed 250ms |
|
|
327
|
+
| Tab content | `opacity 0→1` 200ms | `opacity 1→0` 150ms |
|
|
328
|
+
| Toast in | `glass-slide-up` 350ms | `opacity 1→0 + translateY(8px)` 200ms |
|
|
329
|
+
| Dropdown open | `scale-materialize` 200ms | `opacity 1→0 + scale(0.97)` 150ms |
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## Reduced Motion
|
|
334
|
+
|
|
335
|
+
**Mandatory**: always respect `prefers-reduced-motion: reduce`.
|
|
336
|
+
|
|
337
|
+
```css
|
|
338
|
+
@media (prefers-reduced-motion: reduce) {
|
|
339
|
+
*,
|
|
340
|
+
*::before,
|
|
341
|
+
*::after {
|
|
342
|
+
animation-duration: 0.01ms !important;
|
|
343
|
+
animation-iteration-count: 1 !important;
|
|
344
|
+
transition-duration: 0.01ms !important;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Specific overrides for glass:
|
|
350
|
+
- No animated shimmer on skeletons — use static `glass-bg`
|
|
351
|
+
- No `glow-pulse` — use static `shadow-glow`
|
|
352
|
+
- No `aurora-shift` — use static gradient
|
|
353
|
+
- No parallax orbs — orbs stay fixed
|
|
354
|
+
- Glass effects (blur, opacity, borders) remain — they are static visual properties, not animations
|
|
355
|
+
- Hover states: instant transitions (no 200ms transitions — snap immediately)
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Patterns — Glassmorphism UI
|
|
2
|
+
|
|
3
|
+
Page composition patterns for apps and dashboards. The substrate always comes first.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## The Substrate Rule
|
|
8
|
+
|
|
9
|
+
Every layout starts with the gradient background applied to the root container (body, html, or `#app`). This is the "glass substrate" — the gradient that makes the glass visible.
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
body {
|
|
13
|
+
min-height: 100vh;
|
|
14
|
+
background: var(--bg-gradient);
|
|
15
|
+
background-attachment: fixed; /* gradient stays fixed as content scrolls */
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`background-attachment: fixed` is recommended so the gradient doesn't scroll with the content. Cards will then float over a stable gradient substrate, which looks far more polished.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## App Shell
|
|
24
|
+
|
|
25
|
+
The standard layout for apps, dashboards, and admin panels.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
29
|
+
│ GRADIENT BACKGROUND (body, fixed attachment) │
|
|
30
|
+
│ │
|
|
31
|
+
│ ┌──────────────┐ ┌──────────────────────────────────────────┐ │
|
|
32
|
+
│ │ GLASS SIDEBAR│ │ GLASS TOP BAR (sticky, blur-lg) │ │
|
|
33
|
+
│ │ 256px │ │ Page title / breadcrumb + actions │ │
|
|
34
|
+
│ │ blur-lg │ ├──────────────────────────────────────────┤ │
|
|
35
|
+
│ │ border-right │ │ CONTENT AREA (padding 24px) │ │
|
|
36
|
+
│ │ glass-border │ │ │ │
|
|
37
|
+
│ │ │ │ Glass cards floating over │ │
|
|
38
|
+
│ │ Logo │ │ gradient substrate │ │
|
|
39
|
+
│ │ Nav groups │ │ │ │
|
|
40
|
+
│ │ Nav items │ │ │ │
|
|
41
|
+
│ │ │ │ │ │
|
|
42
|
+
│ │ User footer │ │ │ │
|
|
43
|
+
│ └──────────────┘ └──────────────────────────────────────────┘ │
|
|
44
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Key decisions:
|
|
48
|
+
- Sidebar: `position: fixed`, `backdrop-filter: blur(24px)` — gradient shows through
|
|
49
|
+
- Top bar: `position: sticky`, `top: 0`, `backdrop-filter: blur(24px)` — inside content area, not full width
|
|
50
|
+
- Content: `margin-left: 256px`, `padding: 24px`, `min-height: 100vh`
|
|
51
|
+
- Cards in content: glass cards with `backdrop-filter: blur(16px)` — 2nd glass layer over substrate
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Page Patterns
|
|
56
|
+
|
|
57
|
+
### 1. Dashboard Page
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Content layout (top to bottom):
|
|
61
|
+
├─ Page header: title + date range selector + export button
|
|
62
|
+
├─ Stat cards row: 4 glass stat cards, equal width, 24px gap
|
|
63
|
+
│ Each: metric label + large number (optionally gradient text) + trend badge
|
|
64
|
+
├─ Primary chart: full-width glass card, area/line chart with gradient fill
|
|
65
|
+
├─ Secondary row: 2 columns
|
|
66
|
+
│ Left (60%): detailed chart or data table (glass card)
|
|
67
|
+
│ Right (40%): donut/distribution chart or top-N list (glass card)
|
|
68
|
+
└─ Bottom section: glass table with full data
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Accent moments:
|
|
72
|
+
- Hero insight: 1 stat gets gradient text, slightly larger font
|
|
73
|
+
- Chart fills: accent gradient (violet → blue), semi-transparent area fills
|
|
74
|
+
- Table: glass card container, row hover with glass-bg-hover
|
|
75
|
+
|
|
76
|
+
### 2. Detail Page
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Content layout:
|
|
80
|
+
├─ Glass header card (radius-2xl): avatar/logo + name + status badge + action buttons
|
|
81
|
+
├─ Tab bar (glass strip): Properties / Activity / Settings / Relations
|
|
82
|
+
└─ Tab content (glass cards per section):
|
|
83
|
+
Properties: 2-column grid of label-value pairs
|
|
84
|
+
Activity: timeline list (glass card, items with glass-border dividers)
|
|
85
|
+
Settings: form groups in glass cards
|
|
86
|
+
Relations: linked records grid (mini glass cards)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 3. List Page
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Content layout:
|
|
93
|
+
├─ Glass filter bar (sticky): search input + filter chips + sort dropdown + count badge
|
|
94
|
+
├─ Glass table card (full width):
|
|
95
|
+
│ Header: sticky, border-bottom glass-border, column labels text-xs uppercase text-muted
|
|
96
|
+
│ Rows: 48px height, hover glass-bg-hover, checkbox left, actions on hover right
|
|
97
|
+
│ Inline actions: appear on row hover (ghost buttons: edit, view, delete)
|
|
98
|
+
└─ Glass pagination bar: page info + prev/next glass buttons + page size selector
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Scrolling: table scrolls horizontally on mobile (never collapses to cards — see anti-patterns).
|
|
102
|
+
|
|
103
|
+
### 4. Settings Page
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Content layout (two-column):
|
|
107
|
+
Left (240px): glass sub-navigation
|
|
108
|
+
├─ Nav groups: Profile / Security / Notifications / Billing / Integrations
|
|
109
|
+
└─ Glass sidebar style (blur-md, border-right glass-border)
|
|
110
|
+
Right (main): glass form cards per section
|
|
111
|
+
├─ Section card: glass card with section title + divider + form fields
|
|
112
|
+
├─ Form fields: labeled inputs, helper text, inline validation
|
|
113
|
+
└─ Save/cancel footer: sticky within card or at page bottom
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 5. Auth Page (login / signup / forgot password)
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Layout: full-viewport gradient background
|
|
120
|
+
Optional: 2-3 decorative gradient orbs (200-400px, absolute positioned, blur-xl, opacity 0.4)
|
|
121
|
+
|
|
122
|
+
Centered glass card (hero variant):
|
|
123
|
+
max-width: 420px
|
|
124
|
+
border-radius: var(--radius-3xl)
|
|
125
|
+
backdrop-filter: var(--glass-blur-lg)
|
|
126
|
+
padding: var(--space-10)
|
|
127
|
+
|
|
128
|
+
Inside:
|
|
129
|
+
Logo: 40px, centered, mb-8
|
|
130
|
+
Title: text-2xl weight-bold text-heading, centered
|
|
131
|
+
Subtitle: text-sm text-secondary, centered, mb-8
|
|
132
|
+
Form: email input + password input + forgot link
|
|
133
|
+
CTA: primary button full-width (accent-gradient)
|
|
134
|
+
Divider: "or continue with"
|
|
135
|
+
Social buttons: glass buttons (Google, GitHub, etc.)
|
|
136
|
+
Footer link: "Don't have an account? Sign up"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Orb placement example: top-right violet orb (300px), bottom-left blue orb (250px), centered faint pink orb (400px). All with extreme blur to look like soft light.
|
|
140
|
+
|
|
141
|
+
### 6. Onboarding (multi-step)
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Layout: full-viewport gradient background
|
|
145
|
+
|
|
146
|
+
Step progress (glass strip): centered at top
|
|
147
|
+
Step indicators: numbered circles (active: accent-gradient fill, completed: accent border + check, pending: glass-border)
|
|
148
|
+
Connector lines: glass-border, accent-gradient when completed
|
|
149
|
+
|
|
150
|
+
Centered glass card:
|
|
151
|
+
max-width: 560px, radius-3xl, blur-lg, padding-10
|
|
152
|
+
Inside:
|
|
153
|
+
Step title: text-2xl weight-bold
|
|
154
|
+
Step description: text-sm text-secondary
|
|
155
|
+
Step content: varies (form, selection grid, confirmation)
|
|
156
|
+
Navigation: back (ghost) + next (primary gradient) buttons
|
|
157
|
+
Step count: text-xs text-muted, centered below card
|
|
158
|
+
|
|
159
|
+
Background gradient shifts subtly between steps (hue rotation 10-15 degrees — very subtle).
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Responsive
|
|
165
|
+
|
|
166
|
+
### Breakpoints
|
|
167
|
+
- `< 768px`: mobile layout (bottom tab bar, no sidebar)
|
|
168
|
+
- `768px – 1024px`: tablet layout (collapsible sidebar or icon-only)
|
|
169
|
+
- `> 1024px`: desktop layout (full sidebar)
|
|
170
|
+
|
|
171
|
+
### Mobile layout
|
|
172
|
+
- Sidebar → **glass bottom tab bar** (not hamburger menu)
|
|
173
|
+
- Bottom tab bar: `position: fixed`, `bottom: 0`, `left: 0`, `right: 0`, `height: 64px`
|
|
174
|
+
- Glass surface: `background: var(--glass-bg-active)` + `backdrop-filter: var(--glass-blur-lg)`
|
|
175
|
+
- Border top: `1px solid var(--glass-border)`
|
|
176
|
+
- 4-5 icon + label tabs, active with accent color
|
|
177
|
+
- Safe area padding: `padding-bottom: env(safe-area-inset-bottom)` for iOS notch
|
|
178
|
+
|
|
179
|
+
### Glass adjustments by breakpoint
|
|
180
|
+
- Mobile: use `blur-sm` (8px) for cards (performance), `blur-md` (16px) only for bottom sheet
|
|
181
|
+
- Tablet: use `blur-md` (16px) for cards
|
|
182
|
+
- Desktop: full `blur-md` (16px) for cards, `blur-lg` (24px) for sidebar/nav
|
|
183
|
+
|
|
184
|
+
### Background gradient on mobile
|
|
185
|
+
Simplify to 2-3 color stops (fewer is faster):
|
|
186
|
+
```css
|
|
187
|
+
@media (max-width: 768px) {
|
|
188
|
+
body {
|
|
189
|
+
background: linear-gradient(135deg, #F0EEF6 0%, #D8E0F0 100%);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Content adjustments
|
|
195
|
+
- Stat cards: 2 columns on mobile (instead of 4)
|
|
196
|
+
- Tables: horizontal scroll (never collapse to card list)
|
|
197
|
+
- Sidebar hidden on mobile, accessible via bottom tab bar
|
|
198
|
+
- Modal: full-screen on mobile with `border-radius: radius-3xl radius-3xl 0 0` and slides up
|