@objectifthunes/whiteboard 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -20,10 +20,70 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ Alert: () => Alert,
24
+ AssetCardSkeleton: () => AssetCardSkeleton,
25
+ AssetTitle: () => AssetTitle,
26
+ AvatarSkeleton: () => AvatarSkeleton,
27
+ Button: () => Button,
28
+ ButtonRow: () => ButtonRow,
29
+ ButtonSkeleton: () => ButtonSkeleton,
30
+ CanvasSkeleton: () => CanvasSkeleton,
31
+ Chip: () => Chip,
32
+ ChipSkeleton: () => ChipSkeleton,
33
+ ChoiceCard: () => ChoiceCard,
34
+ ChoiceGroup: () => ChoiceGroup,
35
+ ChoiceGroupSkeleton: () => ChoiceGroupSkeleton,
23
36
  ConfirmDialog: () => ConfirmDialog,
37
+ CoordGrid: () => CoordGrid,
38
+ CoordInput: () => CoordInput,
39
+ EmptyState: () => EmptyState,
40
+ Field: () => Field,
24
41
  FloatingPanel: () => FloatingPanel,
42
+ GeneratingOverlay: () => GeneratingOverlay,
43
+ IconButtonSkeleton: () => IconButtonSkeleton,
44
+ IconText: () => IconText,
45
+ ImageThumb: () => ImageThumb,
46
+ Inline: () => Inline,
47
+ Input: () => Input,
48
+ InputSkeleton: () => InputSkeleton,
49
+ ItemCard: () => ItemCard,
50
+ ItemList: () => ItemList,
51
+ Label: () => Label,
52
+ LineSkeleton: () => LineSkeleton,
53
+ List: () => List,
54
+ LoadingState: () => LoadingState,
25
55
  Minimap: () => Minimap,
56
+ MutedText: () => MutedText,
57
+ PageCard: () => PageCard,
58
+ PageShell: () => PageShell,
59
+ PageTitle: () => PageTitle,
60
+ PanelCloseButton: () => PanelCloseButton,
26
61
  PanelErrorBoundary: () => PanelErrorBoundary,
62
+ PanelFormSkeleton: () => PanelFormSkeleton,
63
+ PanelSection: () => PanelSection,
64
+ PanelTitle: () => PanelTitle,
65
+ PickerCard: () => PickerCard,
66
+ PickerGrid: () => PickerGrid,
67
+ PickerGridSkeleton: () => PickerGridSkeleton,
68
+ Pill: () => Pill,
69
+ SectionDescription: () => SectionDescription,
70
+ SectionTitle: () => SectionTitle,
71
+ Select: () => Select,
72
+ SelectSkeleton: () => SelectSkeleton,
73
+ Skeleton: () => Skeleton,
74
+ SplitLayout: () => SplitLayout,
75
+ Stack: () => Stack,
76
+ StoryCardSkeleton: () => StoryCardSkeleton,
77
+ StoryTitle: () => StoryTitle,
78
+ TagRow: () => TagRow,
79
+ Textarea: () => Textarea,
80
+ TextareaSkeleton: () => TextareaSkeleton,
81
+ ThemeToggle: () => ThemeToggle,
82
+ ThumbSkeleton: () => ThumbSkeleton,
83
+ TitleRow: () => TitleRow,
84
+ TitleSkeleton: () => TitleSkeleton,
85
+ UserCardSkeleton: () => UserCardSkeleton,
86
+ UserListSkeleton: () => UserListSkeleton,
27
87
  WHITEBOARD_GRID: () => WHITEBOARD_GRID,
28
88
  WhiteboardShell: () => WhiteboardShell,
29
89
  ZoomBar: () => ZoomBar,
@@ -119,6 +179,22 @@ function X({ size, ...props }) {
119
179
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m6 6 12 12" })
120
180
  ] });
121
181
  }
