@gradeui/ui 3.2.0 → 4.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/button.md +6 -4
- package/components/ui/color-picker.md +34 -0
- package/components/ui/fill-picker.md +7 -3
- package/components/ui/gradient-editor.md +30 -0
- package/components/ui/media-surface.md +1 -1
- package/components/ui/section.md +52 -0
- package/components/ui/swatch.md +5 -2
- package/components/ui/toggle-group.md +21 -4
- package/dist/composer.d.mts +262 -0
- package/dist/composer.d.ts +262 -0
- package/dist/composer.js +3 -0
- package/dist/composer.js.map +1 -0
- package/dist/composer.mjs +3 -0
- package/dist/composer.mjs.map +1 -0
- 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 +221 -331
- package/dist/index.d.ts +221 -331
- package/dist/index.js +82 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -82
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types-DUwnWaxR.d.mts +43 -0
- package/dist/types-DUwnWaxR.d.ts +43 -0
- package/package.json +6 -1
- package/styles/globals.css +593 -15
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types + presets for scripted component demos.
|
|
3
|
+
*
|
|
4
|
+
* Lives at the bottom of the demo primitive stack so the hook, the
|
|
5
|
+
* cursor, and any component that opts in (`<Code>`, `<Composer>`,
|
|
6
|
+
* `<DemoStage>`) all read from one definition of "what slow / normal /
|
|
7
|
+
* fast feels like" and one definition of "when do we start playing".
|
|
8
|
+
*
|
|
9
|
+
* If you ever want to retune the cadence of every demo on the marketing
|
|
10
|
+
* site at once, this is the file to edit.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Animation feel. Maps onto a triple of timing values so authors can
|
|
14
|
+
* pick a vibe (slow / normal / fast) instead of hand-tuning ms.
|
|
15
|
+
* Components that need finer control can still override the resolved
|
|
16
|
+
* values per-instance.
|
|
17
|
+
*/
|
|
18
|
+
type DemoSpeed = "slow" | "normal" | "fast";
|
|
19
|
+
/**
|
|
20
|
+
* What kicks the demo off:
|
|
21
|
+
* - `mount` plays immediately on first paint
|
|
22
|
+
* - `inView` waits for the container to cross the viewport threshold
|
|
23
|
+
* - `manual` driven by the `play` prop or imperative ref
|
|
24
|
+
*/
|
|
25
|
+
type DemoTrigger = "mount" | "inView" | "manual";
|
|
26
|
+
/**
|
|
27
|
+
* Speed presets shared across every scripted-demo surface. Three
|
|
28
|
+
* unambiguously distinct feels: `slow` is "I am being shown", `normal`
|
|
29
|
+
* is "I am being told", `fast` is "I am being briefed".
|
|
30
|
+
*
|
|
31
|
+
* - `tokenStagger` per-character cadence for typing-style steps
|
|
32
|
+
* - `lineStagger` per-line cadence for reveal-style demos
|
|
33
|
+
* - `preDelay` pause after the trigger fires before the first tick
|
|
34
|
+
* - `fadeMs` default enter-transition duration for revealed parts
|
|
35
|
+
*/
|
|
36
|
+
declare const DEMO_SPEED_PRESETS: Record<DemoSpeed, {
|
|
37
|
+
tokenStagger: number;
|
|
38
|
+
lineStagger: number;
|
|
39
|
+
preDelay: number;
|
|
40
|
+
fadeMs: number;
|
|
41
|
+
}>;
|
|
42
|
+
|
|
43
|
+
export { DEMO_SPEED_PRESETS as D, type DemoSpeed as a, type DemoTrigger as b };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types + presets for scripted component demos.
|
|
3
|
+
*
|
|
4
|
+
* Lives at the bottom of the demo primitive stack so the hook, the
|
|
5
|
+
* cursor, and any component that opts in (`<Code>`, `<Composer>`,
|
|
6
|
+
* `<DemoStage>`) all read from one definition of "what slow / normal /
|
|
7
|
+
* fast feels like" and one definition of "when do we start playing".
|
|
8
|
+
*
|
|
9
|
+
* If you ever want to retune the cadence of every demo on the marketing
|
|
10
|
+
* site at once, this is the file to edit.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Animation feel. Maps onto a triple of timing values so authors can
|
|
14
|
+
* pick a vibe (slow / normal / fast) instead of hand-tuning ms.
|
|
15
|
+
* Components that need finer control can still override the resolved
|
|
16
|
+
* values per-instance.
|
|
17
|
+
*/
|
|
18
|
+
type DemoSpeed = "slow" | "normal" | "fast";
|
|
19
|
+
/**
|
|
20
|
+
* What kicks the demo off:
|
|
21
|
+
* - `mount` plays immediately on first paint
|
|
22
|
+
* - `inView` waits for the container to cross the viewport threshold
|
|
23
|
+
* - `manual` driven by the `play` prop or imperative ref
|
|
24
|
+
*/
|
|
25
|
+
type DemoTrigger = "mount" | "inView" | "manual";
|
|
26
|
+
/**
|
|
27
|
+
* Speed presets shared across every scripted-demo surface. Three
|
|
28
|
+
* unambiguously distinct feels: `slow` is "I am being shown", `normal`
|
|
29
|
+
* is "I am being told", `fast` is "I am being briefed".
|
|
30
|
+
*
|
|
31
|
+
* - `tokenStagger` per-character cadence for typing-style steps
|
|
32
|
+
* - `lineStagger` per-line cadence for reveal-style demos
|
|
33
|
+
* - `preDelay` pause after the trigger fires before the first tick
|
|
34
|
+
* - `fadeMs` default enter-transition duration for revealed parts
|
|
35
|
+
*/
|
|
36
|
+
declare const DEMO_SPEED_PRESETS: Record<DemoSpeed, {
|
|
37
|
+
tokenStagger: number;
|
|
38
|
+
lineStagger: number;
|
|
39
|
+
preDelay: number;
|
|
40
|
+
fadeMs: number;
|
|
41
|
+
}>;
|
|
42
|
+
|
|
43
|
+
export { DEMO_SPEED_PRESETS as D, type DemoSpeed as a, type DemoTrigger as b };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradeui/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Grade Design System — React components, theme engine, and design tokens",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -67,6 +67,11 @@
|
|
|
67
67
|
"import": "./dist/contracts.mjs",
|
|
68
68
|
"require": "./dist/contracts.js"
|
|
69
69
|
},
|
|
70
|
+
"./composer": {
|
|
71
|
+
"types": "./dist/composer.d.ts",
|
|
72
|
+
"import": "./dist/composer.mjs",
|
|
73
|
+
"require": "./dist/composer.js"
|
|
74
|
+
},
|
|
70
75
|
"./map/maplibre": {
|
|
71
76
|
"types": "./dist/map/maplibre.d.ts",
|
|
72
77
|
"import": "./dist/map/maplibre.mjs",
|