@timbal-ai/timbal-react 1.3.0 → 1.5.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 (53) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +28 -4
  3. package/dist/app.cjs +3610 -1489
  4. package/dist/app.d.cts +75 -30
  5. package/dist/app.d.ts +75 -30
  6. package/dist/app.esm.js +29 -7
  7. package/dist/{chart-artifact-Q5QgMtbj.d.ts → chart-artifact-2OTDTRwM.d.ts} +212 -41
  8. package/dist/{chart-artifact-WDEW9dHT.d.cts → chart-artifact-CS3qyGIY.d.cts} +212 -41
  9. package/dist/chat.cjs +264 -107
  10. package/dist/chat.d.cts +2 -2
  11. package/dist/chat.d.ts +2 -2
  12. package/dist/chat.esm.js +4 -3
  13. package/dist/chunk-5ECRZ5O7.esm.js +899 -0
  14. package/dist/{chunk-QU7ET55D.esm.js → chunk-AZL2WANO.esm.js} +320 -177
  15. package/dist/{chunk-OH23AX2V.esm.js → chunk-B4XAC4G7.esm.js} +430 -780
  16. package/dist/chunk-EDEKQYSU.esm.js +10 -0
  17. package/dist/{chunk-GQBYZRD7.esm.js → chunk-IGHBLJV3.esm.js} +38 -27
  18. package/dist/{chunk-OFWC4MIY.esm.js → chunk-JYDJRGDE.esm.js} +5 -3
  19. package/dist/{chunk-YCXN67SD.esm.js → chunk-SZDYIRMB.esm.js} +1639 -490
  20. package/dist/chunk-TZI3ID3C.esm.js +232 -0
  21. package/dist/{chunk-THBA27QY.esm.js → chunk-WMKPT5BV.esm.js} +242 -123
  22. package/dist/{chunk-VXMM2HX7.esm.js → chunk-ZNYAETFD.esm.js} +1 -1
  23. package/dist/{circular-progress-Ci8L-Hfa.d.cts → circular-progress-CDsJwIPF.d.cts} +19 -77
  24. package/dist/{circular-progress-Ci8L-Hfa.d.ts → circular-progress-CDsJwIPF.d.ts} +19 -77
  25. package/dist/index.cjs +5564 -3612
  26. package/dist/index.d.cts +7 -6
  27. package/dist/index.d.ts +7 -6
  28. package/dist/index.esm.js +45 -33
  29. package/dist/kanban-U5xNe9py.d.cts +212 -0
  30. package/dist/kanban-U5xNe9py.d.ts +212 -0
  31. package/dist/{layout-BTJyU8wd.d.ts → layout-B8r6Jbat.d.ts} +1 -1
  32. package/dist/{layout-C2G-FcER.d.cts → layout-Cu7Ijn04.d.cts} +1 -1
  33. package/dist/site.cjs +358 -0
  34. package/dist/site.d.cts +184 -0
  35. package/dist/site.d.ts +184 -0
  36. package/dist/site.esm.js +322 -0
  37. package/dist/studio.cjs +702 -343
  38. package/dist/studio.d.cts +1 -1
  39. package/dist/studio.d.ts +1 -1
  40. package/dist/studio.esm.js +7 -5
  41. package/dist/styles.css +56 -0
  42. package/dist/{timbal-v2-button-CNfdwGq4.d.cts → timbal-v2-button-B7vPs7gg.d.cts} +2 -2
  43. package/dist/{timbal-v2-button-CNfdwGq4.d.ts → timbal-v2-button-B7vPs7gg.d.ts} +2 -2
  44. package/dist/ui.cjs +1504 -659
  45. package/dist/ui.d.cts +11 -4
  46. package/dist/ui.d.ts +11 -4
  47. package/dist/ui.esm.js +35 -26
  48. package/dist/{welcome-DXqsGTwH.d.ts → welcome-DduQAC4K.d.ts} +4 -0
  49. package/dist/{welcome-BFGRoNfK.d.cts → welcome-NXZlcihe.d.cts} +4 -0
  50. package/package.json +9 -1
  51. package/dist/button-BoyX5pM_.d.cts +0 -18
  52. package/dist/button-BoyX5pM_.d.ts +0 -18
  53. package/dist/chunk-UCGVL7ZY.esm.js +0 -52
