@gradeui/ui 1.2.0 → 2.0.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/components/ui/background-fill.md +135 -0
- package/components/ui/checkbox-card.md +43 -0
- package/components/ui/checkbox.md +2 -2
- package/components/ui/dropdown-menu.md +2 -0
- package/components/ui/field.md +26 -0
- package/components/ui/fill-picker.md +36 -0
- package/components/ui/input.md +27 -2
- package/components/ui/label.md +2 -1
- package/components/ui/logo.md +59 -0
- package/components/ui/message.md +34 -0
- package/components/ui/radio-card.md +41 -0
- package/components/ui/radio-group.md +2 -2
- package/components/ui/screen-animator.md +54 -0
- package/components/ui/select.md +16 -4
- package/components/ui/switch-card.md +30 -0
- package/components/ui/switch.md +2 -2
- package/components/ui/textarea.md +2 -1
- package/components/ui/three-scene.md +22 -1
- package/dist/contracts.js +6 -6
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +6 -6
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +703 -42
- package/dist/index.d.ts +703 -42
- package/dist/index.js +90 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +90 -56
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -1
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/tailwind-preset.mjs +1 -1
- package/dist/tailwind-preset.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ThreeScene
|
|
3
3
|
import: "@gradeui/ui"
|
|
4
4
|
props:
|
|
5
|
-
- preset?: "space" | "plasma" | "voronoi" | "synthwave" — shader preset id from the registry
|
|
5
|
+
- preset?: "mesh" | "waves" | "space" | "plasma" | "voronoi" | "synthwave" — shader preset id from the registry
|
|
6
6
|
- fragmentShader?: string — user-authored GLSL body; takes precedence over preset
|
|
7
7
|
- onShaderError?: (error: ShaderCompileError) => void — fires on compile failure; scene falls back to `preset="space"`
|
|
8
8
|
- postPreset?: "none" | "vhs" | "cinematic" | "synthwave" | "crt" (default "vhs") — post-processing pass
|
|
@@ -23,6 +23,8 @@ notes: |
|
|
|
23
23
|
## Path 1 — `preset` (pick one, fastest, highest quality)
|
|
24
24
|
|
|
25
25
|
Valid `preset` ids (complete list — do NOT invent any others):
|
|
26
|
+
- "mesh" — smooth moving blobs of primary/secondary/accent over the background; soft, theme-reactive. THE default soft background. Default post: "none".
|
|
27
|
+
- "waves" — flowing banded ribbons rippling across the surface; clean motion for headers/heroes. Default post: "none".
|
|
26
28
|
- "space" — Hyperspace starfield, streaking stars. Default post: "vhs".
|
|
27
29
|
- "plasma" — soft rolling colour clouds, ambient/abstract. Default post: "synthwave".
|
|
28
30
|
- "voronoi" — jittered cellular grid with glowing edges. Default post: "crt".
|
|
@@ -118,6 +120,25 @@ notes: |
|
|
|
118
120
|
## Fullscreen backgrounds
|
|
119
121
|
|
|
120
122
|
Surface defaults to `aspect="video"` (16:9). For a full-bleed hero background using `className="absolute inset-0"`, ALWAYS also pass `aspect="auto"` — otherwise the aspect-ratio constraint fights the absolute positioning and you get letterboxing.
|
|
123
|
+
|
|
124
|
+
## Layering & tweakable params (direction)
|
|
125
|
+
|
|
126
|
+
Shaders are composable, not monolithic. A rendered visual is a BASE
|
|
127
|
+
layer (the generative scene — gradient, dots, waves, space…) plus a
|
|
128
|
+
stack of EFFECT layers applied on top (grain, dither, vignette,
|
|
129
|
+
chromatic…). This is the same model as the post-FX composer — an
|
|
130
|
+
effect is independent of the base it sits over, so e.g. `grain`
|
|
131
|
+
applies to ALL bases (mix-and-match).
|
|
132
|
+
|
|
133
|
+
Every layer — base and effect — declares a `params: ParamSpec[]`
|
|
134
|
+
schema (see lib/three/types.ts): `range` (slider + number),
|
|
135
|
+
`segmented`, `select`, `toggle`, `color`, `colorList`. A param's
|
|
136
|
+
`key` doubles as the GLSL uniform name, so values map to uniforms
|
|
137
|
+
generically. The same `ParamSpec` shape is what a controls panel
|
|
138
|
+
renders from — the Paper-style "Presets + sliders + swatches" panel —
|
|
139
|
+
and is the canonical "this section is a form" descriptor shared with
|
|
140
|
+
the inspector controls kit (Input slots, sized Select, segmented
|
|
141
|
+
control, slider+number).
|
|
121
142
|
---
|
|
122
143
|
|
|
123
144
|
```jsx
|