@epicbagel/saas-kit 1.13.0 → 1.15.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.
@@ -0,0 +1,81 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkW5I4FN7Gcjs = require('./chunk-W5I4FN7G.cjs');
5
+
6
+
7
+ var _chunk373W6VADcjs = require('./chunk-373W6VAD.cjs');
8
+
9
+
10
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
11
+
12
+ // src/primitives/list.tsx
13
+ var _react = require('react');
14
+ var _jsxruntime = require('react/jsx-runtime');
15
+ var spacingStyles = { none: "", tight: "space-y-1.5", normal: "space-y-3" };
16
+ var markerStyles = {
17
+ none: "list-none",
18
+ disc: "list-disc pl-5",
19
+ decimal: "list-decimal pl-5"
20
+ };
21
+ var List = _react.forwardRef.call(void 0, function List2({ ordered = false, spacing = "none", marker = "none", divided = false, inset = "none", guide = false, textSize = "inherit", tone = "inherit", marginTop = "none", surface = "none", radius = "none", className, ...props }, ref) {
22
+ const Component = ordered ? "ol" : "ul";
23
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24
+ Component,
25
+ {
26
+ ref,
27
+ role: marker === "none" ? "list" : void 0,
28
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
29
+ spacingStyles[spacing],
30
+ markerStyles[marker],
31
+ divided && "divide-y divide-border",
32
+ inset === "xs" && "pl-1",
33
+ inset === "md" && "pl-4",
34
+ guide && "border-l border-border",
35
+ textSize === "xs" && "text-xs",
36
+ textSize === "sm" && "text-sm",
37
+ tone === "muted" && "text-muted-foreground",
38
+ tone === "soft" && "text-foreground/80",
39
+ marginTop === "sm" && "mt-2",
40
+ marginTop === "md" && "mt-4",
41
+ surface === "bordered" && "border border-border bg-background",
42
+ radius === "md" && "rounded-md",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ });
49
+ var ListItem = _react.forwardRef.call(void 0, function ListItem2({ className, layout = "plain", sentiment = "neutral", actions, children, surface = "none", padding = "none", textSize = "inherit", tone = "inherit", position = "static", justify = "start", align = "start", gap = "xs", interactiveGroup = false, radius = "none", accent = "none", ...props }, ref) {
50
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ref, className: _chunkKWLSBTB2cjs.cn.call(void 0,
51
+ layout === "row" && "flex items-start",
52
+ surface === "bordered" && "rounded-md border",
53
+ padding === "sm" && "p-2",
54
+ padding === "md" && "px-3 py-2",
55
+ padding === "compact" && "py-2.5",
56
+ textSize === "xs" && "text-xs",
57
+ textSize === "sm" && "text-sm",
58
+ tone === "soft" && "text-foreground/80",
59
+ position === "relative" && "relative",
60
+ justify === "between" && "justify-between gap-3",
61
+ align === "center" && "items-center",
62
+ align === "baseline" && "items-baseline",
63
+ gap === "xs" && "gap-1.5",
64
+ gap === "sm" && "gap-2",
65
+ interactiveGroup && "group",
66
+ radius === "md" && "rounded-md",
67
+ accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
68
+ accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
69
+ layout === "bullet" && "group flex min-h-8 items-start gap-3 pointer-coarse:min-h-[max(44px,2.75rem)]",
70
+ className
71
+ ), ...props, children: layout === "bullet" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
72
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW5I4FN7Gcjs.SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
73
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "div", variant: "small", className: "min-w-0 flex-1 leading-snug [overflow-wrap:anywhere]", children }),
74
+ actions
75
+ ] }) : children });
76
+ });
77
+
78
+
79
+
80
+
81
+ exports.List = List; exports.ListItem = ListItem;
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ import {
3
+ SentimentDot
4
+ } from "./chunk-YWAQRAXP.js";
5
+ import {
6
+ Text
7
+ } from "./chunk-EIY5LLSP.js";
8
+ import {
9
+ cn
10
+ } from "./chunk-G6SRSWXB.js";
11
+
12
+ // src/primitives/list.tsx
13
+ import { forwardRef } from "react";
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ var spacingStyles = { none: "", tight: "space-y-1.5", normal: "space-y-3" };
16
+ var markerStyles = {
17
+ none: "list-none",
18
+ disc: "list-disc pl-5",
19
+ decimal: "list-decimal pl-5"
20
+ };
21
+ var List = forwardRef(function List2({ ordered = false, spacing = "none", marker = "none", divided = false, inset = "none", guide = false, textSize = "inherit", tone = "inherit", marginTop = "none", surface = "none", radius = "none", className, ...props }, ref) {
22
+ const Component = ordered ? "ol" : "ul";
23
+ return /* @__PURE__ */ jsx(
24
+ Component,
25
+ {
26
+ ref,
27
+ role: marker === "none" ? "list" : void 0,
28
+ className: cn(
29
+ spacingStyles[spacing],
30
+ markerStyles[marker],
31
+ divided && "divide-y divide-border",
32
+ inset === "xs" && "pl-1",
33
+ inset === "md" && "pl-4",
34
+ guide && "border-l border-border",
35
+ textSize === "xs" && "text-xs",
36
+ textSize === "sm" && "text-sm",
37
+ tone === "muted" && "text-muted-foreground",
38
+ tone === "soft" && "text-foreground/80",
39
+ marginTop === "sm" && "mt-2",
40
+ marginTop === "md" && "mt-4",
41
+ surface === "bordered" && "border border-border bg-background",
42
+ radius === "md" && "rounded-md",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ });
49
+ var ListItem = forwardRef(function ListItem2({ className, layout = "plain", sentiment = "neutral", actions, children, surface = "none", padding = "none", textSize = "inherit", tone = "inherit", position = "static", justify = "start", align = "start", gap = "xs", interactiveGroup = false, radius = "none", accent = "none", ...props }, ref) {
50
+ return /* @__PURE__ */ jsx("li", { ref, className: cn(
51
+ layout === "row" && "flex items-start",
52
+ surface === "bordered" && "rounded-md border",
53
+ padding === "sm" && "p-2",
54
+ padding === "md" && "px-3 py-2",
55
+ padding === "compact" && "py-2.5",
56
+ textSize === "xs" && "text-xs",
57
+ textSize === "sm" && "text-sm",
58
+ tone === "soft" && "text-foreground/80",
59
+ position === "relative" && "relative",
60
+ justify === "between" && "justify-between gap-3",
61
+ align === "center" && "items-center",
62
+ align === "baseline" && "items-baseline",
63
+ gap === "xs" && "gap-1.5",
64
+ gap === "sm" && "gap-2",
65
+ interactiveGroup && "group",
66
+ radius === "md" && "rounded-md",
67
+ accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
68
+ accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
69
+ layout === "bullet" && "group flex min-h-8 items-start gap-3 pointer-coarse:min-h-[max(44px,2.75rem)]",
70
+ className
71
+ ), ...props, children: layout === "bullet" ? /* @__PURE__ */ jsxs(Fragment, { children: [
72
+ /* @__PURE__ */ jsx(SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
73
+ /* @__PURE__ */ jsx(Text, { as: "div", variant: "small", className: "min-w-0 flex-1 leading-snug [overflow-wrap:anywhere]", children }),
74
+ actions
75
+ ] }) : children });
76
+ });
77
+
78
+ export {
79
+ List,
80
+ ListItem
81
+ };
@@ -4,7 +4,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const alertVariants: (props?: ({
7
- variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
7
+ variant?: "success" | "default" | "destructive" | "warning" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface AlertProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
10
10
  marginBottom?: "none" | "md";
@@ -4,7 +4,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const alertVariants: (props?: ({
7
- variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
7
+ variant?: "success" | "default" | "destructive" | "warning" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface AlertProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
10
10
  marginBottom?: "none" | "md";
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { ElementType } from 'react';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "error" | "info" | "neutral" | null | undefined;
7
+ variant?: "neutral" | "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
10
10
  weight?: "normal" | "semibold" | "bold";
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { ElementType } from 'react';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "error" | "info" | "neutral" | null | undefined;
7
+ variant?: "neutral" | "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
10
10
  weight?: "normal" | "semibold" | "bold";
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
7
7
  declare const bubbleVariants: (props?: ({
8
- variant?: "default" | "muted" | "secondary" | "destructive" | "outline" | "ghost" | "tinted" | null | undefined;
8
+ variant?: "default" | "muted" | "ghost" | "secondary" | "destructive" | "outline" | "tinted" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
11
11
  align?: "start" | "end";
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
7
7
  declare const bubbleVariants: (props?: ({
8
- variant?: "default" | "muted" | "secondary" | "destructive" | "outline" | "ghost" | "tinted" | null | undefined;
8
+ variant?: "default" | "muted" | "ghost" | "secondary" | "destructive" | "outline" | "tinted" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
11
11
  align?: "start" | "end";
@@ -4,8 +4,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const buttonVariants: (props?: ({
7
- variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-muted" | "ghost" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
- size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | "tone" | null | undefined;
7
+ variant?: "link" | "default" | "ghost" | "secondary" | "destructive" | "outline" | "outline-muted" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
+ size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "tone" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | null | undefined;
9
9
  width?: "auto" | "full" | "responsive" | null | undefined;
10
10
  align?: "center" | "start" | null | undefined;
11
11
  shrink?: boolean | null | undefined;
@@ -4,8 +4,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const buttonVariants: (props?: ({
7
- variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-muted" | "ghost" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
- size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | "tone" | null | undefined;
7
+ variant?: "link" | "default" | "ghost" | "secondary" | "destructive" | "outline" | "outline-muted" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
+ size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "tone" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | null | undefined;
9
9
  width?: "auto" | "full" | "responsive" | null | undefined;
10
10
  align?: "center" | "start" | null | undefined;
11
11
  shrink?: boolean | null | undefined;
@@ -2,15 +2,15 @@
2
2
  "use client";
3
3
 
4
4
 
5
- var _chunkQWUMIAYDcjs = require('../chunk-QWUMIAYD.cjs');
6
5
 
7
6
 
8
- var _chunkYMI3X2YLcjs = require('../chunk-YMI3X2YL.cjs');
7
+ var _chunk2BTDBZYNcjs = require('../chunk-2BTDBZYN.cjs');
9
8
 
10
9
 
10
+ var _chunkQWUMIAYDcjs = require('../chunk-QWUMIAYD.cjs');
11
11
 
12
12
 
13
- var _chunk2BTDBZYNcjs = require('../chunk-2BTDBZYN.cjs');
13
+ var _chunkYMI3X2YLcjs = require('../chunk-YMI3X2YL.cjs');
14
14
 
15
15
 
16
16
 
@@ -26,7 +26,8 @@ var _chunkB765DSRGcjs = require('../chunk-B765DSRG.cjs');
26
26
 
27
27
 
28
28
 
29
- var _chunk5VMKDVB6cjs = require('../chunk-5VMKDVB6.cjs');
29
+ var _chunkPD5UQEKYcjs = require('../chunk-PD5UQEKY.cjs');
30
+ require('../chunk-34AS3OCC.cjs');
30
31
 
31
32
 
32
33
 
@@ -75,6 +76,7 @@ var _chunkFYRQFEU4cjs = require('../chunk-FYRQFEU4.cjs');
75
76
 
76
77
  var _chunk2KFZQJH5cjs = require('../chunk-2KFZQJH5.cjs');
77
78
  require('../chunk-PQUSJEXL.cjs');
79
+ require('../chunk-WABCLRBR.cjs');
78
80
  require('../chunk-NKWHDI4C.cjs');
79
81
 
80
82
 
@@ -176,15 +178,15 @@ var ChatThread = _react.forwardRef.call(void 0,
176
178
  const markers = timelineMarkers(messages, /* @__PURE__ */ new Date());
177
179
  const anchorId = useArrivingUserTurnId(messages);
178
180
  const workspace = appearance === "workspace";
179
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerProvider, { autoScroll: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
180
- _chunk5VMKDVB6cjs.MessageScroller,
181
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPD5UQEKYcjs.MessageScrollerProvider, { autoScroll: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
182
+ _chunkPD5UQEKYcjs.MessageScroller,
181
183
  {
182
184
  ref,
183
185
  style: { maxHeight },
184
186
  className: _chunkKWLSBTB2cjs.cn.call(void 0, "min-h-0", className),
185
187
  children: [
186
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerViewport, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
187
- _chunk5VMKDVB6cjs.MessageScrollerContent,
188
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPD5UQEKYcjs.MessageScrollerViewport, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
189
+ _chunkPD5UQEKYcjs.MessageScrollerContent,
188
190
  {
189
191
  className: _chunkKWLSBTB2cjs.cn.call(void 0,
190
192
  workspace ? "mx-auto w-full max-w-3xl gap-10 px-4 py-6 md:px-6 md:py-8" : "gap-2.5 px-px py-px"
@@ -193,7 +195,7 @@ var ChatThread = _react.forwardRef.call(void 0,
193
195
  messages.map((m, index) => {
194
196
  const isUser = m.role === "user";
195
197
  if (m.status === "running") {
196
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
198
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPD5UQEKYcjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
197
199
  ChatRunningLine,
198
200
  {
199
201
  label: m.text || pendingLabel,
@@ -206,7 +208,7 @@ var ChatThread = _react.forwardRef.call(void 0,
206
208
  const marker = markers[index];
207
209
  const actions = messageActions && offersActions(m) ? messageActions(m) : null;
208
210
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
209
- _chunk5VMKDVB6cjs.MessageScrollerItem,
211
+ _chunkPD5UQEKYcjs.MessageScrollerItem,
210
212
  {
211
213
  messageId: m.id,
212
214
  scrollAnchor: m.id === anchorId,
@@ -262,15 +264,15 @@ var ChatThread = _react.forwardRef.call(void 0,
262
264
  m.id
263
265
  );
264
266
  }),
265
- pending && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatRunningLine, { label: pendingLabel, workspace }) }),
267
+ pending && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPD5UQEKYcjs.MessageScrollerItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatRunningLine, { label: pendingLabel, workspace }) }),
266
268
  footer && // Always painted: content-visibility:auto would contain the
267
269
  // footer's paint and layout, clipping a ring or shadow at its
268
270
  // edge and re-parenting anything fixed inside it.
269
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerItem, { className: "[content-visibility:visible]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.Message, { align: "start", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.MessageContent, { children: footer }) }) })
271
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPD5UQEKYcjs.MessageScrollerItem, { className: "[content-visibility:visible]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.Message, { align: "start", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNWDPH2Z7cjs.MessageContent, { children: footer }) }) })
270
272
  ]
271
273
  }
272
274
  ) }),
273
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk5VMKDVB6cjs.MessageScrollerButton, { variant: "outline", className: "rounded-full shadow-sm", children: [
275
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkPD5UQEKYcjs.MessageScrollerButton, { variant: "outline", className: "rounded-full shadow-sm", children: [
274
276
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowDown, { className: "h-4 w-4" }),
275
277
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: scrollButtonLabel })
276
278
  ] })
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  "use client";
3
+ import {
4
+ Trace,
5
+ TraceLine,
6
+ TraceTitle
7
+ } from "../chunk-Z45YKVAM.js";
3
8
  import {
4
9
  VoiceDictationButton
5
10
  } from "../chunk-JKVVTFAP.js";
6
11
  import {
7
12
  VoiceSessionControls
8
13
  } from "../chunk-KF4X37DP.js";
9
- import {
10
- Trace,
11
- TraceLine,
12
- TraceTitle
13
- } from "../chunk-Z45YKVAM.js";
14
14
  import {
15
15
  Suggestion,
16
16
  Suggestions
@@ -26,7 +26,8 @@ import {
26
26
  MessageScrollerItem,
27
27
  MessageScrollerProvider,
28
28
  MessageScrollerViewport
29
- } from "../chunk-2V7AVB2U.js";
29
+ } from "../chunk-UBTLWSKK.js";
30
+ import "../chunk-VT2WDFSU.js";
30
31
  import {
31
32
  Message,
32
33
  MessageAction,
@@ -75,6 +76,7 @@ import {
75
76
  ActionDock
76
77
  } from "../chunk-42RTTHND.js";
77
78
  import "../chunk-QMA3WVB7.js";
79
+ import "../chunk-3OWGL4Q2.js";
78
80
  import "../chunk-5OF6D3GH.js";
79
81
  import {
80
82
  Button
@@ -1,7 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
2
 
3
3
 
4
- var _chunkW5I4FN7Gcjs = require('../chunk-W5I4FN7G.cjs');
4
+
5
+ var _chunkWE3F6EUMcjs = require('../chunk-WE3F6EUM.cjs');
6
+ require('../chunk-W5I4FN7G.cjs');
5
7
 
6
8
 
7
9
  var _chunk373W6VADcjs = require('../chunk-373W6VAD.cjs');
@@ -49,36 +51,29 @@ function EditableList({
49
51
  };
50
52
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "border-t border-border pt-4", className), children: [
51
53
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
52
- items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "mt-3 space-y-3", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { className: "group flex items-start gap-3", children: [
53
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW5I4FN7Gcjs.SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
54
- !readOnly && _optionalChain([editing, 'optionalAccess', _5 => _5.index]) === index ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
55
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
56
- _chunkPQUSJEXLcjs.Input,
57
- {
58
- autoFocus: true,
59
- value: editing.value,
60
- "aria-label": `Edit ${itemName}`,
61
- onChange: (event) => setEditing({ index, value: event.target.value }),
62
- onKeyDown: (event) => {
63
- if (event.key === "Enter") {
64
- event.preventDefault();
65
- commitEdit();
66
- }
67
- if (event.key === "Escape") setEditing(null);
68
- },
69
- grow: true
54
+ items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWE3F6EUMcjs.List, { spacing: "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWE3F6EUMcjs.ListItem, { layout: "bullet", sentiment, actions: !readOnly && (_optionalChain([editing, 'optionalAccess', _5 => _5.index]) === index ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
55
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4" }) }),
56
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
57
+ ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
58
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Pencil, { className: "h-4 w-4" }) }),
59
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
60
+ ] })), children: !readOnly && _optionalChain([editing, 'optionalAccess', _6 => _6.index]) === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
61
+ _chunkPQUSJEXLcjs.Input,
62
+ {
63
+ autoFocus: true,
64
+ value: editing.value,
65
+ "aria-label": `Edit ${itemName}`,
66
+ onChange: (event) => setEditing({ index, value: event.target.value }),
67
+ onKeyDown: (event) => {
68
+ if (event.key === "Enter") {
69
+ event.preventDefault();
70
+ commitEdit();
70
71
  }
71
- ),
72
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4" }) }),
73
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
74
- ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
75
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "span", variant: "small", className: "flex-1 leading-snug", children: item }),
76
- !readOnly && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
77
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Pencil, { className: "h-4 w-4" }) }),
78
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
79
- ] })
80
- ] })
81
- ] }, `${item}-${index}`)) }),
72
+ if (event.key === "Escape") setEditing(null);
73
+ },
74
+ grow: true
75
+ }
76
+ ) : item }, `${item}-${index}`)) }),
82
77
  !readOnly && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-3 flex items-center gap-2", children: [
