@timbal-ai/timbal-react 1.4.0 → 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/CHANGELOG.md +30 -0
- package/README.md +43 -4
- package/dist/app.cjs +3770 -1506
- package/dist/app.d.cts +76 -31
- package/dist/app.d.ts +76 -31
- package/dist/app.esm.js +30 -8
- package/dist/{chart-artifact-C8-Py6lc.d.cts → chart-artifact-C2pZQsaP.d.ts} +247 -41
- package/dist/{chart-artifact-CMnDys2t.d.ts → chart-artifact-VAqgH-My.d.cts} +247 -41
- package/dist/{chat-ClmzWzCX.d.cts → chat-DDsp-Vzz.d.cts} +1 -1
- package/dist/{chat-ClmzWzCX.d.ts → chat-DDsp-Vzz.d.ts} +1 -1
- package/dist/chat.cjs +280 -123
- package/dist/chat.d.cts +3 -3
- package/dist/chat.d.ts +3 -3
- package/dist/chat.esm.js +4 -3
- package/dist/chunk-24B4I4XC.esm.js +232 -0
- package/dist/{chunk-VOWNCS3F.esm.js → chunk-6SQMTBPL.esm.js} +1669 -504
- package/dist/chunk-EDEKQYSU.esm.js +10 -0
- package/dist/{chunk-QIABF4KB.esm.js → chunk-ELEY66OH.esm.js} +2 -2
- package/dist/{chunk-THBA27QY.esm.js → chunk-HSL36SJ4.esm.js} +243 -124
- package/dist/chunk-JJOO4PR5.esm.js +391 -0
- package/dist/{chunk-QU7ET55D.esm.js → chunk-MBS7XHV2.esm.js} +335 -192
- package/dist/chunk-NO5AWNWT.esm.js +1066 -0
- package/dist/{chunk-VXMM2HX7.esm.js → chunk-R4RQT2XQ.esm.js} +3 -3
- package/dist/{chunk-OFWC4MIY.esm.js → chunk-TMP7RIA7.esm.js} +5 -3
- package/dist/{chunk-GQBYZRD7.esm.js → chunk-WQIQW7EM.esm.js} +40 -28
- package/dist/{chunk-OH23AX2V.esm.js → chunk-YYEI6XME.esm.js} +441 -957
- package/dist/{circular-progress-Ci8L-Hfa.d.cts → circular-progress-B9nnwzCu.d.cts} +20 -78
- package/dist/{circular-progress-Ci8L-Hfa.d.ts → circular-progress-B9nnwzCu.d.ts} +20 -78
- package/dist/index.cjs +5547 -3192
- package/dist/index.d.cts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.esm.js +76 -44
- package/dist/kanban-FFBeaZPS.d.cts +212 -0
- package/dist/kanban-FFBeaZPS.d.ts +212 -0
- package/dist/{layout-BTJyU8wd.d.ts → layout-CuKeSY74.d.ts} +1 -1
- package/dist/{layout-C2G-FcER.d.cts → layout-PzVwkJyL.d.cts} +1 -1
- package/dist/site.cjs +429 -0
- package/dist/site.d.cts +198 -0
- package/dist/site.d.ts +198 -0
- package/dist/site.esm.js +23 -0
- package/dist/studio.cjs +722 -363
- package/dist/studio.d.cts +2 -2
- package/dist/studio.d.ts +2 -2
- package/dist/studio.esm.js +8 -6
- package/dist/styles.css +56 -0
- package/dist/{timbal-v2-button-CNfdwGq4.d.cts → timbal-v2-button-DCAZNyUx.d.cts} +3 -3
- package/dist/{timbal-v2-button-CNfdwGq4.d.ts → timbal-v2-button-DCAZNyUx.d.ts} +3 -3
- package/dist/ui.cjs +1553 -708
- package/dist/ui.d.cts +11 -4
- package/dist/ui.d.ts +11 -4
- package/dist/ui.esm.js +45 -36
- package/dist/{welcome-DXqsGTwH.d.ts → welcome-B00oH5Io.d.cts} +5 -1
- package/dist/{welcome-BFGRoNfK.d.cts → welcome-DU-4NTjZ.d.ts} +5 -1
- package/package.json +9 -1
- package/dist/button-BoyX5pM_.d.cts +0 -18
- package/dist/button-BoyX5pM_.d.ts +0 -18
- package/dist/chunk-UCGVL7ZY.esm.js +0 -52
package/dist/site.d.ts
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
/** Entrance styles. `mask-up` clips the child and slides it in from below. */
|
|
5
|
+
type RevealVariant = "fade" | "fade-up" | "fade-down" | "fade-left" | "fade-right" | "blur" | "scale" | "mask-up";
|
|
6
|
+
interface RevealProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
7
|
+
/** Entrance style. Default `fade-up`. */
|
|
8
|
+
variant?: RevealVariant;
|
|
9
|
+
/** Seconds before the animation starts. */
|
|
10
|
+
delay?: number;
|
|
11
|
+
/** Animation duration in seconds. Default {@link DURATION.base}. */
|
|
12
|
+
duration?: number;
|
|
13
|
+
/** Slide distance in px for the directional + mask variants. Default 28. */
|
|
14
|
+
distance?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Fraction of the element that must be visible before it animates (0–1), or
|
|
17
|
+
* `"some"` / `"all"`. Default 0.3.
|
|
18
|
+
*/
|
|
19
|
+
amount?: number | "some" | "all";
|
|
20
|
+
/** Replay every time the element re-enters the viewport. Default `false`. */
|
|
21
|
+
repeat?: boolean;
|
|
22
|
+
/** Render as a different intrinsic element (e.g. `"section"`, `"li"`). */
|
|
23
|
+
as?: keyof React.JSX.IntrinsicElements;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Reveal a block when it scrolls into view. Honours `prefers-reduced-motion`
|
|
28
|
+
* (renders immediately, no transform) and SSR (no layout shift — the element
|
|
29
|
+
* occupies its space from first paint).
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <Reveal variant="fade-up" delay={0.1}>
|
|
33
|
+
* <h2>Built for the long run</h2>
|
|
34
|
+
* </Reveal>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare const Reveal: React.ForwardRefExoticComponent<RevealProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
|
|
39
|
+
interface TextRevealProps extends Omit<React.ComponentPropsWithoutRef<"span">, "children"> {
|
|
40
|
+
/** The text to reveal. Plain string only (split into tokens internally). */
|
|
41
|
+
children: string;
|
|
42
|
+
/** Split granularity. `words` (default) animates word-by-word; `lines` splits on `\n`. */
|
|
43
|
+
splitBy?: "words" | "lines";
|
|
44
|
+
/** Seconds between each token's entrance. Default 0.06. */
|
|
45
|
+
stagger?: number;
|
|
46
|
+
/** Seconds before the first token animates. Default 0. */
|
|
47
|
+
delay?: number;
|
|
48
|
+
/** Per-token duration in seconds. Default {@link DURATION.base}. */
|
|
49
|
+
duration?: number;
|
|
50
|
+
/** Replay every time it re-enters the viewport. Default `false`. */
|
|
51
|
+
repeat?: boolean;
|
|
52
|
+
/** Visibility fraction before animating (0–1). Default 0.4. */
|
|
53
|
+
amount?: number;
|
|
54
|
+
/** Render the wrapper as a block-level heading element instead of an inline span. */
|
|
55
|
+
as?: "span" | "h1" | "h2" | "h3" | "h4" | "p";
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Reveal text token-by-token with a masked slide-up — the signature
|
|
59
|
+
* editorial/luxury headline entrance. Each word (or line) rides up out of an
|
|
60
|
+
* `overflow-hidden` clip on a stagger. Collapses to static text under
|
|
61
|
+
* `prefers-reduced-motion`.
|
|
62
|
+
*
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <TextReveal as="h1" className="text-6xl font-semibold" stagger={0.08}>
|
|
65
|
+
* Every step forward
|
|
66
|
+
* </TextReveal>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare function TextReveal({ children, splitBy, stagger, delay, duration, repeat, amount, as, className, ...rest }: TextRevealProps): react_jsx_runtime.JSX.Element;
|
|
70
|
+
|
|
71
|
+
interface ParallaxProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
72
|
+
/**
|
|
73
|
+
* Parallax strength. Positive values drift the element *slower* than scroll
|
|
74
|
+
* (it lags behind); negative values push it ahead. Roughly the fraction of
|
|
75
|
+
* the element's travel to offset. Sensible range -0.6…0.6. Default 0.2.
|
|
76
|
+
*/
|
|
77
|
+
speed?: number;
|
|
78
|
+
/** Axis to translate along. Default `"y"`. */
|
|
79
|
+
axis?: "x" | "y";
|
|
80
|
+
/** Smooth the motion with a spring (avoids jitter on fast scroll). Default `true`. */
|
|
81
|
+
smooth?: boolean;
|
|
82
|
+
children?: React.ReactNode;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Translate a layer relative to scroll for depth. Drives off the element's own
|
|
86
|
+
* position in the viewport (no global scroll listener), so multiple parallax
|
|
87
|
+
* layers compose cheaply. No-op under `prefers-reduced-motion`.
|
|
88
|
+
*
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <Parallax speed={0.3}>
|
|
91
|
+
* <img src={hero} alt="" className="h-full w-full object-cover" />
|
|
92
|
+
* </Parallax>
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
declare const Parallax: React.ForwardRefExoticComponent<ParallaxProps & React.RefAttributes<HTMLDivElement>>;
|
|
96
|
+
|
|
97
|
+
interface MarqueeProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
98
|
+
/** Scroll speed in px/second. Default 60. */
|
|
99
|
+
speed?: number;
|
|
100
|
+
/** Travel direction. Default `"left"`. */
|
|
101
|
+
direction?: "left" | "right";
|
|
102
|
+
/** Pause while hovered. Default `true`. */
|
|
103
|
+
pauseOnHover?: boolean;
|
|
104
|
+
/** Gap between the repeated content groups (any CSS length). Default `"3rem"`. */
|
|
105
|
+
gap?: string;
|
|
106
|
+
children?: React.ReactNode;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Seamless infinite marquee. Duplicates its children and advances a single
|
|
110
|
+
* motion value per frame, wrapping at the content width so there is no visible
|
|
111
|
+
* seam. Frame-rate independent (uses elapsed delta). Renders a static,
|
|
112
|
+
* horizontally-scrollable row under `prefers-reduced-motion`.
|
|
113
|
+
*
|
|
114
|
+
* ```tsx
|
|
115
|
+
* <Marquee speed={40} className="py-6">
|
|
116
|
+
* {logos.map((l) => <img key={l.id} src={l.src} alt={l.name} className="h-8" />)}
|
|
117
|
+
* </Marquee>
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
declare const Marquee: React.ForwardRefExoticComponent<MarqueeProps & React.RefAttributes<HTMLDivElement>>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Shared motion tokens for the expressive `/site` layer.
|
|
124
|
+
*
|
|
125
|
+
* These are deliberately *opinionated but restrained* — the defaults produce
|
|
126
|
+
* the kind of confident, weighted motion seen on award-tier marketing sites
|
|
127
|
+
* (slow-out cubic-bezier, ~0.7–1s durations) rather than the snappy 150ms
|
|
128
|
+
* micro-interactions the app kit favours. Override per-component when a brief
|
|
129
|
+
* calls for it.
|
|
130
|
+
*/
|
|
131
|
+
/** Cubic-bezier easings as `[x1, y1, x2, y2]` tuples (motion's `ease` format). */
|
|
132
|
+
declare const EASE: {
|
|
133
|
+
/** Strong slow-out — the workhorse for entrances and reveals. */
|
|
134
|
+
readonly out: readonly [0.16, 1, 0.3, 1];
|
|
135
|
+
/** Symmetric in-out for loops and continuous motion. */
|
|
136
|
+
readonly inOut: readonly [0.65, 0, 0.35, 1];
|
|
137
|
+
/** Gentle in-out, good for parallax / large translations. */
|
|
138
|
+
readonly soft: readonly [0.4, 0, 0.2, 1];
|
|
139
|
+
};
|
|
140
|
+
/** Default durations (seconds) for the expressive layer. */
|
|
141
|
+
declare const DURATION: {
|
|
142
|
+
readonly fast: 0.4;
|
|
143
|
+
readonly base: 0.7;
|
|
144
|
+
readonly slow: 1.1;
|
|
145
|
+
};
|
|
146
|
+
/** Spring presets for pointer-driven motion (Magnetic, etc.). */
|
|
147
|
+
declare const SPRING: {
|
|
148
|
+
/** Tight, responsive follow. */
|
|
149
|
+
readonly snappy: {
|
|
150
|
+
readonly stiffness: 350;
|
|
151
|
+
readonly damping: 30;
|
|
152
|
+
readonly mass: 0.4;
|
|
153
|
+
};
|
|
154
|
+
/** Looser, more elastic follow. */
|
|
155
|
+
readonly smooth: {
|
|
156
|
+
readonly stiffness: 150;
|
|
157
|
+
readonly damping: 20;
|
|
158
|
+
readonly mass: 0.6;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
interface MagneticProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
163
|
+
/** How far the element follows the pointer, as a fraction of the cursor offset. Default 0.35. */
|
|
164
|
+
strength?: number;
|
|
165
|
+
/** Max travel in px in any direction (clamps `strength` on large elements). Default 24. */
|
|
166
|
+
max?: number;
|
|
167
|
+
/** Spring feel. Default `"snappy"`. */
|
|
168
|
+
spring?: keyof typeof SPRING;
|
|
169
|
+
children?: React.ReactNode;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Make a child element drift toward the cursor while hovered, springing back
|
|
173
|
+
* on leave — the classic "magnetic" CTA / nav affordance. Wrap a single
|
|
174
|
+
* interactive child (button, link). No-op under `prefers-reduced-motion`.
|
|
175
|
+
*
|
|
176
|
+
* ```tsx
|
|
177
|
+
* <Magnetic strength={0.4}>
|
|
178
|
+
* <Button>Shop the drop</Button>
|
|
179
|
+
* </Magnetic>
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
declare const Magnetic: React.ForwardRefExoticComponent<MagneticProps & React.RefAttributes<HTMLDivElement>>;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Copy-paste into a workforce agent system prompt (or codegen tool context) so
|
|
186
|
+
* the model knows which expressive `/site` motion primitives exist and how to
|
|
187
|
+
* dose them — without turning every page into a motion demo.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```ts
|
|
191
|
+
* import { SITE_AGENT_INSTRUCTIONS } from "@timbal-ai/timbal-react/site";
|
|
192
|
+
*
|
|
193
|
+
* const systemPrompt = `${basePrompt}\n\n${SITE_AGENT_INSTRUCTIONS}`;
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
declare const SITE_AGENT_INSTRUCTIONS: string;
|
|
197
|
+
|
|
198
|
+
export { DURATION, EASE, Magnetic, type MagneticProps, Marquee, type MarqueeProps, Parallax, type ParallaxProps, Reveal, type RevealProps, type RevealVariant, SITE_AGENT_INSTRUCTIONS, SPRING, TextReveal, type TextRevealProps };
|
package/dist/site.esm.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DURATION,
|
|
3
|
+
EASE,
|
|
4
|
+
Magnetic,
|
|
5
|
+
Marquee,
|
|
6
|
+
Parallax,
|
|
7
|
+
Reveal,
|
|
8
|
+
SITE_AGENT_INSTRUCTIONS,
|
|
9
|
+
SPRING,
|
|
10
|
+
TextReveal
|
|
11
|
+
} from "./chunk-JJOO4PR5.esm.js";
|
|
12
|
+
import "./chunk-EDEKQYSU.esm.js";
|
|
13
|
+
export {
|
|
14
|
+
DURATION,
|
|
15
|
+
EASE,
|
|
16
|
+
Magnetic,
|
|
17
|
+
Marquee,
|
|
18
|
+
Parallax,
|
|
19
|
+
Reveal,
|
|
20
|
+
SITE_AGENT_INSTRUCTIONS,
|
|
21
|
+
SPRING,
|
|
22
|
+
TextReveal
|
|
23
|
+
};
|