@designa8/vibedesign-v6 2.2.1 → 2.2.3

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @plasma/vibedesign-v6
2
2
 
3
- Complete design system generated by Atoms Design, version **2.2.1**.
3
+ Complete design system generated by Atoms Design, version **2.2.3**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -975,9 +975,9 @@ var variantClasses2 = {
975
975
  error: "bg-[var(--color-semantic-error-soft)] text-[var(--color-semantic-error)] border border-[var(--color-semantic-error)]"
976
976
  };
977
977
  var sizeClasses3 = {
978
- sm: { chip: "h-6 px-xs gap-xs rounded-xs", text: "text-caption", icon: "w-3 h-3", thumb: "w-4 h-4", dismissSize: "sm" },
979
- md: { chip: "h-8 px-sm gap-xs rounded-sm", text: "text-body-sm", icon: "w-4 h-4", thumb: "w-5 h-5", dismissSize: "sm" },
980
- lg: { chip: "h-10 px-md gap-sm rounded-md", text: "text-body-md", icon: "w-5 h-5", thumb: "w-6 h-6", dismissSize: "sm" }
978
+ sm: { chip: "h-6 px-xs gap-xs rounded-xs", text: "text-caption", icon: "w-3 h-3", thumb: "w-4 h-4", dismissSize: "sm", progressHeight: "h-1" },
979
+ md: { chip: "h-8 px-sm gap-xs rounded-sm", text: "text-body-sm", icon: "w-4 h-4", thumb: "w-5 h-5", dismissSize: "sm", progressHeight: "h-1.5" },
980
+ lg: { chip: "h-10 px-md gap-sm rounded-md", text: "text-body-md", icon: "w-5 h-5", thumb: "w-6 h-6", dismissSize: "sm", progressHeight: "h-2" }
981
981
  };
982
982
  var Chip = import_react5.default.forwardRef(
983
983
  ({
@@ -987,6 +987,7 @@ var Chip = import_react5.default.forwardRef(
987
987
  icon,
988
988
  imageSrc,
989
989
  imageAlt,
990
+ uploadProgress,
990
991
  onDismiss,
991
992
  disabled = false,
992
993
  className = "",
@@ -997,16 +998,41 @@ var Chip = import_react5.default.forwardRef(
997
998
  const [lightboxOpen, setLightboxOpen] = (0, import_react5.useState)(false);
998
999
  const disabledStyles = disabled ? "opacity-50 pointer-events-none select-none" : "";
999
1000
  const isLightboxTrigger = Boolean(imageSrc) && !disabled;
1001
+ const showProgressBar = imageSrc && typeof uploadProgress === "number" && uploadProgress < 100;
1000
1002
  const openLightbox = () => {
1001
1003
  if (isLightboxTrigger) setLightboxOpen(true);
1002
1004
  };
1003
- const handleBodyKeyDown = (e) => {
1004
- if (!isLightboxTrigger) return;
1005
- if (e.key === "Enter" || e.key === " " || e.key === "Spacebar") {
1006
- e.preventDefault();
1007
- openLightbox();
1005
+ const renderThumbnail = () => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1006
+ "span",
1007
+ {
1008
+ className: `${sz.thumb} flex-shrink-0 rounded-xs overflow-hidden inline-block relative`,
1009
+ "aria-hidden": "true",
1010
+ children: [
1011
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1012
+ "img",
1013
+ {
1014
+ src: imageSrc,
1015
+ alt: imageAlt || label,
1016
+ className: "w-full h-full object-cover"
1017
+ }
1018
+ ),
1019
+ showProgressBar && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1020
+ "div",
1021
+ {
1022
+ className: `absolute bottom-0 left-0 right-0 ${sz.progressHeight} bg-scrim`,
1023
+ "aria-label": `Upload progress: ${uploadProgress}%`,
1024
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1025
+ "div",
1026
+ {
1027
+ className: `h-full bg-primary transition-all duration-200`,
1028
+ style: { width: `${uploadProgress}%` }
1029
+ }
1030
+ )
1031
+ }
1032
+ )
1033
+ ]
1008
1034
  }
1009
- };
1035
+ );
1010
1036
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1011
1037
  "span",
1012
1038
  {
@@ -1022,43 +1048,30 @@ var Chip = import_react5.default.forwardRef(
1022
1048
  ].filter(Boolean).join(" "),
1023
1049
  ...props,
1024
1050
  children: [
1025
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1026
- "span",
1051
+ isLightboxTrigger ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1052
+ Button,
1027
1053
  {
1028
- className: "inline-flex items-center gap-xs",
1029
- onClick: isLightboxTrigger ? openLightbox : void 0,
1030
- onKeyDown: isLightboxTrigger ? handleBodyKeyDown : void 0,
1031
- role: isLightboxTrigger ? "button" : void 0,
1032
- tabIndex: isLightboxTrigger ? 0 : void 0,
1033
- "aria-label": isLightboxTrigger ? `View image for ${label}` : void 0,
1034
- style: isLightboxTrigger ? { cursor: "pointer" } : void 0,
1054
+ variant: "bare",
1055
+ size: "auto",
1056
+ onClick: openLightbox,
1057
+ "aria-label": `View image for ${label}`,
1058
+ className: "inline-flex items-center gap-xs cursor-pointer p-0 m-0 hover:opacity-80 transition-opacity",
1035
1059
  children: [
1036
- imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1037
- "span",
1038
- {
1039
- className: `${sz.thumb} flex-shrink-0 rounded-xs overflow-hidden inline-block`,
1040
- "aria-hidden": "true",
1041
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1042
- "img",
1043
- {
1044
- src: imageSrc,
1045
- alt: imageAlt || label,
1046
- className: "w-full h-full object-cover"
1047
- }
1048
- )
1049
- }
1050
- ) : icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1051
- "span",
1052
- {
1053
- className: `${sz.icon} flex-shrink-0 flex items-center justify-center`,
1054
- "aria-hidden": "true",
1055
- children: icon
1056
- }
1057
- ),
1060
+ renderThumbnail(),
1058
1061
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: sz.text, children: label })
1059
1062
  ]