83
78
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
84
79
  _chunkPQUSJEXLcjs.Input,
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
  import {
3
- SentimentDot
4
- } from "../chunk-YWAQRAXP.js";
3
+ List,
4
+ ListItem
5
+ } from "../chunk-YFXZWDA5.js";
6
+ import "../chunk-YWAQRAXP.js";
5
7
  import {
6
8
  Text
7
9
  } from "../chunk-EIY5LLSP.js";
@@ -49,36 +51,29 @@ function EditableList({
49
51
  };
50
52
  return /* @__PURE__ */ jsxs("section", { className: cn("border-t border-border pt-4", className), children: [
51
53
  /* @__PURE__ */ jsx(Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
52
- items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ jsx("ul", { className: "mt-3 space-y-3", children: items.map((item, index) => /* @__PURE__ */ jsxs("li", { className: "group flex items-start gap-3", children: [
53
- /* @__PURE__ */ jsx(SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
54
- !readOnly && editing?.index === index ? /* @__PURE__ */ jsxs(Fragment, { children: [
55
- /* @__PURE__ */ jsx(
56
- Input,
57
- {
58
- autoFocus: true,
59
- value: editing.value,
60
- "aria-label": `Edit ${itemName}`,
61
- onChange: (event) => setEditing({ index, value: event.target.value }),
62
- onKeyDown: (event) => {
63
- if (event.key === "Enter") {
64
- event.preventDefault();
65
- commitEdit();
66
- }
67
- if (event.key === "Escape") setEditing(null);
68
- },
69
- grow: true
54
+ items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ jsx(List, { spacing: "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ jsx(ListItem, { layout: "bullet", sentiment, actions: !readOnly && (editing?.index === index ? /* @__PURE__ */ jsxs(Fragment, { children: [
55
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }),
56
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
57
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
58
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" }) }),
59
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
60
+ ] })), children: !readOnly && editing?.index === index ? /* @__PURE__ */ jsx(
61
+ Input,
62
+ {
63
+ autoFocus: true,
64
+ value: editing.value,
65
+ "aria-label": `Edit ${itemName}`,
66
+ onChange: (event) => setEditing({ index, value: event.target.value }),
67
+ onKeyDown: (event) => {
68
+ if (event.key === "Enter") {
69
+ event.preventDefault();
70
+ commitEdit();
70
71
  }
71
- ),
72
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }),
73
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
74
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
75
- /* @__PURE__ */ jsx(Text, { as: "span", variant: "small", className: "flex-1 leading-snug", children: item }),
76
- !readOnly && /* @__PURE__ */ jsxs(Fragment, { children: [
77
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" }) }),
78
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
79
- ] })
80
- ] })
81
- ] }, `${item}-${index}`)) }),
72
+ if (event.key === "Escape") setEditing(null);
73
+ },
74
+ grow: true
75
+ }
76
+ ) : item }, `${item}-${index}`)) }),
82
77
  !readOnly && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
