@designa8/vibedesign-v6 1.10.6 → 1.12.1

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/index.js CHANGED
@@ -992,287 +992,189 @@ PromptInputBar.displayName = "PromptInputBar";
992
992
 
993
993
  // virtual-pkg:src/atoms/ChatScreen/ChatScreen.tsx
994
994
  import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
995
- var ChatEmptyIllustration = () => (
996
- // 112px container — stable width regardless of Tailwind spacing scale.
997
- /* @__PURE__ */ jsxs5(
998
- "div",
999
- {
1000
- className: "relative flex-shrink-0",
1001
- "aria-hidden": "true",
1002
- style: { width: 112 },
1003
- children: [
1004
- /* @__PURE__ */ jsx5(
1005
- "svg",
1006
- {
1007
- viewBox: "0 0 160 140",
1008
- width: "112",
1009
- height: "98",
1010
- className: "text-primary",
1011
- fill: "currentColor",
1012
- style: { opacity: 0.15, display: "block" },
1013
- children: /* @__PURE__ */ jsx5("path", { d: "M78 8c28-6 52 10 58 34 6 24-6 44-4 62 2 16-14 30-36 32-26 2-48-8-62-28-12-18-22-42-10-58C36 30 52 14 78 8z" })
1014
- }
1015
- ),
1016
- /* @__PURE__ */ jsx5("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs5(
1017
- "div",
1018
- {
1019
- className: "relative flex items-center justify-center rounded-full bg-primary shadow-sm",
1020
- style: { width: 64, height: 64 },
1021
- children: [
1022
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col", style: { width: 32, gap: 6 }, children: [
1023
- /* @__PURE__ */ jsx5(
1024
- "span",
1025
- {
1026
- className: "rounded-full bg-on-primary",
1027
- style: { height: 6, width: "100%" }
1028
- }
1029
- ),
1030
- /* @__PURE__ */ jsx5(
1031
- "span",
1032
- {
1033
- className: "rounded-full bg-on-primary",
1034
- style: { height: 6, width: "66%" }
1035
- }
1036
- )
1037
- ] }),
995
+ var ChatEmptyIllustration = () => /* @__PURE__ */ jsxs5(
996
+ "div",
997
+ {
998
+ className: "relative flex-shrink-0",
999
+ "aria-hidden": "true",
1000
+ style: { width: 112 },
1001
+ children: [
1002
+ /* @__PURE__ */ jsx5(
1003
+ "svg",
1004
+ {
1005
+ viewBox: "0 0 160 140",
1006
+ width: "112",
1007
+ height: "98",
1008
+ className: "text-primary",
1009
+ fill: "currentColor",
1010
+ style: { opacity: 0.15, display: "block" },
1011
+ children: /* @__PURE__ */ jsx5("path", { d: "M78 8c28-6 52 10 58 34 6 24-6 44-4 62 2 16-14 30-36 32-26 2-48-8-62-28-12-18-22-42-10-58C36 30 52 14 78 8z" })
1012
+ }
1013
+ ),
1014
+ /* @__PURE__ */ jsx5("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs5(
1015
+ "div",
1016
+ {
1017
+ className: "relative flex items-center justify-center rounded-full bg-primary shadow-sm",
1018
+ style: { width: 64, height: 64 },
1019
+ children: [
1020
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col", style: { width: 32, gap: 6 }, children: [
1038
1021
  /* @__PURE__ */ jsx5(
1039
1022
  "span",
1040
1023
  {
1041
- className: "absolute bg-primary",
1042
- style: {
1043
- width: 12,
1044
- height: 12,
1045
- bottom: -2,
1046
- right: 8,
1047
- transform: "rotate(45deg)",
1048
- borderRadius: 2
1049
- }
1024
+ className: "rounded-full bg-on-primary",
1025
+ style: { height: 6, width: "100%" }
1026
+ }
1027
+ ),
1028
+ /* @__PURE__ */ jsx5(
1029
+ "span",
1030
+ {
1031
+ className: "rounded-full bg-on-primary",
1032
+ style: { height: 6, width: "66%" }
1050
1033
  }
1051
1034
  )
1052
- ]
1053
- }
1054
- ) }),
1055
- /* @__PURE__ */ jsx5(
1056
- "svg",
1057
- {
1058
- viewBox: "0 0 24 24",
1059
- width: "12",
1060
- height: "12",
1061
- className: "absolute text-primary",
1062
- fill: "currentColor",
1063
- "aria-hidden": "true",
1064
- style: { left: 8, top: 16 },
1065
- children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" })
1066
- }
1067
- ),
1068
- /* @__PURE__ */ jsx5(
1069
- "svg",
1070
- {
1071
- viewBox: "0 0 24 24",
1072
- width: "10",
1073
- height: "10",
1074
- className: "absolute text-primary",
1075
- fill: "currentColor",
1076
- "aria-hidden": "true",
1077
- style: { right: 12, top: 32 },
1078
- children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" })
1079
- }
1080
- ),
1081
- /* @__PURE__ */ jsx5(
1082
- "svg",
1083
- {
1084
- viewBox: "0 0 24 24",
1085
- width: "8",
1086
- height: "8",
1087
- className: "absolute text-primary",
1088
- fill: "currentColor",
1089
- "aria-hidden": "true",
1090
- style: { left: 24, bottom: 24 },
1091
- children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" })
1092
- }
1093
- ),
1094
- /* @__PURE__ */ jsx5(
1095
- "svg",
1096
- {
1097
- viewBox: "0 0 24 24",
1098
- width: "14",
1099
- height: "14",
1100
- className: "absolute text-primary",
1101
- fill: "currentColor",
1102
- "aria-hidden": "true",
1103
- style: { right: 8, bottom: 32 },
1104
- children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" })
1105
- }
1106
- )
1107
- ]
1108
- }
1109
- )
1035
+ ] }),
1036
+ /* @__PURE__ */ jsx5(
1037
+ "span",
1038
+ {
1039
+ className: "absolute bg-primary",
1040
+ style: {
1041
+ width: 12,
1042
+ height: 12,
1043
+ bottom: -2,
1044
+ right: 8,
1045
+ transform: "rotate(45deg)",
1046
+ borderRadius: 2
1047
+ }
1048
+ }
1049
+ )
1050
+ ]
1051
+ }
1052
+ ) }),
1053
+ /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "12", height: "12", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { left: 8, top: 16 }, children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) }),
1054
+ /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "10", height: "10", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { right: 12, top: 32 }, children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) }),
1055
+ /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "8", height: "8", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { left: 24, bottom: 24 }, children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) }),
1056
+ /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "14", height: "14", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { right: 8, bottom: 32 }, children: /* @__PURE__ */ jsx5("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) })
1057
+ ]
1058
+ }
1110
1059
  );
1111
1060
  var ChatEmptyStateContent = ({
1112
1061
  title,
1113
1062
  description
1114
- }) => (
1115
- // Use inline gap so the layout is robust when gap-lg is absent in the consumer theme.
1116
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center px-lg", style: { gap: 24 }, children: [
1117
- /* @__PURE__ */ jsx5(ChatEmptyIllustration, {}),
1118
- /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-col gap-xs", children: [
1119
- /* @__PURE__ */ jsx5("h2", { className: "text-heading-sm font-weight-heading-sm text-ink", children: title }),
1120
- /* @__PURE__ */ jsx5("p", { className: "text-body-sm text-muted", style: { maxWidth: "24rem" }, children: description })
1121
- ] })
1063
+ }) => /* @__PURE__ */ jsxs5("div", { className: "flex items-center px-lg", style: { gap: 24 }, children: [
1064
+ /* @__PURE__ */ jsx5(ChatEmptyIllustration, {}),
1065
+ /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-col gap-xs", children: [
1066
+ /* @__PURE__ */ jsx5("h2", { className: "text-heading-sm font-weight-heading-sm text-ink", children: title }),
1067
+ /* @__PURE__ */ jsx5("p", { className: "text-body-sm text-muted", style: { maxWidth: "24rem" }, children: description })
1122
1068
  ] })
1123
- );
1124
- var ChevronIcon2 = ({ expanded }) => /* @__PURE__ */ jsx5(
1125
- "svg",
1126
- {
1127
- xmlns: "http://www.w3.org/2000/svg",
1128
- viewBox: "0 0 24 24",
1129
- fill: "none",
1130
- stroke: "currentColor",
1131
- strokeWidth: "2",
1132
- strokeLinecap: "round",
1133
- strokeLinejoin: "round",
1134
- className: "size-4 text-muted flex-shrink-0 transition-transform duration-200",
1135
- style: { transform: expanded ? "rotate(180deg)" : "rotate(0deg)" },
1136
- "aria-hidden": "true",
1137
- children: /* @__PURE__ */ jsx5("polyline", { points: "6 9 12 15 18 9" })
1069
+ ] });
1070
+ var TimelineKindIcon = ({
1071
+ kind,
1072
+ status
1073
+ }) => {
1074
+ const colorClass = status === "error" ? "text-semantic-error" : status === "running" ? "text-primary" : "text-semantic-success";
1075
+ if (kind === "thinking") {
1076
+ return /* @__PURE__ */ jsxs5("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: [
1077
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "10" }),
1078
+ /* @__PURE__ */ jsx5("path", { d: "M12 8v4l2 2" })
1079
+ ] });
1138
1080
  }
