@almadar/ui 4.33.0 → 4.34.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 +1484 -1527
- package/dist/avl/index.css +1 -1
- package/dist/avl/index.js +404 -447
- package/dist/components/index.cjs +1280 -1307
- package/dist/components/index.css +1 -1
- package/dist/components/index.js +381 -408
- package/dist/components/templates/DashboardLayout.d.ts +0 -7
- package/dist/context/index.cjs +0 -10
- package/dist/context/index.d.ts +0 -1
- package/dist/context/index.js +1 -8
- package/dist/docs/index.cjs +2 -2
- package/dist/docs/index.js +2 -2
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/index.cjs +1105 -1132
- package/dist/providers/index.css +1 -1
- package/dist/providers/index.js +373 -400
- package/dist/runtime/createClientEffectHandlers.d.ts +1 -9
- package/dist/runtime/index.cjs +1146 -1189
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/index.js +382 -425
- package/package.json +14 -8
- package/dist/context/CurrentPagePathContext.d.ts +0 -9
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React109 from 'react';
|
|
4
|
+
import React109__default, { useContext, useMemo, useRef, useEffect, useCallback, createContext, useState, Suspense, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
|
|
5
5
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
6
6
|
import * as LucideIcons from 'lucide-react';
|
|
7
7
|
import { Loader2, X, AlertTriangle, Info, AlertCircle, CheckCircle, ChevronDown, List, Printer, ChevronRight, ChevronLeft, XCircle, Wrench, RotateCcw, Send, Code, FileText, WrapText, Check, Copy, Trash2, Menu as Menu$1, Search, Bell, LogOut, ChevronUp, MoreHorizontal, Bug, ZoomOut, ZoomIn, Download, Pause, Play, Package, Calendar, Pencil, Eye, Image as Image$1, Upload, ArrowRight, ArrowLeft, Eraser, SkipForward, TrendingUp, TrendingDown, Minus, ArrowUp, ArrowDown, MoreVertical, Circle, Clock, CheckCircle2, HelpCircle, FileQuestion, Inbox, Plus, User, Filter, Star, FileWarning, Tag, DollarSign, Sun, Moon, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
@@ -368,7 +368,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
368
368
|
const IconComp = value;
|
|
369
369
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
370
370
|
}
|
|
371
|
-
if (
|
|
371
|
+
if (React109__default.isValidElement(value)) {
|
|
372
372
|
return value;
|
|
373
373
|
}
|
|
374
374
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -444,7 +444,7 @@ var init_Button = __esm({
|
|
|
444
444
|
md: "h-4 w-4",
|
|
445
445
|
lg: "h-5 w-5"
|
|
446
446
|
};
|
|
447
|
-
Button =
|
|
447
|
+
Button = React109__default.forwardRef(
|
|
448
448
|
({
|
|
449
449
|
className,
|
|
450
450
|
variant = "primary",
|
|
@@ -509,7 +509,7 @@ var Input;
|
|
|
509
509
|
var init_Input = __esm({
|
|
510
510
|
"components/atoms/Input.tsx"() {
|
|
511
511
|
init_cn();
|
|
512
|
-
Input =
|
|
512
|
+
Input = React109__default.forwardRef(
|
|
513
513
|
({
|
|
514
514
|
className,
|
|
515
515
|
inputType,
|
|
@@ -627,7 +627,7 @@ var Label;
|
|
|
627
627
|
var init_Label = __esm({
|
|
628
628
|
"components/atoms/Label.tsx"() {
|
|
629
629
|
init_cn();
|
|
630
|
-
Label =
|
|
630
|
+
Label = React109__default.forwardRef(
|
|
631
631
|
({ className, required, children, ...props }, ref) => {
|
|
632
632
|
return /* @__PURE__ */ jsxs(
|
|
633
633
|
"label",
|
|
@@ -653,7 +653,7 @@ var Textarea;
|
|
|
653
653
|
var init_Textarea = __esm({
|
|
654
654
|
"components/atoms/Textarea.tsx"() {
|
|
655
655
|
init_cn();
|
|
656
|
-
Textarea =
|
|
656
|
+
Textarea = React109__default.forwardRef(
|
|
657
657
|
({ className, error, ...props }, ref) => {
|
|
658
658
|
return /* @__PURE__ */ jsx(
|
|
659
659
|
"textarea",
|
|
@@ -682,7 +682,7 @@ var Select;
|
|
|
682
682
|
var init_Select = __esm({
|
|
683
683
|
"components/atoms/Select.tsx"() {
|
|
684
684
|
init_cn();
|
|
685
|
-
Select =
|
|
685
|
+
Select = React109__default.forwardRef(
|
|
686
686
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
687
687
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
688
688
|
/* @__PURE__ */ jsxs(
|
|
@@ -724,7 +724,7 @@ var Checkbox;
|
|
|
724
724
|
var init_Checkbox = __esm({
|
|
725
725
|
"components/atoms/Checkbox.tsx"() {
|
|
726
726
|
init_cn();
|
|
727
|
-
Checkbox =
|
|
727
|
+
Checkbox = React109__default.forwardRef(
|
|
728
728
|
({ className, label, id, ...props }, ref) => {
|
|
729
729
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
730
730
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -806,7 +806,7 @@ var init_Card = __esm({
|
|
|
806
806
|
md: "shadow",
|
|
807
807
|
lg: "shadow-lg"
|
|
808
808
|
};
|
|
809
|
-
Card =
|
|
809
|
+
Card = React109__default.forwardRef(
|
|
810
810
|
({
|
|
811
811
|
className,
|
|
812
812
|
variant = "bordered",
|
|
@@ -842,9 +842,9 @@ var init_Card = __esm({
|
|
|
842
842
|
}
|
|
843
843
|
);
|
|
844
844
|
Card.displayName = "Card";
|
|
845
|
-
CardHeader =
|
|
845
|
+
CardHeader = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
846
846
|
CardHeader.displayName = "CardHeader";
|
|
847
|
-
CardTitle =
|
|
847
|
+
CardTitle = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
848
848
|
"h3",
|
|
849
849
|
{
|
|
850
850
|
ref,
|
|
@@ -857,11 +857,11 @@ var init_Card = __esm({
|
|
|
857
857
|
}
|
|
858
858
|
));
|
|
859
859
|
CardTitle.displayName = "CardTitle";
|
|
860
|
-
CardContent =
|
|
860
|
+
CardContent = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
861
861
|
CardContent.displayName = "CardContent";
|
|
862
862
|
CardBody = CardContent;
|
|
863
863
|
CardBody.displayName = "CardBody";
|
|
864
|
-
CardFooter =
|
|
864
|
+
CardFooter = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
865
865
|
"div",
|
|
866
866
|
{
|
|
867
867
|
ref,
|
|
@@ -914,7 +914,7 @@ var init_Badge = __esm({
|
|
|
914
914
|
md: "px-2.5 py-1 text-sm",
|
|
915
915
|
lg: "px-3 py-1.5 text-base"
|
|
916
916
|
};
|
|
917
|
-
Badge =
|
|
917
|
+
Badge = React109__default.forwardRef(
|
|
918
918
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
919
919
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
920
920
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -953,7 +953,7 @@ var init_Spinner = __esm({
|
|
|
953
953
|
md: "h-6 w-6",
|
|
954
954
|
lg: "h-8 w-8"
|
|
955
955
|
};
|
|
956
|
-
Spinner =
|
|
956
|
+
Spinner = React109__default.forwardRef(
|
|
957
957
|
({ className, size = "md", ...props }, ref) => {
|
|
958
958
|
return /* @__PURE__ */ jsx(
|
|
959
959
|
"div",
|
|
@@ -1234,7 +1234,7 @@ var init_Box = __esm({
|
|
|
1234
1234
|
fixed: "fixed",
|
|
1235
1235
|
sticky: "sticky"
|
|
1236
1236
|
};
|
|
1237
|
-
Box =
|
|
1237
|
+
Box = React109__default.forwardRef(
|
|
1238
1238
|
({
|
|
1239
1239
|
padding,
|
|
1240
1240
|
paddingX,
|
|
@@ -1607,7 +1607,7 @@ var Radio;
|
|
|
1607
1607
|
var init_Radio = __esm({
|
|
1608
1608
|
"components/atoms/Radio.tsx"() {
|
|
1609
1609
|
init_cn();
|
|
1610
|
-
Radio =
|
|
1610
|
+
Radio = React109__default.forwardRef(
|
|
1611
1611
|
({
|
|
1612
1612
|
label,
|
|
1613
1613
|
helperText,
|
|
@@ -1718,7 +1718,7 @@ var init_Switch = __esm({
|
|
|
1718
1718
|
"components/atoms/Switch.tsx"() {
|
|
1719
1719
|
"use client";
|
|
1720
1720
|
init_cn();
|
|
1721
|
-
Switch =
|
|
1721
|
+
Switch = React109.forwardRef(
|
|
1722
1722
|
({
|
|
1723
1723
|
checked,
|
|
1724
1724
|
defaultChecked = false,
|
|
@@ -1729,10 +1729,10 @@ var init_Switch = __esm({
|
|
|
1729
1729
|
name,
|
|
1730
1730
|
className
|
|
1731
1731
|
}, ref) => {
|
|
1732
|
-
const [isChecked, setIsChecked] =
|
|
1732
|
+
const [isChecked, setIsChecked] = React109.useState(
|
|
1733
1733
|
checked !== void 0 ? checked : defaultChecked
|
|
1734
1734
|
);
|
|
1735
|
-
|
|
1735
|
+
React109.useEffect(() => {
|
|
1736
1736
|
if (checked !== void 0) {
|
|
1737
1737
|
setIsChecked(checked);
|
|
1738
1738
|
}
|
|
@@ -2617,8 +2617,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
2617
2617
|
position = "top",
|
|
2618
2618
|
className
|
|
2619
2619
|
}) => {
|
|
2620
|
-
const [isVisible, setIsVisible] =
|
|
2621
|
-
const timeoutRef =
|
|
2620
|
+
const [isVisible, setIsVisible] = React109__default.useState(false);
|
|
2621
|
+
const timeoutRef = React109__default.useRef(null);
|
|
2622
2622
|
const handleMouseEnter = () => {
|
|
2623
2623
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2624
2624
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -2627,7 +2627,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
2627
2627
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2628
2628
|
setIsVisible(false);
|
|
2629
2629
|
};
|
|
2630
|
-
|
|
2630
|
+
React109__default.useEffect(() => {
|
|
2631
2631
|
return () => {
|
|
2632
2632
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2633
2633
|
};
|
|
@@ -2837,7 +2837,7 @@ var init_StatusDot = __esm({
|
|
|
2837
2837
|
md: "w-2.5 h-2.5",
|
|
2838
2838
|
lg: "w-3 h-3"
|
|
2839
2839
|
};
|
|
2840
|
-
StatusDot =
|
|
2840
|
+
StatusDot = React109__default.forwardRef(
|
|
2841
2841
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
2842
2842
|
return /* @__PURE__ */ jsx(
|
|
2843
2843
|
"span",
|
|
@@ -2890,7 +2890,7 @@ var init_TrendIndicator = __esm({
|
|
|
2890
2890
|
down: TrendingDown,
|
|
2891
2891
|
flat: ArrowRight
|
|
2892
2892
|
};
|
|
2893
|
-
TrendIndicator =
|
|
2893
|
+
TrendIndicator = React109__default.forwardRef(
|
|
2894
2894
|
({
|
|
2895
2895
|
className,
|
|
2896
2896
|
value,
|
|
@@ -2957,7 +2957,7 @@ var init_RangeSlider = __esm({
|
|
|
2957
2957
|
md: "w-4 h-4",
|
|
2958
2958
|
lg: "w-5 h-5"
|
|
2959
2959
|
};
|
|
2960
|
-
RangeSlider =
|
|
2960
|
+
RangeSlider = React109__default.forwardRef(
|
|
2961
2961
|
({
|
|
2962
2962
|
className,
|
|
2963
2963
|
min = 0,
|
|
@@ -3553,7 +3553,7 @@ var init_ContentSection = __esm({
|
|
|
3553
3553
|
md: "py-16",
|
|
3554
3554
|
lg: "py-24"
|
|
3555
3555
|
};
|
|
3556
|
-
ContentSection =
|
|
3556
|
+
ContentSection = React109__default.forwardRef(
|
|
3557
3557
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
3558
3558
|
return /* @__PURE__ */ jsx(
|
|
3559
3559
|
Box,
|
|
@@ -4087,7 +4087,7 @@ var init_AnimatedReveal = __esm({
|
|
|
4087
4087
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
4088
4088
|
"none": {}
|
|
4089
4089
|
};
|
|
4090
|
-
AnimatedReveal =
|
|
4090
|
+
AnimatedReveal = React109__default.forwardRef(
|
|
4091
4091
|
({
|
|
4092
4092
|
trigger = "scroll",
|
|
4093
4093
|
animation = "fade-up",
|
|
@@ -4247,7 +4247,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
4247
4247
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
4248
4248
|
"use client";
|
|
4249
4249
|
init_cn();
|
|
4250
|
-
AnimatedGraphic =
|
|
4250
|
+
AnimatedGraphic = React109__default.forwardRef(
|
|
4251
4251
|
({
|
|
4252
4252
|
src,
|
|
4253
4253
|
svgContent,
|
|
@@ -4270,7 +4270,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
4270
4270
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
4271
4271
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
4272
4272
|
const prevAnimateRef = useRef(animate);
|
|
4273
|
-
const setRef =
|
|
4273
|
+
const setRef = React109__default.useCallback(
|
|
4274
4274
|
(node) => {
|
|
4275
4275
|
containerRef.current = node;
|
|
4276
4276
|
if (typeof ref === "function") ref(node);
|
|
@@ -5083,7 +5083,7 @@ var init_ErrorBoundary = __esm({
|
|
|
5083
5083
|
"use client";
|
|
5084
5084
|
init_cn();
|
|
5085
5085
|
init_ErrorState();
|
|
5086
|
-
ErrorBoundary = class extends
|
|
5086
|
+
ErrorBoundary = class extends React109__default.Component {
|
|
5087
5087
|
constructor(props) {
|
|
5088
5088
|
super(props);
|
|
5089
5089
|
__publicField(this, "reset", () => {
|
|
@@ -5504,8 +5504,8 @@ var init_Tooltip = __esm({
|
|
|
5504
5504
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
5505
5505
|
};
|
|
5506
5506
|
}, []);
|
|
5507
|
-
const triggerElement =
|
|
5508
|
-
const trigger =
|
|
5507
|
+
const triggerElement = React109__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
5508
|
+
const trigger = React109__default.cloneElement(triggerElement, {
|
|
5509
5509
|
ref: triggerRef,
|
|
5510
5510
|
onMouseEnter: handleMouseEnter,
|
|
5511
5511
|
onMouseLeave: handleMouseLeave,
|
|
@@ -5626,8 +5626,8 @@ var init_Popover = __esm({
|
|
|
5626
5626
|
onMouseEnter: handleOpen,
|
|
5627
5627
|
onMouseLeave: handleClose
|
|
5628
5628
|
};
|
|
5629
|
-
const childElement =
|
|
5630
|
-
const triggerElement =
|
|
5629
|
+
const childElement = React109__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
5630
|
+
const triggerElement = React109__default.cloneElement(
|
|
5631
5631
|
childElement,
|
|
5632
5632
|
{
|
|
5633
5633
|
ref: triggerRef,
|
|
@@ -5744,8 +5744,8 @@ var init_Menu = __esm({
|
|
|
5744
5744
|
"bottom-start": "top-full left-0 mt-2",
|
|
5745
5745
|
"bottom-end": "top-full right-0 mt-2"
|
|
5746
5746
|
};
|
|
5747
|
-
const triggerChild =
|
|
5748
|
-
const triggerElement =
|
|
5747
|
+
const triggerChild = React109__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
5748
|
+
const triggerElement = React109__default.cloneElement(
|
|
5749
5749
|
triggerChild,
|
|
5750
5750
|
{
|
|
5751
5751
|
ref: triggerRef,
|
|
@@ -6264,7 +6264,7 @@ var init_MapView = __esm({
|
|
|
6264
6264
|
shadowSize: [41, 41]
|
|
6265
6265
|
});
|
|
6266
6266
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
6267
|
-
const { useEffect: useEffect65, useRef: useRef62, useCallback: useCallback111, useState: useState96 } =
|
|
6267
|
+
const { useEffect: useEffect65, useRef: useRef62, useCallback: useCallback111, useState: useState96 } = React109__default;
|
|
6268
6268
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
6269
6269
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
6270
6270
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -6495,7 +6495,7 @@ function InputPattern({
|
|
|
6495
6495
|
fieldName
|
|
6496
6496
|
}) {
|
|
6497
6497
|
const { emit } = useEventBus();
|
|
6498
|
-
const [localValue, setLocalValue] =
|
|
6498
|
+
const [localValue, setLocalValue] = React109__default.useState(value);
|
|
6499
6499
|
const handleChange = (e) => {
|
|
6500
6500
|
setLocalValue(e.target.value);
|
|
6501
6501
|
if (onChange) {
|
|
@@ -6533,7 +6533,7 @@ function TextareaPattern({
|
|
|
6533
6533
|
fieldName
|
|
6534
6534
|
}) {
|
|
6535
6535
|
const { emit } = useEventBus();
|
|
6536
|
-
const [localValue, setLocalValue] =
|
|
6536
|
+
const [localValue, setLocalValue] = React109__default.useState(value);
|
|
6537
6537
|
const handleChange = (e) => {
|
|
6538
6538
|
setLocalValue(e.target.value);
|
|
6539
6539
|
if (onChange) {
|
|
@@ -6565,7 +6565,7 @@ function SelectPattern({
|
|
|
6565
6565
|
fieldName
|
|
6566
6566
|
}) {
|
|
6567
6567
|
const { emit } = useEventBus();
|
|
6568
|
-
const [localValue, setLocalValue] =
|
|
6568
|
+
const [localValue, setLocalValue] = React109__default.useState(value);
|
|
6569
6569
|
const handleChange = (e) => {
|
|
6570
6570
|
setLocalValue(e.target.value);
|
|
6571
6571
|
if (onChange) {
|
|
@@ -6594,7 +6594,7 @@ function CheckboxPattern({
|
|
|
6594
6594
|
className
|
|
6595
6595
|
}) {
|
|
6596
6596
|
const { emit } = useEventBus();
|
|
6597
|
-
const [localChecked, setLocalChecked] =
|
|
6597
|
+
const [localChecked, setLocalChecked] = React109__default.useState(checked);
|
|
6598
6598
|
const handleChange = (e) => {
|
|
6599
6599
|
setLocalChecked(e.target.checked);
|
|
6600
6600
|
if (onChange) {
|
|
@@ -6903,9 +6903,9 @@ function ControlButton({
|
|
|
6903
6903
|
className
|
|
6904
6904
|
}) {
|
|
6905
6905
|
const eventBus = useEventBus();
|
|
6906
|
-
const [isPressed, setIsPressed] =
|
|
6906
|
+
const [isPressed, setIsPressed] = React109.useState(false);
|
|
6907
6907
|
const actualPressed = pressed ?? isPressed;
|
|
6908
|
-
const handlePointerDown =
|
|
6908
|
+
const handlePointerDown = React109.useCallback(
|
|
6909
6909
|
(e) => {
|
|
6910
6910
|
e.preventDefault();
|
|
6911
6911
|
if (disabled) return;
|
|
@@ -6915,7 +6915,7 @@ function ControlButton({
|
|
|
6915
6915
|
},
|
|
6916
6916
|
[disabled, pressEvent, eventBus, onPress]
|
|
6917
6917
|
);
|
|
6918
|
-
const handlePointerUp =
|
|
6918
|
+
const handlePointerUp = React109.useCallback(
|
|
6919
6919
|
(e) => {
|
|
6920
6920
|
e.preventDefault();
|
|
6921
6921
|
if (disabled) return;
|
|
@@ -6925,7 +6925,7 @@ function ControlButton({
|
|
|
6925
6925
|
},
|
|
6926
6926
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6927
6927
|
);
|
|
6928
|
-
const handlePointerLeave =
|
|
6928
|
+
const handlePointerLeave = React109.useCallback(
|
|
6929
6929
|
(e) => {
|
|
6930
6930
|
if (isPressed) {
|
|
6931
6931
|
setIsPressed(false);
|
|
@@ -6998,8 +6998,8 @@ function ActionButtons({
|
|
|
6998
6998
|
disabled
|
|
6999
6999
|
}) {
|
|
7000
7000
|
const eventBus = useEventBus();
|
|
7001
|
-
const [activeButtons, setActiveButtons] =
|
|
7002
|
-
const handlePress =
|
|
7001
|
+
const [activeButtons, setActiveButtons] = React109.useState(/* @__PURE__ */ new Set());
|
|
7002
|
+
const handlePress = React109.useCallback(
|
|
7003
7003
|
(id) => {
|
|
7004
7004
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
7005
7005
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7007,7 +7007,7 @@ function ActionButtons({
|
|
|
7007
7007
|
},
|
|
7008
7008
|
[actionEvent, eventBus, onAction]
|
|
7009
7009
|
);
|
|
7010
|
-
const handleRelease =
|
|
7010
|
+
const handleRelease = React109.useCallback(
|
|
7011
7011
|
(id) => {
|
|
7012
7012
|
setActiveButtons((prev) => {
|
|
7013
7013
|
const next = new Set(prev);
|
|
@@ -8929,9 +8929,9 @@ var init_ScaledDiagram = __esm({
|
|
|
8929
8929
|
}
|
|
8930
8930
|
});
|
|
8931
8931
|
|
|
8932
|
-
// node_modules
|
|
8932
|
+
// node_modules/katex/dist/katex.min.css
|
|
8933
8933
|
var init_katex_min = __esm({
|
|
8934
|
-
"node_modules
|
|
8934
|
+
"node_modules/katex/dist/katex.min.css"() {
|
|
8935
8935
|
}
|
|
8936
8936
|
});
|
|
8937
8937
|
var MarkdownContent;
|
|
@@ -8941,7 +8941,7 @@ var init_MarkdownContent = __esm({
|
|
|
8941
8941
|
init_Box();
|
|
8942
8942
|
init_useTranslate();
|
|
8943
8943
|
init_cn();
|
|
8944
|
-
MarkdownContent =
|
|
8944
|
+
MarkdownContent = React109__default.memo(
|
|
8945
8945
|
({ content, direction, className }) => {
|
|
8946
8946
|
const { t: _t } = useTranslate();
|
|
8947
8947
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9158,7 +9158,7 @@ var init_CodeBlock = __esm({
|
|
|
9158
9158
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
9159
9159
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
9160
9160
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
9161
|
-
CodeBlock =
|
|
9161
|
+
CodeBlock = React109__default.memo(
|
|
9162
9162
|
({
|
|
9163
9163
|
code: rawCode,
|
|
9164
9164
|
language = "text",
|
|
@@ -10467,7 +10467,7 @@ var init_StateMachineView = __esm({
|
|
|
10467
10467
|
style: { top: title ? 30 : 0 },
|
|
10468
10468
|
children: [
|
|
10469
10469
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
10470
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
10470
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React109__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
10471
10471
|
StateNode,
|
|
10472
10472
|
{
|
|
10473
10473
|
state,
|
|
@@ -16432,7 +16432,7 @@ function CraftingRecipe({
|
|
|
16432
16432
|
className
|
|
16433
16433
|
}) {
|
|
16434
16434
|
const eventBus = useEventBus();
|
|
16435
|
-
const handleCraft =
|
|
16435
|
+
const handleCraft = React109.useCallback(() => {
|
|
16436
16436
|
onCraft?.();
|
|
16437
16437
|
if (craftEvent) {
|
|
16438
16438
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16449,7 +16449,7 @@ function CraftingRecipe({
|
|
|
16449
16449
|
children: [
|
|
16450
16450
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16451
16451
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16452
|
-
return /* @__PURE__ */ jsxs(
|
|
16452
|
+
return /* @__PURE__ */ jsxs(React109.Fragment, { children: [
|
|
16453
16453
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16454
16454
|
ItemSlot,
|
|
16455
16455
|
{
|
|
@@ -16743,8 +16743,8 @@ function DPad({
|
|
|
16743
16743
|
}) {
|
|
16744
16744
|
const eventBus = useEventBus();
|
|
16745
16745
|
const sizes = sizeMap6[size];
|
|
16746
|
-
const [activeDirections, setActiveDirections] =
|
|
16747
|
-
const handlePress =
|
|
16746
|
+
const [activeDirections, setActiveDirections] = React109.useState(/* @__PURE__ */ new Set());
|
|
16747
|
+
const handlePress = React109.useCallback(
|
|
16748
16748
|
(direction) => {
|
|
16749
16749
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
16750
16750
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -16752,7 +16752,7 @@ function DPad({
|
|
|
16752
16752
|
},
|
|
16753
16753
|
[directionEvent, eventBus, onDirection]
|
|
16754
16754
|
);
|
|
16755
|
-
const handleRelease =
|
|
16755
|
+
const handleRelease = React109.useCallback(
|
|
16756
16756
|
(direction) => {
|
|
16757
16757
|
setActiveDirections((prev) => {
|
|
16758
16758
|
const next = new Set(prev);
|
|
@@ -16933,19 +16933,6 @@ var init_useAuthContext = __esm({
|
|
|
16933
16933
|
"hooks/useAuthContext.ts"() {
|
|
16934
16934
|
}
|
|
16935
16935
|
});
|
|
16936
|
-
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
16937
|
-
var init_CurrentPagePathContext = __esm({
|
|
16938
|
-
"context/CurrentPagePathContext.tsx"() {
|
|
16939
|
-
"use client";
|
|
16940
|
-
CurrentPagePathContext = createContext(void 0);
|
|
16941
|
-
CurrentPagePathProvider = ({
|
|
16942
|
-
value,
|
|
16943
|
-
children
|
|
16944
|
-
}) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
|
|
16945
|
-
CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
|
|
16946
|
-
useCurrentPagePath = () => useContext(CurrentPagePathContext);
|
|
16947
|
-
}
|
|
16948
|
-
});
|
|
16949
16936
|
var DashboardLayout, NavLink;
|
|
16950
16937
|
var init_DashboardLayout = __esm({
|
|
16951
16938
|
"components/templates/DashboardLayout.tsx"() {
|
|
@@ -16959,7 +16946,6 @@ var init_DashboardLayout = __esm({
|
|
|
16959
16946
|
init_useAuthContext();
|
|
16960
16947
|
init_useEventBus();
|
|
16961
16948
|
init_useTranslate();
|
|
16962
|
-
init_CurrentPagePathContext();
|
|
16963
16949
|
DashboardLayout = ({
|
|
16964
16950
|
appName = "{{APP_TITLE}}",
|
|
16965
16951
|
logo,
|
|
@@ -16976,7 +16962,6 @@ var init_DashboardLayout = __esm({
|
|
|
16976
16962
|
showThemeToggle = true,
|
|
16977
16963
|
sidebarFooter,
|
|
16978
16964
|
onSignOut: onSignOutProp,
|
|
16979
|
-
currentPath,
|
|
16980
16965
|
children
|
|
16981
16966
|
}) => {
|
|
16982
16967
|
const eventBus = useEventBus();
|
|
@@ -16997,8 +16982,6 @@ var init_DashboardLayout = __esm({
|
|
|
16997
16982
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
16998
16983
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
16999
16984
|
const location = useLocation();
|
|
17000
|
-
const ctxPagePath = useCurrentPagePath();
|
|
17001
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
17002
16985
|
const { user: authUser, signOut: authSignOut } = useAuthContext();
|
|
17003
16986
|
const user = userProp || (authUser ? {
|
|
17004
16987
|
name: authUser.displayName || authUser.email?.split("@")[0] || "User",
|
|
@@ -17007,265 +16990,255 @@ var init_DashboardLayout = __esm({
|
|
|
17007
16990
|
} : null);
|
|
17008
16991
|
const { t } = useTranslate();
|
|
17009
16992
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
17010
|
-
return /* @__PURE__ */ jsxs(
|
|
17011
|
-
|
|
17012
|
-
|
|
17013
|
-
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17019
|
-
|
|
17020
|
-
|
|
17021
|
-
|
|
16993
|
+
return /* @__PURE__ */ jsxs(Box, { className: "min-h-screen bg-background dark:bg-background", children: [
|
|
16994
|
+
sidebarOpen && /* @__PURE__ */ jsx(
|
|
16995
|
+
Box,
|
|
16996
|
+
{
|
|
16997
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
16998
|
+
onClick: () => setSidebarOpen(false)
|
|
16999
|
+
}
|
|
17000
|
+
),
|
|
17001
|
+
/* @__PURE__ */ jsxs(
|
|
17002
|
+
Box,
|
|
17003
|
+
{
|
|
17004
|
+
as: "aside",
|
|
17005
|
+
className: cn(
|
|
17006
|
+
"fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
17007
|
+
"transform transition-transform duration-200 ease-in-out lg:translate-x-0",
|
|
17008
|
+
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
17022
17009
|
),
|
|
17023
|
-
|
|
17024
|
-
|
|
17025
|
-
|
|
17026
|
-
|
|
17027
|
-
|
|
17028
|
-
|
|
17029
|
-
"
|
|
17030
|
-
|
|
17031
|
-
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
|
|
17036
|
-
|
|
17010
|
+
children: [
|
|
17011
|
+
/* @__PURE__ */ jsxs(
|
|
17012
|
+
HStack,
|
|
17013
|
+
{
|
|
17014
|
+
align: "center",
|
|
17015
|
+
justify: "between",
|
|
17016
|
+
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
17017
|
+
children: [
|
|
17018
|
+
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
17019
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
17020
|
+
Typography,
|
|
17021
|
+
{
|
|
17022
|
+
variant: "small",
|
|
17023
|
+
className: "text-white font-bold text-sm",
|
|
17024
|
+
as: "span",
|
|
17025
|
+
children: appName.charAt(0).toUpperCase()
|
|
17026
|
+
}
|
|
17027
|
+
) }),
|
|
17028
|
+
/* @__PURE__ */ jsx(
|
|
17029
|
+
Typography,
|
|
17030
|
+
{
|
|
17031
|
+
variant: "label",
|
|
17032
|
+
className: "font-semibold text-foreground dark:text-foreground",
|
|
17033
|
+
as: "span",
|
|
17034
|
+
children: appName
|
|
17035
|
+
}
|
|
17036
|
+
)
|
|
17037
|
+
] }),
|
|
17038
|
+
/* @__PURE__ */ jsx(
|
|
17039
|
+
Button,
|
|
17040
|
+
{
|
|
17041
|
+
variant: "ghost",
|
|
17042
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17043
|
+
onClick: () => setSidebarOpen(false),
|
|
17044
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
17045
|
+
}
|
|
17046
|
+
)
|
|
17047
|
+
]
|
|
17048
|
+
}
|
|
17049
|
+
),
|
|
17050
|
+
/* @__PURE__ */ jsx(
|
|
17051
|
+
VStack,
|
|
17052
|
+
{
|
|
17053
|
+
as: "nav",
|
|
17054
|
+
gap: "none",
|
|
17055
|
+
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17056
|
+
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
17057
|
+
NavLink,
|
|
17037
17058
|
{
|
|
17038
|
-
|
|
17039
|
-
|
|
17040
|
-
|
|
17041
|
-
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
+
item,
|
|
17060
|
+
currentPath: location.pathname
|
|
17061
|
+
},
|
|
17062
|
+
item.href
|
|
17063
|
+
))
|
|
17064
|
+
}
|
|
17065
|
+
),
|
|
17066
|
+
sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
|
|
17067
|
+
]
|
|
17068
|
+
}
|
|
17069
|
+
),
|
|
17070
|
+
/* @__PURE__ */ jsxs(Box, { className: "lg:pl-64", children: [
|
|
17071
|
+
/* @__PURE__ */ jsx(
|
|
17072
|
+
Box,
|
|
17073
|
+
{
|
|
17074
|
+
as: "header",
|
|
17075
|
+
className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
|
|
17076
|
+
children: /* @__PURE__ */ jsxs(
|
|
17077
|
+
HStack,
|
|
17078
|
+
{
|
|
17079
|
+
align: "center",
|
|
17080
|
+
justify: "between",
|
|
17081
|
+
className: "h-full px-4 gap-4",
|
|
17082
|
+
children: [
|
|
17083
|
+
/* @__PURE__ */ jsx(
|
|
17084
|
+
Button,
|
|
17085
|
+
{
|
|
17086
|
+
variant: "ghost",
|
|
17087
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
17088
|
+
onClick: () => setSidebarOpen(true),
|
|
17089
|
+
"aria-label": "Open sidebar",
|
|
17090
|
+
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
17091
|
+
}
|
|
17092
|
+
),
|
|
17093
|
+
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
17094
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
17095
|
+
/* @__PURE__ */ jsx(
|
|
17096
|
+
Input,
|
|
17097
|
+
{
|
|
17098
|
+
type: "search",
|
|
17099
|
+
placeholder: t("common.search"),
|
|
17100
|
+
className: "pl-10 w-full",
|
|
17101
|
+
onKeyDown: (e) => {
|
|
17102
|
+
if (e.key === "Enter") {
|
|
17103
|
+
handleSearchSubmit(e.target.value);
|
|
17059
17104
|
}
|
|
17060
|
-
)
|
|
17061
|
-
] }),
|
|
17062
|
-
/* @__PURE__ */ jsx(
|
|
17063
|
-
Button,
|
|
17064
|
-
{
|
|
17065
|
-
variant: "ghost",
|
|
17066
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17067
|
-
onClick: () => setSidebarOpen(false),
|
|
17068
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
17069
17105
|
}
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
}
|
|
17073
|
-
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
|
|
17078
|
-
gap: "none",
|
|
17079
|
-
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17080
|
-
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
17081
|
-
NavLink,
|
|
17106
|
+
}
|
|
17107
|
+
)
|
|
17108
|
+
] }) }),
|
|
17109
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17110
|
+
headerActions,
|
|
17111
|
+
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
17112
|
+
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
17113
|
+
Button,
|
|
17082
17114
|
{
|
|
17083
|
-
|
|
17084
|
-
|
|
17115
|
+
variant: "ghost",
|
|
17116
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17117
|
+
onClick: () => handleTopBarActionClick(action.event),
|
|
17118
|
+
"aria-label": action.label ?? action.icon,
|
|
17119
|
+
children: [
|
|
17120
|
+
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17121
|
+
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
17122
|
+
Box,
|
|
17123
|
+
{
|
|
17124
|
+
as: "span",
|
|
17125
|
+
className: cn(
|
|
17126
|
+
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17127
|
+
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17128
|
+
),
|
|
17129
|
+
children: action.badge
|
|
17130
|
+
}
|
|
17131
|
+
)
|
|
17132
|
+
]
|
|
17085
17133
|
},
|
|
17086
|
-
|
|
17087
|
-
))
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
|
|
17093
|
-
|
|
17094
|
-
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
|
|
17100
|
-
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
|
|
17134
|
+
`${action.event}-${idx}`
|
|
17135
|
+
)),
|
|
17136
|
+
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
17137
|
+
Button,
|
|
17138
|
+
{
|
|
17139
|
+
variant: "ghost",
|
|
17140
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17141
|
+
onClick: handleNotificationClick,
|
|
17142
|
+
"aria-label": t("common.notifications"),
|
|
17143
|
+
children: [
|
|
17144
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17145
|
+
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
17146
|
+
Box,
|
|
17147
|
+
{
|
|
17148
|
+
as: "span",
|
|
17149
|
+
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17150
|
+
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17151
|
+
}
|
|
17152
|
+
)
|
|
17153
|
+
]
|
|
17154
|
+
}
|
|
17155
|
+
),
|
|
17156
|
+
user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
17157
|
+
/* @__PURE__ */ jsxs(
|
|
17108
17158
|
Button,
|
|
17109
17159
|
{
|
|
17110
17160
|
variant: "ghost",
|
|
17111
|
-
className: "
|
|
17112
|
-
onClick: () =>
|
|
17113
|
-
|
|
17114
|
-
|
|
17161
|
+
className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
|
|
17162
|
+
onClick: () => setUserMenuOpen(!userMenuOpen),
|
|
17163
|
+
children: [
|
|
17164
|
+
/* @__PURE__ */ jsx(
|
|
17165
|
+
Avatar,
|
|
17166
|
+
{
|
|
17167
|
+
src: user.avatar,
|
|
17168
|
+
alt: user.name,
|
|
17169
|
+
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17170
|
+
size: "sm"
|
|
17171
|
+
}
|
|
17172
|
+
),
|
|
17173
|
+
/* @__PURE__ */ jsx(
|
|
17174
|
+
Typography,
|
|
17175
|
+
{
|
|
17176
|
+
variant: "small",
|
|
17177
|
+
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17178
|
+
as: "span",
|
|
17179
|
+
children: user.name
|
|
17180
|
+
}
|
|
17181
|
+
),
|
|
17182
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17183
|
+
]
|
|
17115
17184
|
}
|
|
17116
17185
|
),
|
|
17117
|
-
|
|
17118
|
-
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
17186
|
+
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17119
17187
|
/* @__PURE__ */ jsx(
|
|
17120
|
-
|
|
17121
|
-
{
|
|
17122
|
-
type: "search",
|
|
17123
|
-
placeholder: t("common.search"),
|
|
17124
|
-
className: "pl-10 w-full",
|
|
17125
|
-
onKeyDown: (e) => {
|
|
17126
|
-
if (e.key === "Enter") {
|
|
17127
|
-
handleSearchSubmit(e.target.value);
|
|
17128
|
-
}
|
|
17129
|
-
}
|
|
17130
|
-
}
|
|
17131
|
-
)
|
|
17132
|
-
] }) }),
|
|
17133
|
-
!searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
|
|
17134
|
-
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17135
|
-
headerActions,
|
|
17136
|
-
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
17137
|
-
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
17138
|
-
Button,
|
|
17139
|
-
{
|
|
17140
|
-
variant: "ghost",
|
|
17141
|
-
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17142
|
-
onClick: () => handleTopBarActionClick(action.event),
|
|
17143
|
-
"aria-label": action.label ?? action.icon,
|
|
17144
|
-
children: [
|
|
17145
|
-
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17146
|
-
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
17147
|
-
Box,
|
|
17148
|
-
{
|
|
17149
|
-
as: "span",
|
|
17150
|
-
className: cn(
|
|
17151
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17152
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17153
|
-
),
|
|
17154
|
-
children: action.badge
|
|
17155
|
-
}
|
|
17156
|
-
)
|
|
17157
|
-
]
|
|
17158
|
-
},
|
|
17159
|
-
`${action.event}-${idx}`
|
|
17160
|
-
)),
|
|
17161
|
-
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
17162
|
-
Button,
|
|
17188
|
+
Box,
|
|
17163
17189
|
{
|
|
17164
|
-
|
|
17165
|
-
|
|
17166
|
-
onClick: handleNotificationClick,
|
|
17167
|
-
"aria-label": t("common.notifications"),
|
|
17168
|
-
children: [
|
|
17169
|
-
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17170
|
-
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
17171
|
-
Box,
|
|
17172
|
-
{
|
|
17173
|
-
as: "span",
|
|
17174
|
-
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17175
|
-
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17176
|
-
}
|
|
17177
|
-
)
|
|
17178
|
-
]
|
|
17190
|
+
className: "fixed inset-0 z-20",
|
|
17191
|
+
onClick: () => setUserMenuOpen(false)
|
|
17179
17192
|
}
|
|
17180
17193
|
),
|
|
17181
|
-
|
|
17194
|
+
/* @__PURE__ */ jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
|
|
17195
|
+
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17196
|
+
/* @__PURE__ */ jsx(
|
|
17197
|
+
Typography,
|
|
17198
|
+
{
|
|
17199
|
+
variant: "small",
|
|
17200
|
+
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17201
|
+
as: "p",
|
|
17202
|
+
children: user.name
|
|
17203
|
+
}
|
|
17204
|
+
),
|
|
17205
|
+
/* @__PURE__ */ jsx(
|
|
17206
|
+
Typography,
|
|
17207
|
+
{
|
|
17208
|
+
variant: "caption",
|
|
17209
|
+
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17210
|
+
as: "p",
|
|
17211
|
+
children: user.email
|
|
17212
|
+
}
|
|
17213
|
+
)
|
|
17214
|
+
] }),
|
|
17182
17215
|
/* @__PURE__ */ jsxs(
|
|
17183
17216
|
Button,
|
|
17184
17217
|
{
|
|
17185
17218
|
variant: "ghost",
|
|
17186
|
-
|
|
17187
|
-
|
|
17219
|
+
onClick: () => {
|
|
17220
|
+
setUserMenuOpen(false);
|
|
17221
|
+
handleSignOut?.();
|
|
17222
|
+
},
|
|
17223
|
+
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
17188
17224
|
children: [
|
|
17189
|
-
/* @__PURE__ */ jsx(
|
|
17190
|
-
|
|
17191
|
-
{
|
|
17192
|
-
src: user.avatar,
|
|
17193
|
-
alt: user.name,
|
|
17194
|
-
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17195
|
-
size: "sm"
|
|
17196
|
-
}
|
|
17197
|
-
),
|
|
17198
|
-
/* @__PURE__ */ jsx(
|
|
17199
|
-
Typography,
|
|
17200
|
-
{
|
|
17201
|
-
variant: "small",
|
|
17202
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17203
|
-
as: "span",
|
|
17204
|
-
children: user.name
|
|
17205
|
-
}
|
|
17206
|
-
),
|
|
17207
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17225
|
+
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
17226
|
+
t("auth.signOut")
|
|
17208
17227
|
]
|
|
17209
17228
|
}
|
|
17210
|
-
)
|
|
17211
|
-
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17212
|
-
/* @__PURE__ */ jsx(
|
|
17213
|
-
Box,
|
|
17214
|
-
{
|
|
17215
|
-
className: "fixed inset-0 z-20",
|
|
17216
|
-
onClick: () => setUserMenuOpen(false)
|
|
17217
|
-
}
|
|
17218
|
-
),
|
|
17219
|
-
/* @__PURE__ */ jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
|
|
17220
|
-
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17221
|
-
/* @__PURE__ */ jsx(
|
|
17222
|
-
Typography,
|
|
17223
|
-
{
|
|
17224
|
-
variant: "small",
|
|
17225
|
-
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17226
|
-
as: "p",
|
|
17227
|
-
children: user.name
|
|
17228
|
-
}
|
|
17229
|
-
),
|
|
17230
|
-
/* @__PURE__ */ jsx(
|
|
17231
|
-
Typography,
|
|
17232
|
-
{
|
|
17233
|
-
variant: "caption",
|
|
17234
|
-
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17235
|
-
as: "p",
|
|
17236
|
-
children: user.email
|
|
17237
|
-
}
|
|
17238
|
-
)
|
|
17239
|
-
] }),
|
|
17240
|
-
/* @__PURE__ */ jsxs(
|
|
17241
|
-
Button,
|
|
17242
|
-
{
|
|
17243
|
-
variant: "ghost",
|
|
17244
|
-
onClick: () => {
|
|
17245
|
-
setUserMenuOpen(false);
|
|
17246
|
-
handleSignOut?.();
|
|
17247
|
-
},
|
|
17248
|
-
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
17249
|
-
children: [
|
|
17250
|
-
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
17251
|
-
t("auth.signOut")
|
|
17252
|
-
]
|
|
17253
|
-
}
|
|
17254
|
-
)
|
|
17255
|
-
] })
|
|
17256
|
-
] })
|
|
17229
|
+
)
|
|
17257
17230
|
] })
|
|
17258
17231
|
] })
|
|
17259
|
-
]
|
|
17260
|
-
}
|
|
17261
|
-
|
|
17232
|
+
] })
|
|
17233
|
+
] })
|
|
17234
|
+
]
|
|
17262
17235
|
}
|
|
17263
|
-
)
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
|
|
17267
|
-
}
|
|
17268
|
-
);
|
|
17236
|
+
)
|
|
17237
|
+
}
|
|
17238
|
+
),
|
|
17239
|
+
/* @__PURE__ */ jsx(Box, { as: "main", className: "p-4 sm:p-6", children })
|
|
17240
|
+
] })
|
|
17241
|
+
] });
|
|
17269
17242
|
};
|
|
17270
17243
|
DashboardLayout.displayName = "DashboardLayout";
|
|
17271
17244
|
NavLink = ({
|
|
@@ -17759,13 +17732,13 @@ function DataList({
|
|
|
17759
17732
|
}) {
|
|
17760
17733
|
const eventBus = useEventBus();
|
|
17761
17734
|
const { t } = useTranslate();
|
|
17762
|
-
const [visibleCount, setVisibleCount] =
|
|
17735
|
+
const [visibleCount, setVisibleCount] = React109__default.useState(pageSize || Infinity);
|
|
17763
17736
|
const fieldDefs = fields ?? columns ?? [];
|
|
17764
17737
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17765
17738
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
17766
17739
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
17767
17740
|
const hasRenderProp = typeof children === "function";
|
|
17768
|
-
|
|
17741
|
+
React109__default.useEffect(() => {
|
|
17769
17742
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
17770
17743
|
const childrenTypeOf = typeof children;
|
|
17771
17744
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -17821,7 +17794,7 @@ function DataList({
|
|
|
17821
17794
|
const items2 = data.map((item) => item);
|
|
17822
17795
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17823
17796
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
17824
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17797
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
|
|
17825
17798
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17826
17799
|
group.items.map((itemData, index) => {
|
|
17827
17800
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -18012,7 +17985,7 @@ function DataList({
|
|
|
18012
17985
|
className
|
|
18013
17986
|
),
|
|
18014
17987
|
children: [
|
|
18015
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17988
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
|
|
18016
17989
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
18017
17990
|
group.items.map(
|
|
18018
17991
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -19296,7 +19269,7 @@ var init_WizardProgress = __esm({
|
|
|
19296
19269
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
19297
19270
|
const isActive = index === currentStep;
|
|
19298
19271
|
const isCompleted = index < currentStep;
|
|
19299
|
-
return /* @__PURE__ */ jsxs(
|
|
19272
|
+
return /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
|
|
19300
19273
|
/* @__PURE__ */ jsx(
|
|
19301
19274
|
"button",
|
|
19302
19275
|
{
|
|
@@ -20196,9 +20169,9 @@ function ScoreDisplay({
|
|
|
20196
20169
|
...rest
|
|
20197
20170
|
}) {
|
|
20198
20171
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
20199
|
-
const [displayValue, setDisplayValue] =
|
|
20200
|
-
const [isAnimating, setIsAnimating] =
|
|
20201
|
-
|
|
20172
|
+
const [displayValue, setDisplayValue] = React109.useState(resolvedValue);
|
|
20173
|
+
const [isAnimating, setIsAnimating] = React109.useState(false);
|
|
20174
|
+
React109.useEffect(() => {
|
|
20202
20175
|
if (!animated || displayValue === resolvedValue) {
|
|
20203
20176
|
setDisplayValue(resolvedValue);
|
|
20204
20177
|
return;
|
|
@@ -20348,7 +20321,7 @@ function InventoryGrid({
|
|
|
20348
20321
|
const eventBus = useEventBus();
|
|
20349
20322
|
const slotCount = totalSlots ?? items.length;
|
|
20350
20323
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
20351
|
-
const handleSelect =
|
|
20324
|
+
const handleSelect = React109.useCallback(
|
|
20352
20325
|
(id) => {
|
|
20353
20326
|
onSelect?.(id);
|
|
20354
20327
|
if (selectEvent) {
|
|
@@ -20630,15 +20603,15 @@ function GameCanvas2D({
|
|
|
20630
20603
|
fps = 60,
|
|
20631
20604
|
className
|
|
20632
20605
|
}) {
|
|
20633
|
-
const canvasRef =
|
|
20634
|
-
const rafRef =
|
|
20635
|
-
const frameRef =
|
|
20636
|
-
const lastTimeRef =
|
|
20637
|
-
const onDrawRef =
|
|
20606
|
+
const canvasRef = React109.useRef(null);
|
|
20607
|
+
const rafRef = React109.useRef(0);
|
|
20608
|
+
const frameRef = React109.useRef(0);
|
|
20609
|
+
const lastTimeRef = React109.useRef(0);
|
|
20610
|
+
const onDrawRef = React109.useRef(onDraw);
|
|
20638
20611
|
onDrawRef.current = onDraw;
|
|
20639
|
-
const onTickRef =
|
|
20612
|
+
const onTickRef = React109.useRef(onTick);
|
|
20640
20613
|
onTickRef.current = onTick;
|
|
20641
|
-
|
|
20614
|
+
React109.useEffect(() => {
|
|
20642
20615
|
const canvas = canvasRef.current;
|
|
20643
20616
|
if (!canvas) return;
|
|
20644
20617
|
const ctx = canvas.getContext("2d");
|
|
@@ -20979,7 +20952,7 @@ function TurnPanel({
|
|
|
20979
20952
|
className
|
|
20980
20953
|
}) {
|
|
20981
20954
|
const eventBus = useEventBus();
|
|
20982
|
-
const handleAction =
|
|
20955
|
+
const handleAction = React109.useCallback(
|
|
20983
20956
|
(event) => {
|
|
20984
20957
|
if (event) {
|
|
20985
20958
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -21125,7 +21098,7 @@ function UnitCommandBar({
|
|
|
21125
21098
|
className
|
|
21126
21099
|
}) {
|
|
21127
21100
|
const eventBus = useEventBus();
|
|
21128
|
-
const handleCommand =
|
|
21101
|
+
const handleCommand = React109.useCallback(
|
|
21129
21102
|
(event) => {
|
|
21130
21103
|
if (event) {
|
|
21131
21104
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -21610,7 +21583,7 @@ function GameMenu({
|
|
|
21610
21583
|
} catch {
|
|
21611
21584
|
}
|
|
21612
21585
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21613
|
-
const handleOptionClick =
|
|
21586
|
+
const handleOptionClick = React109.useCallback(
|
|
21614
21587
|
(option) => {
|
|
21615
21588
|
if (option.event && eventBus) {
|
|
21616
21589
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21724,7 +21697,7 @@ function GameOverScreen({
|
|
|
21724
21697
|
} catch {
|
|
21725
21698
|
}
|
|
21726
21699
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21727
|
-
const handleActionClick =
|
|
21700
|
+
const handleActionClick = React109.useCallback(
|
|
21728
21701
|
(action) => {
|
|
21729
21702
|
if (action.event && eventBus) {
|
|
21730
21703
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -24855,7 +24828,7 @@ var init_StepFlow = __esm({
|
|
|
24855
24828
|
className
|
|
24856
24829
|
}) => {
|
|
24857
24830
|
if (orientation === "vertical") {
|
|
24858
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
24831
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React109__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
24859
24832
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
24860
24833
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
24861
24834
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -24866,7 +24839,7 @@ var init_StepFlow = __esm({
|
|
|
24866
24839
|
] })
|
|
24867
24840
|
] }) }, index)) });
|
|
24868
24841
|
}
|
|
24869
|
-
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(
|
|
24842
|
+
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(React109__default.Fragment, { children: [
|
|
24870
24843
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
24871
24844
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
24872
24845
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -27018,7 +26991,7 @@ var init_DocumentViewer = __esm({
|
|
|
27018
26991
|
}
|
|
27019
26992
|
});
|
|
27020
26993
|
function extractTitle(children) {
|
|
27021
|
-
if (!
|
|
26994
|
+
if (!React109__default.isValidElement(children)) return void 0;
|
|
27022
26995
|
const props = children.props;
|
|
27023
26996
|
if (typeof props.title === "string") {
|
|
27024
26997
|
return props.title;
|
|
@@ -27130,7 +27103,7 @@ function LinearView({
|
|
|
27130
27103
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
27131
27104
|
const isDone = i < currentIdx;
|
|
27132
27105
|
const isCurrent = i === currentIdx;
|
|
27133
|
-
return /* @__PURE__ */ jsxs(
|
|
27106
|
+
return /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
|
|
27134
27107
|
i > 0 && /* @__PURE__ */ jsx(
|
|
27135
27108
|
Typography,
|
|
27136
27109
|
{
|
|
@@ -27914,12 +27887,12 @@ var init_Form = __esm({
|
|
|
27914
27887
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
27915
27888
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
27916
27889
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
27917
|
-
const normalizedInitialData =
|
|
27890
|
+
const normalizedInitialData = React109__default.useMemo(() => {
|
|
27918
27891
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
27919
27892
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
27920
27893
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
27921
27894
|
}, [entity, initialData]);
|
|
27922
|
-
const entityDerivedFields =
|
|
27895
|
+
const entityDerivedFields = React109__default.useMemo(() => {
|
|
27923
27896
|
if (fields && fields.length > 0) return void 0;
|
|
27924
27897
|
if (!resolvedEntity) return void 0;
|
|
27925
27898
|
return resolvedEntity.fields.map(
|
|
@@ -27938,16 +27911,16 @@ var init_Form = __esm({
|
|
|
27938
27911
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
27939
27912
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
27940
27913
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
27941
|
-
const [formData, setFormData] =
|
|
27914
|
+
const [formData, setFormData] = React109__default.useState(
|
|
27942
27915
|
normalizedInitialData
|
|
27943
27916
|
);
|
|
27944
|
-
const [collapsedSections, setCollapsedSections] =
|
|
27917
|
+
const [collapsedSections, setCollapsedSections] = React109__default.useState(
|
|
27945
27918
|
/* @__PURE__ */ new Set()
|
|
27946
27919
|
);
|
|
27947
|
-
const [submitError, setSubmitError] =
|
|
27948
|
-
const formRef =
|
|
27920
|
+
const [submitError, setSubmitError] = React109__default.useState(null);
|
|
27921
|
+
const formRef = React109__default.useRef(null);
|
|
27949
27922
|
const formMode = props.mode;
|
|
27950
|
-
const mountedRef =
|
|
27923
|
+
const mountedRef = React109__default.useRef(false);
|
|
27951
27924
|
if (!mountedRef.current) {
|
|
27952
27925
|
mountedRef.current = true;
|
|
27953
27926
|
debug("forms", "mount", {
|
|
@@ -27960,7 +27933,7 @@ var init_Form = __esm({
|
|
|
27960
27933
|
});
|
|
27961
27934
|
}
|
|
27962
27935
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
27963
|
-
const evalContext =
|
|
27936
|
+
const evalContext = React109__default.useMemo(
|
|
27964
27937
|
() => ({
|
|
27965
27938
|
formValues: formData,
|
|
27966
27939
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -27969,7 +27942,7 @@ var init_Form = __esm({
|
|
|
27969
27942
|
}),
|
|
27970
27943
|
[formData, externalContext]
|
|
27971
27944
|
);
|
|
27972
|
-
|
|
27945
|
+
React109__default.useEffect(() => {
|
|
27973
27946
|
debug("forms", "initialData-sync", {
|
|
27974
27947
|
mode: formMode,
|
|
27975
27948
|
normalizedInitialData,
|
|
@@ -27980,7 +27953,7 @@ var init_Form = __esm({
|
|
|
27980
27953
|
setFormData(normalizedInitialData);
|
|
27981
27954
|
}
|
|
27982
27955
|
}, [normalizedInitialData]);
|
|
27983
|
-
const processCalculations =
|
|
27956
|
+
const processCalculations = React109__default.useCallback(
|
|
27984
27957
|
(changedFieldId, newFormData) => {
|
|
27985
27958
|
if (!hiddenCalculations.length) return;
|
|
27986
27959
|
const context = {
|
|
@@ -28005,7 +27978,7 @@ var init_Form = __esm({
|
|
|
28005
27978
|
},
|
|
28006
27979
|
[hiddenCalculations, externalContext, eventBus]
|
|
28007
27980
|
);
|
|
28008
|
-
const checkViolations =
|
|
27981
|
+
const checkViolations = React109__default.useCallback(
|
|
28009
27982
|
(changedFieldId, newFormData) => {
|
|
28010
27983
|
if (!violationTriggers.length) return;
|
|
28011
27984
|
const context = {
|
|
@@ -28043,7 +28016,7 @@ var init_Form = __esm({
|
|
|
28043
28016
|
processCalculations(name, newFormData);
|
|
28044
28017
|
checkViolations(name, newFormData);
|
|
28045
28018
|
};
|
|
28046
|
-
const isFieldVisible =
|
|
28019
|
+
const isFieldVisible = React109__default.useCallback(
|
|
28047
28020
|
(fieldName) => {
|
|
28048
28021
|
const condition = conditionalFields[fieldName];
|
|
28049
28022
|
if (!condition) return true;
|
|
@@ -28051,7 +28024,7 @@ var init_Form = __esm({
|
|
|
28051
28024
|
},
|
|
28052
28025
|
[conditionalFields, evalContext]
|
|
28053
28026
|
);
|
|
28054
|
-
const isSectionVisible =
|
|
28027
|
+
const isSectionVisible = React109__default.useCallback(
|
|
28055
28028
|
(section) => {
|
|
28056
28029
|
if (!section.condition) return true;
|
|
28057
28030
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -28127,7 +28100,7 @@ var init_Form = __esm({
|
|
|
28127
28100
|
eventBus.emit(`UI:${onCancel}`);
|
|
28128
28101
|
}
|
|
28129
28102
|
};
|
|
28130
|
-
const renderField =
|
|
28103
|
+
const renderField = React109__default.useCallback(
|
|
28131
28104
|
(field) => {
|
|
28132
28105
|
const fieldName = field.name || field.field;
|
|
28133
28106
|
if (!fieldName) return null;
|
|
@@ -28148,7 +28121,7 @@ var init_Form = __esm({
|
|
|
28148
28121
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
28149
28122
|
);
|
|
28150
28123
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
28151
|
-
const normalizedFields =
|
|
28124
|
+
const normalizedFields = React109__default.useMemo(() => {
|
|
28152
28125
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
28153
28126
|
return effectiveFields.map((field) => {
|
|
28154
28127
|
if (typeof field === "string") {
|
|
@@ -28170,7 +28143,7 @@ var init_Form = __esm({
|
|
|
28170
28143
|
return field;
|
|
28171
28144
|
});
|
|
28172
28145
|
}, [effectiveFields, resolvedEntity]);
|
|
28173
|
-
const schemaFields =
|
|
28146
|
+
const schemaFields = React109__default.useMemo(() => {
|
|
28174
28147
|
if (normalizedFields.length === 0) return null;
|
|
28175
28148
|
if (isDebugEnabled()) {
|
|
28176
28149
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -28180,7 +28153,7 @@ var init_Form = __esm({
|
|
|
28180
28153
|
}
|
|
28181
28154
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
28182
28155
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
28183
|
-
const sectionElements =
|
|
28156
|
+
const sectionElements = React109__default.useMemo(() => {
|
|
28184
28157
|
if (!sections || sections.length === 0) return null;
|
|
28185
28158
|
return sections.map((section) => {
|
|
28186
28159
|
if (!isSectionVisible(section)) {
|
|
@@ -29712,7 +29685,7 @@ var init_List = __esm({
|
|
|
29712
29685
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
29713
29686
|
return [];
|
|
29714
29687
|
}, [entity]);
|
|
29715
|
-
const getItemActions =
|
|
29688
|
+
const getItemActions = React109__default.useCallback(
|
|
29716
29689
|
(item) => {
|
|
29717
29690
|
if (!itemActions) return [];
|
|
29718
29691
|
if (typeof itemActions === "function") {
|
|
@@ -30149,7 +30122,7 @@ var init_MediaGallery = __esm({
|
|
|
30149
30122
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
30150
30123
|
);
|
|
30151
30124
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
30152
|
-
const items =
|
|
30125
|
+
const items = React109__default.useMemo(() => {
|
|
30153
30126
|
if (propItems) return propItems;
|
|
30154
30127
|
if (entityData.length === 0) return [];
|
|
30155
30128
|
return entityData.map((record, idx) => ({
|
|
@@ -30322,9 +30295,9 @@ function MiniMap({
|
|
|
30322
30295
|
viewportRect,
|
|
30323
30296
|
className
|
|
30324
30297
|
}) {
|
|
30325
|
-
const canvasRef =
|
|
30326
|
-
const frameRef =
|
|
30327
|
-
|
|
30298
|
+
const canvasRef = React109.useRef(null);
|
|
30299
|
+
const frameRef = React109.useRef(0);
|
|
30300
|
+
React109.useEffect(() => {
|
|
30328
30301
|
const canvas = canvasRef.current;
|
|
30329
30302
|
if (!canvas) return;
|
|
30330
30303
|
const ctx = canvas.getContext("2d");
|
|
@@ -30406,7 +30379,7 @@ var init_MiniMap = __esm({
|
|
|
30406
30379
|
}
|
|
30407
30380
|
});
|
|
30408
30381
|
function extractTitle2(children) {
|
|
30409
|
-
if (!
|
|
30382
|
+
if (!React109__default.isValidElement(children)) return void 0;
|
|
30410
30383
|
const props = children.props;
|
|
30411
30384
|
if (typeof props.title === "string") {
|
|
30412
30385
|
return props.title;
|
|
@@ -31119,7 +31092,7 @@ var init_PageHeader = __esm({
|
|
|
31119
31092
|
info: "bg-info/10 text-info"
|
|
31120
31093
|
};
|
|
31121
31094
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
31122
|
-
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(
|
|
31095
|
+
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(React109__default.Fragment, { children: [
|
|
31123
31096
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
31124
31097
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
31125
31098
|
"a",
|
|
@@ -31338,7 +31311,7 @@ var init_debugRegistry = __esm({
|
|
|
31338
31311
|
}
|
|
31339
31312
|
});
|
|
31340
31313
|
function useDebugData() {
|
|
31341
|
-
const [data, setData] =
|
|
31314
|
+
const [data, setData] = React109.useState(() => ({
|
|
31342
31315
|
traits: [],
|
|
31343
31316
|
ticks: [],
|
|
31344
31317
|
guards: [],
|
|
@@ -31352,7 +31325,7 @@ function useDebugData() {
|
|
|
31352
31325
|
},
|
|
31353
31326
|
lastUpdate: Date.now()
|
|
31354
31327
|
}));
|
|
31355
|
-
|
|
31328
|
+
React109.useEffect(() => {
|
|
31356
31329
|
const updateData = () => {
|
|
31357
31330
|
setData({
|
|
31358
31331
|
traits: getAllTraits(),
|
|
@@ -31461,12 +31434,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
31461
31434
|
return positions;
|
|
31462
31435
|
}
|
|
31463
31436
|
function WalkMinimap() {
|
|
31464
|
-
const [walkStep, setWalkStep] =
|
|
31465
|
-
const [traits2, setTraits] =
|
|
31466
|
-
const [coveredEdges, setCoveredEdges] =
|
|
31467
|
-
const [completedTraits, setCompletedTraits] =
|
|
31468
|
-
const prevTraitRef =
|
|
31469
|
-
|
|
31437
|
+
const [walkStep, setWalkStep] = React109.useState(null);
|
|
31438
|
+
const [traits2, setTraits] = React109.useState([]);
|
|
31439
|
+
const [coveredEdges, setCoveredEdges] = React109.useState([]);
|
|
31440
|
+
const [completedTraits, setCompletedTraits] = React109.useState(/* @__PURE__ */ new Set());
|
|
31441
|
+
const prevTraitRef = React109.useRef(null);
|
|
31442
|
+
React109.useEffect(() => {
|
|
31470
31443
|
const interval = setInterval(() => {
|
|
31471
31444
|
const w = window;
|
|
31472
31445
|
const step = w.__orbitalWalkStep;
|
|
@@ -31913,15 +31886,15 @@ var init_EntitiesTab = __esm({
|
|
|
31913
31886
|
}
|
|
31914
31887
|
});
|
|
31915
31888
|
function EventFlowTab({ events: events2 }) {
|
|
31916
|
-
const [filter, setFilter] =
|
|
31917
|
-
const containerRef =
|
|
31918
|
-
const [autoScroll, setAutoScroll] =
|
|
31919
|
-
|
|
31889
|
+
const [filter, setFilter] = React109.useState("all");
|
|
31890
|
+
const containerRef = React109.useRef(null);
|
|
31891
|
+
const [autoScroll, setAutoScroll] = React109.useState(true);
|
|
31892
|
+
React109.useEffect(() => {
|
|
31920
31893
|
if (autoScroll && containerRef.current) {
|
|
31921
31894
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
31922
31895
|
}
|
|
31923
31896
|
}, [events2.length, autoScroll]);
|
|
31924
|
-
const filteredEvents =
|
|
31897
|
+
const filteredEvents = React109.useMemo(() => {
|
|
31925
31898
|
if (filter === "all") return events2;
|
|
31926
31899
|
return events2.filter((e) => e.type === filter);
|
|
31927
31900
|
}, [events2, filter]);
|
|
@@ -32040,7 +32013,7 @@ var init_EventFlowTab = __esm({
|
|
|
32040
32013
|
}
|
|
32041
32014
|
});
|
|
32042
32015
|
function GuardsPanel({ guards }) {
|
|
32043
|
-
const [filter, setFilter] =
|
|
32016
|
+
const [filter, setFilter] = React109.useState("all");
|
|
32044
32017
|
if (guards.length === 0) {
|
|
32045
32018
|
return /* @__PURE__ */ jsx(
|
|
32046
32019
|
EmptyState,
|
|
@@ -32053,7 +32026,7 @@ function GuardsPanel({ guards }) {
|
|
|
32053
32026
|
}
|
|
32054
32027
|
const passedCount = guards.filter((g) => g.result).length;
|
|
32055
32028
|
const failedCount = guards.length - passedCount;
|
|
32056
|
-
const filteredGuards =
|
|
32029
|
+
const filteredGuards = React109.useMemo(() => {
|
|
32057
32030
|
if (filter === "all") return guards;
|
|
32058
32031
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
32059
32032
|
return guards.filter((g) => !g.result);
|
|
@@ -32214,10 +32187,10 @@ function EffectBadge({ effect }) {
|
|
|
32214
32187
|
] });
|
|
32215
32188
|
}
|
|
32216
32189
|
function TransitionTimeline({ transitions }) {
|
|
32217
|
-
const containerRef =
|
|
32218
|
-
const [autoScroll, setAutoScroll] =
|
|
32219
|
-
const [expandedId, setExpandedId] =
|
|
32220
|
-
|
|
32190
|
+
const containerRef = React109.useRef(null);
|
|
32191
|
+
const [autoScroll, setAutoScroll] = React109.useState(true);
|
|
32192
|
+
const [expandedId, setExpandedId] = React109.useState(null);
|
|
32193
|
+
React109.useEffect(() => {
|
|
32221
32194
|
if (autoScroll && containerRef.current) {
|
|
32222
32195
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
32223
32196
|
}
|
|
@@ -32503,9 +32476,9 @@ function getAllEvents(traits2) {
|
|
|
32503
32476
|
}
|
|
32504
32477
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
32505
32478
|
const eventBus = useEventBus();
|
|
32506
|
-
const [log3, setLog] =
|
|
32507
|
-
const prevStatesRef =
|
|
32508
|
-
|
|
32479
|
+
const [log3, setLog] = React109.useState([]);
|
|
32480
|
+
const prevStatesRef = React109.useRef(/* @__PURE__ */ new Map());
|
|
32481
|
+
React109.useEffect(() => {
|
|
32509
32482
|
for (const trait of traits2) {
|
|
32510
32483
|
const prev = prevStatesRef.current.get(trait.id);
|
|
32511
32484
|
if (prev && prev !== trait.currentState) {
|
|
@@ -32675,10 +32648,10 @@ function VerifyModePanel({
|
|
|
32675
32648
|
serverCount,
|
|
32676
32649
|
localCount
|
|
32677
32650
|
}) {
|
|
32678
|
-
const [expanded, setExpanded] =
|
|
32679
|
-
const scrollRef =
|
|
32680
|
-
const prevCountRef =
|
|
32681
|
-
|
|
32651
|
+
const [expanded, setExpanded] = React109.useState(true);
|
|
32652
|
+
const scrollRef = React109.useRef(null);
|
|
32653
|
+
const prevCountRef = React109.useRef(0);
|
|
32654
|
+
React109.useEffect(() => {
|
|
32682
32655
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
32683
32656
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
32684
32657
|
}
|
|
@@ -32744,10 +32717,10 @@ function RuntimeDebugger({
|
|
|
32744
32717
|
defaultTab,
|
|
32745
32718
|
schema
|
|
32746
32719
|
}) {
|
|
32747
|
-
const [isCollapsed, setIsCollapsed] =
|
|
32748
|
-
const [isVisible, setIsVisible] =
|
|
32720
|
+
const [isCollapsed, setIsCollapsed] = React109.useState(mode === "verify" ? true : defaultCollapsed);
|
|
32721
|
+
const [isVisible, setIsVisible] = React109.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
32749
32722
|
const debugData = useDebugData();
|
|
32750
|
-
|
|
32723
|
+
React109.useEffect(() => {
|
|
32751
32724
|
if (mode === "inline") return;
|
|
32752
32725
|
return onDebugToggle((enabled) => {
|
|
32753
32726
|
setIsVisible(enabled);
|
|
@@ -32756,7 +32729,7 @@ function RuntimeDebugger({
|
|
|
32756
32729
|
}
|
|
32757
32730
|
});
|
|
32758
32731
|
}, [mode]);
|
|
32759
|
-
|
|
32732
|
+
React109.useEffect(() => {
|
|
32760
32733
|
if (mode === "inline") return;
|
|
32761
32734
|
const handleKeyDown = (e) => {
|
|
32762
32735
|
if (e.key === "`" && isVisible) {
|
|
@@ -33305,7 +33278,7 @@ function SequenceBar({
|
|
|
33305
33278
|
onSlotRemove(index);
|
|
33306
33279
|
}, [onSlotRemove, playing]);
|
|
33307
33280
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
33308
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
33281
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
|
|
33309
33282
|
i > 0 && /* @__PURE__ */ jsx(
|
|
33310
33283
|
Typography,
|
|
33311
33284
|
{
|
|
@@ -34761,7 +34734,7 @@ var init_StatCard2 = __esm({
|
|
|
34761
34734
|
const labelToUse = propLabel ?? propTitle;
|
|
34762
34735
|
const eventBus = useEventBus();
|
|
34763
34736
|
const { t } = useTranslate();
|
|
34764
|
-
const handleActionClick =
|
|
34737
|
+
const handleActionClick = React109__default.useCallback(() => {
|
|
34765
34738
|
if (action?.event) {
|
|
34766
34739
|
eventBus.emit(`UI:${action.event}`, {});
|
|
34767
34740
|
}
|
|
@@ -34772,7 +34745,7 @@ var init_StatCard2 = __esm({
|
|
|
34772
34745
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34773
34746
|
const isLoading = externalLoading ?? false;
|
|
34774
34747
|
const error = externalError;
|
|
34775
|
-
const computeMetricValue =
|
|
34748
|
+
const computeMetricValue = React109__default.useCallback(
|
|
34776
34749
|
(metric, items) => {
|
|
34777
34750
|
if (metric.value !== void 0) {
|
|
34778
34751
|
return metric.value;
|
|
@@ -34811,7 +34784,7 @@ var init_StatCard2 = __esm({
|
|
|
34811
34784
|
},
|
|
34812
34785
|
[]
|
|
34813
34786
|
);
|
|
34814
|
-
const schemaStats =
|
|
34787
|
+
const schemaStats = React109__default.useMemo(() => {
|
|
34815
34788
|
if (!metrics || metrics.length === 0) return null;
|
|
34816
34789
|
return metrics.map((metric) => ({
|
|
34817
34790
|
label: metric.label,
|
|
@@ -34819,7 +34792,7 @@ var init_StatCard2 = __esm({
|
|
|
34819
34792
|
format: metric.format
|
|
34820
34793
|
}));
|
|
34821
34794
|
}, [metrics, data, computeMetricValue]);
|
|
34822
|
-
const calculatedTrend =
|
|
34795
|
+
const calculatedTrend = React109__default.useMemo(() => {
|
|
34823
34796
|
if (manualTrend !== void 0) return manualTrend;
|
|
34824
34797
|
if (previousValue === void 0 || currentValue === void 0)
|
|
34825
34798
|
return void 0;
|
|
@@ -35874,7 +35847,7 @@ var init_Timeline = __esm({
|
|
|
35874
35847
|
}) => {
|
|
35875
35848
|
const { t } = useTranslate();
|
|
35876
35849
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
35877
|
-
const items =
|
|
35850
|
+
const items = React109__default.useMemo(() => {
|
|
35878
35851
|
if (propItems) return propItems;
|
|
35879
35852
|
if (entityData.length === 0) return [];
|
|
35880
35853
|
return entityData.map((record, idx) => {
|
|
@@ -36031,7 +36004,7 @@ var init_TimerDisplay = __esm({
|
|
|
36031
36004
|
}
|
|
36032
36005
|
});
|
|
36033
36006
|
function extractToastProps(children) {
|
|
36034
|
-
if (!
|
|
36007
|
+
if (!React109__default.isValidElement(children)) {
|
|
36035
36008
|
if (typeof children === "string") {
|
|
36036
36009
|
return { message: children };
|
|
36037
36010
|
}
|
|
@@ -36069,7 +36042,7 @@ var init_ToastSlot = __esm({
|
|
|
36069
36042
|
eventBus.emit("UI:CLOSE");
|
|
36070
36043
|
};
|
|
36071
36044
|
if (!isVisible) return null;
|
|
36072
|
-
const isCustomContent =
|
|
36045
|
+
const isCustomContent = React109__default.isValidElement(children) && !message;
|
|
36073
36046
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
36074
36047
|
Toast,
|
|
36075
36048
|
{
|
|
@@ -36338,7 +36311,7 @@ var init_WizardContainer = __esm({
|
|
|
36338
36311
|
const isCompleted = index < currentStep;
|
|
36339
36312
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36340
36313
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36341
|
-
return /* @__PURE__ */ jsxs(
|
|
36314
|
+
return /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
|
|
36342
36315
|
/* @__PURE__ */ jsx(
|
|
36343
36316
|
Button,
|
|
36344
36317
|
{
|
|
@@ -36788,12 +36761,12 @@ var init_XPBar = __esm({
|
|
|
36788
36761
|
}
|
|
36789
36762
|
});
|
|
36790
36763
|
function lazyThree(name, loader) {
|
|
36791
|
-
const Lazy =
|
|
36764
|
+
const Lazy = React109__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
36792
36765
|
function ThreeWrapper(props) {
|
|
36793
|
-
return
|
|
36794
|
-
|
|
36766
|
+
return React109__default.createElement(
|
|
36767
|
+
React109__default.Suspense,
|
|
36795
36768
|
{ fallback: null },
|
|
36796
|
-
|
|
36769
|
+
React109__default.createElement(Lazy, props)
|
|
36797
36770
|
);
|
|
36798
36771
|
}
|
|
36799
36772
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -37281,7 +37254,7 @@ function SuspenseConfigProvider({
|
|
|
37281
37254
|
config,
|
|
37282
37255
|
children
|
|
37283
37256
|
}) {
|
|
37284
|
-
return
|
|
37257
|
+
return React109__default.createElement(
|
|
37285
37258
|
SuspenseConfigContext.Provider,
|
|
37286
37259
|
{ value: config },
|
|
37287
37260
|
children
|
|
@@ -37764,7 +37737,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
37764
37737
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
37765
37738
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
37766
37739
|
}
|
|
37767
|
-
return /* @__PURE__ */ jsx(
|
|
37740
|
+
return /* @__PURE__ */ jsx(React109__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
37768
37741
|
}
|
|
37769
37742
|
if (!child || typeof child !== "object") return null;
|
|
37770
37743
|
const childId = `${parentId}-${index}`;
|
|
@@ -37801,14 +37774,14 @@ function isPatternConfig(value) {
|
|
|
37801
37774
|
if (value === null || value === void 0) return false;
|
|
37802
37775
|
if (typeof value !== "object") return false;
|
|
37803
37776
|
if (Array.isArray(value)) return false;
|
|
37804
|
-
if (
|
|
37777
|
+
if (React109__default.isValidElement(value)) return false;
|
|
37805
37778
|
if (value instanceof Date) return false;
|
|
37806
37779
|
if (typeof value === "function") return false;
|
|
37807
37780
|
const record = value;
|
|
37808
37781
|
return "type" in record && typeof record.type === "string";
|
|
37809
37782
|
}
|
|
37810
37783
|
function isPlainConfigObject(value) {
|
|
37811
|
-
if (
|
|
37784
|
+
if (React109__default.isValidElement(value)) return false;
|
|
37812
37785
|
if (value instanceof Date) return false;
|
|
37813
37786
|
const proto = Object.getPrototypeOf(value);
|
|
37814
37787
|
return proto === Object.prototype || proto === null;
|
|
@@ -38251,7 +38224,7 @@ var FormSection = ({
|
|
|
38251
38224
|
columns = 1,
|
|
38252
38225
|
className
|
|
38253
38226
|
}) => {
|
|
38254
|
-
const [collapsed, setCollapsed] =
|
|
38227
|
+
const [collapsed, setCollapsed] = React109__default.useState(defaultCollapsed);
|
|
38255
38228
|
const { t } = useTranslate();
|
|
38256
38229
|
const eventBus = useEventBus();
|
|
38257
38230
|
const gridClass = {
|
|
@@ -38259,7 +38232,7 @@ var FormSection = ({
|
|
|
38259
38232
|
2: "grid-cols-1 md:grid-cols-2",
|
|
38260
38233
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
38261
38234
|
}[columns];
|
|
38262
|
-
|
|
38235
|
+
React109__default.useCallback(() => {
|
|
38263
38236
|
if (collapsible) {
|
|
38264
38237
|
setCollapsed((prev) => !prev);
|
|
38265
38238
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|