83
78
  /* @__PURE__ */ jsx(
84
79
  Input,
@@ -1,68 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
5
4
 
6
- // src/primitives/list.tsx
7
- var _react = require('react');
8
- var _jsxruntime = require('react/jsx-runtime');
9
- var spacingStyles = { none: "", tight: "space-y-1.5", normal: "space-y-3" };
10
- var markerStyles = {
11
- none: "list-none",
12
- disc: "list-disc pl-5",
13
- decimal: "list-decimal pl-5"
14
- };
15
- var List = _react.forwardRef.call(void 0, function List2({ ordered = false, spacing = "none", marker = "none", divided = false, inset = "none", guide = false, textSize = "inherit", tone = "inherit", marginTop = "none", surface = "none", radius = "none", className, ...props }, ref) {
16
- const Component = ordered ? "ol" : "ul";
17
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18
- Component,
19
- {
20
- ref,
21
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
22
- spacingStyles[spacing],
23
- markerStyles[marker],
24
- divided && "divide-y divide-border",
25
- inset === "xs" && "pl-1",
26
- inset === "md" && "pl-4",
27
- guide && "border-l border-border",
28
- textSize === "xs" && "text-xs",
29
- textSize === "sm" && "text-sm",
30
- tone === "muted" && "text-muted-foreground",
31
- tone === "soft" && "text-foreground/80",
32
- marginTop === "sm" && "mt-2",
33
- marginTop === "md" && "mt-4",
34
- surface === "bordered" && "border border-border bg-background",
35
- radius === "md" && "rounded-md",
36
- className
37
- ),
38
- ...props
39
- }
40
- );
41
- });
42
- var ListItem = _react.forwardRef.call(void 0, function ListItem2({ className, layout = "plain", surface = "none", padding = "none", textSize = "inherit", tone = "inherit", position = "static", justify = "start", align = "start", gap = "xs", interactiveGroup = false, radius = "none", accent = "none", ...props }, ref) {
43
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ref, className: _chunkKWLSBTB2cjs.cn.call(void 0,
44
- layout === "row" && "flex items-start",
45
- surface === "bordered" && "rounded-md border",
46
- padding === "sm" && "p-2",
47
- padding === "md" && "px-3 py-2",
48
- padding === "compact" && "py-2.5",
49
- textSize === "xs" && "text-xs",
50
- textSize === "sm" && "text-sm",
51
- tone === "soft" && "text-foreground/80",
52
- position === "relative" && "relative",
53
- justify === "between" && "justify-between gap-3",
54
- align === "center" && "items-center",
55
- align === "baseline" && "items-baseline",
56
- gap === "xs" && "gap-1.5",
57
- gap === "sm" && "gap-2",
58
- interactiveGroup && "group",
59
- radius === "md" && "rounded-md",
60
- accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
61
- accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
62
- className
63
- ), ...props });
64
- });
5
+ var _chunkWE3F6EUMcjs = require('../chunk-WE3F6EUM.cjs');
6
+ require('../chunk-W5I4FN7G.cjs');
7
+ require('../chunk-373W6VAD.cjs');
8
+ require('../chunk-EJP2L5QV.cjs');
9
+ require('../chunk-KWLSBTB2.cjs');
65
10
 
66
11
 
67
12
 
68
- exports.List = List; exports.ListItem = ListItem;
13
+ exports.List = _chunkWE3F6EUMcjs.List; exports.ListItem = _chunkWE3F6EUMcjs.ListItem;