1060
1063
  }
1061
- ),
1064
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "inline-flex items-center gap-xs", children: [
1065
+ imageSrc ? renderThumbnail() : icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1066
+ "span",
1067
+ {
1068
+ className: `${sz.icon} flex-shrink-0 flex items-center justify-center`,
1069
+ "aria-hidden": "true",
1070
+ children: icon
1071
+ }
1072
+ ),
1073
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: sz.text, children: label })
1074
+ ] }),
1062
1075
  onDismiss && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1063
1076
  Button,
1064
1077
  {
@@ -2778,11 +2791,17 @@ var TimelineBlock = ({ items }) => {
2778
2791
  ] });
2779
2792
  };
2780
2793
  var AgentConversationMark = ({ mark, align = "start" }) => {
2781
- const pillClasses = "inline-flex items-center gap-xs rounded-full bg-canvas px-sm py-xxs text-caption font-weight-heading-sm text-primary shadow-sm hover:bg-surface-soft transition-colors duration-150 whitespace-nowrap";
2782
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: ["flex mt-sm", align === "end" ? "justify-end" : "justify-start"].join(" "), children: mark.href ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("a", { href: mark.href, className: pillClasses, children: [
2783
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "two-people-users-group", size: 12 }),
2784
- mark.label
2785
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2794
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: ["flex mt-sm", align === "end" ? "justify-end" : "justify-start"].join(" "), children: mark.href ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2795
+ "a",
2796
+ {
2797
+ href: mark.href,
2798
+ className: "inline-flex items-center gap-xs rounded-full bg-canvas px-sm py-xxs text-caption font-weight-heading-sm text-primary shadow-sm whitespace-nowrap cursor-pointer transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
2799
+ children: [
2800
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "two-people-users-group", size: 12 }),
2801
+ mark.label
2802
+ ]
2803
+ }
2804
+ ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2786
2805
  Button,