1139
- );
1140
- var PlanCardBlock = ({ plan }) => {
1141
- const [titleExpanded, setTitleExpanded] = React5.useState(false);
1142
- const titleRef = React5.useRef(null);
1143
- const [isOverflowing, setIsOverflowing] = React5.useState(false);
1144
- React5.useEffect(() => {
1145
- const el = titleRef.current;
1146
- if (!el) return;
1147
- const check = () => {
1148
- if (el) {
1149
- setIsOverflowing(el.scrollHeight > el.clientHeight + 2);
1150
- }
1151
- };
1152
- check();
1153
- const ro = new ResizeObserver(check);
1154
- ro.observe(el);
1155
- return () => ro.disconnect();
1156
- }, [plan.title]);
1157
- const hasActivity = plan.tasks.some(
1158
- (t) => t.status === "in_progress" || t.status === "done" || t.status === "failed"
1159
- );
1160
- const visibleTasks = plan.tasks.filter(
1161
- (t) => t.status === "in_progress" || t.status === "done" || t.status === "failed"
1162
- );
1163
- return /* @__PURE__ */ jsxs5("div", { className: "mt-md rounded-xl border border-hairline bg-canvas shadow-sm overflow-hidden", children: [
1164
- /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-sm px-lg py-md border-b border-hairline-soft", children: [
1165
- /* @__PURE__ */ jsxs5(
1166
- "svg",
1081
+ if (kind === "read") {
1082
+ return /* @__PURE__ */ jsxs5("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: [
1083
+ /* @__PURE__ */ jsx5("path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" }),
1084
+ /* @__PURE__ */ jsx5("path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" })
1085
+ ] });
1086
+ }
1087
+ if (kind === "write") {
1088
+ return /* @__PURE__ */ jsxs5("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: [
1089
+ /* @__PURE__ */ jsx5("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
1090
+ /* @__PURE__ */ jsx5("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
1091
+ ] });
1092
+ }
1093
+ if (kind === "verify") {
1094
+ return /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: /* @__PURE__ */ jsx5("polyline", { points: "20 6 9 17 4 12" }) });
1095
+ }
1096
+ return /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: /* @__PURE__ */ jsx5("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) });
1097
+ };
1098
+ var TimelineRow = ({ item, isLast }) => {
1099
+ const borderColor = item.status === "error" ? "border-semantic-error" : item.status === "running" ? "border-primary" : "border-semantic-success";
1100
+ return /* @__PURE__ */ jsxs5("div", { className: "flex gap-sm", children: [
1101
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center", style: { width: 20 }, children: [
1102
+ /* @__PURE__ */ jsx5(
1103
+ "div",
1167
1104
  {
1168
- xmlns: "http://www.w3.org/2000/svg",
1169
- viewBox: "0 0 24 24",
1170
- fill: "none",
1171
- stroke: "currentColor",
1172
- strokeWidth: "2",
1173
- strokeLinecap: "round",
1174
- strokeLinejoin: "round",
1175
- className: "size-4 text-primary flex-shrink-0 mt-xs",
1176
- "aria-hidden": "true",
1177
- children: [
1178
- /* @__PURE__ */ jsx5("line", { x1: "8", y1: "6", x2: "21", y2: "6" }),
1179
- /* @__PURE__ */ jsx5("line", { x1: "8", y1: "12", x2: "21", y2: "12" }),
1180
- /* @__PURE__ */ jsx5("line", { x1: "8", y1: "18", x2: "21", y2: "18" }),
1181
- /* @__PURE__ */ jsx5("line", { x1: "3", y1: "6", x2: "3.01", y2: "6" }),
1182
- /* @__PURE__ */ jsx5("line", { x1: "3", y1: "12", x2: "3.01", y2: "12" }),
1183
- /* @__PURE__ */ jsx5("line", { x1: "3", y1: "18", x2: "3.01", y2: "18" })
1184
- ]
1105
+ className: [
1106
+ "flex items-center justify-center rounded-full flex-shrink-0 border",
1107
+ borderColor,
1108
+ "bg-canvas"
1109
+ ].join(" "),
1110
+ style: { width: 20, height: 20 },
1111
+ children: item.status === "running" ? /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", className: "text-primary animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx5("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }) : /* @__PURE__ */ jsx5(TimelineKindIcon, { kind: item.kind, status: item.status })
1185
1112
  }
1186
1113
  ),
1187
- /* @__PURE__ */ jsxs5("div", { className: "flex-1 min-w-0 flex items-start gap-xs", children: [
1188
- /* @__PURE__ */ jsx5(
1189
- "span",
1190
- {
1191
- ref: titleRef,
1192
- className: "text-body-sm font-weight-heading-sm text-primary flex-1 min-w-0",
1193
- style: titleExpanded ? void 0 : {
1194
- display: "-webkit-box",
1195
- WebkitLineClamp: 2,
1196
- WebkitBoxOrient: "vertical",
1197
- overflow: "hidden"
1198
- },
1199
- children: plan.title
1200
- }
1201
- ),
1202
- isOverflowing && /* @__PURE__ */ jsx5(
1203
- Button,
1204
- {
1205
- variant: "ghost",
1206
- size: "sm",
1207
- type: "button",
1208
- onClick: () => setTitleExpanded((prev) => !prev),
1209
- "aria-label": titleExpanded ? "Collapse plan title" : "Expand plan title",
1210
- className: "flex-shrink-0 !p-xxs !rounded-xs",
1211
- children: /* @__PURE__ */ jsx5(ChevronIcon2, { expanded: titleExpanded })
1212
- }
1213
- )
1214
- ] })
1114
+ !isLast && /* @__PURE__ */ jsx5("div", { className: "flex-1 w-px bg-hairline-soft", style: { minHeight: 8 } })
1215
1115
  ] }),
1216
- hasActivity && visibleTasks.length > 0 && /* @__PURE__ */ jsx5("ol", { className: "flex flex-col divide-y divide-hairline-soft", children: visibleTasks.map((task) => /* @__PURE__ */ jsxs5(
1217
- "li",
1116
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col min-w-0 pb-sm", children: [
1117
+ /* @__PURE__ */ jsx5(
1118
+ "span",
1119
+ {
1120
+ className: [
1121
+ "text-body-sm",
1122
+ item.status === "error" ? "text-semantic-error" : item.status === "running" ? "text-ink font-weight-heading-sm" : "text-muted"
1123
+ ].join(" "),
1124
+ children: item.label
1125
+ }
1126
+ ),
1127
+ item.detail && /* @__PURE__ */ jsx5("span", { className: "text-caption text-muted-soft mt-xxs", children: item.detail })
1128
+ ] })
1129
+ ] });
1130
+ };
1131
+ var TimelineBlock = ({ items }) => {
1132
+ const [expanded, setExpanded] = React5.useState(false);
1133
+ if (items.length === 0) return null;
1134
+ const latestItem = items[items.length - 1];
1135
+ const hasMore = items.length > 1;
1136
+ return /* @__PURE__ */ jsxs5("div", { className: "mt-md rounded-xl border border-hairline bg-canvas overflow-hidden", children: [
1137
+ /* @__PURE__ */ jsxs5(
1138
+ Button,
1218
1139
  {
1219
- className: "flex items-center gap-md px-lg py-md",
1140
+ variant: "ghost",
1141
+ size: "sm",
1142
+ type: "button",
1143
+ onClick: () => setExpanded((prev) => !prev),
1144
+ "aria-expanded": expanded,
1145
+ "aria-label": expanded ? "Collapse agent steps" : "Expand agent steps",
1146
+ className: "w-full flex items-center gap-sm !px-md !py-sm !text-left !justify-start !rounded-none",
1220
1147
  children: [
1221
- task.status === "in_progress" && /* @__PURE__ */ jsx5(
1222
- "span",
1223
- {
1224
- className: "flex-shrink-0 size-3 rounded-full bg-primary animate-pulse",
1225
- "aria-label": "In progress"
1226
- }
1227
- ),
1228
- task.status === "done" && /* @__PURE__ */ jsx5("span", { className: "flex-shrink-0", "aria-label": "Done", children: /* @__PURE__ */ jsx5(
1229
- "svg",
1230
- {
1231
- xmlns: "http://www.w3.org/2000/svg",
1232
- viewBox: "0 0 24 24",
1233
- fill: "none",
1234
- stroke: "currentColor",
1235
- strokeWidth: "2.5",
1236
- strokeLinecap: "round",
1237
- strokeLinejoin: "round",
1238
- className: "size-4 text-semantic-success",
1239
- "aria-hidden": "true",
1240
- children: /* @__PURE__ */ jsx5("polyline", { points: "20 6 9 17 4 12" })
1241
- }
1242
- ) }),
1243
- task.status === "failed" && /* @__PURE__ */ jsx5("span", { className: "flex-shrink-0", "aria-label": "Failed", children: /* @__PURE__ */ jsxs5(
1148
+ /* @__PURE__ */ jsx5("span", { className: "flex-shrink-0 flex items-center justify-center", style: { width: 20, height: 20 }, children: latestItem.status === "running" ? /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "12", height: "12", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", className: "text-primary animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx5("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }) : /* @__PURE__ */ jsx5(TimelineKindIcon, { kind: latestItem.kind, status: latestItem.status }) }),
1149
+ /* @__PURE__ */ jsxs5("span", { className: "flex-1 min-w-0 text-body-sm text-muted truncate", children: [
1150
+ latestItem.label,
1151
+ hasMore && !expanded && /* @__PURE__ */ jsxs5("span", { className: "ml-xs text-caption text-muted-soft", children: [
1152
+ "(+",
1153
+ items.length - 1,
1154
+ " more)"
1155
+ ] })
1156
+ ] }),
1157
+ hasMore && /* @__PURE__ */ jsx5(
1244
1158
  "svg",
1245
1159
  {
1246
- xmlns: "http://www.w3.org/2000/svg",
1247
1160
  viewBox: "0 0 24 24",
1161
+ width: "14",
1162
+ height: "14",
1248
1163
  fill: "none",
1249
1164
  stroke: "currentColor",
1250
- strokeWidth: "2.5",
1165
+ strokeWidth: "2",
1251
1166
  strokeLinecap: "round",
1252
1167
  strokeLinejoin: "round",
1253
- className: "size-4 text-semantic-error",
1168
+ className: "text-muted flex-shrink-0 transition-transform duration-200",
1169
+ style: { transform: expanded ? "rotate(180deg)" : "rotate(0deg)" },
1254
1170
  "aria-hidden": "true",
1255
- children: [
1256
- /* @__PURE__ */ jsx5("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1257
- /* @__PURE__ */ jsx5("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1258
- ]
1259
- }
1260
- ) }),
1261
- /* @__PURE__ */ jsx5(
1262
- "span",
1263
- {
1264
- className: [
1265
- "text-body-sm",
1266
- task.status === "in_progress" ? "font-weight-heading-sm text-ink" : task.status === "done" ? "line-through text-muted" : task.status === "failed" ? "text-semantic-error" : "text-ink"
1267
- ].filter(Boolean).join(" "),
1268
- children: task.label
1171
+ children: /* @__PURE__ */ jsx5("polyline", { points: "6 9 12 15 18 9" })
1269
1172
  }
1270
- ),
1271
- task.status === "in_progress" && task.currentTool && /* @__PURE__ */ jsx5("span", { className: "ml-auto text-caption text-muted flex-shrink-0", children: task.currentTool })
1173
+ )
1272
1174
  ]
1273
- },
1274
- task.id
1275
- )) })
1175
+ }
1176
+ ),
1177
+ expanded && hasMore && /* @__PURE__ */ jsx5("div", { className: "px-md pb-sm pt-xs border-t border-hairline-soft", children: items.map((item, idx) => /* @__PURE__ */ jsx5(TimelineRow, { item, isLast: idx === items.length - 1 }, item.id)) })
1276
1178
  ] });
1277
1179
  };
1278
1180
  var AIAvatar = () => /* @__PURE__ */ jsx5(
@@ -1314,7 +1216,7 @@ var AiMessage = ({ message }) => /* @__PURE__ */ jsxs5("div", { className: "flex
1314
1216
  /* @__PURE__ */ jsx5("span", { className: "text-body-sm text-primary", children: message.currentToolLabel ?? "Working\u2026" })
1315
1217
  ] }),
1316
1218
  /* @__PURE__ */ jsx5("p", { className: "text-body-sm text-body leading-relaxed", children: message.content }),
1317
- message.plan && /* @__PURE__ */ jsx5(PlanCardBlock, { plan: message.plan }),
1219
+ message.timeline && message.timeline.length > 0 && /* @__PURE__ */ jsx5(TimelineBlock, { items: message.timeline }),
1318
1220
  message.postContent && /* @__PURE__ */ jsx5("p", { className: "text-body-sm text-body leading-relaxed mt-md", children: message.postContent })
1319
1221
  ] })
1320
1222
  ] });
@@ -1343,29 +1245,28 @@ var ChatScreen = React5.forwardRef(
1343
1245
  {
1344
1246
  id: "1",
1345
1247
  role: "user",
1346
- content: "Build a `PromptInputBar` Molecule that reproduces the Lovable-style prompt bar with placeholder and the bottom toolbar.",
1248
+ content: "Build a `PromptInputBar` Molecule that reproduces the Lovable-style prompt bar.",
1347
1249
  userInitials: "DU"
1348
1250
  },
1349
1251
  {
1350
1252
  id: "2",
1351
1253
  role: "ai",
1352
- content: "I'll build the `PromptInputBar` Molecule to match the Lovable-style prompt bar. It will include a soft surface background, large rounded container, textarea with placeholder, and the bottom toolbar with `+`, `Visual edits`, `Build` mode dropdown, mic, and send buttons.\n\nHere's my plan for building this component:",
1353
- plan: {
1354
- title: "Plan: Build the PromptInputBar Molecule with all toolbar controls, placeholder text, and mode-switching behaviour for the Lovable editor canvas",
1355
- tasks: [
1356
- { id: "p1", label: "Create the PromptInputBar structure and styling", status: "done" },
1357
- { id: "p2", label: "Add textarea with placeholder", status: "done" },
1358
- { id: "p3", label: "Build bottom toolbar with all button elements", status: "done" },
1359
- { id: "p4", label: "Add interactions and states" },
1360
- { id: "p5", label: "Create stories and tests" }
1361
- ]
1362
- },
1363
- postContent: "The plan above outlines all the steps. Let me start building the component now."
1254
+ content: "I'll build the `PromptInputBar` Molecule now. Here's what the agent is doing:",
1255
+ timeline: [
1256
+ { id: "t1", kind: "thinking", label: "Planning component structure", status: "done" },
1257
+ { id: "t2", kind: "read", label: "Reading design tokens", detail: "colors, spacing, typography", status: "done" },
1258
+ { id: "t3", kind: "write", label: "Writing PromptInputBar.tsx", status: "done" },
1259
+ { id: "t4", kind: "verify", label: "Verifying atom", status: "running" }
1260
+ ],
1261
+ postContent: "The component is being verified \u2014 it will be ready shortly."
1364
1262
  },
1365
1263
  {
1366
1264
  id: "3",
1367
1265
  role: "ai",
1368
- content: "Let me start building the `PromptInputBar` Molecule."
1266
+ content: "Done! The `PromptInputBar` atom has been created and verified.",
1267
+ timeline: [
1268
+ { id: "t5", kind: "verify", label: "Atom verified successfully", status: "done" }
1269
+ ]
1369
1270
  }
1370
1271
  ];
