@almadar/ui 4.51.16 → 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.
- package/dist/avl/index.cjs +1940 -1802
- package/dist/avl/index.js +694 -556
- package/dist/components/atoms/Aside.d.ts +15 -0
- package/dist/components/atoms/Dialog.d.ts +18 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/index.cjs +1523 -1406
- package/dist/components/index.js +500 -383
- package/dist/components/molecules/CalendarGrid.d.ts +14 -1
- package/dist/components/molecules/SidePanel.d.ts +7 -2
- package/dist/components/molecules/Tabs.d.ts +10 -2
- package/dist/components/molecules/avl/avl-preview-types.d.ts +24 -3
- package/dist/components/organisms/game/three/index.cjs +175 -185
- package/dist/components/organisms/game/three/index.js +12 -22
- package/dist/docs/index.cjs +7 -17
- package/dist/docs/index.js +8 -18
- package/dist/marketing/index.cjs +22 -27
- package/dist/marketing/index.js +23 -28
- package/dist/providers/index.cjs +1619 -1504
- package/dist/providers/index.js +728 -613
- package/dist/runtime/index.cjs +1658 -1543
- package/dist/runtime/index.js +732 -617
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
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 =
|
|
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
|
-
|
|
1025
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 ?
|
|
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
|
-
|
|
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
|
-
|
|
1539
|
+
Dialog,
|
|
1378
1540
|
{
|
|
1379
1541
|
ref: modalRef,
|
|
1380
|
-
|
|
1381
|
-
border: true,
|
|
1382
|
-
shadow: "lg",
|
|
1383
|
-
rounded: "md",
|
|
1542
|
+
open: true,
|
|
1384
1543
|
className: cn(
|
|
1385
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
1602
|
+
Button,
|
|
1443
1603
|
{
|
|
1444
|
-
|
|
1604
|
+
variant: "ghost",
|
|
1605
|
+
size: "sm",
|
|
1606
|
+
icon: X,
|
|
1445
1607
|
onClick: handleClose,
|
|
1446
1608
|
"data-event": "CLOSE",
|
|
1447
|
-
|
|
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(
|
|
1615
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
1459
1616
|
footer && /* @__PURE__ */ jsx(
|
|
1460
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1759
|
+
Button,
|
|
1605
1760
|
{
|
|
1606
|
-
|
|
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
|
-
|
|
1766
|
+
className: cn(!title && "ml-auto")
|
|
1615
1767
|
}
|
|
1616
1768
|
)
|
|
1617
1769
|
]
|
|
1618
1770
|
}
|
|
1619
1771
|
),
|
|
1620
|
-
/* @__PURE__ */ jsx(
|
|
1772
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
1621
1773
|
footer && /* @__PURE__ */ jsx(
|
|
1622
|
-
|
|
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 =
|
|
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
|
-
|
|
1948
|
+
Box,
|
|
1943
1949
|
{
|
|
1944
1950
|
className: cn(
|
|
1945
|
-
|
|
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(
|
|
1952
|
-
/* @__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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
1977
|
+
Button,
|
|
1969
1978
|
{
|
|
1970
|
-
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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] =
|
|
3973
|
+
const [isChecked, setIsChecked] = React83.useState(
|
|
3968
3974
|
checked !== void 0 ? checked : defaultChecked
|
|
3969
3975
|
);
|
|
3970
|
-
|
|
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] =
|
|
4517
|
-
const timeoutRef =
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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] =
|
|
6332
|
-
const [isAnimating, setIsAnimating] =
|
|
6333
|
-
|
|
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] =
|
|
6419
|
+
const [isPressed, setIsPressed] = React83.useState(false);
|
|
6404
6420
|
const actualPressed = pressed ?? isPressed;
|
|
6405
|
-
const handlePointerDown =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
7332
|
-
const frameRef =
|
|
7333
|
-
|
|
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
|
|
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
|
|
8163
|
-
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
8164
|
-
5: "grid-cols-1 sm:grid-cols-2
|
|
8165
|
-
6: "grid-cols-1 sm:grid-cols-2
|
|
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(
|
|
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
|
-
|
|
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 =
|
|
8572
|
-
const trigger =
|
|
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 =
|
|
8694
|
-
const triggerElement =
|
|
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 =
|
|
8812
|
-
const triggerElement =
|
|
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
|
-
|
|
8853
|
+
Box,
|
|
8831
8854
|
{
|
|
8832
|
-
|
|
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(
|
|
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(
|
|
8894
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
8872
8895
|
renderMenuItem(item, !!hasSubMenu, index),
|
|
8873
8896
|
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
8874
|
-
|
|
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(
|
|
8909
|
+
return /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
8887
8910
|
triggerElement,
|
|
8888
8911
|
isOpen && triggerRect && /* @__PURE__ */ jsx(
|
|
8889
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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] =
|
|
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] =
|
|
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] =
|
|
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] =
|
|
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] =
|
|
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] =
|
|
9805
|
-
const handlePress =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
15735
|
-
|
|
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
|
-
|
|
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__ */
|
|
16882
|
+
return /* @__PURE__ */ jsxs(
|
|
16814
16883
|
Box,
|
|
16815
16884
|
{
|
|
16816
|
-
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:
|
|
16824
|
-
/* @__PURE__ */ jsxs(
|
|
16825
|
-
/* @__PURE__ */ jsx(
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
16831
|
-
|
|
16832
|
-
|
|
16833
|
-
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16837
|
-
|
|
16838
|
-
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16845
|
-
|
|
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__ */
|
|
16850
|
-
Box,
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
|
|
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
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16863
|
-
|
|
16864
|
-
|
|
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
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
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((
|
|
20069
|
-
...
|
|
20070
|
-
id:
|
|
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
|
-
|
|
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 =
|
|
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(
|
|
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] =
|
|
21007
|
-
const handlePress =
|
|
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 =
|
|
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 =
|
|
21649
|
+
const parentRoot = React83__default.useContext(RootCtx);
|
|
21543
21650
|
const isRoot = enabled && parentRoot === null;
|
|
21544
|
-
const zoneId =
|
|
21651
|
+
const zoneId = React83__default.useId();
|
|
21545
21652
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
21546
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
21547
|
-
const optimisticOrdersRef =
|
|
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 =
|
|
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,7 +21678,7 @@ function useDataDnd(args) {
|
|
|
21571
21678
|
const raw = it[dndItemIdField];
|
|
21572
21679
|
return String(raw ?? `__idx_${idx}`);
|
|
21573
21680
|
}).join("|");
|
|
21574
|
-
const itemIds =
|
|
21681
|
+
const itemIds = React83__default.useMemo(
|
|
21575
21682
|
() => orderedItems.map((it, idx) => {
|
|
21576
21683
|
const raw = it[dndItemIdField];
|
|
21577
21684
|
return raw ?? `__idx_${idx}`;
|
|
@@ -21579,7 +21686,7 @@ function useDataDnd(args) {
|
|
|
21579
21686
|
[itemIdsSignature]
|
|
21580
21687
|
);
|
|
21581
21688
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
21582
|
-
|
|
21689
|
+
React83__default.useEffect(() => {
|
|
21583
21690
|
const root = isRoot ? null : parentRoot;
|
|
21584
21691
|
if (root) {
|
|
21585
21692
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -21587,20 +21694,20 @@ function useDataDnd(args) {
|
|
|
21587
21694
|
clearOptimisticOrder(ownGroup);
|
|
21588
21695
|
}
|
|
21589
21696
|
}, [itemsContentSig, ownGroup]);
|
|
21590
|
-
const zonesRef =
|
|
21591
|
-
const registerZone =
|
|
21697
|
+
const zonesRef = React83__default.useRef(/* @__PURE__ */ new Map());
|
|
21698
|
+
const registerZone = React83__default.useCallback((zoneId2, meta2) => {
|
|
21592
21699
|
zonesRef.current.set(zoneId2, meta2);
|
|
21593
21700
|
}, []);
|
|
21594
|
-
const unregisterZone =
|
|
21701
|
+
const unregisterZone = React83__default.useCallback((zoneId2) => {
|
|
21595
21702
|
zonesRef.current.delete(zoneId2);
|
|
21596
21703
|
}, []);
|
|
21597
|
-
const [activeDrag, setActiveDrag] =
|
|
21598
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
21599
|
-
const meta =
|
|
21704
|
+
const [activeDrag, setActiveDrag] = React83__default.useState(null);
|
|
21705
|
+
const [overZoneGroup, setOverZoneGroup] = React83__default.useState(null);
|
|
21706
|
+
const meta = React83__default.useMemo(
|
|
21600
21707
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
21601
21708
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
21602
21709
|
);
|
|
21603
|
-
|
|
21710
|
+
React83__default.useEffect(() => {
|
|
21604
21711
|
const target = isRoot ? null : parentRoot;
|
|
21605
21712
|
if (!target) {
|
|
21606
21713
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -21619,7 +21726,7 @@ function useDataDnd(args) {
|
|
|
21619
21726
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
21620
21727
|
const sensors = useAlmadarDndSensors(true);
|
|
21621
21728
|
const collisionDetection = almadarDndCollisionDetection;
|
|
21622
|
-
const findZoneByItem =
|
|
21729
|
+
const findZoneByItem = React83__default.useCallback(
|
|
21623
21730
|
(id) => {
|
|
21624
21731
|
for (const z of zonesRef.current.values()) {
|
|
21625
21732
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -21628,7 +21735,7 @@ function useDataDnd(args) {
|
|
|
21628
21735
|
},
|
|
21629
21736
|
[]
|
|
21630
21737
|
);
|
|
21631
|
-
|
|
21738
|
+
React83__default.useCallback(
|
|
21632
21739
|
(group) => {
|
|
21633
21740
|
for (const z of zonesRef.current.values()) {
|
|
21634
21741
|
if (z.group === group) return z;
|
|
@@ -21637,7 +21744,7 @@ function useDataDnd(args) {
|
|
|
21637
21744
|
},
|
|
21638
21745
|
[]
|
|
21639
21746
|
);
|
|
21640
|
-
const handleDragEnd =
|
|
21747
|
+
const handleDragEnd = React83__default.useCallback(
|
|
21641
21748
|
(event) => {
|
|
21642
21749
|
const { active, over } = event;
|
|
21643
21750
|
const activeIdStr = String(active.id);
|
|
@@ -21728,8 +21835,8 @@ function useDataDnd(args) {
|
|
|
21728
21835
|
},
|
|
21729
21836
|
[eventBus]
|
|
21730
21837
|
);
|
|
21731
|
-
const sortableData =
|
|
21732
|
-
const SortableItem =
|
|
21838
|
+
const sortableData = React83__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
21839
|
+
const SortableItem = React83__default.useCallback(
|
|
21733
21840
|
({ id, children }) => {
|
|
21734
21841
|
const {
|
|
21735
21842
|
attributes,
|
|
@@ -21769,7 +21876,7 @@ function useDataDnd(args) {
|
|
|
21769
21876
|
id: droppableId,
|
|
21770
21877
|
data: sortableData
|
|
21771
21878
|
});
|
|
21772
|
-
const ctx =
|
|
21879
|
+
const ctx = React83__default.useContext(RootCtx);
|
|
21773
21880
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
21774
21881
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
21775
21882
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -21784,7 +21891,7 @@ function useDataDnd(args) {
|
|
|
21784
21891
|
showForeignPlaceholder,
|
|
21785
21892
|
ctxAvailable: ctx != null
|
|
21786
21893
|
});
|
|
21787
|
-
|
|
21894
|
+
React83__default.useEffect(() => {
|
|
21788
21895
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
21789
21896
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
21790
21897
|
return /* @__PURE__ */ jsx(
|
|
@@ -21798,11 +21905,11 @@ function useDataDnd(args) {
|
|
|
21798
21905
|
}
|
|
21799
21906
|
);
|
|
21800
21907
|
};
|
|
21801
|
-
const rootContextValue =
|
|
21908
|
+
const rootContextValue = React83__default.useMemo(
|
|
21802
21909
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
21803
21910
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
21804
21911
|
);
|
|
21805
|
-
const handleDragStart =
|
|
21912
|
+
const handleDragStart = React83__default.useCallback((event) => {
|
|
21806
21913
|
const sourceZone = findZoneByItem(event.active.id);
|
|
21807
21914
|
const rect = event.active.rect.current.initial;
|
|
21808
21915
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -21821,7 +21928,7 @@ function useDataDnd(args) {
|
|
|
21821
21928
|
isRoot
|
|
21822
21929
|
});
|
|
21823
21930
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
21824
|
-
const handleDragOver =
|
|
21931
|
+
const handleDragOver = React83__default.useCallback((event) => {
|
|
21825
21932
|
const { active, over } = event;
|
|
21826
21933
|
const overData = over?.data?.current;
|
|
21827
21934
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -21891,7 +21998,7 @@ function useDataDnd(args) {
|
|
|
21891
21998
|
return next;
|
|
21892
21999
|
});
|
|
21893
22000
|
}, []);
|
|
21894
|
-
const handleDragCancel =
|
|
22001
|
+
const handleDragCancel = React83__default.useCallback((event) => {
|
|
21895
22002
|
setActiveDrag(null);
|
|
21896
22003
|
setOverZoneGroup(null);
|
|
21897
22004
|
dndLog.warn("dragCancel", {
|
|
@@ -21899,12 +22006,12 @@ function useDataDnd(args) {
|
|
|
21899
22006
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
21900
22007
|
});
|
|
21901
22008
|
}, []);
|
|
21902
|
-
const handleDragEndWithCleanup =
|
|
22009
|
+
const handleDragEndWithCleanup = React83__default.useCallback((event) => {
|
|
21903
22010
|
handleDragEnd(event);
|
|
21904
22011
|
setActiveDrag(null);
|
|
21905
22012
|
setOverZoneGroup(null);
|
|
21906
22013
|
}, [handleDragEnd]);
|
|
21907
|
-
const wrapContainer =
|
|
22014
|
+
const wrapContainer = React83__default.useCallback(
|
|
21908
22015
|
(children) => {
|
|
21909
22016
|
if (!enabled) return children;
|
|
21910
22017
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -21958,7 +22065,7 @@ var init_useDataDnd = __esm({
|
|
|
21958
22065
|
init_useAlmadarDndCollision();
|
|
21959
22066
|
init_Box();
|
|
21960
22067
|
dndLog = createLogger("almadar:ui:dnd");
|
|
21961
|
-
RootCtx =
|
|
22068
|
+
RootCtx = React83__default.createContext(null);
|
|
21962
22069
|
}
|
|
21963
22070
|
});
|
|
21964
22071
|
function fieldLabel2(key) {
|
|
@@ -22447,7 +22554,7 @@ function DataList({
|
|
|
22447
22554
|
}) {
|
|
22448
22555
|
const eventBus = useEventBus();
|
|
22449
22556
|
const { t } = useTranslate();
|
|
22450
|
-
const [visibleCount, setVisibleCount] =
|
|
22557
|
+
const [visibleCount, setVisibleCount] = React83__default.useState(pageSize || Infinity);
|
|
22451
22558
|
const fieldDefs = fields ?? columns ?? [];
|
|
22452
22559
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22453
22560
|
const dnd = useDataDnd({
|
|
@@ -22466,7 +22573,7 @@ function DataList({
|
|
|
22466
22573
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22467
22574
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
22468
22575
|
const hasRenderProp = typeof children === "function";
|
|
22469
|
-
|
|
22576
|
+
React83__default.useEffect(() => {
|
|
22470
22577
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
22471
22578
|
const childrenTypeOf = typeof children;
|
|
22472
22579
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -22523,7 +22630,7 @@ function DataList({
|
|
|
22523
22630
|
const items2 = data.map((item) => item);
|
|
22524
22631
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22525
22632
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
22526
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22633
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
22527
22634
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22528
22635
|
group.items.map((itemData, index) => {
|
|
22529
22636
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22711,7 +22818,7 @@ function DataList({
|
|
|
22711
22818
|
className
|
|
22712
22819
|
),
|
|
22713
22820
|
children: [
|
|
22714
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22821
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
22715
22822
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22716
22823
|
group.items.map(
|
|
22717
22824
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23876,6 +23983,8 @@ var SidePanel;
|
|
|
23876
23983
|
var init_SidePanel = __esm({
|
|
23877
23984
|
"components/molecules/SidePanel.tsx"() {
|
|
23878
23985
|
"use client";
|
|
23986
|
+
init_Aside();
|
|
23987
|
+
init_Box();
|
|
23879
23988
|
init_Button();
|
|
23880
23989
|
init_Typography();
|
|
23881
23990
|
init_cn();
|
|
@@ -23885,7 +23994,7 @@ var init_SidePanel = __esm({
|
|
|
23885
23994
|
children,
|
|
23886
23995
|
isOpen,
|
|
23887
23996
|
onClose,
|
|
23888
|
-
width = "w-96",
|
|
23997
|
+
width = "w-full sm:w-96",
|
|
23889
23998
|
position = "right",
|
|
23890
23999
|
showOverlay = true,
|
|
23891
24000
|
className,
|
|
@@ -23899,14 +24008,14 @@ var init_SidePanel = __esm({
|
|
|
23899
24008
|
if (!isOpen) return null;
|
|
23900
24009
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23901
24010
|
showOverlay && /* @__PURE__ */ jsx(
|
|
23902
|
-
|
|
24011
|
+
Box,
|
|
23903
24012
|
{
|
|
23904
24013
|
className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
|
|
23905
24014
|
onClick: handleClose
|
|
23906
24015
|
}
|
|
23907
24016
|
),
|
|
23908
24017
|
/* @__PURE__ */ jsxs(
|
|
23909
|
-
|
|
24018
|
+
Aside,
|
|
23910
24019
|
{
|
|
23911
24020
|
className: cn(
|
|
23912
24021
|
"fixed top-16 lg:top-0 bottom-0 z-[60]",
|
|
@@ -23920,7 +24029,7 @@ var init_SidePanel = __esm({
|
|
|
23920
24029
|
className
|
|
23921
24030
|
),
|
|
23922
24031
|
children: [
|
|
23923
|
-
/* @__PURE__ */ jsxs(
|
|
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: [
|
|
23924
24033
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
|
|
23925
24034
|
/* @__PURE__ */ jsx(
|
|
23926
24035
|
Button,
|
|
@@ -23930,11 +24039,11 @@ var init_SidePanel = __esm({
|
|
|
23930
24039
|
icon: X,
|
|
23931
24040
|
onClick: handleClose,
|
|
23932
24041
|
"aria-label": "Close panel",
|
|
23933
|
-
children: /* @__PURE__ */ jsx("span",
|
|
24042
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
23934
24043
|
}
|
|
23935
24044
|
)
|
|
23936
24045
|
] }),
|
|
23937
|
-
/* @__PURE__ */ jsx(
|
|
24046
|
+
/* @__PURE__ */ jsx(Box, { className: "p-4 flex-1 overflow-y-auto", children })
|
|
23938
24047
|
]
|
|
23939
24048
|
}
|
|
23940
24049
|
)
|
|
@@ -23985,7 +24094,7 @@ var init_WizardProgress = __esm({
|
|
|
23985
24094
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
23986
24095
|
const isActive = index === currentStep;
|
|
23987
24096
|
const isCompleted = index < currentStep;
|
|
23988
|
-
return /* @__PURE__ */ jsxs(
|
|
24097
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
23989
24098
|
/* @__PURE__ */ jsx(
|
|
23990
24099
|
"button",
|
|
23991
24100
|
{
|
|
@@ -24110,7 +24219,9 @@ var init_WizardNavigation = __esm({
|
|
|
24110
24219
|
{
|
|
24111
24220
|
border: true,
|
|
24112
24221
|
className: cn(
|
|
24113
|
-
|
|
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",
|
|
24114
24225
|
compact ? "px-4 py-2" : "px-6 py-4",
|
|
24115
24226
|
className
|
|
24116
24227
|
),
|
|
@@ -25041,7 +25152,7 @@ function InventoryGrid({
|
|
|
25041
25152
|
const eventBus = useEventBus();
|
|
25042
25153
|
const slotCount = totalSlots ?? items.length;
|
|
25043
25154
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
25044
|
-
const handleSelect =
|
|
25155
|
+
const handleSelect = React83.useCallback(
|
|
25045
25156
|
(id) => {
|
|
25046
25157
|
onSelect?.(id);
|
|
25047
25158
|
if (selectEvent) {
|
|
@@ -25254,15 +25365,15 @@ function GameCanvas2D({
|
|
|
25254
25365
|
fps = 60,
|
|
25255
25366
|
className
|
|
25256
25367
|
}) {
|
|
25257
|
-
const canvasRef =
|
|
25258
|
-
const rafRef =
|
|
25259
|
-
const frameRef =
|
|
25260
|
-
const lastTimeRef =
|
|
25261
|
-
const onDrawRef =
|
|
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);
|
|
25262
25373
|
onDrawRef.current = onDraw;
|
|
25263
|
-
const onTickRef =
|
|
25374
|
+
const onTickRef = React83.useRef(onTick);
|
|
25264
25375
|
onTickRef.current = onTick;
|
|
25265
|
-
|
|
25376
|
+
React83.useEffect(() => {
|
|
25266
25377
|
const canvas = canvasRef.current;
|
|
25267
25378
|
if (!canvas) return;
|
|
25268
25379
|
const ctx = canvas.getContext("2d");
|
|
@@ -25551,7 +25662,7 @@ function TurnPanel({
|
|
|
25551
25662
|
className
|
|
25552
25663
|
}) {
|
|
25553
25664
|
const eventBus = useEventBus();
|
|
25554
|
-
const handleAction =
|
|
25665
|
+
const handleAction = React83.useCallback(
|
|
25555
25666
|
(event) => {
|
|
25556
25667
|
if (event) {
|
|
25557
25668
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -25697,7 +25808,7 @@ function UnitCommandBar({
|
|
|
25697
25808
|
className
|
|
25698
25809
|
}) {
|
|
25699
25810
|
const eventBus = useEventBus();
|
|
25700
|
-
const handleCommand =
|
|
25811
|
+
const handleCommand = React83.useCallback(
|
|
25701
25812
|
(event) => {
|
|
25702
25813
|
if (event) {
|
|
25703
25814
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -26182,7 +26293,7 @@ function GameMenu({
|
|
|
26182
26293
|
} catch {
|
|
26183
26294
|
}
|
|
26184
26295
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26185
|
-
const handleOptionClick =
|
|
26296
|
+
const handleOptionClick = React83.useCallback(
|
|
26186
26297
|
(option) => {
|
|
26187
26298
|
if (option.event && eventBus) {
|
|
26188
26299
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -26296,7 +26407,7 @@ function GameOverScreen({
|
|
|
26296
26407
|
} catch {
|
|
26297
26408
|
}
|
|
26298
26409
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26299
|
-
const handleActionClick =
|
|
26410
|
+
const handleActionClick = React83.useCallback(
|
|
26300
26411
|
(action) => {
|
|
26301
26412
|
if (action.event && eventBus) {
|
|
26302
26413
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -28817,7 +28928,7 @@ var init_StepFlow = __esm({
|
|
|
28817
28928
|
className
|
|
28818
28929
|
}) => {
|
|
28819
28930
|
if (orientation === "vertical") {
|
|
28820
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
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: [
|
|
28821
28932
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
28822
28933
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28823
28934
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -28828,7 +28939,7 @@ var init_StepFlow = __esm({
|
|
|
28828
28939
|
] })
|
|
28829
28940
|
] }) }, index)) });
|
|
28830
28941
|
}
|
|
28831
|
-
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(
|
|
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: [
|
|
28832
28943
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
28833
28944
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28834
28945
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -28896,9 +29007,9 @@ var init_SplitSection = __esm({
|
|
|
28896
29007
|
className
|
|
28897
29008
|
),
|
|
28898
29009
|
padding: "lg",
|
|
28899
|
-
children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col
|
|
28900
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
28901
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
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 })
|
|
28902
29013
|
] })
|
|
28903
29014
|
}
|
|
28904
29015
|
);
|
|
@@ -29710,7 +29821,7 @@ var init_LikertScale = __esm({
|
|
|
29710
29821
|
md: "text-base",
|
|
29711
29822
|
lg: "text-lg"
|
|
29712
29823
|
};
|
|
29713
|
-
LikertScale =
|
|
29824
|
+
LikertScale = React83__default.forwardRef(
|
|
29714
29825
|
({
|
|
29715
29826
|
question,
|
|
29716
29827
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -29722,7 +29833,7 @@ var init_LikertScale = __esm({
|
|
|
29722
29833
|
variant = "radios",
|
|
29723
29834
|
className
|
|
29724
29835
|
}, ref) => {
|
|
29725
|
-
const groupId =
|
|
29836
|
+
const groupId = React83__default.useId();
|
|
29726
29837
|
const eventBus = useEventBus();
|
|
29727
29838
|
const handleSelect = useCallback(
|
|
29728
29839
|
(next) => {
|
|
@@ -31726,7 +31837,7 @@ var init_VersionDiff = __esm({
|
|
|
31726
31837
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
31727
31838
|
/* @__PURE__ */ jsx(Icon, { icon: GitCommit, size: "sm", className: "text-muted-foreground" }),
|
|
31728
31839
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
31729
|
-
/* @__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(
|
|
31730
31841
|
Select,
|
|
31731
31842
|
{
|
|
31732
31843
|
options,
|
|
@@ -31736,7 +31847,7 @@ var init_VersionDiff = __esm({
|
|
|
31736
31847
|
}
|
|
31737
31848
|
) }),
|
|
31738
31849
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
31739
|
-
/* @__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(
|
|
31740
31851
|
Select,
|
|
31741
31852
|
{
|
|
31742
31853
|
options,
|
|
@@ -31801,8 +31912,8 @@ var init_VersionDiff = __esm({
|
|
|
31801
31912
|
]
|
|
31802
31913
|
}
|
|
31803
31914
|
),
|
|
31804
|
-
/* @__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: [
|
|
31805
|
-
/* @__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) => {
|
|
31806
31917
|
const isRemoved = line.type === "removed";
|
|
31807
31918
|
return /* @__PURE__ */ jsxs(
|
|
31808
31919
|
HStack,
|
|
@@ -31948,7 +32059,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
31948
32059
|
"aria-label": "Breadcrumb",
|
|
31949
32060
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
31950
32061
|
const isLast = idx === items.length - 1;
|
|
31951
|
-
return /* @__PURE__ */ jsxs(
|
|
32062
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
31952
32063
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
31953
32064
|
Icon,
|
|
31954
32065
|
{
|
|
@@ -32838,7 +32949,7 @@ var init_MiniStateMachine = __esm({
|
|
|
32838
32949
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
32839
32950
|
const tc = transitionCounts[s.name] ?? 0;
|
|
32840
32951
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
32841
|
-
return /* @__PURE__ */ jsxs(
|
|
32952
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
32842
32953
|
/* @__PURE__ */ jsx(
|
|
32843
32954
|
AvlState,
|
|
32844
32955
|
{
|
|
@@ -34215,7 +34326,7 @@ var init_DocumentViewer = __esm({
|
|
|
34215
34326
|
}
|
|
34216
34327
|
});
|
|
34217
34328
|
function extractTitle(children) {
|
|
34218
|
-
if (!
|
|
34329
|
+
if (!React83__default.isValidElement(children)) return void 0;
|
|
34219
34330
|
const props = children.props;
|
|
34220
34331
|
if (typeof props.title === "string") {
|
|
34221
34332
|
return props.title;
|
|
@@ -34270,7 +34381,7 @@ function LinearView({
|
|
|
34270
34381
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
34271
34382
|
const isDone = i < currentIdx;
|
|
34272
34383
|
const isCurrent = i === currentIdx;
|
|
34273
|
-
return /* @__PURE__ */ jsxs(
|
|
34384
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
34274
34385
|
i > 0 && /* @__PURE__ */ jsx(
|
|
34275
34386
|
Typography,
|
|
34276
34387
|
{
|
|
@@ -35171,12 +35282,12 @@ var init_Form = __esm({
|
|
|
35171
35282
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
35172
35283
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
35173
35284
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
35174
|
-
const normalizedInitialData =
|
|
35285
|
+
const normalizedInitialData = React83__default.useMemo(() => {
|
|
35175
35286
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
35176
35287
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
35177
35288
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
35178
35289
|
}, [entity, initialData]);
|
|
35179
|
-
const entityDerivedFields =
|
|
35290
|
+
const entityDerivedFields = React83__default.useMemo(() => {
|
|
35180
35291
|
if (fields && fields.length > 0) return void 0;
|
|
35181
35292
|
if (!resolvedEntity) return void 0;
|
|
35182
35293
|
return resolvedEntity.fields.map(
|
|
@@ -35195,16 +35306,16 @@ var init_Form = __esm({
|
|
|
35195
35306
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
35196
35307
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
35197
35308
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
35198
|
-
const [formData, setFormData] =
|
|
35309
|
+
const [formData, setFormData] = React83__default.useState(
|
|
35199
35310
|
normalizedInitialData
|
|
35200
35311
|
);
|
|
35201
|
-
const [collapsedSections, setCollapsedSections] =
|
|
35312
|
+
const [collapsedSections, setCollapsedSections] = React83__default.useState(
|
|
35202
35313
|
/* @__PURE__ */ new Set()
|
|
35203
35314
|
);
|
|
35204
|
-
const [submitError, setSubmitError] =
|
|
35205
|
-
const formRef =
|
|
35315
|
+
const [submitError, setSubmitError] = React83__default.useState(null);
|
|
35316
|
+
const formRef = React83__default.useRef(null);
|
|
35206
35317
|
const formMode = props.mode;
|
|
35207
|
-
const mountedRef =
|
|
35318
|
+
const mountedRef = React83__default.useRef(false);
|
|
35208
35319
|
if (!mountedRef.current) {
|
|
35209
35320
|
mountedRef.current = true;
|
|
35210
35321
|
debug("forms", "mount", {
|
|
@@ -35217,7 +35328,7 @@ var init_Form = __esm({
|
|
|
35217
35328
|
});
|
|
35218
35329
|
}
|
|
35219
35330
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
35220
|
-
const evalContext =
|
|
35331
|
+
const evalContext = React83__default.useMemo(
|
|
35221
35332
|
() => ({
|
|
35222
35333
|
formValues: formData,
|
|
35223
35334
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -35226,7 +35337,7 @@ var init_Form = __esm({
|
|
|
35226
35337
|
}),
|
|
35227
35338
|
[formData, externalContext]
|
|
35228
35339
|
);
|
|
35229
|
-
|
|
35340
|
+
React83__default.useEffect(() => {
|
|
35230
35341
|
debug("forms", "initialData-sync", {
|
|
35231
35342
|
mode: formMode,
|
|
35232
35343
|
normalizedInitialData,
|
|
@@ -35237,7 +35348,7 @@ var init_Form = __esm({
|
|
|
35237
35348
|
setFormData(normalizedInitialData);
|
|
35238
35349
|
}
|
|
35239
35350
|
}, [normalizedInitialData]);
|
|
35240
|
-
const processCalculations =
|
|
35351
|
+
const processCalculations = React83__default.useCallback(
|
|
35241
35352
|
(changedFieldId, newFormData) => {
|
|
35242
35353
|
if (!hiddenCalculations.length) return;
|
|
35243
35354
|
const context = {
|
|
@@ -35262,7 +35373,7 @@ var init_Form = __esm({
|
|
|
35262
35373
|
},
|
|
35263
35374
|
[hiddenCalculations, externalContext, eventBus]
|
|
35264
35375
|
);
|
|
35265
|
-
const checkViolations =
|
|
35376
|
+
const checkViolations = React83__default.useCallback(
|
|
35266
35377
|
(changedFieldId, newFormData) => {
|
|
35267
35378
|
if (!violationTriggers.length) return;
|
|
35268
35379
|
const context = {
|
|
@@ -35300,7 +35411,7 @@ var init_Form = __esm({
|
|
|
35300
35411
|
processCalculations(name, newFormData);
|
|
35301
35412
|
checkViolations(name, newFormData);
|
|
35302
35413
|
};
|
|
35303
|
-
const isFieldVisible =
|
|
35414
|
+
const isFieldVisible = React83__default.useCallback(
|
|
35304
35415
|
(fieldName) => {
|
|
35305
35416
|
const condition = conditionalFields[fieldName];
|
|
35306
35417
|
if (!condition) return true;
|
|
@@ -35308,7 +35419,7 @@ var init_Form = __esm({
|
|
|
35308
35419
|
},
|
|
35309
35420
|
[conditionalFields, evalContext]
|
|
35310
35421
|
);
|
|
35311
|
-
const isSectionVisible =
|
|
35422
|
+
const isSectionVisible = React83__default.useCallback(
|
|
35312
35423
|
(section) => {
|
|
35313
35424
|
if (!section.condition) return true;
|
|
35314
35425
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -35384,7 +35495,7 @@ var init_Form = __esm({
|
|
|
35384
35495
|
eventBus.emit(`UI:${onCancel}`);
|
|
35385
35496
|
}
|
|
35386
35497
|
};
|
|
35387
|
-
const renderField =
|
|
35498
|
+
const renderField = React83__default.useCallback(
|
|
35388
35499
|
(field) => {
|
|
35389
35500
|
const fieldName = field.name || field.field;
|
|
35390
35501
|
if (!fieldName) return null;
|
|
@@ -35405,7 +35516,7 @@ var init_Form = __esm({
|
|
|
35405
35516
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
35406
35517
|
);
|
|
35407
35518
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
35408
|
-
const normalizedFields =
|
|
35519
|
+
const normalizedFields = React83__default.useMemo(() => {
|
|
35409
35520
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
35410
35521
|
return effectiveFields.map((field) => {
|
|
35411
35522
|
if (typeof field === "string") {
|
|
@@ -35427,7 +35538,7 @@ var init_Form = __esm({
|
|
|
35427
35538
|
return field;
|
|
35428
35539
|
});
|
|
35429
35540
|
}, [effectiveFields, resolvedEntity]);
|
|
35430
|
-
const schemaFields =
|
|
35541
|
+
const schemaFields = React83__default.useMemo(() => {
|
|
35431
35542
|
if (normalizedFields.length === 0) return null;
|
|
35432
35543
|
if (isDebugEnabled()) {
|
|
35433
35544
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -35437,7 +35548,7 @@ var init_Form = __esm({
|
|
|
35437
35548
|
}
|
|
35438
35549
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
35439
35550
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
35440
|
-
const sectionElements =
|
|
35551
|
+
const sectionElements = React83__default.useMemo(() => {
|
|
35441
35552
|
if (!sections || sections.length === 0) return null;
|
|
35442
35553
|
return sections.map((section) => {
|
|
35443
35554
|
if (!isSectionVisible(section)) {
|
|
@@ -37163,7 +37274,7 @@ var init_List = __esm({
|
|
|
37163
37274
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
37164
37275
|
return [];
|
|
37165
37276
|
}, [entity]);
|
|
37166
|
-
const getItemActions =
|
|
37277
|
+
const getItemActions = React83__default.useCallback(
|
|
37167
37278
|
(item) => {
|
|
37168
37279
|
if (!itemActions) return [];
|
|
37169
37280
|
if (typeof itemActions === "function") {
|
|
@@ -37636,7 +37747,7 @@ var init_MediaGallery = __esm({
|
|
|
37636
37747
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
37637
37748
|
);
|
|
37638
37749
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
37639
|
-
const items =
|
|
37750
|
+
const items = React83__default.useMemo(() => {
|
|
37640
37751
|
if (propItems) return propItems;
|
|
37641
37752
|
if (entityData.length === 0) return [];
|
|
37642
37753
|
return entityData.map((record, idx) => ({
|
|
@@ -37800,7 +37911,7 @@ var init_MediaGallery = __esm({
|
|
|
37800
37911
|
}
|
|
37801
37912
|
});
|
|
37802
37913
|
function extractTitle2(children) {
|
|
37803
|
-
if (!
|
|
37914
|
+
if (!React83__default.isValidElement(children)) return void 0;
|
|
37804
37915
|
const props = children.props;
|
|
37805
37916
|
if (typeof props.title === "string") {
|
|
37806
37917
|
return props.title;
|
|
@@ -38513,7 +38624,7 @@ var init_PageHeader = __esm({
|
|
|
38513
38624
|
info: "bg-info/10 text-info"
|
|
38514
38625
|
};
|
|
38515
38626
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
38516
|
-
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(
|
|
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: [
|
|
38517
38628
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
38518
38629
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
38519
38630
|
"a",
|
|
@@ -38828,7 +38939,7 @@ var init_debugRegistry = __esm({
|
|
|
38828
38939
|
}
|
|
38829
38940
|
});
|
|
38830
38941
|
function useDebugData() {
|
|
38831
|
-
const [data, setData] =
|
|
38942
|
+
const [data, setData] = React83.useState(() => ({
|
|
38832
38943
|
traits: [],
|
|
38833
38944
|
ticks: [],
|
|
38834
38945
|
guards: [],
|
|
@@ -38842,7 +38953,7 @@ function useDebugData() {
|
|
|
38842
38953
|
},
|
|
38843
38954
|
lastUpdate: Date.now()
|
|
38844
38955
|
}));
|
|
38845
|
-
|
|
38956
|
+
React83.useEffect(() => {
|
|
38846
38957
|
const updateData = () => {
|
|
38847
38958
|
setData({
|
|
38848
38959
|
traits: getAllTraits(),
|
|
@@ -38951,12 +39062,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
38951
39062
|
return positions;
|
|
38952
39063
|
}
|
|
38953
39064
|
function WalkMinimap() {
|
|
38954
|
-
const [walkStep, setWalkStep] =
|
|
38955
|
-
const [traits2, setTraits] =
|
|
38956
|
-
const [coveredEdges, setCoveredEdges] =
|
|
38957
|
-
const [completedTraits, setCompletedTraits] =
|
|
38958
|
-
const prevTraitRef =
|
|
38959
|
-
|
|
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(() => {
|
|
38960
39071
|
const interval = setInterval(() => {
|
|
38961
39072
|
const w = window;
|
|
38962
39073
|
const step = w.__orbitalWalkStep;
|
|
@@ -39403,15 +39514,15 @@ var init_EntitiesTab = __esm({
|
|
|
39403
39514
|
}
|
|
39404
39515
|
});
|
|
39405
39516
|
function EventFlowTab({ events: events2 }) {
|
|
39406
|
-
const [filter, setFilter] =
|
|
39407
|
-
const containerRef =
|
|
39408
|
-
const [autoScroll, setAutoScroll] =
|
|
39409
|
-
|
|
39517
|
+
const [filter, setFilter] = React83.useState("all");
|
|
39518
|
+
const containerRef = React83.useRef(null);
|
|
39519
|
+
const [autoScroll, setAutoScroll] = React83.useState(true);
|
|
39520
|
+
React83.useEffect(() => {
|
|
39410
39521
|
if (autoScroll && containerRef.current) {
|
|
39411
39522
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39412
39523
|
}
|
|
39413
39524
|
}, [events2.length, autoScroll]);
|
|
39414
|
-
const filteredEvents =
|
|
39525
|
+
const filteredEvents = React83.useMemo(() => {
|
|
39415
39526
|
if (filter === "all") return events2;
|
|
39416
39527
|
return events2.filter((e) => e.type === filter);
|
|
39417
39528
|
}, [events2, filter]);
|
|
@@ -39530,7 +39641,7 @@ var init_EventFlowTab = __esm({
|
|
|
39530
39641
|
}
|
|
39531
39642
|
});
|
|
39532
39643
|
function GuardsPanel({ guards }) {
|
|
39533
|
-
const [filter, setFilter] =
|
|
39644
|
+
const [filter, setFilter] = React83.useState("all");
|
|
39534
39645
|
if (guards.length === 0) {
|
|
39535
39646
|
return /* @__PURE__ */ jsx(
|
|
39536
39647
|
EmptyState,
|
|
@@ -39543,7 +39654,7 @@ function GuardsPanel({ guards }) {
|
|
|
39543
39654
|
}
|
|
39544
39655
|
const passedCount = guards.filter((g) => g.result).length;
|
|
39545
39656
|
const failedCount = guards.length - passedCount;
|
|
39546
|
-
const filteredGuards =
|
|
39657
|
+
const filteredGuards = React83.useMemo(() => {
|
|
39547
39658
|
if (filter === "all") return guards;
|
|
39548
39659
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
39549
39660
|
return guards.filter((g) => !g.result);
|
|
@@ -39704,10 +39815,10 @@ function EffectBadge({ effect }) {
|
|
|
39704
39815
|
] });
|
|
39705
39816
|
}
|
|
39706
39817
|
function TransitionTimeline({ transitions }) {
|
|
39707
|
-
const containerRef =
|
|
39708
|
-
const [autoScroll, setAutoScroll] =
|
|
39709
|
-
const [expandedId, setExpandedId] =
|
|
39710
|
-
|
|
39818
|
+
const containerRef = React83.useRef(null);
|
|
39819
|
+
const [autoScroll, setAutoScroll] = React83.useState(true);
|
|
39820
|
+
const [expandedId, setExpandedId] = React83.useState(null);
|
|
39821
|
+
React83.useEffect(() => {
|
|
39711
39822
|
if (autoScroll && containerRef.current) {
|
|
39712
39823
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39713
39824
|
}
|
|
@@ -39993,9 +40104,9 @@ function getAllEvents(traits2) {
|
|
|
39993
40104
|
}
|
|
39994
40105
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
39995
40106
|
const eventBus = useEventBus();
|
|
39996
|
-
const [log12, setLog] =
|
|
39997
|
-
const prevStatesRef =
|
|
39998
|
-
|
|
40107
|
+
const [log12, setLog] = React83.useState([]);
|
|
40108
|
+
const prevStatesRef = React83.useRef(/* @__PURE__ */ new Map());
|
|
40109
|
+
React83.useEffect(() => {
|
|
39999
40110
|
for (const trait of traits2) {
|
|
40000
40111
|
const prev = prevStatesRef.current.get(trait.id);
|
|
40001
40112
|
if (prev && prev !== trait.currentState) {
|
|
@@ -40165,10 +40276,10 @@ function VerifyModePanel({
|
|
|
40165
40276
|
serverCount,
|
|
40166
40277
|
localCount
|
|
40167
40278
|
}) {
|
|
40168
|
-
const [expanded, setExpanded] =
|
|
40169
|
-
const scrollRef =
|
|
40170
|
-
const prevCountRef =
|
|
40171
|
-
|
|
40279
|
+
const [expanded, setExpanded] = React83.useState(true);
|
|
40280
|
+
const scrollRef = React83.useRef(null);
|
|
40281
|
+
const prevCountRef = React83.useRef(0);
|
|
40282
|
+
React83.useEffect(() => {
|
|
40172
40283
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
40173
40284
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
40174
40285
|
}
|
|
@@ -40234,10 +40345,10 @@ function RuntimeDebugger({
|
|
|
40234
40345
|
defaultTab,
|
|
40235
40346
|
schema
|
|
40236
40347
|
}) {
|
|
40237
|
-
const [isCollapsed, setIsCollapsed] =
|
|
40238
|
-
const [isVisible, setIsVisible] =
|
|
40348
|
+
const [isCollapsed, setIsCollapsed] = React83.useState(mode === "verify" ? true : defaultCollapsed);
|
|
40349
|
+
const [isVisible, setIsVisible] = React83.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
40239
40350
|
const debugData = useDebugData();
|
|
40240
|
-
|
|
40351
|
+
React83.useEffect(() => {
|
|
40241
40352
|
if (mode === "inline") return;
|
|
40242
40353
|
return onDebugToggle((enabled) => {
|
|
40243
40354
|
setIsVisible(enabled);
|
|
@@ -40246,7 +40357,7 @@ function RuntimeDebugger({
|
|
|
40246
40357
|
}
|
|
40247
40358
|
});
|
|
40248
40359
|
}, [mode]);
|
|
40249
|
-
|
|
40360
|
+
React83.useEffect(() => {
|
|
40250
40361
|
if (mode === "inline") return;
|
|
40251
40362
|
const handleKeyDown = (e) => {
|
|
40252
40363
|
if (e.key === "`" && isVisible) {
|
|
@@ -40795,7 +40906,7 @@ function SequenceBar({
|
|
|
40795
40906
|
onSlotRemove(index);
|
|
40796
40907
|
}, [onSlotRemove, playing]);
|
|
40797
40908
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
40798
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
40909
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
40799
40910
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40800
40911
|
Typography,
|
|
40801
40912
|
{
|
|
@@ -42197,7 +42308,7 @@ var init_StatCard = __esm({
|
|
|
42197
42308
|
const labelToUse = propLabel ?? propTitle;
|
|
42198
42309
|
const eventBus = useEventBus();
|
|
42199
42310
|
const { t } = useTranslate();
|
|
42200
|
-
const handleActionClick =
|
|
42311
|
+
const handleActionClick = React83__default.useCallback(() => {
|
|
42201
42312
|
if (action?.event) {
|
|
42202
42313
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42203
42314
|
}
|
|
@@ -42208,7 +42319,7 @@ var init_StatCard = __esm({
|
|
|
42208
42319
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42209
42320
|
const isLoading = externalLoading ?? false;
|
|
42210
42321
|
const error = externalError;
|
|
42211
|
-
const computeMetricValue =
|
|
42322
|
+
const computeMetricValue = React83__default.useCallback(
|
|
42212
42323
|
(metric, items) => {
|
|
42213
42324
|
if (metric.value !== void 0) {
|
|
42214
42325
|
return metric.value;
|
|
@@ -42247,7 +42358,7 @@ var init_StatCard = __esm({
|
|
|
42247
42358
|
},
|
|
42248
42359
|
[]
|
|
42249
42360
|
);
|
|
42250
|
-
const schemaStats =
|
|
42361
|
+
const schemaStats = React83__default.useMemo(() => {
|
|
42251
42362
|
if (!metrics || metrics.length === 0) return null;
|
|
42252
42363
|
return metrics.map((metric) => ({
|
|
42253
42364
|
label: metric.label,
|
|
@@ -42255,7 +42366,7 @@ var init_StatCard = __esm({
|
|
|
42255
42366
|
format: metric.format
|
|
42256
42367
|
}));
|
|
42257
42368
|
}, [metrics, data, computeMetricValue]);
|
|
42258
|
-
const calculatedTrend =
|
|
42369
|
+
const calculatedTrend = React83__default.useMemo(() => {
|
|
42259
42370
|
if (manualTrend !== void 0) return manualTrend;
|
|
42260
42371
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42261
42372
|
return void 0;
|
|
@@ -43366,7 +43477,7 @@ var init_Timeline = __esm({
|
|
|
43366
43477
|
}) => {
|
|
43367
43478
|
const { t } = useTranslate();
|
|
43368
43479
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
43369
|
-
const items =
|
|
43480
|
+
const items = React83__default.useMemo(() => {
|
|
43370
43481
|
if (propItems) return propItems;
|
|
43371
43482
|
if (entityData.length === 0) return [];
|
|
43372
43483
|
return entityData.map((record, idx) => {
|
|
@@ -43473,7 +43584,7 @@ var init_Timeline = __esm({
|
|
|
43473
43584
|
}
|
|
43474
43585
|
});
|
|
43475
43586
|
function extractToastProps(children) {
|
|
43476
|
-
if (!
|
|
43587
|
+
if (!React83__default.isValidElement(children)) {
|
|
43477
43588
|
if (typeof children === "string") {
|
|
43478
43589
|
return { message: children };
|
|
43479
43590
|
}
|
|
@@ -43511,7 +43622,7 @@ var init_ToastSlot = __esm({
|
|
|
43511
43622
|
eventBus.emit("UI:CLOSE");
|
|
43512
43623
|
};
|
|
43513
43624
|
if (!isVisible) return null;
|
|
43514
|
-
const isCustomContent =
|
|
43625
|
+
const isCustomContent = React83__default.isValidElement(children) && !message;
|
|
43515
43626
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43516
43627
|
Toast,
|
|
43517
43628
|
{
|
|
@@ -43780,7 +43891,7 @@ var init_WizardContainer = __esm({
|
|
|
43780
43891
|
const isCompleted = index < currentStep;
|
|
43781
43892
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
43782
43893
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
43783
|
-
return /* @__PURE__ */ jsxs(
|
|
43894
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
43784
43895
|
/* @__PURE__ */ jsx(
|
|
43785
43896
|
Button,
|
|
43786
43897
|
{
|
|
@@ -44162,12 +44273,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
44162
44273
|
}
|
|
44163
44274
|
});
|
|
44164
44275
|
function lazyThree(name, loader) {
|
|
44165
|
-
const Lazy =
|
|
44276
|
+
const Lazy = React83__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
44166
44277
|
function ThreeWrapper(props) {
|
|
44167
|
-
return
|
|
44168
|
-
|
|
44278
|
+
return React83__default.createElement(
|
|
44279
|
+
React83__default.Suspense,
|
|
44169
44280
|
{ fallback: null },
|
|
44170
|
-
|
|
44281
|
+
React83__default.createElement(Lazy, props)
|
|
44171
44282
|
);
|
|
44172
44283
|
}
|
|
44173
44284
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -44186,6 +44297,7 @@ var init_component_registry_generated = __esm({
|
|
|
44186
44297
|
init_AnimatedGraphic();
|
|
44187
44298
|
init_AnimatedReveal();
|
|
44188
44299
|
init_ArticleSection();
|
|
44300
|
+
init_Aside();
|
|
44189
44301
|
init_AuthLayout();
|
|
44190
44302
|
init_BattleBoard();
|
|
44191
44303
|
init_BattleTemplate();
|
|
@@ -44240,6 +44352,7 @@ var init_component_registry_generated = __esm({
|
|
|
44240
44352
|
init_DayCell();
|
|
44241
44353
|
init_DebuggerBoard();
|
|
44242
44354
|
init_DetailPanel();
|
|
44355
|
+
init_Dialog();
|
|
44243
44356
|
init_DialogueBox();
|
|
44244
44357
|
init_DialogueBubble();
|
|
44245
44358
|
init_DocBreadcrumb();
|
|
@@ -44453,6 +44566,7 @@ var init_component_registry_generated = __esm({
|
|
|
44453
44566
|
"AnimatedGraphic": AnimatedGraphic,
|
|
44454
44567
|
"AnimatedReveal": AnimatedReveal,
|
|
44455
44568
|
"ArticleSection": ArticleSection,
|
|
44569
|
+
"Aside": Aside,
|
|
44456
44570
|
"AuthLayout": AuthLayout,
|
|
44457
44571
|
"Avatar": AvatarPattern,
|
|
44458
44572
|
"AvatarPattern": AvatarPattern,
|
|
@@ -44522,6 +44636,7 @@ var init_component_registry_generated = __esm({
|
|
|
44522
44636
|
"DayCell": DayCell,
|
|
44523
44637
|
"DebuggerBoard": DebuggerBoard,
|
|
44524
44638
|
"DetailPanel": DetailPanel,
|
|
44639
|
+
"Dialog": Dialog,
|
|
44525
44640
|
"DialogueBox": DialogueBox,
|
|
44526
44641
|
"DialogueBubble": DialogueBubble,
|
|
44527
44642
|
"Divider": DividerPattern,
|
|
@@ -44775,7 +44890,7 @@ function SuspenseConfigProvider({
|
|
|
44775
44890
|
config,
|
|
44776
44891
|
children
|
|
44777
44892
|
}) {
|
|
44778
|
-
return
|
|
44893
|
+
return React83__default.createElement(
|
|
44779
44894
|
SuspenseConfigContext.Provider,
|
|
44780
44895
|
{ value: config },
|
|
44781
44896
|
children
|
|
@@ -45258,7 +45373,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45258
45373
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45259
45374
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45260
45375
|
}
|
|
45261
|
-
return /* @__PURE__ */ jsx(
|
|
45376
|
+
return /* @__PURE__ */ jsx(React83__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45262
45377
|
}
|
|
45263
45378
|
if (!child || typeof child !== "object") return null;
|
|
45264
45379
|
const childId = `${parentId}-${index}`;
|
|
@@ -45295,14 +45410,14 @@ function isPatternConfig(value) {
|
|
|
45295
45410
|
if (value === null || value === void 0) return false;
|
|
45296
45411
|
if (typeof value !== "object") return false;
|
|
45297
45412
|
if (Array.isArray(value)) return false;
|
|
45298
|
-
if (
|
|
45413
|
+
if (React83__default.isValidElement(value)) return false;
|
|
45299
45414
|
if (value instanceof Date) return false;
|
|
45300
45415
|
if (typeof value === "function") return false;
|
|
45301
45416
|
const record = value;
|
|
45302
45417
|
return "type" in record && typeof record.type === "string";
|
|
45303
45418
|
}
|
|
45304
45419
|
function isPlainConfigObject(value) {
|
|
45305
|
-
if (
|
|
45420
|
+
if (React83__default.isValidElement(value)) return false;
|
|
45306
45421
|
if (value instanceof Date) return false;
|
|
45307
45422
|
const proto = Object.getPrototypeOf(value);
|
|
45308
45423
|
return proto === Object.prototype || proto === null;
|
|
@@ -45663,7 +45778,7 @@ function resolveLambdaBindings(body, argName, arg) {
|
|
|
45663
45778
|
if (Array.isArray(body)) {
|
|
45664
45779
|
return body.map((b) => resolveLambdaBindings(b, argName, arg));
|
|
45665
45780
|
}
|
|
45666
|
-
if (body !== null && typeof body === "object" && !
|
|
45781
|
+
if (body !== null && typeof body === "object" && !React83__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
45667
45782
|
const out = {};
|
|
45668
45783
|
for (const [k, v] of Object.entries(body)) {
|
|
45669
45784
|
out[k] = resolveLambdaBindings(v, argName, arg);
|
|
@@ -45682,7 +45797,7 @@ function getSlotContentRenderer2() {
|
|
|
45682
45797
|
function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
45683
45798
|
return (item, index) => {
|
|
45684
45799
|
const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
|
|
45685
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
45800
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React83__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
45686
45801
|
return null;
|
|
45687
45802
|
}
|
|
45688
45803
|
const record = resolvedBody;
|
|
@@ -45700,7 +45815,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
|
45700
45815
|
props: childProps,
|
|
45701
45816
|
priority: 0
|
|
45702
45817
|
};
|
|
45703
|
-
return
|
|
45818
|
+
return React83__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
45704
45819
|
};
|
|
45705
45820
|
}
|
|
45706
45821
|
function convertNode(node, callerKey) {
|
|
@@ -45719,7 +45834,7 @@ function convertNode(node, callerKey) {
|
|
|
45719
45834
|
});
|
|
45720
45835
|
return anyChanged ? mapped : node;
|
|
45721
45836
|
}
|
|
45722
|
-
if (typeof node === "object" && !
|
|
45837
|
+
if (typeof node === "object" && !React83__default.isValidElement(node) && !(node instanceof Date)) {
|
|
45723
45838
|
return convertObjectProps(node);
|
|
45724
45839
|
}
|
|
45725
45840
|
return node;
|