2787
2806
  {
2788
2807
  variant: "ghost",
@@ -2871,7 +2890,7 @@ var SuggestedImageWidget = ({
2871
2890
  setSelectedId(void 0);
2872
2891
  setIsOpen(true);
2873
2892
  };
2874
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mt-md", children: [
2893
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mb-md flex flex-col items-start self-start", children: [
2875
2894
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2876
2895
  Button,
2877
2896
  {
@@ -2879,7 +2898,7 @@ var SuggestedImageWidget = ({
2879
2898
  variant: "ghost",
2880
2899
  pushEffect: false,
2881
2900
  onClick: handleOpen,
2882
- className: "group relative block !p-0 max-w-full overflow-hidden rounded-lg bg-surface-strong border border-hairline",
2901
+ className: "group relative block self-start !p-0 max-w-full overflow-hidden rounded-lg bg-surface-strong border border-hairline",
2883
2902
  style: { maxHeight: "14rem", width: "20rem" },
2884
2903
  "aria-label": alt ?? "Open design suggestion",
2885
2904
  children: [
@@ -2888,7 +2907,7 @@ var SuggestedImageWidget = ({
2888
2907
  {
2889
2908
  src,
2890
2909
  alt: alt ?? "",
2891
- className: "w-full object-cover transition-transform duration-150 group-hover:scale-[1.02]",
2910
+ className: "block w-full object-cover object-top transition-transform duration-150 group-hover:scale-[1.02]",
2892
2911
  style: { maxHeight: "14rem" }
2893
2912
  }
2894
2913
  ),
@@ -2897,7 +2916,7 @@ var SuggestedImageWidget = ({
2897
2916
  {
2898
2917
  src: opt.src,
2899
2918
  alt: opt.label,
2900
- className: "h-10 w-10 flex-shrink-0 rounded-sm object-cover border border-hairline"
2919
+ className: "h-10 w-10 flex-shrink-0 rounded-sm object-cover object-top border border-hairline"
2901
2920
  },
2902
2921
  opt.id
2903
2922
  )) })
@@ -3021,13 +3040,16 @@ var CopyMessageButton = ({
3021
3040
  };
3022
3041
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-end mb-xs", children: [
3023
3042
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3024
- "button",
3043
+ Button,
3025
3044
  {
3026
3045
  type: "button",
3046
+ variant: "bare",
3047
+ size: "auto",
3048
+ pushEffect: false,
3027
3049
  onClick: handleCopy,
3028
3050
  "aria-label": copied ? "Message copied" : "Copy message",
3029
3051
  "data-copied": copied ? "true" : "false",
3030
- className: "inline-flex items-center justify-center rounded-xs p-xxs text-muted-soft opacity-0 cursor-pointer transition duration-150 ease-out hover:text-ink active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 data-[copied=true]:opacity-100",
3052
+ className: "inline-flex items-center justify-center rounded-xs p-xxs text-muted-soft opacity-0 hover:text-ink active:scale-[0.98] focus-visible:ring-focus-blue group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 data-[copied=true]:opacity-100",
3031
3053
  children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3032
3054
  Icon,
3033
3055
  {
@@ -3080,7 +3102,8 @@ var ThinkingIndicator = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(imp
3080
3102
  ] });
3081
3103
  var AiMessage = ({ message }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start gap-md w-full", children: [
3082
3104
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AIAvatar, {}),
3083
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-1 min-w-0", children: [
3105
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-1 min-w-0 flex flex-col items-stretch justify-start", children: [
3106
+ message.suggestedImage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SuggestedImageWidget, { suggestedImage: message.suggestedImage }),
3084
3107
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3085
3108
  ExpandableMessage,
3086
3109
  {
@@ -3092,7 +3115,6 @@ var AiMessage = ({ message }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3092
3115
  ),
3093
3116
  message.inFlight && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ThinkingIndicator, {}),
3094
3117
  message.images && message.images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MessageImageGallery, { images: message.images, align: "start" }),
3095
- message.suggestedImage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SuggestedImageWidget, { suggestedImage: message.suggestedImage }),
3096
3118
  message.timeline && message.timeline.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TimelineBlock, { items: message.timeline }),
3097
3119
  message.agentMark && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AgentConversationMark, { mark: message.agentMark, align: "start" }),
3098
3120
  message.postContent && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -3143,11 +3165,14 @@ var UserMessage = ({ message }) => {
3143
3165
  hasText && failed && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mt-xs flex items-center gap-sm justify-end", children: [
3144
3166
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-caption text-semantic-error", children: "Not sent" }),
3145
3167
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3146
- "button",
3168
+ Button,
3147
3169
  {
3148
3170
  type: "button",
3171
+ variant: "bare",
3172
+ size: "auto",
3173
+ pushEffect: false,
3149
3174
  onClick: () => message.onRetry?.(message),
3150
- className: "rounded-xs text-caption text-primary-text underline underline-offset-2 cursor-pointer transition duration-150 ease-out hover:text-primary-active active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
3175
+ className: "rounded-xs text-caption text-primary-text underline underline-offset-2 hover:text-primary-active active:scale-[0.98] focus-visible:ring-focus-blue",
3151
3176
  children: "Retry"
3152
3177
  }
3153
3178
  )
@@ -3493,7 +3518,7 @@ var HistoryRow = ({ item, active = false, onClick }) => {
3493
3518
  "li",
3494
3519
  {
3495
3520
  className: [
3496
- "list-none flex items-center gap-xs rounded-md pr-xs",
3521
+ "list-none flex items-center gap-xs rounded-none pr-xs",
3497
3522
  "transition-colors duration-150 ease-out",
3498
3523
  active ? "bg-primary-disabled" : hovered ? "bg-surface-soft" : "bg-transparent"
3499
3524
  ].join(" "),
@@ -3501,16 +3526,16 @@ var HistoryRow = ({ item, active = false, onClick }) => {
3501
3526
  onMouseLeave: () => setHovered(false),
3502
3527
  children: [
3503
3528
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3504
- "button",
3529
+ Button,
3505
3530
  {
3506
3531
  type: "button",
3532
+ variant: "bare",
3533
+ size: "auto",
3507
3534
  "aria-current": active ? "page" : void 0,
3508
3535
  onClick,
3509
3536
  className: [
3510
- "flex flex-1 min-w-0 items-center gap-xs bg-transparent pl-sm py-xs pr-0 text-left",
3511
- "border-0 shadow-none cursor-pointer rounded-md",
3512
- "transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
3513
- active ? "text-primary" : "text-body hover:text-ink"
3537
+ "flex-1 min-w-0 !justify-start !gap-xs !rounded-none pl-sm py-xs pr-0 text-left whitespace-normal",
3538
+ active ? "!text-primary" : "!text-body hover:!text-ink"
3514
3539
  ].join(" "),
3515
3540
  children: [
3516
3541
  thinking && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
@@ -3534,18 +3559,19 @@ var HistoryRow = ({ item, active = false, onClick }) => {
3534
3559
  }
3535
3560
  ),
3536
3561
  item.onDelete && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3537
- "button",
3562
+ Button,
3538
3563
  {
3539
3564
  type: "button",
3565
+ variant: "bare",
3566
+ size: "auto",
3540
3567
  "aria-label": `Delete ${item.label}`,
3541
3568
  onClick: (e) => {
3542
3569
  e.stopPropagation();
3543
3570
  item.onDelete(item.id);
3544
3571
  },
3545
3572
  className: [
3546
- "p-xxs rounded-xs bg-transparent border-0 flex-shrink-0 text-muted",
3547
- "cursor-pointer transition duration-200 ease-out hover:text-semantic-error",
3548
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
3573
+ "!p-xxs !rounded-xs flex-shrink-0 !text-muted hover:!text-semantic-error",
3574
+ "transition duration-200 ease-out",
3549
3575
  hovered ? "opacity-100" : "opacity-0"
3550
3576
  ].join(" "),
3551
3577
  tabIndex: hovered ? 0 : -1,
@@ -3659,7 +3685,7 @@ var ChatHistorySidebar = import_react12.default.forwardRef(
3659
3685
  }
3660
3686
  )
3661
3687
  ] }) }),
3662
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto overflow-x-hidden px-sm pb-md", children: flatList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "space-y-xxs", role: "list", children: flatList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3688
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto overflow-x-hidden pb-md", children: flatList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "space-y-xxs", role: "list", children: flatList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3663
3689
  HistoryRow,
3664
3690
  {
3665
3691
  item,
package/dist/index.js CHANGED
@@ -881,9 +881,9 @@ var variantClasses2 = {
881
881
  error: "bg-[var(--color-semantic-error-soft)] text-[var(--color-semantic-error)] border border-[var(--color-semantic-error)]"
882
882
  };
883
883
  var sizeClasses3 = {
884
- sm: { chip: "h-6 px-xs gap-xs rounded-xs", text: "text-caption", icon: "w-3 h-3", thumb: "w-4 h-4", dismissSize: "sm" },
885
- md: { chip: "h-8 px-sm gap-xs rounded-sm", text: "text-body-sm", icon: "w-4 h-4", thumb: "w-5 h-5", dismissSize: "sm" },
886
- lg: { chip: "h-10 px-md gap-sm rounded-md", text: "text-body-md", icon: "w-5 h-5", thumb: "w-6 h-6", dismissSize: "sm" }
884
+ sm: { chip: "h-6 px-xs gap-xs rounded-xs", text: "text-caption", icon: "w-3 h-3", thumb: "w-4 h-4", dismissSize: "sm", progressHeight: "h-1" },
885
+ md: { chip: "h-8 px-sm gap-xs rounded-sm", text: "text-body-sm", icon: "w-4 h-4", thumb: "w-5 h-5", dismissSize: "sm", progressHeight: "h-1.5" },
886
+ lg: { chip: "h-10 px-md gap-sm rounded-md", text: "text-body-md", icon: "w-5 h-5", thumb: "w-6 h-6", dismissSize: "sm", progressHeight: "h-2" }
887
887
  };
888
888
  var Chip = React6.forwardRef(
889
889
  ({
@@ -893,6 +893,7 @@ var Chip = React6.forwardRef(
893
893
  icon,
894
894
  imageSrc,
895
895
  imageAlt,
896
+ uploadProgress,
896
897
  onDismiss,
897
898
  disabled = false,
898
899
  className = "",
@@ -903,16 +904,41 @@ var Chip = React6.forwardRef(
903
904
  const [lightboxOpen, setLightboxOpen] = useState2(false);
904
905
  const disabledStyles = disabled ? "opacity-50 pointer-events-none select-none" : "";
905
906
  const isLightboxTrigger = Boolean(imageSrc) && !disabled;
907
+ const showProgressBar = imageSrc && typeof uploadProgress === "number" && uploadProgress < 100;
906
908
  const openLightbox = () => {
907
909
  if (isLightboxTrigger) setLightboxOpen(true);
908
910
  };
909
- const handleBodyKeyDown = (e) => {
910
- if (!isLightboxTrigger) return;
911
- if (e.key === "Enter" || e.key === " " || e.key === "Spacebar") {
912
- e.preventDefault();
913
- openLightbox();
911
+ const renderThumbnail = () => /* @__PURE__ */ jsxs5(
912
+ "span",
913
+ {
914
+ className: `${sz.thumb} flex-shrink-0 rounded-xs overflow-hidden inline-block relative`,
915
+ "aria-hidden": "true",
916
+ children: [
917
+ /* @__PURE__ */ jsx6(
918
+ "img",
919
+ {
920
+ src: imageSrc,
921
+ alt: imageAlt || label,
922
+ className: "w-full h-full object-cover"
923
+ }
924
+ ),
925
+ showProgressBar && /* @__PURE__ */ jsx6(
926
+ "div",
927
+ {
928
+ className: `absolute bottom-0 left-0 right-0 ${sz.progressHeight} bg-scrim`,
929
+ "aria-label": `Upload progress: ${uploadProgress}%`,
930
+ children: /* @__PURE__ */ jsx6(
931
+ "div",
932
+ {
933
+ className: `h-full bg-primary transition-all duration-200`,
934
+ style: { width: `${uploadProgress}%` }
935
+ }
936
+ )
937
+ }
938
+ )
939
+ ]
914
940
  }
915
- };
941
+ );
916
942
  return /* @__PURE__ */ jsxs5(
917
943
  "span",
918
944
  {
@@ -928,43 +954,30 @@ var Chip = React6.forwardRef(
928
954
  ].filter(Boolean).join(" "),
929
955
  ...props,
930
956
  children: [
931
- /* @__PURE__ */ jsxs5(
932
- "span",
957
+ isLightboxTrigger ? /* @__PURE__ */ jsxs5(
958
+ Button,
933
959
  {
934
- className: "inline-flex items-center gap-xs",
935
- onClick: isLightboxTrigger ? openLightbox : void 0,
936
- onKeyDown: isLightboxTrigger ? handleBodyKeyDown : void 0,
937
- role: isLightboxTrigger ? "button" : void 0,
938
- tabIndex: isLightboxTrigger ? 0 : void 0,
939
- "aria-label": isLightboxTrigger ? `View image for ${label}` : void 0,
940
- style: isLightboxTrigger ? { cursor: "pointer" } : void 0,
960
+ variant: "bare",
961
+ size: "auto",
962
+ onClick: openLightbox,
963
+ "aria-label": `View image for ${label}`,
964
+ className: "inline-flex items-center gap-xs cursor-pointer p-0 m-0 hover:opacity-80 transition-opacity",
941
965
  children: [
942
- imageSrc ? /* @__PURE__ */ jsx6(
943
- "span",
944
- {
945
- className: `${sz.thumb} flex-shrink-0 rounded-xs overflow-hidden inline-block`,
946
- "aria-hidden": "true",
947
- children: /* @__PURE__ */ jsx6(
948
- "img",
949
- {
950
- src: imageSrc,
951
- alt: imageAlt || label,
952
- className: "w-full h-full object-cover"
953
- }
954
- )
955
- }
956
- ) : icon && /* @__PURE__ */ jsx6(
957
- "span",
958
- {
959
- className: `${sz.icon} flex-shrink-0 flex items-center justify-center`,
960
- "aria-hidden": "true",
961
- children: icon
962
- }
963
- ),
966
+ renderThumbnail(),
964
967
  /* @__PURE__ */ jsx6("span", { className: sz.text, children: label })
965
968
  ]
966
969
  }
967
- ),
970
+ ) : /* @__PURE__ */ jsxs5("span", { className: "inline-flex items-center gap-xs", children: [
971
+ imageSrc ? renderThumbnail() : icon && /* @__PURE__ */ jsx6(
972
+ "span",
973
+ {
974
+ className: `${sz.icon} flex-shrink-0 flex items-center justify-center`,
975
+ "aria-hidden": "true",
976
+ children: icon
977
+ }
978
+ ),
979
+ /* @__PURE__ */ jsx6("span", { className: sz.text, children: label })
980
+ ] }),
968
981
  onDismiss && /* @__PURE__ */ jsx6(
969
982
  Button,
970
983
  {
@@ -2684,11 +2697,17 @@ var TimelineBlock = ({ items }) => {
2684
2697
  ] });
2685
2698
  };
2686
2699
  var AgentConversationMark = ({ mark, align = "start" }) => {
2687
- const pillClasses = "inline-flex items-center gap-xs rounded-full bg-canvas px-sm py-xxs text-caption font-weight-heading-sm text-primary shadow-sm hover:bg-surface-soft transition-colors duration-150 whitespace-nowrap";
2688
- return /* @__PURE__ */ jsx11("div", { className: ["flex mt-sm", align === "end" ? "justify-end" : "justify-start"].join(" "), children: mark.href ? /* @__PURE__ */ jsxs10("a", { href: mark.href, className: pillClasses, children: [
2689
- /* @__PURE__ */ jsx11(Icon, { name: "two-people-users-group", size: 12 }),
2690
- mark.label
2691
- ] }) : /* @__PURE__ */ jsxs10(
2700
+ return /* @__PURE__ */ jsx11("div", { className: ["flex mt-sm", align === "end" ? "justify-end" : "justify-start"].join(" "), children: mark.href ? /* @__PURE__ */ jsxs10(
2701
+ "a",
2702
+ {
2703
+ href: mark.href,
2704
+ className: "inline-flex items-center gap-xs rounded-full bg-canvas px-sm py-xxs text-caption font-weight-heading-sm text-primary shadow-sm whitespace-nowrap cursor-pointer transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
2705
+ children: [
2706
+ /* @__PURE__ */ jsx11(Icon, { name: "two-people-users-group", size: 12 }),
2707
+ mark.label
2708
+ ]
2709
+ }
2710
+ ) : /* @__PURE__ */ jsxs10(
2692
2711
  Button,
2693
2712
  {
2694
2713
  variant: "ghost",
@@ -2777,7 +2796,7 @@ var SuggestedImageWidget = ({
2777
2796
  setSelectedId(void 0);
2778
2797
  setIsOpen(true);
2779
2798
  };
2780
- return /* @__PURE__ */ jsxs10("div", { className: "mt-md", children: [
2799
+ return /* @__PURE__ */ jsxs10("div", { className: "mb-md flex flex-col items-start self-start", children: [
2781
2800
  /* @__PURE__ */ jsxs10(
2782
2801
  Button,
2783
2802
  {
@@ -2785,7 +2804,7 @@ var SuggestedImageWidget = ({
2785
2804
  variant: "ghost",
2786
2805
  pushEffect: false,
2787
2806
  onClick: handleOpen,
2788
- className: "group relative block !p-0 max-w-full overflow-hidden rounded-lg bg-surface-strong border border-hairline",
2807
+ className: "group relative block self-start !p-0 max-w-full overflow-hidden rounded-lg bg-surface-strong border border-hairline",
2789
2808
  style: { maxHeight: "14rem", width: "20rem" },
2790
2809
  "aria-label": alt ?? "Open design suggestion",
2791
2810
  children: [
@@ -2794,7 +2813,7 @@ var SuggestedImageWidget = ({
2794
2813
  {
2795
2814
  src,
2796
2815
  alt: alt ?? "",
2797
- className: "w-full object-cover transition-transform duration-150 group-hover:scale-[1.02]",
2816
+ className: "block w-full object-cover object-top transition-transform duration-150 group-hover:scale-[1.02]",
2798
2817
  style: { maxHeight: "14rem" }
2799
2818
  }
2800
2819
  ),
@@ -2803,7 +2822,7 @@ var SuggestedImageWidget = ({
2803
2822
  {
2804
2823
  src: opt.src,
2805
2824
  alt: opt.label,
2806
- className: "h-10 w-10 flex-shrink-0 rounded-sm object-cover border border-hairline"
2825
+ className: "h-10 w-10 flex-shrink-0 rounded-sm object-cover object-top border border-hairline"
2807
2826
  },
2808
2827
  opt.id
2809
2828
  )) })
@@ -2927,13 +2946,16 @@ var CopyMessageButton = ({
2927
2946
  };
2928
2947
  return /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-end mb-xs", children: [
2929
2948
  /* @__PURE__ */ jsx11(
2930
- "button",
2949
+ Button,
2931
2950
  {
2932
2951
  type: "button",
2952
+ variant: "bare",
2953
+ size: "auto",
2954
+ pushEffect: false,
2933
2955
  onClick: handleCopy,
2934
2956
  "aria-label": copied ? "Message copied" : "Copy message",
2935
2957
  "data-copied": copied ? "true" : "false",
2936
- className: "inline-flex items-center justify-center rounded-xs p-xxs text-muted-soft opacity-0 cursor-pointer transition duration-150 ease-out hover:text-ink active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 data-[copied=true]:opacity-100",
2958
+ className: "inline-flex items-center justify-center rounded-xs p-xxs text-muted-soft opacity-0 hover:text-ink active:scale-[0.98] focus-visible:ring-focus-blue group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 data-[copied=true]:opacity-100",
2937
2959
  children: /* @__PURE__ */ jsx11(
2938
2960
  Icon,
2939
2961
  {
@@ -2986,7 +3008,8 @@ var ThinkingIndicator = () => /* @__PURE__ */ jsxs10(Fragment4, { children: [
2986
3008
  ] });
2987
3009
  var AiMessage = ({ message }) => /* @__PURE__ */ jsxs10("div", { className: "flex items-start gap-md w-full", children: [
2988
3010
  /* @__PURE__ */ jsx11(AIAvatar, {}),
2989
- /* @__PURE__ */ jsxs10("div", { className: "flex-1 min-w-0", children: [
3011
+ /* @__PURE__ */ jsxs10("div", { className: "flex-1 min-w-0 flex flex-col items-stretch justify-start", children: [
3012
+ message.suggestedImage && /* @__PURE__ */ jsx11(SuggestedImageWidget, { suggestedImage: message.suggestedImage }),
2990
3013
  /* @__PURE__ */ jsx11(
2991
3014
  ExpandableMessage,
2992
3015
  {
@@ -2998,7 +3021,6 @@ var AiMessage = ({ message }) => /* @__PURE__ */ jsxs10("div", { className: "fle
2998
3021
  ),
2999
3022
  message.inFlight && /* @__PURE__ */ jsx11(ThinkingIndicator, {}),
3000
3023
  message.images && message.images.length > 0 && /* @__PURE__ */ jsx11(MessageImageGallery, { images: message.images, align: "start" }),
3001
- message.suggestedImage && /* @__PURE__ */ jsx11(SuggestedImageWidget, { suggestedImage: message.suggestedImage }),
3002
3024
  message.timeline && message.timeline.length > 0 && /* @__PURE__ */ jsx11(TimelineBlock, { items: message.timeline }),
3003
3025
  message.agentMark && /* @__PURE__ */ jsx11(AgentConversationMark, { mark: message.agentMark, align: "start" }),
3004
3026
  message.postContent && /* @__PURE__ */ jsx11(
@@ -3049,11 +3071,14 @@ var UserMessage = ({ message }) => {
3049
3071
  hasText && failed && /* @__PURE__ */ jsxs10("div", { className: "mt-xs flex items-center gap-sm justify-end", children: [
3050
3072
  /* @__PURE__ */ jsx11("span", { className: "text-caption text-semantic-error", children: "Not sent" }),
3051
3073
  /* @__PURE__ */ jsx11(
3052
- "button",
3074
+ Button,
3053
3075
  {
3054
3076
  type: "button",
3077
+ variant: "bare",
3078
+ size: "auto",
3079
+ pushEffect: false,
3055
3080
  onClick: () => message.onRetry?.(message),
3056
- className: "rounded-xs text-caption text-primary-text underline underline-offset-2 cursor-pointer transition duration-150 ease-out hover:text-primary-active active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
3081
+ className: "rounded-xs text-caption text-primary-text underline underline-offset-2 hover:text-primary-active active:scale-[0.98] focus-visible:ring-focus-blue",
3057
3082
  children: "Retry"
3058
3083
  }
3059
3084
  )
@@ -3399,7 +3424,7 @@ var HistoryRow = ({ item, active = false, onClick }) => {
3399
3424
  "li",
3400
3425
  {
3401
3426
  className: [
3402
- "list-none flex items-center gap-xs rounded-md pr-xs",
3427
+ "list-none flex items-center gap-xs rounded-none pr-xs",
3403
3428
  "transition-colors duration-150 ease-out",
3404
3429
  active ? "bg-primary-disabled" : hovered ? "bg-surface-soft" : "bg-transparent"
3405
3430
  ].join(" "),
@@ -3407,16 +3432,16 @@ var HistoryRow = ({ item, active = false, onClick }) => {
3407
3432
  onMouseLeave: () => setHovered(false),
3408
3433
  children: [
3409
3434
  /* @__PURE__ */ jsxs12(
3410
- "button",
3435
+ Button,
3411
3436
  {
3412
3437
  type: "button",
3438
+ variant: "bare",
3439
+ size: "auto",
3413
3440
  "aria-current": active ? "page" : void 0,
3414
3441
  onClick,
3415
3442
  className: [
3416
- "flex flex-1 min-w-0 items-center gap-xs bg-transparent pl-sm py-xs pr-0 text-left",
3417
- "border-0 shadow-none cursor-pointer rounded-md",
3418
- "transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
3419
- active ? "text-primary" : "text-body hover:text-ink"
3443
+ "flex-1 min-w-0 !justify-start !gap-xs !rounded-none pl-sm py-xs pr-0 text-left whitespace-normal",
3444
+ active ? "!text-primary" : "!text-body hover:!text-ink"
3420
3445
  ].join(" "),
3421
3446
  children: [
3422
3447
  thinking && /* @__PURE__ */ jsx13(
@@ -3440,18 +3465,19 @@ var HistoryRow = ({ item, active = false, onClick }) => {
3440
3465
  }
3441
3466
  ),
3442
3467
  item.onDelete && /* @__PURE__ */ jsx13(
3443
- "button",
3468
+ Button,
3444
3469
  {
3445
3470
  type: "button",
3471
+ variant: "bare",
3472
+ size: "auto",
3446
3473
  "aria-label": `Delete ${item.label}`,
3447
3474
  onClick: (e) => {
3448
3475
  e.stopPropagation();
3449
3476
  item.onDelete(item.id);
3450
3477
  },
3451
3478
  className: [
3452
- "p-xxs rounded-xs bg-transparent border-0 flex-shrink-0 text-muted",
3453
- "cursor-pointer transition duration-200 ease-out hover:text-semantic-error",
3454
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
3479
+ "!p-xxs !rounded-xs flex-shrink-0 !text-muted hover:!text-semantic-error",
3480
+ "transition duration-200 ease-out",
3455
3481
  hovered ? "opacity-100" : "opacity-0"
3456
3482
  ].join(" "),
3457
3483
  tabIndex: hovered ? 0 : -1,
@@ -3565,7 +3591,7 @@ var ChatHistorySidebar = React13.forwardRef(
3565
3591
  }
3566
3592
  )
3567
3593
  ] }) }),
3568
- !collapsed && /* @__PURE__ */ jsx13("div", { className: "flex-1 min-h-0 overflow-y-auto overflow-x-hidden px-sm pb-md", children: flatList.length > 0 ? /* @__PURE__ */ jsx13("ul", { className: "space-y-xxs", role: "list", children: flatList.map((item) => /* @__PURE__ */ jsx13(
3594
+ !collapsed && /* @__PURE__ */ jsx13("div", { className: "flex-1 min-h-0 overflow-y-auto overflow-x-hidden pb-md", children: flatList.length > 0 ? /* @__PURE__ */ jsx13("ul", { className: "space-y-xxs", role: "list", children: flatList.map((item) => /* @__PURE__ */ jsx13(
3569
3595
  HistoryRow,
3570
3596
  {
3571
3597
  item,