@almadar/ui 4.51.15 → 4.52.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.
@@ -1,5 +1,5 @@
1
- import * as React80 from 'react';
2
- import React80__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React83 from 'react';
2
+ import React83__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { EventBusContext, useTraitScope, OrbitalProvider, TraitScopeProvider, VerificationProvider } from '@almadar/ui/providers';
4
4
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -780,89 +780,6 @@ var init_cn = __esm({
780
780
  "lib/cn.ts"() {
781
781
  }
782
782
  });
783
- function kebabToPascal(name) {
784
- return name.split("-").map((part) => {
785
- if (/^\d+$/.test(part)) return part;
786
- return part.charAt(0).toUpperCase() + part.slice(1);
787
- }).join("");
788
- }
789
- function resolveIcon(name) {
790
- const cached = resolvedCache.get(name);
791
- if (cached) return cached;
792
- const resolved = doResolve(name);
793
- resolvedCache.set(name, resolved);
794
- return resolved;
795
- }
796
- function doResolve(name) {
797
- if (iconAliases[name]) return iconAliases[name];
798
- const pascalName = kebabToPascal(name);
799
- const directLookup = LucideIcons[pascalName];
800
- if (directLookup && typeof directLookup === "object") return directLookup;
801
- const asIs = LucideIcons[name];
802
- if (asIs && typeof asIs === "object") return asIs;
803
- return LucideIcons.HelpCircle;
804
- }
805
- var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
806
- var init_Icon = __esm({
807
- "components/atoms/Icon.tsx"() {
808
- init_cn();
809
- iconAliases = {
810
- "close": LucideIcons.X,
811
- "trash": LucideIcons.Trash2,
812
- "loader": LucideIcons.Loader2,
813
- "stop": LucideIcons.Square,
814
- "volume": LucideIcons.Volume2,
815
- "volume-off": LucideIcons.VolumeX,
816
- "refresh": LucideIcons.RefreshCw,
817
- "share": LucideIcons.Share2,
818
- "sort-asc": LucideIcons.ArrowUpNarrowWide,
819
- "sort-desc": LucideIcons.ArrowDownNarrowWide
820
- };
821
- resolvedCache = /* @__PURE__ */ new Map();
822
- sizeClasses = {
823
- xs: "w-3 h-3",
824
- sm: "w-4 h-4",
825
- md: "w-5 h-5",
826
- lg: "w-6 h-6",
827
- xl: "w-8 h-8"
828
- };
829
- animationClasses = {
830
- none: "",
831
- spin: "animate-spin",
832
- pulse: "animate-pulse"
833
- };
834
- Icon = ({
835
- icon,
836
- name,
837
- size = "md",
838
- color,
839
- animation = "none",
840
- className,
841
- strokeWidth,
842
- style
843
- }) => {
844
- const IconComponent = icon ?? (name ? resolveIcon(name) : LucideIcons.HelpCircle);
845
- const effectiveStrokeWidth = strokeWidth ?? void 0;
846
- return /* @__PURE__ */ jsx(
847
- IconComponent,
848
- {
849
- className: cn(
850
- sizeClasses[size],
851
- animationClasses[animation],
852
- color ? color : "text-current",
853
- className
854
- ),
855
- strokeWidth: effectiveStrokeWidth,
856
- style: {
857
- ...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
858
- ...style
859
- }
860
- }
861
- );
862
- };
863
- Icon.displayName = "Icon";
864
- }
865
- });
866
783
  var paddingStyles, paddingXStyles, paddingYStyles, marginStyles, marginXStyles, marginYStyles, bgStyles, roundedStyles, shadowStyles, displayStyles, overflowStyles, positionStyles, Box;
