@almadar/ui 4.51.15 → 4.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1972 -1806
- package/dist/avl/index.js +726 -560
- 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 +1555 -1410
- package/dist/components/index.js +532 -387
- 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 +1651 -1508
- package/dist/providers/index.js +760 -617
- package/dist/runtime/index.cjs +1690 -1547
- package/dist/runtime/index.js +764 -621
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React78 from 'react';
|
|
3
|
+
import React78__default, { useContext, useMemo, useRef, useEffect, useCallback, createContext, Suspense, useState, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
@@ -206,7 +206,7 @@ var init_SvgFlow = __esm({
|
|
|
206
206
|
opacity = 1,
|
|
207
207
|
className
|
|
208
208
|
}) => {
|
|
209
|
-
const markerId =
|
|
209
|
+
const markerId = React78__default.useMemo(() => {
|
|
210
210
|
flowIdCounter += 1;
|
|
211
211
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
212
212
|
}, []);
|
|
@@ -749,7 +749,7 @@ var init_SvgRing = __esm({
|
|
|
749
749
|
className,
|
|
750
750
|
label
|
|
751
751
|
}) => {
|
|
752
|
-
const gradientId =
|
|
752
|
+
const gradientId = React78__default.useMemo(() => {
|
|
753
753
|
ringIdCounter += 1;
|
|
754
754
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
755
755
|
}, []);
|
|
@@ -1177,7 +1177,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1177
1177
|
const IconComp = value;
|
|
1178
1178
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1179
1179
|
}
|
|
1180
|
-
if (
|
|
1180
|
+
if (React78__default.isValidElement(value)) {
|
|
1181
1181
|
return value;
|
|
1182
1182
|
}
|
|
1183
1183
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1253,7 +1253,7 @@ var init_Button = __esm({
|
|
|
1253
1253
|
md: "h-4 w-4",
|
|
1254
1254
|
lg: "h-5 w-5"
|
|
1255
1255
|
};
|
|
1256
|
-
Button =
|
|
1256
|
+
Button = React78__default.forwardRef(
|
|
1257
1257
|
({
|
|
1258
1258
|
className,
|
|
1259
1259
|
variant = "primary",
|
|
@@ -1318,7 +1318,7 @@ var Input;
|
|
|
1318
1318
|
var init_Input = __esm({
|
|
1319
1319
|
"components/atoms/Input.tsx"() {
|
|
1320
1320
|
init_cn();
|
|
1321
|
-
Input =
|
|
1321
|
+
Input = React78__default.forwardRef(
|
|
1322
1322
|
({
|
|
1323
1323
|
className,
|
|
1324
1324
|
inputType,
|
|
@@ -1436,7 +1436,7 @@ var Label;
|
|
|
1436
1436
|
var init_Label = __esm({
|
|
1437
1437
|
"components/atoms/Label.tsx"() {
|
|
1438
1438
|
init_cn();
|
|
1439
|
-
Label =
|
|
1439
|
+
Label = React78__default.forwardRef(
|
|
1440
1440
|
({ className, required, children, ...props }, ref) => {
|
|
1441
1441
|
return /* @__PURE__ */ jsxs(
|
|
1442
1442
|
"label",
|
|
@@ -1462,7 +1462,7 @@ var Textarea;
|
|
|
1462
1462
|
var init_Textarea = __esm({
|
|
1463
1463
|
"components/atoms/Textarea.tsx"() {
|
|
1464
1464
|
init_cn();
|
|
1465
|
-
Textarea =
|
|
1465
|
+
Textarea = React78__default.forwardRef(
|
|
1466
1466
|
({ className, error, ...props }, ref) => {
|
|
1467
1467
|
return /* @__PURE__ */ jsx(
|
|
1468
1468
|
"textarea",
|
|
@@ -1491,7 +1491,7 @@ var Select;
|
|
|
1491
1491
|
var init_Select = __esm({
|
|
1492
1492
|
"components/atoms/Select.tsx"() {
|
|
1493
1493
|
init_cn();
|
|
1494
|
-
Select =
|
|
1494
|
+
Select = React78__default.forwardRef(
|
|
1495
1495
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
1496
1496
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1497
1497
|
/* @__PURE__ */ jsxs(
|
|
@@ -1533,7 +1533,7 @@ var Checkbox;
|
|
|
1533
1533
|
var init_Checkbox = __esm({
|
|
1534
1534
|
"components/atoms/Checkbox.tsx"() {
|
|
1535
1535
|
init_cn();
|
|
1536
|
-
Checkbox =
|
|
1536
|
+
Checkbox = React78__default.forwardRef(
|
|
1537
1537
|
({ className, label, id, ...props }, ref) => {
|
|
1538
1538
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
1539
1539
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1615,7 +1615,7 @@ var init_Card = __esm({
|
|
|
1615
1615
|
md: "shadow",
|
|
1616
1616
|
lg: "shadow-lg"
|
|
1617
1617
|
};
|
|
1618
|
-
Card =
|
|
1618
|
+
Card = React78__default.forwardRef(
|
|
1619
1619
|
({
|
|
1620
1620
|
className,
|
|
1621
1621
|
variant = "bordered",
|
|
@@ -1651,9 +1651,9 @@ var init_Card = __esm({
|
|
|
1651
1651
|
}
|
|
1652
1652
|
);
|
|
1653
1653
|
Card.displayName = "Card";
|
|
1654
|
-
CardHeader =
|
|
1654
|
+
CardHeader = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
1655
1655
|
CardHeader.displayName = "CardHeader";
|
|
1656
|
-
CardTitle =
|
|
1656
|
+
CardTitle = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1657
1657
|
"h3",
|
|
1658
1658
|
{
|
|
1659
1659
|
ref,
|
|
@@ -1666,11 +1666,11 @@ var init_Card = __esm({
|
|
|
1666
1666
|
}
|
|
1667
1667
|
));
|
|
1668
1668
|
CardTitle.displayName = "CardTitle";
|
|
1669
|
-
CardContent =
|
|
1669
|
+
CardContent = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
1670
1670
|
CardContent.displayName = "CardContent";
|
|
1671
1671
|
CardBody = CardContent;
|
|
1672
1672
|
CardBody.displayName = "CardBody";
|
|
1673
|
-
CardFooter =
|
|
1673
|
+
CardFooter = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1674
1674
|
"div",
|
|
1675
1675
|
{
|
|
1676
1676
|
ref,
|
|
@@ -1723,7 +1723,7 @@ var init_Badge = __esm({
|
|
|
1723
1723
|
md: "px-2.5 py-1 text-sm",
|
|
1724
1724
|
lg: "px-3 py-1.5 text-base"
|
|
1725
1725
|
};
|
|
1726
|
-
Badge =
|
|
1726
|
+
Badge = React78__default.forwardRef(
|
|
1727
1727
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
1728
1728
|
const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1729
1729
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -1796,7 +1796,7 @@ var init_FilterPill = __esm({
|
|
|
1796
1796
|
md: "w-3.5 h-3.5",
|
|
1797
1797
|
lg: "w-4 h-4"
|
|
1798
1798
|
};
|
|
1799
|
-
FilterPill =
|
|
1799
|
+
FilterPill = React78__default.forwardRef(
|
|
1800
1800
|
({
|
|
1801
1801
|
className,
|
|
1802
1802
|
variant = "default",
|
|
@@ -1875,7 +1875,7 @@ var init_Spinner = __esm({
|
|
|
1875
1875
|
md: "h-6 w-6",
|
|
1876
1876
|
lg: "h-8 w-8"
|
|
1877
1877
|
};
|
|
1878
|
-
Spinner =
|
|
1878
|
+
Spinner = React78__default.forwardRef(
|
|
1879
1879
|
({ className, size = "md", ...props }, ref) => {
|
|
1880
1880
|
return /* @__PURE__ */ jsx(
|
|
1881
1881
|
"div",
|
|
@@ -2156,7 +2156,7 @@ var init_Box = __esm({
|
|
|
2156
2156
|
fixed: "fixed",
|
|
2157
2157
|
sticky: "sticky"
|
|
2158
2158
|
};
|
|
2159
|
-
Box =
|
|
2159
|
+
Box = React78__default.forwardRef(
|
|
2160
2160
|
({
|
|
2161
2161
|
padding,
|
|
2162
2162
|
paddingX,
|
|
@@ -2206,38 +2206,26 @@ var init_Box = __esm({
|
|
|
2206
2206
|
onMouseLeave?.(e);
|
|
2207
2207
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
2208
2208
|
const isClickable = action || onClick;
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
Comp,
|
|
2209
|
+
return React78__default.createElement(
|
|
2210
|
+
Component,
|
|
2212
2211
|
{
|
|
2213
2212
|
ref,
|
|
2214
2213
|
className: cn(
|
|
2215
|
-
// Padding
|
|
2216
2214
|
padding && paddingStyles2[padding],
|
|
2217
2215
|
paddingX && paddingXStyles[paddingX],
|
|
2218
2216
|
paddingY && paddingYStyles[paddingY],
|
|
2219
|
-
// Margin
|
|
2220
2217
|
margin && marginStyles[margin],
|
|
2221
2218
|
marginX && marginXStyles[marginX],
|
|
2222
2219
|
marginY && marginYStyles[marginY],
|
|
2223
|
-
// Background
|
|
2224
2220
|
bgStyles[bg],
|
|
2225
|
-
// Border - uses theme variables
|
|
2226
2221
|
border && "border-[length:var(--border-width)] border-border",
|
|
2227
|
-
// Rounded
|
|
2228
2222
|
roundedStyles[rounded],
|
|
2229
|
-
// Shadow
|
|
2230
2223
|
shadowStyles2[shadow],
|
|
2231
|
-
// Display
|
|
2232
2224
|
display && displayStyles[display],
|
|
2233
|
-
// Dimensions
|
|
2234
2225
|
fullWidth && "w-full",
|
|
2235
2226
|
fullHeight && "h-full",
|
|
2236
|
-
// Overflow
|
|
2237
2227
|
overflow && overflowStyles[overflow],
|
|
2238
|
-
// Position
|
|
2239
2228
|
position && positionStyles[position],
|
|
2240
|
-
// Cursor for clickable
|
|
2241
2229
|
isClickable && "cursor-pointer",
|
|
2242
2230
|
className
|
|
2243
2231
|
),
|
|
@@ -2245,9 +2233,9 @@ var init_Box = __esm({
|
|
|
2245
2233
|
onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
|
|
2246
2234
|
onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
|
|
2247
2235
|
style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
|
|
2248
|
-
...rest
|
|
2249
|
-
|
|
2250
|
-
|
|
2236
|
+
...rest
|
|
2237
|
+
},
|
|
2238
|
+
children
|
|
2251
2239
|
);
|
|
2252
2240
|
}
|
|
2253
2241
|
);
|
|
@@ -2529,7 +2517,7 @@ var Radio;
|
|
|
2529
2517
|
var init_Radio = __esm({
|
|
2530
2518
|
"components/atoms/Radio.tsx"() {
|
|
2531
2519
|
init_cn();
|
|
2532
|
-
Radio =
|
|
2520
|
+
Radio = React78__default.forwardRef(
|
|
2533
2521
|
({
|
|
2534
2522
|
label,
|
|
2535
2523
|
helperText,
|
|
@@ -2701,7 +2689,7 @@ var init_Switch = __esm({
|
|
|
2701
2689
|
"components/atoms/Switch.tsx"() {
|
|
2702
2690
|
"use client";
|
|
2703
2691
|
init_cn();
|
|
2704
|
-
Switch =
|
|
2692
|
+
Switch = React78.forwardRef(
|
|
2705
2693
|
({
|
|
2706
2694
|
checked,
|
|
2707
2695
|
defaultChecked = false,
|
|
@@ -2712,10 +2700,10 @@ var init_Switch = __esm({
|
|
|
2712
2700
|
name,
|
|
2713
2701
|
className
|
|
2714
2702
|
}, ref) => {
|
|
2715
|
-
const [isChecked, setIsChecked] =
|
|
2703
|
+
const [isChecked, setIsChecked] = React78.useState(
|
|
2716
2704
|
checked !== void 0 ? checked : defaultChecked
|
|
2717
2705
|
);
|
|
2718
|
-
|
|
2706
|
+
React78.useEffect(() => {
|
|
2719
2707
|
if (checked !== void 0) {
|
|
2720
2708
|
setIsChecked(checked);
|
|
2721
2709
|
}
|
|
@@ -3530,6 +3518,42 @@ var init_FlipContainer = __esm({
|
|
|
3530
3518
|
FlipContainer.displayName = "FlipContainer";
|
|
3531
3519
|
}
|
|
3532
3520
|
});
|
|
3521
|
+
var Dialog;
|
|
3522
|
+
var init_Dialog = __esm({
|
|
3523
|
+
"components/atoms/Dialog.tsx"() {
|
|
3524
|
+
init_cn();
|
|
3525
|
+
Dialog = React78__default.forwardRef(
|
|
3526
|
+
({
|
|
3527
|
+
role = "dialog",
|
|
3528
|
+
"aria-modal": ariaModal = true,
|
|
3529
|
+
className,
|
|
3530
|
+
children,
|
|
3531
|
+
...rest
|
|
3532
|
+
}, ref) => /* @__PURE__ */ jsx(
|
|
3533
|
+
"dialog",
|
|
3534
|
+
{
|
|
3535
|
+
ref,
|
|
3536
|
+
role,
|
|
3537
|
+
"aria-modal": ariaModal,
|
|
3538
|
+
className: cn(className),
|
|
3539
|
+
...rest,
|
|
3540
|
+
children
|
|
3541
|
+
}
|
|
3542
|
+
)
|
|
3543
|
+
);
|
|
3544
|
+
Dialog.displayName = "Dialog";
|
|
3545
|
+
}
|
|
3546
|
+
});
|
|
3547
|
+
var Aside;
|
|
3548
|
+
var init_Aside = __esm({
|
|
3549
|
+
"components/atoms/Aside.tsx"() {
|
|
3550
|
+
init_cn();
|
|
3551
|
+
Aside = React78__default.forwardRef(
|
|
3552
|
+
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
3553
|
+
);
|
|
3554
|
+
Aside.displayName = "Aside";
|
|
3555
|
+
}
|
|
3556
|
+
});
|
|
3533
3557
|
function toSharedContext(ctx) {
|
|
3534
3558
|
return createMinimalContext(
|
|
3535
3559
|
{
|
|
@@ -3601,8 +3625,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3601
3625
|
position = "top",
|
|
3602
3626
|
className
|
|
3603
3627
|
}) => {
|
|
3604
|
-
const [isVisible, setIsVisible] =
|
|
3605
|
-
const timeoutRef =
|
|
3628
|
+
const [isVisible, setIsVisible] = React78__default.useState(false);
|
|
3629
|
+
const timeoutRef = React78__default.useRef(null);
|
|
3606
3630
|
const handleMouseEnter = () => {
|
|
3607
3631
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3608
3632
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -3611,7 +3635,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3611
3635
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3612
3636
|
setIsVisible(false);
|
|
3613
3637
|
};
|
|
3614
|
-
|
|
3638
|
+
React78__default.useEffect(() => {
|
|
3615
3639
|
return () => {
|
|
3616
3640
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3617
3641
|
};
|
|
@@ -3821,7 +3845,7 @@ var init_StatusDot = __esm({
|
|
|
3821
3845
|
md: "w-2.5 h-2.5",
|
|
3822
3846
|
lg: "w-3 h-3"
|
|
3823
3847
|
};
|
|
3824
|
-
StatusDot =
|
|
3848
|
+
StatusDot = React78__default.forwardRef(
|
|
3825
3849
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
3826
3850
|
return /* @__PURE__ */ jsx(
|
|
3827
3851
|
"span",
|
|
@@ -3874,7 +3898,7 @@ var init_TrendIndicator = __esm({
|
|
|
3874
3898
|
down: TrendingDown,
|
|
3875
3899
|
flat: ArrowRight
|
|
3876
3900
|
};
|
|
3877
|
-
TrendIndicator =
|
|
3901
|
+
TrendIndicator = React78__default.forwardRef(
|
|
3878
3902
|
({
|
|
3879
3903
|
className,
|
|
3880
3904
|
value,
|
|
@@ -3941,7 +3965,7 @@ var init_RangeSlider = __esm({
|
|
|
3941
3965
|
md: "w-4 h-4",
|
|
3942
3966
|
lg: "w-5 h-5"
|
|
3943
3967
|
};
|
|
3944
|
-
RangeSlider =
|
|
3968
|
+
RangeSlider = React78__default.forwardRef(
|
|
3945
3969
|
({
|
|
3946
3970
|
className,
|
|
3947
3971
|
min = 0,
|
|
@@ -4537,7 +4561,7 @@ var init_ContentSection = __esm({
|
|
|
4537
4561
|
md: "py-16",
|
|
4538
4562
|
lg: "py-24"
|
|
4539
4563
|
};
|
|
4540
|
-
ContentSection =
|
|
4564
|
+
ContentSection = React78__default.forwardRef(
|
|
4541
4565
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
4542
4566
|
return /* @__PURE__ */ jsx(
|
|
4543
4567
|
Box,
|
|
@@ -5071,7 +5095,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5071
5095
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5072
5096
|
"none": {}
|
|
5073
5097
|
};
|
|
5074
|
-
AnimatedReveal =
|
|
5098
|
+
AnimatedReveal = React78__default.forwardRef(
|
|
5075
5099
|
({
|
|
5076
5100
|
trigger = "scroll",
|
|
5077
5101
|
animation = "fade-up",
|
|
@@ -5231,7 +5255,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5231
5255
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
5232
5256
|
"use client";
|
|
5233
5257
|
init_cn();
|
|
5234
|
-
AnimatedGraphic =
|
|
5258
|
+
AnimatedGraphic = React78__default.forwardRef(
|
|
5235
5259
|
({
|
|
5236
5260
|
src,
|
|
5237
5261
|
svgContent,
|
|
@@ -5254,7 +5278,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5254
5278
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5255
5279
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5256
5280
|
const prevAnimateRef = useRef(animate);
|
|
5257
|
-
const setRef =
|
|
5281
|
+
const setRef = React78__default.useCallback(
|
|
5258
5282
|
(node) => {
|
|
5259
5283
|
containerRef.current = node;
|
|
5260
5284
|
if (typeof ref === "function") ref(node);
|
|
@@ -5356,8 +5380,9 @@ var sizeClasses5, minWidths, Modal;
|
|
|
5356
5380
|
var init_Modal = __esm({
|
|
5357
5381
|
"components/molecules/Modal.tsx"() {
|
|
5358
5382
|
"use client";
|
|
5359
|
-
init_Icon();
|
|
5360
5383
|
init_Box();
|
|
5384
|
+
init_Button();
|
|
5385
|
+
init_Dialog();
|
|
5361
5386
|
init_Typography();
|
|
5362
5387
|
init_Overlay();
|
|
5363
5388
|
init_cn();
|
|
@@ -5450,7 +5475,7 @@ var init_Modal = __esm({
|
|
|
5450
5475
|
}
|
|
5451
5476
|
),
|
|
5452
5477
|
/* @__PURE__ */ jsx(
|
|
5453
|
-
|
|
5478
|
+
Box,
|
|
5454
5479
|
{
|
|
5455
5480
|
className: cn(
|
|
5456
5481
|
"fixed inset-0 z-50 pointer-events-none",
|
|
@@ -5459,17 +5484,17 @@ var init_Modal = __esm({
|
|
|
5459
5484
|
),
|
|
5460
5485
|
style: { paddingTop: "10vh" },
|
|
5461
5486
|
children: /* @__PURE__ */ jsxs(
|
|
5462
|
-
|
|
5487
|
+
Dialog,
|
|
5463
5488
|
{
|
|
5464
5489
|
ref: modalRef,
|
|
5465
|
-
|
|
5466
|
-
border: true,
|
|
5467
|
-
shadow: "lg",
|
|
5468
|
-
rounded: "md",
|
|
5490
|
+
open: true,
|
|
5469
5491
|
className: cn(
|
|
5470
|
-
|
|
5492
|
+
// Reset browser-default dialog chrome — we own styling.
|
|
5493
|
+
"m-0 p-0 border-0 bg-transparent",
|
|
5494
|
+
// Pre-existing dialog frame
|
|
5495
|
+
"pointer-events-auto w-full flex flex-col bg-surface border shadow-lg rounded-md",
|
|
5471
5496
|
sizeClasses5[size],
|
|
5472
|
-
"max-sm:max-w-full max-sm:rounded-b-none max-sm:rounded-t-2xl",
|
|
5497
|
+
"max-sm:max-w-full max-sm:min-w-0 max-sm:rounded-b-none max-sm:rounded-t-2xl",
|
|
5473
5498
|
className
|
|
5474
5499
|
),
|
|
5475
5500
|
style: {
|
|
@@ -5480,12 +5505,10 @@ var init_Modal = __esm({
|
|
|
5480
5505
|
transition: isDragging.current ? "none" : "transform 200ms ease-out"
|
|
5481
5506
|
}
|
|
5482
5507
|
},
|
|
5483
|
-
role: "dialog",
|
|
5484
|
-
"aria-modal": "true",
|
|
5485
5508
|
...title && { "aria-labelledby": "modal-title" },
|
|
5486
5509
|
children: [
|
|
5487
5510
|
/* @__PURE__ */ jsx(
|
|
5488
|
-
|
|
5511
|
+
Box,
|
|
5489
5512
|
{
|
|
5490
5513
|
className: "hidden max-sm:flex justify-center py-2 cursor-grab active:cursor-grabbing touch-none",
|
|
5491
5514
|
onPointerDown: (e) => {
|
|
@@ -5511,11 +5534,11 @@ var init_Modal = __esm({
|
|
|
5511
5534
|
isDragging.current = false;
|
|
5512
5535
|
setDragY(0);
|
|
5513
5536
|
},
|
|
5514
|
-
children: /* @__PURE__ */ jsx(
|
|
5537
|
+
children: /* @__PURE__ */ jsx(Box, { className: "w-10 h-1 rounded-full bg-border" })
|
|
5515
5538
|
}
|
|
5516
5539
|
),
|
|
5517
5540
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
5518
|
-
|
|
5541
|
+
Box,
|
|
5519
5542
|
{
|
|
5520
5543
|
className: cn(
|
|
5521
5544
|
"px-6 py-4 flex items-center justify-between",
|
|
@@ -5524,25 +5547,22 @@ var init_Modal = __esm({
|
|
|
5524
5547
|
children: [
|
|
5525
5548
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "modal-title", children: title }),
|
|
5526
5549
|
showCloseButton && /* @__PURE__ */ jsx(
|
|
5527
|
-
|
|
5550
|
+
Button,
|
|
5528
5551
|
{
|
|
5529
|
-
|
|
5552
|
+
variant: "ghost",
|
|
5553
|
+
size: "sm",
|
|
5554
|
+
icon: X,
|
|
5530
5555
|
onClick: handleClose,
|
|
5531
5556
|
"data-event": "CLOSE",
|
|
5532
|
-
|
|
5533
|
-
"p-1 transition-colors rounded-sm",
|
|
5534
|
-
"hover:bg-muted"
|
|
5535
|
-
),
|
|
5536
|
-
"aria-label": "Close modal",
|
|
5537
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: X, size: "md" })
|
|
5557
|
+
"aria-label": "Close modal"
|
|
5538
5558
|
}
|
|
5539
5559
|
)
|
|
5540
5560
|
]
|
|
5541
5561
|
}
|
|
5542
5562
|
),
|
|
5543
|
-
/* @__PURE__ */ jsx(
|
|
5563
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
5544
5564
|
footer && /* @__PURE__ */ jsx(
|
|
5545
|
-
|
|
5565
|
+
Box,
|
|
5546
5566
|
{
|
|
5547
5567
|
className: cn(
|
|
5548
5568
|
"px-6 py-4 bg-muted",
|
|
@@ -5565,21 +5585,19 @@ var sizeWidths, Drawer;
|
|
|
5565
5585
|
var init_Drawer = __esm({
|
|
5566
5586
|
"components/molecules/Drawer.tsx"() {
|
|
5567
5587
|
"use client";
|
|
5568
|
-
init_Icon();
|
|
5569
5588
|
init_Box();
|
|
5589
|
+
init_Button();
|
|
5570
5590
|
init_Typography();
|
|
5571
5591
|
init_Overlay();
|
|
5572
5592
|
init_cn();
|
|
5573
5593
|
init_useEventBus();
|
|
5574
5594
|
sizeWidths = {
|
|
5575
|
-
sm: "w-80",
|
|
5595
|
+
sm: "w-full sm:w-80",
|
|
5576
5596
|
// 320px
|
|
5577
|
-
md: "w-96",
|
|
5597
|
+
md: "w-full sm:w-96",
|
|
5578
5598
|
// 384px
|
|
5579
|
-
lg: "w-[480px]",
|
|
5580
|
-
|
|
5581
|
-
xl: "w-[640px]",
|
|
5582
|
-
// 640px
|
|
5599
|
+
lg: "w-full sm:w-[480px]",
|
|
5600
|
+
xl: "w-full sm:w-[640px]",
|
|
5583
5601
|
full: "w-screen"
|
|
5584
5602
|
};
|
|
5585
5603
|
Drawer = ({
|
|
@@ -5677,7 +5695,7 @@ var init_Drawer = __esm({
|
|
|
5677
5695
|
...title && { "aria-labelledby": "drawer-title" },
|
|
5678
5696
|
children: [
|
|
5679
5697
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
5680
|
-
|
|
5698
|
+
Box,
|
|
5681
5699
|
{
|
|
5682
5700
|
className: cn(
|
|
5683
5701
|
"px-6 py-4 flex items-center justify-between shrink-0",
|
|
@@ -5686,25 +5704,22 @@ var init_Drawer = __esm({
|
|
|
5686
5704
|
children: [
|
|
5687
5705
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "drawer-title", children: title }),
|
|
5688
5706
|
showCloseButton && /* @__PURE__ */ jsx(
|
|
5689
|
-
|
|
5707
|
+
Button,
|
|
5690
5708
|
{
|
|
5691
|
-
|
|
5709
|
+
variant: "ghost",
|
|
5710
|
+
size: "sm",
|
|
5711
|
+
icon: X,
|
|
5692
5712
|
onClick: handleClose,
|
|
5693
|
-
className: cn(
|
|
5694
|
-
"p-1 transition-colors rounded-sm",
|
|
5695
|
-
"hover:bg-muted",
|
|
5696
|
-
!title && "ml-auto"
|
|
5697
|
-
),
|
|
5698
5713
|
"aria-label": "Close drawer",
|
|
5699
|
-
|
|
5714
|
+
className: cn(!title && "ml-auto")
|
|
5700
5715
|
}
|
|
5701
5716
|
)
|
|
5702
5717
|
]
|
|
5703
5718
|
}
|
|
5704
5719
|
),
|
|
5705
|
-
/* @__PURE__ */ jsx(
|
|
5720
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
5706
5721
|
footer && /* @__PURE__ */ jsx(
|
|
5707
|
-
|
|
5722
|
+
Box,
|
|
5708
5723
|
{
|
|
5709
5724
|
className: cn(
|
|
5710
5725
|
"px-6 py-4 shrink-0 bg-muted",
|
|
@@ -5749,6 +5764,7 @@ var variantClasses, iconMap2, iconColors, Toast;
|
|
|
5749
5764
|
var init_Toast = __esm({
|
|
5750
5765
|
"components/molecules/Toast.tsx"() {
|
|
5751
5766
|
"use client";
|
|
5767
|
+
init_Box();
|
|
5752
5768
|
init_Icon();
|
|
5753
5769
|
init_Typography();
|
|
5754
5770
|
init_Button();
|
|
@@ -5806,17 +5822,20 @@ var init_Toast = __esm({
|
|
|
5806
5822
|
return () => clearTimeout(timer);
|
|
5807
5823
|
}, [duration, onDismiss, dismissEvent]);
|
|
5808
5824
|
return /* @__PURE__ */ jsx(
|
|
5809
|
-
|
|
5825
|
+
Box,
|
|
5810
5826
|
{
|
|
5811
5827
|
className: cn(
|
|
5812
|
-
|
|
5828
|
+
// `min-w-[300px]` only kicks in at `sm:` and above so a phone
|
|
5829
|
+
// viewport doesn't get a toast wider than the screen near the
|
|
5830
|
+
// edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
|
|
5831
|
+
"border-l-4 p-4 shadow min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
5813
5832
|
"rounded-sm",
|
|
5814
5833
|
variantClasses[variant],
|
|
5815
5834
|
className
|
|
5816
5835
|
),
|
|
5817
5836
|
role: "alert",
|
|
5818
|
-
children: /* @__PURE__ */ jsxs(
|
|
5819
|
-
/* @__PURE__ */ jsx(
|
|
5837
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
|
|
5838
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
5820
5839
|
Icon,
|
|
5821
5840
|
{
|
|
5822
5841
|
icon: iconMap2[variant],
|
|
@@ -5824,25 +5843,22 @@ var init_Toast = __esm({
|
|
|
5824
5843
|
className: iconColors[variant]
|
|
5825
5844
|
}
|
|
5826
5845
|
) }),
|
|
5827
|
-
/* @__PURE__ */ jsxs(
|
|
5846
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
5828
5847
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h6", className: "mb-1", children: title }),
|
|
5829
5848
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-sm", children: message }),
|
|
5830
|
-
actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx(
|
|
5849
|
+
actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx(Box, { className: "mt-3", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleAction, children: actionLabel }) })
|
|
5831
5850
|
] }),
|
|
5832
|
-
/* @__PURE__ */ jsxs(
|
|
5851
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-2 flex-shrink-0", children: [
|
|
5833
5852
|
badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: badge }),
|
|
5834
5853
|
dismissible && /* @__PURE__ */ jsx(
|
|
5835
|
-
|
|
5854
|
+
Button,
|
|
5836
5855
|
{
|
|
5837
|
-
|
|
5856
|
+
variant: "ghost",
|
|
5857
|
+
size: "sm",
|
|
5858
|
+
icon: X,
|
|
5838
5859
|
onClick: handleDismiss,
|
|
5839
|
-
className: cn(
|
|
5840
|
-
"flex-shrink-0 p-1 transition-colors rounded-sm",
|
|
5841
|
-
"hover:bg-muted",
|
|
5842
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
|
5843
|
-
),
|
|
5844
5860
|
"aria-label": "Dismiss toast",
|
|
5845
|
-
|
|
5861
|
+
className: "flex-shrink-0"
|
|
5846
5862
|
}
|
|
5847
5863
|
)
|
|
5848
5864
|
] })
|
|
@@ -6064,7 +6080,7 @@ var init_ErrorBoundary = __esm({
|
|
|
6064
6080
|
"use client";
|
|
6065
6081
|
init_cn();
|
|
6066
6082
|
init_ErrorState();
|
|
6067
|
-
ErrorBoundary = class extends
|
|
6083
|
+
ErrorBoundary = class extends React78__default.Component {
|
|
6068
6084
|
constructor(props) {
|
|
6069
6085
|
super(props);
|
|
6070
6086
|
__publicField(this, "reset", () => {
|
|
@@ -6617,7 +6633,7 @@ var init_HeroSection = __esm({
|
|
|
6617
6633
|
HeroSection.displayName = "HeroSection";
|
|
6618
6634
|
}
|
|
6619
6635
|
});
|
|
6620
|
-
var ArticleSection;
|
|
6636
|
+
var maxWidthMap, ArticleSection;
|
|
6621
6637
|
var init_ArticleSection = __esm({
|
|
6622
6638
|
"components/molecules/ArticleSection.tsx"() {
|
|
6623
6639
|
"use client";
|
|
@@ -6625,6 +6641,11 @@ var init_ArticleSection = __esm({
|
|
|
6625
6641
|
init_Box();
|
|
6626
6642
|
init_Stack();
|
|
6627
6643
|
init_Typography();
|
|
6644
|
+
maxWidthMap = {
|
|
6645
|
+
sm: "max-w-full sm:max-w-xl md:max-w-2xl",
|
|
6646
|
+
md: "max-w-full sm:max-w-2xl md:max-w-3xl",
|
|
6647
|
+
lg: "max-w-full sm:max-w-3xl md:max-w-4xl"
|
|
6648
|
+
};
|
|
6628
6649
|
ArticleSection = ({
|
|
6629
6650
|
title,
|
|
6630
6651
|
children,
|
|
@@ -6639,7 +6660,7 @@ var init_ArticleSection = __esm({
|
|
|
6639
6660
|
className
|
|
6640
6661
|
),
|
|
6641
6662
|
padding: "md",
|
|
6642
|
-
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", children: [
|
|
6663
|
+
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", className: cn("w-full mx-auto", maxWidthMap[maxWidth]), children: [
|
|
6643
6664
|
/* @__PURE__ */ jsx(Typography, { variant: "h2", children: title }),
|
|
6644
6665
|
/* @__PURE__ */ jsx(Box, { className: "w-full", children })
|
|
6645
6666
|
] })
|
|
@@ -6691,6 +6712,7 @@ var init_TeamCard = __esm({
|
|
|
6691
6712
|
var gapStyles2, colStyles, SimpleGrid;
|
|
6692
6713
|
var init_SimpleGrid = __esm({
|
|
6693
6714
|
"components/molecules/SimpleGrid.tsx"() {
|
|
6715
|
+
init_Box();
|
|
6694
6716
|
init_cn();
|
|
6695
6717
|
gapStyles2 = {
|
|
6696
6718
|
none: "gap-0",
|
|
@@ -6703,10 +6725,10 @@ var init_SimpleGrid = __esm({
|
|
|
6703
6725
|
colStyles = {
|
|
6704
6726
|
1: "grid-cols-1",
|
|
6705
6727
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
6706
|
-
3: "grid-cols-1 sm:grid-cols-2
|
|
6707
|
-
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
6708
|
-
5: "grid-cols-1 sm:grid-cols-2
|
|
6709
|
-
6: "grid-cols-1 sm:grid-cols-2
|
|
6728
|
+
3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
6729
|
+
4: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
|
|
6730
|
+
5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",
|
|
6731
|
+
6: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6"
|
|
6710
6732
|
};
|
|
6711
6733
|
SimpleGrid = ({
|
|
6712
6734
|
minChildWidth = 250,
|
|
@@ -6717,12 +6739,12 @@ var init_SimpleGrid = __esm({
|
|
|
6717
6739
|
children
|
|
6718
6740
|
}) => {
|
|
6719
6741
|
if (cols) {
|
|
6720
|
-
return /* @__PURE__ */ jsx(
|
|
6742
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("grid", colStyles[cols], gapStyles2[gap], className), children });
|
|
6721
6743
|
}
|
|
6722
6744
|
const minWidth = typeof minChildWidth === "number" ? `${minChildWidth}px` : minChildWidth;
|
|
6723
6745
|
const templateColumns = maxCols ? `repeat(auto-fit, minmax(min(${minWidth}, 100%), 1fr))` : `repeat(auto-fit, minmax(${minWidth}, 1fr))`;
|
|
6724
6746
|
return /* @__PURE__ */ jsx(
|
|
6725
|
-
|
|
6747
|
+
Box,
|
|
6726
6748
|
{
|
|
6727
6749
|
className: cn("grid", gapStyles2[gap], className),
|
|
6728
6750
|
style: {
|
|
@@ -7112,8 +7134,8 @@ var init_Tooltip = __esm({
|
|
|
7112
7134
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
7113
7135
|
};
|
|
7114
7136
|
}, []);
|
|
7115
|
-
const triggerElement =
|
|
7116
|
-
const trigger =
|
|
7137
|
+
const triggerElement = React78__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
7138
|
+
const trigger = React78__default.cloneElement(triggerElement, {
|
|
7117
7139
|
ref: triggerRef,
|
|
7118
7140
|
onMouseEnter: handleMouseEnter,
|
|
7119
7141
|
onMouseLeave: handleMouseLeave,
|
|
@@ -7234,8 +7256,8 @@ var init_Popover = __esm({
|
|
|
7234
7256
|
onMouseEnter: handleOpen,
|
|
7235
7257
|
onMouseLeave: handleClose
|
|
7236
7258
|
};
|
|
7237
|
-
const childElement =
|
|
7238
|
-
const triggerElement =
|
|
7259
|
+
const childElement = React78__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
7260
|
+
const triggerElement = React78__default.cloneElement(
|
|
7239
7261
|
childElement,
|
|
7240
7262
|
{
|
|
7241
7263
|
ref: triggerRef,
|
|
@@ -7284,6 +7306,7 @@ var Menu;
|
|
|
7284
7306
|
var init_Menu = __esm({
|
|
7285
7307
|
"components/molecules/Menu.tsx"() {
|
|
7286
7308
|
"use client";
|
|
7309
|
+
init_Box();
|
|
7287
7310
|
init_Icon();
|
|
7288
7311
|
init_Divider();
|
|
7289
7312
|
init_Typography();
|
|
@@ -7352,8 +7375,8 @@ var init_Menu = __esm({
|
|
|
7352
7375
|
"bottom-start": "top-full left-0 mt-2",
|
|
7353
7376
|
"bottom-end": "top-full right-0 mt-2"
|
|
7354
7377
|
};
|
|
7355
|
-
const triggerChild =
|
|
7356
|
-
const triggerElement =
|
|
7378
|
+
const triggerChild = React78__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
7379
|
+
const triggerElement = React78__default.cloneElement(
|
|
7357
7380
|
triggerChild,
|
|
7358
7381
|
{
|
|
7359
7382
|
ref: triggerRef,
|
|
@@ -7365,17 +7388,17 @@ var init_Menu = __esm({
|
|
|
7365
7388
|
"border-[length:var(--border-width)] border-border",
|
|
7366
7389
|
"shadow",
|
|
7367
7390
|
"rounded-sm",
|
|
7368
|
-
"min-w-[200px] py-1"
|
|
7391
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
7369
7392
|
);
|
|
7370
7393
|
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
7371
7394
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
7372
7395
|
const isDanger = item.variant === "danger";
|
|
7373
7396
|
return /* @__PURE__ */ jsx(
|
|
7374
|
-
|
|
7397
|
+
Box,
|
|
7375
7398
|
{
|
|
7376
|
-
|
|
7377
|
-
onClick: () => handleItemClick({ ...item, id: itemId }),
|
|
7378
|
-
disabled: item.disabled,
|
|
7399
|
+
as: "button",
|
|
7400
|
+
onClick: () => !item.disabled && handleItemClick({ ...item, id: itemId }),
|
|
7401
|
+
"aria-disabled": item.disabled || void 0,
|
|
7379
7402
|
onMouseEnter: () => hasSubMenu && setActiveSubMenu(itemId),
|
|
7380
7403
|
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
7381
7404
|
className: cn(
|
|
@@ -7387,7 +7410,7 @@ var init_Menu = __esm({
|
|
|
7387
7410
|
item.disabled && "cursor-not-allowed",
|
|
7388
7411
|
isDanger && "text-error hover:bg-error/10"
|
|
7389
7412
|
),
|
|
7390
|
-
children: /* @__PURE__ */ jsxs(
|
|
7413
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
7391
7414
|
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" })),
|
|
7392
7415
|
/* @__PURE__ */ jsx(
|
|
7393
7416
|
Typography,
|
|
@@ -7412,10 +7435,10 @@ var init_Menu = __esm({
|
|
|
7412
7435
|
if (isDivider) {
|
|
7413
7436
|
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
7414
7437
|
}
|
|
7415
|
-
return /* @__PURE__ */ jsxs(
|
|
7438
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
7416
7439
|
renderMenuItem(item, !!hasSubMenu, index),
|
|
7417
7440
|
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
7418
|
-
|
|
7441
|
+
Box,
|
|
7419
7442
|
{
|
|
7420
7443
|
className: cn(
|
|
7421
7444
|
"absolute left-full top-0 ml-2 z-50",
|
|
@@ -7427,10 +7450,10 @@ var init_Menu = __esm({
|
|
|
7427
7450
|
] }, itemId);
|
|
7428
7451
|
});
|
|
7429
7452
|
};
|
|
7430
|
-
return /* @__PURE__ */ jsxs(
|
|
7453
|
+
return /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
7431
7454
|
triggerElement,
|
|
7432
7455
|
isOpen && triggerRect && /* @__PURE__ */ jsx(
|
|
7433
|
-
|
|
7456
|
+
Box,
|
|
7434
7457
|
{
|
|
7435
7458
|
ref: menuRef,
|
|
7436
7459
|
className: cn(
|
|
@@ -7769,13 +7792,13 @@ var init_MapView = __esm({
|
|
|
7769
7792
|
shadowSize: [41, 41]
|
|
7770
7793
|
});
|
|
7771
7794
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
7772
|
-
const { useEffect:
|
|
7795
|
+
const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback126, useState: useState108 } = React78__default;
|
|
7773
7796
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
7774
7797
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
7775
7798
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
7776
7799
|
const map = useMap();
|
|
7777
7800
|
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
7778
|
-
|
|
7801
|
+
useEffect71(() => {
|
|
7779
7802
|
const prev = prevRef.current;
|
|
7780
7803
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
7781
7804
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -7786,7 +7809,7 @@ var init_MapView = __esm({
|
|
|
7786
7809
|
}
|
|
7787
7810
|
function MapClickHandler({ onMapClick }) {
|
|
7788
7811
|
const map = useMap();
|
|
7789
|
-
|
|
7812
|
+
useEffect71(() => {
|
|
7790
7813
|
if (!onMapClick) return;
|
|
7791
7814
|
const handler = (e) => {
|
|
7792
7815
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -7814,7 +7837,7 @@ var init_MapView = __esm({
|
|
|
7814
7837
|
showAttribution = true
|
|
7815
7838
|
}) {
|
|
7816
7839
|
const eventBus = useEventBus2();
|
|
7817
|
-
const [clickedPosition, setClickedPosition] =
|
|
7840
|
+
const [clickedPosition, setClickedPosition] = useState108(null);
|
|
7818
7841
|
const handleMapClick = useCallback126((lat, lng) => {
|
|
7819
7842
|
if (showClickedPin) {
|
|
7820
7843
|
setClickedPosition({ lat, lng });
|
|
@@ -8015,7 +8038,7 @@ function InputPattern({
|
|
|
8015
8038
|
fieldName
|
|
8016
8039
|
}) {
|
|
8017
8040
|
const { emit } = useEventBus();
|
|
8018
|
-
const [localValue, setLocalValue] =
|
|
8041
|
+
const [localValue, setLocalValue] = React78__default.useState(value);
|
|
8019
8042
|
const handleChange = (e) => {
|
|
8020
8043
|
setLocalValue(e.target.value);
|
|
8021
8044
|
if (onChange) {
|
|
@@ -8053,7 +8076,7 @@ function TextareaPattern({
|
|
|
8053
8076
|
fieldName
|
|
8054
8077
|
}) {
|
|
8055
8078
|
const { emit } = useEventBus();
|
|
8056
|
-
const [localValue, setLocalValue] =
|
|
8079
|
+
const [localValue, setLocalValue] = React78__default.useState(value);
|
|
8057
8080
|
const handleChange = (e) => {
|
|
8058
8081
|
setLocalValue(e.target.value);
|
|
8059
8082
|
if (onChange) {
|
|
@@ -8085,7 +8108,7 @@ function SelectPattern({
|
|
|
8085
8108
|
fieldName
|
|
8086
8109
|
}) {
|
|
8087
8110
|
const { emit } = useEventBus();
|
|
8088
|
-
const [localValue, setLocalValue] =
|
|
8111
|
+
const [localValue, setLocalValue] = React78__default.useState(value);
|
|
8089
8112
|
const handleChange = (e) => {
|
|
8090
8113
|
setLocalValue(e.target.value);
|
|
8091
8114
|
if (onChange) {
|
|
@@ -8114,7 +8137,7 @@ function CheckboxPattern({
|
|
|
8114
8137
|
className
|
|
8115
8138
|
}) {
|
|
8116
8139
|
const { emit } = useEventBus();
|
|
8117
|
-
const [localChecked, setLocalChecked] =
|
|
8140
|
+
const [localChecked, setLocalChecked] = React78__default.useState(checked);
|
|
8118
8141
|
const handleChange = (e) => {
|
|
8119
8142
|
setLocalChecked(e.target.checked);
|
|
8120
8143
|
if (onChange) {
|
|
@@ -8427,9 +8450,9 @@ function ControlButton({
|
|
|
8427
8450
|
className
|
|
8428
8451
|
}) {
|
|
8429
8452
|
const eventBus = useEventBus();
|
|
8430
|
-
const [isPressed, setIsPressed] =
|
|
8453
|
+
const [isPressed, setIsPressed] = React78.useState(false);
|
|
8431
8454
|
const actualPressed = pressed ?? isPressed;
|
|
8432
|
-
const handlePointerDown =
|
|
8455
|
+
const handlePointerDown = React78.useCallback(
|
|
8433
8456
|
(e) => {
|
|
8434
8457
|
e.preventDefault();
|
|
8435
8458
|
if (disabled) return;
|
|
@@ -8439,7 +8462,7 @@ function ControlButton({
|
|
|
8439
8462
|
},
|
|
8440
8463
|
[disabled, pressEvent, eventBus, onPress]
|
|
8441
8464
|
);
|
|
8442
|
-
const handlePointerUp =
|
|
8465
|
+
const handlePointerUp = React78.useCallback(
|
|
8443
8466
|
(e) => {
|
|
8444
8467
|
e.preventDefault();
|
|
8445
8468
|
if (disabled) return;
|
|
@@ -8449,7 +8472,7 @@ function ControlButton({
|
|
|
8449
8472
|
},
|
|
8450
8473
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8451
8474
|
);
|
|
8452
|
-
const handlePointerLeave =
|
|
8475
|
+
const handlePointerLeave = React78.useCallback(
|
|
8453
8476
|
(e) => {
|
|
8454
8477
|
if (isPressed) {
|
|
8455
8478
|
setIsPressed(false);
|
|
@@ -8526,8 +8549,8 @@ function ActionButtons({
|
|
|
8526
8549
|
disabled
|
|
8527
8550
|
}) {
|
|
8528
8551
|
const eventBus = useEventBus();
|
|
8529
|
-
const [activeButtons, setActiveButtons] =
|
|
8530
|
-
const handlePress =
|
|
8552
|
+
const [activeButtons, setActiveButtons] = React78.useState(/* @__PURE__ */ new Set());
|
|
8553
|
+
const handlePress = React78.useCallback(
|
|
8531
8554
|
(id) => {
|
|
8532
8555
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
8533
8556
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8535,7 +8558,7 @@ function ActionButtons({
|
|
|
8535
8558
|
},
|
|
8536
8559
|
[actionEvent, eventBus, onAction]
|
|
8537
8560
|
);
|
|
8538
|
-
const handleRelease =
|
|
8561
|
+
const handleRelease = React78.useCallback(
|
|
8539
8562
|
(id) => {
|
|
8540
8563
|
setActiveButtons((prev) => {
|
|
8541
8564
|
const next = new Set(prev);
|
|
@@ -11297,7 +11320,7 @@ var init_MarkdownContent = __esm({
|
|
|
11297
11320
|
init_Box();
|
|
11298
11321
|
init_useTranslate();
|
|
11299
11322
|
init_cn();
|
|
11300
|
-
MarkdownContent =
|
|
11323
|
+
MarkdownContent = React78__default.memo(
|
|
11301
11324
|
({ content, direction, className }) => {
|
|
11302
11325
|
const { t: _t } = useTranslate();
|
|
11303
11326
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -11515,7 +11538,7 @@ var init_CodeBlock = __esm({
|
|
|
11515
11538
|
log5 = createLogger("almadar:ui:markdown-code");
|
|
11516
11539
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
11517
11540
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
11518
|
-
CodeBlock =
|
|
11541
|
+
CodeBlock = React78__default.memo(
|
|
11519
11542
|
({
|
|
11520
11543
|
code: rawCode,
|
|
11521
11544
|
language = "text",
|
|
@@ -12824,7 +12847,7 @@ var init_StateMachineView = __esm({
|
|
|
12824
12847
|
style: { top: title ? 30 : 0 },
|
|
12825
12848
|
children: [
|
|
12826
12849
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
12827
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
12850
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React78__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
12828
12851
|
StateNode,
|
|
12829
12852
|
{
|
|
12830
12853
|
state,
|
|
@@ -14405,27 +14428,23 @@ var init_Grid = __esm({
|
|
|
14405
14428
|
as: Component = "div"
|
|
14406
14429
|
}) => {
|
|
14407
14430
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
Comp,
|
|
14431
|
+
return React78__default.createElement(
|
|
14432
|
+
Component,
|
|
14411
14433
|
{
|
|
14412
14434
|
className: cn(
|
|
14413
14435
|
"grid",
|
|
14414
14436
|
getColsClass(cols),
|
|
14415
|
-
// Gap (rowGap/colGap override gap)
|
|
14416
14437
|
rowGap ? rowGapStyles[rowGap] : colGap ? void 0 : gapStyles3[gap],
|
|
14417
14438
|
colGap ? colGapStyles[colGap] : rowGap ? void 0 : void 0,
|
|
14418
14439
|
rowGap && colGap ? `${rowGapStyles[rowGap]} ${colGapStyles[colGap]}` : void 0,
|
|
14419
|
-
// Alignment
|
|
14420
14440
|
alignItems && alignStyles2[alignItems],
|
|
14421
14441
|
justifyItems && justifyStyles2[justifyItems],
|
|
14422
|
-
// Flow
|
|
14423
14442
|
flow && flowStyles[flow],
|
|
14424
14443
|
className
|
|
14425
14444
|
),
|
|
14426
|
-
style: mergedStyle
|
|
14427
|
-
|
|
14428
|
-
|
|
14445
|
+
style: mergedStyle
|
|
14446
|
+
},
|
|
14447
|
+
children
|
|
14429
14448
|
);
|
|
14430
14449
|
};
|
|
14431
14450
|
Grid.displayName = "Grid";
|
|
@@ -15444,6 +15463,35 @@ var init_useSwipeGesture = __esm({
|
|
|
15444
15463
|
"use client";
|
|
15445
15464
|
}
|
|
15446
15465
|
});
|
|
15466
|
+
function dayWindowForViewport(width) {
|
|
15467
|
+
if (width <= 640) return 1;
|
|
15468
|
+
if (width <= 1024) return 3;
|
|
15469
|
+
return 7;
|
|
15470
|
+
}
|
|
15471
|
+
function useDayWindow(override) {
|
|
15472
|
+
const [w, setW] = useState(() => {
|
|
15473
|
+
if (override !== "auto") return override;
|
|
15474
|
+
if (typeof window === "undefined") return 7;
|
|
15475
|
+
return dayWindowForViewport(window.innerWidth);
|
|
15476
|
+
});
|
|
15477
|
+
useEffect(() => {
|
|
15478
|
+
if (override !== "auto") {
|
|
15479
|
+
setW(override);
|
|
15480
|
+
return void 0;
|
|
15481
|
+
}
|
|
15482
|
+
if (typeof window === "undefined") return void 0;
|
|
15483
|
+
const onResize = () => setW(dayWindowForViewport(window.innerWidth));
|
|
15484
|
+
onResize();
|
|
15485
|
+
window.addEventListener("resize", onResize);
|
|
15486
|
+
return () => window.removeEventListener("resize", onResize);
|
|
15487
|
+
}, [override]);
|
|
15488
|
+
return w;
|
|
15489
|
+
}
|
|
15490
|
+
function formatDateRange(start, end) {
|
|
15491
|
+
const startStr = start.toLocaleDateString(void 0, SHORT_DATE);
|
|
15492
|
+
const endStr = end.toLocaleDateString(void 0, SHORT_DATE);
|
|
15493
|
+
return start.toDateString() === end.toDateString() ? startStr : `${startStr} \u2013 ${endStr}`;
|
|
15494
|
+
}
|
|
15447
15495
|
function getStartOfWeek(date) {
|
|
15448
15496
|
const d = new Date(date);
|
|
15449
15497
|
const day = d.getDay();
|
|
@@ -15484,7 +15532,8 @@ function CalendarGrid({
|
|
|
15484
15532
|
longPressEvent,
|
|
15485
15533
|
longPressPayload,
|
|
15486
15534
|
swipeLeftEvent,
|
|
15487
|
-
swipeRightEvent
|
|
15535
|
+
swipeRightEvent,
|
|
15536
|
+
dayWindow = "auto"
|
|
15488
15537
|
}) {
|
|
15489
15538
|
const eventBus = useEventBus();
|
|
15490
15539
|
const longPressTimer = useRef(null);
|
|
@@ -15500,6 +15549,26 @@ function CalendarGrid({
|
|
|
15500
15549
|
() => timeSlots ?? generateDefaultTimeSlots(),
|
|
15501
15550
|
[timeSlots]
|
|
15502
15551
|
);
|
|
15552
|
+
const visibleCount = useDayWindow(dayWindow);
|
|
15553
|
+
const [dayOffset, setDayOffset] = useState(0);
|
|
15554
|
+
useEffect(() => {
|
|
15555
|
+
if (dayOffset + visibleCount > 7) {
|
|
15556
|
+
setDayOffset(Math.max(0, 7 - visibleCount));
|
|
15557
|
+
}
|
|
15558
|
+
}, [visibleCount, dayOffset]);
|
|
15559
|
+
const visibleDays = useMemo(
|
|
15560
|
+
() => weekDays.slice(dayOffset, dayOffset + visibleCount),
|
|
15561
|
+
[weekDays, dayOffset, visibleCount]
|
|
15562
|
+
);
|
|
15563
|
+
const canPrev = dayOffset > 0;
|
|
15564
|
+
const canNext = dayOffset + visibleCount < 7;
|
|
15565
|
+
const stepPrev = useCallback(() => {
|
|
15566
|
+
setDayOffset((d) => Math.max(0, d - visibleCount));
|
|
15567
|
+
}, [visibleCount]);
|
|
15568
|
+
const stepNext = useCallback(() => {
|
|
15569
|
+
setDayOffset((d) => Math.min(7 - visibleCount, d + visibleCount));
|
|
15570
|
+
}, [visibleCount]);
|
|
15571
|
+
const gridColsClass = visibleCount === 1 ? "grid-cols-2" : visibleCount === 3 ? "grid-cols-4" : "grid-cols-8";
|
|
15503
15572
|
const handleSlotClick = useCallback(
|
|
15504
15573
|
(day, time) => {
|
|
15505
15574
|
onSlotClick?.(day, time);
|
|
@@ -15551,93 +15620,124 @@ function CalendarGrid({
|
|
|
15551
15620
|
},
|
|
15552
15621
|
event.id
|
|
15553
15622
|
);
|
|
15554
|
-
return /* @__PURE__ */
|
|
15623
|
+
return /* @__PURE__ */ jsxs(
|
|
15555
15624
|
Box,
|
|
15556
15625
|
{
|
|
15557
|
-
className
|
|
15626
|
+
className,
|
|
15558
15627
|
...swipeLeftEvent || swipeRightEvent ? {
|
|
15559
15628
|
onPointerDown: swipe.onPointerDown,
|
|
15560
15629
|
onPointerMove: swipe.onPointerMove,
|
|
15561
15630
|
onPointerUp: swipe.onPointerUp,
|
|
15562
15631
|
onPointerCancel: swipe.onPointerCancel
|
|
15563
15632
|
} : {},
|
|
15564
|
-
children:
|
|
15565
|
-
/* @__PURE__ */ jsxs(
|
|
15566
|
-
/* @__PURE__ */ jsx(
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
|
|
15575
|
-
|
|
15576
|
-
|
|
15577
|
-
|
|
15578
|
-
|
|
15579
|
-
|
|
15580
|
-
|
|
15581
|
-
|
|
15582
|
-
|
|
15583
|
-
|
|
15584
|
-
|
|
15585
|
-
|
|
15586
|
-
|
|
15587
|
-
|
|
15588
|
-
|
|
15633
|
+
children: [
|
|
15634
|
+
visibleCount < 7 && /* @__PURE__ */ jsxs(HStack, { align: "center", justify: "between", className: "mb-2 px-2", children: [
|
|
15635
|
+
/* @__PURE__ */ jsx(
|
|
15636
|
+
Button,
|
|
15637
|
+
{
|
|
15638
|
+
variant: "ghost",
|
|
15639
|
+
size: "sm",
|
|
15640
|
+
icon: ChevronLeft,
|
|
15641
|
+
onClick: stepPrev,
|
|
15642
|
+
"aria-disabled": !canPrev || void 0,
|
|
15643
|
+
"aria-label": "Previous days",
|
|
15644
|
+
children: "Prev"
|
|
15645
|
+
}
|
|
15646
|
+
),
|
|
15647
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
15648
|
+
/* @__PURE__ */ jsx(
|
|
15649
|
+
Button,
|
|
15650
|
+
{
|
|
15651
|
+
variant: "ghost",
|
|
15652
|
+
size: "sm",
|
|
15653
|
+
iconRight: ChevronRight,
|
|
15654
|
+
onClick: stepNext,
|
|
15655
|
+
"aria-disabled": !canNext || void 0,
|
|
15656
|
+
"aria-label": "Next days",
|
|
15657
|
+
children: "Next"
|
|
15658
|
+
}
|
|
15659
|
+
)
|
|
15589
15660
|
] }),
|
|
15590
|
-
/* @__PURE__ */
|
|
15591
|
-
Box,
|
|
15592
|
-
|
|
15593
|
-
|
|
15594
|
-
|
|
15595
|
-
|
|
15596
|
-
|
|
15661
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
15662
|
+
/* @__PURE__ */ jsxs(Box, { className: cn("grid border-b border-border", gridColsClass), children: [
|
|
15663
|
+
/* @__PURE__ */ jsx(Box, { className: "p-2" }),
|
|
15664
|
+
visibleDays.map((day) => {
|
|
15665
|
+
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
15666
|
+
const count = eventsForDayCount(day);
|
|
15667
|
+
return /* @__PURE__ */ jsxs(
|
|
15668
|
+
Box,
|
|
15597
15669
|
{
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
|
|
15602
|
-
|
|
15603
|
-
|
|
15604
|
-
|
|
15605
|
-
|
|
15606
|
-
|
|
15607
|
-
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
15608
|
-
return /* @__PURE__ */ jsx(
|
|
15609
|
-
TimeSlotCell,
|
|
15610
|
-
{
|
|
15611
|
-
time,
|
|
15612
|
-
isOccupied: slotEvents.length > 0,
|
|
15613
|
-
onClick: () => handleSlotClick(day, time),
|
|
15614
|
-
className: cn(
|
|
15615
|
-
"border-l border-border",
|
|
15616
|
-
isToday && "bg-blue-50/30"
|
|
15670
|
+
className: "border-l border-border",
|
|
15671
|
+
children: [
|
|
15672
|
+
/* @__PURE__ */ jsx(
|
|
15673
|
+
DayCell,
|
|
15674
|
+
{
|
|
15675
|
+
date: day,
|
|
15676
|
+
isToday,
|
|
15677
|
+
onClick: onDayClick
|
|
15678
|
+
}
|
|
15617
15679
|
),
|
|
15618
|
-
|
|
15619
|
-
|
|
15620
|
-
|
|
15621
|
-
|
|
15622
|
-
|
|
15623
|
-
|
|
15624
|
-
|
|
15625
|
-
|
|
15626
|
-
|
|
15627
|
-
|
|
15628
|
-
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
|
|
15680
|
+
count > 0 && /* @__PURE__ */ jsx(Box, { className: "text-center pb-1", children: /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: count }) })
|
|
15681
|
+
]
|
|
15682
|
+
},
|
|
15683
|
+
day.toISOString()
|
|
15684
|
+
);
|
|
15685
|
+
})
|
|
15686
|
+
] }),
|
|
15687
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[500px] overflow-y-auto", children: resolvedTimeSlots.map((time) => /* @__PURE__ */ jsxs(
|
|
15688
|
+
Box,
|
|
15689
|
+
{
|
|
15690
|
+
className: cn("grid border-b border-border", gridColsClass),
|
|
15691
|
+
children: [
|
|
15692
|
+
/* @__PURE__ */ jsx(Box, { className: "p-2 text-right pr-3", children: /* @__PURE__ */ jsx(
|
|
15693
|
+
Typography,
|
|
15694
|
+
{
|
|
15695
|
+
variant: "small",
|
|
15696
|
+
className: "text-muted-foreground",
|
|
15697
|
+
children: time
|
|
15698
|
+
}
|
|
15699
|
+
) }),
|
|
15700
|
+
visibleDays.map((day) => {
|
|
15701
|
+
const slotEvents = events2.filter(
|
|
15702
|
+
(ev) => eventInSlot(ev, day, time)
|
|
15703
|
+
);
|
|
15704
|
+
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
15705
|
+
return /* @__PURE__ */ jsx(
|
|
15706
|
+
TimeSlotCell,
|
|
15707
|
+
{
|
|
15708
|
+
time,
|
|
15709
|
+
isOccupied: slotEvents.length > 0,
|
|
15710
|
+
onClick: () => handleSlotClick(day, time),
|
|
15711
|
+
className: cn(
|
|
15712
|
+
"border-l border-border",
|
|
15713
|
+
isToday && "bg-blue-50/30"
|
|
15714
|
+
),
|
|
15715
|
+
...longPressEvent ? {
|
|
15716
|
+
onPointerDown: () => startLongPress(day, time),
|
|
15717
|
+
onPointerUp: clearLongPress,
|
|
15718
|
+
onPointerCancel: clearLongPress
|
|
15719
|
+
} : {},
|
|
15720
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "xs", children: slotEvents.map(renderEvent) })
|
|
15721
|
+
},
|
|
15722
|
+
`${day.toISOString()}-${time}`
|
|
15723
|
+
);
|
|
15724
|
+
})
|
|
15725
|
+
]
|
|
15726
|
+
},
|
|
15727
|
+
time
|
|
15728
|
+
)) })
|
|
15729
|
+
] })
|
|
15730
|
+
]
|
|
15633
15731
|
}
|
|
15634
15732
|
);
|
|
15635
15733
|
}
|
|
15734
|
+
var SHORT_DATE;
|
|
15636
15735
|
var init_CalendarGrid = __esm({
|
|
15637
15736
|
"components/molecules/CalendarGrid.tsx"() {
|
|
15638
15737
|
"use client";
|
|
15639
15738
|
init_cn();
|
|
15640
15739
|
init_Box();
|
|
15740
|
+
init_Button();
|
|
15641
15741
|
init_Stack();
|
|
15642
15742
|
init_Typography();
|
|
15643
15743
|
init_Badge();
|
|
@@ -15645,6 +15745,7 @@ var init_CalendarGrid = __esm({
|
|
|
15645
15745
|
init_TimeSlotCell();
|
|
15646
15746
|
init_useEventBus();
|
|
15647
15747
|
init_useSwipeGesture();
|
|
15748
|
+
SHORT_DATE = { month: "short", day: "numeric" };
|
|
15648
15749
|
CalendarGrid.displayName = "CalendarGrid";
|
|
15649
15750
|
}
|
|
15650
15751
|
});
|
|
@@ -18852,9 +18953,9 @@ var init_Tabs = __esm({
|
|
|
18852
18953
|
className
|
|
18853
18954
|
}) => {
|
|
18854
18955
|
const rawItems = items ?? tabs ?? [];
|
|
18855
|
-
const safeItems = rawItems.map((
|
|
18856
|
-
...
|
|
18857
|
-
id:
|
|
18956
|
+
const safeItems = rawItems.map(({ id, value, ...rest }) => ({
|
|
18957
|
+
...rest,
|
|
18958
|
+
id: id || value || ""
|
|
18858
18959
|
}));
|
|
18859
18960
|
const eventBus = useEventBus();
|
|
18860
18961
|
const { t } = useTranslate();
|
|
@@ -18923,7 +19024,12 @@ var init_Tabs = __esm({
|
|
|
18923
19024
|
role: "tablist",
|
|
18924
19025
|
className: cn(
|
|
18925
19026
|
"flex",
|
|
18926
|
-
|
|
19027
|
+
// Horizontal tab strip becomes a horizontally-scrollable lane
|
|
19028
|
+
// below its container width — phones with many tabs scroll
|
|
19029
|
+
// instead of clipping. `snap-x` snaps to each tab; the
|
|
19030
|
+
// scrollbar is hidden for a cleaner affordance (the swipe
|
|
19031
|
+
// gesture is the discoverability cue).
|
|
19032
|
+
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",
|
|
18927
19033
|
variant === "pills" && "gap-1 p-1 bg-muted border-0 rounded-md",
|
|
18928
19034
|
variant === "underline" && orientation === "vertical" && "border-b-0"
|
|
18929
19035
|
),
|
|
@@ -18945,7 +19051,8 @@ var init_Tabs = __esm({
|
|
|
18945
19051
|
onKeyDown: (e) => handleKeyDown(e, index),
|
|
18946
19052
|
"data-active": isActive,
|
|
18947
19053
|
className: cn(
|
|
18948
|
-
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all",
|
|
19054
|
+
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all whitespace-nowrap",
|
|
19055
|
+
orientation === "horizontal" && "snap-start shrink-0",
|
|
18949
19056
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
18950
19057
|
isDisabled && "opacity-50 cursor-not-allowed",
|
|
18951
19058
|
variantClasses2[variant],
|
|
@@ -19842,7 +19949,7 @@ function CraftingRecipe({
|
|
|
19842
19949
|
className
|
|
19843
19950
|
}) {
|
|
19844
19951
|
const eventBus = useEventBus();
|
|
19845
|
-
const handleCraft =
|
|
19952
|
+
const handleCraft = React78.useCallback(() => {
|
|
19846
19953
|
onCraft?.();
|
|
19847
19954
|
if (craftEvent) {
|
|
19848
19955
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -19859,7 +19966,7 @@ function CraftingRecipe({
|
|
|
19859
19966
|
children: [
|
|
19860
19967
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
19861
19968
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
19862
|
-
return /* @__PURE__ */ jsxs(
|
|
19969
|
+
return /* @__PURE__ */ jsxs(React78.Fragment, { children: [
|
|
19863
19970
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
19864
19971
|
ItemSlot,
|
|
19865
19972
|
{
|
|
@@ -19922,8 +20029,8 @@ function DPad({
|
|
|
19922
20029
|
}) {
|
|
19923
20030
|
const eventBus = useEventBus();
|
|
19924
20031
|
const sizes = sizeMap6[size];
|
|
19925
|
-
const [activeDirections, setActiveDirections] =
|
|
19926
|
-
const handlePress =
|
|
20032
|
+
const [activeDirections, setActiveDirections] = React78.useState(/* @__PURE__ */ new Set());
|
|
20033
|
+
const handlePress = React78.useCallback(
|
|
19927
20034
|
(direction) => {
|
|
19928
20035
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
19929
20036
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -19931,7 +20038,7 @@ function DPad({
|
|
|
19931
20038
|
},
|
|
19932
20039
|
[directionEvent, eventBus, onDirection]
|
|
19933
20040
|
);
|
|
19934
|
-
const handleRelease =
|
|
20041
|
+
const handleRelease = React78.useCallback(
|
|
19935
20042
|
(direction) => {
|
|
19936
20043
|
setActiveDirections((prev) => {
|
|
19937
20044
|
const next = new Set(prev);
|
|
@@ -20525,14 +20632,14 @@ function useDataDnd(args) {
|
|
|
20525
20632
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
20526
20633
|
const enabled = isZone || Boolean(dndRoot);
|
|
20527
20634
|
const eventBus = useEventBus();
|
|
20528
|
-
const parentRoot =
|
|
20635
|
+
const parentRoot = React78__default.useContext(RootCtx);
|
|
20529
20636
|
const isRoot = enabled && parentRoot === null;
|
|
20530
|
-
const zoneId =
|
|
20637
|
+
const zoneId = React78__default.useId();
|
|
20531
20638
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
20532
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
20533
|
-
const optimisticOrdersRef =
|
|
20639
|
+
const [optimisticOrders, setOptimisticOrders] = React78__default.useState(() => /* @__PURE__ */ new Map());
|
|
20640
|
+
const optimisticOrdersRef = React78__default.useRef(optimisticOrders);
|
|
20534
20641
|
optimisticOrdersRef.current = optimisticOrders;
|
|
20535
|
-
const clearOptimisticOrder =
|
|
20642
|
+
const clearOptimisticOrder = React78__default.useCallback((group) => {
|
|
20536
20643
|
setOptimisticOrders((prev) => {
|
|
20537
20644
|
if (!prev.has(group)) return prev;
|
|
20538
20645
|
const next = new Map(prev);
|
|
@@ -20557,16 +20664,15 @@ function useDataDnd(args) {
|
|
|
20557
20664
|
const raw = it[dndItemIdField];
|
|
20558
20665
|
return String(raw ?? `__idx_${idx}`);
|
|
20559
20666
|
}).join("|");
|
|
20560
|
-
const itemIds =
|
|
20667
|
+
const itemIds = React78__default.useMemo(
|
|
20561
20668
|
() => orderedItems.map((it, idx) => {
|
|
20562
20669
|
const raw = it[dndItemIdField];
|
|
20563
20670
|
return raw ?? `__idx_${idx}`;
|
|
20564
20671
|
}),
|
|
20565
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
20566
20672
|
[itemIdsSignature]
|
|
20567
20673
|
);
|
|
20568
20674
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
20569
|
-
|
|
20675
|
+
React78__default.useEffect(() => {
|
|
20570
20676
|
const root = isRoot ? null : parentRoot;
|
|
20571
20677
|
if (root) {
|
|
20572
20678
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -20574,20 +20680,20 @@ function useDataDnd(args) {
|
|
|
20574
20680
|
clearOptimisticOrder(ownGroup);
|
|
20575
20681
|
}
|
|
20576
20682
|
}, [itemsContentSig, ownGroup]);
|
|
20577
|
-
const zonesRef =
|
|
20578
|
-
const registerZone =
|
|
20683
|
+
const zonesRef = React78__default.useRef(/* @__PURE__ */ new Map());
|
|
20684
|
+
const registerZone = React78__default.useCallback((zoneId2, meta2) => {
|
|
20579
20685
|
zonesRef.current.set(zoneId2, meta2);
|
|
20580
20686
|
}, []);
|
|
20581
|
-
const unregisterZone =
|
|
20687
|
+
const unregisterZone = React78__default.useCallback((zoneId2) => {
|
|
20582
20688
|
zonesRef.current.delete(zoneId2);
|
|
20583
20689
|
}, []);
|
|
20584
|
-
const [activeDrag, setActiveDrag] =
|
|
20585
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
20586
|
-
const meta =
|
|
20690
|
+
const [activeDrag, setActiveDrag] = React78__default.useState(null);
|
|
20691
|
+
const [overZoneGroup, setOverZoneGroup] = React78__default.useState(null);
|
|
20692
|
+
const meta = React78__default.useMemo(
|
|
20587
20693
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
20588
20694
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
20589
20695
|
);
|
|
20590
|
-
|
|
20696
|
+
React78__default.useEffect(() => {
|
|
20591
20697
|
const target = isRoot ? null : parentRoot;
|
|
20592
20698
|
if (!target) {
|
|
20593
20699
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -20606,7 +20712,7 @@ function useDataDnd(args) {
|
|
|
20606
20712
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
20607
20713
|
const sensors = useAlmadarDndSensors(true);
|
|
20608
20714
|
const collisionDetection = almadarDndCollisionDetection;
|
|
20609
|
-
const findZoneByItem =
|
|
20715
|
+
const findZoneByItem = React78__default.useCallback(
|
|
20610
20716
|
(id) => {
|
|
20611
20717
|
for (const z of zonesRef.current.values()) {
|
|
20612
20718
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -20615,7 +20721,7 @@ function useDataDnd(args) {
|
|
|
20615
20721
|
},
|
|
20616
20722
|
[]
|
|
20617
20723
|
);
|
|
20618
|
-
|
|
20724
|
+
React78__default.useCallback(
|
|
20619
20725
|
(group) => {
|
|
20620
20726
|
for (const z of zonesRef.current.values()) {
|
|
20621
20727
|
if (z.group === group) return z;
|
|
@@ -20624,7 +20730,7 @@ function useDataDnd(args) {
|
|
|
20624
20730
|
},
|
|
20625
20731
|
[]
|
|
20626
20732
|
);
|
|
20627
|
-
const handleDragEnd =
|
|
20733
|
+
const handleDragEnd = React78__default.useCallback(
|
|
20628
20734
|
(event) => {
|
|
20629
20735
|
const { active, over } = event;
|
|
20630
20736
|
const activeIdStr = String(active.id);
|
|
@@ -20715,8 +20821,8 @@ function useDataDnd(args) {
|
|
|
20715
20821
|
},
|
|
20716
20822
|
[eventBus]
|
|
20717
20823
|
);
|
|
20718
|
-
const sortableData =
|
|
20719
|
-
const SortableItem =
|
|
20824
|
+
const sortableData = React78__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
20825
|
+
const SortableItem = React78__default.useCallback(
|
|
20720
20826
|
({ id, children }) => {
|
|
20721
20827
|
const {
|
|
20722
20828
|
attributes,
|
|
@@ -20756,7 +20862,7 @@ function useDataDnd(args) {
|
|
|
20756
20862
|
id: droppableId,
|
|
20757
20863
|
data: sortableData
|
|
20758
20864
|
});
|
|
20759
|
-
const ctx =
|
|
20865
|
+
const ctx = React78__default.useContext(RootCtx);
|
|
20760
20866
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
20761
20867
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
20762
20868
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -20771,7 +20877,7 @@ function useDataDnd(args) {
|
|
|
20771
20877
|
showForeignPlaceholder,
|
|
20772
20878
|
ctxAvailable: ctx != null
|
|
20773
20879
|
});
|
|
20774
|
-
|
|
20880
|
+
React78__default.useEffect(() => {
|
|
20775
20881
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
20776
20882
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
20777
20883
|
return /* @__PURE__ */ jsx(
|
|
@@ -20785,11 +20891,11 @@ function useDataDnd(args) {
|
|
|
20785
20891
|
}
|
|
20786
20892
|
);
|
|
20787
20893
|
};
|
|
20788
|
-
const rootContextValue =
|
|
20894
|
+
const rootContextValue = React78__default.useMemo(
|
|
20789
20895
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
20790
20896
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
20791
20897
|
);
|
|
20792
|
-
const handleDragStart =
|
|
20898
|
+
const handleDragStart = React78__default.useCallback((event) => {
|
|
20793
20899
|
const sourceZone = findZoneByItem(event.active.id);
|
|
20794
20900
|
const rect = event.active.rect.current.initial;
|
|
20795
20901
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -20808,7 +20914,7 @@ function useDataDnd(args) {
|
|
|
20808
20914
|
isRoot
|
|
20809
20915
|
});
|
|
20810
20916
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
20811
|
-
const handleDragOver =
|
|
20917
|
+
const handleDragOver = React78__default.useCallback((event) => {
|
|
20812
20918
|
const { active, over } = event;
|
|
20813
20919
|
const overData = over?.data?.current;
|
|
20814
20920
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -20878,7 +20984,7 @@ function useDataDnd(args) {
|
|
|
20878
20984
|
return next;
|
|
20879
20985
|
});
|
|
20880
20986
|
}, []);
|
|
20881
|
-
const handleDragCancel =
|
|
20987
|
+
const handleDragCancel = React78__default.useCallback((event) => {
|
|
20882
20988
|
setActiveDrag(null);
|
|
20883
20989
|
setOverZoneGroup(null);
|
|
20884
20990
|
dndLog.warn("dragCancel", {
|
|
@@ -20886,12 +20992,12 @@ function useDataDnd(args) {
|
|
|
20886
20992
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
20887
20993
|
});
|
|
20888
20994
|
}, []);
|
|
20889
|
-
const handleDragEndWithCleanup =
|
|
20995
|
+
const handleDragEndWithCleanup = React78__default.useCallback((event) => {
|
|
20890
20996
|
handleDragEnd(event);
|
|
20891
20997
|
setActiveDrag(null);
|
|
20892
20998
|
setOverZoneGroup(null);
|
|
20893
20999
|
}, [handleDragEnd]);
|
|
20894
|
-
const wrapContainer =
|
|
21000
|
+
const wrapContainer = React78__default.useCallback(
|
|
20895
21001
|
(children) => {
|
|
20896
21002
|
if (!enabled) return children;
|
|
20897
21003
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -20945,7 +21051,7 @@ var init_useDataDnd = __esm({
|
|
|
20945
21051
|
init_useAlmadarDndCollision();
|
|
20946
21052
|
init_Box();
|
|
20947
21053
|
dndLog = createLogger("almadar:ui:dnd");
|
|
20948
|
-
RootCtx =
|
|
21054
|
+
RootCtx = React78__default.createContext(null);
|
|
20949
21055
|
}
|
|
20950
21056
|
});
|
|
20951
21057
|
function fieldLabel2(key) {
|
|
@@ -21434,7 +21540,7 @@ function DataList({
|
|
|
21434
21540
|
}) {
|
|
21435
21541
|
const eventBus = useEventBus();
|
|
21436
21542
|
const { t } = useTranslate();
|
|
21437
|
-
const [visibleCount, setVisibleCount] =
|
|
21543
|
+
const [visibleCount, setVisibleCount] = React78__default.useState(pageSize || Infinity);
|
|
21438
21544
|
const fieldDefs = fields ?? columns ?? [];
|
|
21439
21545
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
21440
21546
|
const dnd = useDataDnd({
|
|
@@ -21453,7 +21559,7 @@ function DataList({
|
|
|
21453
21559
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
21454
21560
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
21455
21561
|
const hasRenderProp = typeof children === "function";
|
|
21456
|
-
|
|
21562
|
+
React78__default.useEffect(() => {
|
|
21457
21563
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
21458
21564
|
const childrenTypeOf = typeof children;
|
|
21459
21565
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -21510,7 +21616,7 @@ function DataList({
|
|
|
21510
21616
|
const items2 = data.map((item) => item);
|
|
21511
21617
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
21512
21618
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
21513
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
21619
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
21514
21620
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
21515
21621
|
group.items.map((itemData, index) => {
|
|
21516
21622
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -21698,7 +21804,7 @@ function DataList({
|
|
|
21698
21804
|
className
|
|
21699
21805
|
),
|
|
21700
21806
|
children: [
|
|
21701
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
21807
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
21702
21808
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
21703
21809
|
group.items.map(
|
|
21704
21810
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -22164,7 +22270,16 @@ var init_FilterGroup = __esm({
|
|
|
22164
22270
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
22165
22271
|
}
|
|
22166
22272
|
)
|
|
22167
|
-
] }) : /* @__PURE__ */ jsx(
|
|
22273
|
+
] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
|
|
22274
|
+
Input,
|
|
22275
|
+
{
|
|
22276
|
+
value: selectedValues[filter.field] || "",
|
|
22277
|
+
onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
|
|
22278
|
+
placeholder: filter.label,
|
|
22279
|
+
clearable: true,
|
|
22280
|
+
onClear: () => handleFilterSelect(filter.field, null)
|
|
22281
|
+
}
|
|
22282
|
+
) : /* @__PURE__ */ jsx(
|
|
22168
22283
|
Select,
|
|
22169
22284
|
{
|
|
22170
22285
|
value: selectedValues[filter.field] || "all",
|
|
@@ -22231,7 +22346,17 @@ var init_FilterGroup = __esm({
|
|
|
22231
22346
|
className: "text-sm min-w-[100px]"
|
|
22232
22347
|
}
|
|
22233
22348
|
)
|
|
22234
|
-
] }) : /* @__PURE__ */ jsx(
|
|
22349
|
+
] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
|
|
22350
|
+
Input,
|
|
22351
|
+
{
|
|
22352
|
+
value: selectedValues[filter.field] || "",
|
|
22353
|
+
onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
|
|
22354
|
+
placeholder: filter.label,
|
|
22355
|
+
clearable: true,
|
|
22356
|
+
onClear: () => handleFilterSelect(filter.field, null),
|
|
22357
|
+
className: "text-sm"
|
|
22358
|
+
}
|
|
22359
|
+
) : /* @__PURE__ */ jsx(
|
|
22235
22360
|
Select,
|
|
22236
22361
|
{
|
|
22237
22362
|
value: selectedValues[filter.field] || "all",
|
|
@@ -22336,7 +22461,17 @@ var init_FilterGroup = __esm({
|
|
|
22336
22461
|
className: "min-w-[130px]"
|
|
22337
22462
|
}
|
|
22338
22463
|
)
|
|
22339
|
-
] }) : /* @__PURE__ */ jsx(
|
|
22464
|
+
] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsx(
|
|
22465
|
+
Input,
|
|
22466
|
+
{
|
|
22467
|
+
value: selectedValues[filter.field] || "",
|
|
22468
|
+
onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
|
|
22469
|
+
placeholder: filter.label,
|
|
22470
|
+
clearable: true,
|
|
22471
|
+
onClear: () => handleFilterSelect(filter.field, null),
|
|
22472
|
+
className: "min-w-[160px]"
|
|
22473
|
+
}
|
|
22474
|
+
) : /* @__PURE__ */ jsx(
|
|
22340
22475
|
Select,
|
|
22341
22476
|
{
|
|
22342
22477
|
value: selectedValues[filter.field] || "all",
|
|
@@ -22906,6 +23041,8 @@ var SidePanel;
|
|
|
22906
23041
|
var init_SidePanel = __esm({
|
|
22907
23042
|
"components/molecules/SidePanel.tsx"() {
|
|
22908
23043
|
"use client";
|
|
23044
|
+
init_Aside();
|
|
23045
|
+
init_Box();
|
|
22909
23046
|
init_Button();
|
|
22910
23047
|
init_Typography();
|
|
22911
23048
|
init_cn();
|
|
@@ -22915,7 +23052,7 @@ var init_SidePanel = __esm({
|
|
|
22915
23052
|
children,
|
|
22916
23053
|
isOpen,
|
|
22917
23054
|
onClose,
|
|
22918
|
-
width = "w-96",
|
|
23055
|
+
width = "w-full sm:w-96",
|
|
22919
23056
|
position = "right",
|
|
22920
23057
|
showOverlay = true,
|
|
22921
23058
|
className,
|
|
@@ -22929,14 +23066,14 @@ var init_SidePanel = __esm({
|
|
|
22929
23066
|
if (!isOpen) return null;
|
|
22930
23067
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22931
23068
|
showOverlay && /* @__PURE__ */ jsx(
|
|
22932
|
-
|
|
23069
|
+
Box,
|
|
22933
23070
|
{
|
|
22934
23071
|
className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
|
|
22935
23072
|
onClick: handleClose
|
|
22936
23073
|
}
|
|
22937
23074
|
),
|
|
22938
23075
|
/* @__PURE__ */ jsxs(
|
|
22939
|
-
|
|
23076
|
+
Aside,
|
|
22940
23077
|
{
|
|
22941
23078
|
className: cn(
|
|
22942
23079
|
"fixed top-16 lg:top-0 bottom-0 z-[60]",
|
|
@@ -22950,7 +23087,7 @@ var init_SidePanel = __esm({
|
|
|
22950
23087
|
className
|
|
22951
23088
|
),
|
|
22952
23089
|
children: [
|
|
22953
|
-
/* @__PURE__ */ jsxs(
|
|
23090
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
|
|
22954
23091
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
|
|
22955
23092
|
/* @__PURE__ */ jsx(
|
|
22956
23093
|
Button,
|
|
@@ -22960,11 +23097,11 @@ var init_SidePanel = __esm({
|
|
|
22960
23097
|
icon: X,
|
|
22961
23098
|
onClick: handleClose,
|
|
22962
23099
|
"aria-label": "Close panel",
|
|
22963
|
-
children: /* @__PURE__ */ jsx("span",
|
|
23100
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
22964
23101
|
}
|
|
22965
23102
|
)
|
|
22966
23103
|
] }),
|
|
22967
|
-
/* @__PURE__ */ jsx(
|
|
23104
|
+
/* @__PURE__ */ jsx(Box, { className: "p-4 flex-1 overflow-y-auto", children })
|
|
22968
23105
|
]
|
|
22969
23106
|
}
|
|
22970
23107
|
)
|
|
@@ -23015,7 +23152,7 @@ var init_WizardProgress = __esm({
|
|
|
23015
23152
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
23016
23153
|
const isActive = index === currentStep;
|
|
23017
23154
|
const isCompleted = index < currentStep;
|
|
23018
|
-
return /* @__PURE__ */ jsxs(
|
|
23155
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
23019
23156
|
/* @__PURE__ */ jsx(
|
|
23020
23157
|
"button",
|
|
23021
23158
|
{
|
|
@@ -23140,7 +23277,9 @@ var init_WizardNavigation = __esm({
|
|
|
23140
23277
|
{
|
|
23141
23278
|
border: true,
|
|
23142
23279
|
className: cn(
|
|
23143
|
-
|
|
23280
|
+
// `flex-wrap gap-2` lets the Back / Step / Next trio reflow on
|
|
23281
|
+
// narrow viewports rather than crushing the step counter.
|
|
23282
|
+
"border-t-2 border-x-0 border-b-0 border-border flex flex-wrap gap-2 justify-between items-center",
|
|
23144
23283
|
compact ? "px-4 py-2" : "px-6 py-4",
|
|
23145
23284
|
className
|
|
23146
23285
|
),
|
|
@@ -24060,9 +24199,9 @@ function ScoreDisplay({
|
|
|
24060
24199
|
...rest
|
|
24061
24200
|
}) {
|
|
24062
24201
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
24063
|
-
const [displayValue, setDisplayValue] =
|
|
24064
|
-
const [isAnimating, setIsAnimating] =
|
|
24065
|
-
|
|
24202
|
+
const [displayValue, setDisplayValue] = React78.useState(resolvedValue);
|
|
24203
|
+
const [isAnimating, setIsAnimating] = React78.useState(false);
|
|
24204
|
+
React78.useEffect(() => {
|
|
24066
24205
|
if (!animated || displayValue === resolvedValue) {
|
|
24067
24206
|
setDisplayValue(resolvedValue);
|
|
24068
24207
|
return;
|
|
@@ -24212,7 +24351,7 @@ function InventoryGrid({
|
|
|
24212
24351
|
const eventBus = useEventBus();
|
|
24213
24352
|
const slotCount = totalSlots ?? items.length;
|
|
24214
24353
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
24215
|
-
const handleSelect =
|
|
24354
|
+
const handleSelect = React78.useCallback(
|
|
24216
24355
|
(id) => {
|
|
24217
24356
|
onSelect?.(id);
|
|
24218
24357
|
if (selectEvent) {
|
|
@@ -24494,15 +24633,15 @@ function GameCanvas2D({
|
|
|
24494
24633
|
fps = 60,
|
|
24495
24634
|
className
|
|
24496
24635
|
}) {
|
|
24497
|
-
const canvasRef =
|
|
24498
|
-
const rafRef =
|
|
24499
|
-
const frameRef =
|
|
24500
|
-
const lastTimeRef =
|
|
24501
|
-
const onDrawRef =
|
|
24636
|
+
const canvasRef = React78.useRef(null);
|
|
24637
|
+
const rafRef = React78.useRef(0);
|
|
24638
|
+
const frameRef = React78.useRef(0);
|
|
24639
|
+
const lastTimeRef = React78.useRef(0);
|
|
24640
|
+
const onDrawRef = React78.useRef(onDraw);
|
|
24502
24641
|
onDrawRef.current = onDraw;
|
|
24503
|
-
const onTickRef =
|
|
24642
|
+
const onTickRef = React78.useRef(onTick);
|
|
24504
24643
|
onTickRef.current = onTick;
|
|
24505
|
-
|
|
24644
|
+
React78.useEffect(() => {
|
|
24506
24645
|
const canvas = canvasRef.current;
|
|
24507
24646
|
if (!canvas) return;
|
|
24508
24647
|
const ctx = canvas.getContext("2d");
|
|
@@ -24843,7 +24982,7 @@ function TurnPanel({
|
|
|
24843
24982
|
className
|
|
24844
24983
|
}) {
|
|
24845
24984
|
const eventBus = useEventBus();
|
|
24846
|
-
const handleAction =
|
|
24985
|
+
const handleAction = React78.useCallback(
|
|
24847
24986
|
(event) => {
|
|
24848
24987
|
if (event) {
|
|
24849
24988
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -24989,7 +25128,7 @@ function UnitCommandBar({
|
|
|
24989
25128
|
className
|
|
24990
25129
|
}) {
|
|
24991
25130
|
const eventBus = useEventBus();
|
|
24992
|
-
const handleCommand =
|
|
25131
|
+
const handleCommand = React78.useCallback(
|
|
24993
25132
|
(event) => {
|
|
24994
25133
|
if (event) {
|
|
24995
25134
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -25474,7 +25613,7 @@ function GameMenu({
|
|
|
25474
25613
|
} catch {
|
|
25475
25614
|
}
|
|
25476
25615
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25477
|
-
const handleOptionClick =
|
|
25616
|
+
const handleOptionClick = React78.useCallback(
|
|
25478
25617
|
(option) => {
|
|
25479
25618
|
if (option.event && eventBus) {
|
|
25480
25619
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -25588,7 +25727,7 @@ function GameOverScreen({
|
|
|
25588
25727
|
} catch {
|
|
25589
25728
|
}
|
|
25590
25729
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25591
|
-
const handleActionClick =
|
|
25730
|
+
const handleActionClick = React78.useCallback(
|
|
25592
25731
|
(action) => {
|
|
25593
25732
|
if (action.event && eventBus) {
|
|
25594
25733
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -28269,7 +28408,7 @@ var init_StepFlow = __esm({
|
|
|
28269
28408
|
className
|
|
28270
28409
|
}) => {
|
|
28271
28410
|
if (orientation === "vertical") {
|
|
28272
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
28411
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React78__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
28273
28412
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
28274
28413
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28275
28414
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -28280,7 +28419,7 @@ var init_StepFlow = __esm({
|
|
|
28280
28419
|
] })
|
|
28281
28420
|
] }) }, index)) });
|
|
28282
28421
|
}
|
|
28283
|
-
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(
|
|
28422
|
+
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(React78__default.Fragment, { children: [
|
|
28284
28423
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
28285
28424
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28286
28425
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -28348,9 +28487,9 @@ var init_SplitSection = __esm({
|
|
|
28348
28487
|
className
|
|
28349
28488
|
),
|
|
28350
28489
|
padding: "lg",
|
|
28351
|
-
children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col
|
|
28352
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
28353
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
28490
|
+
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: [
|
|
28491
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:min-w-[45%]", children: textContent }),
|
|
28492
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:max-w-[50%]", children: mediaContent })
|
|
28354
28493
|
] })
|
|
28355
28494
|
}
|
|
28356
28495
|
);
|
|
@@ -29162,7 +29301,7 @@ var init_LikertScale = __esm({
|
|
|
29162
29301
|
md: "text-base",
|
|
29163
29302
|
lg: "text-lg"
|
|
29164
29303
|
};
|
|
29165
|
-
LikertScale =
|
|
29304
|
+
LikertScale = React78__default.forwardRef(
|
|
29166
29305
|
({
|
|
29167
29306
|
question,
|
|
29168
29307
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -29174,7 +29313,7 @@ var init_LikertScale = __esm({
|
|
|
29174
29313
|
variant = "radios",
|
|
29175
29314
|
className
|
|
29176
29315
|
}, ref) => {
|
|
29177
|
-
const groupId =
|
|
29316
|
+
const groupId = React78__default.useId();
|
|
29178
29317
|
const eventBus = useEventBus();
|
|
29179
29318
|
const handleSelect = useCallback(
|
|
29180
29319
|
(next) => {
|
|
@@ -31178,7 +31317,7 @@ var init_VersionDiff = __esm({
|
|
|
31178
31317
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
31179
31318
|
/* @__PURE__ */ jsx(Icon, { icon: GitCommit, size: "sm", className: "text-muted-foreground" }),
|
|
31180
31319
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
31181
|
-
/* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
31320
|
+
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
31182
31321
|
Select,
|
|
31183
31322
|
{
|
|
31184
31323
|
options,
|
|
@@ -31188,7 +31327,7 @@ var init_VersionDiff = __esm({
|
|
|
31188
31327
|
}
|
|
31189
31328
|
) }),
|
|
31190
31329
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
31191
|
-
/* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
31330
|
+
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
31192
31331
|
Select,
|
|
31193
31332
|
{
|
|
31194
31333
|
options,
|
|
@@ -31253,8 +31392,8 @@ var init_VersionDiff = __esm({
|
|
|
31253
31392
|
]
|
|
31254
31393
|
}
|
|
31255
31394
|
),
|
|
31256
|
-
/* @__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: [
|
|
31257
|
-
/* @__PURE__ */ jsx(Box, { className: "border-r border-border", children: /* @__PURE__ */ jsx(VStack, { gap: "none", className: "font-mono text-xs", children: beforeLines.map((line, idx) => {
|
|
31395
|
+
/* @__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: [
|
|
31396
|
+
/* @__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) => {
|
|
31258
31397
|
const isRemoved = line.type === "removed";
|
|
31259
31398
|
return /* @__PURE__ */ jsxs(
|
|
31260
31399
|
HStack,
|
|
@@ -31400,7 +31539,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
31400
31539
|
"aria-label": "Breadcrumb",
|
|
31401
31540
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
31402
31541
|
const isLast = idx === items.length - 1;
|
|
31403
|
-
return /* @__PURE__ */ jsxs(
|
|
31542
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
31404
31543
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
31405
31544
|
Icon,
|
|
31406
31545
|
{
|
|
@@ -32290,7 +32429,7 @@ var init_MiniStateMachine = __esm({
|
|
|
32290
32429
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
32291
32430
|
const tc = transitionCounts[s.name] ?? 0;
|
|
32292
32431
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
32293
|
-
return /* @__PURE__ */ jsxs(
|
|
32432
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
32294
32433
|
/* @__PURE__ */ jsx(
|
|
32295
32434
|
AvlState,
|
|
32296
32435
|
{
|
|
@@ -33804,7 +33943,7 @@ var init_DocumentViewer = __esm({
|
|
|
33804
33943
|
}
|
|
33805
33944
|
});
|
|
33806
33945
|
function extractTitle(children) {
|
|
33807
|
-
if (!
|
|
33946
|
+
if (!React78__default.isValidElement(children)) return void 0;
|
|
33808
33947
|
const props = children.props;
|
|
33809
33948
|
if (typeof props.title === "string") {
|
|
33810
33949
|
return props.title;
|
|
@@ -33916,7 +34055,7 @@ function LinearView({
|
|
|
33916
34055
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
33917
34056
|
const isDone = i < currentIdx;
|
|
33918
34057
|
const isCurrent = i === currentIdx;
|
|
33919
|
-
return /* @__PURE__ */ jsxs(
|
|
34058
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
33920
34059
|
i > 0 && /* @__PURE__ */ jsx(
|
|
33921
34060
|
Typography,
|
|
33922
34061
|
{
|
|
@@ -34817,12 +34956,12 @@ var init_Form = __esm({
|
|
|
34817
34956
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
34818
34957
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
34819
34958
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
34820
|
-
const normalizedInitialData =
|
|
34959
|
+
const normalizedInitialData = React78__default.useMemo(() => {
|
|
34821
34960
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
34822
34961
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
34823
34962
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
34824
34963
|
}, [entity, initialData]);
|
|
34825
|
-
const entityDerivedFields =
|
|
34964
|
+
const entityDerivedFields = React78__default.useMemo(() => {
|
|
34826
34965
|
if (fields && fields.length > 0) return void 0;
|
|
34827
34966
|
if (!resolvedEntity) return void 0;
|
|
34828
34967
|
return resolvedEntity.fields.map(
|
|
@@ -34841,16 +34980,16 @@ var init_Form = __esm({
|
|
|
34841
34980
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
34842
34981
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
34843
34982
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
34844
|
-
const [formData, setFormData] =
|
|
34983
|
+
const [formData, setFormData] = React78__default.useState(
|
|
34845
34984
|
normalizedInitialData
|
|
34846
34985
|
);
|
|
34847
|
-
const [collapsedSections, setCollapsedSections] =
|
|
34986
|
+
const [collapsedSections, setCollapsedSections] = React78__default.useState(
|
|
34848
34987
|
/* @__PURE__ */ new Set()
|
|
34849
34988
|
);
|
|
34850
|
-
const [submitError, setSubmitError] =
|
|
34851
|
-
const formRef =
|
|
34989
|
+
const [submitError, setSubmitError] = React78__default.useState(null);
|
|
34990
|
+
const formRef = React78__default.useRef(null);
|
|
34852
34991
|
const formMode = props.mode;
|
|
34853
|
-
const mountedRef =
|
|
34992
|
+
const mountedRef = React78__default.useRef(false);
|
|
34854
34993
|
if (!mountedRef.current) {
|
|
34855
34994
|
mountedRef.current = true;
|
|
34856
34995
|
debug("forms", "mount", {
|
|
@@ -34863,7 +35002,7 @@ var init_Form = __esm({
|
|
|
34863
35002
|
});
|
|
34864
35003
|
}
|
|
34865
35004
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
34866
|
-
const evalContext =
|
|
35005
|
+
const evalContext = React78__default.useMemo(
|
|
34867
35006
|
() => ({
|
|
34868
35007
|
formValues: formData,
|
|
34869
35008
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -34872,7 +35011,7 @@ var init_Form = __esm({
|
|
|
34872
35011
|
}),
|
|
34873
35012
|
[formData, externalContext]
|
|
34874
35013
|
);
|
|
34875
|
-
|
|
35014
|
+
React78__default.useEffect(() => {
|
|
34876
35015
|
debug("forms", "initialData-sync", {
|
|
34877
35016
|
mode: formMode,
|
|
34878
35017
|
normalizedInitialData,
|
|
@@ -34883,7 +35022,7 @@ var init_Form = __esm({
|
|
|
34883
35022
|
setFormData(normalizedInitialData);
|
|
34884
35023
|
}
|
|
34885
35024
|
}, [normalizedInitialData]);
|
|
34886
|
-
const processCalculations =
|
|
35025
|
+
const processCalculations = React78__default.useCallback(
|
|
34887
35026
|
(changedFieldId, newFormData) => {
|
|
34888
35027
|
if (!hiddenCalculations.length) return;
|
|
34889
35028
|
const context = {
|
|
@@ -34908,7 +35047,7 @@ var init_Form = __esm({
|
|
|
34908
35047
|
},
|
|
34909
35048
|
[hiddenCalculations, externalContext, eventBus]
|
|
34910
35049
|
);
|
|
34911
|
-
const checkViolations =
|
|
35050
|
+
const checkViolations = React78__default.useCallback(
|
|
34912
35051
|
(changedFieldId, newFormData) => {
|
|
34913
35052
|
if (!violationTriggers.length) return;
|
|
34914
35053
|
const context = {
|
|
@@ -34946,7 +35085,7 @@ var init_Form = __esm({
|
|
|
34946
35085
|
processCalculations(name, newFormData);
|
|
34947
35086
|
checkViolations(name, newFormData);
|
|
34948
35087
|
};
|
|
34949
|
-
const isFieldVisible =
|
|
35088
|
+
const isFieldVisible = React78__default.useCallback(
|
|
34950
35089
|
(fieldName) => {
|
|
34951
35090
|
const condition = conditionalFields[fieldName];
|
|
34952
35091
|
if (!condition) return true;
|
|
@@ -34954,7 +35093,7 @@ var init_Form = __esm({
|
|
|
34954
35093
|
},
|
|
34955
35094
|
[conditionalFields, evalContext]
|
|
34956
35095
|
);
|
|
34957
|
-
const isSectionVisible =
|
|
35096
|
+
const isSectionVisible = React78__default.useCallback(
|
|
34958
35097
|
(section) => {
|
|
34959
35098
|
if (!section.condition) return true;
|
|
34960
35099
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -35030,7 +35169,7 @@ var init_Form = __esm({
|
|
|
35030
35169
|
eventBus.emit(`UI:${onCancel}`);
|
|
35031
35170
|
}
|
|
35032
35171
|
};
|
|
35033
|
-
const renderField =
|
|
35172
|
+
const renderField = React78__default.useCallback(
|
|
35034
35173
|
(field) => {
|
|
35035
35174
|
const fieldName = field.name || field.field;
|
|
35036
35175
|
if (!fieldName) return null;
|
|
@@ -35051,7 +35190,7 @@ var init_Form = __esm({
|
|
|
35051
35190
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
35052
35191
|
);
|
|
35053
35192
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
35054
|
-
const normalizedFields =
|
|
35193
|
+
const normalizedFields = React78__default.useMemo(() => {
|
|
35055
35194
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
35056
35195
|
return effectiveFields.map((field) => {
|
|
35057
35196
|
if (typeof field === "string") {
|
|
@@ -35073,7 +35212,7 @@ var init_Form = __esm({
|
|
|
35073
35212
|
return field;
|
|
35074
35213
|
});
|
|
35075
35214
|
}, [effectiveFields, resolvedEntity]);
|
|
35076
|
-
const schemaFields =
|
|
35215
|
+
const schemaFields = React78__default.useMemo(() => {
|
|
35077
35216
|
if (normalizedFields.length === 0) return null;
|
|
35078
35217
|
if (isDebugEnabled()) {
|
|
35079
35218
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -35083,7 +35222,7 @@ var init_Form = __esm({
|
|
|
35083
35222
|
}
|
|
35084
35223
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
35085
35224
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
35086
|
-
const sectionElements =
|
|
35225
|
+
const sectionElements = React78__default.useMemo(() => {
|
|
35087
35226
|
if (!sections || sections.length === 0) return null;
|
|
35088
35227
|
return sections.map((section) => {
|
|
35089
35228
|
if (!isSectionVisible(section)) {
|
|
@@ -36809,7 +36948,7 @@ var init_List = __esm({
|
|
|
36809
36948
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
36810
36949
|
return [];
|
|
36811
36950
|
}, [entity]);
|
|
36812
|
-
const getItemActions =
|
|
36951
|
+
const getItemActions = React78__default.useCallback(
|
|
36813
36952
|
(item) => {
|
|
36814
36953
|
if (!itemActions) return [];
|
|
36815
36954
|
if (typeof itemActions === "function") {
|
|
@@ -37282,7 +37421,7 @@ var init_MediaGallery = __esm({
|
|
|
37282
37421
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
37283
37422
|
);
|
|
37284
37423
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
37285
|
-
const items =
|
|
37424
|
+
const items = React78__default.useMemo(() => {
|
|
37286
37425
|
if (propItems) return propItems;
|
|
37287
37426
|
if (entityData.length === 0) return [];
|
|
37288
37427
|
return entityData.map((record, idx) => ({
|
|
@@ -37455,9 +37594,9 @@ function MiniMap({
|
|
|
37455
37594
|
viewportRect,
|
|
37456
37595
|
className
|
|
37457
37596
|
}) {
|
|
37458
|
-
const canvasRef =
|
|
37459
|
-
const frameRef =
|
|
37460
|
-
|
|
37597
|
+
const canvasRef = React78.useRef(null);
|
|
37598
|
+
const frameRef = React78.useRef(0);
|
|
37599
|
+
React78.useEffect(() => {
|
|
37461
37600
|
const canvas = canvasRef.current;
|
|
37462
37601
|
if (!canvas) return;
|
|
37463
37602
|
const ctx = canvas.getContext("2d");
|
|
@@ -37539,7 +37678,7 @@ var init_MiniMap = __esm({
|
|
|
37539
37678
|
}
|
|
37540
37679
|
});
|
|
37541
37680
|
function extractTitle2(children) {
|
|
37542
|
-
if (!
|
|
37681
|
+
if (!React78__default.isValidElement(children)) return void 0;
|
|
37543
37682
|
const props = children.props;
|
|
37544
37683
|
if (typeof props.title === "string") {
|
|
37545
37684
|
return props.title;
|
|
@@ -38252,7 +38391,7 @@ var init_PageHeader = __esm({
|
|
|
38252
38391
|
info: "bg-info/10 text-info"
|
|
38253
38392
|
};
|
|
38254
38393
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
38255
|
-
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(
|
|
38394
|
+
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(React78__default.Fragment, { children: [
|
|
38256
38395
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
38257
38396
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
38258
38397
|
"a",
|
|
@@ -38593,7 +38732,7 @@ var init_debugRegistry = __esm({
|
|
|
38593
38732
|
}
|
|
38594
38733
|
});
|
|
38595
38734
|
function useDebugData() {
|
|
38596
|
-
const [data, setData] =
|
|
38735
|
+
const [data, setData] = React78.useState(() => ({
|
|
38597
38736
|
traits: [],
|
|
38598
38737
|
ticks: [],
|
|
38599
38738
|
guards: [],
|
|
@@ -38607,7 +38746,7 @@ function useDebugData() {
|
|
|
38607
38746
|
},
|
|
38608
38747
|
lastUpdate: Date.now()
|
|
38609
38748
|
}));
|
|
38610
|
-
|
|
38749
|
+
React78.useEffect(() => {
|
|
38611
38750
|
const updateData = () => {
|
|
38612
38751
|
setData({
|
|
38613
38752
|
traits: getAllTraits(),
|
|
@@ -38716,12 +38855,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
38716
38855
|
return positions;
|
|
38717
38856
|
}
|
|
38718
38857
|
function WalkMinimap() {
|
|
38719
|
-
const [walkStep, setWalkStep] =
|
|
38720
|
-
const [traits2, setTraits] =
|
|
38721
|
-
const [coveredEdges, setCoveredEdges] =
|
|
38722
|
-
const [completedTraits, setCompletedTraits] =
|
|
38723
|
-
const prevTraitRef =
|
|
38724
|
-
|
|
38858
|
+
const [walkStep, setWalkStep] = React78.useState(null);
|
|
38859
|
+
const [traits2, setTraits] = React78.useState([]);
|
|
38860
|
+
const [coveredEdges, setCoveredEdges] = React78.useState([]);
|
|
38861
|
+
const [completedTraits, setCompletedTraits] = React78.useState(/* @__PURE__ */ new Set());
|
|
38862
|
+
const prevTraitRef = React78.useRef(null);
|
|
38863
|
+
React78.useEffect(() => {
|
|
38725
38864
|
const interval = setInterval(() => {
|
|
38726
38865
|
const w = window;
|
|
38727
38866
|
const step = w.__orbitalWalkStep;
|
|
@@ -39168,15 +39307,15 @@ var init_EntitiesTab = __esm({
|
|
|
39168
39307
|
}
|
|
39169
39308
|
});
|
|
39170
39309
|
function EventFlowTab({ events: events2 }) {
|
|
39171
|
-
const [filter, setFilter] =
|
|
39172
|
-
const containerRef =
|
|
39173
|
-
const [autoScroll, setAutoScroll] =
|
|
39174
|
-
|
|
39310
|
+
const [filter, setFilter] = React78.useState("all");
|
|
39311
|
+
const containerRef = React78.useRef(null);
|
|
39312
|
+
const [autoScroll, setAutoScroll] = React78.useState(true);
|
|
39313
|
+
React78.useEffect(() => {
|
|
39175
39314
|
if (autoScroll && containerRef.current) {
|
|
39176
39315
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39177
39316
|
}
|
|
39178
39317
|
}, [events2.length, autoScroll]);
|
|
39179
|
-
const filteredEvents =
|
|
39318
|
+
const filteredEvents = React78.useMemo(() => {
|
|
39180
39319
|
if (filter === "all") return events2;
|
|
39181
39320
|
return events2.filter((e) => e.type === filter);
|
|
39182
39321
|
}, [events2, filter]);
|
|
@@ -39295,7 +39434,7 @@ var init_EventFlowTab = __esm({
|
|
|
39295
39434
|
}
|
|
39296
39435
|
});
|
|
39297
39436
|
function GuardsPanel({ guards }) {
|
|
39298
|
-
const [filter, setFilter] =
|
|
39437
|
+
const [filter, setFilter] = React78.useState("all");
|
|
39299
39438
|
if (guards.length === 0) {
|
|
39300
39439
|
return /* @__PURE__ */ jsx(
|
|
39301
39440
|
EmptyState,
|
|
@@ -39308,7 +39447,7 @@ function GuardsPanel({ guards }) {
|
|
|
39308
39447
|
}
|
|
39309
39448
|
const passedCount = guards.filter((g) => g.result).length;
|
|
39310
39449
|
const failedCount = guards.length - passedCount;
|
|
39311
|
-
const filteredGuards =
|
|
39450
|
+
const filteredGuards = React78.useMemo(() => {
|
|
39312
39451
|
if (filter === "all") return guards;
|
|
39313
39452
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
39314
39453
|
return guards.filter((g) => !g.result);
|
|
@@ -39469,10 +39608,10 @@ function EffectBadge({ effect }) {
|
|
|
39469
39608
|
] });
|
|
39470
39609
|
}
|
|
39471
39610
|
function TransitionTimeline({ transitions }) {
|
|
39472
|
-
const containerRef =
|
|
39473
|
-
const [autoScroll, setAutoScroll] =
|
|
39474
|
-
const [expandedId, setExpandedId] =
|
|
39475
|
-
|
|
39611
|
+
const containerRef = React78.useRef(null);
|
|
39612
|
+
const [autoScroll, setAutoScroll] = React78.useState(true);
|
|
39613
|
+
const [expandedId, setExpandedId] = React78.useState(null);
|
|
39614
|
+
React78.useEffect(() => {
|
|
39476
39615
|
if (autoScroll && containerRef.current) {
|
|
39477
39616
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39478
39617
|
}
|
|
@@ -39758,9 +39897,9 @@ function getAllEvents(traits2) {
|
|
|
39758
39897
|
}
|
|
39759
39898
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
39760
39899
|
const eventBus = useEventBus();
|
|
39761
|
-
const [log18, setLog] =
|
|
39762
|
-
const prevStatesRef =
|
|
39763
|
-
|
|
39900
|
+
const [log18, setLog] = React78.useState([]);
|
|
39901
|
+
const prevStatesRef = React78.useRef(/* @__PURE__ */ new Map());
|
|
39902
|
+
React78.useEffect(() => {
|
|
39764
39903
|
for (const trait of traits2) {
|
|
39765
39904
|
const prev = prevStatesRef.current.get(trait.id);
|
|
39766
39905
|
if (prev && prev !== trait.currentState) {
|
|
@@ -39930,10 +40069,10 @@ function VerifyModePanel({
|
|
|
39930
40069
|
serverCount,
|
|
39931
40070
|
localCount
|
|
39932
40071
|
}) {
|
|
39933
|
-
const [expanded, setExpanded] =
|
|
39934
|
-
const scrollRef =
|
|
39935
|
-
const prevCountRef =
|
|
39936
|
-
|
|
40072
|
+
const [expanded, setExpanded] = React78.useState(true);
|
|
40073
|
+
const scrollRef = React78.useRef(null);
|
|
40074
|
+
const prevCountRef = React78.useRef(0);
|
|
40075
|
+
React78.useEffect(() => {
|
|
39937
40076
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
39938
40077
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
39939
40078
|
}
|
|
@@ -39999,10 +40138,10 @@ function RuntimeDebugger({
|
|
|
39999
40138
|
defaultTab,
|
|
40000
40139
|
schema
|
|
40001
40140
|
}) {
|
|
40002
|
-
const [isCollapsed, setIsCollapsed] =
|
|
40003
|
-
const [isVisible, setIsVisible] =
|
|
40141
|
+
const [isCollapsed, setIsCollapsed] = React78.useState(mode === "verify" ? true : defaultCollapsed);
|
|
40142
|
+
const [isVisible, setIsVisible] = React78.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
40004
40143
|
const debugData = useDebugData();
|
|
40005
|
-
|
|
40144
|
+
React78.useEffect(() => {
|
|
40006
40145
|
if (mode === "inline") return;
|
|
40007
40146
|
return onDebugToggle((enabled) => {
|
|
40008
40147
|
setIsVisible(enabled);
|
|
@@ -40011,7 +40150,7 @@ function RuntimeDebugger({
|
|
|
40011
40150
|
}
|
|
40012
40151
|
});
|
|
40013
40152
|
}, [mode]);
|
|
40014
|
-
|
|
40153
|
+
React78.useEffect(() => {
|
|
40015
40154
|
if (mode === "inline") return;
|
|
40016
40155
|
const handleKeyDown = (e) => {
|
|
40017
40156
|
if (e.key === "`" && isVisible) {
|
|
@@ -40560,7 +40699,7 @@ function SequenceBar({
|
|
|
40560
40699
|
onSlotRemove(index);
|
|
40561
40700
|
}, [onSlotRemove, playing]);
|
|
40562
40701
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
40563
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
40702
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
40564
40703
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40565
40704
|
Typography,
|
|
40566
40705
|
{
|
|
@@ -42073,7 +42212,7 @@ var init_StatCard = __esm({
|
|
|
42073
42212
|
const labelToUse = propLabel ?? propTitle;
|
|
42074
42213
|
const eventBus = useEventBus();
|
|
42075
42214
|
const { t } = useTranslate();
|
|
42076
|
-
const handleActionClick =
|
|
42215
|
+
const handleActionClick = React78__default.useCallback(() => {
|
|
42077
42216
|
if (action?.event) {
|
|
42078
42217
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42079
42218
|
}
|
|
@@ -42084,7 +42223,7 @@ var init_StatCard = __esm({
|
|
|
42084
42223
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42085
42224
|
const isLoading = externalLoading ?? false;
|
|
42086
42225
|
const error = externalError;
|
|
42087
|
-
const computeMetricValue =
|
|
42226
|
+
const computeMetricValue = React78__default.useCallback(
|
|
42088
42227
|
(metric, items) => {
|
|
42089
42228
|
if (metric.value !== void 0) {
|
|
42090
42229
|
return metric.value;
|
|
@@ -42123,7 +42262,7 @@ var init_StatCard = __esm({
|
|
|
42123
42262
|
},
|
|
42124
42263
|
[]
|
|
42125
42264
|
);
|
|
42126
|
-
const schemaStats =
|
|
42265
|
+
const schemaStats = React78__default.useMemo(() => {
|
|
42127
42266
|
if (!metrics || metrics.length === 0) return null;
|
|
42128
42267
|
return metrics.map((metric) => ({
|
|
42129
42268
|
label: metric.label,
|
|
@@ -42131,7 +42270,7 @@ var init_StatCard = __esm({
|
|
|
42131
42270
|
format: metric.format
|
|
42132
42271
|
}));
|
|
42133
42272
|
}, [metrics, data, computeMetricValue]);
|
|
42134
|
-
const calculatedTrend =
|
|
42273
|
+
const calculatedTrend = React78__default.useMemo(() => {
|
|
42135
42274
|
if (manualTrend !== void 0) return manualTrend;
|
|
42136
42275
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42137
42276
|
return void 0;
|
|
@@ -43313,7 +43452,7 @@ var init_Timeline = __esm({
|
|
|
43313
43452
|
}) => {
|
|
43314
43453
|
const { t } = useTranslate();
|
|
43315
43454
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
43316
|
-
const items =
|
|
43455
|
+
const items = React78__default.useMemo(() => {
|
|
43317
43456
|
if (propItems) return propItems;
|
|
43318
43457
|
if (entityData.length === 0) return [];
|
|
43319
43458
|
return entityData.map((record, idx) => {
|
|
@@ -43470,7 +43609,7 @@ var init_TimerDisplay = __esm({
|
|
|
43470
43609
|
}
|
|
43471
43610
|
});
|
|
43472
43611
|
function extractToastProps(children) {
|
|
43473
|
-
if (!
|
|
43612
|
+
if (!React78__default.isValidElement(children)) {
|
|
43474
43613
|
if (typeof children === "string") {
|
|
43475
43614
|
return { message: children };
|
|
43476
43615
|
}
|
|
@@ -43508,7 +43647,7 @@ var init_ToastSlot = __esm({
|
|
|
43508
43647
|
eventBus.emit("UI:CLOSE");
|
|
43509
43648
|
};
|
|
43510
43649
|
if (!isVisible) return null;
|
|
43511
|
-
const isCustomContent =
|
|
43650
|
+
const isCustomContent = React78__default.isValidElement(children) && !message;
|
|
43512
43651
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43513
43652
|
Toast,
|
|
43514
43653
|
{
|
|
@@ -43777,7 +43916,7 @@ var init_WizardContainer = __esm({
|
|
|
43777
43916
|
const isCompleted = index < currentStep;
|
|
43778
43917
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
43779
43918
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
43780
|
-
return /* @__PURE__ */ jsxs(
|
|
43919
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
43781
43920
|
/* @__PURE__ */ jsx(
|
|
43782
43921
|
Button,
|
|
43783
43922
|
{
|
|
@@ -44227,12 +44366,12 @@ var init_XPBar = __esm({
|
|
|
44227
44366
|
}
|
|
44228
44367
|
});
|
|
44229
44368
|
function lazyThree(name, loader) {
|
|
44230
|
-
const Lazy =
|
|
44369
|
+
const Lazy = React78__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
44231
44370
|
function ThreeWrapper(props) {
|
|
44232
|
-
return
|
|
44233
|
-
|
|
44371
|
+
return React78__default.createElement(
|
|
44372
|
+
React78__default.Suspense,
|
|
44234
44373
|
{ fallback: null },
|
|
44235
|
-
|
|
44374
|
+
React78__default.createElement(Lazy, props)
|
|
44236
44375
|
);
|
|
44237
44376
|
}
|
|
44238
44377
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -44251,6 +44390,7 @@ var init_component_registry_generated = __esm({
|
|
|
44251
44390
|
init_AnimatedGraphic();
|
|
44252
44391
|
init_AnimatedReveal();
|
|
44253
44392
|
init_ArticleSection();
|
|
44393
|
+
init_Aside();
|
|
44254
44394
|
init_AuthLayout();
|
|
44255
44395
|
init_BattleBoard();
|
|
44256
44396
|
init_BattleTemplate();
|
|
@@ -44305,6 +44445,7 @@ var init_component_registry_generated = __esm({
|
|
|
44305
44445
|
init_DayCell();
|
|
44306
44446
|
init_DebuggerBoard();
|
|
44307
44447
|
init_DetailPanel();
|
|
44448
|
+
init_Dialog();
|
|
44308
44449
|
init_DialogueBox();
|
|
44309
44450
|
init_DialogueBubble();
|
|
44310
44451
|
init_DocBreadcrumb();
|
|
@@ -44518,6 +44659,7 @@ var init_component_registry_generated = __esm({
|
|
|
44518
44659
|
"AnimatedGraphic": AnimatedGraphic,
|
|
44519
44660
|
"AnimatedReveal": AnimatedReveal,
|
|
44520
44661
|
"ArticleSection": ArticleSection,
|
|
44662
|
+
"Aside": Aside,
|
|
44521
44663
|
"AuthLayout": AuthLayout,
|
|
44522
44664
|
"Avatar": AvatarPattern,
|
|
44523
44665
|
"AvatarPattern": AvatarPattern,
|
|
@@ -44587,6 +44729,7 @@ var init_component_registry_generated = __esm({
|
|
|
44587
44729
|
"DayCell": DayCell,
|
|
44588
44730
|
"DebuggerBoard": DebuggerBoard,
|
|
44589
44731
|
"DetailPanel": DetailPanel,
|
|
44732
|
+
"Dialog": Dialog,
|
|
44590
44733
|
"DialogueBox": DialogueBox,
|
|
44591
44734
|
"DialogueBubble": DialogueBubble,
|
|
44592
44735
|
"Divider": DividerPattern,
|
|
@@ -44840,7 +44983,7 @@ function SuspenseConfigProvider({
|
|
|
44840
44983
|
config,
|
|
44841
44984
|
children
|
|
44842
44985
|
}) {
|
|
44843
|
-
return
|
|
44986
|
+
return React78__default.createElement(
|
|
44844
44987
|
SuspenseConfigContext.Provider,
|
|
44845
44988
|
{ value: config },
|
|
44846
44989
|
children
|
|
@@ -45323,7 +45466,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45323
45466
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45324
45467
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45325
45468
|
}
|
|
45326
|
-
return /* @__PURE__ */ jsx(
|
|
45469
|
+
return /* @__PURE__ */ jsx(React78__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45327
45470
|
}
|
|
45328
45471
|
if (!child || typeof child !== "object") return null;
|
|
45329
45472
|
const childId = `${parentId}-${index}`;
|
|
@@ -45360,14 +45503,14 @@ function isPatternConfig(value) {
|
|
|
45360
45503
|
if (value === null || value === void 0) return false;
|
|
45361
45504
|
if (typeof value !== "object") return false;
|
|
45362
45505
|
if (Array.isArray(value)) return false;
|
|
45363
|
-
if (
|
|
45506
|
+
if (React78__default.isValidElement(value)) return false;
|
|
45364
45507
|
if (value instanceof Date) return false;
|
|
45365
45508
|
if (typeof value === "function") return false;
|
|
45366
45509
|
const record = value;
|
|
45367
45510
|
return "type" in record && typeof record.type === "string";
|
|
45368
45511
|
}
|
|
45369
45512
|
function isPlainConfigObject(value) {
|
|
45370
|
-
if (
|
|
45513
|
+
if (React78__default.isValidElement(value)) return false;
|
|
45371
45514
|
if (value instanceof Date) return false;
|
|
45372
45515
|
const proto = Object.getPrototypeOf(value);
|
|
45373
45516
|
return proto === Object.prototype || proto === null;
|
|
@@ -45759,6 +45902,8 @@ var init_atoms = __esm({
|
|
|
45759
45902
|
init_ThemeSelector();
|
|
45760
45903
|
init_Overlay();
|
|
45761
45904
|
init_FlipContainer();
|
|
45905
|
+
init_Dialog();
|
|
45906
|
+
init_Aside();
|
|
45762
45907
|
init_ConditionalWrapper();
|
|
45763
45908
|
init_LawReferenceTooltip();
|
|
45764
45909
|
init_DayCell();
|
|
@@ -45812,7 +45957,7 @@ var FormSection = ({
|
|
|
45812
45957
|
columns = 1,
|
|
45813
45958
|
className
|
|
45814
45959
|
}) => {
|
|
45815
|
-
const [collapsed, setCollapsed] =
|
|
45960
|
+
const [collapsed, setCollapsed] = React78__default.useState(defaultCollapsed);
|
|
45816
45961
|
const { t } = useTranslate();
|
|
45817
45962
|
const eventBus = useEventBus();
|
|
45818
45963
|
const gridClass = {
|
|
@@ -45820,7 +45965,7 @@ var FormSection = ({
|
|
|
45820
45965
|
2: "grid-cols-1 md:grid-cols-2",
|
|
45821
45966
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
45822
45967
|
}[columns];
|
|
45823
|
-
|
|
45968
|
+
React78__default.useCallback(() => {
|
|
45824
45969
|
if (collapsible) {
|
|
45825
45970
|
setCollapsed((prev) => !prev);
|
|
45826
45971
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -48688,4 +48833,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
|
|
|
48688
48833
|
});
|
|
48689
48834
|
}
|
|
48690
48835
|
|
|
48691
|
-
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, CodeBlock, CodeExample, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocCodeBlock, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FeatureRenderer2 as FeatureRenderer, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, Tabs, TagCloud, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, clearEntities, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createTranslate, createUnitAnimationState, drawSprite, generateCombatMessage, getAllEntities, getByType, getCurrentFrame, getEntity, getSingleton, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseQueryBinding, pendulum, projectileMotion, removeEntity, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, spawnEntity, springOscillator, tickAnimationState, transitionAnimation, updateEntity, updateSingleton, useAgentChat, useAuthContext, useBattleState, useCamera, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEntities, useEntitiesByType, useEntity as useEntityById, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, usePhysics, usePhysics2D, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useSingletonEntity, useSpriteAnimations, useSwipeGesture, useTraitListens, useTranslate, useUIEvents, useUISlotManager, useValidation };
|
|
48836
|
+
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, CodeBlock, CodeExample, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocCodeBlock, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FeatureRenderer2 as FeatureRenderer, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, Tabs, TagCloud, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, clearEntities, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createTranslate, createUnitAnimationState, drawSprite, generateCombatMessage, getAllEntities, getByType, getCurrentFrame, getEntity, getSingleton, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseQueryBinding, pendulum, projectileMotion, removeEntity, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, spawnEntity, springOscillator, tickAnimationState, transitionAnimation, updateEntity, updateSingleton, useAgentChat, useAuthContext, useBattleState, useCamera, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEntities, useEntitiesByType, useEntity as useEntityById, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, usePhysics, usePhysics2D, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useSingletonEntity, useSpriteAnimations, useSwipeGesture, useTraitListens, useTranslate, useUIEvents, useUISlotManager, useValidation };
|