1371
1272
  const [messages, setMessages] = React5.useState(
@@ -1478,7 +1379,7 @@ var DeleteIcon = () => /* @__PURE__ */ jsxs6(
1478
1379
  ]
1479
1380
  }
1480
1381
  );
1481
- var ChevronIcon3 = ({ open }) => /* @__PURE__ */ jsx6(
1382
+ var ChevronIcon2 = ({ open }) => /* @__PURE__ */ jsx6(
1482
1383
  "svg",
1483
1384
  {
1484
1385
  "aria-hidden": "true",
@@ -1572,7 +1473,7 @@ var WorkspaceMenu = React6.forwardRef(
1572
1473
  style: { minWidth: "200px" },
1573
1474
  children: [
1574
1475
  /* @__PURE__ */ jsx6("span", { className: "flex-1 text-left truncate text-body-sm font-weight-heading-sm", children: workspaceName }),
1575
- /* @__PURE__ */ jsx6(ChevronIcon3, { open })
1476
+ /* @__PURE__ */ jsx6(ChevronIcon2, { open })
1576
1477
  ]
1577
1478
  }
1578
1479
  ),
@@ -3655,56 +3556,478 @@ function DefaultThumbnail({ kind }) {
3655
3556
  );
3656
3557
  }
3657
3558
 
3658
- // virtual-pkg:src/atoms/FilterTabBar/FilterTabBar.tsx
3659
- import React15 from "react";
3559
+ // virtual-pkg:src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx
3560
+ import React17, { useState as useState3 } from "react";
3561
+
3562
+ // virtual-pkg:src/atoms/Modal/Modal.tsx
3563
+ import React15, { useEffect, useRef, useState as useState2 } from "react";
3660
3564
  import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
3661
- var FilterTabBar = React15.forwardRef(
3662
- ({ tabs, value, onChange, className = "", ...rest }, ref) => {
3565
+ var sizeMap = {
3566
+ sm: "max-w-sm",
3567
+ md: "max-w-lg",
3568
+ lg: "max-w-2xl",
3569
+ xl: "max-w-4xl"
3570
+ };
3571
+ var Modal = React15.forwardRef(
3572
+ ({ isOpen, onClose, title, children, footer, size = "md" }, ref) => {
3573
+ const [mounted, setMounted] = useState2(false);
3574
+ const [visible, setVisible] = useState2(false);
3575
+ const overlayRef = useRef(null);
3576
+ useEffect(() => {
3577
+ if (isOpen) {
3578
+ setMounted(true);
3579
+ const raf = requestAnimationFrame(() => {
3580
+ requestAnimationFrame(() => setVisible(true));
3581
+ });
3582
+ return () => cancelAnimationFrame(raf);
3583
+ } else {
3584
+ setVisible(false);
3585
+ const timer = setTimeout(() => setMounted(false), 250);
3586
+ return () => clearTimeout(timer);
3587
+ }
3588
+ }, [isOpen]);
3589
+ useEffect(() => {
3590
+ if (!mounted) return;
3591
+ const handleKey = (e) => {
3592
+ if (e.key === "Escape") onClose();
3593
+ };
3594
+ document.addEventListener("keydown", handleKey);
3595
+ return () => document.removeEventListener("keydown", handleKey);
3596
+ }, [mounted, onClose]);
3597
+ if (!mounted) return null;
3598
+ const handleBackdropClick = (e) => {
3599
+ if (e.target === overlayRef.current) onClose();
3600
+ };
3663
3601
  return /* @__PURE__ */ jsx15(
3664
3602
  "div",
3665
3603
  {
3666
- ref,
3667
- role: "tablist",
3668
- "aria-label": "Filter tabs",
3604
+ ref: overlayRef,
3605
+ role: "dialog",
3606
+ "aria-modal": "true",
3607
+ "aria-labelledby": title ? "modal-title" : void 0,
3608
+ onClick: handleBackdropClick,
3669
3609
  className: [
3670
- "inline-flex items-center gap-xs p-xs",
3671
- "bg-canvas border border-hairline rounded-xl shadow-sm",
3672
- className
3673
- ].filter(Boolean).join(" "),
3674
- ...rest,
3675
- children: tabs.map((tab) => {
3676
- const isActive = tab.value === value;
3677
- return /* @__PURE__ */ jsxs15(
3678
- Button,
3679
- {
3680
- role: "tab",
3681
- "aria-selected": isActive,
3682
- "aria-label": tab.label ?? tab.value,
3683
- variant: isActive ? "primary" : "ghost",
3684
- size: "sm",
3685
- onClick: () => onChange(tab.value),
3686
- className: "gap-xs",
3687
- children: [
3688
- tab.icon && /* @__PURE__ */ jsx15("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
3689
- tab.label && /* @__PURE__ */ jsx15("span", { children: tab.label }),
3690
- tab.count !== void 0 && /* @__PURE__ */ jsx15(
3691
- "span",
3610
+ "fixed inset-0 flex items-center justify-center p-base",
3611
+ "bg-[var(--color-scrim)]/60",
3612
+ "transition-opacity duration-250 ease-in-out",
3613
+ visible ? "opacity-100" : "opacity-0"
3614
+ ].join(" "),
3615
+ style: { zIndex: "var(--z-modal, 1000)" },
3616
+ children: /* @__PURE__ */ jsxs15(
3617
+ "div",
3618
+ {
3619
+ ref,
3620
+ className: [
3621
+ "relative w-full max-h-[90vh] bg-surface border border-hairline rounded-lg",
3622
+ "shadow-[0_8px_40px_0_rgba(0,0,0,0.18)]",
3623
+ "flex flex-col overflow-hidden",
3624
+ sizeMap[size],
3625
+ "transition-all duration-250 ease-in-out",
3626
+ visible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"
3627
+ ].join(" "),
3628
+ children: [
3629
+ title && /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between px-lg py-base border-b border-hairline", children: [
3630
+ /* @__PURE__ */ jsx15("h2", { id: "modal-title", className: "text-heading-sm text-ink", children: title }),
3631
+ /* @__PURE__ */ jsx15(
3632
+ Button,
3692
3633
  {
3693
- className: [
3694
- "inline-flex items-center justify-center",
3695
- "min-w-[1.25rem] h-5 px-xs rounded-sm",
3696
- "text-caption leading-none",
3697
- "transition-[background-color,color] duration-200 ease-in-out",
3698
- isActive ? "bg-ink text-canvas" : "bg-surface-strong text-muted"
3699
- ].filter(Boolean).join(" "),
3700
- "aria-label": `${tab.count} items`,
3701
- children: tab.count
3702
- }
3703
- )
3704
- ]
3705
- },
3706
- tab.value
3707
- );
3634
+ variant: "ghost",
3635
+ size: "sm",
3636
+ "aria-label": "Close modal",
3637
+ onClick: onClose,
3638
+ className: "!px-xs !py-xs",
3639
+ children: /* @__PURE__ */ jsxs15(
3640
+ "svg",
3641
+ {
3642
+ xmlns: "http://www.w3.org/2000/svg",
3643
+ width: "16",
3644
+ height: "16",
3645
+ viewBox: "0 0 24 24",
3646
+ fill: "none",
3647
+ stroke: "currentColor",
3648
+ strokeWidth: "2",
3649
+ strokeLinecap: "round",
3650
+ strokeLinejoin: "round",
3651
+ "aria-hidden": "true",
3652
+ children: [
3653
+ /* @__PURE__ */ jsx15("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
3654
+ /* @__PURE__ */ jsx15("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
3655
+ ]
3656
+ }
3657
+ )
3658
+ }
3659
+ )
3660
+ ] }),
3661
+ /* @__PURE__ */ jsx15("div", { className: "flex-1 px-lg py-base text-body-md text-body overflow-y-auto", children }),
3662
+ footer && /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end gap-sm px-lg py-base border-t border-hairline", children: footer })
3663
+ ]
3664
+ }
3665
+ )
3666
+ }
3667
+ );
3668
+ }
3669
+ );
3670
+ Modal.displayName = "Modal";
3671
+
3672
+ // virtual-pkg:src/atoms/Typography/Typography.tsx
3673
+ import React16 from "react";
3674
+ import { jsx as jsx16 } from "react/jsx-runtime";
3675
+ var roleTagMap = {
3676
+ "display-lg": "h1",
3677
+ "heading-lg": "h2",
3678
+ "heading-md": "h3",
3679
+ "heading-sm": "h4",
3680
+ "body-lg": "p",
3681
+ "body-md": "p",
3682
+ "body-sm": "p",
3683
+ caption: "span"
3684
+ };
3685
+ var roleClassMap = {
3686
+ "display-lg": "text-display-lg",
3687
+ "heading-lg": "text-heading-lg",
3688
+ "heading-md": "text-heading-md",
3689
+ "heading-sm": "text-heading-sm",
3690
+ "body-lg": "text-body-lg",
3691
+ "body-md": "text-body-md",
3692
+ "body-sm": "text-body-sm",
3693
+ caption: "text-caption"
3694
+ };
3695
+ var colorClassMap = {
3696
+ ink: "text-ink",
3697
+ body: "text-body",
3698
+ muted: "text-muted",
3699
+ "muted-soft": "text-muted-soft",
3700
+ primary: "text-primary",
3701
+ "semantic-error": "text-semantic-error",
3702
+ "semantic-success": "text-semantic-success",
3703
+ "semantic-warning": "text-semantic-warning",
3704
+ "on-primary": "text-on-primary"
3705
+ };
3706
+ var Typography = React16.forwardRef(
3707
+ ({
3708
+ role = "body-md",
3709
+ color = "ink",
3710
+ as,
3711
+ truncate = false,
3712
+ uppercase = false,
3713
+ className = "",
3714
+ children,
3715
+ ...rest
3716
+ }, ref) => {
3717
+ const Tag = as ?? roleTagMap[role];
3718
+ const classes = [
3719
+ roleClassMap[role],
3720
+ colorClassMap[color],
3721
+ truncate ? "truncate" : "",
3722
+ uppercase ? "uppercase tracking-wide" : "",
3723
+ className
3724
+ ].filter(Boolean).join(" ");
3725
+ return /* @__PURE__ */ jsx16(Tag, { ref, className: classes, ...rest, children });
3726
+ }
3727
+ );
3728
+ Typography.displayName = "Typography";
3729
+
3730
+ // virtual-pkg:src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx
3731
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
3732
+ var defaultLines = [
3733
+ { text: "# Design System", tone: "heading" },
3734
+ { text: "" },
3735
+ { text: "Design system generated by Atoms Design." },
3736
+ { text: "Consume it via the npm registry." },
3737
+ { text: "" },
3738
+ {
3739
+ text: "IMPORTANT: Read this skill file in full BEFORE editing any file in the consumer app."
3740
+ },
3741
+ { text: "" },
3742
+ {
3743
+ text: "Use this skill whenever the user wants to add, change, fix, restyle, resize,"
3744
+ },
3745
+ { text: "extend, or audit UI in their app." },
3746
+ { text: "" },
3747
+ { text: "## 1. Colors", tone: "heading" },
3748
+ { text: "" },
3749
+ { text: "primary: {colors.primary}" },
3750
+ { text: "on-primary: {colors.on-primary}" },
3751
+ { text: "primary-hover: {colors.primary-hover}" },
3752
+ { text: "primary-active: {colors.primary-active}" },
3753
+ { text: "canvas: {colors.canvas}" },
3754
+ { text: "surface: {colors.surface}" },
3755
+ { text: "ink: {colors.ink}" },
3756
+ { text: "body: {colors.body}" },
3757
+ { text: "muted: {colors.muted}" },
3758
+ { text: "hairline: {colors.hairline}" }
3759
+ ];
3760
+ var CloudIcon = () => /* @__PURE__ */ jsxs16(
3761
+ "svg",
3762
+ {
3763
+ viewBox: "0 0 24 24",
3764
+ width: "16",
3765
+ height: "16",
3766
+ fill: "none",
3767
+ stroke: "currentColor",
3768
+ strokeWidth: "2",
3769
+ strokeLinecap: "round",
3770
+ strokeLinejoin: "round",
3771
+ "aria-hidden": "true",
3772
+ children: [
3773
+ /* @__PURE__ */ jsx17("path", { d: "M17.5 19a4.5 4.5 0 0 0 0-9 5.5 5.5 0 0 0-10.8-1.5A4 4 0 0 0 6.5 16" }),
3774
+ /* @__PURE__ */ jsx17("path", { d: "M8 19h9.5" })
3775
+ ]
3776
+ }
3777
+ );
3778
+ var LinkIcon = () => /* @__PURE__ */ jsxs16(
3779
+ "svg",
3780
+ {
3781
+ viewBox: "0 0 24 24",
3782
+ width: "16",
3783
+ height: "16",
3784
+ fill: "none",
3785
+ stroke: "currentColor",
3786
+ strokeWidth: "2",
3787
+ strokeLinecap: "round",
3788
+ strokeLinejoin: "round",
3789
+ "aria-hidden": "true",
3790
+ children: [
3791
+ /* @__PURE__ */ jsx17("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
3792
+ /* @__PURE__ */ jsx17("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
3793
+ /* @__PURE__ */ jsx17("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
3794
+ ]
3795
+ }
3796
+ );
3797
+ var CopyIcon = () => /* @__PURE__ */ jsxs16(
3798
+ "svg",
3799
+ {
3800
+ viewBox: "0 0 24 24",
3801
+ width: "14",
3802
+ height: "14",
3803
+ fill: "none",
3804
+ stroke: "currentColor",
3805
+ strokeWidth: "2",
3806
+ strokeLinecap: "round",
3807
+ strokeLinejoin: "round",
3808
+ "aria-hidden": "true",
3809
+ children: [
3810
+ /* @__PURE__ */ jsx17("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
3811
+ /* @__PURE__ */ jsx17("path", { d: "M5 15V5a2 2 0 0 1 2-2h10" })
3812
+ ]
3813
+ }
3814
+ );
3815
+ var DownloadIcon = () => /* @__PURE__ */ jsxs16(
3816
+ "svg",
3817
+ {
3818
+ viewBox: "0 0 24 24",
3819
+ width: "14",
3820
+ height: "14",
3821
+ fill: "none",
3822
+ stroke: "currentColor",
3823
+ strokeWidth: "2",
3824
+ strokeLinecap: "round",
3825
+ strokeLinejoin: "round",
3826
+ "aria-hidden": "true",
3827
+ children: [
3828
+ /* @__PURE__ */ jsx17("path", { d: "M12 3v12" }),
3829
+ /* @__PURE__ */ jsx17("path", { d: "M7 10l5 5 5-5" }),
3830
+ /* @__PURE__ */ jsx17("path", { d: "M5 21h14" })
3831
+ ]
3832
+ }
3833
+ );
3834
+ var ExportDesignMdModal = React17.forwardRef(
3835
+ ({
3836
+ isOpen,
3837
+ onClose,
3838
+ onExport,
3839
+ onDownload,
3840
+ onCopy,
3841
+ designSystemName = "Design System",
3842
+ defaultSource = "production",
3843
+ lines = defaultLines
3844
+ }, ref) => {
3845
+ const [source, setSource] = useState3(defaultSource);
3846
+ const handleCopy = () => {
3847
+ const text = lines.map((l) => l.text).join("\n");
3848
+ if (typeof navigator !== "undefined" && navigator.clipboard) {
3849
+ navigator.clipboard.writeText(text).catch(() => {
3850
+ });
3851
+ }
3852
+ onCopy?.();
3853
+ };
3854
+ return /* @__PURE__ */ jsx17(
3855
+ Modal,
3856
+ {
3857
+ ref,
3858
+ isOpen,
3859
+ onClose,
3860
+ title: "Export DESIGN.md",
3861
+ size: "xl",
3862
+ footer: /* @__PURE__ */ jsxs16("div", { className: "flex w-full items-center justify-between", children: [
3863
+ /* @__PURE__ */ jsxs16(Button, { variant: "secondary", size: "sm", onClick: onDownload, children: [
3864
+ /* @__PURE__ */ jsx17(DownloadIcon, {}),
3865
+ "Download .md"
3866
+ ] }),
3867
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-sm", children: [
3868
+ /* @__PURE__ */ jsx17(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }),
3869
+ /* @__PURE__ */ jsx17(Button, { variant: "primary", onClick: onExport, children: "Export" })
3870
+ ] })
3871
+ ] }),
3872
+ children: /* @__PURE__ */ jsxs16("div", { className: "w-full space-y-lg", children: [
3873
+ /* @__PURE__ */ jsx17(Typography, { role: "body-md", color: "muted", children: "Generate and export the DESIGN.md file for handoff to AI coding agents or your team." }),
3874
+ /* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap items-center justify-between gap-md", children: [
3875
+ /* @__PURE__ */ jsxs16("div", { className: "inline-flex items-center gap-xs p-xxs bg-surface-soft border border-hairline rounded-md", children: [
3876
+ /* @__PURE__ */ jsxs16(
3877
+ Button,
3878
+ {
3879
+ variant: source === "production" ? "primary" : "ghost",
3880
+ size: "sm",
3881
+ onClick: () => setSource("production"),
3882
+ children: [
3883
+ /* @__PURE__ */ jsx17(CloudIcon, {}),
3884
+ "Production"
3885
+ ]
3886
+ }
3887
+ ),
3888
+ /* @__PURE__ */ jsxs16(
3889
+ Button,
3890
+ {
3891
+ variant: source === "local" ? "primary" : "ghost",
3892
+ size: "sm",
3893
+ onClick: () => setSource("local"),
3894
+ children: [
3895
+ /* @__PURE__ */ jsx17(LinkIcon, {}),
3896
+ "Local (npm link)"
3897
+ ]
3898
+ }
3899
+ )
3900
+ ] }),
3901
+ /* @__PURE__ */ jsx17(Typography, { role: "body-sm", color: "muted", className: "flex-1 min-w-[16rem]", children: source === "production" ? "Consumer apps install from the public npm registry ('npm install')." : "Consumer apps resolve the package via a local 'npm link' during development." })
3902
+ ] }),
3903
+ /* @__PURE__ */ jsxs16("div", { children: [
3904
+ /* @__PURE__ */ jsx17(
3905
+ Typography,
3906
+ {
3907
+ role: "caption",
3908
+ color: "muted",
3909
+ uppercase: true,
3910
+ className: "mb-xs block",
3911
+ children: "Preview"
3912
+ }
3913
+ ),
3914
+ /* @__PURE__ */ jsxs16("div", { className: "relative w-full bg-canvas border border-hairline rounded-md overflow-hidden", children: [
3915
+ /* @__PURE__ */ jsxs16(
3916
+ Button,
3917
+ {
3918
+ variant: "secondary",
3919
+ size: "sm",
3920
+ onClick: handleCopy,
3921
+ className: "absolute top-sm right-sm",
3922
+ children: [
3923
+ /* @__PURE__ */ jsx17(CopyIcon, {}),
3924
+ "Copy"
3925
+ ]
3926
+ }
3927
+ ),
3928
+ /* @__PURE__ */ jsx17("div", { className: "max-h-64 overflow-y-auto px-md py-sm font-mono text-body-sm", children: lines.map((line, i) => /* @__PURE__ */ jsxs16("div", { className: "flex gap-md", children: [
3929
+ /* @__PURE__ */ jsx17("span", { className: "w-6 flex-shrink-0 text-right text-muted-soft select-none", children: i + 1 }),
3930
+ /* @__PURE__ */ jsx17(
3931
+ "span",
3932
+ {
3933
+ className: line.tone === "heading" ? "text-primary font-weight-heading-sm" : "text-body",
3934
+ children: line.text.replace("Design System", designSystemName) || "\xA0"
3935
+ }
3936
+ )
3937
+ ] }, i)) })
3938
+ ] })
3939
+ ] }),
3940
+ /* @__PURE__ */ jsxs16("div", { className: "w-full space-y-sm", children: [
3941
+ /* @__PURE__ */ jsxs16("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
3942
+ /* @__PURE__ */ jsx17("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-primary", children: /* @__PURE__ */ jsx17(CloudIcon, {}) }),
3943
+ /* @__PURE__ */ jsxs16("div", { className: "min-w-0 flex-1", children: [
3944
+ /* @__PURE__ */ jsx17(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Production (npm install)" }),
3945
+ /* @__PURE__ */ jsx17(Typography, { role: "body-sm", color: "muted", children: "Generated for public npm registry consumption." })
3946
+ ] }),
3947
+ source === "production" ? /* @__PURE__ */ jsx17(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ jsx17(
3948
+ Button,
3949
+ {
3950
+ variant: "secondary",
3951
+ size: "sm",
3952
+ onClick: () => setSource("production"),
3953
+ children: "Switch"
3954
+ }
3955
+ )
3956
+ ] }),
3957
+ /* @__PURE__ */ jsxs16("div", { className: "flex w-full items-center gap-md p-md bg-surface-soft border border-hairline rounded-md", children: [
3958
+ /* @__PURE__ */ jsx17("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-sm bg-surface border border-hairline text-muted", children: /* @__PURE__ */ jsx17(LinkIcon, {}) }),
3959
+ /* @__PURE__ */ jsxs16("div", { className: "min-w-0 flex-1", children: [
3960
+ /* @__PURE__ */ jsx17(Typography, { role: "body-md", color: "ink", className: "font-weight-heading-sm", children: "Local (npm link)" }),
3961
+ /* @__PURE__ */ jsx17(Typography, { role: "body-sm", color: "muted", children: "Generated for local development with npm link." })
3962
+ ] }),
3963
+ source === "local" ? /* @__PURE__ */ jsx17(Chip, { label: "Active", variant: "primary", size: "sm" }) : /* @__PURE__ */ jsx17(
3964
+ Button,
3965
+ {
3966
+ variant: "secondary",
3967
+ size: "sm",
3968
+ onClick: () => setSource("local"),
3969
+ children: "Switch"
3970
+ }
3971
+ )
3972
+ ] })
3973
+ ] })
3974
+ ] })
3975
+ }
3976
+ );
3977
+ }
3978
+ );
3979
+ ExportDesignMdModal.displayName = "ExportDesignMdModal";
3980
+
3981
+ // virtual-pkg:src/atoms/FilterTabBar/FilterTabBar.tsx
3982
+ import React18 from "react";
3983
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
3984
+ var FilterTabBar = React18.forwardRef(
3985
+ ({ tabs, value, onChange, className = "", ...rest }, ref) => {
3986
+ return /* @__PURE__ */ jsx18(
3987
+ "div",
3988
+ {
3989
+ ref,
3990
+ role: "tablist",
3991
+ "aria-label": "Filter tabs",
3992
+ className: [
3993
+ "inline-flex items-center gap-xs p-xs",
3994
+ "bg-canvas border border-hairline rounded-xl shadow-sm",
3995
+ className
3996
+ ].filter(Boolean).join(" "),
3997
+ ...rest,
3998
+ children: tabs.map((tab) => {
3999
+ const isActive = tab.value === value;
4000
+ return /* @__PURE__ */ jsxs17(
4001
+ Button,
4002
+ {
4003
+ role: "tab",
4004
+ "aria-selected": isActive,
4005
+ "aria-label": tab.label ?? tab.value,
4006
+ variant: isActive ? "primary" : "ghost",
4007
+ size: "sm",
4008
+ onClick: () => onChange(tab.value),
4009
+ className: "gap-xs",
4010
+ children: [
4011
+ tab.icon && /* @__PURE__ */ jsx18("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
4012
+ tab.label && /* @__PURE__ */ jsx18("span", { children: tab.label }),
4013
+ tab.count !== void 0 && /* @__PURE__ */ jsx18(
4014
+ "span",
4015
+ {
4016
+ className: [
4017
+ "inline-flex items-center justify-center",
4018
+ "min-w-[1.25rem] h-5 px-xs rounded-sm",
4019
+ "text-caption leading-none",
4020
+ "transition-[background-color,color] duration-200 ease-in-out",
4021
+ isActive ? "bg-ink text-canvas" : "bg-surface-strong text-muted"
4022
+ ].filter(Boolean).join(" "),
4023
+ "aria-label": `${tab.count} items`,
4024
+ children: tab.count
4025
+ }
4026
+ )
4027
+ ]
4028
+ },
4029
+ tab.value
4030
+ );
3708
4031
  })
3709
4032
  }
3710
4033
  );
@@ -3713,20 +4036,20 @@ var FilterTabBar = React15.forwardRef(
3713
4036
  FilterTabBar.displayName = "FilterTabBar";
3714
4037
 
3715
4038
  // virtual-pkg:src/atoms/HomePageTemplate/HomePageTemplate.tsx
3716
- import React16 from "react";
3717
- import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
3718
- var HomeIcon2 = () => /* @__PURE__ */ jsxs16("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: [
3719
- /* @__PURE__ */ jsx16("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
3720
- /* @__PURE__ */ jsx16("polyline", { points: "9 22 9 12 15 12 15 22" })
4039
+ import React19 from "react";
4040
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
4041
+ var HomeIcon2 = () => /* @__PURE__ */ jsxs18("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: [
4042
+ /* @__PURE__ */ jsx19("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
4043
+ /* @__PURE__ */ jsx19("polyline", { points: "9 22 9 12 15 12 15 22" })
3721
4044
  ] });
3722
- var FolderIcon = () => /* @__PURE__ */ jsx16("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx16("path", { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }) });
3723
- var LogoIcon3 = () => /* @__PURE__ */ jsxs16("svg", { width: "26", height: "26", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
3724
- /* @__PURE__ */ jsx16("path", { d: "M12 36C12 36 8 28 16 22C20 19 26 20 26 20C26 20 22 26 18 30C16 32 12 36 12 36Z", style: { fill: "var(--color-logo-orange)" } }),
3725
- /* @__PURE__ */ jsx16("path", { d: "M24 8C24 8 36 12 36 24C36 30 32 36 26 38C26 38 28 30 26 24C25 20 24 8 24 8Z", style: { fill: "var(--color-logo-violet)" } }),
3726
- /* @__PURE__ */ jsx16("path", { d: "M12 36C12 36 16 24 24 20C28 18 36 20 36 20C36 20 30 28 26 32C22 36 12 36 12 36Z", style: { fill: "var(--color-logo-pink)", opacity: 0.7 } })
4045
+ var FolderIcon = () => /* @__PURE__ */ jsx19("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx19("path", { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }) });
4046
+ var LogoIcon3 = () => /* @__PURE__ */ jsxs18("svg", { width: "26", height: "26", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
4047
+ /* @__PURE__ */ jsx19("path", { d: "M12 36C12 36 8 28 16 22C20 19 26 20 26 20C26 20 22 26 18 30C16 32 12 36 12 36Z", style: { fill: "var(--color-logo-orange)" } }),
4048
+ /* @__PURE__ */ jsx19("path", { d: "M24 8C24 8 36 12 36 24C36 30 32 36 26 38C26 38 28 30 26 24C25 20 24 8 24 8Z", style: { fill: "var(--color-logo-violet)" } }),
4049
+ /* @__PURE__ */ jsx19("path", { d: "M12 36C12 36 16 24 24 20C28 18 36 20 36 20C36 20 30 28 26 32C22 36 12 36 12 36Z", style: { fill: "var(--color-logo-pink)", opacity: 0.7 } })
3727
4050
  ] });
3728
- var SparkleIcon = () => /* @__PURE__ */ jsx16("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "14px", height: "14px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx16("path", { d: "M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 17 5.8 21.3l2.4-7.4L2 9.4h7.6z" }) });
3729
- var SuggestionChip = ({ label, onClick }) => /* @__PURE__ */ jsx16(
4051
+ var SparkleIcon = () => /* @__PURE__ */ jsx19("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "14px", height: "14px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx19("path", { d: "M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 17 5.8 21.3l2.4-7.4L2 9.4h7.6z" }) });
4052
+ var SuggestionChip = ({ label, onClick }) => /* @__PURE__ */ jsx19(
3730
4053
  Button,
3731
4054
  {
3732
4055
  type: "button",
@@ -3744,11 +4067,11 @@ var DEFAULT_MODELS = [
3744
4067
  ];
3745
4068
  var DEFAULT_SELECTED_MODEL_ID = "claude-sonnet";
3746
4069
  var NAV_ENTRIES = [
3747
- { id: "home", label: "Home", icon: /* @__PURE__ */ jsx16(HomeIcon2, {}) },
4070
+ { id: "home", label: "Home", icon: /* @__PURE__ */ jsx19(HomeIcon2, {}) },
3748
4071
  {
3749
4072
  id: "projects",
3750
4073
  label: "All projects",
3751
- icon: /* @__PURE__ */ jsx16(FolderIcon, {}),
4074
+ icon: /* @__PURE__ */ jsx19(FolderIcon, {}),
3752
4075
  subItems: [
3753
4076
  { id: "proj-1", label: "Design system" },
3754
4077
  { id: "proj-2", label: "Landing page" },
@@ -3768,7 +4091,7 @@ var GRADIENT_BG = `
3768
4091
  radial-gradient(ellipse 70% 60% at 50% 50%, var(--color-surface-soft) 0%, transparent 70%),
3769
4092
  var(--color-canvas)
3770
4093
  `;
3771
- var HomePageTemplate = React16.forwardRef(
4094
+ var HomePageTemplate = React19.forwardRef(
3772
4095
  ({
3773
4096
  userName = "Hello Designer",
3774
4097
  userInitials = "N",
@@ -3792,8 +4115,8 @@ var HomePageTemplate = React16.forwardRef(
3792
4115
  className,
3793
4116
  style
3794
4117
  }, ref) => {
3795
- const [internalPrompt, setInternalPrompt] = React16.useState("");
3796
- const [internalActiveId, setInternalActiveId] = React16.useState("home");
4118
+ const [internalPrompt, setInternalPrompt] = React19.useState("");
4119
+ const [internalActiveId, setInternalActiveId] = React19.useState("home");
3797
4120
  const resolvedActiveId = activeIdProp !== void 0 ? activeIdProp : internalActiveId;
3798
4121
  const resolvedEntries = navEntries !== void 0 ? navEntries : NAV_ENTRIES;
3799
4122
  const textValue = promptValue !== void 0 ? promptValue : internalPrompt;
@@ -3816,14 +4139,14 @@ var HomePageTemplate = React16.forwardRef(
3816
4139
  if (activeIdProp === void 0) setInternalActiveId(id);
3817
4140
  onSelect?.(id);
3818
4141
  };
3819
- return /* @__PURE__ */ jsxs16(
4142
+ return /* @__PURE__ */ jsxs18(
3820
4143
  "div",
3821
4144
  {
3822
4145
  ref,
3823
4146
  className: ["flex w-full", className].filter(Boolean).join(" "),
3824
4147
  style: { width: "100%", height: "100%", background: "var(--color-canvas)", ...style },
3825
4148
  children: [
3826
- /* @__PURE__ */ jsx16("div", { className: "hidden md:flex flex-shrink-0", style: { height: "100%" }, children: /* @__PURE__ */ jsx16(
4149
+ /* @__PURE__ */ jsx19("div", { className: "hidden md:flex flex-shrink-0", style: { height: "100%" }, children: /* @__PURE__ */ jsx19(
3827
4150
  AppSidebar,
3828
4151
  {
3829
4152
  workspaceName: userName,
@@ -3842,14 +4165,14 @@ var HomePageTemplate = React16.forwardRef(
3842
4165
  style: { height: "100%" }
3843
4166
  }
3844
4167
  ) }),
3845
- /* @__PURE__ */ jsxs16(
4168
+ /* @__PURE__ */ jsxs18(
3846
4169
  "main",
3847
4170
  {
3848
4171
  className: "flex-1 relative flex flex-col overflow-hidden",
3849
4172
  style: { height: "100%" },
3850
4173
  "aria-label": "Home canvas",
3851
4174
  children: [
3852
- /* @__PURE__ */ jsx16(
4175
+ /* @__PURE__ */ jsx19(
3853
4176
  "div",
3854
4177
  {
3855
4178
  "aria-hidden": "true",
@@ -3857,9 +4180,9 @@ var HomePageTemplate = React16.forwardRef(
3857
4180
  style: { background: GRADIENT_BG }
3858
4181
  }
3859
4182
  ),
3860
- /* @__PURE__ */ jsxs16("div", { className: "md:hidden relative z-10 flex items-center justify-between px-md py-sm border-b border-hairline bg-canvas", children: [
3861
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-sm", children: [
3862
- /* @__PURE__ */ jsx16(
4183
+ /* @__PURE__ */ jsxs18("div", { className: "md:hidden relative z-10 flex items-center justify-between px-md py-sm border-b border-hairline bg-canvas", children: [
4184
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-sm", children: [
4185
+ /* @__PURE__ */ jsx19(
3863
4186
  AppSidebarMobile,
3864
4187
  {
3865
4188
  brandName: "Atoms",
@@ -3876,12 +4199,12 @@ var HomePageTemplate = React16.forwardRef(
3876
4199
  onDarkModeToggle
3877
4200
  }
3878
4201
  ),
3879
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-xs", children: [
3880
- /* @__PURE__ */ jsx16(LogoIcon3, {}),
3881
- /* @__PURE__ */ jsx16("span", { className: "text-body-sm font-weight-heading-sm text-ink", children: "Atoms" })
4202
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-xs", children: [
4203
+ /* @__PURE__ */ jsx19(LogoIcon3, {}),
4204
+ /* @__PURE__ */ jsx19("span", { className: "text-body-sm font-weight-heading-sm text-ink", children: "Atoms" })
3882
4205
  ] })
3883
4206
  ] }),
3884
- /* @__PURE__ */ jsx16(
4207
+ /* @__PURE__ */ jsx19(
3885
4208
  "span",
3886
4209
  {
3887
4210
  className: "flex items-center justify-center rounded-full bg-primary text-on-primary text-caption font-weight-heading-sm",
@@ -3891,8 +4214,8 @@ var HomePageTemplate = React16.forwardRef(
3891
4214
  }
3892
4215
  )
3893
4216
  ] }),
3894
- /* @__PURE__ */ jsx16("div", { className: "relative z-10 flex-1 flex flex-col items-center justify-center overflow-auto", children: /* @__PURE__ */ jsxs16("div", { className: "w-full max-w-2xl mx-auto flex flex-col items-center gap-lg px-md py-xl md:gap-xl md:px-lg md:py-xxl", children: [
3895
- /* @__PURE__ */ jsxs16(
4217
+ /* @__PURE__ */ jsx19("div", { className: "relative z-10 flex-1 flex flex-col items-center justify-center overflow-auto", children: /* @__PURE__ */ jsxs18("div", { className: "w-full max-w-2xl mx-auto flex flex-col items-center gap-lg px-md py-xl md:gap-xl md:px-lg md:py-xxl", children: [
4218
+ /* @__PURE__ */ jsxs18(
3896
4219
  Button,
3897
4220
  {
3898
4221
  variant: "secondary",
@@ -3900,13 +4223,13 @@ var HomePageTemplate = React16.forwardRef(
3900
4223
  "aria-label": "New design system",
3901
4224
  className: "!rounded-full flex items-center gap-xs",
3902
4225
  children: [
3903
- /* @__PURE__ */ jsx16(SparkleIcon, {}),
4226
+ /* @__PURE__ */ jsx19(SparkleIcon, {}),
3904
4227
  "New design system"
3905
4228
  ]
3906
4229
  }
3907
4230
  ),
3908
- /* @__PURE__ */ jsxs16("div", { className: "text-center flex flex-col gap-sm", children: [
3909
- /* @__PURE__ */ jsxs16(
4231
+ /* @__PURE__ */ jsxs18("div", { className: "text-center flex flex-col gap-sm", children: [
4232
+ /* @__PURE__ */ jsxs18(
3910
4233
  "h1",
3911
4234
  {
3912
4235
  className: "text-ink",
@@ -3919,12 +4242,12 @@ var HomePageTemplate = React16.forwardRef(
3919
4242
  },
3920
4243
  children: [
3921
4244
  "What atom should we",
3922
- /* @__PURE__ */ jsx16("br", {}),
4245
+ /* @__PURE__ */ jsx19("br", {}),
3923
4246
  "build?"
3924
4247
  ]
3925
4248
  }
3926
4249
  ),
3927
- /* @__PURE__ */ jsx16(
4250
+ /* @__PURE__ */ jsx19(
3928
4251
  "p",
3929
4252
  {
3930
4253
  className: "text-muted text-body-sm md:text-body-md",
@@ -3933,7 +4256,7 @@ var HomePageTemplate = React16.forwardRef(
3933
4256
  }
3934
4257
  )
3935
4258
  ] }),
3936
- /* @__PURE__ */ jsx16("div", { className: "w-full", children: /* @__PURE__ */ jsx16(
4259
+ /* @__PURE__ */ jsx19("div", { className: "w-full", children: /* @__PURE__ */ jsx19(
3937
4260
  PromptInputBar,
3938
4261
  {
3939
4262
  placeholder: "Describe an atom or design token to create...",
@@ -3949,13 +4272,13 @@ var HomePageTemplate = React16.forwardRef(
3949
4272
  onModelChange
3950
4273
  }
3951
4274
  ) }),
3952
- /* @__PURE__ */ jsx16(
4275
+ /* @__PURE__ */ jsx19(
3953
4276
  "div",
3954
4277
  {
3955
4278
  className: "flex flex-wrap justify-center gap-sm",
3956
4279
  role: "list",
3957
4280
  "aria-label": "Suggested prompts",
3958
- children: suggestions.map((s) => /* @__PURE__ */ jsx16("div", { role: "listitem", children: /* @__PURE__ */ jsx16(SuggestionChip, { label: s, onClick: () => handleSuggestion(s) }) }, s))
4281
+ children: suggestions.map((s) => /* @__PURE__ */ jsx19("div", { role: "listitem", children: /* @__PURE__ */ jsx19(SuggestionChip, { label: s, onClick: () => handleSuggestion(s) }) }, s))
3959
4282
  }
3960
4283
  )
3961
4284
  ] }) })
@@ -3969,154 +4292,45 @@ var HomePageTemplate = React16.forwardRef(
3969
4292
  );
3970
4293
  HomePageTemplate.displayName = "HomePageTemplate";
3971
4294
 
3972
- // virtual-pkg:src/atoms/Modal/Modal.tsx
3973
- import React17, { useEffect, useRef, useState as useState2 } from "react";
3974
- import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
3975
- var sizeMap = {
3976
- sm: "max-w-sm",
3977
- md: "max-w-lg",
3978
- lg: "max-w-2xl"
3979
- };
3980
- var Modal = React17.forwardRef(
3981
- ({ isOpen, onClose, title, children, footer, size = "md" }, ref) => {
3982
- const [mounted, setMounted] = useState2(false);
3983
- const [visible, setVisible] = useState2(false);
3984
- const overlayRef = useRef(null);
3985
- useEffect(() => {
3986
- if (isOpen) {
3987
- setMounted(true);
3988
- const raf = requestAnimationFrame(() => {
3989
- requestAnimationFrame(() => setVisible(true));
3990
- });
3991
- return () => cancelAnimationFrame(raf);
3992
- } else {
3993
- setVisible(false);
3994
- const timer = setTimeout(() => setMounted(false), 250);
3995
- return () => clearTimeout(timer);
3996
- }
3997
- }, [isOpen]);
3998
- useEffect(() => {
3999
- if (!mounted) return;
4000
- const handleKey = (e) => {
4001
- if (e.key === "Escape") onClose();
4002
- };
4003
- document.addEventListener("keydown", handleKey);
4004
- return () => document.removeEventListener("keydown", handleKey);
4005
- }, [mounted, onClose]);
4006
- if (!mounted) return null;
4007
- const handleBackdropClick = (e) => {
4008
- if (e.target === overlayRef.current) onClose();
4009
- };
4010
- return /* @__PURE__ */ jsx17(
4011
- "div",
4012
- {
4013
- ref: overlayRef,
4014
- role: "dialog",
4015
- "aria-modal": "true",
4016
- "aria-labelledby": title ? "modal-title" : void 0,
4017
- onClick: handleBackdropClick,
4018
- className: [
4019
- "fixed inset-0 flex items-center justify-center p-base",
4020
- "bg-[var(--color-scrim)]/50",
4021
- "transition-opacity duration-250 ease-in-out",
4022
- visible ? "opacity-100" : "opacity-0"
4023
- ].join(" "),
4024
- style: { zIndex: "var(--z-modal, 1000)" },
4025
- children: /* @__PURE__ */ jsxs17(
4026
- "div",
4027
- {
4028
- ref,
4029
- className: [
4030
- "relative w-full bg-canvas rounded-lg",
4031
- "shadow-[0_8px_40px_0_rgba(0,0,0,0.18)]",
4032
- "flex flex-col overflow-hidden",
4033
- sizeMap[size],
4034
- "transition-all duration-250 ease-in-out",
4035
- visible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"
4036
- ].join(" "),
4037
- children: [
4038
- title && /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between px-lg py-base border-b border-hairline", children: [
4039
- /* @__PURE__ */ jsx17("h2", { id: "modal-title", className: "text-heading-sm text-ink", children: title }),
4040
- /* @__PURE__ */ jsx17(
4041
- Button,
4042
- {
4043
- variant: "ghost",
4044
- size: "sm",
4045
- "aria-label": "Close modal",
4046
- onClick: onClose,
4047
- className: "!px-xs !py-xs",
4048
- children: /* @__PURE__ */ jsxs17(
4049
- "svg",
4050
- {
4051
- xmlns: "http://www.w3.org/2000/svg",
4052
- width: "16",
4053
- height: "16",
4054
- viewBox: "0 0 24 24",
4055
- fill: "none",
4056
- stroke: "currentColor",
4057
- strokeWidth: "2",
4058
- strokeLinecap: "round",
4059
- strokeLinejoin: "round",
4060
- "aria-hidden": "true",
4061
- children: [
4062
- /* @__PURE__ */ jsx17("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
4063
- /* @__PURE__ */ jsx17("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
4064
- ]
4065
- }
4066
- )
4067
- }
4068
- )
4069
- ] }),
4070
- /* @__PURE__ */ jsx17("div", { className: "flex-1 px-lg py-base text-body-md text-body overflow-y-auto", children }),
4071
- footer && /* @__PURE__ */ jsx17("div", { className: "flex items-center justify-end gap-sm px-lg py-base border-t border-hairline", children: footer })
4072
- ]
4073
- }
4074
- )
4075
- }
4076
- );
4077
- }
4078
- );
4079
- Modal.displayName = "Modal";
4080
-
4081
4295
  // virtual-pkg:src/atoms/PreviewToolbar/PreviewToolbar.tsx
4082
- import React18 from "react";
4083
- import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
4084
- var DesktopIcon = () => /* @__PURE__ */ jsxs18("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4085
- /* @__PURE__ */ jsx18("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
4086
- /* @__PURE__ */ jsx18("path", { d: "M8 21h8M12 17v4" })
4296
+ import React20 from "react";
4297
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
4298
+ var DesktopIcon = () => /* @__PURE__ */ jsxs19("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4299
+ /* @__PURE__ */ jsx20("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2" }),
4300
+ /* @__PURE__ */ jsx20("path", { d: "M8 21h8M12 17v4" })
4087
4301
  ] });
4088
- var SidebarIcon2 = () => /* @__PURE__ */ jsxs18("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4089
- /* @__PURE__ */ jsx18("rect", { x: "2", y: "3", width: "20", height: "18", rx: "2" }),
4090
- /* @__PURE__ */ jsx18("path", { d: "M9 3v18" })
4302
+ var SidebarIcon2 = () => /* @__PURE__ */ jsxs19("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4303
+ /* @__PURE__ */ jsx20("rect", { x: "2", y: "3", width: "20", height: "18", rx: "2" }),
4304
+ /* @__PURE__ */ jsx20("path", { d: "M9 3v18" })
4091
4305
  ] });
4092
- var MobileIcon = () => /* @__PURE__ */ jsxs18("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4093
- /* @__PURE__ */ jsx18("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
4094
- /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
4306
+ var MobileIcon = () => /* @__PURE__ */ jsxs19("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4307
+ /* @__PURE__ */ jsx20("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2" }),
4308
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor", stroke: "none" })
4095
4309
  ] });
4096
- var ExpandIcon = () => /* @__PURE__ */ jsx18("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
4097
- var InspectIcon = () => /* @__PURE__ */ jsxs18("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4098
- /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "12", r: "9" }),
4099
- /* @__PURE__ */ jsx18("path", { d: "M12 8v4l3 3" }),
4100
- /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
4310
+ var ExpandIcon = () => /* @__PURE__ */ jsx20("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx20("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
4311
+ var InspectIcon = () => /* @__PURE__ */ jsxs19("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4312
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "9" }),
4313
+ /* @__PURE__ */ jsx20("path", { d: "M12 8v4l3 3" }),
4314
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
4101
4315
  ] });
4102
- var MoonIcon4 = () => /* @__PURE__ */ jsx18("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
4103
- var FullscreenIcon = () => /* @__PURE__ */ jsxs18("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4104
- /* @__PURE__ */ jsx18("polyline", { points: "15 3 21 3 21 9" }),
4105
- /* @__PURE__ */ jsx18("polyline", { points: "9 21 3 21 3 15" }),
4106
- /* @__PURE__ */ jsx18("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
4107
- /* @__PURE__ */ jsx18("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
4316
+ var MoonIcon4 = () => /* @__PURE__ */ jsx20("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx20("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
4317
+ var FullscreenIcon = () => /* @__PURE__ */ jsxs19("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4318
+ /* @__PURE__ */ jsx20("polyline", { points: "15 3 21 3 21 9" }),
4319
+ /* @__PURE__ */ jsx20("polyline", { points: "9 21 3 21 3 15" }),
4320
+ /* @__PURE__ */ jsx20("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
4321
+ /* @__PURE__ */ jsx20("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
4108
4322
  ] });
4109
- var DotsIcon = () => /* @__PURE__ */ jsxs18("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
4110
- /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "5", r: "1.6" }),
4111
- /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "12", r: "1.6" }),
4112
- /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "19", r: "1.6" })
4323
+ var DotsIcon = () => /* @__PURE__ */ jsxs19("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", stroke: "none", "aria-hidden": "true", children: [
4324
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "5", r: "1.6" }),
4325
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "1.6" }),
4326
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "19", r: "1.6" })
4113
4327
  ] });
4114
4328
  var VIEWPORT_OPTIONS = [
4115
4329
  { id: "desktop", Icon: DesktopIcon, label: "Desktop view" },
4116
4330
  { id: "sidebar", Icon: SidebarIcon2, label: "Sidebar view" },
4117
4331
  { id: "mobile", Icon: MobileIcon, label: "Mobile view" }
4118
4332
  ];
4119
- var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx18(
4333
+ var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx20(
4120
4334
  Button,
4121
4335
  {
4122
4336
  variant: active ? "primary" : "ghost",
@@ -4128,7 +4342,7 @@ var ViewportBtn = ({ label, active, onClick, children }) => /* @__PURE__ */ jsx1
4128
4342
  children
4129
4343
  }
4130
4344
  );
4131
- var PreviewToolbar = React18.forwardRef(
4345
+ var PreviewToolbar = React20.forwardRef(
4132
4346
  ({
4133
4347
  viewport = "desktop",
4134
4348
  onViewportChange,
@@ -4143,7 +4357,7 @@ var PreviewToolbar = React18.forwardRef(
4143
4357
  kindLabel = "ATOM",
4144
4358
  onOverflow,
4145
4359
  className = ""
4146
- }, ref) => /* @__PURE__ */ jsxs18(
4360
+ }, ref) => /* @__PURE__ */ jsxs19(
4147
4361
  "div",
4148
4362
  {
4149
4363
  ref,
@@ -4157,24 +4371,24 @@ var PreviewToolbar = React18.forwardRef(
4157
4371
  className
4158
4372
  ].filter(Boolean).join(" "),
4159
4373
  children: [
4160
- /* @__PURE__ */ jsxs18(
4374
+ /* @__PURE__ */ jsxs19(
4161
4375
  "div",
4162
4376
  {
4163
4377
  role: "group",
4164
4378
  "aria-label": "Viewport size",
4165
4379
  className: "inline-flex items-center gap-xxs bg-surface-soft rounded-lg p-xxs w-full md:w-auto",
4166
4380
  children: [
4167
- VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ jsx18(
4381
+ VIEWPORT_OPTIONS.map(({ id, Icon, label }) => /* @__PURE__ */ jsx20(
4168
4382
  ViewportBtn,
4169
4383
  {
4170
4384
  label,
4171
4385
  active: !expanded && viewport === id,
4172
4386
  onClick: () => onViewportChange?.(id),
4173
- children: /* @__PURE__ */ jsx18(Icon, {})
4387
+ children: /* @__PURE__ */ jsx20(Icon, {})
4174
4388
  },
4175
4389
  id
4176
4390
  )),
4177
- /* @__PURE__ */ jsx18(
4391
+ /* @__PURE__ */ jsx20(
4178
4392
  Button,
4179
4393
  {
4180
4394
  variant: expanded ? "primary" : "ghost",
@@ -4186,14 +4400,14 @@ var PreviewToolbar = React18.forwardRef(
4186
4400
  "!w-8 !h-8 !p-0 rounded-sm shrink-0",
4187
4401
  expanded ? "" : "text-muted"
4188
4402
  ].join(" "),
4189
- children: /* @__PURE__ */ jsx18(ExpandIcon, {})
4403
+ children: /* @__PURE__ */ jsx20(ExpandIcon, {})
4190
4404
  }
4191
4405
  )
4192
4406
  ]
4193
4407
  }
4194
4408
  ),
4195
- /* @__PURE__ */ jsxs18("div", { className: "flex flex-wrap items-center gap-sm", children: [
4196
- /* @__PURE__ */ jsxs18(
4409
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-wrap items-center gap-sm", children: [
4410
+ /* @__PURE__ */ jsxs19(
4197
4411
  Button,
4198
4412
  {
4199
4413
  variant: inspecting ? "primary" : "secondary",
@@ -4202,12 +4416,12 @@ var PreviewToolbar = React18.forwardRef(
4202
4416
  onClick: onInspectTokens,
4203
4417
  className: "gap-xs rounded-xl",
4204
4418
  children: [
4205
- /* @__PURE__ */ jsx18(InspectIcon, {}),
4419
+ /* @__PURE__ */ jsx20(InspectIcon, {}),
4206
4420
  inspecting ? "Exit inspect" : "Inspect tokens"
4207
4421
  ]
4208
4422
  }
4209
4423
  ),
4210
- /* @__PURE__ */ jsxs18(
4424
+ /* @__PURE__ */ jsxs19(
4211
4425
  Button,
4212
4426
  {
4213
4427
  variant: darkMode ? "primary" : "secondary",
@@ -4216,12 +4430,12 @@ var PreviewToolbar = React18.forwardRef(
4216
4430
  onClick: onDarkToggle,
4217
4431
  className: "gap-xs rounded-xl",
4218
4432
  children: [
4219
- /* @__PURE__ */ jsx18(MoonIcon4, {}),
4433
+ /* @__PURE__ */ jsx20(MoonIcon4, {}),
4220
4434
  "Dark"
4221
4435
  ]
4222
4436
  }
4223
4437
  ),
4224
- /* @__PURE__ */ jsxs18(
4438
+ /* @__PURE__ */ jsxs19(
4225
4439
  Button,
4226
4440
  {
4227
4441
  variant: "secondary",
@@ -4229,12 +4443,12 @@ var PreviewToolbar = React18.forwardRef(
4229
4443
  onClick: onFullscreen,
4230
4444
  className: "gap-xs rounded-xl",
4231
4445
  children: [
4232
- /* @__PURE__ */ jsx18(FullscreenIcon, {}),
4446
+ /* @__PURE__ */ jsx20(FullscreenIcon, {}),
4233
4447
  "Fullscreen"
4234
4448
  ]
4235
4449
  }
4236
4450
  ),
4237
- /* @__PURE__ */ jsx18(
4451
+ /* @__PURE__ */ jsx20(
4238
4452
  Chip,
4239
4453
  {
4240
4454
  label: modelLabel ?? "",
@@ -4243,7 +4457,7 @@ var PreviewToolbar = React18.forwardRef(
4243
4457
  className: "border-primary text-primary bg-canvas cursor-default select-none"
4244
4458
  }
4245
4459
  ),
4246
- /* @__PURE__ */ jsx18(
4460
+ /* @__PURE__ */ jsx20(
4247
4461
  Chip,
4248
4462
  {
4249
4463
  label: kindLabel ?? "",
@@ -4252,7 +4466,7 @@ var PreviewToolbar = React18.forwardRef(
4252
4466
  className: "bg-primary-disabled border-primary-disabled text-primary cursor-default select-none"
4253
4467
  }
4254
4468
  ),
4255
- /* @__PURE__ */ jsx18(
4469
+ /* @__PURE__ */ jsx20(
4256
4470
  Button,
4257
4471
  {
4258
4472
  variant: "ghost",
@@ -4260,7 +4474,7 @@ var PreviewToolbar = React18.forwardRef(
4260
4474
  "aria-label": "More options",
4261
4475
  onClick: onOverflow,
4262
4476
  className: "!w-8 !h-8 !p-0 rounded-sm text-muted shrink-0",
4263
- children: /* @__PURE__ */ jsx18(DotsIcon, {})
4477
+ children: /* @__PURE__ */ jsx20(DotsIcon, {})
4264
4478
  }
4265
4479
  )
4266
4480
  ] })
@@ -4270,63 +4484,251 @@ var PreviewToolbar = React18.forwardRef(
4270
4484
  );
4271
4485
  PreviewToolbar.displayName = "PreviewToolbar";
4272
4486
 
4273
- // virtual-pkg:src/atoms/Typography/Typography.tsx
4274
- import React19 from "react";
4275
- import { jsx as jsx19 } from "react/jsx-runtime";
4276
- var roleTagMap = {
4277
- "display-lg": "h1",
4278
- "heading-lg": "h2",
4279
- "heading-md": "h3",
4280
- "heading-sm": "h4",
4281
- "body-lg": "p",
4282
- "body-md": "p",
4283
- "body-sm": "p",
4284
- caption: "span"
4285
- };
4286
- var roleClassMap = {
4287
- "display-lg": "text-display-lg",
4288
- "heading-lg": "text-heading-lg",
4289
- "heading-md": "text-heading-md",
4290
- "heading-sm": "text-heading-sm",
4291
- "body-lg": "text-body-lg",
4292
- "body-md": "text-body-md",
4293
- "body-sm": "text-body-sm",
4294
- caption: "text-caption"
4295
- };
4296
- var colorClassMap = {
4297
- ink: "text-ink",
4298
- body: "text-body",
4299
- muted: "text-muted",
4300
- "muted-soft": "text-muted-soft",
4301
- primary: "text-primary",
4302
- "semantic-error": "text-semantic-error",
4303
- "semantic-success": "text-semantic-success",
4304
- "semantic-warning": "text-semantic-warning",
4305
- "on-primary": "text-on-primary"
4306
- };
4307
- var Typography = React19.forwardRef(
4487
+ // virtual-pkg:src/atoms/PublishModal/PublishModal.tsx
4488
+ import React21, { useState as useState4 } from "react";
4489
+ import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
4490
+ var GlobeIcon = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4491
+ /* @__PURE__ */ jsx21("circle", { cx: "12", cy: "12", r: "9" }),
4492
+ /* @__PURE__ */ jsx21("path", { d: "M3 12h18" }),
4493
+ /* @__PURE__ */ jsx21("path", { d: "M12 3a13.5 13.5 0 0 1 0 18" }),
4494
+ /* @__PURE__ */ jsx21("path", { d: "M12 3a13.5 13.5 0 0 0 0 18" })
4495
+ ] });
4496
+ var LinkIcon2 = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4497
+ /* @__PURE__ */ jsx21("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
4498
+ /* @__PURE__ */ jsx21("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
4499
+ /* @__PURE__ */ jsx21("line", { x1: "8", y1: "12", x2: "16", y2: "12" })
4500
+ ] });
4501
+ var InfoIcon = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: [
4502
+ /* @__PURE__ */ jsx21("circle", { cx: "12", cy: "12", r: "10", opacity: "0.15" }),
4503
+ /* @__PURE__ */ jsx21("circle", { cx: "12", cy: "7.5", r: "1.15" }),
4504
+ /* @__PURE__ */ jsx21("rect", { x: "11", y: "10.5", width: "2", height: "7", rx: "1" })
4505
+ ] });
4506
+ var CheckCircleIcon = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4507
+ /* @__PURE__ */ jsx21("circle", { cx: "12", cy: "12", r: "9" }),
4508
+ /* @__PURE__ */ jsx21("path", { d: "M8.5 12.5l2.2 2.2 4.8-5" })
4509
+ ] });
4510
+ var LockIcon = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4511
+ /* @__PURE__ */ jsx21("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
4512
+ /* @__PURE__ */ jsx21("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
4513
+ ] });
4514
+ var RefreshIcon = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4515
+ /* @__PURE__ */ jsx21("path", { d: "M4 4v5h5" }),
4516
+ /* @__PURE__ */ jsx21("path", { d: "M20 20v-5h-5" }),
4517
+ /* @__PURE__ */ jsx21("path", { d: "M5.5 9A7 7 0 0 1 19 12" }),
4518
+ /* @__PURE__ */ jsx21("path", { d: "M18.5 15A7 7 0 0 1 5 12" })
4519
+ ] });
4520
+ var ChevronIcon3 = ({ open }) => /* @__PURE__ */ jsx21(
4521
+ "svg",
4522
+ {
4523
+ viewBox: "0 0 24 24",
4524
+ width: "14",
4525
+ height: "14",
4526
+ fill: "none",
4527
+ stroke: "currentColor",
4528
+ strokeWidth: "2",
4529
+ strokeLinecap: "round",
4530
+ strokeLinejoin: "round",
4531
+ "aria-hidden": "true",
4532
+ className: ["transition-transform duration-150", open ? "rotate-90" : ""].join(" "),
4533
+ children: /* @__PURE__ */ jsx21("path", { d: "M9 6l6 6-6 6" })
4534
+ }
4535
+ );
4536
+ function bumpMinor(version) {
4537
+ const parts = version.split(".").map((n) => parseInt(n, 10) || 0);
4538
+ const [major = 0, minor = 0] = parts;
4539
+ return `${major}.${minor + 1}.0`;
4540
+ }
4541
+ var PublishModal = React21.forwardRef(
4308
4542
  ({
4309
- role = "body-md",
4310
- color = "ink",
4311
- as,
4312
- truncate = false,
4313
- uppercase = false,
4314
- className = "",
4315
- children,
4316
- ...rest
4543
+ isOpen,
4544
+ onClose,
4545
+ onPublish,
4546
+ packageName = "@plasma/vibedesign",
4547
+ currentVersion = "1.10.9",
4548
+ defaultNextVersion,
4549
+ defaultTarget = "production"
4317
4550
  }, ref) => {
4318
- const Tag = as ?? roleTagMap[role];
4319
- const classes = [
4320
- roleClassMap[role],
4321
- colorClassMap[color],
4322
- truncate ? "truncate" : "",
4323
- uppercase ? "uppercase tracking-wide" : "",
4324
- className
4325
- ].filter(Boolean).join(" ");
4326
- return /* @__PURE__ */ jsx19(Tag, { ref, className: classes, ...rest, children });
4551
+ const [target, setTarget] = useState4(defaultTarget);
4552
+ const [nextVersion, setNextVersion] = useState4(
4553
+ defaultNextVersion ?? bumpMinor(currentVersion)
4554
+ );
4555
+ const [notesOpen, setNotesOpen] = useState4(false);
4556
+ const [notes, setNotes] = useState4("");
4557
+ const isProduction = target === "production";
4558
+ const summaryItems = isProduction ? [
4559
+ { title: "Package validated", desc: "All required fields are valid." },
4560
+ { title: "No breaking changes", desc: "Compatible with previous versions." },
4561
+ { title: "Access", desc: "You have publish access to this package." }
4562
+ ] : [
4563
+ { title: "Package built", desc: "Local build artifacts are up to date." },
4564
+ { title: "Link target resolved", desc: "A local npm link target was found." },
4565
+ { title: "No global conflicts", desc: "No other project links this package name." }
4566
+ ];
4567
+ const noticeText = isProduction ? "Publishing to npm registry makes your package publicly available to the world. Make sure you're ready to release this version." : "Local publish creates an npm link only visible on this machine, for testing and internal use before a real release.";
4568
+ const handlePublish = () => onPublish?.(target, nextVersion);
4569
+ return /* @__PURE__ */ jsx21(
4570
+ Modal,
4571
+ {
4572
+ ref,
4573
+ isOpen,
4574
+ onClose,
4575
+ title: "Publish package",
4576
+ size: "xl",
4577
+ footer: /* @__PURE__ */ jsxs20("div", { className: "flex w-full items-center justify-end gap-sm", children: [
4578
+ /* @__PURE__ */ jsx21(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }),
4579
+ /* @__PURE__ */ jsx21(Button, { variant: "primary", onClick: handlePublish, children: isProduction ? "Publish to npm registry" : "Publish locally (npm link)" })
4580
+ ] }),
4581
+ children: /* @__PURE__ */ jsxs20("div", { className: "w-full space-y-lg", children: [
4582
+ /* @__PURE__ */ jsx21("p", { className: "text-body-md text-muted", children: "Publish your package to npm so others can install and use it. Choose between a production release to the npm registry or a local publish for testing and internal use." }),
4583
+ /* @__PURE__ */ jsxs20(
4584
+ "div",
4585
+ {
4586
+ role: "tablist",
4587
+ "aria-label": "Publish target",
4588
+ className: "flex items-center gap-lg border-b border-hairline",
4589
+ children: [
4590
+ /* @__PURE__ */ jsxs20(
4591
+ Button,
4592
+ {
4593
+ type: "button",
4594
+ role: "tab",
4595
+ "aria-selected": isProduction,
4596
+ variant: "ghost",
4597
+ size: "sm",
4598
+ onClick: () => setTarget("production"),
4599
+ className: [
4600
+ "!rounded-none border-b-2 -mb-px",
4601
+ isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
4602
+ ].join(" "),
4603
+ children: [
4604
+ /* @__PURE__ */ jsx21(GlobeIcon, {}),
4605
+ "Production (npm registry)"
4606
+ ]
4607
+ }
4608
+ ),
4609
+ /* @__PURE__ */ jsxs20(
4610
+ Button,
4611
+ {
4612
+ type: "button",
4613
+ role: "tab",
4614
+ "aria-selected": !isProduction,
4615
+ variant: "ghost",
4616
+ size: "sm",
4617
+ onClick: () => setTarget("local"),
4618
+ className: [
4619
+ "!rounded-none border-b-2 -mb-px",
4620
+ !isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
4621
+ ].join(" "),
4622
+ children: [
4623
+ /* @__PURE__ */ jsx21(LinkIcon2, {}),
4624
+ "Local (npm link)"
4625
+ ]
4626
+ }
4627
+ )
4628
+ ]
4629
+ }
4630
+ ),
4631
+ /* @__PURE__ */ jsxs20("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-md", children: [
4632
+ /* @__PURE__ */ jsxs20("div", { className: "rounded-md border border-hairline p-base space-y-base", children: [
4633
+ /* @__PURE__ */ jsx21("p", { className: "text-body-md font-weight-heading-sm text-ink", children: "Package details" }),
4634
+ /* @__PURE__ */ jsxs20("div", { className: "space-y-xxs", children: [
4635
+ /* @__PURE__ */ jsx21("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Package" }),
4636
+ /* @__PURE__ */ jsx21("p", { className: "text-body-md text-ink font-mono", children: packageName })
4637
+ ] }),
4638
+ /* @__PURE__ */ jsxs20("div", { className: "space-y-xxs", children: [
4639
+ /* @__PURE__ */ jsx21("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Current version" }),
4640
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-xs", children: [
4641
+ /* @__PURE__ */ jsx21("p", { className: "text-body-md text-ink font-mono", children: currentVersion }),
4642
+ /* @__PURE__ */ jsx21(Chip, { label: "Latest", variant: "primary", size: "sm" })
4643
+ ] })
4644
+ ] }),
4645
+ isProduction ? /* @__PURE__ */ jsxs20("div", { className: "space-y-xxs", children: [
4646
+ /* @__PURE__ */ jsx21("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Next version" }),
4647
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-xs", children: [
4648
+ /* @__PURE__ */ jsx21(
4649
+ Input,
4650
+ {
4651
+ "aria-label": "Next version",
4652
+ value: nextVersion,
4653
+ onChange: (e) => setNextVersion(e.target.value),
4654
+ fullWidth: true
4655
+ }
4656
+ ),
4657
+ /* @__PURE__ */ jsx21(
4658
+ Button,
4659
+ {
4660
+ variant: "secondary",
4661
+ size: "md",
4662
+ "aria-label": "Reset to suggested version",
4663
+ onClick: () => setNextVersion(bumpMinor(currentVersion)),
4664
+ className: "!px-sm",
4665
+ children: /* @__PURE__ */ jsx21(RefreshIcon, {})
4666
+ }
4667
+ )
4668
+ ] })
4669
+ ] }) : /* @__PURE__ */ jsxs20("div", { className: "space-y-xxs", children: [
4670
+ /* @__PURE__ */ jsx21("p", { className: "text-caption uppercase tracking-wide text-muted", children: "Link command" }),
4671
+ /* @__PURE__ */ jsxs20("p", { className: "rounded-sm bg-surface-soft border border-hairline px-sm py-xs text-body-sm font-mono text-body", children: [
4672
+ "npm link ",
4673
+ packageName
4674
+ ] })
4675
+ ] }),
4676
+ /* @__PURE__ */ jsxs20("div", { className: "border border-hairline rounded-sm", children: [
4677
+ /* @__PURE__ */ jsxs20(
4678
+ Button,
4679
+ {
4680
+ type: "button",
4681
+ variant: "ghost",
4682
+ size: "sm",
4683
+ onClick: () => setNotesOpen((v) => !v),
4684
+ "aria-expanded": notesOpen,
4685
+ className: "w-full !justify-start !rounded-none gap-xs text-body",
4686
+ children: [
4687
+ /* @__PURE__ */ jsx21(ChevronIcon3, { open: notesOpen }),
4688
+ "Release notes (optional)"
4689
+ ]
4690
+ }
4691
+ ),
4692
+ notesOpen && /* @__PURE__ */ jsx21("div", { className: "px-sm pb-sm", children: /* @__PURE__ */ jsx21(
4693
+ "textarea",
4694
+ {
4695
+ value: notes,
4696
+ onChange: (e) => setNotes(e.target.value),
4697
+ placeholder: "What changed in this release?",
4698
+ rows: 3,
4699
+ className: "w-full resize-none rounded-sm border border-hairline bg-surface px-sm py-xs text-body-sm text-ink placeholder:text-muted-soft outline-none focus:ring-2 focus:ring-primary-focus/20 focus:border-primary-focus"
4700
+ }
4701
+ ) })
4702
+ ] })
4703
+ ] }),
4704
+ /* @__PURE__ */ jsxs20("div", { className: "rounded-md border border-hairline p-base space-y-base", children: [
4705
+ /* @__PURE__ */ jsx21("p", { className: "text-body-md font-weight-heading-sm text-ink", children: "Publish summary" }),
4706
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-start gap-sm rounded-sm bg-primary/10 border border-primary/30 p-sm", children: [
4707
+ /* @__PURE__ */ jsx21("span", { className: "text-primary flex-shrink-0 mt-xxs", children: /* @__PURE__ */ jsx21(InfoIcon, {}) }),
4708
+ /* @__PURE__ */ jsxs20("div", { children: [
4709
+ /* @__PURE__ */ jsx21("p", { className: "text-body-sm font-weight-heading-sm text-primary", children: isProduction ? "Ready to publish" : "Ready to link" }),
4710
+ /* @__PURE__ */ jsx21("p", { className: "text-body-sm text-body", children: isProduction ? `This will publish version ${nextVersion} to the npm registry.` : `This will link ${packageName} for local development.` })
4711
+ ] })
4712
+ ] }),
4713
+ /* @__PURE__ */ jsx21("div", { className: "space-y-sm", children: summaryItems.map((item) => /* @__PURE__ */ jsxs20("div", { className: "flex items-start gap-sm", children: [
4714
+ /* @__PURE__ */ jsx21("span", { className: "text-semantic-success flex-shrink-0 mt-xxs", children: /* @__PURE__ */ jsx21(CheckCircleIcon, {}) }),
4715
+ /* @__PURE__ */ jsxs20("div", { children: [
4716
+ /* @__PURE__ */ jsx21("p", { className: "text-body-sm font-weight-heading-sm text-ink", children: item.title }),
4717
+ /* @__PURE__ */ jsx21("p", { className: "text-body-sm text-muted", children: item.desc })
4718
+ ] })
4719
+ ] }, item.title)) })
4720
+ ] })
4721
+ ] }),
4722
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-sm rounded-md bg-surface-soft border border-hairline p-base", children: [
4723
+ /* @__PURE__ */ jsx21("span", { className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-sm bg-primary text-on-primary", children: /* @__PURE__ */ jsx21(LockIcon, {}) }),
4724
+ /* @__PURE__ */ jsx21("p", { className: "text-body-sm text-body", children: noticeText })
4725
+ ] })
4726
+ ] })
4727
+ }
4728
+ );
4327
4729
  }
4328
4730
  );
4329
- Typography.displayName = "Typography";
4731
+ PublishModal.displayName = "PublishModal";
4330
4732
  export {
4331
4733
  AppLayout,
4332
4734
  AppSidebar,
@@ -4336,6 +4738,7 @@ export {
4336
4738
  ChatScreen,
4337
4739
  Chip,
4338
4740
  ComponentCard,
4741
+ ExportDesignMdModal,
4339
4742
  FilterTabBar,
4340
4743
  HomePageTemplate,
4341
4744
  Input,
@@ -4343,6 +4746,7 @@ export {
4343
4746
  NavItem,
4344
4747
  PreviewToolbar,
4345
4748
  PromptInputBar,
4749
+ PublishModal,
4346
4750
  TopNavbar,
4347
4751
  Typography,
4348
4752
  UpgradeCard,