182
+ function Moon({ size, ...props }) {
183
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { ...defaults(size), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }) });
184
+ }
185
+ function Sun({ size, ...props }) {
186
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...defaults(size), ...props, children: [
187
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "4" }),
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 2v2" }),
189
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 20v2" }),
190
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m4.93 4.93 1.41 1.41" }),
191
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m17.66 17.66 1.41 1.41" }),
192
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M2 12h2" }),
193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20 12h2" }),
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m6.34 17.66-1.41 1.41" }),
195
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m19.07 4.93-1.41 1.41" })
196
+ ] });
197
+ }
122
198
 
123
199
  // src/store.ts
124
200
  var import_zustand = require("zustand");
@@ -918,12 +994,645 @@ function useWhiteboardLayout({
918
994
  function cn(...args) {
919
995
  return args.filter(Boolean).join(" ");
920
996
  }
997
+
998
+ // src/Alert.tsx
999
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1000
+ var toneClasses = {
1001
+ error: "status-error",
1002
+ muted: "text-sm text-muted",
1003
+ info: "ui-alert ui-alert--info",
1004
+ success: "ui-alert ui-alert--success"
1005
+ };
1006
+ function Alert({ tone = "info", className, ...props }) {
1007
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: cn(toneClasses[tone], className), ...props });
1008
+ }
1009
+
1010
+ // src/Button.tsx
1011
+ var import_react8 = require("react");
1012
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1013
+ var variantClasses = {
1014
+ primary: "",
1015
+ secondary: "secondary-btn",
1016
+ danger: "danger-btn"
1017
+ };
1018
+ var Button = (0, import_react8.forwardRef)(function Button2({
1019
+ variant = "primary",
1020
+ fullWidth = false,
1021
+ iconOnly = false,
1022
+ loading = false,
1023
+ disabled,
1024
+ className,
1025
+ children,
1026
+ loadingText,
1027
+ ...props
1028
+ }, ref) {
1029
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1030
+ "button",
1031
+ {
1032
+ ref,
1033
+ className: cn(variantClasses[variant], fullWidth && "full-width-btn", iconOnly && "icon-only-btn", className),
1034
+ disabled: disabled || loading,
1035
+ ...props,
1036
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1037
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Loader2, { size: 14, className: "icon-spin" }),
1038
+ loadingText || children
1039
+ ] }) : children
1040
+ }
1041
+ );
1042
+ });
1043
+
1044
+ // src/ButtonRow.tsx
1045
+ var import_react9 = require("react");
1046
+ function ButtonRow({ as = "div", className, ...props }) {
1047
+ return (0, import_react9.createElement)(as, {
1048
+ className: cn("button-row", className),
1049
+ ...props
1050
+ });
1051
+ }
1052
+
1053
+ // src/Chip.tsx
1054
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1055
+ function Chip({ className, ...props }) {
1056
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: cn("chip", className), ...props });
1057
+ }
1058
+
1059
+ // src/ChoiceCard.tsx
1060
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1061
+ function ChoiceCard({ active = false, className, ...props }) {
1062
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1063
+ "button",
1064
+ {
1065
+ type: "button",
1066
+ className: cn("choice-card", className),
1067
+ "data-active": active,
1068
+ ...props
1069
+ }
1070
+ );
1071
+ }
1072
+
1073
+ // src/List.tsx
1074
+ var import_react10 = require("react");
1075
+ function List({ as = "ul", reset = true, className, ...props }) {
1076
+ return (0, import_react10.createElement)(as, {
1077
+ className: cn(reset && "list-reset", className),
1078
+ ...props
1079
+ });
1080
+ }
1081
+
1082
+ // src/Skeleton.tsx
1083
+ var import_react11 = require("react");
1084
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1085
+ var radiusClasses = {
1086
+ sm: "",
1087
+ md: "skeleton--md",
1088
+ pill: "skeleton--pill"
1089
+ };
1090
+ function Skeleton({ as = "div", radius = "sm", className, ...props }) {
1091
+ return (0, import_react11.createElement)(as, {
1092
+ className: cn("skeleton", radiusClasses[radius], className),
1093
+ "aria-hidden": true,
1094
+ ...props
1095
+ });
1096
+ }
1097
+ function InputSkeleton(props) {
1098
+ const { className, ...rest } = props;
1099
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-input", className), ...rest });
1100
+ }
1101
+ function ButtonSkeleton(props) {
1102
+ const { className, ...rest } = props;
1103
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-btn", className), ...rest });
1104
+ }
1105
+ function IconButtonSkeleton(props) {
1106
+ const { className, ...rest } = props;
1107
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-icon-btn", className), ...rest });
1108
+ }
1109
+ function SelectSkeleton(props) {
1110
+ const { className, ...rest } = props;
1111
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-select", className), ...rest });
1112
+ }
1113
+ function TextareaSkeleton(props) {
1114
+ const { className, ...rest } = props;
1115
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-textarea", className), ...rest });
1116
+ }
1117
+ function ThumbSkeleton(props) {
1118
+ const { className, ...rest } = props;
1119
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-thumb", className), ...rest });
1120
+ }
1121
+ function ChipSkeleton(props) {
1122
+ const { className, ...rest } = props;
1123
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { radius: "pill", className: cn("skeleton-chip", className), ...rest });
1124
+ }
1125
+ function TitleSkeleton(props) {
1126
+ const { className, ...rest } = props;
1127
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-title", className), ...rest });
1128
+ }
1129
+ function LineSkeleton({ short = false, className, ...props }) {
1130
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-line", short && "skeleton-line--short", className), ...props });
1131
+ }
1132
+ function AvatarSkeleton(props) {
1133
+ const { className, ...rest } = props;
1134
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { radius: "pill", className: cn("skeleton-avatar", className), ...rest });
1135
+ }
1136
+ function CanvasSkeleton(props) {
1137
+ const { className, ...rest } = props;
1138
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: cn("skeleton-canvas", className), ...rest });
1139
+ }
1140
+
1141
+ // src/ChoiceGroup.tsx
1142
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1143
+ function ChoiceGroup({
1144
+ options,
1145
+ value,
1146
+ onChange,
1147
+ className
1148
+ }) {
1149
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(List, { className: cn("choice-list", className), children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1150
+ ChoiceCard,
1151
+ {
1152
+ active: value === option.value,
1153
+ onClick: () => onChange(option.value),
1154
+ disabled: option.disabled,
1155
+ "data-has-description": option.description ? "true" : "false",
1156
+ children: option.description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "choice-card__row", children: [
1157
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "choice-card__label", children: option.label }),
1158
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "choice-card__description", children: option.description })
1159
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "choice-card__label", children: option.label })
1160
+ }
1161
+ ) }, option.value)) });
1162
+ }
1163
+ function ChoiceGroupSkeleton({ count = 4, className, withDescription = false }) {
1164
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(List, { className: cn("choice-list", className), "aria-hidden": true, children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "choice-card", children: [
1165
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TitleSkeleton, { className: cn("skeleton-title--sm", !withDescription && "skeleton-choice-label") }),
1166
+ withDescription ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LineSkeleton, { short: true }) : null
1167
+ ] }) }, `choice-skeleton-${i}`)) });
1168
+ }
1169
+
1170
+ // src/CoordGrid.tsx
1171
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1172
+ function CoordGrid({ className, ...props }) {
1173
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn("coord-grid", className), ...props });
1174
+ }
1175
+ function CoordInput({ axis, className, ...props }) {
1176
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: cn("coord-input", className), children: [
1177
+ axis,
1178
+ " ",
1179
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "number", step: "0.01", ...props })
1180
+ ] });
1181
+ }
1182
+
1183
+ // src/Stack.tsx
1184
+ var import_react12 = require("react");
1185
+ function Stack({
1186
+ as,
1187
+ size = "md",
1188
+ className,
1189
+ ...props
1190
+ }) {
1191
+ return (0, import_react12.createElement)(as ?? "div", {
1192
+ className: cn(size === "sm" ? "panel-stack-sm" : "panel-stack", className),
1193
+ ...props
1194
+ });
1195
+ }
1196
+
1197
+ // src/Typography.tsx
1198
+ var import_react13 = require("react");
1199
+ var mutedSizeClasses = {
1200
+ xs: "text-xs",
1201
+ sm: "text-sm",
1202
+ md: ""
1203
+ };
1204
+ function AssetTitle({ as = "p", clamp = false, className, ...props }) {
1205
+ return (0, import_react13.createElement)(as, {
1206
+ className: cn("asset-title", clamp && "asset-title--clamp", className),
1207
+ ...props
1208
+ });
1209
+ }
1210
+ function StoryTitle({ as = "h3", className, ...props }) {
1211
+ return (0, import_react13.createElement)(as, {
1212
+ className: cn("story-title", className),
1213
+ ...props
1214
+ });
1215
+ }
1216
+ function MutedText({ as = "p", size = "sm", className, ...props }) {
1217
+ return (0, import_react13.createElement)(as, {
1218
+ className: cn(mutedSizeClasses[size], "text-muted", className),
1219
+ ...props
1220
+ });
1221
+ }
1222
+ function PageTitle({ as = "h1", className, ...props }) {
1223
+ return (0, import_react13.createElement)(as, {
1224
+ className: cn("page-title", className),
1225
+ ...props
1226
+ });
1227
+ }
1228
+ function SectionTitle({ as = "span", className, ...props }) {
1229
+ return (0, import_react13.createElement)(as, {
1230
+ className: cn("widget-section__title", className),
1231
+ ...props
1232
+ });
1233
+ }
1234
+ function SectionDescription({ as = "p", className, ...props }) {
1235
+ return (0, import_react13.createElement)(as, {
1236
+ className: cn("widget-section__description", className),
1237
+ ...props
1238
+ });
1239
+ }
1240
+
1241
+ // src/EmptyState.tsx
1242
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1243
+ function EmptyState({ title, description, action }) {
1244
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Stack, { size: "sm", children: [
1245
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AssetTitle, { children: title }),
1246
+ description ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MutedText, { children: description }) : null,
1247
+ action
1248
+ ] });
1249
+ }
1250
+
1251
+ // src/Field.tsx
1252
+ var import_react14 = require("react");
1253
+
1254
+ // src/Label.tsx
1255
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1256
+ function Label({ className, ...props }) {
1257
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { className: cn("widget-label", className), ...props });
1258
+ }
1259
+
1260
+ // src/Field.tsx
1261
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1262
+ function Field({
1263
+ as,
1264
+ label,
1265
+ htmlFor,
1266
+ hint,
1267
+ error,
1268
+ layout = "stack",
1269
+ className,
1270
+ children,
1271
+ ...props
1272
+ }) {
1273
+ return (0, import_react14.createElement)(
1274
+ as ?? "div",
1275
+ {
1276
+ className: cn(layout === "control" ? "widget-control" : "panel-stack-sm", className),
1277
+ ...props
1278
+ },
1279
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1280
+ label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Label, { htmlFor, children: label }) : null,
1281
+ children,
1282
+ hint ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MutedText, { size: "xs", children: hint }) : null,
1283
+ error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "field-error", children: error }) : null
1284
+ ] })
1285
+ );
1286
+ }
1287
+
1288
+ // src/GeneratingOverlay.tsx
1289
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1290
+ function GeneratingOverlay({ isGenerating, children, message }) {
1291
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "generating-overlay-wrap", children: [
1292
+ children,
1293
+ isGenerating && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "generating-overlay", "aria-live": "polite", children: [
1294
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader2, { size: 20, className: "icon-spin" }),
1295
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: message ?? "Generating, please wait\u2026" })
1296
+ ] })
1297
+ ] });
1298
+ }
1299
+
1300
+ // src/IconText.tsx
1301
+ var import_react15 = require("react");
1302
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1303
+ function IconText({ as = "span", icon, className, children, ...props }) {
1304
+ return (0, import_react15.createElement)(
1305
+ as,
1306
+ {
1307
+ className: cn("inline-row", className),
1308
+ ...props
1309
+ },
1310
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
1311
+ icon,
1312
+ children
1313
+ ] })
1314
+ );
1315
+ }
1316
+
1317
+ // src/ImageThumb.tsx
1318
+ var import_react16 = require("react");
1319
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1320
+ function ImageThumb({
1321
+ src,
1322
+ alt,
1323
+ placeholder = "No image",
1324
+ size = "md",
1325
+ fit = "contain",
1326
+ onImageError,
1327
+ className,
1328
+ ...props
1329
+ }) {
1330
+ const [failedSrc, setFailedSrc] = (0, import_react16.useState)(null);
1331
+ const failed = Boolean(src && failedSrc === src);
1332
+ const classes = cn("image-thumb", `image-thumb--${size}`, `image-thumb--fit-${fit}`, className);
1333
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: classes, ...props, children: src && !failed ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1334
+ "img",
1335
+ {
1336
+ src,
1337
+ alt,
1338
+ className: "image-thumb__img",
1339
+ style: { objectFit: fit, objectPosition: "center" },
1340
+ onError: () => {
1341
+ setFailedSrc(src);
1342
+ onImageError?.();
1343
+ }
1344
+ }
1345
+ ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "image-thumb__placeholder", children: placeholder }) });
1346
+ }
1347
+
1348
+ // src/Inline.tsx
1349
+ var import_react17 = require("react");
1350
+ function Inline({
1351
+ as,
1352
+ justify = "start",
1353
+ className,
1354
+ ...props
1355
+ }) {
1356
+ return (0, import_react17.createElement)(as ?? "div", {
1357
+ className: cn(justify === "between" ? "space-between" : "inline-row", className),
1358
+ ...props
1359
+ });
1360
+ }
1361
+
1362
+ // src/Input.tsx
1363
+ var import_react18 = require("react");
1364
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1365
+ var Input = (0, import_react18.forwardRef)(function Input2({ className, ...props }, ref) {
1366
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { ref, className: cn(className), ...props });
1367
+ });
1368
+
1369
+ // src/ItemCard.tsx
1370
+ var import_react19 = require("react");
1371
+ function ItemCard({ as = "div", className, ...props }) {
1372
+ return (0, import_react19.createElement)(as, {
1373
+ className: cn("item-card", className),
1374
+ ...props
1375
+ });
1376
+ }
1377
+
1378
+ // src/ItemList.tsx
1379
+ var import_react20 = require("react");
1380
+ function ItemList({ as = "div", className, ...props }) {
1381
+ return (0, import_react20.createElement)(as, {
1382
+ className: cn("item-list", className),
1383
+ ...props
1384
+ });
1385
+ }
1386
+
1387
+ // src/LoadingState.tsx
1388
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1389
+ function LoadingState({ label = "Loading...", className }) {
1390
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: cn("status-inline", className), children: [
1391
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loader2, { size: 14, className: "icon-spin" }),
1392
+ label
1393
+ ] });
1394
+ }
1395
+
1396
+ // src/PageLayout.tsx
1397
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1398
+ function PageShell({ children }) {
1399
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("main", { className: "page-shell", children });
1400
+ }
1401
+ function PageCard({ children }) {
1402
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "page-card", children });
1403
+ }
1404
+
1405
+ // src/PanelCloseButton.tsx
1406
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1407
+ function PanelCloseButton({ onClick, label = "Close" }) {
1408
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Button, { variant: "secondary", className: "panel-close-btn", onClick, children: [
1409
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(X, { size: 14 }),
1410
+ label
1411
+ ] });
1412
+ }
1413
+
1414
+ // src/PanelSection.tsx
1415
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1416
+ function PanelSection({ heading, description, actions, className, children, ...props }) {
1417
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: cn("widget-section", className), ...props, children: [
1418
+ heading || actions ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("header", { className: actions ? "title-row" : void 0, children: [
1419
+ heading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SectionTitle, { children: heading }) : null,
1420
+ actions
1421
+ ] }) : null,
1422
+ description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SectionDescription, { children: description }) : null,
1423
+ children
1424
+ ] });
1425
+ }
1426
+
1427
+ // src/PanelTitle.tsx
1428
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1429
+ function PanelTitle({ icon: Icon, label }) {
1430
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "panel-title-with-icon", children: [
1431
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { size: 13, className: "panel-title-icon" }),
1432
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: label })
1433
+ ] });
1434
+ }
1435
+
1436
+ // src/PickerCard.tsx
1437
+ var import_react21 = require("react");
1438
+ function PickerCard({ as = "button", className, ...props }) {
1439
+ return (0, import_react21.createElement)(as, {
1440
+ className: cn("picker-card", className),
1441
+ ...props
1442
+ });
1443
+ }
1444
+
1445
+ // src/PickerGrid.tsx
1446
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1447
+ var variantClasses2 = {
1448
+ elements: "picker-grid--elements",
1449
+ characters: "picker-grid--characters",
1450
+ library: "picker-grid--library"
1451
+ };
1452
+ function PickerGrid({ variant, className, ...props }) {
1453
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(List, { className: cn("picker-grid", variantClasses2[variant], className), ...props });
1454
+ }
1455
+
1456
+ // src/Pill.tsx
1457
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1458
+ var toneClasses2 = {
1459
+ default: "",
1460
+ success: "success",
1461
+ warning: "warning",
1462
+ danger: "danger"
1463
+ };
1464
+ function Pill({ tone = "default", className, ...props }) {
1465
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: cn("pill", toneClasses2[tone], className), ...props });
1466
+ }
1467
+
1468
+ // src/Select.tsx
1469
+ var import_react22 = require("react");
1470
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1471
+ var Select = (0, import_react22.forwardRef)(function Select2({ className, ...props }, ref) {
1472
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("select", { ref, className: cn(className), ...props });
1473
+ });
1474
+
1475
+ // src/SplitLayout.tsx
1476
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1477
+ var variantClasses3 = {
1478
+ element: "split-layout--element",
1479
+ character: "split-layout--character",
1480
+ user: "split-layout--user"
1481
+ };
1482
+ function SplitLayout({ variant, className, ...props }) {
1483
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("split-layout", variantClasses3[variant], className), ...props });
1484
+ }
1485
+
1486
+ // src/TagRow.tsx
1487
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1488
+ function TagRow({ className, ...props }) {
1489
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: cn("tag-row", className), ...props });
1490
+ }
1491
+
1492
+ // src/Textarea.tsx
1493
+ var import_react23 = require("react");
1494
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1495
+ var Textarea = (0, import_react23.forwardRef)(function Textarea2({ className, ...props }, ref) {
1496
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("textarea", { ref, className: cn(className), ...props });
1497
+ });
1498
+
1499
+ // src/ThemeToggle.tsx
1500
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1501
+ function ThemeToggle({ className, theme = "light", onToggle, lightIcon, darkIcon }) {
1502
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { className, onClick: onToggle, title: `Switch to ${theme === "light" ? "dark" : "light"} mode`, "aria-label": "Toggle theme", children: theme === "light" ? darkIcon ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Moon, {}) : lightIcon ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Sun, {}) });
1503
+ }
1504
+
1505
+ // src/TitleRow.tsx
1506
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1507
+ function TitleRow({ className, ...props }) {
1508
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("title-row", className), ...props });
1509
+ }
1510
+
1511
+ // src/WidgetSkeletons.tsx
1512
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1513
+ function PanelFormSkeleton({ inputs = 1, showButton = true, className, ...props }) {
1514
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { className, ...props, children: [
1515
+ Array.from({ length: inputs }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(InputSkeleton, {}, `panel-form-input-${i}`)),
1516
+ showButton && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ButtonSkeleton, {})
1517
+ ] });
1518
+ }
1519
+ function StoryCardSkeleton() {
1520
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("article", { className: "story-card", children: [
1521
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "story-cover", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "story-cover__placeholder story-cover__placeholder--skeleton" }) }),
1522
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "story-card__overlay story-card__overlay--skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "story-card__overlay-text", children: [
1523
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Inline, { as: "header", children: [
1524
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChipSkeleton, {}),
1525
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChipSkeleton, {})
1526
+ ] }),
1527
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TitleSkeleton, {}),
1528
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LineSkeleton, { short: true })
1529
+ ] }) })
1530
+ ] });
1531
+ }
1532
+ function UserCardSkeleton() {
1533
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemCard, { as: "li", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SplitLayout, { variant: "user", children: [
1534
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AvatarSkeleton, {}),
1535
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { size: "sm", children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TitleSkeleton, {}),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LineSkeleton, { short: true })
1538
+ ] }),
1539
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { size: "sm", children: [
1540
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChipSkeleton, {}),
1541
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectSkeleton, {})
1542
+ ] })
1543
+ ] }) });
1544
+ }
1545
+ function UserListSkeleton({ count = 3 }) {
1546
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemList, { as: "ul", children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UserCardSkeleton, {}, `user-skeleton-${i}`)) });
1547
+ }
1548
+ function AssetCardSkeleton() {
1549
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(ItemCard, { as: "li", children: [
1550
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { size: "sm", children: [
1551
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ThumbSkeleton, { className: "asset-thumb" }),
1552
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TitleSkeleton, {}),
1553
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(TagRow, { children: [
1554
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChipSkeleton, {}),
1555
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChipSkeleton, {})
1556
+ ] })
1557
+ ] }),
1558
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(ButtonRow, { children: [
1559
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ButtonSkeleton, {}),
1560
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ButtonSkeleton, {})
1561
+ ] })
1562
+ ] });
1563
+ }
1564
+ function PickerGridSkeleton({ count = 8, gridClass }) {
1565
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(List, { className: cn("picker-grid", gridClass), children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PickerCard, { as: "div", className: "picker-card--skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { size: "sm", children: [
1566
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ThumbSkeleton, { className: "asset-thumb" }),
1567
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LineSkeleton, { short: true })
1568
+ ] }) }) }, `picker-skeleton-${i}`)) });
1569
+ }
921
1570
  // Annotate the CommonJS export names for ESM import in node:
922
1571
  0 && (module.exports = {
1572
+ Alert,
1573
+ AssetCardSkeleton,
1574
+ AssetTitle,
1575
+ AvatarSkeleton,
1576
+ Button,
1577
+ ButtonRow,
1578
+ ButtonSkeleton,
1579
+ CanvasSkeleton,
1580
+ Chip,
1581
+ ChipSkeleton,
1582
+ ChoiceCard,
1583
+ ChoiceGroup,
1584
+ ChoiceGroupSkeleton,
923
1585
  ConfirmDialog,
1586
+ CoordGrid,
1587
+ CoordInput,
1588
+ EmptyState,
1589
+ Field,
924
1590
  FloatingPanel,
1591
+ GeneratingOverlay,
1592
+ IconButtonSkeleton,
1593
+ IconText,
1594
+ ImageThumb,
1595
+ Inline,
1596
+ Input,
1597
+ InputSkeleton,
1598
+ ItemCard,
1599
+ ItemList,
1600
+ Label,
1601
+ LineSkeleton,
1602
+ List,
1603
+ LoadingState,
925
1604
  Minimap,
1605
+ MutedText,
1606
+ PageCard,
1607
+ PageShell,
1608
+ PageTitle,
1609
+ PanelCloseButton,
926
1610
  PanelErrorBoundary,
1611
+ PanelFormSkeleton,
1612
+ PanelSection,
1613
+ PanelTitle,
1614
+ PickerCard,
1615
+ PickerGrid,
1616
+ PickerGridSkeleton,
1617
+ Pill,
1618
+ SectionDescription,
1619
+ SectionTitle,
1620
+ Select,
1621
+ SelectSkeleton,
1622
+ Skeleton,
1623
+ SplitLayout,
1624
+ Stack,
1625
+ StoryCardSkeleton,
1626
+ StoryTitle,
1627
+ TagRow,
1628
+ Textarea,
1629
+ TextareaSkeleton,
1630
+ ThemeToggle,
1631
+ ThumbSkeleton,
1632
+ TitleRow,
1633
+ TitleSkeleton,
1634
+ UserCardSkeleton,
1635
+ UserListSkeleton,
927
1636
  WHITEBOARD_GRID,
928
1637
  WhiteboardShell,
929
1638
  ZoomBar,