@@ -0,0 +1,212 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import { Avatar as Avatar$1 } from 'radix-ui';
6
+ import { DraggableAttributes } from '@dnd-kit/core';
7
+
8
+ type ButtonColor = "primary" | "secondary" | "tertiary" | "link" | "primary-destructive" | "secondary-destructive";
9
+ declare const buttonVariants: (props?: ({
10
+ color?: "primary" | "secondary" | "link" | "tertiary" | "primary-destructive" | "secondary-destructive" | null | undefined;
11
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
12
+ shape?: "pill" | "rounded" | null | undefined;
13
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
14
+ interface ButtonProps extends Omit<React.ComponentProps<"button">, "color" | "size">, VariantProps<typeof buttonVariants> {
15
+ /** Legacy variant prop for compatibility. Maps onto color variants. */
16
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "informative";
17
+ /** Untitled UI-style color alias. Takes precedence over `variant` when set. */
18
+ color?: ButtonColor;
19
+ /** Icon rendered before the label. Ignored when `asChild` is set. */
20
+ iconLeading?: React.ReactNode;
21
+ /** Icon rendered after the label. Ignored when `asChild` is set. */
22
+ iconTrailing?: React.ReactNode;
23
+ /** Show a spinner and make the button non-interactive. */
24
+ isLoading?: boolean;
25
+ /** Merge props onto the single child element (Radix Slot) — for links. */
26
+ asChild?: boolean;
27
+ }
28
+ declare function Button({ className, variant, color, size, shape, iconLeading, iconTrailing, isLoading, asChild, disabled, type, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
29
+
30
+ type UntitledButtonColor = "primary" | "secondary" | "tertiary" | "link" | "primary-destructive" | "secondary-destructive";
31
+ type UntitledButtonSize = "sm" | "md" | "lg" | "xl";
32
+ declare const untitledButtonVariants: (props?: ({
33
+ color?: "primary" | "secondary" | "link" | "tertiary" | "primary-destructive" | "secondary-destructive" | null | undefined;
34
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
35
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
36
+ interface UntitledButtonProps extends Omit<React.ComponentProps<"button">, "color">, VariantProps<typeof untitledButtonVariants> {
37
+ /** Icon rendered before the label. Ignored when `asChild` is set. */
38
+ iconLeading?: React.ReactNode;
39
+ /** Icon rendered after the label. Ignored when `asChild` is set. */
40
+ iconTrailing?: React.ReactNode;
41
+ /** Show a spinner and make the button non-interactive. */
42
+ isLoading?: boolean;
43
+ /** Merge props onto the single child element (Radix Slot) — for links. */
44
+ asChild?: boolean;
45
+ }
46
+ declare function UntitledButton({ className, color, size, iconLeading, iconTrailing, isLoading, asChild, disabled, type, children, ...props }: UntitledButtonProps): react_jsx_runtime.JSX.Element;
47
+
48
+ type AvatarVariant = "muted" | "secondary" | "primary" | "chart";
49
+ /**
50
+ * Action-button chrome for initials — matches `Button variant="secondary"` (elevated
51
+ * gradient, border, shadow, foreground text). `variant="primary"` / `"chart"` use this too.
52
+ */
53
+ declare const AVATAR_PRIMARY_FALLBACK_CLASS: string;
54
+ /**
55
+ * @deprecated Name retained for API stability — returns Action-button (secondary) surface.
56
+ */
57
+ declare function avatarChartVariantClass(_seed?: string): string;
58
+ declare const AVATAR_SIZE_CLASS: {
59
+ readonly default: "size-8";
60
+ readonly sm: "size-6";
61
+ readonly lg: "size-10";
62
+ };
63
+ declare function Avatar({ className, size, variant: rootVariant, children, ...props }: React.ComponentProps<typeof Avatar$1.Root> & {
64
+ size?: keyof typeof AVATAR_SIZE_CLASS;
65
+ /**
66
+ * `secondary` / `primary` / `chart` — elevated Action-button chrome on the root.
67
+ * Prefer `secondary`; `primary` is an alias for the same look (not dark primary CTA).
68
+ */
69
+ variant?: AvatarVariant;
70
+ }): react_jsx_runtime.JSX.Element;
71
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime.JSX.Element;
72
+ declare function AvatarFallback({ className, variant, seed: _seed, children, style, ...props }: React.ComponentProps<typeof Avatar$1.Fallback> & {
73
+ /**
74
+ * `secondary` — Action button look (`Button variant="secondary"`).
75
+ * `primary` / `chart` — same as `secondary` (aliases for prompts).
76
+ */
77
+ variant?: AvatarVariant;
78
+ /** Reserved for API compatibility; color no longer varies by seed. */
79
+ seed?: string;
80
+ }): react_jsx_runtime.JSX.Element;
81
+
82
+ type BannerTone = "default" | "primary" | "success" | "warn" | "danger";
83
+ type BannerVariant = "soft" | "solid" | "outline";
84
+ type BannerSize = "sm" | "default";
85
+ interface BannerProps extends Omit<React.ComponentProps<"div">, "title"> {
86
+ tone?: BannerTone;
87
+ /** Emphasis. Default `"soft"`. */
88
+ variant?: BannerVariant;
89
+ /** Size. Default `"default"`. */
90
+ size?: BannerSize;
91
+ icon?: React.ReactNode;
92
+ title?: React.ReactNode;
93
+ /** Right-aligned actions (buttons, links). */
94
+ actions?: React.ReactNode;
95
+ /** Show a dismiss button; fires `onDismiss`. */
96
+ onDismiss?: () => void;
97
+ }
98
+ /**
99
+ * Page-level announcement bar — a full-width, dismissible notice with a tone, an
100
+ * optional leading icon, message, and trailing actions. For in-flow form/field
101
+ * messages use `Alert` instead.
102
+ */
103
+ declare function Banner({ tone, variant, size, icon, title, actions, onDismiss, className, children, ...props }: BannerProps): react_jsx_runtime.JSX.Element;
104
+
105
+ type TimelineTone = "default" | "primary" | "success" | "warn" | "danger";
106
+ interface TimelineItem {
107
+ id: string;
108
+ title: React.ReactNode;
109
+ description?: React.ReactNode;
110
+ /** Right-aligned timestamp / meta. */
111
+ meta?: React.ReactNode;
112
+ tone?: TimelineTone;
113
+ /** Custom node inside the marker (e.g. an icon). */
114
+ icon?: React.ReactNode;
115
+ }
116
+ type TimelineSize = "sm" | "default";
117
+ interface TimelineProps extends Omit<React.ComponentProps<"ol">, "children"> {
118
+ items: TimelineItem[];
119
+ /** Vertical rhythm between entries. Default `"default"`. */
120
+ size?: TimelineSize;
121
+ }
122
+ /**
123
+ * Vertical event log — a marker rail with a title, optional description, and
124
+ * trailing meta per entry. Presentational; pass already-formatted timestamps.
125
+ */
126
+ declare function Timeline({ items, size, className, ...props }: TimelineProps): react_jsx_runtime.JSX.Element;
127
+
128
+ type KanbanTone = "default" | "primary" | "success" | "warn" | "danger";
129
+ type KanbanDensity = "default" | "compact";
130
+ type KanbanCardVariant = "default" | "outline" | "muted" | "tonal";
131
+ interface KanbanCardData {
132
+ id: string;
133
+ }
134
+ interface KanbanColumnData<C extends KanbanCardData = KanbanCardData> {
135
+ id: string;
136
+ title?: React.ReactNode;
137
+ description?: React.ReactNode;
138
+ /** Trailing header node (e.g. an add button). */
139
+ action?: React.ReactNode;
140
+ /** Footer rendered under the card list (e.g. "Add card"). */
141
+ footer?: React.ReactNode;
142
+ tone?: KanbanTone;
143
+ cards: C[];
144
+ }
145
+ interface KanbanLocation {
146
+ columnId: string;
147
+ index: number;
148
+ }
149
+ interface KanbanMoveEvent<C extends KanbanCardData = KanbanCardData> {
150
+ card: C;
151
+ cardId: string;
152
+ from: KanbanLocation;
153
+ to: KanbanLocation;
154
+ /** The resulting board arrangement. */
155
+ columns: KanbanColumnData<C>[];
156
+ }
157
+ /**
158
+ * Spread onto any element to make it the card's drag handle (pointer + keyboard).
159
+ * Useful for rich cards that want the handle on a custom control (e.g. a header
160
+ * grip or an avatar) — set `dragHandle="none"` on `Kanban` to drop the default.
161
+ */
162
+ type KanbanDragHandleProps = DraggableAttributes & React.DOMAttributes<HTMLElement>;
163
+ interface KanbanRenderCardContext<C extends KanbanCardData = KanbanCardData> {
164
+ column: KanbanColumnData<C>;
165
+ isDragging: boolean;
166
+ /** True while rendering inside the floating drag overlay. */
167
+ isOverlay: boolean;
168
+ /** Spread onto a custom drag handle. Undefined when the board is disabled. */
169
+ dragHandleProps?: KanbanDragHandleProps;
170
+ }
171
+ interface KanbanProps<C extends KanbanCardData = KanbanCardData> {
172
+ /** Controlled columns (with their cards). */
173
+ columns?: KanbanColumnData<C>[];
174
+ /** Uncontrolled initial columns. */
175
+ defaultColumns?: KanbanColumnData<C>[];
176
+ /** Fired with the full next arrangement after any move/reorder. */
177
+ onColumnsChange?: (columns: KanbanColumnData<C>[]) => void;
178
+ /** Fired with move details (card, from, to) after a drag completes. */
179
+ onMove?: (event: KanbanMoveEvent<C>) => void;
180
+ /** Render a card's body. */
181
+ renderCard: (card: C, ctx: KanbanRenderCardContext<C>) => React.ReactNode;
182
+ /** Override the default column header (title + count). */
183
+ renderColumnHeader?: (column: KanbanColumnData<C>) => React.ReactNode;
184
+ /** Resolve a stable id for a card. Default: `card.id`. */
185
+ getCardId?: (card: C) => string;
186
+ /** Shown inside an empty column's drop area. */
187
+ emptyColumnLabel?: React.ReactNode;
188
+ density?: KanbanDensity;
189
+ cardVariant?: KanbanCardVariant;
190
+ /**
191
+ * Drag handle strategy. `"auto"` (default) renders a hover grip in the card's
192
+ * top-right corner. `"none"` removes it so you can place your own handle by
193
+ * spreading `ctx.dragHandleProps` (from `renderCard`) onto any element.
194
+ */
195
+ dragHandle?: "auto" | "none";
196
+ /** Disable all drag interactions (read-only board). */
197
+ disabled?: boolean;
198
+ /** Accessible label for the board region. */
199
+ "aria-label"?: string;
200
+ className?: string;
201
+ columnClassName?: string;
202
+ cardClassName?: string;
203
+ }
204
+ /**
205
+ * Proprietary Kanban board on `@dnd-kit` — accessible drag-and-drop with
206
+ * pointer + keyboard sensors, cross-column moves, empty-column drop zones, and a
207
+ * floating drag overlay. Controlled (`columns` + `onColumnsChange`) or
208
+ * uncontrolled (`defaultColumns`); `onMove` reports each completed move.
209
+ */
210
+ declare function Kanban<C extends KanbanCardData = KanbanCardData>({ columns: columnsProp, defaultColumns, onColumnsChange, onMove, renderCard, renderColumnHeader, getCardId, emptyColumnLabel, density, cardVariant, dragHandle, disabled, className, columnClassName, cardClassName, ...rest }: KanbanProps<C>): react_jsx_runtime.JSX.Element;
211
+
212
+ export { Avatar as A, Banner as B, avatarChartVariantClass as C, untitledButtonVariants as D, Kanban as K, Timeline as T, UntitledButton as U, AvatarFallback as a, AvatarImage as b, type AvatarVariant as c, type BannerProps as d, Button as e, type ButtonColor as f, type KanbanCardData as g, type KanbanCardVariant as h, type KanbanColumnData as i, type KanbanDensity as j, type KanbanDragHandleProps as k, type KanbanLocation as l, type KanbanMoveEvent as m, type KanbanProps as n, type KanbanRenderCardContext as o, type KanbanTone as p, type TimelineItem as q, type TimelineProps as r, type UntitledButtonColor as s, type UntitledButtonProps as t, type UntitledButtonSize as u, AVATAR_PRIMARY_FALLBACK_CLASS as v, type BannerSize as w, type BannerTone as x, type BannerVariant as y, type TimelineSize as z };
@@ -3,7 +3,7 @@ import { FC } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ToolCallMessagePartComponent } from '@assistant-ui/react';
5
5
  import { WorkforceItem } from '@timbal-ai/timbal-sdk';
6
- import { T as TimbalV2ButtonProps } from './timbal-v2-button-CNfdwGq4.js';
6
+ import { T as TimbalV2ButtonProps } from './timbal-v2-button-B7vPs7gg.js';
7
7
 
8
8
  declare const MarkdownText: React.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
9
9
 
@@ -3,7 +3,7 @@ import { FC } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ToolCallMessagePartComponent } from '@assistant-ui/react';
5
5
  import { WorkforceItem } from '@timbal-ai/timbal-sdk';
6
- import { T as TimbalV2ButtonProps } from './timbal-v2-button-CNfdwGq4.cjs';
6
+ import { T as TimbalV2ButtonProps } from './timbal-v2-button-B7vPs7gg.cjs';
7
7
 
8
8
  declare const MarkdownText: React.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
9
9
 
package/dist/site.cjs ADDED
@@ -0,0 +1,358 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/site.ts
31
+ var site_exports = {};
32
+ __export(site_exports, {
33
+ DURATION: () => DURATION,
34
+ EASE: () => EASE,
35
+ Magnetic: () => Magnetic,
36
+ Marquee: () => Marquee,
37
+ Parallax: () => Parallax,
38
+ Reveal: () => Reveal,
39
+ SPRING: () => SPRING,
40
+ TextReveal: () => TextReveal
41
+ });
42
+ module.exports = __toCommonJS(site_exports);
43
+
44
+ // src/site/Reveal.tsx
45
+ var React = __toESM(require("react"), 1);
46
+ var import_react = require("motion/react");
47
+
48
+ // src/utils.ts
49
+ var import_clsx = require("clsx");
50
+ var import_tailwind_merge = require("tailwind-merge");
51
+ function cn(...inputs) {
52
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
53
+ }
54
+
55
+ // src/site/easing.ts
56
+ var EASE = {
57
+ /** Strong slow-out — the workhorse for entrances and reveals. */
58
+ out: [0.16, 1, 0.3, 1],
59
+ /** Symmetric in-out for loops and continuous motion. */
60
+ inOut: [0.65, 0, 0.35, 1],
61
+ /** Gentle in-out, good for parallax / large translations. */
62
+ soft: [0.4, 0, 0.2, 1]
63
+ };
64
+ var DURATION = {
65
+ fast: 0.4,
66
+ base: 0.7,
67
+ slow: 1.1
68
+ };
69
+ var SPRING = {
70
+ /** Tight, responsive follow. */
71
+ snappy: { stiffness: 350, damping: 30, mass: 0.4 },
72
+ /** Looser, more elastic follow. */
73
+ smooth: { stiffness: 150, damping: 20, mass: 0.6 }
74
+ };
75
+
76
+ // src/site/Reveal.tsx
77
+ var import_jsx_runtime = require("react/jsx-runtime");
78
+ function hidden(variant, distance) {
79
+ switch (variant) {
80
+ case "fade":
81
+ return { opacity: 0 };
82
+ case "fade-up":
83
+ return { opacity: 0, y: distance };
84
+ case "fade-down":
85
+ return { opacity: 0, y: -distance };
86
+ case "fade-left":
87
+ return { opacity: 0, x: distance };
88
+ case "fade-right":
89
+ return { opacity: 0, x: -distance };
90
+ case "blur":
91
+ return { opacity: 0, filter: "blur(12px)" };
92
+ case "scale":
93
+ return { opacity: 0, scale: 0.94 };
94
+ case "mask-up":
95
+ return { y: "110%" };
96
+ }
97
+ }
98
+ function shown(variant) {
99
+ if (variant === "mask-up") return { y: "0%" };
100
+ if (variant === "blur") return { opacity: 1, filter: "blur(0px)" };
101
+ if (variant === "scale") return { opacity: 1, scale: 1 };
102
+ return { opacity: 1, x: 0, y: 0 };
103
+ }
104
+ var Reveal = React.forwardRef(function Reveal2({
105
+ variant = "fade-up",
106
+ delay = 0,
107
+ duration = DURATION.base,
108
+ distance = 28,
109
+ amount = 0.3,
110
+ repeat = false,
111
+ as = "div",
112
+ className,
113
+ children,
114
+ ...rest
115
+ }, ref) {
116
+ const reduce = (0, import_react.useReducedMotion)();
117
+ const isMask = variant === "mask-up";
118
+ if (reduce) {
119
+ const Tag = as;
120
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { ref, className: cn(isMask && "overflow-hidden", className), ...rest, children });
121
+ }
122
+ const variants = {
123
+ hidden: hidden(variant, distance),
124
+ shown: shown(variant)
125
+ };
126
+ const MotionTag = import_react.motion[as] ?? import_react.motion.div;
127
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
128
+ MotionTag,
129
+ {
130
+ ref,
131
+ className,
132
+ variants,
133
+ initial: "hidden",
134
+ whileInView: "shown",
135
+ viewport: { once: !repeat, amount },
136
+ transition: { duration, delay, ease: EASE.out },
137
+ ...rest,
138
+ children
139
+ }
140
+ );
141
+ if (isMask) {
142
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block overflow-hidden", children: inner });
143
+ }
144
+ return inner;
145
+ });
146
+
147
+ // src/site/TextReveal.tsx
148
+ var React2 = __toESM(require("react"), 1);
149
+ var import_react2 = require("motion/react");
150
+ var import_jsx_runtime2 = require("react/jsx-runtime");
151
+ var tokenVariants = {
152
+ hidden: { y: "115%" },
153
+ shown: { y: "0%" }
154
+ };
155
+ function TextReveal({
156
+ children,
157
+ splitBy = "words",
158
+ stagger = 0.06,
159
+ delay = 0,
160
+ duration = DURATION.base,
161
+ repeat = false,
162
+ amount = 0.4,
163
+ as = "span",
164
+ className,
165
+ ...rest
166
+ }) {
167
+ const reduce = (0, import_react2.useReducedMotion)();
168
+ const Tag = as;
169
+ const tokens = React2.useMemo(() => {
170
+ if (splitBy === "lines") return children.split("\n");
171
+ return children.split(/(\s+)/).filter((t) => t.length > 0);
172
+ }, [children, splitBy]);
173
+ if (reduce) {
174
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { className, ...rest, children });
175
+ }
176
+ const containerVariants = {
177
+ hidden: {},
178
+ shown: { transition: { staggerChildren: stagger, delayChildren: delay } }
179
+ };
180
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
181
+ import_react2.motion.span,
182
+ {
183
+ variants: containerVariants,
184
+ initial: "hidden",
185
+ whileInView: "shown",
186
+ viewport: { once: !repeat, amount },
187
+ className: cn(as === "span" ? "inline" : "block", className),
188
+ ...rest,
189
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { className: as === "span" ? "inline" : "block", children: tokens.map(
190
+ (token, i) => /^\s+$/.test(token) && splitBy === "words" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: " " }, i) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
191
+ "span",
192
+ {
193
+ className: cn(
194
+ "overflow-hidden",
195
+ splitBy === "lines" ? "block" : "inline-block align-bottom"
196
+ ),
197
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
198
+ import_react2.motion.span,
199
+ {
200
+ className: "inline-block",
201
+ variants: tokenVariants,
202
+ transition: { duration, ease: EASE.out },
203
+ children: token
204
+ }
205
+ )
206
+ },
207
+ i
208
+ )
209
+ ) })
210
+ }
211
+ );
212
+ }
213
+
214
+ // src/site/Parallax.tsx
215
+ var React3 = __toESM(require("react"), 1);
216
+ var import_react3 = require("motion/react");
217
+ var import_jsx_runtime3 = require("react/jsx-runtime");
218
+ var Parallax = React3.forwardRef(function Parallax2({ speed = 0.2, axis = "y", smooth = true, className, children, style, ...rest }, forwardedRef) {
219
+ const reduce = (0, import_react3.useReducedMotion)();
220
+ const innerRef = React3.useRef(null);
221
+ React3.useImperativeHandle(forwardedRef, () => innerRef.current);
222
+ const { scrollYProgress } = (0, import_react3.useScroll)({
223
+ target: innerRef,
224
+ offset: ["start end", "end start"]
225
+ });
226
+ const range = 100 * speed;
227
+ const raw = (0, import_react3.useTransform)(scrollYProgress, [0, 1], [range, -range]);
228
+ const smoothed = (0, import_react3.useSpring)(raw, { stiffness: 120, damping: 30, mass: 0.4 });
229
+ const value = smooth ? smoothed : raw;
230
+ if (reduce) {
231
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: innerRef, className, style, ...rest, children });
232
+ }
233
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
234
+ import_react3.motion.div,
235
+ {
236
+ ref: innerRef,
237
+ className: cn("will-change-transform", className),
238
+ style: { ...style, [axis]: value },
239
+ ...rest,
240
+ children
241
+ }
242
+ );
243
+ });
244
+
245
+ // src/site/Marquee.tsx
246
+ var React4 = __toESM(require("react"), 1);
247
+ var import_react4 = require("motion/react");
248
+ var import_jsx_runtime4 = require("react/jsx-runtime");
249
+ var Marquee = React4.forwardRef(function Marquee2({ speed = 60, direction = "left", pauseOnHover = true, gap = "3rem", className, children, ...rest }, ref) {
250
+ const reduce = (0, import_react4.useReducedMotion)();
251
+ const x = (0, import_react4.useMotionValue)(0);
252
+ const setWidthRef = React4.useRef(0);
253
+ const groupRef = React4.useRef(null);
254
+ const [paused, setPaused] = React4.useState(false);
255
+ React4.useEffect(() => {
256
+ const el = groupRef.current;
257
+ if (!el) return;
258
+ const measure = () => {
259
+ const gapPx = parseFloat(getComputedStyle(el.parentElement).columnGap || "0") || 0;
260
+ setWidthRef.current = el.offsetWidth + gapPx;
261
+ };
262
+ measure();
263
+ const ro = new ResizeObserver(measure);
264
+ ro.observe(el);
265
+ return () => ro.disconnect();
266
+ }, []);
267
+ (0, import_react4.useAnimationFrame)((_, delta) => {
268
+ if (reduce || paused || setWidthRef.current === 0) return;
269
+ const dir = direction === "left" ? -1 : 1;
270
+ const moveBy = speed * delta / 1e3;
271
+ let next = x.get() + dir * moveBy;
272
+ const w = setWidthRef.current;
273
+ if (next <= -w) next += w;
274
+ else if (next >= w) next -= w;
275
+ x.set(next);
276
+ });
277
+ if (reduce) {
278
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
279
+ "div",
280
+ {
281
+ ref,
282
+ className: cn("flex w-full items-center overflow-x-auto", className),
283
+ style: { columnGap: gap },
284
+ ...rest,
285
+ children
286
+ }
287
+ );
288
+ }
289
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
290
+ "div",
291
+ {
292
+ ref,
293
+ className: cn("w-full overflow-hidden", className),
294
+ onMouseEnter: pauseOnHover ? () => setPaused(true) : void 0,
295
+ onMouseLeave: pauseOnHover ? () => setPaused(false) : void 0,
296
+ ...rest,
297
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react4.motion.div, { className: "flex w-max flex-nowrap items-center", style: { x, columnGap: gap }, children: [
298
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { ref: groupRef, className: "flex flex-nowrap items-center", style: { columnGap: gap }, children }),
299
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-nowrap items-center", style: { columnGap: gap }, "aria-hidden": true, children })
300
+ ] })
301
+ }
302
+ );
303
+ });
304
+
305
+ // src/site/Magnetic.tsx
306
+ var React5 = __toESM(require("react"), 1);
307
+ var import_react5 = require("motion/react");
308
+ var import_jsx_runtime5 = require("react/jsx-runtime");
309
+ var Magnetic = React5.forwardRef(function Magnetic2({ strength = 0.35, max = 24, spring = "snappy", className, children, ...rest }, forwardedRef) {
310
+ const reduce = (0, import_react5.useReducedMotion)();
311
+ const innerRef = React5.useRef(null);
312
+ React5.useImperativeHandle(forwardedRef, () => innerRef.current);
313
+ const mvx = (0, import_react5.useMotionValue)(0);
314
+ const mvy = (0, import_react5.useMotionValue)(0);
315
+ const x = (0, import_react5.useSpring)(mvx, SPRING[spring]);
316
+ const y = (0, import_react5.useSpring)(mvy, SPRING[spring]);
317
+ const clamp = (v) => Math.max(-max, Math.min(max, v));
318
+ function handleMove(e) {
319
+ if (reduce) return;
320
+ const el = innerRef.current;
321
+ if (!el) return;
322
+ const rect = el.getBoundingClientRect();
323
+ const cx = rect.left + rect.width / 2;
324
+ const cy = rect.top + rect.height / 2;
325
+ mvx.set(clamp((e.clientX - cx) * strength));
326
+ mvy.set(clamp((e.clientY - cy) * strength));
327
+ }
328
+ function reset() {
329
+ mvx.set(0);
330
+ mvy.set(0);
331
+ }
332
+ if (reduce) {
333
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref: innerRef, className: cn("inline-block", className), ...rest, children });
334
+ }
335
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
336
+ import_react5.motion.div,
337
+ {
338
+ ref: innerRef,
339
+ className: cn("inline-block", className),
340
+ style: { x, y },
341
+ onMouseMove: handleMove,
342
+ onMouseLeave: reset,
343
+ ...rest,
344
+ children
345
+ }
346
+ );
347
+ });
348
+ // Annotate the CommonJS export names for ESM import in node:
349
+ 0 && (module.exports = {
350
+ DURATION,
351
+ EASE,
352
+ Magnetic,
353
+ Marquee,
354
+ Parallax,
355
+ Reveal,
356
+ SPRING,
357
+ TextReveal
358
+ });