867
784
  var init_Box = __esm({
868
785
  "components/atoms/Box.tsx"() {
@@ -971,7 +888,7 @@ var init_Box = __esm({
971
888
  fixed: "fixed",
972
889
  sticky: "sticky"
973
890
  };
974
- Box = React80__default.forwardRef(
891
+ Box = React83__default.forwardRef(
975
892
  ({
976
893
  padding,
977
894
  paddingX,
@@ -1021,38 +938,26 @@ var init_Box = __esm({
1021
938
  onMouseLeave?.(e);
1022
939
  }, [hoverEvent, eventBus, onMouseLeave]);
1023
940
  const isClickable = action || onClick;
1024
- const Comp = Component;
1025
- return /* @__PURE__ */ jsx(
1026
- Comp,
941
+ return React83__default.createElement(
942
+ Component,
1027
943
  {
1028
944
  ref,
1029
945
  className: cn(
1030
- // Padding
1031
946
  padding && paddingStyles[padding],
1032
947
  paddingX && paddingXStyles[paddingX],
1033
948
  paddingY && paddingYStyles[paddingY],
1034
- // Margin
1035
949
  margin && marginStyles[margin],
1036
950
  marginX && marginXStyles[marginX],
1037
951
  marginY && marginYStyles[marginY],
1038
- // Background
1039
952
  bgStyles[bg],
1040
- // Border - uses theme variables
1041
953
  border && "border-[length:var(--border-width)] border-border",
1042
- // Rounded
1043
954
  roundedStyles[rounded],
1044
- // Shadow
1045
955
  shadowStyles[shadow],
1046
- // Display
1047
956
  display && displayStyles[display],
1048
- // Dimensions
1049
957
  fullWidth && "w-full",
1050
958
  fullHeight && "h-full",
1051
- // Overflow
1052
959
  overflow && overflowStyles[overflow],
1053
- // Position
1054
960
  position && positionStyles[position],
1055
- // Cursor for clickable
1056
961
  isClickable && "cursor-pointer",
1057
962
  className
1058
963
  ),
@@ -1060,15 +965,271 @@ var init_Box = __esm({
1060
965
  onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
1061
966
  onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
1062
967
  style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
1063
- ...rest,
1064
- children
1065
- }
968
+ ...rest
969
+ },
970
+ children
1066
971
  );
1067
972
  }
1068
973
  );
1069
974
  Box.displayName = "Box";
1070
975
  }
1071
976
  });
977
+ function kebabToPascal(name) {
978
+ return name.split("-").map((part) => {
979
+ if (/^\d+$/.test(part)) return part;
980
+ return part.charAt(0).toUpperCase() + part.slice(1);
981
+ }).join("");
982
+ }
983
+ function resolveIcon(name) {
984
+ const cached = resolvedCache.get(name);
985
+ if (cached) return cached;
986
+ const resolved = doResolve(name);
987
+ resolvedCache.set(name, resolved);
988
+ return resolved;
989
+ }
990
+ function doResolve(name) {
991
+ if (iconAliases[name]) return iconAliases[name];
992
+ const pascalName = kebabToPascal(name);
993
+ const directLookup = LucideIcons[pascalName];
994
+ if (directLookup && typeof directLookup === "object") return directLookup;
995
+ const asIs = LucideIcons[name];
996
+ if (asIs && typeof asIs === "object") return asIs;
997
+ return LucideIcons.HelpCircle;
998
+ }
999
+ var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
1000
+ var init_Icon = __esm({
1001
+ "components/atoms/Icon.tsx"() {
1002
+ init_cn();
1003
+ iconAliases = {
1004
+ "close": LucideIcons.X,
1005
+ "trash": LucideIcons.Trash2,
1006
+ "loader": LucideIcons.Loader2,
1007
+ "stop": LucideIcons.Square,
1008
+ "volume": LucideIcons.Volume2,
1009
+ "volume-off": LucideIcons.VolumeX,
1010
+ "refresh": LucideIcons.RefreshCw,
1011
+ "share": LucideIcons.Share2,
1012
+ "sort-asc": LucideIcons.ArrowUpNarrowWide,
1013
+ "sort-desc": LucideIcons.ArrowDownNarrowWide
1014
+ };
1015
+ resolvedCache = /* @__PURE__ */ new Map();
1016
+ sizeClasses = {
1017
+ xs: "w-3 h-3",
1018
+ sm: "w-4 h-4",
1019
+ md: "w-5 h-5",
1020
+ lg: "w-6 h-6",
1021
+ xl: "w-8 h-8"
1022
+ };
1023
+ animationClasses = {
1024
+ none: "",
1025
+ spin: "animate-spin",
1026
+ pulse: "animate-pulse"
1027
+ };
1028
+ Icon = ({
1029
+ icon,
1030
+ name,
1031
+ size = "md",
1032
+ color,
1033
+ animation = "none",
1034
+ className,
1035
+ strokeWidth,
1036
+ style
1037
+ }) => {
1038
+ const IconComponent = icon ?? (name ? resolveIcon(name) : LucideIcons.HelpCircle);
1039
+ const effectiveStrokeWidth = strokeWidth ?? void 0;
1040
+ return /* @__PURE__ */ jsx(
1041
+ IconComponent,
1042
+ {
1043
+ className: cn(
1044
+ sizeClasses[size],
1045
+ animationClasses[animation],
1046
+ color ? color : "text-current",
1047
+ className
1048
+ ),
1049
+ strokeWidth: effectiveStrokeWidth,
1050
+ style: {
1051
+ ...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
1052
+ ...style
1053
+ }
1054
+ }
1055
+ );
1056
+ };
1057
+ Icon.displayName = "Icon";
1058
+ }
1059
+ });
1060
+ function resolveIconProp(value, sizeClass) {
1061
+ if (!value) return null;
1062
+ if (typeof value === "string") {
1063
+ const Resolved = resolveIcon(value);
1064
+ return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
1065
+ }
1066
+ if (typeof value === "function") {
1067
+ const IconComp = value;
1068
+ return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1069
+ }
1070
+ if (React83__default.isValidElement(value)) {
1071
+ return value;
1072
+ }
1073
+ if (typeof value === "object" && value !== null && "render" in value) {
1074
+ const IconComp = value;
1075
+ return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1076
+ }
1077
+ return value;
1078
+ }
1079
+ var variantStyles, sizeStyles, iconSizeStyles, Button;
1080
+ var init_Button = __esm({
1081
+ "components/atoms/Button.tsx"() {
1082
+ "use client";
1083
+ init_cn();
1084
+ init_useEventBus();
1085
+ init_Icon();
1086
+ variantStyles = {
1087
+ primary: [
1088
+ "bg-primary text-primary-foreground",
1089
+ "border-none",
1090
+ "shadow-sm",
1091
+ "hover:bg-primary-hover hover:shadow-lg",
1092
+ "active:scale-[var(--active-scale)] active:shadow-sm"
1093
+ ].join(" "),
1094
+ secondary: [
1095
+ "bg-transparent text-accent",
1096
+ "border border-accent",
1097
+ "hover:bg-accent hover:text-white hover:border-accent",
1098
+ "active:scale-[var(--active-scale)]"
1099
+ ].join(" "),
1100
+ ghost: [
1101
+ "bg-transparent text-muted-foreground",
1102
+ "border border-transparent",
1103
+ "hover:text-primary-foreground hover:bg-primary hover:border-primary",
1104
+ "active:scale-[var(--active-scale)]"
1105
+ ].join(" "),
1106
+ danger: [
1107
+ "bg-surface text-error",
1108
+ "border-[length:var(--border-width)] border-error",
1109
+ "shadow-sm",
1110
+ "hover:bg-error hover:text-error-foreground hover:shadow-lg",
1111
+ "active:scale-[var(--active-scale)] active:shadow-sm"
1112
+ ].join(" "),
1113
+ success: [
1114
+ "bg-surface text-success",
1115
+ "border-[length:var(--border-width)] border-success",
1116
+ "shadow-sm",
1117
+ "hover:bg-success hover:text-success-foreground hover:shadow-lg",
1118
+ "active:scale-[var(--active-scale)] active:shadow-sm"
1119
+ ].join(" "),
1120
+ warning: [
1121
+ "bg-surface text-warning",
1122
+ "border-[length:var(--border-width)] border-warning",
1123
+ "shadow-sm",
1124
+ "hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
1125
+ "active:scale-[var(--active-scale)] active:shadow-sm"
1126
+ ].join(" "),
1127
+ // "default" is an alias for secondary
1128
+ default: [
1129
+ "bg-secondary text-secondary-foreground",
1130
+ "border-[length:var(--border-width-thin)] border-border",
1131
+ "hover:bg-secondary-hover",
1132
+ "active:scale-[var(--active-scale)]"
1133
+ ].join(" ")
1134
+ };
1135
+ variantStyles.destructive = variantStyles.danger;
1136
+ sizeStyles = {
1137
+ sm: "px-3 py-1.5 text-sm",
1138
+ md: "px-4 py-2 text-sm",
1139
+ lg: "px-6 py-3 text-base"
1140
+ };
1141
+ iconSizeStyles = {
1142
+ sm: "h-3.5 w-3.5",
1143
+ md: "h-4 w-4",
1144
+ lg: "h-5 w-5"
1145
+ };
1146
+ Button = React83__default.forwardRef(
1147
+ ({
1148
+ className,
1149
+ variant = "primary",
1150
+ size = "md",
1151
+ isLoading = false,
1152
+ disabled,
1153
+ leftIcon,
1154
+ rightIcon,
1155
+ icon: iconProp,
1156
+ iconRight: iconRightProp,
1157
+ action,
1158
+ actionPayload,
1159
+ label,
1160
+ children,
1161
+ onClick,
1162
+ ...props
1163
+ }, ref) => {
1164
+ const eventBus = useEventBus();
1165
+ const leftIconValue = leftIcon || iconProp;
1166
+ const rightIconValue = rightIcon || iconRightProp;
1167
+ const resolvedLeftIcon = resolveIconProp(leftIconValue, iconSizeStyles[size]);
1168
+ const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
1169
+ const handleClick = (e) => {
1170
+ if (action) {
1171
+ eventBus.emit(`UI:${action}`, actionPayload ?? {});
1172
+ }
1173
+ onClick?.(e);
1174
+ };
1175
+ return /* @__PURE__ */ jsxs(
1176
+ "button",
1177
+ {
1178
+ ref,
1179
+ disabled: disabled || isLoading,
1180
+ className: cn(
1181
+ "inline-flex items-center justify-center gap-2",
1182
+ "font-[var(--font-weight-medium)]",
1183
+ "rounded-sm",
1184
+ "cursor-pointer",
1185
+ "transition-all duration-[var(--transition-normal)]",
1186
+ "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
1187
+ "disabled:opacity-50 disabled:cursor-not-allowed",
1188
+ variantStyles[variant],
1189
+ sizeStyles[size],
1190
+ className
1191
+ ),
1192
+ onClick: handleClick,
1193
+ ...props,
1194
+ "data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
1195
+ children: [
1196
+ isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
1197
+ children || label,
1198
+ resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
1199
+ ]
1200
+ }
1201
+ );
1202
+ }
1203
+ );
1204
+ Button.displayName = "Button";
1205
+ }
1206
+ });
1207
+ var Dialog;
1208
+ var init_Dialog = __esm({
1209
+ "components/atoms/Dialog.tsx"() {
1210
+ init_cn();
1211
+ Dialog = React83__default.forwardRef(
1212
+ ({
1213
+ role = "dialog",
1214
+ "aria-modal": ariaModal = true,
1215
+ className,
1216
+ children,
1217
+ ...rest
1218
+ }, ref) => /* @__PURE__ */ jsx(
1219
+ "dialog",
1220
+ {
1221
+ ref,
1222
+ role,
1223
+ "aria-modal": ariaModal,
1224
+ className: cn(className),
1225
+ ...rest,
1226
+ children
1227
+ }
1228
+ )
1229
+ );
1230
+ Dialog.displayName = "Dialog";
1231
+ }
1232
+ });
1072
1233
 
1073
1234
  // components/atoms/Typography.tsx
1074
1235
  var Typography_exports = {};
@@ -1077,11 +1238,11 @@ __export(Typography_exports, {
1077
1238
  Text: () => Text,
1078
1239
  Typography: () => Typography
1079
1240
  });
1080
- var variantStyles, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography, sizeStyles, Heading, Text;
1241
+ var variantStyles2, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography, sizeStyles2, Heading, Text;
1081
1242
  var init_Typography = __esm({
1082
1243
  "components/atoms/Typography.tsx"() {
1083
1244
  init_cn();
1084
- variantStyles = {
1245
+ variantStyles2 = {
1085
1246
  h1: "text-4xl font-bold tracking-tight text-foreground",
1086
1247
  h2: "text-3xl font-bold tracking-tight text-foreground",
1087
1248
  h3: "text-2xl font-bold text-foreground",
@@ -1173,7 +1334,7 @@ var init_Typography = __esm({
1173
1334
  {
1174
1335
  id,
1175
1336
  className: cn(
1176
- variantStyles[variant],
1337
+ variantStyles2[variant],
1177
1338
  colorStyles[color],
1178
1339
  weight && weightStyles[weight],
1179
1340
  size && typographySizeStyles[size],
@@ -1188,7 +1349,7 @@ var init_Typography = __esm({
1188
1349
  );
1189
1350
  };
1190
1351
  Typography.displayName = "Typography";
1191
- sizeStyles = {
1352
+ sizeStyles2 = {
1192
1353
  xs: "text-xs",
1193
1354
  sm: "text-sm",
1194
1355
  md: "text-base",
@@ -1204,7 +1365,7 @@ var init_Typography = __esm({
1204
1365
  ...props
1205
1366
  }) => {
1206
1367
  const variant = `h${level}`;
1207
- const sizeClass = size ? sizeStyles[size] : void 0;
1368
+ const sizeClass = size ? sizeStyles2[size] : void 0;
1208
1369
  return /* @__PURE__ */ jsx(
1209
1370
  Typography,
1210
1371
  {
@@ -1271,8 +1432,9 @@ var sizeClasses2, minWidths, Modal;
1271
1432
  var init_Modal = __esm({
1272
1433
  "components/molecules/Modal.tsx"() {
1273
1434
  "use client";
1274
- init_Icon();
1275
1435
  init_Box();
1436
+ init_Button();
1437
+ init_Dialog();
1276
1438
  init_Typography();
1277
1439
  init_Overlay();
1278
1440
  init_cn();
@@ -1365,7 +1527,7 @@ var init_Modal = __esm({
1365
1527
  }
1366
1528
  ),
1367
1529
  /* @__PURE__ */ jsx(
1368
- "div",
1530
+ Box,
1369
1531
  {
1370
1532
  className: cn(
1371
1533
  "fixed inset-0 z-50 pointer-events-none",
@@ -1374,17 +1536,17 @@ var init_Modal = __esm({
1374
1536
  ),
1375
1537
  style: { paddingTop: "10vh" },
1376
1538
  children: /* @__PURE__ */ jsxs(
1377
- Box,
1539
+ Dialog,
1378
1540
  {
1379
1541
  ref: modalRef,
1380
- bg: "surface",
1381
- border: true,
1382
- shadow: "lg",
1383
- rounded: "md",
1542
+ open: true,
1384
1543
  className: cn(
1385
- "pointer-events-auto w-full flex flex-col",
1544
+ // Reset browser-default dialog chrome — we own styling.
1545
+ "m-0 p-0 border-0 bg-transparent",
1546
+ // Pre-existing dialog frame
1547
+ "pointer-events-auto w-full flex flex-col bg-surface border shadow-lg rounded-md",
1386
1548
  sizeClasses2[size],
1387
- "max-sm:max-w-full max-sm:rounded-b-none max-sm:rounded-t-2xl",
1549
+ "max-sm:max-w-full max-sm:min-w-0 max-sm:rounded-b-none max-sm:rounded-t-2xl",
1388
1550
  className
1389
1551
  ),
1390
1552
  style: {
@@ -1395,12 +1557,10 @@ var init_Modal = __esm({
1395
1557
  transition: isDragging.current ? "none" : "transform 200ms ease-out"
1396
1558
  }
1397
1559
  },
1398
- role: "dialog",
1399
- "aria-modal": "true",
1400
1560
  ...title && { "aria-labelledby": "modal-title" },
1401
1561
  children: [
1402
1562
  /* @__PURE__ */ jsx(
1403
- "div",
1563
+ Box,
1404
1564
  {
1405
1565
  className: "hidden max-sm:flex justify-center py-2 cursor-grab active:cursor-grabbing touch-none",
1406
1566
  onPointerDown: (e) => {
@@ -1426,11 +1586,11 @@ var init_Modal = __esm({
1426
1586
  isDragging.current = false;
1427
1587
  setDragY(0);
1428
1588
  },
1429
- children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 rounded-full bg-border" })
1589
+ children: /* @__PURE__ */ jsx(Box, { className: "w-10 h-1 rounded-full bg-border" })
1430
1590
  }
1431
1591
  ),
1432
1592
  (title || showCloseButton) && /* @__PURE__ */ jsxs(
1433
- "div",
1593
+ Box,
1434
1594
  {
1435
1595
  className: cn(
1436
1596
  "px-6 py-4 flex items-center justify-between",
@@ -1439,25 +1599,22 @@ var init_Modal = __esm({
1439
1599
  children: [
1440
1600
  title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "modal-title", children: title }),
1441
1601
  showCloseButton && /* @__PURE__ */ jsx(
1442
- "button",
1602
+ Button,
1443
1603
  {
1444
- type: "button",
1604
+ variant: "ghost",
1605
+ size: "sm",
1606
+ icon: X,
1445
1607
  onClick: handleClose,
1446
1608
  "data-event": "CLOSE",
1447
- className: cn(
1448
- "p-1 transition-colors rounded-sm",
1449
- "hover:bg-muted"
1450
- ),
1451
- "aria-label": "Close modal",
1452
- children: /* @__PURE__ */ jsx(Icon, { icon: X, size: "md" })
1609
+ "aria-label": "Close modal"
1453
1610
  }
1454
1611
  )
1455
1612
  ]
1456
1613
  }
1457
1614
  ),
1458
- /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-6", children }),
1615
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
1459
1616
  footer && /* @__PURE__ */ jsx(
1460
- "div",
1617
+ Box,
1461
1618
  {
1462
1619
  className: cn(
1463
1620
  "px-6 py-4 bg-muted",
@@ -1480,21 +1637,19 @@ var sizeWidths, Drawer;
1480
1637
  var init_Drawer = __esm({
1481
1638
  "components/molecules/Drawer.tsx"() {
1482
1639
  "use client";
1483
- init_Icon();
1484
1640
  init_Box();
1641
+ init_Button();
1485
1642
  init_Typography();
1486
1643
  init_Overlay();
1487
1644
  init_cn();
1488
1645
  init_useEventBus();
1489
1646
  sizeWidths = {
1490
- sm: "w-80",
1647
+ sm: "w-full sm:w-80",
1491
1648
  // 320px
1492
- md: "w-96",
1649
+ md: "w-full sm:w-96",
1493
1650
  // 384px
1494
- lg: "w-[480px]",
1495
- // 480px
1496
- xl: "w-[640px]",
1497
- // 640px
1651
+ lg: "w-full sm:w-[480px]",
1652
+ xl: "w-full sm:w-[640px]",
1498
1653
  full: "w-screen"
1499
1654
  };
1500
1655
  Drawer = ({
@@ -1592,7 +1747,7 @@ var init_Drawer = __esm({
1592
1747
  ...title && { "aria-labelledby": "drawer-title" },
1593
1748
  children: [
1594
1749
  (title || showCloseButton) && /* @__PURE__ */ jsxs(
1595
- "div",
1750
+ Box,
1596
1751
  {
1597
1752
  className: cn(
1598
1753
  "px-6 py-4 flex items-center justify-between shrink-0",
@@ -1601,25 +1756,22 @@ var init_Drawer = __esm({
1601
1756
  children: [
1602
1757
  title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "drawer-title", children: title }),
1603
1758
  showCloseButton && /* @__PURE__ */ jsx(
1604
- "button",
1759
+ Button,
1605
1760
  {
1606
- type: "button",
1761
+ variant: "ghost",
1762
+ size: "sm",
1763
+ icon: X,
1607
1764
  onClick: handleClose,
1608
- className: cn(
1609
- "p-1 transition-colors rounded-sm",
1610
- "hover:bg-muted",
1611
- !title && "ml-auto"
1612
- ),
1613
1765
  "aria-label": "Close drawer",
1614
- children: /* @__PURE__ */ jsx(Icon, { icon: X, size: "md" })
1766
+ className: cn(!title && "ml-auto")
1615
1767
  }
1616
1768
  )
1617
1769
  ]
1618
1770
  }
1619
1771
  ),
1620
- /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-6", children }),
1772
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
1621
1773
  footer && /* @__PURE__ */ jsx(
1622
- "div",
1774
+ Box,
1623
1775
  {
1624
1776
  className: cn(
1625
1777
  "px-6 py-4 shrink-0 bg-muted",
@@ -1660,153 +1812,6 @@ var init_Drawer = __esm({
1660
1812
  Drawer.displayName = "Drawer";
1661
1813
  }
1662
1814
  });
1663
- function resolveIconProp(value, sizeClass) {
1664
- if (!value) return null;
1665
- if (typeof value === "string") {
1666
- const Resolved = resolveIcon(value);
1667
- return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
1668
- }
1669
- if (typeof value === "function") {
1670
- const IconComp = value;
1671
- return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1672
- }
1673
- if (React80__default.isValidElement(value)) {
1674
- return value;
1675
- }
1676
- if (typeof value === "object" && value !== null && "render" in value) {
1677
- const IconComp = value;
1678
- return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1679
- }
1680
- return value;
1681
- }
1682
- var variantStyles2, sizeStyles2, iconSizeStyles, Button;
1683
- var init_Button = __esm({
1684
- "components/atoms/Button.tsx"() {
1685
- "use client";
1686
- init_cn();
1687
- init_useEventBus();
1688
- init_Icon();
1689
- variantStyles2 = {
1690
- primary: [
1691
- "bg-primary text-primary-foreground",
1692
- "border-none",
1693
- "shadow-sm",
1694
- "hover:bg-primary-hover hover:shadow-lg",
1695
- "active:scale-[var(--active-scale)] active:shadow-sm"
1696
- ].join(" "),
1697
- secondary: [
1698
- "bg-transparent text-accent",
1699
- "border border-accent",
1700
- "hover:bg-accent hover:text-white hover:border-accent",
1701
- "active:scale-[var(--active-scale)]"
1702
- ].join(" "),
1703
- ghost: [
1704
- "bg-transparent text-muted-foreground",
1705
- "border border-transparent",
1706
- "hover:text-primary-foreground hover:bg-primary hover:border-primary",
1707
- "active:scale-[var(--active-scale)]"
1708
- ].join(" "),
1709
- danger: [
1710
- "bg-surface text-error",
1711
- "border-[length:var(--border-width)] border-error",
1712
- "shadow-sm",
1713
- "hover:bg-error hover:text-error-foreground hover:shadow-lg",
1714
- "active:scale-[var(--active-scale)] active:shadow-sm"
1715
- ].join(" "),
1716
- success: [
1717
- "bg-surface text-success",
1718
- "border-[length:var(--border-width)] border-success",
1719
- "shadow-sm",
1720
- "hover:bg-success hover:text-success-foreground hover:shadow-lg",
1721
- "active:scale-[var(--active-scale)] active:shadow-sm"
1722
- ].join(" "),
1723
- warning: [
1724
- "bg-surface text-warning",
1725
- "border-[length:var(--border-width)] border-warning",
1726
- "shadow-sm",
1727
- "hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
1728
- "active:scale-[var(--active-scale)] active:shadow-sm"
1729
- ].join(" "),
1730
- // "default" is an alias for secondary
1731
- default: [
1732
- "bg-secondary text-secondary-foreground",
1733
- "border-[length:var(--border-width-thin)] border-border",
1734
- "hover:bg-secondary-hover",
1735
- "active:scale-[var(--active-scale)]"
1736
- ].join(" ")
1737
- };
1738
- variantStyles2.destructive = variantStyles2.danger;
1739
- sizeStyles2 = {
1740
- sm: "px-3 py-1.5 text-sm",
1741
- md: "px-4 py-2 text-sm",
1742
- lg: "px-6 py-3 text-base"
1743
- };
1744
- iconSizeStyles = {
1745
- sm: "h-3.5 w-3.5",
1746
- md: "h-4 w-4",
1747
- lg: "h-5 w-5"
1748
- };
1749
- Button = React80__default.forwardRef(
1750
- ({
1751
- className,
1752
- variant = "primary",
1753
- size = "md",
1754
- isLoading = false,
1755
- disabled,
1756
- leftIcon,
1757
- rightIcon,
1758
- icon: iconProp,
1759
- iconRight: iconRightProp,
1760
- action,
1761
- actionPayload,
1762
- label,
1763
- children,
1764
- onClick,
1765
- ...props
1766
- }, ref) => {
1767
- const eventBus = useEventBus();
1768
- const leftIconValue = leftIcon || iconProp;
1769
- const rightIconValue = rightIcon || iconRightProp;
1770
- const resolvedLeftIcon = resolveIconProp(leftIconValue, iconSizeStyles[size]);
1771
- const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
1772
- const handleClick = (e) => {
1773
- if (action) {
1774
- eventBus.emit(`UI:${action}`, actionPayload ?? {});
1775
- }
1776
- onClick?.(e);
1777
- };
1778
- return /* @__PURE__ */ jsxs(
1779
- "button",
1780
- {
1781
- ref,
1782
- disabled: disabled || isLoading,
1783
- className: cn(
1784
- "inline-flex items-center justify-center gap-2",
1785
- "font-[var(--font-weight-medium)]",
1786
- "rounded-sm",
1787
- "cursor-pointer",
1788
- "transition-all duration-[var(--transition-normal)]",
1789
- "focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
1790
- "disabled:opacity-50 disabled:cursor-not-allowed",
1791
- variantStyles2[variant],
1792
- sizeStyles2[size],
1793
- className
1794
- ),
1795
- onClick: handleClick,
1796
- ...props,
1797
- "data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
1798
- children: [
1799
- isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
1800
- children || label,
1801
- resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
1802
- ]
1803
- }
1804
- );
1805
- }
1806
- );
1807
- Button.displayName = "Button";
1808
- }
1809
- });
1810
1815
  var variantStyles3, sizeStyles3, Badge;
1811
1816
  var init_Badge = __esm({
1812
1817
  "components/atoms/Badge.tsx"() {
@@ -1849,7 +1854,7 @@ var init_Badge = __esm({
1849
1854
  md: "px-2.5 py-1 text-sm",
1850
1855
  lg: "px-3 py-1.5 text-base"
1851
1856
  };
1852
- Badge = React80__default.forwardRef(
1857
+ Badge = React83__default.forwardRef(
1853
1858
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
1854
1859
  const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
1855
1860
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -1882,6 +1887,7 @@ var variantClasses, iconMap, iconColors, Toast;
1882
1887
  var init_Toast = __esm({
1883
1888
  "components/molecules/Toast.tsx"() {
1884
1889
  "use client";
1890
+ init_Box();
1885
1891
  init_Icon();
1886
1892
  init_Typography();
1887
1893
  init_Button();
@@ -1939,17 +1945,20 @@ var init_Toast = __esm({
1939
1945
  return () => clearTimeout(timer);
1940
1946
  }, [duration, onDismiss, dismissEvent]);
1941
1947
  return /* @__PURE__ */ jsx(
1942
- "div",
1948
+ Box,
1943
1949
  {
1944
1950
  className: cn(
1945
- "border-l-4 p-4 shadow min-w-[300px] max-w-md",
1951
+ // `min-w-[300px]` only kicks in at `sm:` and above so a phone
1952
+ // viewport doesn't get a toast wider than the screen near the
1953
+ // edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
1954
+ "border-l-4 p-4 shadow min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
1946
1955
  "rounded-sm",
1947
1956
  variantClasses[variant],
1948
1957
  className
1949
1958
  ),
1950
1959
  role: "alert",
1951
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
1952
- /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
1960
+ children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
1961
+ /* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
1953
1962
  Icon,
1954
1963
  {
1955
1964
  icon: iconMap[variant],
@@ -1957,25 +1966,22 @@ var init_Toast = __esm({
1957
1966
  className: iconColors[variant]
1958
1967
  }
1959
1968
  ) }),
1960
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1969
+ /* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
1961
1970
  title && /* @__PURE__ */ jsx(Typography, { variant: "h6", className: "mb-1", children: title }),
1962
1971
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-sm", children: message }),
1963
- actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleAction, children: actionLabel }) })
1972
+ actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx(Box, { className: "mt-3", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleAction, children: actionLabel }) })
1964
1973
  ] }),
1965
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 flex-shrink-0", children: [
1974
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-2 flex-shrink-0", children: [
1966
1975
  badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: badge }),
1967
1976
  dismissible && /* @__PURE__ */ jsx(
1968
- "button",
1977
+ Button,
1969
1978
  {
1970
- type: "button",
1979
+ variant: "ghost",
1980
+ size: "sm",
1981
+ icon: X,
1971
1982
  onClick: handleDismiss,
1972
- className: cn(
1973
- "flex-shrink-0 p-1 transition-colors rounded-sm",
1974
- "hover:bg-muted",
1975
- "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
1976
- ),
1977
1983
  "aria-label": "Dismiss toast",
1978
- children: /* @__PURE__ */ jsx(Icon, { icon: X, size: "sm" })
1984
+ className: "flex-shrink-0"
1979
1985
  }
1980
1986
  )
1981
1987
  ] })
@@ -2143,7 +2149,7 @@ var init_SvgFlow = __esm({
2143
2149
  opacity = 1,
2144
2150
  className
2145
2151
  }) => {
2146
- const markerId = React80__default.useMemo(() => {
2152
+ const markerId = React83__default.useMemo(() => {
2147
2153
  flowIdCounter += 1;
2148
2154
  return `almadar-flow-arrow-${flowIdCounter}`;
2149
2155
  }, []);
@@ -2686,7 +2692,7 @@ var init_SvgRing = __esm({
2686
2692
  className,
2687
2693
  label
2688
2694
  }) => {
2689
- const gradientId = React80__default.useMemo(() => {
2695
+ const gradientId = React83__default.useMemo(() => {
2690
2696
  ringIdCounter += 1;
2691
2697
  return `almadar-ring-glow-${ringIdCounter}`;
2692
2698
  }, []);
@@ -2847,7 +2853,7 @@ var Input;
2847
2853
  var init_Input = __esm({
2848
2854
  "components/atoms/Input.tsx"() {
2849
2855
  init_cn();
2850
- Input = React80__default.forwardRef(
2856
+ Input = React83__default.forwardRef(
2851
2857
  ({
2852
2858
  className,
2853
2859
  inputType,
@@ -2965,7 +2971,7 @@ var Label;
2965
2971
  var init_Label = __esm({
2966
2972
  "components/atoms/Label.tsx"() {
2967
2973
  init_cn();
2968
- Label = React80__default.forwardRef(
2974
+ Label = React83__default.forwardRef(
2969
2975
  ({ className, required, children, ...props }, ref) => {
2970
2976
  return /* @__PURE__ */ jsxs(
2971
2977
  "label",
@@ -2991,7 +2997,7 @@ var Textarea;
2991
2997
  var init_Textarea = __esm({
2992
2998
  "components/atoms/Textarea.tsx"() {
2993
2999
  init_cn();
2994
- Textarea = React80__default.forwardRef(
3000
+ Textarea = React83__default.forwardRef(
2995
3001
  ({ className, error, ...props }, ref) => {
2996
3002
  return /* @__PURE__ */ jsx(
2997
3003
  "textarea",
@@ -3020,7 +3026,7 @@ var Select;
3020
3026
  var init_Select = __esm({
3021
3027
  "components/atoms/Select.tsx"() {
3022
3028
  init_cn();
3023
- Select = React80__default.forwardRef(
3029
+ Select = React83__default.forwardRef(
3024
3030
  ({ className, options, placeholder, error, ...props }, ref) => {
3025
3031
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3026
3032
  /* @__PURE__ */ jsxs(
@@ -3062,7 +3068,7 @@ var Checkbox;
3062
3068
  var init_Checkbox = __esm({
3063
3069
  "components/atoms/Checkbox.tsx"() {
3064
3070
  init_cn();
3065
- Checkbox = React80__default.forwardRef(
3071
+ Checkbox = React83__default.forwardRef(
3066
3072
  ({ className, label, id, ...props }, ref) => {
3067
3073
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3068
3074
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -3144,7 +3150,7 @@ var init_Card = __esm({
3144
3150
  md: "shadow",
3145
3151
  lg: "shadow-lg"
3146
3152
  };
3147
- Card = React80__default.forwardRef(
3153
+ Card = React83__default.forwardRef(
3148
3154
  ({
3149
3155
  className,
3150
3156
  variant = "bordered",
@@ -3180,9 +3186,9 @@ var init_Card = __esm({
3180
3186
  }
3181
3187
  );
3182
3188
  Card.displayName = "Card";
3183
- CardHeader = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3189
+ CardHeader = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
3184
3190
  CardHeader.displayName = "CardHeader";
3185
- CardTitle = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3191
+ CardTitle = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3186
3192
  "h3",
3187
3193
  {
3188
3194
  ref,
@@ -3195,11 +3201,11 @@ var init_Card = __esm({
3195
3201
  }
3196
3202
  ));
3197
3203
  CardTitle.displayName = "CardTitle";
3198
- CardContent = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3204
+ CardContent = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
3199
3205
  CardContent.displayName = "CardContent";
3200
3206
  CardBody = CardContent;
3201
3207
  CardBody.displayName = "CardBody";
3202
- CardFooter = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3208
+ CardFooter = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3203
3209
  "div",
3204
3210
  {
3205
3211
  ref,
@@ -3254,7 +3260,7 @@ var init_FilterPill = __esm({
3254
3260
  md: "w-3.5 h-3.5",
3255
3261
  lg: "w-4 h-4"
3256
3262
  };
3257
- FilterPill = React80__default.forwardRef(
3263
+ FilterPill = React83__default.forwardRef(
3258
3264
  ({
3259
3265
  className,
3260
3266
  variant = "default",
@@ -3333,7 +3339,7 @@ var init_Spinner = __esm({
3333
3339
  md: "h-6 w-6",
3334
3340
  lg: "h-8 w-8"
3335
3341
  };
3336
- Spinner = React80__default.forwardRef(
3342
+ Spinner = React83__default.forwardRef(
3337
3343
  ({ className, size = "md", ...props }, ref) => {
3338
3344
  return /* @__PURE__ */ jsx(
3339
3345
  "div",
@@ -3781,7 +3787,7 @@ var Radio;
3781
3787
  var init_Radio = __esm({
3782
3788
  "components/atoms/Radio.tsx"() {
3783
3789
  init_cn();
3784
- Radio = React80__default.forwardRef(
3790
+ Radio = React83__default.forwardRef(
3785
3791
  ({
3786
3792
  label,
3787
3793
  helperText,
@@ -3953,7 +3959,7 @@ var init_Switch = __esm({
3953
3959
  "components/atoms/Switch.tsx"() {
3954
3960
  "use client";
3955
3961
  init_cn();
3956
- Switch = React80.forwardRef(
3962
+ Switch = React83.forwardRef(
3957
3963
  ({
3958
3964
  checked,
3959
3965
  defaultChecked = false,
@@ -3964,10 +3970,10 @@ var init_Switch = __esm({
3964
3970
  name,
3965
3971
  className
3966
3972
  }, ref) => {
3967
- const [isChecked, setIsChecked] = React80.useState(
3973
+ const [isChecked, setIsChecked] = React83.useState(
3968
3974
  checked !== void 0 ? checked : defaultChecked
3969
3975
  );
3970
- React80.useEffect(() => {
3976
+ React83.useEffect(() => {
3971
3977
  if (checked !== void 0) {
3972
3978
  setIsChecked(checked);
3973
3979
  }
@@ -4442,6 +4448,16 @@ var init_FlipContainer = __esm({
4442
4448
  FlipContainer.displayName = "FlipContainer";
4443
4449
  }
4444
4450
  });
4451
+ var Aside;
4452
+ var init_Aside = __esm({
4453
+ "components/atoms/Aside.tsx"() {
4454
+ init_cn();
4455
+ Aside = React83__default.forwardRef(
4456
+ ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4457
+ );
4458
+ Aside.displayName = "Aside";
4459
+ }
4460
+ });
4445
4461
  function toSharedContext(ctx) {
4446
4462
  return createMinimalContext(
4447
4463
  {
@@ -4513,8 +4529,8 @@ var init_LawReferenceTooltip = __esm({
4513
4529
  position = "top",
4514
4530
  className
4515
4531
  }) => {
4516
- const [isVisible, setIsVisible] = React80__default.useState(false);
4517
- const timeoutRef = React80__default.useRef(null);
4532
+ const [isVisible, setIsVisible] = React83__default.useState(false);
4533
+ const timeoutRef = React83__default.useRef(null);
4518
4534
  const handleMouseEnter = () => {
4519
4535
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4520
4536
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4523,7 +4539,7 @@ var init_LawReferenceTooltip = __esm({
4523
4539
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4524
4540
  setIsVisible(false);
4525
4541
  };
4526
- React80__default.useEffect(() => {
4542
+ React83__default.useEffect(() => {
4527
4543
  return () => {
4528
4544
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4529
4545
  };
@@ -4733,7 +4749,7 @@ var init_StatusDot = __esm({
4733
4749
  md: "w-2.5 h-2.5",
4734
4750
  lg: "w-3 h-3"
4735
4751
  };
4736
- StatusDot = React80__default.forwardRef(
4752
+ StatusDot = React83__default.forwardRef(
4737
4753
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
4738
4754
  return /* @__PURE__ */ jsx(
4739
4755
  "span",
@@ -4786,7 +4802,7 @@ var init_TrendIndicator = __esm({
4786
4802
  down: TrendingDown,
4787
4803
  flat: ArrowRight
4788
4804
  };
4789
- TrendIndicator = React80__default.forwardRef(
4805
+ TrendIndicator = React83__default.forwardRef(
4790
4806
  ({
4791
4807
  className,
4792
4808
  value,
@@ -4853,7 +4869,7 @@ var init_RangeSlider = __esm({
4853
4869
  md: "w-4 h-4",
4854
4870
  lg: "w-5 h-5"
4855
4871
  };
4856
- RangeSlider = React80__default.forwardRef(
4872
+ RangeSlider = React83__default.forwardRef(
4857
4873
  ({
4858
4874
  className,
4859
4875
  min = 0,
@@ -5386,7 +5402,7 @@ var init_ContentSection = __esm({
5386
5402
  md: "py-16",
5387
5403
  lg: "py-24"
5388
5404
  };
5389
- ContentSection = React80__default.forwardRef(
5405
+ ContentSection = React83__default.forwardRef(
5390
5406
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5391
5407
  return /* @__PURE__ */ jsx(
5392
5408
  Box,
@@ -5920,7 +5936,7 @@ var init_AnimatedReveal = __esm({
5920
5936
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
5921
5937
  "none": {}
5922
5938
  };
5923
- AnimatedReveal = React80__default.forwardRef(
5939
+ AnimatedReveal = React83__default.forwardRef(
5924
5940
  ({
5925
5941
  trigger = "scroll",
5926
5942
  animation = "fade-up",
@@ -6080,7 +6096,7 @@ var init_AnimatedGraphic = __esm({
6080
6096
  "components/atoms/AnimatedGraphic.tsx"() {
6081
6097
  "use client";
6082
6098
  init_cn();
6083
- AnimatedGraphic = React80__default.forwardRef(
6099
+ AnimatedGraphic = React83__default.forwardRef(
6084
6100
  ({
6085
6101
  src,
6086
6102
  svgContent,
@@ -6103,7 +6119,7 @@ var init_AnimatedGraphic = __esm({
6103
6119
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6104
6120
  const resolvedSvg = svgContent ?? fetchedSvg;
6105
6121
  const prevAnimateRef = useRef(animate);
6106
- const setRef = React80__default.useCallback(
6122
+ const setRef = React83__default.useCallback(
6107
6123
  (node) => {
6108
6124
  containerRef.current = node;
6109
6125
  if (typeof ref === "function") ref(node);
@@ -6328,9 +6344,9 @@ function ScoreDisplay({
6328
6344
  ...rest
6329
6345
  }) {
6330
6346
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
6331
- const [displayValue, setDisplayValue] = React80.useState(resolvedValue);
6332
- const [isAnimating, setIsAnimating] = React80.useState(false);
6333
- React80.useEffect(() => {
6347
+ const [displayValue, setDisplayValue] = React83.useState(resolvedValue);
6348
+ const [isAnimating, setIsAnimating] = React83.useState(false);
6349
+ React83.useEffect(() => {
6334
6350
  if (!animated || displayValue === resolvedValue) {
6335
6351
  setDisplayValue(resolvedValue);
6336
6352
  return;
@@ -6400,9 +6416,9 @@ function ControlButton({
6400
6416
  className
6401
6417
  }) {
6402
6418
  const eventBus = useEventBus();
6403
- const [isPressed, setIsPressed] = React80.useState(false);
6419
+ const [isPressed, setIsPressed] = React83.useState(false);
6404
6420
  const actualPressed = pressed ?? isPressed;
6405
- const handlePointerDown = React80.useCallback(
6421
+ const handlePointerDown = React83.useCallback(
6406
6422
  (e) => {
6407
6423
  e.preventDefault();
6408
6424
  if (disabled) return;
@@ -6412,7 +6428,7 @@ function ControlButton({
6412
6428
  },
6413
6429
  [disabled, pressEvent, eventBus, onPress]
6414
6430
  );
6415
- const handlePointerUp = React80.useCallback(
6431
+ const handlePointerUp = React83.useCallback(
6416
6432
  (e) => {
6417
6433
  e.preventDefault();
6418
6434
  if (disabled) return;
@@ -6422,7 +6438,7 @@ function ControlButton({
6422
6438
  },
6423
6439
  [disabled, releaseEvent, eventBus, onRelease]
6424
6440
  );
6425
- const handlePointerLeave = React80.useCallback(
6441
+ const handlePointerLeave = React83.useCallback(
6426
6442
  (e) => {
6427
6443
  if (isPressed) {
6428
6444
  setIsPressed(false);
@@ -7328,9 +7344,9 @@ function MiniMap({
7328
7344
  viewportRect,
7329
7345
  className
7330
7346
  }) {
7331
- const canvasRef = React80.useRef(null);
7332
- const frameRef = React80.useRef(0);
7333
- React80.useEffect(() => {
7347
+ const canvasRef = React83.useRef(null);
7348
+ const frameRef = React83.useRef(0);
7349
+ React83.useEffect(() => {
7334
7350
  const canvas = canvasRef.current;
7335
7351
  if (!canvas) return;
7336
7352
  const ctx = canvas.getContext("2d");
@@ -7493,7 +7509,7 @@ var init_ErrorBoundary = __esm({
7493
7509
  "use client";
7494
7510
  init_cn();
7495
7511
  init_ErrorState();
7496
- ErrorBoundary = class extends React80__default.Component {
7512
+ ErrorBoundary = class extends React83__default.Component {
7497
7513
  constructor(props) {
7498
7514
  super(props);
7499
7515
  __publicField(this, "reset", () => {
@@ -8073,7 +8089,7 @@ var init_HeroSection = __esm({
8073
8089
  HeroSection.displayName = "HeroSection";
8074
8090
  }
8075
8091
  });
8076
- var ArticleSection;
8092
+ var maxWidthMap, ArticleSection;
8077
8093
  var init_ArticleSection = __esm({
8078
8094
  "components/molecules/ArticleSection.tsx"() {
8079
8095
  "use client";
@@ -8081,6 +8097,11 @@ var init_ArticleSection = __esm({
8081
8097
  init_Box();
8082
8098
  init_Stack();
8083
8099
  init_Typography();
8100
+ maxWidthMap = {
8101
+ sm: "max-w-full sm:max-w-xl md:max-w-2xl",
8102
+ md: "max-w-full sm:max-w-2xl md:max-w-3xl",
8103
+ lg: "max-w-full sm:max-w-3xl md:max-w-4xl"
8104
+ };
8084
8105
  ArticleSection = ({
8085
8106
  title,
8086
8107
  children,
@@ -8095,7 +8116,7 @@ var init_ArticleSection = __esm({
8095
8116
  className
8096
8117
  ),
8097
8118
  padding: "md",
8098
- children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", children: [
8119
+ children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", className: cn("w-full mx-auto", maxWidthMap[maxWidth]), children: [
8099
8120
  /* @__PURE__ */ jsx(Typography, { variant: "h2", children: title }),
8100
8121
  /* @__PURE__ */ jsx(Box, { className: "w-full", children })
8101
8122
  ] })
@@ -8147,6 +8168,7 @@ var init_TeamCard = __esm({
8147
8168
  var gapStyles2, colStyles, SimpleGrid;
8148
8169
  var init_SimpleGrid = __esm({
8149
8170
  "components/molecules/SimpleGrid.tsx"() {
8171
+ init_Box();
8150
8172
  init_cn();
8151
8173
  gapStyles2 = {
8152
8174
  none: "gap-0",
@@ -8159,10 +8181,10 @@ var init_SimpleGrid = __esm({
8159
8181
  colStyles = {
8160
8182
  1: "grid-cols-1",
8161
8183
  2: "grid-cols-1 sm:grid-cols-2",
8162
- 3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
8163
- 4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
8164
- 5: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",
8165
- 6: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6"
8184
+ 3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
8185
+ 4: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
8186
+ 5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",
8187
+ 6: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6"
8166
8188
  };
8167
8189
  SimpleGrid = ({
8168
8190
  minChildWidth = 250,
@@ -8173,12 +8195,12 @@ var init_SimpleGrid = __esm({
8173
8195
  children
8174
8196
  }) => {
8175
8197
  if (cols) {
8176
- return /* @__PURE__ */ jsx("div", { className: cn("grid", colStyles[cols], gapStyles2[gap], className), children });
8198
+ return /* @__PURE__ */ jsx(Box, { className: cn("grid", colStyles[cols], gapStyles2[gap], className), children });
8177
8199
  }
8178
8200
  const minWidth = typeof minChildWidth === "number" ? `${minChildWidth}px` : minChildWidth;
8179
8201
  const templateColumns = maxCols ? `repeat(auto-fit, minmax(min(${minWidth}, 100%), 1fr))` : `repeat(auto-fit, minmax(${minWidth}, 1fr))`;
8180
8202
  return /* @__PURE__ */ jsx(
8181
- "div",
8203
+ Box,
8182
8204
  {
8183
8205
  className: cn("grid", gapStyles2[gap], className),
8184
8206
  style: {
@@ -8568,8 +8590,8 @@ var init_Tooltip = __esm({
8568
8590
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
8569
8591
  };
8570
8592
  }, []);
8571
- const triggerElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8572
- const trigger = React80__default.cloneElement(triggerElement, {
8593
+ const triggerElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8594
+ const trigger = React83__default.cloneElement(triggerElement, {
8573
8595
  ref: triggerRef,
8574
8596
  onMouseEnter: handleMouseEnter,
8575
8597
  onMouseLeave: handleMouseLeave,
@@ -8690,8 +8712,8 @@ var init_Popover = __esm({
8690
8712
  onMouseEnter: handleOpen,
8691
8713
  onMouseLeave: handleClose
8692
8714
  };
8693
- const childElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8694
- const triggerElement = React80__default.cloneElement(
8715
+ const childElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
8716
+ const triggerElement = React83__default.cloneElement(
8695
8717
  childElement,
8696
8718
  {
8697
8719
  ref: triggerRef,
@@ -8740,6 +8762,7 @@ var Menu;
8740
8762
  var init_Menu = __esm({
8741
8763
  "components/molecules/Menu.tsx"() {
8742
8764
  "use client";
8765
+ init_Box();
8743
8766
  init_Icon();
8744
8767
  init_Divider();
8745
8768
  init_Typography();
@@ -8808,8 +8831,8 @@ var init_Menu = __esm({
8808
8831
  "bottom-start": "top-full left-0 mt-2",
8809
8832
  "bottom-end": "top-full right-0 mt-2"
8810
8833
  };
8811
- const triggerChild = React80__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
8812
- const triggerElement = React80__default.cloneElement(
8834
+ const triggerChild = React83__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
8835
+ const triggerElement = React83__default.cloneElement(
8813
8836
  triggerChild,
8814
8837
  {
8815
8838
  ref: triggerRef,
@@ -8821,17 +8844,17 @@ var init_Menu = __esm({
8821
8844
  "border-[length:var(--border-width)] border-border",
8822
8845
  "shadow",
8823
8846
  "rounded-sm",
8824
- "min-w-[200px] py-1"
8847
+ "min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
8825
8848
  );
8826
8849
  const renderMenuItem = (item, hasSubMenu, index) => {
8827
8850
  const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
8828
8851
  const isDanger = item.variant === "danger";
8829
8852
  return /* @__PURE__ */ jsx(
8830
- "button",
8853
+ Box,
8831
8854
  {
8832
- type: "button",
8833
- onClick: () => handleItemClick({ ...item, id: itemId }),
8834
- disabled: item.disabled,
8855
+ as: "button",
8856
+ onClick: () => !item.disabled && handleItemClick({ ...item, id: itemId }),
8857
+ "aria-disabled": item.disabled || void 0,
8835
8858
  onMouseEnter: () => hasSubMenu && setActiveSubMenu(itemId),
8836
8859
  "data-testid": item.event ? `action-${item.event}` : void 0,
8837
8860
  className: cn(
@@ -8843,7 +8866,7 @@ var init_Menu = __esm({
8843
8866
  item.disabled && "cursor-not-allowed",
8844
8867
  isDanger && "text-error hover:bg-error/10"
8845
8868
  ),
8846
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
8869
+ children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
8847
8870
  item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
8848
8871
  /* @__PURE__ */ jsx(
8849
8872
  Typography,
@@ -8868,10 +8891,10 @@ var init_Menu = __esm({
8868
8891
  if (isDivider) {
8869
8892
  return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
8870
8893
  }
8871
- return /* @__PURE__ */ jsxs("div", { children: [
8894
+ return /* @__PURE__ */ jsxs(Box, { children: [
8872
8895
  renderMenuItem(item, !!hasSubMenu, index),
8873
8896
  hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
8874
- "div",
8897
+ Box,
8875
8898
  {
8876
8899
  className: cn(
8877
8900
  "absolute left-full top-0 ml-2 z-50",
@@ -8883,10 +8906,10 @@ var init_Menu = __esm({
8883
8906
  ] }, itemId);
8884
8907
  });
8885
8908
  };
8886
- return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
8909
+ return /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
8887
8910
  triggerElement,
8888
8911
  isOpen && triggerRect && /* @__PURE__ */ jsx(
8889
- "div",
8912
+ Box,
8890
8913
  {
8891
8914
  ref: menuRef,
8892
8915
  className: cn(
@@ -9225,13 +9248,13 @@ var init_MapView = __esm({
9225
9248
  shadowSize: [41, 41]
9226
9249
  });
9227
9250
  L.Marker.prototype.options.icon = defaultIcon;
9228
- const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback112, useState: useState99 } = React80__default;
9251
+ const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback112, useState: useState100 } = React83__default;
9229
9252
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9230
9253
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9231
9254
  function MapUpdater({ centerLat, centerLng, zoom }) {
9232
9255
  const map = useMap();
9233
9256
  const prevRef = useRef65({ centerLat, centerLng, zoom });
9234
- useEffect68(() => {
9257
+ useEffect69(() => {
9235
9258
  const prev = prevRef.current;
9236
9259
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
9237
9260
  map.setView([centerLat, centerLng], zoom);
@@ -9242,7 +9265,7 @@ var init_MapView = __esm({
9242
9265
  }
9243
9266
  function MapClickHandler({ onMapClick }) {
9244
9267
  const map = useMap();
9245
- useEffect68(() => {
9268
+ useEffect69(() => {
9246
9269
  if (!onMapClick) return;
9247
9270
  const handler = (e) => {
9248
9271
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -9270,7 +9293,7 @@ var init_MapView = __esm({
9270
9293
  showAttribution = true
9271
9294
  }) {
9272
9295
  const eventBus = useEventBus2();
9273
- const [clickedPosition, setClickedPosition] = useState99(null);
9296
+ const [clickedPosition, setClickedPosition] = useState100(null);
9274
9297
  const handleMapClick = useCallback112((lat, lng) => {
9275
9298
  if (showClickedPin) {
9276
9299
  setClickedPosition({ lat, lng });
@@ -9471,7 +9494,7 @@ function InputPattern({
9471
9494
  fieldName
9472
9495
  }) {
9473
9496
  const { emit } = useEventBus();
9474
- const [localValue, setLocalValue] = React80__default.useState(value);
9497
+ const [localValue, setLocalValue] = React83__default.useState(value);
9475
9498
  const handleChange = (e) => {
9476
9499
  setLocalValue(e.target.value);
9477
9500
  if (onChange) {
@@ -9509,7 +9532,7 @@ function TextareaPattern({
9509
9532
  fieldName
9510
9533
  }) {
9511
9534
  const { emit } = useEventBus();
9512
- const [localValue, setLocalValue] = React80__default.useState(value);
9535
+ const [localValue, setLocalValue] = React83__default.useState(value);
9513
9536
  const handleChange = (e) => {
9514
9537
  setLocalValue(e.target.value);
9515
9538
  if (onChange) {
@@ -9541,7 +9564,7 @@ function SelectPattern({
9541
9564
  fieldName
9542
9565
  }) {
9543
9566
  const { emit } = useEventBus();
9544
- const [localValue, setLocalValue] = React80__default.useState(value);
9567
+ const [localValue, setLocalValue] = React83__default.useState(value);
9545
9568
  const handleChange = (e) => {
9546
9569
  setLocalValue(e.target.value);
9547
9570
  if (onChange) {
@@ -9570,7 +9593,7 @@ function CheckboxPattern({
9570
9593
  className
9571
9594
  }) {
9572
9595
  const { emit } = useEventBus();
9573
- const [localChecked, setLocalChecked] = React80__default.useState(checked);
9596
+ const [localChecked, setLocalChecked] = React83__default.useState(checked);
9574
9597
  const handleChange = (e) => {
9575
9598
  setLocalChecked(e.target.checked);
9576
9599
  if (onChange) {
@@ -9801,8 +9824,8 @@ function ActionButtons({
9801
9824
  disabled
9802
9825
  }) {
9803
9826
  const eventBus = useEventBus();
9804
- const [activeButtons, setActiveButtons] = React80.useState(/* @__PURE__ */ new Set());
9805
- const handlePress = React80.useCallback(
9827
+ const [activeButtons, setActiveButtons] = React83.useState(/* @__PURE__ */ new Set());
9828
+ const handlePress = React83.useCallback(
9806
9829
  (id) => {
9807
9830
  setActiveButtons((prev) => new Set(prev).add(id));
9808
9831
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -9810,7 +9833,7 @@ function ActionButtons({
9810
9833
  },
9811
9834
  [actionEvent, eventBus, onAction]
9812
9835
  );
9813
- const handleRelease = React80.useCallback(
9836
+ const handleRelease = React83.useCallback(
9814
9837
  (id) => {
9815
9838
  setActiveButtons((prev) => {
9816
9839
  const next = new Set(prev);
@@ -12673,7 +12696,7 @@ var init_MarkdownContent = __esm({
12673
12696
  init_Box();
12674
12697
  init_useTranslate();
12675
12698
  init_cn();
12676
- MarkdownContent = React80__default.memo(
12699
+ MarkdownContent = React83__default.memo(
12677
12700
  ({ content, direction, className }) => {
12678
12701
  const { t: _t } = useTranslate();
12679
12702
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -12891,7 +12914,7 @@ var init_CodeBlock = __esm({
12891
12914
  log7 = createLogger("almadar:ui:markdown-code");
12892
12915
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
12893
12916
  HIDDEN_LINE_NUMBERS = { display: "none" };
12894
- CodeBlock = React80__default.memo(
12917
+ CodeBlock = React83__default.memo(
12895
12918
  ({
12896
12919
  code: rawCode,
12897
12920
  language = "text",
@@ -14150,7 +14173,7 @@ var init_StateMachineView = __esm({
14150
14173
  style: { top: title ? 30 : 0 },
14151
14174
  children: [
14152
14175
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
14153
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React80__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
14176
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React83__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
14154
14177
  StateNode,
14155
14178
  {
14156
14179
  state,
@@ -15731,27 +15754,23 @@ var init_Grid = __esm({
15731
15754
  as: Component = "div"
15732
15755
  }) => {
15733
15756
  const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
15734
- const Comp = Component;
15735
- return /* @__PURE__ */ jsx(
15736
- Comp,
15757
+ return React83__default.createElement(
15758
+ Component,
15737
15759
  {
15738
15760
  className: cn(
15739
15761
  "grid",
15740
15762
  getColsClass(cols),
15741
- // Gap (rowGap/colGap override gap)
15742
15763
  rowGap ? rowGapStyles[rowGap] : colGap ? void 0 : gapStyles3[gap],
15743
15764
  colGap ? colGapStyles[colGap] : rowGap ? void 0 : void 0,
15744
15765
  rowGap && colGap ? `${rowGapStyles[rowGap]} ${colGapStyles[colGap]}` : void 0,
15745
- // Alignment
15746
15766
  alignItems && alignStyles2[alignItems],
15747
15767
  justifyItems && justifyStyles2[justifyItems],
15748
- // Flow
15749
15768
  flow && flowStyles[flow],
15750
15769
  className
15751
15770
  ),
15752
- style: mergedStyle,
15753
- children
15754
- }
15771
+ style: mergedStyle
15772
+ },
15773
+ children
15755
15774
  );
15756
15775
  };
15757
15776
  Grid.displayName = "Grid";
@@ -16703,6 +16722,35 @@ var init_ButtonGroup = __esm({
16703
16722
  ButtonGroup.displayName = "ButtonGroup";
16704
16723
  }
16705
16724
  });
16725
+ function dayWindowForViewport(width) {
16726
+ if (width <= 640) return 1;
16727
+ if (width <= 1024) return 3;
16728
+ return 7;
16729
+ }
16730
+ function useDayWindow(override) {
16731
+ const [w, setW] = useState(() => {
16732
+ if (override !== "auto") return override;
16733
+ if (typeof window === "undefined") return 7;
16734
+ return dayWindowForViewport(window.innerWidth);
16735
+ });
16736
+ useEffect(() => {
16737
+ if (override !== "auto") {
16738
+ setW(override);
16739
+ return void 0;
16740
+ }
16741
+ if (typeof window === "undefined") return void 0;
16742
+ const onResize = () => setW(dayWindowForViewport(window.innerWidth));
16743
+ onResize();
16744
+ window.addEventListener("resize", onResize);
16745
+ return () => window.removeEventListener("resize", onResize);
16746
+ }, [override]);
16747
+ return w;
16748
+ }
16749
+ function formatDateRange(start, end) {
16750
+ const startStr = start.toLocaleDateString(void 0, SHORT_DATE);
16751
+ const endStr = end.toLocaleDateString(void 0, SHORT_DATE);
16752
+ return start.toDateString() === end.toDateString() ? startStr : `${startStr} \u2013 ${endStr}`;
16753
+ }
16706
16754
  function getStartOfWeek(date) {
16707
16755
  const d = new Date(date);
16708
16756
  const day = d.getDay();
@@ -16743,7 +16791,8 @@ function CalendarGrid({
16743
16791
  longPressEvent,
16744
16792
  longPressPayload,
16745
16793
  swipeLeftEvent,
16746
- swipeRightEvent
16794
+ swipeRightEvent,
16795
+ dayWindow = "auto"
16747
16796
  }) {
16748
16797
  const eventBus = useEventBus();
16749
16798
  const longPressTimer = useRef(null);
@@ -16759,6 +16808,26 @@ function CalendarGrid({
16759
16808
  () => timeSlots ?? generateDefaultTimeSlots(),
16760
16809
  [timeSlots]
16761
16810
  );
16811
+ const visibleCount = useDayWindow(dayWindow);
16812
+ const [dayOffset, setDayOffset] = useState(0);
16813
+ useEffect(() => {
16814
+ if (dayOffset + visibleCount > 7) {
16815
+ setDayOffset(Math.max(0, 7 - visibleCount));
16816
+ }
16817
+ }, [visibleCount, dayOffset]);
16818
+ const visibleDays = useMemo(
16819
+ () => weekDays.slice(dayOffset, dayOffset + visibleCount),
16820
+ [weekDays, dayOffset, visibleCount]
16821
+ );
16822
+ const canPrev = dayOffset > 0;
16823
+ const canNext = dayOffset + visibleCount < 7;
16824
+ const stepPrev = useCallback(() => {
16825
+ setDayOffset((d) => Math.max(0, d - visibleCount));
16826
+ }, [visibleCount]);
16827
+ const stepNext = useCallback(() => {
16828
+ setDayOffset((d) => Math.min(7 - visibleCount, d + visibleCount));
16829
+ }, [visibleCount]);
16830
+ const gridColsClass = visibleCount === 1 ? "grid-cols-2" : visibleCount === 3 ? "grid-cols-4" : "grid-cols-8";
16762
16831
  const handleSlotClick = useCallback(
16763
16832
  (day, time) => {
16764
16833
  onSlotClick?.(day, time);
@@ -16810,93 +16879,124 @@ function CalendarGrid({
16810
16879
  },
16811
16880
  event.id
16812
16881
  );
16813
- return /* @__PURE__ */ jsx(
16882
+ return /* @__PURE__ */ jsxs(
16814
16883
  Box,
16815
16884
  {
16816
- className: cn("overflow-x-auto", className),
16885
+ className,
16817
16886
  ...swipeLeftEvent || swipeRightEvent ? {
16818
16887
  onPointerDown: swipe.onPointerDown,
16819
16888
  onPointerMove: swipe.onPointerMove,
16820
16889
  onPointerUp: swipe.onPointerUp,
16821
16890
  onPointerCancel: swipe.onPointerCancel
16822
16891
  } : {},
16823
- children: /* @__PURE__ */ jsxs(Box, { className: "min-w-[800px]", children: [
16824
- /* @__PURE__ */ jsxs(Box, { className: "grid grid-cols-8 border-b border-border", children: [
16825
- /* @__PURE__ */ jsx(Box, { className: "p-2" }),
16826
- weekDays.map((day) => {
16827
- const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
16828
- const count = eventsForDayCount(day);
16829
- return /* @__PURE__ */ jsxs(
16830
- Box,
16831
- {
16832
- className: "border-l border-border",
16833
- children: [
16834
- /* @__PURE__ */ jsx(
16835
- DayCell,
16836
- {
16837
- date: day,
16838
- isToday,
16839
- onClick: onDayClick
16840
- }
16841
- ),
16842
- count > 0 && /* @__PURE__ */ jsx(Box, { className: "text-center pb-1", children: /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: count }) })
16843
- ]
16844
- },
16845
- day.toISOString()
16846
- );
16847
- })
16892
+ children: [
16893
+ visibleCount < 7 && /* @__PURE__ */ jsxs(HStack, { align: "center", justify: "between", className: "mb-2 px-2", children: [
16894
+ /* @__PURE__ */ jsx(
16895
+ Button,
16896
+ {
16897
+ variant: "ghost",
16898
+ size: "sm",
16899
+ icon: ChevronLeft,
16900
+ onClick: stepPrev,
16901
+ "aria-disabled": !canPrev || void 0,
16902
+ "aria-label": "Previous days",
16903
+ children: "Prev"
16904
+ }
16905
+ ),
16906
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
16907
+ /* @__PURE__ */ jsx(
16908
+ Button,
16909
+ {
16910
+ variant: "ghost",
16911
+ size: "sm",
16912
+ iconRight: ChevronRight,
16913
+ onClick: stepNext,
16914
+ "aria-disabled": !canNext || void 0,
16915
+ "aria-label": "Next days",
16916
+ children: "Next"
16917
+ }
16918
+ )
16848
16919
  ] }),
16849
- /* @__PURE__ */ jsx(Box, { className: "max-h-[500px] overflow-y-auto", children: resolvedTimeSlots.map((time) => /* @__PURE__ */ jsxs(
16850
- Box,
16851
- {
16852
- className: "grid grid-cols-8 border-b border-border",
16853
- children: [
16854
- /* @__PURE__ */ jsx(Box, { className: "p-2 text-right pr-3", children: /* @__PURE__ */ jsx(
16855
- Typography,
16920
+ /* @__PURE__ */ jsxs(Box, { children: [
16921
+ /* @__PURE__ */ jsxs(Box, { className: cn("grid border-b border-border", gridColsClass), children: [
16922
+ /* @__PURE__ */ jsx(Box, { className: "p-2" }),
16923
+ visibleDays.map((day) => {
16924
+ const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
16925
+ const count = eventsForDayCount(day);
16926
+ return /* @__PURE__ */ jsxs(
16927
+ Box,
16856
16928
  {
16857
- variant: "small",
16858
- className: "text-muted-foreground",
16859
- children: time
16860
- }
16861
- ) }),
16862
- weekDays.map((day) => {
16863
- const slotEvents = events2.filter(
16864
- (ev) => eventInSlot(ev, day, time)
16865
- );
16866
- const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
16867
- return /* @__PURE__ */ jsx(
16868
- TimeSlotCell,
16869
- {
16870
- time,
16871
- isOccupied: slotEvents.length > 0,
16872
- onClick: () => handleSlotClick(day, time),
16873
- className: cn(
16874
- "border-l border-border",
16875
- isToday && "bg-blue-50/30"
16929
+ className: "border-l border-border",
16930
+ children: [
16931
+ /* @__PURE__ */ jsx(
16932
+ DayCell,
16933
+ {
16934
+ date: day,
16935
+ isToday,
16936
+ onClick: onDayClick
16937
+ }
16876
16938
  ),
16877
- ...longPressEvent ? {
16878
- onPointerDown: () => startLongPress(day, time),
16879
- onPointerUp: clearLongPress,
16880
- onPointerCancel: clearLongPress
16881
- } : {},
16882
- children: /* @__PURE__ */ jsx(VStack, { gap: "xs", children: slotEvents.map(renderEvent) })
16883
- },
16884
- `${day.toISOString()}-${time}`
16885
- );
16886
- })
16887
- ]
16888
- },
16889
- time
16890
- )) })
16891
- ] })
16939
+ count > 0 && /* @__PURE__ */ jsx(Box, { className: "text-center pb-1", children: /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: count }) })
16940
+ ]
16941
+ },
16942
+ day.toISOString()
16943
+ );
16944
+ })
16945
+ ] }),
16946
+ /* @__PURE__ */ jsx(Box, { className: "max-h-[500px] overflow-y-auto", children: resolvedTimeSlots.map((time) => /* @__PURE__ */ jsxs(
16947
+ Box,
16948
+ {
16949
+ className: cn("grid border-b border-border", gridColsClass),
16950
+ children: [
16951
+ /* @__PURE__ */ jsx(Box, { className: "p-2 text-right pr-3", children: /* @__PURE__ */ jsx(
16952
+ Typography,
16953
+ {
16954
+ variant: "small",
16955
+ className: "text-muted-foreground",
16956
+ children: time
16957
+ }
16958
+ ) }),
16959
+ visibleDays.map((day) => {
16960
+ const slotEvents = events2.filter(
16961
+ (ev) => eventInSlot(ev, day, time)
16962
+ );
16963
+ const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
16964
+ return /* @__PURE__ */ jsx(
16965
+ TimeSlotCell,
16966
+ {
16967
+ time,
16968
+ isOccupied: slotEvents.length > 0,
16969
+ onClick: () => handleSlotClick(day, time),
16970
+ className: cn(
16971
+ "border-l border-border",
16972
+ isToday && "bg-blue-50/30"
16973
+ ),
16974
+ ...longPressEvent ? {
16975
+ onPointerDown: () => startLongPress(day, time),
16976
+ onPointerUp: clearLongPress,
16977
+ onPointerCancel: clearLongPress
16978
+ } : {},
16979
+ children: /* @__PURE__ */ jsx(VStack, { gap: "xs", children: slotEvents.map(renderEvent) })
16980
+ },
16981
+ `${day.toISOString()}-${time}`
16982
+ );
16983
+ })
16984
+ ]
16985
+ },
16986
+ time
16987
+ )) })
16988
+ ] })
16989
+ ]
16892
16990
  }
16893
16991
  );
16894
16992
  }
16993
+ var SHORT_DATE;
16895
16994
  var init_CalendarGrid = __esm({
16896
16995
  "components/molecules/CalendarGrid.tsx"() {
16897
16996
  "use client";
16898
16997
  init_cn();
16899
16998
  init_Box();
16999
+ init_Button();
16900
17000
  init_Stack();
16901
17001
  init_Typography();
16902
17002
  init_Badge();
@@ -16904,6 +17004,7 @@ var init_CalendarGrid = __esm({
16904
17004
  init_TimeSlotCell();
16905
17005
  init_useEventBus();
16906
17006
  init_useSwipeGesture();
17007
+ SHORT_DATE = { month: "short", day: "numeric" };
16907
17008
  CalendarGrid.displayName = "CalendarGrid";
16908
17009
  }
16909
17010
  });
@@ -20065,9 +20166,9 @@ var init_Tabs = __esm({
20065
20166
  className
20066
20167
  }) => {
20067
20168
  const rawItems = items ?? tabs ?? [];
20068
- const safeItems = rawItems.map((item) => ({
20069
- ...item,
20070
- id: item.id || item.value || ""
20169
+ const safeItems = rawItems.map(({ id, value, ...rest }) => ({
20170
+ ...rest,
20171
+ id: id || value || ""
20071
20172
  }));
20072
20173
  const eventBus = useEventBus();
20073
20174
  const { t } = useTranslate();
@@ -20136,7 +20237,12 @@ var init_Tabs = __esm({
20136
20237
  role: "tablist",
20137
20238
  className: cn(
20138
20239
  "flex",
20139
- orientation === "horizontal" ? "flex-row border-b-[length:var(--border-width)] border-border" : "flex-col border-r-[length:var(--border-width)] border-border",
20240
+ // Horizontal tab strip becomes a horizontally-scrollable lane
20241
+ // below its container width — phones with many tabs scroll
20242
+ // instead of clipping. `snap-x` snaps to each tab; the
20243
+ // scrollbar is hidden for a cleaner affordance (the swipe
20244
+ // gesture is the discoverability cue).
20245
+ orientation === "horizontal" ? "flex-row border-b-[length:var(--border-width)] border-border overflow-x-auto snap-x snap-mandatory [&::-webkit-scrollbar]:hidden" : "flex-col border-r-[length:var(--border-width)] border-border",
20140
20246
  variant === "pills" && "gap-1 p-1 bg-muted border-0 rounded-md",
20141
20247
  variant === "underline" && orientation === "vertical" && "border-b-0"
20142
20248
  ),
@@ -20158,7 +20264,8 @@ var init_Tabs = __esm({
20158
20264
  onKeyDown: (e) => handleKeyDown(e, index),
20159
20265
  "data-active": isActive,
20160
20266
  className: cn(
20161
- "flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all",
20267
+ "flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all whitespace-nowrap",
20268
+ orientation === "horizontal" && "snap-start shrink-0",
20162
20269
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
20163
20270
  isDisabled && "opacity-50 cursor-not-allowed",
20164
20271
  variantClasses2[variant],
@@ -20923,7 +21030,7 @@ function CraftingRecipe({
20923
21030
  className
20924
21031
  }) {
20925
21032
  const eventBus = useEventBus();
20926
- const handleCraft = React80.useCallback(() => {
21033
+ const handleCraft = React83.useCallback(() => {
20927
21034
  onCraft?.();
20928
21035
  if (craftEvent) {
20929
21036
  eventBus.emit(craftEvent, { output: output.label });
@@ -20940,7 +21047,7 @@ function CraftingRecipe({
20940
21047
  children: [
20941
21048
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
20942
21049
  const hasSufficient = ingredient.available >= ingredient.required;
20943
- return /* @__PURE__ */ jsxs(React80.Fragment, { children: [
21050
+ return /* @__PURE__ */ jsxs(React83.Fragment, { children: [
20944
21051
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
20945
21052
  ItemSlot,
20946
21053
  {
@@ -21003,8 +21110,8 @@ function DPad({
21003
21110
  }) {
21004
21111
  const eventBus = useEventBus();
21005
21112
  const sizes = sizeMap15[size];
21006
- const [activeDirections, setActiveDirections] = React80.useState(/* @__PURE__ */ new Set());
21007
- const handlePress = React80.useCallback(
21113
+ const [activeDirections, setActiveDirections] = React83.useState(/* @__PURE__ */ new Set());
21114
+ const handlePress = React83.useCallback(
21008
21115
  (direction) => {
21009
21116
  setActiveDirections((prev) => new Set(prev).add(direction));
21010
21117
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -21012,7 +21119,7 @@ function DPad({
21012
21119
  },
21013
21120
  [directionEvent, eventBus, onDirection]
21014
21121
  );
21015
- const handleRelease = React80.useCallback(
21122
+ const handleRelease = React83.useCallback(
21016
21123
  (direction) => {
21017
21124
  setActiveDirections((prev) => {
21018
21125
  const next = new Set(prev);
@@ -21539,14 +21646,14 @@ function useDataDnd(args) {
21539
21646
  const isZone = Boolean(dragGroup || accepts || sortable);
21540
21647
  const enabled = isZone || Boolean(dndRoot);
21541
21648
  const eventBus = useEventBus();
21542
- const parentRoot = React80__default.useContext(RootCtx);
21649
+ const parentRoot = React83__default.useContext(RootCtx);
21543
21650
  const isRoot = enabled && parentRoot === null;
21544
- const zoneId = React80__default.useId();
21651
+ const zoneId = React83__default.useId();
21545
21652
  const ownGroup = dragGroup ?? accepts ?? zoneId;
21546
- const [optimisticOrders, setOptimisticOrders] = React80__default.useState(() => /* @__PURE__ */ new Map());
21547
- const optimisticOrdersRef = React80__default.useRef(optimisticOrders);
21653
+ const [optimisticOrders, setOptimisticOrders] = React83__default.useState(() => /* @__PURE__ */ new Map());
21654
+ const optimisticOrdersRef = React83__default.useRef(optimisticOrders);
21548
21655
  optimisticOrdersRef.current = optimisticOrders;
21549
- const clearOptimisticOrder = React80__default.useCallback((group) => {
21656
+ const clearOptimisticOrder = React83__default.useCallback((group) => {
21550
21657
  setOptimisticOrders((prev) => {
21551
21658
  if (!prev.has(group)) return prev;
21552
21659
  const next = new Map(prev);
@@ -21571,16 +21678,15 @@ function useDataDnd(args) {
21571
21678
  const raw = it[dndItemIdField];
21572
21679
  return String(raw ?? `__idx_${idx}`);
21573
21680
  }).join("|");
21574
- const itemIds = React80__default.useMemo(
21681
+ const itemIds = React83__default.useMemo(
21575
21682
  () => orderedItems.map((it, idx) => {
21576
21683
  const raw = it[dndItemIdField];
21577
21684
  return raw ?? `__idx_${idx}`;
21578
21685
  }),
21579
- // eslint-disable-next-line react-hooks/exhaustive-deps
21580
21686
  [itemIdsSignature]
21581
21687
  );
21582
21688
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
21583
- React80__default.useEffect(() => {
21689
+ React83__default.useEffect(() => {
21584
21690
  const root = isRoot ? null : parentRoot;
21585
21691
  if (root) {
21586
21692
  root.clearOptimisticOrder(ownGroup);
@@ -21588,20 +21694,20 @@ function useDataDnd(args) {
21588
21694
  clearOptimisticOrder(ownGroup);
21589
21695
  }
21590
21696
  }, [itemsContentSig, ownGroup]);
21591
- const zonesRef = React80__default.useRef(/* @__PURE__ */ new Map());
21592
- const registerZone = React80__default.useCallback((zoneId2, meta2) => {
21697
+ const zonesRef = React83__default.useRef(/* @__PURE__ */ new Map());
21698
+ const registerZone = React83__default.useCallback((zoneId2, meta2) => {
21593
21699
  zonesRef.current.set(zoneId2, meta2);
21594
21700
  }, []);
21595
- const unregisterZone = React80__default.useCallback((zoneId2) => {
21701
+ const unregisterZone = React83__default.useCallback((zoneId2) => {
21596
21702
  zonesRef.current.delete(zoneId2);
21597
21703
  }, []);
21598
- const [activeDrag, setActiveDrag] = React80__default.useState(null);
21599
- const [overZoneGroup, setOverZoneGroup] = React80__default.useState(null);
21600
- const meta = React80__default.useMemo(
21704
+ const [activeDrag, setActiveDrag] = React83__default.useState(null);
21705
+ const [overZoneGroup, setOverZoneGroup] = React83__default.useState(null);
21706
+ const meta = React83__default.useMemo(
21601
21707
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
21602
21708
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
21603
21709
  );
21604
- React80__default.useEffect(() => {
21710
+ React83__default.useEffect(() => {
21605
21711
  const target = isRoot ? null : parentRoot;
21606
21712
  if (!target) {
21607
21713
  zonesRef.current.set(zoneId, meta);
@@ -21620,7 +21726,7 @@ function useDataDnd(args) {
21620
21726
  }, [parentRoot, isRoot, zoneId, meta]);
21621
21727
  const sensors = useAlmadarDndSensors(true);
21622
21728
  const collisionDetection = almadarDndCollisionDetection;
21623
- const findZoneByItem = React80__default.useCallback(
21729
+ const findZoneByItem = React83__default.useCallback(
21624
21730
  (id) => {
21625
21731
  for (const z of zonesRef.current.values()) {
21626
21732
  if (z.itemIds.includes(id)) return z;
@@ -21629,7 +21735,7 @@ function useDataDnd(args) {
21629
21735
  },
21630
21736
  []
21631
21737
  );
21632
- React80__default.useCallback(
21738
+ React83__default.useCallback(
21633
21739
  (group) => {
21634
21740
  for (const z of zonesRef.current.values()) {
21635
21741
  if (z.group === group) return z;
@@ -21638,7 +21744,7 @@ function useDataDnd(args) {
21638
21744
  },
21639
21745
  []
21640
21746
  );
21641
- const handleDragEnd = React80__default.useCallback(
21747
+ const handleDragEnd = React83__default.useCallback(
21642
21748
  (event) => {
21643
21749
  const { active, over } = event;
21644
21750
  const activeIdStr = String(active.id);
@@ -21729,8 +21835,8 @@ function useDataDnd(args) {
21729
21835
  },
21730
21836
  [eventBus]
21731
21837
  );
21732
- const sortableData = React80__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
21733
- const SortableItem = React80__default.useCallback(
21838
+ const sortableData = React83__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
21839
+ const SortableItem = React83__default.useCallback(
21734
21840
  ({ id, children }) => {
21735
21841
  const {
21736
21842
  attributes,
@@ -21770,7 +21876,7 @@ function useDataDnd(args) {
21770
21876
  id: droppableId,
21771
21877
  data: sortableData
21772
21878
  });
21773
- const ctx = React80__default.useContext(RootCtx);
21879
+ const ctx = React83__default.useContext(RootCtx);
21774
21880
  const activeDrag2 = ctx?.activeDrag ?? null;
21775
21881
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
21776
21882
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -21785,7 +21891,7 @@ function useDataDnd(args) {
21785
21891
  showForeignPlaceholder,
21786
21892
  ctxAvailable: ctx != null
21787
21893
  });
21788
- React80__default.useEffect(() => {
21894
+ React83__default.useEffect(() => {
21789
21895
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
21790
21896
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
21791
21897
  return /* @__PURE__ */ jsx(
@@ -21799,11 +21905,11 @@ function useDataDnd(args) {
21799
21905
  }
21800
21906
  );
21801
21907
  };
21802
- const rootContextValue = React80__default.useMemo(
21908
+ const rootContextValue = React83__default.useMemo(
21803
21909
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
21804
21910
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
21805
21911
  );
21806
- const handleDragStart = React80__default.useCallback((event) => {
21912
+ const handleDragStart = React83__default.useCallback((event) => {
21807
21913
  const sourceZone = findZoneByItem(event.active.id);
21808
21914
  const rect = event.active.rect.current.initial;
21809
21915
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -21822,7 +21928,7 @@ function useDataDnd(args) {
21822
21928
  isRoot
21823
21929
  });
21824
21930
  }, [findZoneByItem, isRoot, zoneId]);
21825
- const handleDragOver = React80__default.useCallback((event) => {
21931
+ const handleDragOver = React83__default.useCallback((event) => {
21826
21932
  const { active, over } = event;
21827
21933
  const overData = over?.data?.current;
21828
21934
  const overGroup = overData?.dndGroup ?? null;
@@ -21892,7 +21998,7 @@ function useDataDnd(args) {
21892
21998
  return next;
21893
21999
  });
21894
22000
  }, []);
21895
- const handleDragCancel = React80__default.useCallback((event) => {
22001
+ const handleDragCancel = React83__default.useCallback((event) => {
21896
22002
  setActiveDrag(null);
21897
22003
  setOverZoneGroup(null);
21898
22004
  dndLog.warn("dragCancel", {
@@ -21900,12 +22006,12 @@ function useDataDnd(args) {
21900
22006
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
21901
22007
  });
21902
22008
  }, []);
21903
- const handleDragEndWithCleanup = React80__default.useCallback((event) => {
22009
+ const handleDragEndWithCleanup = React83__default.useCallback((event) => {
21904
22010
  handleDragEnd(event);
21905
22011
  setActiveDrag(null);
21906
22012
  setOverZoneGroup(null);
21907
22013
  }, [handleDragEnd]);
21908
- const wrapContainer = React80__default.useCallback(
22014
+ const wrapContainer = React83__default.useCallback(
21909
22015
  (children) => {
21910
22016
  if (!enabled) return children;
21911
22017
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -21959,7 +22065,7 @@ var init_useDataDnd = __esm({
21959
22065
  init_useAlmadarDndCollision();
21960
22066
  init_Box();
21961
22067
  dndLog = createLogger("almadar:ui:dnd");
21962
- RootCtx = React80__default.createContext(null);
22068
+ RootCtx = React83__default.createContext(null);
21963
22069
  }
21964
22070
  });
21965
22071
  function fieldLabel2(key) {
@@ -22448,7 +22554,7 @@ function DataList({
22448
22554
  }) {
22449
22555
  const eventBus = useEventBus();
22450
22556
  const { t } = useTranslate();
22451
- const [visibleCount, setVisibleCount] = React80__default.useState(pageSize || Infinity);
22557
+ const [visibleCount, setVisibleCount] = React83__default.useState(pageSize || Infinity);
22452
22558
  const fieldDefs = fields ?? columns ?? [];
22453
22559
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
22454
22560
  const dnd = useDataDnd({
@@ -22467,7 +22573,7 @@ function DataList({
22467
22573
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
22468
22574
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
22469
22575
  const hasRenderProp = typeof children === "function";
22470
- React80__default.useEffect(() => {
22576
+ React83__default.useEffect(() => {
22471
22577
  const renderItemTypeOf = typeof schemaRenderItem;
22472
22578
  const childrenTypeOf = typeof children;
22473
22579
  if (data.length > 0 && !hasRenderProp) {
@@ -22524,7 +22630,7 @@ function DataList({
22524
22630
  const items2 = data.map((item) => item);
22525
22631
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
22526
22632
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
22527
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
22633
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
22528
22634
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
22529
22635
  group.items.map((itemData, index) => {
22530
22636
  const id = itemData.id || `${gi}-${index}`;
@@ -22712,7 +22818,7 @@ function DataList({
22712
22818
  className
22713
22819
  ),
22714
22820
  children: [
22715
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
22821
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
22716
22822
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
22717
22823
  group.items.map(
22718
22824
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -23106,7 +23212,16 @@ var init_FilterGroup = __esm({
23106
23212
  onClear: () => handleFilterSelect(`${filter.field}_to`, null)
23107
23213
  }
23108
23214
  )
23109
- ] }) : /* @__PURE__ */ jsx(
23215
+ ] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
23216
+ Input,
23217
+ {
23218
+ value: selectedValues[filter.field] || "",
23219
+ onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
23220
+ placeholder: filter.label,
23221
+ clearable: true,
23222
+ onClear: () => handleFilterSelect(filter.field, null)
23223
+ }
23224
+ ) : /* @__PURE__ */ jsx(
23110
23225
  Select,
23111
23226
  {
23112
23227
  value: selectedValues[filter.field] || "all",
@@ -23173,7 +23288,17 @@ var init_FilterGroup = __esm({
23173
23288
  className: "text-sm min-w-[100px]"
23174
23289
  }
23175
23290
  )
23176
- ] }) : /* @__PURE__ */ jsx(
23291
+ ] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
23292
+ Input,
23293
+ {
23294
+ value: selectedValues[filter.field] || "",
23295
+ onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
23296
+ placeholder: filter.label,
23297
+ clearable: true,
23298
+ onClear: () => handleFilterSelect(filter.field, null),
23299
+ className: "text-sm"
23300
+ }
23301
+ ) : /* @__PURE__ */ jsx(
23177
23302
  Select,
23178
23303
  {
23179
23304
  value: selectedValues[filter.field] || "all",
@@ -23278,7 +23403,17 @@ var init_FilterGroup = __esm({
23278
23403
  className: "min-w-[130px]"
23279
23404
  }
23280
23405
  )
23281
- ] }) : /* @__PURE__ */ jsx(
23406
+ ] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
23407
+ Input,
23408
+ {
23409
+ value: selectedValues[filter.field] || "",
23410
+ onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
23411
+ placeholder: filter.label,
23412
+ clearable: true,
23413
+ onClear: () => handleFilterSelect(filter.field, null),
23414
+ className: "min-w-[160px]"
23415
+ }
23416
+ ) : /* @__PURE__ */ jsx(
23282
23417
  Select,
23283
23418
  {
23284
23419
  value: selectedValues[filter.field] || "all",
@@ -23848,6 +23983,8 @@ var SidePanel;
23848
23983
  var init_SidePanel = __esm({
23849
23984
  "components/molecules/SidePanel.tsx"() {
23850
23985
  "use client";
23986
+ init_Aside();
23987
+ init_Box();
23851
23988
  init_Button();
23852
23989
  init_Typography();
23853
23990
  init_cn();
@@ -23857,7 +23994,7 @@ var init_SidePanel = __esm({
23857
23994
  children,
23858
23995
  isOpen,
23859
23996
  onClose,
23860
- width = "w-96",
23997
+ width = "w-full sm:w-96",
23861
23998
  position = "right",
23862
23999
  showOverlay = true,
23863
24000
  className,
@@ -23871,14 +24008,14 @@ var init_SidePanel = __esm({
23871
24008
  if (!isOpen) return null;
23872
24009
  return /* @__PURE__ */ jsxs(Fragment, { children: [
23873
24010
  showOverlay && /* @__PURE__ */ jsx(
23874
- "div",
24011
+ Box,
23875
24012
  {
23876
24013
  className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
23877
24014
  onClick: handleClose
23878
24015
  }
23879
24016
  ),
23880
24017
  /* @__PURE__ */ jsxs(
23881
- "aside",
24018
+ Aside,
23882
24019
  {
23883
24020
  className: cn(
23884
24021
  "fixed top-16 lg:top-0 bottom-0 z-[60]",
@@ -23892,7 +24029,7 @@ var init_SidePanel = __esm({
23892
24029
  className
23893
24030
  ),
23894
24031
  children: [
23895
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
24032
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
23896
24033
  /* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
23897
24034
  /* @__PURE__ */ jsx(
23898
24035
  Button,
@@ -23902,11 +24039,11 @@ var init_SidePanel = __esm({
23902
24039
  icon: X,
23903
24040
  onClick: handleClose,
23904
24041
  "aria-label": "Close panel",
23905
- children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
24042
+ children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
23906
24043
  }
23907
24044
  )
23908
24045
  ] }),
23909
- /* @__PURE__ */ jsx("div", { className: "p-4 flex-1 overflow-y-auto", children })
24046
+ /* @__PURE__ */ jsx(Box, { className: "p-4 flex-1 overflow-y-auto", children })
23910
24047
  ]
23911
24048
  }
23912
24049
  )
@@ -23957,7 +24094,7 @@ var init_WizardProgress = __esm({
23957
24094
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
23958
24095
  const isActive = index === currentStep;
23959
24096
  const isCompleted = index < currentStep;
23960
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
24097
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
23961
24098
  /* @__PURE__ */ jsx(
23962
24099
  "button",
23963
24100
  {
@@ -24082,7 +24219,9 @@ var init_WizardNavigation = __esm({
24082
24219
  {
24083
24220
  border: true,
24084
24221
  className: cn(
24085
- "border-t-2 border-x-0 border-b-0 border-border flex justify-between items-center",
24222
+ // `flex-wrap gap-2` lets the Back / Step / Next trio reflow on
24223
+ // narrow viewports rather than crushing the step counter.
24224
+ "border-t-2 border-x-0 border-b-0 border-border flex flex-wrap gap-2 justify-between items-center",
24086
24225
  compact ? "px-4 py-2" : "px-6 py-4",
24087
24226
  className
24088
24227
  ),
@@ -25013,7 +25152,7 @@ function InventoryGrid({
25013
25152
  const eventBus = useEventBus();
25014
25153
  const slotCount = totalSlots ?? items.length;
25015
25154
  const emptySlotCount = Math.max(0, slotCount - items.length);
25016
- const handleSelect = React80.useCallback(
25155
+ const handleSelect = React83.useCallback(
25017
25156
  (id) => {
25018
25157
  onSelect?.(id);
25019
25158
  if (selectEvent) {
@@ -25226,15 +25365,15 @@ function GameCanvas2D({
25226
25365
  fps = 60,
25227
25366
  className
25228
25367
  }) {
25229
- const canvasRef = React80.useRef(null);
25230
- const rafRef = React80.useRef(0);
25231
- const frameRef = React80.useRef(0);
25232
- const lastTimeRef = React80.useRef(0);
25233
- const onDrawRef = React80.useRef(onDraw);
25368
+ const canvasRef = React83.useRef(null);
25369
+ const rafRef = React83.useRef(0);
25370
+ const frameRef = React83.useRef(0);
25371
+ const lastTimeRef = React83.useRef(0);
25372
+ const onDrawRef = React83.useRef(onDraw);
25234
25373
  onDrawRef.current = onDraw;
25235
- const onTickRef = React80.useRef(onTick);
25374
+ const onTickRef = React83.useRef(onTick);
25236
25375
  onTickRef.current = onTick;
25237
- React80.useEffect(() => {
25376
+ React83.useEffect(() => {
25238
25377
  const canvas = canvasRef.current;
25239
25378
  if (!canvas) return;
25240
25379
  const ctx = canvas.getContext("2d");
@@ -25523,7 +25662,7 @@ function TurnPanel({
25523
25662
  className
25524
25663
  }) {
25525
25664
  const eventBus = useEventBus();
25526
- const handleAction = React80.useCallback(
25665
+ const handleAction = React83.useCallback(
25527
25666
  (event) => {
25528
25667
  if (event) {
25529
25668
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -25669,7 +25808,7 @@ function UnitCommandBar({
25669
25808
  className
25670
25809
  }) {
25671
25810
  const eventBus = useEventBus();
25672
- const handleCommand = React80.useCallback(
25811
+ const handleCommand = React83.useCallback(
25673
25812
  (event) => {
25674
25813
  if (event) {
25675
25814
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -26154,7 +26293,7 @@ function GameMenu({
26154
26293
  } catch {
26155
26294
  }
26156
26295
  const eventBus = eventBusProp || eventBusFromHook;
26157
- const handleOptionClick = React80.useCallback(
26296
+ const handleOptionClick = React83.useCallback(
26158
26297
  (option) => {
26159
26298
  if (option.event && eventBus) {
26160
26299
  eventBus.emit(`UI:${option.event}`, { option });
@@ -26268,7 +26407,7 @@ function GameOverScreen({
26268
26407
  } catch {
26269
26408
  }
26270
26409
  const eventBus = eventBusProp || eventBusFromHook;
26271
- const handleActionClick = React80.useCallback(
26410
+ const handleActionClick = React83.useCallback(
26272
26411
  (action) => {
26273
26412
  if (action.event && eventBus) {
26274
26413
  eventBus.emit(`UI:${action.event}`, { action });
@@ -28789,7 +28928,7 @@ var init_StepFlow = __esm({
28789
28928
  className
28790
28929
  }) => {
28791
28930
  if (orientation === "vertical") {
28792
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React80__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
28931
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React83__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
28793
28932
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
28794
28933
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
28795
28934
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -28800,7 +28939,7 @@ var init_StepFlow = __esm({
28800
28939
  ] })
28801
28940
  ] }) }, index)) });
28802
28941
  }
28803
- return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
28942
+ return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
28804
28943
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
28805
28944
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
28806
28945
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -28868,9 +29007,9 @@ var init_SplitSection = __esm({
28868
29007
  className
28869
29008
  ),
28870
29009
  padding: "lg",
28871
- children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col lg:flex-row gap-10 lg:gap-16 items-center", isImageLeft && "lg:flex-row-reverse"), children: [
28872
- /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 lg:min-w-[45%]", children: textContent }),
28873
- /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 lg:max-w-[50%]", children: mediaContent })
29010
+ children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col md:flex-row gap-8 md:gap-12 lg:gap-16 items-center", isImageLeft && "md:flex-row-reverse"), children: [
29011
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:min-w-[45%]", children: textContent }),
29012
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:max-w-[50%]", children: mediaContent })
28874
29013
  ] })
28875
29014
  }
28876
29015
  );
@@ -29682,7 +29821,7 @@ var init_LikertScale = __esm({
29682
29821
  md: "text-base",
29683
29822
  lg: "text-lg"
29684
29823
  };
29685
- LikertScale = React80__default.forwardRef(
29824
+ LikertScale = React83__default.forwardRef(
29686
29825
  ({
29687
29826
  question,
29688
29827
  options = DEFAULT_LIKERT_OPTIONS,
@@ -29694,7 +29833,7 @@ var init_LikertScale = __esm({
29694
29833
  variant = "radios",
29695
29834
  className
29696
29835
  }, ref) => {
29697
- const groupId = React80__default.useId();
29836
+ const groupId = React83__default.useId();
29698
29837
  const eventBus = useEventBus();
29699
29838
  const handleSelect = useCallback(
29700
29839
  (next) => {
@@ -31698,7 +31837,7 @@ var init_VersionDiff = __esm({
31698
31837
  /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
31699
31838
  /* @__PURE__ */ jsx(Icon, { icon: GitCommit, size: "sm", className: "text-muted-foreground" }),
31700
31839
  /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
31701
- /* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
31840
+ /* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
31702
31841
  Select,
31703
31842
  {
31704
31843
  options,
@@ -31708,7 +31847,7 @@ var init_VersionDiff = __esm({
31708
31847
  }
31709
31848
  ) }),
31710
31849
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
31711
- /* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
31850
+ /* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
31712
31851
  Select,
31713
31852
  {
31714
31853
  options,
@@ -31773,8 +31912,8 @@ var init_VersionDiff = __esm({
31773
31912
  ]
31774
31913
  }
31775
31914
  ),
31776
- /* @__PURE__ */ jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight: 600 }, children: activeView === "side-by-side" ? /* @__PURE__ */ jsxs(Box, { className: "grid grid-cols-2", children: [
31777
- /* @__PURE__ */ jsx(Box, { className: "border-r border-border", children: /* @__PURE__ */ jsx(VStack, { gap: "none", className: "font-mono text-xs", children: beforeLines.map((line, idx) => {
31915
+ /* @__PURE__ */ jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight: 600 }, children: activeView === "side-by-side" ? /* @__PURE__ */ jsxs(Box, { className: "grid grid-cols-1 md:grid-cols-2", children: [
31916
+ /* @__PURE__ */ jsx(Box, { className: "border-b md:border-b-0 md:border-r border-border", children: /* @__PURE__ */ jsx(VStack, { gap: "none", className: "font-mono text-xs", children: beforeLines.map((line, idx) => {
31778
31917
  const isRemoved = line.type === "removed";
31779
31918
  return /* @__PURE__ */ jsxs(
31780
31919
  HStack,
@@ -31920,7 +32059,7 @@ var init_DocBreadcrumb = __esm({
31920
32059
  "aria-label": "Breadcrumb",
31921
32060
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
31922
32061
  const isLast = idx === items.length - 1;
31923
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
32062
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
31924
32063
  idx > 0 && /* @__PURE__ */ jsx(
31925
32064
  Icon,
31926
32065
  {
@@ -32810,7 +32949,7 @@ var init_MiniStateMachine = __esm({
32810
32949
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
32811
32950
  const tc = transitionCounts[s.name] ?? 0;
32812
32951
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
32813
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
32952
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
32814
32953
  /* @__PURE__ */ jsx(
32815
32954
  AvlState,
32816
32955
  {
@@ -34187,7 +34326,7 @@ var init_DocumentViewer = __esm({
34187
34326
  }
34188
34327
  });
34189
34328
  function extractTitle(children) {
34190
- if (!React80__default.isValidElement(children)) return void 0;
34329
+ if (!React83__default.isValidElement(children)) return void 0;
34191
34330
  const props = children.props;
34192
34331
  if (typeof props.title === "string") {
34193
34332
  return props.title;
@@ -34242,7 +34381,7 @@ function LinearView({
34242
34381
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
34243
34382
  const isDone = i < currentIdx;
34244
34383
  const isCurrent = i === currentIdx;
34245
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
34384
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
34246
34385
  i > 0 && /* @__PURE__ */ jsx(
34247
34386
  Typography,
34248
34387
  {
@@ -35143,12 +35282,12 @@ var init_Form = __esm({
35143
35282
  const isSchemaEntity = isOrbitalEntitySchema(entity);
35144
35283
  const resolvedEntity = isSchemaEntity ? entity : void 0;
35145
35284
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
35146
- const normalizedInitialData = React80__default.useMemo(() => {
35285
+ const normalizedInitialData = React83__default.useMemo(() => {
35147
35286
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
35148
35287
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
35149
35288
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
35150
35289
  }, [entity, initialData]);
35151
- const entityDerivedFields = React80__default.useMemo(() => {
35290
+ const entityDerivedFields = React83__default.useMemo(() => {
35152
35291
  if (fields && fields.length > 0) return void 0;
35153
35292
  if (!resolvedEntity) return void 0;
35154
35293
  return resolvedEntity.fields.map(
@@ -35167,16 +35306,16 @@ var init_Form = __esm({
35167
35306
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
35168
35307
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
35169
35308
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
35170
- const [formData, setFormData] = React80__default.useState(
35309
+ const [formData, setFormData] = React83__default.useState(
35171
35310
  normalizedInitialData
35172
35311
  );
35173
- const [collapsedSections, setCollapsedSections] = React80__default.useState(
35312
+ const [collapsedSections, setCollapsedSections] = React83__default.useState(
35174
35313
  /* @__PURE__ */ new Set()
35175
35314
  );
35176
- const [submitError, setSubmitError] = React80__default.useState(null);
35177
- const formRef = React80__default.useRef(null);
35315
+ const [submitError, setSubmitError] = React83__default.useState(null);
35316
+ const formRef = React83__default.useRef(null);
35178
35317
  const formMode = props.mode;
35179
- const mountedRef = React80__default.useRef(false);
35318
+ const mountedRef = React83__default.useRef(false);
35180
35319
  if (!mountedRef.current) {
35181
35320
  mountedRef.current = true;
35182
35321
  debug("forms", "mount", {
@@ -35189,7 +35328,7 @@ var init_Form = __esm({
35189
35328
  });
35190
35329
  }
35191
35330
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
35192
- const evalContext = React80__default.useMemo(
35331
+ const evalContext = React83__default.useMemo(
35193
35332
  () => ({
35194
35333
  formValues: formData,
35195
35334
  globalVariables: externalContext?.globalVariables ?? {},
@@ -35198,7 +35337,7 @@ var init_Form = __esm({
35198
35337
  }),
35199
35338
  [formData, externalContext]
35200
35339
  );
35201
- React80__default.useEffect(() => {
35340
+ React83__default.useEffect(() => {
35202
35341
  debug("forms", "initialData-sync", {
35203
35342
  mode: formMode,
35204
35343
  normalizedInitialData,
@@ -35209,7 +35348,7 @@ var init_Form = __esm({
35209
35348
  setFormData(normalizedInitialData);
35210
35349
  }
35211
35350
  }, [normalizedInitialData]);
35212
- const processCalculations = React80__default.useCallback(
35351
+ const processCalculations = React83__default.useCallback(
35213
35352
  (changedFieldId, newFormData) => {
35214
35353
  if (!hiddenCalculations.length) return;
35215
35354
  const context = {
@@ -35234,7 +35373,7 @@ var init_Form = __esm({
35234
35373
  },
35235
35374
  [hiddenCalculations, externalContext, eventBus]
35236
35375
  );
35237
- const checkViolations = React80__default.useCallback(
35376
+ const checkViolations = React83__default.useCallback(
35238
35377
  (changedFieldId, newFormData) => {
35239
35378
  if (!violationTriggers.length) return;
35240
35379
  const context = {
@@ -35272,7 +35411,7 @@ var init_Form = __esm({
35272
35411
  processCalculations(name, newFormData);
35273
35412
  checkViolations(name, newFormData);
35274
35413
  };
35275
- const isFieldVisible = React80__default.useCallback(
35414
+ const isFieldVisible = React83__default.useCallback(
35276
35415
  (fieldName) => {
35277
35416
  const condition = conditionalFields[fieldName];
35278
35417
  if (!condition) return true;
@@ -35280,7 +35419,7 @@ var init_Form = __esm({
35280
35419
  },
35281
35420
  [conditionalFields, evalContext]
35282
35421
  );
35283
- const isSectionVisible = React80__default.useCallback(
35422
+ const isSectionVisible = React83__default.useCallback(
35284
35423
  (section) => {
35285
35424
  if (!section.condition) return true;
35286
35425
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -35356,7 +35495,7 @@ var init_Form = __esm({
35356
35495
  eventBus.emit(`UI:${onCancel}`);
35357
35496
  }
35358
35497
  };
35359
- const renderField = React80__default.useCallback(
35498
+ const renderField = React83__default.useCallback(
35360
35499
  (field) => {
35361
35500
  const fieldName = field.name || field.field;
35362
35501
  if (!fieldName) return null;
@@ -35377,7 +35516,7 @@ var init_Form = __esm({
35377
35516
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
35378
35517
  );
35379
35518
  const effectiveFields = entityDerivedFields ?? fields;
35380
- const normalizedFields = React80__default.useMemo(() => {
35519
+ const normalizedFields = React83__default.useMemo(() => {
35381
35520
  if (!effectiveFields || effectiveFields.length === 0) return [];
35382
35521
  return effectiveFields.map((field) => {
35383
35522
  if (typeof field === "string") {
@@ -35399,7 +35538,7 @@ var init_Form = __esm({
35399
35538
  return field;
35400
35539
  });
35401
35540
  }, [effectiveFields, resolvedEntity]);
35402
- const schemaFields = React80__default.useMemo(() => {
35541
+ const schemaFields = React83__default.useMemo(() => {
35403
35542
  if (normalizedFields.length === 0) return null;
35404
35543
  if (isDebugEnabled()) {
35405
35544
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -35409,7 +35548,7 @@ var init_Form = __esm({
35409
35548
  }
35410
35549
  return normalizedFields.map(renderField).filter(Boolean);
35411
35550
  }, [normalizedFields, renderField, entityName, conditionalFields]);
35412
- const sectionElements = React80__default.useMemo(() => {
35551
+ const sectionElements = React83__default.useMemo(() => {
35413
35552
  if (!sections || sections.length === 0) return null;
35414
35553
  return sections.map((section) => {
35415
35554
  if (!isSectionVisible(section)) {
@@ -37135,7 +37274,7 @@ var init_List = __esm({
37135
37274
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
37136
37275
  return [];
37137
37276
  }, [entity]);
37138
- const getItemActions = React80__default.useCallback(
37277
+ const getItemActions = React83__default.useCallback(
37139
37278
  (item) => {
37140
37279
  if (!itemActions) return [];
37141
37280
  if (typeof itemActions === "function") {
@@ -37608,7 +37747,7 @@ var init_MediaGallery = __esm({
37608
37747
  [selectable, selectedItems, selectionEvent, eventBus]
37609
37748
  );
37610
37749
  const entityData = Array.isArray(entity) ? entity : [];
37611
- const items = React80__default.useMemo(() => {
37750
+ const items = React83__default.useMemo(() => {
37612
37751
  if (propItems) return propItems;
37613
37752
  if (entityData.length === 0) return [];
37614
37753
  return entityData.map((record, idx) => ({
@@ -37772,7 +37911,7 @@ var init_MediaGallery = __esm({
37772
37911
  }
37773
37912
  });
37774
37913
  function extractTitle2(children) {
37775
- if (!React80__default.isValidElement(children)) return void 0;
37914
+ if (!React83__default.isValidElement(children)) return void 0;
37776
37915
  const props = children.props;
37777
37916
  if (typeof props.title === "string") {
37778
37917
  return props.title;
@@ -38485,7 +38624,7 @@ var init_PageHeader = __esm({
38485
38624
  info: "bg-info/10 text-info"
38486
38625
  };
38487
38626
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
38488
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
38627
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
38489
38628
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
38490
38629
  crumb.href ? /* @__PURE__ */ jsx(
38491
38630
  "a",
@@ -38800,7 +38939,7 @@ var init_debugRegistry = __esm({
38800
38939
  }
38801
38940
  });
38802
38941
  function useDebugData() {
38803
- const [data, setData] = React80.useState(() => ({
38942
+ const [data, setData] = React83.useState(() => ({
38804
38943
  traits: [],
38805
38944
  ticks: [],
38806
38945
  guards: [],
@@ -38814,7 +38953,7 @@ function useDebugData() {
38814
38953
  },
38815
38954
  lastUpdate: Date.now()
38816
38955
  }));
38817
- React80.useEffect(() => {
38956
+ React83.useEffect(() => {
38818
38957
  const updateData = () => {
38819
38958
  setData({
38820
38959
  traits: getAllTraits(),
@@ -38923,12 +39062,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
38923
39062
  return positions;
38924
39063
  }
38925
39064
  function WalkMinimap() {
38926
- const [walkStep, setWalkStep] = React80.useState(null);
38927
- const [traits2, setTraits] = React80.useState([]);
38928
- const [coveredEdges, setCoveredEdges] = React80.useState([]);
38929
- const [completedTraits, setCompletedTraits] = React80.useState(/* @__PURE__ */ new Set());
38930
- const prevTraitRef = React80.useRef(null);
38931
- React80.useEffect(() => {
39065
+ const [walkStep, setWalkStep] = React83.useState(null);
39066
+ const [traits2, setTraits] = React83.useState([]);
39067
+ const [coveredEdges, setCoveredEdges] = React83.useState([]);
39068
+ const [completedTraits, setCompletedTraits] = React83.useState(/* @__PURE__ */ new Set());
39069
+ const prevTraitRef = React83.useRef(null);
39070
+ React83.useEffect(() => {
38932
39071
  const interval = setInterval(() => {
38933
39072
  const w = window;
38934
39073
  const step = w.__orbitalWalkStep;
@@ -39375,15 +39514,15 @@ var init_EntitiesTab = __esm({
39375
39514
  }
39376
39515
  });
39377
39516
  function EventFlowTab({ events: events2 }) {
39378
- const [filter, setFilter] = React80.useState("all");
39379
- const containerRef = React80.useRef(null);
39380
- const [autoScroll, setAutoScroll] = React80.useState(true);
39381
- React80.useEffect(() => {
39517
+ const [filter, setFilter] = React83.useState("all");
39518
+ const containerRef = React83.useRef(null);
39519
+ const [autoScroll, setAutoScroll] = React83.useState(true);
39520
+ React83.useEffect(() => {
39382
39521
  if (autoScroll && containerRef.current) {
39383
39522
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
39384
39523
  }
39385
39524
  }, [events2.length, autoScroll]);
39386
- const filteredEvents = React80.useMemo(() => {
39525
+ const filteredEvents = React83.useMemo(() => {
39387
39526
  if (filter === "all") return events2;
39388
39527
  return events2.filter((e) => e.type === filter);
39389
39528
  }, [events2, filter]);
@@ -39502,7 +39641,7 @@ var init_EventFlowTab = __esm({
39502
39641
  }
39503
39642
  });
39504
39643
  function GuardsPanel({ guards }) {
39505
- const [filter, setFilter] = React80.useState("all");
39644
+ const [filter, setFilter] = React83.useState("all");
39506
39645
  if (guards.length === 0) {
39507
39646
  return /* @__PURE__ */ jsx(
39508
39647
  EmptyState,
@@ -39515,7 +39654,7 @@ function GuardsPanel({ guards }) {
39515
39654
  }
39516
39655
  const passedCount = guards.filter((g) => g.result).length;
39517
39656
  const failedCount = guards.length - passedCount;
39518
- const filteredGuards = React80.useMemo(() => {
39657
+ const filteredGuards = React83.useMemo(() => {
39519
39658
  if (filter === "all") return guards;
39520
39659
  if (filter === "passed") return guards.filter((g) => g.result);
39521
39660
  return guards.filter((g) => !g.result);
@@ -39676,10 +39815,10 @@ function EffectBadge({ effect }) {
39676
39815
  ] });
39677
39816
  }
39678
39817
  function TransitionTimeline({ transitions }) {
39679
- const containerRef = React80.useRef(null);
39680
- const [autoScroll, setAutoScroll] = React80.useState(true);
39681
- const [expandedId, setExpandedId] = React80.useState(null);
39682
- React80.useEffect(() => {
39818
+ const containerRef = React83.useRef(null);
39819
+ const [autoScroll, setAutoScroll] = React83.useState(true);
39820
+ const [expandedId, setExpandedId] = React83.useState(null);
39821
+ React83.useEffect(() => {
39683
39822
  if (autoScroll && containerRef.current) {
39684
39823
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
39685
39824
  }
@@ -39965,9 +40104,9 @@ function getAllEvents(traits2) {
39965
40104
  }
39966
40105
  function EventDispatcherTab({ traits: traits2, schema }) {
39967
40106
  const eventBus = useEventBus();
39968
- const [log12, setLog] = React80.useState([]);
39969
- const prevStatesRef = React80.useRef(/* @__PURE__ */ new Map());
39970
- React80.useEffect(() => {
40107
+ const [log12, setLog] = React83.useState([]);
40108
+ const prevStatesRef = React83.useRef(/* @__PURE__ */ new Map());
40109
+ React83.useEffect(() => {
39971
40110
  for (const trait of traits2) {
39972
40111
  const prev = prevStatesRef.current.get(trait.id);
39973
40112
  if (prev && prev !== trait.currentState) {
@@ -40137,10 +40276,10 @@ function VerifyModePanel({
40137
40276
  serverCount,
40138
40277
  localCount
40139
40278
  }) {
40140
- const [expanded, setExpanded] = React80.useState(true);
40141
- const scrollRef = React80.useRef(null);
40142
- const prevCountRef = React80.useRef(0);
40143
- React80.useEffect(() => {
40279
+ const [expanded, setExpanded] = React83.useState(true);
40280
+ const scrollRef = React83.useRef(null);
40281
+ const prevCountRef = React83.useRef(0);
40282
+ React83.useEffect(() => {
40144
40283
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
40145
40284
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
40146
40285
  }
@@ -40206,10 +40345,10 @@ function RuntimeDebugger({
40206
40345
  defaultTab,
40207
40346
  schema
40208
40347
  }) {
40209
- const [isCollapsed, setIsCollapsed] = React80.useState(mode === "verify" ? true : defaultCollapsed);
40210
- const [isVisible, setIsVisible] = React80.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
40348
+ const [isCollapsed, setIsCollapsed] = React83.useState(mode === "verify" ? true : defaultCollapsed);
40349
+ const [isVisible, setIsVisible] = React83.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
40211
40350
  const debugData = useDebugData();
40212
- React80.useEffect(() => {
40351
+ React83.useEffect(() => {
40213
40352
  if (mode === "inline") return;
40214
40353
  return onDebugToggle((enabled) => {
40215
40354
  setIsVisible(enabled);
@@ -40218,7 +40357,7 @@ function RuntimeDebugger({
40218
40357
  }
40219
40358
  });
40220
40359
  }, [mode]);
40221
- React80.useEffect(() => {
40360
+ React83.useEffect(() => {
40222
40361
  if (mode === "inline") return;
40223
40362
  const handleKeyDown = (e) => {
40224
40363
  if (e.key === "`" && isVisible) {
@@ -40767,7 +40906,7 @@ function SequenceBar({
40767
40906
  onSlotRemove(index);
40768
40907
  }, [onSlotRemove, playing]);
40769
40908
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
40770
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
40909
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
40771
40910
  i > 0 && /* @__PURE__ */ jsx(
40772
40911
  Typography,
40773
40912
  {
@@ -42169,7 +42308,7 @@ var init_StatCard = __esm({
42169
42308
  const labelToUse = propLabel ?? propTitle;
42170
42309
  const eventBus = useEventBus();
42171
42310
  const { t } = useTranslate();
42172
- const handleActionClick = React80__default.useCallback(() => {
42311
+ const handleActionClick = React83__default.useCallback(() => {
42173
42312
  if (action?.event) {
42174
42313
  eventBus.emit(`UI:${action.event}`, {});
42175
42314
  }
@@ -42180,7 +42319,7 @@ var init_StatCard = __esm({
42180
42319
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
42181
42320
  const isLoading = externalLoading ?? false;
42182
42321
  const error = externalError;
42183
- const computeMetricValue = React80__default.useCallback(
42322
+ const computeMetricValue = React83__default.useCallback(
42184
42323
  (metric, items) => {
42185
42324
  if (metric.value !== void 0) {
42186
42325
  return metric.value;
@@ -42219,7 +42358,7 @@ var init_StatCard = __esm({
42219
42358
  },
42220
42359
  []
42221
42360
  );
42222
- const schemaStats = React80__default.useMemo(() => {
42361
+ const schemaStats = React83__default.useMemo(() => {
42223
42362
  if (!metrics || metrics.length === 0) return null;
42224
42363
  return metrics.map((metric) => ({
42225
42364
  label: metric.label,
@@ -42227,7 +42366,7 @@ var init_StatCard = __esm({
42227
42366
  format: metric.format
42228
42367
  }));
42229
42368
  }, [metrics, data, computeMetricValue]);
42230
- const calculatedTrend = React80__default.useMemo(() => {
42369
+ const calculatedTrend = React83__default.useMemo(() => {
42231
42370
  if (manualTrend !== void 0) return manualTrend;
42232
42371
  if (previousValue === void 0 || currentValue === void 0)
42233
42372
  return void 0;
@@ -43338,7 +43477,7 @@ var init_Timeline = __esm({
43338
43477
  }) => {
43339
43478
  const { t } = useTranslate();
43340
43479
  const entityData = Array.isArray(entity) ? entity : [];
43341
- const items = React80__default.useMemo(() => {
43480
+ const items = React83__default.useMemo(() => {
43342
43481
  if (propItems) return propItems;
43343
43482
  if (entityData.length === 0) return [];
43344
43483
  return entityData.map((record, idx) => {
@@ -43445,7 +43584,7 @@ var init_Timeline = __esm({
43445
43584
  }
43446
43585
  });
43447
43586
  function extractToastProps(children) {
43448
- if (!React80__default.isValidElement(children)) {
43587
+ if (!React83__default.isValidElement(children)) {
43449
43588
  if (typeof children === "string") {
43450
43589
  return { message: children };
43451
43590
  }
@@ -43483,7 +43622,7 @@ var init_ToastSlot = __esm({
43483
43622
  eventBus.emit("UI:CLOSE");
43484
43623
  };
43485
43624
  if (!isVisible) return null;
43486
- const isCustomContent = React80__default.isValidElement(children) && !message;
43625
+ const isCustomContent = React83__default.isValidElement(children) && !message;
43487
43626
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
43488
43627
  Toast,
43489
43628
  {
@@ -43752,7 +43891,7 @@ var init_WizardContainer = __esm({
43752
43891
  const isCompleted = index < currentStep;
43753
43892
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
43754
43893
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
43755
- return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
43894
+ return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
43756
43895
  /* @__PURE__ */ jsx(
43757
43896
  Button,
43758
43897
  {
@@ -44134,12 +44273,12 @@ var init_WorldMapTemplate = __esm({
44134
44273
  }
44135
44274
  });
44136
44275
  function lazyThree(name, loader) {
44137
- const Lazy = React80__default.lazy(() => loader().then((m) => ({ default: m[name] })));
44276
+ const Lazy = React83__default.lazy(() => loader().then((m) => ({ default: m[name] })));
44138
44277
  function ThreeWrapper(props) {
44139
- return React80__default.createElement(
44140
- React80__default.Suspense,
44278
+ return React83__default.createElement(
44279
+ React83__default.Suspense,
44141
44280
  { fallback: null },
44142
- React80__default.createElement(Lazy, props)
44281
+ React83__default.createElement(Lazy, props)
44143
44282
  );
44144
44283
  }
44145
44284
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -44158,6 +44297,7 @@ var init_component_registry_generated = __esm({
44158
44297
  init_AnimatedGraphic();
44159
44298
  init_AnimatedReveal();
44160
44299
  init_ArticleSection();
44300
+ init_Aside();
44161
44301
  init_AuthLayout();
44162
44302
  init_BattleBoard();
44163
44303
  init_BattleTemplate();
@@ -44212,6 +44352,7 @@ var init_component_registry_generated = __esm({
44212
44352
  init_DayCell();
44213
44353
  init_DebuggerBoard();
44214
44354
  init_DetailPanel();
44355
+ init_Dialog();
44215
44356
  init_DialogueBox();
44216
44357
  init_DialogueBubble();
44217
44358
  init_DocBreadcrumb();
@@ -44425,6 +44566,7 @@ var init_component_registry_generated = __esm({
44425
44566
  "AnimatedGraphic": AnimatedGraphic,
44426
44567
  "AnimatedReveal": AnimatedReveal,
44427
44568
  "ArticleSection": ArticleSection,
44569
+ "Aside": Aside,
44428
44570
  "AuthLayout": AuthLayout,
44429
44571
  "Avatar": AvatarPattern,
44430
44572
  "AvatarPattern": AvatarPattern,
@@ -44494,6 +44636,7 @@ var init_component_registry_generated = __esm({
44494
44636
  "DayCell": DayCell,
44495
44637
  "DebuggerBoard": DebuggerBoard,
44496
44638
  "DetailPanel": DetailPanel,
44639
+ "Dialog": Dialog,
44497
44640
  "DialogueBox": DialogueBox,
44498
44641
  "DialogueBubble": DialogueBubble,
44499
44642
  "Divider": DividerPattern,
@@ -44747,7 +44890,7 @@ function SuspenseConfigProvider({
44747
44890
  config,
44748
44891
  children
44749
44892
  }) {
44750
- return React80__default.createElement(
44893
+ return React83__default.createElement(
44751
44894
  SuspenseConfigContext.Provider,
44752
44895
  { value: config },
44753
44896
  children
@@ -45230,7 +45373,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
45230
45373
  const key = `${parentId}-${index}-trait:${traitName}`;
45231
45374
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
45232
45375
  }
45233
- return /* @__PURE__ */ jsx(React80__default.Fragment, { children: child }, `${parentId}-${index}`);
45376
+ return /* @__PURE__ */ jsx(React83__default.Fragment, { children: child }, `${parentId}-${index}`);
45234
45377
  }
45235
45378
  if (!child || typeof child !== "object") return null;
45236
45379
  const childId = `${parentId}-${index}`;
@@ -45267,14 +45410,14 @@ function isPatternConfig(value) {
45267
45410
  if (value === null || value === void 0) return false;
45268
45411
  if (typeof value !== "object") return false;
45269
45412
  if (Array.isArray(value)) return false;
45270
- if (React80__default.isValidElement(value)) return false;
45413
+ if (React83__default.isValidElement(value)) return false;
45271
45414
  if (value instanceof Date) return false;
45272
45415
  if (typeof value === "function") return false;
45273
45416
  const record = value;
45274
45417
  return "type" in record && typeof record.type === "string";
45275
45418
  }
45276
45419
  function isPlainConfigObject(value) {
45277
- if (React80__default.isValidElement(value)) return false;
45420
+ if (React83__default.isValidElement(value)) return false;
45278
45421
  if (value instanceof Date) return false;
45279
45422
  const proto = Object.getPrototypeOf(value);
45280
45423
  return proto === Object.prototype || proto === null;
@@ -45635,7 +45778,7 @@ function resolveLambdaBindings(body, argName, arg) {
45635
45778
  if (Array.isArray(body)) {
45636
45779
  return body.map((b) => resolveLambdaBindings(b, argName, arg));
45637
45780
  }
45638
- if (body !== null && typeof body === "object" && !React80__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
45781
+ if (body !== null && typeof body === "object" && !React83__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
45639
45782
  const out = {};
45640
45783
  for (const [k, v] of Object.entries(body)) {
45641
45784
  out[k] = resolveLambdaBindings(v, argName, arg);
@@ -45654,7 +45797,7 @@ function getSlotContentRenderer2() {
45654
45797
  function makeLambdaFn(argName, lambdaBody, callerKey) {
45655
45798
  return (item, index) => {
45656
45799
  const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
45657
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React80__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
45800
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React83__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
45658
45801
  return null;
45659
45802
  }
45660
45803
  const record = resolvedBody;
@@ -45672,7 +45815,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
45672
45815
  props: childProps,
45673
45816
  priority: 0
45674
45817
  };
45675
- return React80__default.createElement(SlotContentRenderer2, { content: childContent });
45818
+ return React83__default.createElement(SlotContentRenderer2, { content: childContent });
45676
45819
  };
45677
45820
  }
45678
45821
  function convertNode(node, callerKey) {
@@ -45691,7 +45834,7 @@ function convertNode(node, callerKey) {
45691
45834
  });
45692
45835
  return anyChanged ? mapped : node;
45693
45836
  }
45694
- if (typeof node === "object" && !React80__default.isValidElement(node) && !(node instanceof Date)) {
45837
+ if (typeof node === "object" && !React83__default.isValidElement(node) && !(node instanceof Date)) {
45695
45838
  return convertObjectProps(node);
45696
45839
  }
45697
45840
  return node;