@nebutra/ui 0.2.3 → 3.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/dist/animate-in-BlvjVh2S.d.ts +250 -0
- package/dist/{canonical-Drca5UMj.d.ts → canonical-DEhT4VfS.d.ts} +83 -369
- package/dist/card-DunB1gKE.d.ts +105 -0
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/index.js +3 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/components/index.d.ts +90 -126
- package/dist/components/index.js +433 -182
- package/dist/components/index.js.map +1 -1
- package/dist/editorial/index.d.ts +404 -0
- package/dist/editorial/index.js +942 -0
- package/dist/editorial/index.js.map +1 -0
- package/dist/empty-state-bmfHCOuN.d.ts +86 -0
- package/dist/hooks/index.d.ts +18 -1
- package/dist/hooks/index.js +120 -5
- package/dist/hooks/index.js.map +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/layout/index.d.ts +17 -58
- package/dist/layout/index.js +368 -127
- package/dist/layout/index.js.map +1 -1
- package/dist/layouts/index.d.ts +1 -1
- package/dist/layouts/index.js +93 -28
- package/dist/layouts/index.js.map +1 -1
- package/dist/patterns/index.d.ts +39 -46
- package/dist/patterns/index.js +534 -323
- package/dist/patterns/index.js.map +1 -1
- package/dist/primitives/canonical.d.ts +5 -2
- package/dist/primitives/canonical.js +598 -288
- package/dist/primitives/canonical.js.map +1 -1
- package/dist/primitives/index.d.ts +165 -63
- package/dist/primitives/index.js +1251 -983
- package/dist/primitives/index.js.map +1 -1
- package/dist/tailwind.preset.d.ts +32 -32
- package/dist/tailwind.preset.js +24 -20
- package/dist/tailwind.preset.js.map +1 -1
- package/dist/theme/index.d.ts +1 -110
- package/dist/typography/fonts.css +8 -16
- package/dist/typography/index.d.ts +29 -45
- package/dist/typography/index.js +26 -14
- package/dist/typography/index.js.map +1 -1
- package/dist/utils/auth-surfaces.d.ts +33 -0
- package/dist/utils/auth-surfaces.js +9 -0
- package/dist/utils/auth-surfaces.js.map +1 -0
- package/dist/utils/index.d.ts +20 -16
- package/dist/utils/index.js +99 -20
- package/dist/utils/index.js.map +1 -1
- package/package.json +25 -11
- package/src/typography/fonts.css +8 -16
- package/dist/styles/brand-override.css +0 -61
- package/src/styles/brand-override.css +0 -61
package/dist/components/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Button as Button$1 } from '@lobehub/ui';
|
|
3
|
-
export { ActionIcon, ActionIconGroup, Alert, Avatar, Button, Checkbox, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelFooter, DraggablePanelHeader, Flexbox, Form, FormGroup, FormItem, Highlighter, Image, Input, List, Markdown, Menu, Modal, SearchBar, Segmented, Select, SideNav, Tag, TextArea, Tooltip } from '@lobehub/ui';
|
|
4
|
-
export { ChatInputArea, ChatItem, ChatList, MessageInput, MessageModal } from '@lobehub/ui/chat';
|
|
5
|
-
export { default as Spotlight } from '@lobehub/ui/es/awesome/Spotlight/Spotlight';
|
|
6
2
|
import { motion, AnimatePresence, useReducedMotion, m, LazyMotion, domAnimation } from 'framer-motion';
|
|
7
3
|
export { AnimatePresence, LayoutGroup, LazyMotion, MotionConfig, animate, domAnimation, m, motion, useAnimationFrame, useInView, useMotionTemplate, useMotionValue, useReducedMotion, useScroll, useSpring, useTransform, useVelocity } from 'framer-motion';
|
|
8
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -11,9 +7,10 @@ import Image from 'next/image';
|
|
|
11
7
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
12
8
|
import * as React5 from 'react';
|
|
13
9
|
import React5__default, { useEffectEvent, useId, useState } from 'react';
|
|
14
|
-
import { colors,
|
|
10
|
+
import { colors, brandSpring, flow, emerge } from '@nebutra/brand';
|
|
11
|
+
import { tokenColor, fontStack } from '@nebutra/tokens/values';
|
|
15
12
|
import { clsx } from 'clsx';
|
|
16
|
-
import {
|
|
13
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
17
14
|
import { cva } from 'class-variance-authority';
|
|
18
15
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
19
16
|
import { useAsciiText, slant } from 'react-ascii-text';
|
|
@@ -23,7 +20,7 @@ import '@xyflow/react/dist/style.css';
|
|
|
23
20
|
import { wouldCreateCycle } from '@nebutra/graph-model';
|
|
24
21
|
import { Input as Input$1 } from '@base-ui/react/input';
|
|
25
22
|
|
|
26
|
-
// src/
|
|
23
|
+
// src/shared/animation/motion/index.ts
|
|
27
24
|
|
|
28
25
|
// src/shared/animation/motion/tokens.ts
|
|
29
26
|
var animationDurations = {
|
|
@@ -222,7 +219,7 @@ function PageTransition({ children, ...props }) {
|
|
|
222
219
|
return /* @__PURE__ */ jsx(motion.div, { initial: "initial", animate: "animate", exit: "exit", variants, ...props, children });
|
|
223
220
|
}
|
|
224
221
|
({
|
|
225
|
-
// Nebutra Blue (云毓蓝) — technology & trust
|
|
222
|
+
// Nebutra Blue (云毓蓝) — technology & trust
|
|
226
223
|
blue50: colors.primary[50],
|
|
227
224
|
blue100: colors.primary[100],
|
|
228
225
|
blue200: colors.primary[200],
|
|
@@ -235,7 +232,7 @@ function PageTransition({ children, ...props }) {
|
|
|
235
232
|
blue800: colors.primary[800],
|
|
236
233
|
blue900: colors.primary[900],
|
|
237
234
|
blue950: colors.primary[950],
|
|
238
|
-
// Nebutra Cyan (云毓青) — data flow & intelligence
|
|
235
|
+
// Nebutra Cyan (云毓青) — data flow & intelligence
|
|
239
236
|
cyan50: colors.accent[50],
|
|
240
237
|
cyan100: colors.accent[100],
|
|
241
238
|
cyan200: colors.accent[200],
|
|
@@ -260,6 +257,13 @@ function PageTransition({ children, ...props }) {
|
|
|
260
257
|
neutral800: colors.neutral[800],
|
|
261
258
|
neutral900: colors.neutral[900],
|
|
262
259
|
neutral950: colors.neutral[950],
|
|
260
|
+
// deepest — used as dark background
|
|
261
|
+
// Semantic raw colors — VI §Color Specifications. The 500s are the status
|
|
262
|
+
// tokens; the 600 hover steps have no token of their own.
|
|
263
|
+
// NOTE: info = brand blue, not sky/teal
|
|
264
|
+
red500: tokenColor("--status-danger"),
|
|
265
|
+
green500: tokenColor("--status-success"),
|
|
266
|
+
amber500: tokenColor("--status-warning"),
|
|
263
267
|
white: colors.white,
|
|
264
268
|
black: colors.black
|
|
265
269
|
});
|
|
@@ -295,12 +299,23 @@ var primitiveFontSize = {
|
|
|
295
299
|
xs: 12,
|
|
296
300
|
sm: 14,
|
|
297
301
|
base: 16};
|
|
302
|
+
({
|
|
303
|
+
/** Default body/UI stack — Geist with CJK falling through to MiSans */
|
|
304
|
+
sans: fontStack("--font-sans"),
|
|
305
|
+
/** CJK-locale stack (same order as sans, minus Latin-only system faces) */
|
|
306
|
+
cnSans: fontStack("--font-cn"),
|
|
307
|
+
/** Display / hero headlines */
|
|
308
|
+
display: fontStack("--font-display"),
|
|
309
|
+
/** Headings */
|
|
310
|
+
heading: fontStack("--font-heading"),
|
|
311
|
+
/** Code / monospace */
|
|
312
|
+
mono: fontStack("--font-mono")
|
|
313
|
+
});
|
|
298
314
|
|
|
299
315
|
// src/tokens/shadows.ts
|
|
300
316
|
var shadowClasses = {
|
|
301
317
|
md: "shadow-md",
|
|
302
|
-
xl: "shadow-xl"
|
|
303
|
-
"2xl": "shadow-2xl"};
|
|
318
|
+
xl: "shadow-xl"};
|
|
304
319
|
|
|
305
320
|
// src/tokens/components/overlay.ts
|
|
306
321
|
var overlayFocusRingClassName = "outline-none";
|
|
@@ -311,33 +326,111 @@ var overlayZIndex = {
|
|
|
311
326
|
tooltip: 1070
|
|
312
327
|
};
|
|
313
328
|
var overlayClassNames = {
|
|
314
|
-
backdrop:
|
|
329
|
+
backdrop: (
|
|
330
|
+
// allow-palette: dialog backdrop dims arbitrary app content behind it, must stay dark in both themes
|
|
331
|
+
"fixed inset-0 bg-black/40 transition-[opacity] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-[var(--motion-duration-micro)] motion-reduce:transition-none"
|
|
332
|
+
),
|
|
315
333
|
modalSurface: [
|
|
316
334
|
"fixed left-1/2 top-1/2 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4",
|
|
317
|
-
"
|
|
335
|
+
"bg-background p-6 text-foreground",
|
|
318
336
|
"rounded-[var(--radius-xl)]",
|
|
319
|
-
|
|
337
|
+
"shadow-[0_0_0_1px_var(--edge-soft),var(--elevation-overlay)]",
|
|
320
338
|
"outline-none",
|
|
321
|
-
"transition-[opacity,transform
|
|
322
|
-
"data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0",
|
|
339
|
+
"transition-[opacity,transform] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)]",
|
|
340
|
+
"data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0 data-ending-style:duration-[var(--motion-duration-micro)]",
|
|
323
341
|
"motion-reduce:transition-none motion-reduce:data-starting-style:transform-none motion-reduce:data-ending-style:transform-none"
|
|
324
342
|
].join(" "),
|
|
325
343
|
popoverSurface: [
|
|
326
|
-
"w-72 rounded-[var(--radius-lg)] border border-border/70 bg-popover/95 p-4 text-popover-foreground backdrop-blur-md",
|
|
344
|
+
"w-72 origin-[var(--transform-origin)] rounded-[var(--radius-lg)] border border-border/70 bg-popover/95 p-4 text-popover-foreground backdrop-blur-md",
|
|
327
345
|
shadowClasses.xl,
|
|
328
|
-
"outline-none transition-[opacity,transform
|
|
329
|
-
"data-[open]:opacity-100 data-[closed]:opacity-0 data-[closed]:scale-
|
|
346
|
+
"outline-none transition-[opacity,transform] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)]",
|
|
347
|
+
"data-[open]:opacity-100 data-[closed]:opacity-0 data-[closed]:scale-[0.97] data-[open]:scale-100 data-[closed]:duration-[var(--motion-duration-micro)]",
|
|
330
348
|
"motion-reduce:transition-none motion-reduce:data-[closed]:transform-none motion-reduce:data-[open]:transform-none"
|
|
331
349
|
].join(" "),
|
|
332
350
|
tooltipSurface: [
|
|
333
|
-
"overflow-hidden rounded-[var(--radius-md)] border border-border/70 bg-popover/95 px-3 py-1.5 text-sm text-popover-foreground backdrop-blur-md",
|
|
351
|
+
"origin-[var(--transform-origin)] overflow-hidden rounded-[var(--radius-md)] border border-border/70 bg-popover/95 px-3 py-1.5 text-sm text-popover-foreground backdrop-blur-md",
|
|
334
352
|
shadowClasses.md,
|
|
335
|
-
"transition-[opacity,transform
|
|
336
|
-
"data-starting-style:scale-
|
|
353
|
+
"transition-[opacity,transform] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)]",
|
|
354
|
+
"data-starting-style:scale-[0.97] data-starting-style:opacity-0 data-ending-style:scale-[0.97] data-ending-style:opacity-0 data-ending-style:duration-[var(--motion-duration-micro)]",
|
|
355
|
+
"data-[instant]:duration-0",
|
|
337
356
|
"motion-reduce:transition-none motion-reduce:data-starting-style:transform-none motion-reduce:data-ending-style:transform-none"
|
|
338
357
|
].join(" "),
|
|
339
|
-
closeButton: `absolute right-4 top-4 rounded-[var(--radius-sm)] opacity-70 ring-offset-background ${overlayFocusRingClassName} transition-opacity duration-[var(--motion-duration-micro)] ease-[var(--ease-
|
|
358
|
+
closeButton: `absolute right-4 top-4 rounded-[var(--radius-sm)] opacity-70 ring-offset-background ${overlayFocusRingClassName} transition-opacity duration-[var(--motion-duration-micro)] ease-[var(--ease-brand)] hover:opacity-100 disabled:pointer-events-none data-[open]:bg-accent data-[open]:text-muted-foreground motion-reduce:transition-none`
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
// src/utils/tw-merge-theme.generated.ts
|
|
362
|
+
var TW_MERGE_THEME = {
|
|
363
|
+
breakpoint: ["3xl", "shell", "tight", "xs"],
|
|
364
|
+
container: ["content", "text", "wide"],
|
|
365
|
+
ease: ["brand", "in", "in-out", "out", "spring"],
|
|
366
|
+
font: ["cn", "display", "heading", "mono", "sans"],
|
|
367
|
+
leading: ["display", "heading"],
|
|
368
|
+
radius: ["2xl", "3xl", "button", "card", "full", "lg", "md", "none", "panel", "sm", "xl", "xs"],
|
|
369
|
+
shadow: [
|
|
370
|
+
"2xl",
|
|
371
|
+
"ambient-glow",
|
|
372
|
+
"ambient-lg",
|
|
373
|
+
"ambient-md",
|
|
374
|
+
"ambient-sm",
|
|
375
|
+
"brand",
|
|
376
|
+
"brand-lg",
|
|
377
|
+
"glass-lg",
|
|
378
|
+
"glass-md",
|
|
379
|
+
"glass-sm",
|
|
380
|
+
"glow-accent",
|
|
381
|
+
"glow-accent-lg",
|
|
382
|
+
"glow-accent-sm",
|
|
383
|
+
"glow-primary",
|
|
384
|
+
"lg",
|
|
385
|
+
"md",
|
|
386
|
+
"sheen",
|
|
387
|
+
"sm",
|
|
388
|
+
"xl",
|
|
389
|
+
"xs"
|
|
390
|
+
],
|
|
391
|
+
text: [
|
|
392
|
+
"2xl",
|
|
393
|
+
"2xs",
|
|
394
|
+
"3xl",
|
|
395
|
+
"4xl",
|
|
396
|
+
"5xl",
|
|
397
|
+
"6xl",
|
|
398
|
+
"7xl",
|
|
399
|
+
"8xl",
|
|
400
|
+
"9xl",
|
|
401
|
+
"base",
|
|
402
|
+
"body",
|
|
403
|
+
"display",
|
|
404
|
+
"label",
|
|
405
|
+
"lg",
|
|
406
|
+
"meta",
|
|
407
|
+
"sm",
|
|
408
|
+
"ui",
|
|
409
|
+
"xl",
|
|
410
|
+
"xs"
|
|
411
|
+
],
|
|
412
|
+
tracking: ["display", "heading", "label", "tight"]
|
|
413
|
+
};
|
|
414
|
+
var TW_MERGE_CLASS_GROUPS = {
|
|
415
|
+
duration: [{ duration: ["cinematic", "flow", "micro", "reveal"] }]
|
|
340
416
|
};
|
|
417
|
+
|
|
418
|
+
// src/utils/cn.ts
|
|
419
|
+
var twMerge = extendTailwindMerge({
|
|
420
|
+
extend: {
|
|
421
|
+
theme: Object.fromEntries(
|
|
422
|
+
Object.entries(TW_MERGE_THEME).map(([key, values]) => [key, [...values]])
|
|
423
|
+
),
|
|
424
|
+
classGroups: Object.fromEntries(
|
|
425
|
+
Object.entries(TW_MERGE_CLASS_GROUPS).map(([key, groups]) => [
|
|
426
|
+
key,
|
|
427
|
+
groups.map(
|
|
428
|
+
(group) => Object.fromEntries(Object.entries(group).map(([k, v]) => [k, [...v]]))
|
|
429
|
+
)
|
|
430
|
+
])
|
|
431
|
+
)
|
|
432
|
+
}
|
|
433
|
+
});
|
|
341
434
|
function cn(...inputs) {
|
|
342
435
|
return twMerge(clsx(inputs));
|
|
343
436
|
}
|
|
@@ -516,8 +609,8 @@ function PromptAttachmentPreviews({
|
|
|
516
609
|
event.stopPropagation();
|
|
517
610
|
onRemove(file);
|
|
518
611
|
},
|
|
519
|
-
className: "absolute top-1 right-1 rounded-full bg-
|
|
520
|
-
children: /* @__PURE__ */ jsx(Cross, { className: "h-3 w-3 text-
|
|
612
|
+
className: "absolute top-1 right-1 rounded-full bg-foreground/70 p-0.5 opacity-100 transition-opacity motion-reduce:transition-none",
|
|
613
|
+
children: /* @__PURE__ */ jsx(Cross, { className: "h-3 w-3 text-background" })
|
|
521
614
|
}
|
|
522
615
|
)
|
|
523
616
|
] }) }, previewKey);
|
|
@@ -560,7 +653,12 @@ var buttonVariants = cva(
|
|
|
560
653
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
561
654
|
"rounded-[var(--btn-default-radius,var(--radius-md))]",
|
|
562
655
|
"text-[length:var(--control-font-size-md,0.875rem)] font-[number:var(--font-weight-medium,500)]",
|
|
563
|
-
|
|
656
|
+
// `transform` is in the property list on purpose: without it the
|
|
657
|
+
// active:scale-[0.97] press snapped instantly and the button felt dead
|
|
658
|
+
// under the finger. Duration/ease stay on the flow rail — motion
|
|
659
|
+
// governance pins them (primitives/__tests__/motion-governance.test.ts).
|
|
660
|
+
"transition-[color,background-color,border-color,box-shadow,transform] duration-flow ease-[var(--ease-brand)]",
|
|
661
|
+
"active:scale-[0.97] motion-reduce:active:scale-100 motion-reduce:transition-none",
|
|
564
662
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
565
663
|
"aria-busy:cursor-wait"
|
|
566
664
|
].join(" "),
|
|
@@ -569,7 +667,7 @@ var buttonVariants = cva(
|
|
|
569
667
|
variant: {
|
|
570
668
|
// Recipe-driven via packages/design/tokens/recipe.css (.btn-brand-default)
|
|
571
669
|
default: "btn-brand-default",
|
|
572
|
-
ink: "bg-
|
|
670
|
+
ink: "bg-neutral-12 text-neutral-1 ring-1 ring-inset ring-neutral-1/5 hover:bg-neutral-11 hover:-translate-y-px active:translate-y-0 transition-[transform,background-color] duration-micro",
|
|
573
671
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
574
672
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
575
673
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -833,7 +931,7 @@ var formControlInvalidClassNames = {
|
|
|
833
931
|
input: "aria-invalid:border-destructive/60 aria-invalid:focus:border-destructive aria-invalid:focus:ring-destructive/20",
|
|
834
932
|
textarea: "aria-invalid:border-destructive/60 aria-invalid:focus:border-destructive aria-invalid:focus:ring-destructive/20"};
|
|
835
933
|
var fieldMessageClassName = "text-xs text-muted-foreground";
|
|
836
|
-
var fieldErrorClassName = "text-xs font-medium text-destructive";
|
|
934
|
+
var fieldErrorClassName = "text-xs font-medium text-destructive-strong";
|
|
837
935
|
function getTextareaStyle(size, style) {
|
|
838
936
|
const token = textareaTokens.sizes[size];
|
|
839
937
|
return {
|
|
@@ -868,6 +966,7 @@ var Textarea = ({
|
|
|
868
966
|
description,
|
|
869
967
|
error,
|
|
870
968
|
fieldClassName,
|
|
969
|
+
tone = "bordered",
|
|
871
970
|
id,
|
|
872
971
|
onChange,
|
|
873
972
|
onValueChange,
|
|
@@ -893,10 +992,10 @@ var Textarea = ({
|
|
|
893
992
|
"textarea",
|
|
894
993
|
{
|
|
895
994
|
className: cn(
|
|
896
|
-
"flex min-h-[var(--textarea-min-height)] w-full resize-y rounded-[var(--textarea-radius)]
|
|
897
|
-
"px-[var(--textarea-padding-x)] py-[var(--textarea-padding-y)] text-[length:var(--textarea-font-size)] text-foreground
|
|
995
|
+
"flex min-h-[var(--textarea-min-height)] w-full resize-y rounded-[var(--textarea-radius)]",
|
|
996
|
+
"px-[var(--textarea-padding-x)] py-[var(--textarea-padding-y)] text-[length:var(--textarea-font-size)] text-foreground",
|
|
898
997
|
"transition-[background-color,border-color,box-shadow,color] duration-micro ease-out placeholder:text-muted-foreground",
|
|
899
|
-
formControlFocusClassNames.textarea,
|
|
998
|
+
tone === "bordered" ? `border border-input bg-background ${formControlFocusClassNames.textarea}` : "border-0 bg-transparent shadow-none",
|
|
900
999
|
"disabled:cursor-not-allowed disabled:opacity-50 read-only:cursor-default read-only:bg-muted/70",
|
|
901
1000
|
formControlInvalidClassNames.textarea,
|
|
902
1001
|
className
|
|
@@ -936,20 +1035,65 @@ var Textarea = ({
|
|
|
936
1035
|
);
|
|
937
1036
|
};
|
|
938
1037
|
Textarea.displayName = "Textarea";
|
|
939
|
-
|
|
1038
|
+
|
|
1039
|
+
// src/tokens/components/interaction.ts
|
|
1040
|
+
var interaction = {
|
|
1041
|
+
/**
|
|
1042
|
+
* Tooltips. The first one waits so a sweeping pointer does not strobe;
|
|
1043
|
+
* once one is open, its neighbours open instantly if the pointer arrives
|
|
1044
|
+
* within the skip window. Radix Tooltip defaults: delayDuration 700,
|
|
1045
|
+
* skipDelayDuration 300. Vercel/Kowalski: "delay the first tooltip only".
|
|
1046
|
+
*/
|
|
1047
|
+
tooltip: { delayMs: 700, skipWindowMs: 300 }};
|
|
1048
|
+
var DEFAULT_TOOLTIP_DELAY_MS = interaction.tooltip.delayMs;
|
|
1049
|
+
var SKIP_DELAY_WINDOW_MS = interaction.tooltip.skipWindowMs;
|
|
1050
|
+
var lastTooltipOpenAt = 0;
|
|
1051
|
+
var skipDelayListeners = /* @__PURE__ */ new Set();
|
|
1052
|
+
function markTooltipOpened() {
|
|
1053
|
+
lastTooltipOpenAt = Date.now();
|
|
1054
|
+
for (const listener of skipDelayListeners) listener();
|
|
1055
|
+
}
|
|
1056
|
+
function shouldSkipDelay() {
|
|
1057
|
+
return Date.now() - lastTooltipOpenAt < SKIP_DELAY_WINDOW_MS;
|
|
1058
|
+
}
|
|
1059
|
+
function useSkipDelay() {
|
|
1060
|
+
const [, tick] = React5.useReducer((count) => count + 1, 0);
|
|
1061
|
+
React5.useEffect(() => {
|
|
1062
|
+
skipDelayListeners.add(tick);
|
|
1063
|
+
return () => {
|
|
1064
|
+
skipDelayListeners.delete(tick);
|
|
1065
|
+
};
|
|
1066
|
+
}, []);
|
|
1067
|
+
return shouldSkipDelay();
|
|
1068
|
+
}
|
|
1069
|
+
var TooltipInstantContext = React5.createContext(false);
|
|
940
1070
|
var TooltipProvider = ({
|
|
941
1071
|
children,
|
|
942
1072
|
delayDuration = DEFAULT_TOOLTIP_DELAY_MS
|
|
943
1073
|
}) => {
|
|
944
|
-
|
|
1074
|
+
const skipDelay = useSkipDelay();
|
|
1075
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Provider, { delay: skipDelay ? 0 : delayDuration, children });
|
|
945
1076
|
};
|
|
946
1077
|
var Tooltip = ({
|
|
947
1078
|
delayDuration,
|
|
948
1079
|
children,
|
|
1080
|
+
onOpenChange,
|
|
949
1081
|
...props
|
|
950
1082
|
}) => {
|
|
951
|
-
const
|
|
952
|
-
|
|
1083
|
+
const skipDelay = useSkipDelay();
|
|
1084
|
+
const instant = delayDuration == null && skipDelay;
|
|
1085
|
+
const delay = delayDuration ?? (instant ? 0 : DEFAULT_TOOLTIP_DELAY_MS);
|
|
1086
|
+
return /* @__PURE__ */ jsx(TooltipInstantContext.Provider, { value: instant, children: /* @__PURE__ */ jsx(Tooltip$1.Provider, { delay, children: /* @__PURE__ */ jsx(
|
|
1087
|
+
Tooltip$1.Root,
|
|
1088
|
+
{
|
|
1089
|
+
...props,
|
|
1090
|
+
onOpenChange: (open, eventDetails) => {
|
|
1091
|
+
if (open) markTooltipOpened();
|
|
1092
|
+
onOpenChange?.(open, eventDetails);
|
|
1093
|
+
},
|
|
1094
|
+
children
|
|
1095
|
+
}
|
|
1096
|
+
) }) });
|
|
953
1097
|
};
|
|
954
1098
|
var TooltipTrigger = ({
|
|
955
1099
|
asChild,
|
|
@@ -979,25 +1123,29 @@ var TooltipContent = ({
|
|
|
979
1123
|
alignOffset = 0,
|
|
980
1124
|
ref,
|
|
981
1125
|
...props
|
|
982
|
-
}) =>
|
|
983
|
-
|
|
984
|
-
{
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1126
|
+
}) => {
|
|
1127
|
+
const instant = React5.use(TooltipInstantContext);
|
|
1128
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
1129
|
+
Tooltip$1.Positioner,
|
|
1130
|
+
{
|
|
1131
|
+
side,
|
|
1132
|
+
align,
|
|
1133
|
+
sideOffset,
|
|
1134
|
+
alignOffset,
|
|
1135
|
+
style: { zIndex: overlayZIndex.tooltip },
|
|
1136
|
+
children: /* @__PURE__ */ jsx(
|
|
1137
|
+
Tooltip$1.Popup,
|
|
1138
|
+
{
|
|
1139
|
+
ref,
|
|
1140
|
+
className: cn(overlayClassNames.tooltipSurface, className),
|
|
1141
|
+
"data-instant": instant || void 0,
|
|
1142
|
+
style: { zIndex: overlayZIndex.tooltip, ...style },
|
|
1143
|
+
...props
|
|
1144
|
+
}
|
|
1145
|
+
)
|
|
1146
|
+
}
|
|
1147
|
+
) });
|
|
1148
|
+
};
|
|
1001
1149
|
TooltipContent.displayName = "TooltipContent";
|
|
1002
1150
|
var MAX_VISUALIZER_BARS = 64;
|
|
1003
1151
|
var VISUALIZER_BAR_STYLES = Array.from({ length: MAX_VISUALIZER_BARS }, (_, index) => ({
|
|
@@ -1029,13 +1177,13 @@ var VoiceRecorder = ({
|
|
|
1029
1177
|
),
|
|
1030
1178
|
children: [
|
|
1031
1179
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
1032
|
-
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-
|
|
1033
|
-
/* @__PURE__ */ jsx("span", { className: "font-mono text-sm text-
|
|
1180
|
+
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-destructive animate-pulse" }),
|
|
1181
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-sm text-muted-foreground", children: formatRecordingTime(time) })
|
|
1034
1182
|
] }),
|
|
1035
1183
|
/* @__PURE__ */ jsx("div", { className: "w-full h-10 flex items-center justify-center gap-0.5 px-4", children: barStyles.map((bar) => /* @__PURE__ */ jsx(
|
|
1036
1184
|
"div",
|
|
1037
1185
|
{
|
|
1038
|
-
className: "w-0.5 rounded-full bg-
|
|
1186
|
+
className: "w-0.5 rounded-full bg-foreground/50 animate-pulse",
|
|
1039
1187
|
style: {
|
|
1040
1188
|
height: bar.height,
|
|
1041
1189
|
animationDelay: bar.animationDelay,
|
|
@@ -1129,7 +1277,8 @@ var PromptInputTextarea = ({ className, onKeyDown, disableAutosize = false, plac
|
|
|
1129
1277
|
onKeyDown: handleKeyDown,
|
|
1130
1278
|
rows: 1,
|
|
1131
1279
|
style: { "--textarea-min-height": "2rem", ...style },
|
|
1132
|
-
|
|
1280
|
+
tone: "bare",
|
|
1281
|
+
className: cn("resize-none", className),
|
|
1133
1282
|
disabled,
|
|
1134
1283
|
placeholder,
|
|
1135
1284
|
...props
|
|
@@ -1170,14 +1319,14 @@ var promptModeToneClassName = {
|
|
|
1170
1319
|
label: "text-info"
|
|
1171
1320
|
},
|
|
1172
1321
|
think: {
|
|
1173
|
-
active: "bg-
|
|
1174
|
-
icon: "text-
|
|
1175
|
-
label: "text-
|
|
1322
|
+
active: "bg-cyan-9/15 border-cyan-9 text-cyan-9",
|
|
1323
|
+
icon: "text-cyan-9",
|
|
1324
|
+
label: "text-cyan-9"
|
|
1176
1325
|
},
|
|
1177
1326
|
canvas: {
|
|
1178
|
-
active: "bg-warning/15 border-warning text-warning",
|
|
1179
|
-
icon: "text-warning",
|
|
1180
|
-
label: "text-warning"
|
|
1327
|
+
active: "bg-warning/15 border-warning text-warning-strong",
|
|
1328
|
+
icon: "text-warning-strong",
|
|
1329
|
+
label: "text-warning-strong"
|
|
1181
1330
|
}
|
|
1182
1331
|
};
|
|
1183
1332
|
function PromptModeIcon({ tone, active }) {
|
|
@@ -1241,7 +1390,8 @@ function PromptModeActions({
|
|
|
1241
1390
|
modes,
|
|
1242
1391
|
onToggleMode,
|
|
1243
1392
|
onToggleCanvas,
|
|
1244
|
-
onProcessFile
|
|
1393
|
+
onProcessFile,
|
|
1394
|
+
labels
|
|
1245
1395
|
}) {
|
|
1246
1396
|
return /* @__PURE__ */ jsxs(
|
|
1247
1397
|
"div",
|
|
@@ -1251,11 +1401,11 @@ function PromptModeActions({
|
|
|
1251
1401
|
isRecording ? "opacity-0 invisible h-0" : "opacity-100 visible"
|
|
1252
1402
|
),
|
|
1253
1403
|
children: [
|
|
1254
|
-
/* @__PURE__ */ jsx(PromptInputAction, { tooltip:
|
|
1404
|
+
/* @__PURE__ */ jsx(PromptInputAction, { tooltip: labels.upload, children: /* @__PURE__ */ jsx(
|
|
1255
1405
|
"button",
|
|
1256
1406
|
{
|
|
1257
1407
|
type: "button",
|
|
1258
|
-
"aria-label":
|
|
1408
|
+
"aria-label": labels.upload,
|
|
1259
1409
|
onClick: () => uploadInputRef.current?.click(),
|
|
1260
1410
|
className: "flex h-8 w-8 text-muted-foreground cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-accent hover:text-foreground",
|
|
1261
1411
|
disabled: isRecording,
|
|
@@ -1273,8 +1423,7 @@ function PromptModeActions({
|
|
|
1273
1423
|
if (file) onProcessFile(file);
|
|
1274
1424
|
if (event.target) event.target.value = "";
|
|
1275
1425
|
},
|
|
1276
|
-
accept: "image/*"
|
|
1277
|
-
"aria-label": "Upload image"
|
|
1426
|
+
accept: "image/*"
|
|
1278
1427
|
}
|
|
1279
1428
|
),
|
|
1280
1429
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1282,7 +1431,7 @@ function PromptModeActions({
|
|
|
1282
1431
|
PromptModeButton,
|
|
1283
1432
|
{
|
|
1284
1433
|
active: modes.search,
|
|
1285
|
-
label:
|
|
1434
|
+
label: labels.search,
|
|
1286
1435
|
tone: "search",
|
|
1287
1436
|
onClick: () => onToggleMode("search")
|
|
1288
1437
|
}
|
|
@@ -1292,7 +1441,7 @@ function PromptModeActions({
|
|
|
1292
1441
|
PromptModeButton,
|
|
1293
1442
|
{
|
|
1294
1443
|
active: modes.think,
|
|
1295
|
-
label:
|
|
1444
|
+
label: labels.think,
|
|
1296
1445
|
tone: "think",
|
|
1297
1446
|
onClick: () => onToggleMode("think")
|
|
1298
1447
|
}
|
|
@@ -1302,7 +1451,7 @@ function PromptModeActions({
|
|
|
1302
1451
|
PromptModeButton,
|
|
1303
1452
|
{
|
|
1304
1453
|
active: modes.canvas,
|
|
1305
|
-
label:
|
|
1454
|
+
label: labels.canvas,
|
|
1306
1455
|
tone: "canvas",
|
|
1307
1456
|
onClick: onToggleCanvas
|
|
1308
1457
|
}
|
|
@@ -1316,13 +1465,14 @@ function PromptSubmitAction({
|
|
|
1316
1465
|
isLoading,
|
|
1317
1466
|
isRecording,
|
|
1318
1467
|
hasContent,
|
|
1319
|
-
onActivate
|
|
1468
|
+
onActivate,
|
|
1469
|
+
labels
|
|
1320
1470
|
}) {
|
|
1321
1471
|
const shouldReduceMotion = useReducedMotion();
|
|
1322
1472
|
return /* @__PURE__ */ jsx(
|
|
1323
1473
|
PromptInputAction,
|
|
1324
1474
|
{
|
|
1325
|
-
tooltip: isLoading ?
|
|
1475
|
+
tooltip: isLoading ? labels.stopGeneration : isRecording ? labels.stopRecording : hasContent ? labels.sendMessage : labels.voiceMessage,
|
|
1326
1476
|
children: /* @__PURE__ */ jsx(
|
|
1327
1477
|
Button,
|
|
1328
1478
|
{
|
|
@@ -1330,7 +1480,7 @@ function PromptSubmitAction({
|
|
|
1330
1480
|
size: "icon",
|
|
1331
1481
|
className: cn(
|
|
1332
1482
|
"h-8 w-8 rounded-full transition-[background-color,border-color,box-shadow,color,opacity,transform] duration-micro",
|
|
1333
|
-
isRecording ? "bg-transparent hover:bg-accent text-destructive hover:text-destructive/80" : hasContent ? "bg-primary hover:bg-primary/90 text-primary-foreground" : "bg-transparent hover:bg-accent text-muted-foreground hover:text-foreground"
|
|
1483
|
+
isRecording ? "bg-transparent hover:bg-accent text-destructive-strong hover:text-destructive-strong/80" : hasContent ? "bg-primary hover:bg-primary/90 text-primary-foreground" : "bg-transparent hover:bg-accent text-muted-foreground hover:text-accent-foreground"
|
|
1334
1484
|
),
|
|
1335
1485
|
onClick: onActivate,
|
|
1336
1486
|
disabled: isLoading && !hasContent,
|
|
@@ -1338,16 +1488,29 @@ function PromptSubmitAction({
|
|
|
1338
1488
|
StopFill,
|
|
1339
1489
|
{
|
|
1340
1490
|
className: cn(
|
|
1341
|
-
"h-4 w-4 fill-
|
|
1491
|
+
"h-4 w-4 fill-current",
|
|
1342
1492
|
shouldReduceMotion ? "opacity-100" : "animate-pulse"
|
|
1343
1493
|
)
|
|
1344
1494
|
}
|
|
1345
|
-
) : isRecording ? /* @__PURE__ */ jsx(StopCircle, { className: "h-5 w-5 text-destructive" }) : hasContent ? /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4
|
|
1495
|
+
) : isRecording ? /* @__PURE__ */ jsx(StopCircle, { className: "h-5 w-5 text-destructive-strong" }) : hasContent ? /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Microphone, { className: "h-5 w-5 transition-colors" })
|
|
1346
1496
|
}
|
|
1347
1497
|
)
|
|
1348
1498
|
}
|
|
1349
1499
|
);
|
|
1350
1500
|
}
|
|
1501
|
+
var DEFAULT_PROMPT_INPUT_BOX_LABELS = {
|
|
1502
|
+
upload: "Upload image",
|
|
1503
|
+
search: "Search",
|
|
1504
|
+
think: "Think",
|
|
1505
|
+
canvas: "Canvas",
|
|
1506
|
+
searchPlaceholder: "Search the web...",
|
|
1507
|
+
thinkPlaceholder: "Think deeply...",
|
|
1508
|
+
canvasPlaceholder: "Create on canvas...",
|
|
1509
|
+
stopGeneration: "Stop generation",
|
|
1510
|
+
stopRecording: "Stop recording",
|
|
1511
|
+
sendMessage: "Send message",
|
|
1512
|
+
voiceMessage: "Voice message"
|
|
1513
|
+
};
|
|
1351
1514
|
var promptInputBoxInitialState = {
|
|
1352
1515
|
input: "",
|
|
1353
1516
|
files: [],
|
|
@@ -1405,6 +1568,7 @@ var PromptInputBox = (props) => {
|
|
|
1405
1568
|
className,
|
|
1406
1569
|
ref
|
|
1407
1570
|
} = props;
|
|
1571
|
+
const labels = { ...DEFAULT_PROMPT_INPUT_BOX_LABELS, ...props.labels };
|
|
1408
1572
|
const [state, dispatch] = React5__default.useReducer(promptInputBoxReducer, promptInputBoxInitialState);
|
|
1409
1573
|
const {
|
|
1410
1574
|
input,
|
|
@@ -1530,7 +1694,7 @@ var PromptInputBox = (props) => {
|
|
|
1530
1694
|
children: /* @__PURE__ */ jsx(
|
|
1531
1695
|
PromptInputTextarea,
|
|
1532
1696
|
{
|
|
1533
|
-
placeholder: showSearch ?
|
|
1697
|
+
placeholder: showSearch ? labels.searchPlaceholder : showThink ? labels.thinkPlaceholder : showCanvas ? labels.canvasPlaceholder : placeholder,
|
|
1534
1698
|
className: "text-base"
|
|
1535
1699
|
}
|
|
1536
1700
|
)
|
|
@@ -1546,7 +1710,8 @@ var PromptInputBox = (props) => {
|
|
|
1546
1710
|
modes: { search: showSearch, think: showThink, canvas: showCanvas },
|
|
1547
1711
|
onToggleMode: handleToggleChange,
|
|
1548
1712
|
onToggleCanvas: handleCanvasToggle,
|
|
1549
|
-
onProcessFile: processFile
|
|
1713
|
+
onProcessFile: processFile,
|
|
1714
|
+
labels
|
|
1550
1715
|
}
|
|
1551
1716
|
),
|
|
1552
1717
|
/* @__PURE__ */ jsx(
|
|
@@ -1559,7 +1724,8 @@ var PromptInputBox = (props) => {
|
|
|
1559
1724
|
if (isRecording) stopRecording();
|
|
1560
1725
|
else if (hasContent) handleSubmit();
|
|
1561
1726
|
else startRecording();
|
|
1562
|
-
}
|
|
1727
|
+
},
|
|
1728
|
+
labels
|
|
1563
1729
|
}
|
|
1564
1730
|
)
|
|
1565
1731
|
] })
|
|
@@ -1576,90 +1742,168 @@ var PromptInputBox = (props) => {
|
|
|
1576
1742
|
] });
|
|
1577
1743
|
};
|
|
1578
1744
|
PromptInputBox.displayName = "PromptInputBox";
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1745
|
+
|
|
1746
|
+
// src/tokens/motion.ts
|
|
1747
|
+
var motionDurations = {
|
|
1748
|
+
/** 300ms — content unveil (slide, expand, accordion, drawer) */
|
|
1749
|
+
reveal: 300};
|
|
1750
|
+
var motionVariants = {
|
|
1751
|
+
fadeInUp: {
|
|
1752
|
+
initial: { opacity: 0, transform: "translateY(20px)" },
|
|
1753
|
+
animate: { opacity: 1, transform: "translateY(0px)" },
|
|
1754
|
+
exit: { opacity: 0, transform: "translateY(10px)" }
|
|
1755
|
+
},
|
|
1756
|
+
scaleIn: {
|
|
1757
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
1758
|
+
animate: { opacity: 1, scale: 1 },
|
|
1759
|
+
exit: { opacity: 0, scale: 0.95 }
|
|
1760
|
+
}};
|
|
1761
|
+
var staggerContainers = {
|
|
1762
|
+
fast: {
|
|
1763
|
+
initial: {},
|
|
1764
|
+
animate: { transition: { staggerChildren: 0.04, delayChildren: 0 } }
|
|
1765
|
+
},
|
|
1766
|
+
normal: {
|
|
1767
|
+
initial: {},
|
|
1768
|
+
animate: { transition: { staggerChildren: 0.06, delayChildren: 0.04 } }
|
|
1769
|
+
},
|
|
1770
|
+
slow: {
|
|
1771
|
+
initial: {},
|
|
1772
|
+
animate: { transition: { staggerChildren: 0.08, delayChildren: 0.05 } }
|
|
1773
|
+
}
|
|
1586
1774
|
};
|
|
1587
|
-
var
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1775
|
+
var viewportSettings = {
|
|
1776
|
+
once: { once: true, margin: "-100px" }};
|
|
1777
|
+
var fadeInVariant = {
|
|
1778
|
+
initial: { opacity: 0 },
|
|
1779
|
+
animate: { opacity: 1 },
|
|
1780
|
+
exit: { opacity: 0 },
|
|
1781
|
+
transition: { duration: 0.3 }
|
|
1592
1782
|
};
|
|
1593
1783
|
var PRESETS = {
|
|
1784
|
+
/** 涌现 — materialize from the cloud (default) */
|
|
1594
1785
|
emerge: {
|
|
1595
1786
|
initial: emerge.initial,
|
|
1596
1787
|
animate: emerge.animate,
|
|
1597
1788
|
exit: emerge.exit,
|
|
1598
|
-
transition:
|
|
1789
|
+
transition: emerge.transition
|
|
1599
1790
|
},
|
|
1791
|
+
/** 流动 — stream horizontally */
|
|
1600
1792
|
flow: {
|
|
1601
1793
|
initial: flow.initial,
|
|
1602
1794
|
animate: flow.animate,
|
|
1603
1795
|
exit: flow.exit,
|
|
1604
|
-
transition:
|
|
1796
|
+
transition: flow.transition
|
|
1605
1797
|
},
|
|
1606
|
-
fade
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1798
|
+
/** Simple fade */
|
|
1799
|
+
fade: fadeInVariant,
|
|
1800
|
+
/** Fade + rise */
|
|
1801
|
+
fadeUp: motionVariants.fadeInUp,
|
|
1802
|
+
/** Scale in */
|
|
1803
|
+
scale: motionVariants.scaleIn,
|
|
1804
|
+
/**
|
|
1805
|
+
* Keyed content swap — short, symmetric, blur-softened. Rises in, sinks out.
|
|
1806
|
+
* Shorter and shallower than `emerge` on purpose: a swap replaces content the
|
|
1807
|
+
* reader is already looking at, so it must resolve inside the reveal rail.
|
|
1808
|
+
* Pair with `AnimateSwap`.
|
|
1809
|
+
*/
|
|
1810
|
+
swap: {
|
|
1811
|
+
initial: { opacity: 0, transform: "translateY(10px)", filter: "blur(4px)" },
|
|
1812
|
+
animate: { opacity: 1, transform: "translateY(0px)", filter: "blur(0px)" },
|
|
1813
|
+
exit: { opacity: 0, transform: "translateY(-10px)", filter: "blur(4px)" },
|
|
1814
|
+
transition: { duration: motionDurations.reveal / 1e3 }
|
|
1611
1815
|
},
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1816
|
+
/** Off-canvas panel entering from the right edge (drawer, sheet). */
|
|
1817
|
+
slideFromRight: {
|
|
1818
|
+
initial: { transform: "translateX(100%)" },
|
|
1819
|
+
animate: { transform: "translateX(0%)" },
|
|
1820
|
+
exit: { transform: "translateX(100%)" },
|
|
1821
|
+
transition: brandSpring.default
|
|
1617
1822
|
},
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1823
|
+
/** Off-canvas panel entering from the left edge. */
|
|
1824
|
+
slideFromLeft: {
|
|
1825
|
+
initial: { transform: "translateX(-100%)" },
|
|
1826
|
+
animate: { transform: "translateX(0%)" },
|
|
1827
|
+
exit: { transform: "translateX(-100%)" },
|
|
1828
|
+
transition: brandSpring.default
|
|
1829
|
+
},
|
|
1830
|
+
/** Off-canvas panel entering from the top edge (banner, command bar). */
|
|
1831
|
+
slideFromTop: {
|
|
1832
|
+
initial: { transform: "translateY(-100%)" },
|
|
1833
|
+
animate: { transform: "translateY(0%)" },
|
|
1834
|
+
exit: { transform: "translateY(-100%)" },
|
|
1835
|
+
transition: brandSpring.default
|
|
1836
|
+
},
|
|
1837
|
+
/** Off-canvas panel entering from the bottom edge (mobile action sheet). */
|
|
1838
|
+
slideFromBottom: {
|
|
1839
|
+
initial: { transform: "translateY(100%)" },
|
|
1840
|
+
animate: { transform: "translateY(0%)" },
|
|
1841
|
+
exit: { transform: "translateY(100%)" },
|
|
1842
|
+
transition: brandSpring.default
|
|
1623
1843
|
}
|
|
1624
1844
|
};
|
|
1625
|
-
var STAGGER = { fast: 0.05, normal: 0.1, slow: 0.2 };
|
|
1626
1845
|
function MotionDiv(props) {
|
|
1627
1846
|
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx(m.div, { ...props }) });
|
|
1628
1847
|
}
|
|
1629
1848
|
function AnimateIn(props) {
|
|
1630
|
-
const {
|
|
1849
|
+
const {
|
|
1850
|
+
children,
|
|
1851
|
+
preset = "fade",
|
|
1852
|
+
delay = 0,
|
|
1853
|
+
duration,
|
|
1854
|
+
inView = false,
|
|
1855
|
+
className,
|
|
1856
|
+
...rest
|
|
1857
|
+
} = props;
|
|
1631
1858
|
const shouldReduce = useReducedMotion();
|
|
1632
|
-
const
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1635
|
-
|
|
1859
|
+
const base = PRESETS[preset] || PRESETS.fade;
|
|
1860
|
+
const initial = shouldReduce ? { opacity: 0 } : base.initial;
|
|
1861
|
+
const animate2 = shouldReduce ? { opacity: 1 } : base.animate;
|
|
1862
|
+
const exit = shouldReduce ? { opacity: 0 } : "exit" in base ? base.exit : void 0;
|
|
1863
|
+
const transition = {
|
|
1864
|
+
...shouldReduce ? { duration: 0.15 } : base.transition,
|
|
1865
|
+
delay,
|
|
1636
1866
|
...duration ? { duration } : {}
|
|
1637
1867
|
};
|
|
1638
|
-
if (shouldReduce) return /* @__PURE__ */ jsx("div", { className, children });
|
|
1639
1868
|
if (inView) {
|
|
1640
1869
|
return /* @__PURE__ */ jsx(
|
|
1641
1870
|
MotionDiv,
|
|
1642
1871
|
{
|
|
1872
|
+
...rest,
|
|
1643
1873
|
className,
|
|
1644
1874
|
initial,
|
|
1645
1875
|
whileInView: animate2,
|
|
1646
|
-
exit,
|
|
1647
|
-
|
|
1648
|
-
|
|
1876
|
+
...exit && { exit },
|
|
1877
|
+
transition,
|
|
1878
|
+
viewport: viewportSettings.once,
|
|
1649
1879
|
children
|
|
1650
1880
|
}
|
|
1651
1881
|
);
|
|
1652
1882
|
}
|
|
1653
|
-
return /* @__PURE__ */ jsx(
|
|
1883
|
+
return /* @__PURE__ */ jsx(
|
|
1884
|
+
MotionDiv,
|
|
1885
|
+
{
|
|
1886
|
+
...rest,
|
|
1887
|
+
className,
|
|
1888
|
+
initial,
|
|
1889
|
+
animate: animate2,
|
|
1890
|
+
...exit && { exit },
|
|
1891
|
+
transition,
|
|
1892
|
+
children
|
|
1893
|
+
}
|
|
1894
|
+
);
|
|
1895
|
+
}
|
|
1896
|
+
function AnimateSwap(props) {
|
|
1897
|
+
const { swapKey, ...animateInProps } = props;
|
|
1898
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(AnimateIn, { ...animateInProps }, swapKey) }) });
|
|
1654
1899
|
}
|
|
1655
1900
|
function AnimateInGroup(props) {
|
|
1656
1901
|
const { children, stagger = "normal", inView = false, className } = props;
|
|
1657
1902
|
const shouldReduce = useReducedMotion();
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
}
|
|
1662
|
-
if (shouldReduce) return /* @__PURE__ */ jsx("div", { className, children });
|
|
1903
|
+
const container = staggerContainers[stagger];
|
|
1904
|
+
if (shouldReduce) {
|
|
1905
|
+
return /* @__PURE__ */ jsx("div", { className, children });
|
|
1906
|
+
}
|
|
1663
1907
|
if (inView) {
|
|
1664
1908
|
return /* @__PURE__ */ jsx(
|
|
1665
1909
|
MotionDiv,
|
|
@@ -1667,13 +1911,13 @@ function AnimateInGroup(props) {
|
|
|
1667
1911
|
className,
|
|
1668
1912
|
initial: "initial",
|
|
1669
1913
|
whileInView: "animate",
|
|
1670
|
-
viewport:
|
|
1671
|
-
variants,
|
|
1914
|
+
viewport: viewportSettings.once,
|
|
1915
|
+
variants: container,
|
|
1672
1916
|
children
|
|
1673
1917
|
}
|
|
1674
1918
|
);
|
|
1675
1919
|
}
|
|
1676
|
-
return /* @__PURE__ */ jsx(MotionDiv, { className, initial: "initial", animate: "animate", variants, children });
|
|
1920
|
+
return /* @__PURE__ */ jsx(MotionDiv, { className, initial: "initial", animate: "animate", variants: container, children });
|
|
1677
1921
|
}
|
|
1678
1922
|
function AsciiText({ text, className = "", font = slant }) {
|
|
1679
1923
|
const asciiTextRef = useAsciiText({
|
|
@@ -1716,6 +1960,7 @@ function PopoverContent({
|
|
|
1716
1960
|
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
1717
1961
|
Popover$1.Positioner,
|
|
1718
1962
|
{
|
|
1963
|
+
style: { zIndex: overlayZIndex.popover },
|
|
1719
1964
|
"data-slot": "popover-positioner",
|
|
1720
1965
|
sideOffset,
|
|
1721
1966
|
align,
|
|
@@ -1730,7 +1975,7 @@ function PopoverContent({
|
|
|
1730
1975
|
overlayPrimitiveClassNames.popoverSurface,
|
|
1731
1976
|
className
|
|
1732
1977
|
),
|
|
1733
|
-
style
|
|
1978
|
+
style,
|
|
1734
1979
|
...props,
|
|
1735
1980
|
children: [
|
|
1736
1981
|
children,
|
|
@@ -1776,15 +2021,15 @@ function PopoverArrow({
|
|
|
1776
2021
|
);
|
|
1777
2022
|
}
|
|
1778
2023
|
var TAG_COLOR_MAP = {
|
|
1779
|
-
feature: "bg-
|
|
1780
|
-
fix: "bg-
|
|
1781
|
-
breaking: "bg-
|
|
1782
|
-
improvement: "bg-
|
|
1783
|
-
security: "bg-
|
|
1784
|
-
experimental: "bg-
|
|
2024
|
+
feature: "bg-primary text-primary-foreground",
|
|
2025
|
+
fix: "bg-success text-success-foreground",
|
|
2026
|
+
breaking: "bg-destructive text-destructive-foreground",
|
|
2027
|
+
improvement: "bg-warning text-warning-foreground",
|
|
2028
|
+
security: "bg-destructive text-destructive-foreground",
|
|
2029
|
+
experimental: "bg-neutral-8 text-foreground"
|
|
1785
2030
|
};
|
|
1786
2031
|
var getTagColor = (tag) => {
|
|
1787
|
-
if (!tag) return "bg-
|
|
2032
|
+
if (!tag) return "bg-neutral-7 text-foreground";
|
|
1788
2033
|
return TAG_COLOR_MAP[tag.toLowerCase()] || TAG_COLOR_MAP.feature;
|
|
1789
2034
|
};
|
|
1790
2035
|
var getUnreadCount = (entries, lastSeenVersion) => {
|
|
@@ -1795,7 +2040,8 @@ var getUnreadCount = (entries, lastSeenVersion) => {
|
|
|
1795
2040
|
function ChangelogWidget({
|
|
1796
2041
|
entries,
|
|
1797
2042
|
changelogUrl = "/changelog",
|
|
1798
|
-
className
|
|
2043
|
+
className,
|
|
2044
|
+
triggerLabel = "View changelog"
|
|
1799
2045
|
}) {
|
|
1800
2046
|
const [isOpen, setIsOpen] = React5.useState(false);
|
|
1801
2047
|
const [lastSeenVersion, setLastSeenVersion] = React5.useState(null);
|
|
@@ -1810,14 +2056,14 @@ function ChangelogWidget({
|
|
|
1810
2056
|
/* @__PURE__ */ jsxs(
|
|
1811
2057
|
PopoverTrigger,
|
|
1812
2058
|
{
|
|
1813
|
-
"aria-label":
|
|
2059
|
+
"aria-label": triggerLabel,
|
|
1814
2060
|
className: cn(
|
|
1815
2061
|
"relative inline-flex items-center justify-center rounded-[var(--radius-lg)] p-2 transition-colors hover:bg-muted",
|
|
1816
2062
|
className
|
|
1817
2063
|
),
|
|
1818
2064
|
children: [
|
|
1819
2065
|
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground" }),
|
|
1820
|
-
unreadCount > 0 && /* @__PURE__ */ jsx("span", { className: "absolute right-0 top-0 flex h-5 w-5 items-center justify-center rounded-full bg-
|
|
2066
|
+
unreadCount > 0 && /* @__PURE__ */ jsx("span", { className: "absolute right-0 top-0 flex h-5 w-5 items-center justify-center rounded-full bg-destructive text-xs font-bold text-destructive-foreground", children: unreadCount > 9 ? "9+" : unreadCount })
|
|
1821
2067
|
]
|
|
1822
2068
|
}
|
|
1823
2069
|
),
|
|
@@ -1827,9 +2073,9 @@ function ChangelogWidget({
|
|
|
1827
2073
|
align: "end",
|
|
1828
2074
|
side: "bottom",
|
|
1829
2075
|
sideOffset: 8,
|
|
1830
|
-
className: "w-80 overflow-hidden rounded-[var(--radius-lg)] border-border bg-
|
|
2076
|
+
className: "w-80 overflow-hidden rounded-[var(--radius-lg)] border-border bg-popover p-0 shadow-lg",
|
|
1831
2077
|
children: [
|
|
1832
|
-
/* @__PURE__ */ jsx("div", { className: "bg-gradient-to-r from-
|
|
2078
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gradient-to-r from-blue-3 to-cyan-3 px-4 py-3", children: /* @__PURE__ */ jsx("h3", { className: "font-semibold text-foreground", children: "What's New" }) }),
|
|
1833
2079
|
/* @__PURE__ */ jsx("div", { className: "max-h-96 overflow-y-auto", children: recentEntries.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-4 py-6 text-center text-sm text-muted-foreground", children: "No updates available" }) : recentEntries.map((entry) => /* @__PURE__ */ jsxs(
|
|
1834
2080
|
"a",
|
|
1835
2081
|
{
|
|
@@ -1938,14 +2184,14 @@ function removeFlowEdge(graph, flowEdgeId, edgeIdentity) {
|
|
|
1938
2184
|
};
|
|
1939
2185
|
}
|
|
1940
2186
|
var XYFLOW_TOKEN_THEME = {
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
2187
|
+
"--xy-background-pattern-color": "var(--neutral-6)",
|
|
2188
|
+
"--xy-edge-stroke": "var(--neutral-8)",
|
|
2189
|
+
"--xy-connectionline-stroke": "var(--neutral-8)",
|
|
2190
|
+
"--xy-handle-background-color": "var(--neutral-9)",
|
|
2191
|
+
"--xy-handle-border-color": "var(--neutral-7)",
|
|
2192
|
+
"--xy-controls-button-background-color": "var(--neutral-2)",
|
|
2193
|
+
"--xy-controls-button-border-color": "var(--neutral-7)",
|
|
2194
|
+
"--xy-controls-button-color": "var(--neutral-11)"
|
|
1949
2195
|
};
|
|
1950
2196
|
var nodeCardVariants = cva(
|
|
1951
2197
|
"min-w-[160px] rounded-[var(--radius-lg)] border bg-neutral-2 px-3 py-2 text-neutral-12 shadow-sm transition-colors",
|
|
@@ -2032,7 +2278,7 @@ function NodeGraphCanvas({
|
|
|
2032
2278
|
setRejection(result.reason);
|
|
2033
2279
|
}
|
|
2034
2280
|
};
|
|
2035
|
-
return /* @__PURE__ */ jsx(
|
|
2281
|
+
return /* @__PURE__ */ jsx(
|
|
2036
2282
|
"div",
|
|
2037
2283
|
{
|
|
2038
2284
|
style: XYFLOW_TOKEN_THEME,
|
|
@@ -2063,16 +2309,15 @@ function NodeGraphCanvas({
|
|
|
2063
2309
|
id: statusId,
|
|
2064
2310
|
role: "alert",
|
|
2065
2311
|
"aria-live": "assertive",
|
|
2066
|
-
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-destructive bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2312
|
+
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-destructive bg-destructive/10 px-3 py-2 text-sm text-destructive-strong",
|
|
2067
2313
|
children: [
|
|
2068
2314
|
/* @__PURE__ */ jsx("span", { children: rejection }),
|
|
2069
2315
|
/* @__PURE__ */ jsx(
|
|
2070
|
-
Button
|
|
2316
|
+
Button,
|
|
2071
2317
|
{
|
|
2072
|
-
size: "
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
"aria-label": "Dismiss connection error",
|
|
2318
|
+
size: "sm",
|
|
2319
|
+
variant: "ghost",
|
|
2320
|
+
prefix: /* @__PURE__ */ jsx(CrossSmall, { size: 14 }),
|
|
2076
2321
|
onClick: () => setRejection(null),
|
|
2077
2322
|
children: "Dismiss"
|
|
2078
2323
|
}
|
|
@@ -2084,7 +2329,7 @@ function NodeGraphCanvas({
|
|
|
2084
2329
|
}
|
|
2085
2330
|
) })
|
|
2086
2331
|
}
|
|
2087
|
-
)
|
|
2332
|
+
);
|
|
2088
2333
|
}
|
|
2089
2334
|
var containerVariants = {
|
|
2090
2335
|
hidden: { opacity: 0, y: 20 },
|
|
@@ -2130,6 +2375,7 @@ function OnboardingChecklist({
|
|
|
2130
2375
|
items,
|
|
2131
2376
|
videoThumbnailUrl,
|
|
2132
2377
|
videoUrl,
|
|
2378
|
+
playVideoLabel = "Play the video guide",
|
|
2133
2379
|
className
|
|
2134
2380
|
}) {
|
|
2135
2381
|
const shouldReduceMotion = useReducedMotion();
|
|
@@ -2151,7 +2397,7 @@ function OnboardingChecklist({
|
|
|
2151
2397
|
/* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: description }),
|
|
2152
2398
|
/* @__PURE__ */ jsx("ul", { className: "mt-6 grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4", children: items.map((item) => /* @__PURE__ */ jsxs(motion.li, { variants: activeItemVariants, className: "flex flex-col", children: [
|
|
2153
2399
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start", children: [
|
|
2154
|
-
/* @__PURE__ */ jsx(CheckCircle, { className: "h-5 w-5 text-
|
|
2400
|
+
/* @__PURE__ */ jsx(CheckCircle, { className: "h-5 w-5 text-success-strong mt-0.5 flex-shrink-0" }),
|
|
2155
2401
|
/* @__PURE__ */ jsx("span", { className: "ml-3 text-sm font-medium", children: item.text })
|
|
2156
2402
|
] }),
|
|
2157
2403
|
item.helperText && item.helperLink && /* @__PURE__ */ jsxs("div", { className: "ml-8 mt-1 text-xs text-muted-foreground", children: [
|
|
@@ -2178,7 +2424,7 @@ function OnboardingChecklist({
|
|
|
2178
2424
|
"button",
|
|
2179
2425
|
{
|
|
2180
2426
|
type: "button",
|
|
2181
|
-
"aria-label":
|
|
2427
|
+
"aria-label": playVideoLabel,
|
|
2182
2428
|
className: "w-full h-full rounded-[var(--radius-lg)]",
|
|
2183
2429
|
children: [
|
|
2184
2430
|
/* @__PURE__ */ jsx(
|
|
@@ -2390,7 +2636,7 @@ var inputVariants = cva(
|
|
|
2390
2636
|
* the ring surrounds the whole group rather than a box inside it.
|
|
2391
2637
|
*/
|
|
2392
2638
|
tone: {
|
|
2393
|
-
bordered: `border border-input bg-background
|
|
2639
|
+
bordered: `border border-input bg-background ${formControlFocusClassNames.input}`,
|
|
2394
2640
|
bare: "border-0 bg-transparent shadow-none"
|
|
2395
2641
|
}
|
|
2396
2642
|
},
|
|
@@ -2419,7 +2665,7 @@ var inputControlButtonVariants = cva(
|
|
|
2419
2665
|
[
|
|
2420
2666
|
"absolute right-[var(--input-control-inset)] top-1/2 flex size-[var(--input-control-size)] -translate-y-1/2 items-center justify-center",
|
|
2421
2667
|
"rounded-[var(--radius-sm)] text-muted-foreground transition-colors duration-micro ease-out",
|
|
2422
|
-
"hover:bg-accent hover:text-foreground",
|
|
2668
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
2423
2669
|
"focus-visible:outline-none",
|
|
2424
2670
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
2425
2671
|
"[&_svg]:size-[var(--input-control-icon-size)]"
|
|
@@ -2429,7 +2675,7 @@ var fieldMessageVariants = cva("text-xs", {
|
|
|
2429
2675
|
variants: {
|
|
2430
2676
|
tone: {
|
|
2431
2677
|
description: "text-muted-foreground",
|
|
2432
|
-
error: "font-medium text-destructive"
|
|
2678
|
+
error: "font-medium text-destructive-strong"
|
|
2433
2679
|
}
|
|
2434
2680
|
}
|
|
2435
2681
|
});
|
|
@@ -2496,6 +2742,7 @@ var Input = ({
|
|
|
2496
2742
|
revealable,
|
|
2497
2743
|
revealLabel = "Show password",
|
|
2498
2744
|
hideLabel = "Hide password",
|
|
2745
|
+
clearLabel = "Clear input",
|
|
2499
2746
|
clearOnEscape,
|
|
2500
2747
|
wrapperClassName,
|
|
2501
2748
|
fieldClassName,
|
|
@@ -2646,7 +2893,7 @@ var Input = ({
|
|
|
2646
2893
|
"button",
|
|
2647
2894
|
{
|
|
2648
2895
|
type: "button",
|
|
2649
|
-
"aria-label":
|
|
2896
|
+
"aria-label": clearLabel,
|
|
2650
2897
|
disabled,
|
|
2651
2898
|
className: inputControlButtonVariants(),
|
|
2652
2899
|
style: getInputStyle(size, void 0),
|
|
@@ -2712,6 +2959,11 @@ var Input = ({
|
|
|
2712
2959
|
);
|
|
2713
2960
|
};
|
|
2714
2961
|
Input.displayName = "Input";
|
|
2962
|
+
var DEFAULT_TEAM_CHAT_LABELS = {
|
|
2963
|
+
moreOptions: "More options",
|
|
2964
|
+
addEmoji: "Add emoji",
|
|
2965
|
+
sendMessage: "Send message"
|
|
2966
|
+
};
|
|
2715
2967
|
function Avatar({ src, alt, isOnline, size = "md" }) {
|
|
2716
2968
|
const sizeClasses = size === "sm" ? "w-10 h-10" : "w-10 h-10";
|
|
2717
2969
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
@@ -2720,10 +2972,7 @@ function Avatar({ src, alt, isOnline, size = "md" }) {
|
|
|
2720
2972
|
{
|
|
2721
2973
|
src,
|
|
2722
2974
|
alt,
|
|
2723
|
-
className: cn(
|
|
2724
|
-
sizeClasses,
|
|
2725
|
-
"rounded-full ring-1 ring-gray-400 dark:ring-gray-600 object-cover"
|
|
2726
|
-
),
|
|
2975
|
+
className: cn(sizeClasses, "rounded-full ring-1 ring-border object-cover"),
|
|
2727
2976
|
width: 400,
|
|
2728
2977
|
height: 400
|
|
2729
2978
|
}
|
|
@@ -2732,8 +2981,8 @@ function Avatar({ src, alt, isOnline, size = "md" }) {
|
|
|
2732
2981
|
"span",
|
|
2733
2982
|
{
|
|
2734
2983
|
className: cn(
|
|
2735
|
-
"absolute bottom-0 right-0 w-3 h-3 rounded-full ring-2 ring-
|
|
2736
|
-
isOnline ? "bg-
|
|
2984
|
+
"absolute bottom-0 right-0 w-3 h-3 rounded-full ring-2 ring-background",
|
|
2985
|
+
isOnline ? "bg-success" : "bg-neutral-8"
|
|
2737
2986
|
)
|
|
2738
2987
|
}
|
|
2739
2988
|
)
|
|
@@ -2747,8 +2996,10 @@ function TeamChat({
|
|
|
2747
2996
|
onSendMessage,
|
|
2748
2997
|
onReactionClick,
|
|
2749
2998
|
onMoreOptions,
|
|
2999
|
+
labels: labelOverrides,
|
|
2750
3000
|
className
|
|
2751
3001
|
}) {
|
|
3002
|
+
const labels = { ...DEFAULT_TEAM_CHAT_LABELS, ...labelOverrides };
|
|
2752
3003
|
const [selectedSender, setSelectedSender] = useState(null);
|
|
2753
3004
|
const [inputValue, setInputValue] = useState("");
|
|
2754
3005
|
const uniqueSenders = Array.from(
|
|
@@ -2771,15 +3022,15 @@ function TeamChat({
|
|
|
2771
3022
|
"div",
|
|
2772
3023
|
{
|
|
2773
3024
|
className: cn(
|
|
2774
|
-
"w-full max-w-
|
|
3025
|
+
"w-full max-w-content mx-auto p-6 bg-background rounded-[var(--radius-3xl)] shadow-lg flex flex-col h-[550px] border border-border",
|
|
2775
3026
|
className
|
|
2776
3027
|
),
|
|
2777
3028
|
children: [
|
|
2778
3029
|
/* @__PURE__ */ jsxs("header", { className: "flex justify-between items-center border-b border-border pb-3 mb-6", children: [
|
|
2779
3030
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
2780
|
-
/* @__PURE__ */ jsx(Users, { className: "w-8 h-8 text-
|
|
3031
|
+
/* @__PURE__ */ jsx(Users, { className: "w-8 h-8 text-foreground" }),
|
|
2781
3032
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2782
|
-
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold text-
|
|
3033
|
+
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold text-foreground", children: chatName }),
|
|
2783
3034
|
tagline && /* @__PURE__ */ jsx("p", { className: "italic text-sm text-muted-foreground", children: tagline })
|
|
2784
3035
|
] })
|
|
2785
3036
|
] }),
|
|
@@ -2787,7 +3038,7 @@ function TeamChat({
|
|
|
2787
3038
|
"button",
|
|
2788
3039
|
{
|
|
2789
3040
|
type: "button",
|
|
2790
|
-
"aria-label":
|
|
3041
|
+
"aria-label": labels.moreOptions,
|
|
2791
3042
|
onClick: onMoreOptions,
|
|
2792
3043
|
className: "p-2 rounded-[var(--radius-lg)] hover:bg-muted transition",
|
|
2793
3044
|
children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-6 h-6 text-muted-foreground" })
|
|
@@ -2804,7 +3055,7 @@ function TeamChat({
|
|
|
2804
3055
|
onClick: () => setSelectedSender(isSelected ? null : sender.name),
|
|
2805
3056
|
className: cn(
|
|
2806
3057
|
"flex items-center gap-3 w-full p-3 mb-3 rounded-[var(--radius-lg)] transition-colors",
|
|
2807
|
-
isSelected ? "bg-
|
|
3058
|
+
isSelected ? "bg-primary text-primary-foreground" : "hover:bg-muted text-foreground"
|
|
2808
3059
|
),
|
|
2809
3060
|
children: [
|
|
2810
3061
|
/* @__PURE__ */ jsx(Avatar, { src: sender.avatar, alt: sender.name, isOnline: sender.isOnline }),
|
|
@@ -2814,18 +3065,18 @@ function TeamChat({
|
|
|
2814
3065
|
sender.name
|
|
2815
3066
|
);
|
|
2816
3067
|
}) }),
|
|
2817
|
-
/* @__PURE__ */ jsx("section", { className: "flex-1 p-6 overflow-y-auto bg-
|
|
3068
|
+
/* @__PURE__ */ jsx("section", { className: "flex-1 p-6 overflow-y-auto bg-background", children: filteredMessages.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-muted-foreground", children: "No messages to display." }) : filteredMessages.map((message) => /* @__PURE__ */ jsxs("div", { className: "mb-6 last:mb-0 group border-b border-border pb-4", children: [
|
|
2818
3069
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 mb-2", children: [
|
|
2819
3070
|
/* @__PURE__ */ jsx(Avatar, { src: message.sender.avatar, alt: message.sender.name }),
|
|
2820
3071
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2821
|
-
/* @__PURE__ */ jsx("p", { className: "font-semibold text-
|
|
3072
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-foreground", children: message.sender.name }),
|
|
2822
3073
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: message.timestamp })
|
|
2823
3074
|
] })
|
|
2824
3075
|
] }),
|
|
2825
3076
|
/* @__PURE__ */ jsx("p", { className: "text-foreground text-lg mb-1", children: message.content }),
|
|
2826
3077
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm text-muted-foreground", children: [
|
|
2827
3078
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2828
|
-
message.status === "read" && /* @__PURE__ */ jsx(DoubleCheck, { className: "w-5 h-5 text-
|
|
3079
|
+
message.status === "read" && /* @__PURE__ */ jsx(DoubleCheck, { className: "w-5 h-5 text-success-strong" }),
|
|
2829
3080
|
message.status === "delivered" && /* @__PURE__ */ jsx(Check, { className: "w-5 h-5" }),
|
|
2830
3081
|
/* @__PURE__ */ jsx("span", { children: message.timestamp })
|
|
2831
3082
|
] }),
|
|
@@ -2836,7 +3087,7 @@ function TeamChat({
|
|
|
2836
3087
|
onClick: () => onReactionClick?.(message.id, reaction.emoji),
|
|
2837
3088
|
className: cn(
|
|
2838
3089
|
"px-2 py-1 rounded-[var(--radius-md)] text-sm transition-colors",
|
|
2839
|
-
reaction.reacted ? "bg-
|
|
3090
|
+
reaction.reacted ? "bg-muted text-foreground" : "bg-muted text-muted-foreground",
|
|
2840
3091
|
"hover:bg-muted"
|
|
2841
3092
|
),
|
|
2842
3093
|
children: [
|
|
@@ -2855,7 +3106,7 @@ function TeamChat({
|
|
|
2855
3106
|
"button",
|
|
2856
3107
|
{
|
|
2857
3108
|
type: "button",
|
|
2858
|
-
"aria-label":
|
|
3109
|
+
"aria-label": labels.addEmoji,
|
|
2859
3110
|
className: "p-3 rounded-full bg-muted hover:bg-muted transition",
|
|
2860
3111
|
children: /* @__PURE__ */ jsx(FacePlus, { className: "w-6 h-6 text-muted-foreground" })
|
|
2861
3112
|
}
|
|
@@ -2874,9 +3125,9 @@ function TeamChat({
|
|
|
2874
3125
|
"button",
|
|
2875
3126
|
{
|
|
2876
3127
|
type: "button",
|
|
2877
|
-
"aria-label":
|
|
3128
|
+
"aria-label": labels.sendMessage,
|
|
2878
3129
|
onClick: handleSend,
|
|
2879
|
-
className: "p-3 rounded-full bg-
|
|
3130
|
+
className: "p-3 rounded-full bg-primary text-primary-foreground hover:brightness-90 transition",
|
|
2880
3131
|
children: /* @__PURE__ */ jsx(PaperAirplane, { className: "w-6 h-6" })
|
|
2881
3132
|
}
|
|
2882
3133
|
)
|
|
@@ -2886,6 +3137,6 @@ function TeamChat({
|
|
|
2886
3137
|
);
|
|
2887
3138
|
}
|
|
2888
3139
|
|
|
2889
|
-
export { AnimateIn, AnimateInGroup, AnimatedCard, AnimatedDrawer, AnimatedList, AnimatedModal, AnimatedPopover, AsciiText, ChangelogWidget, FadeIn, ImageViewDialog, MAX_VISUALIZER_BARS, NodeGraphCanvas, OnboardingChecklist, PageTransition, PromptAttachmentPreviews, PromptInputBox, ScaleIn, SlideIn, TeamChat, VISUALIZER_BAR_STYLES, VoiceRecorder, animatedList, animatedListItem, animationDistances, animationDurations, animationEasings, animationSprings, animationTransitions, drawerSurface, fadeIn, formatRecordingTime, getFilePreviewKey, isImageFile, modalSurface, pageTransition, popoverSurface, preventDragDefaults, reducedMotionVariants, scaleIn, slideIn };
|
|
3140
|
+
export { AnimateIn, AnimateInGroup, AnimateSwap, AnimatedCard, AnimatedDrawer, AnimatedList, AnimatedModal, AnimatedPopover, AsciiText, ChangelogWidget, DEFAULT_PROMPT_INPUT_BOX_LABELS, DEFAULT_TEAM_CHAT_LABELS, FadeIn, GRAPH_NODE_FLOW_TYPE, ImageViewDialog, MAX_VISUALIZER_BARS, NodeGraphCanvas, OnboardingChecklist, PageTransition, PromptAttachmentPreviews, PromptInputBox, ScaleIn, SlideIn, TeamChat, VISUALIZER_BAR_STYLES, VoiceRecorder, animatedList, animatedListItem, animationDistances, animationDurations, animationEasings, animationSprings, animationTransitions, applyNodePositions, drawerSurface, fadeIn, formatRecordingTime, getFilePreviewKey, graphToFlow, isImageFile, modalSurface, pageTransition, popoverSurface, preventDragDefaults, reducedMotionVariants, removeFlowEdge, removeNode, scaleIn, slideIn, tryAddEdge };
|
|
2890
3141
|
//# sourceMappingURL=index.js.map
|
|
2891
3142
|
//# sourceMappingURL=index.js.map
|