@almadar/ui 4.6.5 → 4.6.9
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 +1459 -1330
- package/dist/avl/index.js +383 -254
- package/dist/components/index.cjs +1129 -1060
- package/dist/components/index.js +230 -161
- package/dist/lib/index.cjs +19 -14
- package/dist/lib/index.js +19 -14
- package/dist/providers/EventBusProvider.d.ts +0 -21
- package/dist/providers/index.cjs +1028 -916
- package/dist/providers/index.js +277 -165
- package/dist/runtime/index.cjs +176 -87
- package/dist/runtime/index.js +177 -88
- package/dist/runtime/ui/SlotsContext.d.ts +3 -0
- package/package.json +1 -1
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 React111 from 'react';
|
|
4
|
+
import React111__default, { useContext, useRef, useEffect, useCallback, createContext, useState, Suspense, useMemo, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
|
|
5
5
|
import { EventBusContext, SelectionContext } 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, Zap, Sword, Move, Heart, Shield, Trash2, Settings, 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 } from 'lucide-react';
|
|
@@ -338,7 +338,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
338
338
|
const IconComp = value;
|
|
339
339
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
340
340
|
}
|
|
341
|
-
if (
|
|
341
|
+
if (React111__default.isValidElement(value)) {
|
|
342
342
|
return value;
|
|
343
343
|
}
|
|
344
344
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -414,7 +414,7 @@ var init_Button = __esm({
|
|
|
414
414
|
md: "h-4 w-4",
|
|
415
415
|
lg: "h-5 w-5"
|
|
416
416
|
};
|
|
417
|
-
Button =
|
|
417
|
+
Button = React111__default.forwardRef(
|
|
418
418
|
({
|
|
419
419
|
className,
|
|
420
420
|
variant = "primary",
|
|
@@ -479,7 +479,7 @@ var Input;
|
|
|
479
479
|
var init_Input = __esm({
|
|
480
480
|
"components/atoms/Input.tsx"() {
|
|
481
481
|
init_cn();
|
|
482
|
-
Input =
|
|
482
|
+
Input = React111__default.forwardRef(
|
|
483
483
|
({
|
|
484
484
|
className,
|
|
485
485
|
inputType,
|
|
@@ -597,7 +597,7 @@ var Label;
|
|
|
597
597
|
var init_Label = __esm({
|
|
598
598
|
"components/atoms/Label.tsx"() {
|
|
599
599
|
init_cn();
|
|
600
|
-
Label =
|
|
600
|
+
Label = React111__default.forwardRef(
|
|
601
601
|
({ className, required, children, ...props }, ref) => {
|
|
602
602
|
return /* @__PURE__ */ jsxs(
|
|
603
603
|
"label",
|
|
@@ -623,7 +623,7 @@ var Textarea;
|
|
|
623
623
|
var init_Textarea = __esm({
|
|
624
624
|
"components/atoms/Textarea.tsx"() {
|
|
625
625
|
init_cn();
|
|
626
|
-
Textarea =
|
|
626
|
+
Textarea = React111__default.forwardRef(
|
|
627
627
|
({ className, error, ...props }, ref) => {
|
|
628
628
|
return /* @__PURE__ */ jsx(
|
|
629
629
|
"textarea",
|
|
@@ -652,7 +652,7 @@ var Select;
|
|
|
652
652
|
var init_Select = __esm({
|
|
653
653
|
"components/atoms/Select.tsx"() {
|
|
654
654
|
init_cn();
|
|
655
|
-
Select =
|
|
655
|
+
Select = React111__default.forwardRef(
|
|
656
656
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
657
657
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
658
658
|
/* @__PURE__ */ jsxs(
|
|
@@ -694,7 +694,7 @@ var Checkbox;
|
|
|
694
694
|
var init_Checkbox = __esm({
|
|
695
695
|
"components/atoms/Checkbox.tsx"() {
|
|
696
696
|
init_cn();
|
|
697
|
-
Checkbox =
|
|
697
|
+
Checkbox = React111__default.forwardRef(
|
|
698
698
|
({ className, label, id, ...props }, ref) => {
|
|
699
699
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
700
700
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -776,7 +776,7 @@ var init_Card = __esm({
|
|
|
776
776
|
md: "shadow",
|
|
777
777
|
lg: "shadow-lg"
|
|
778
778
|
};
|
|
779
|
-
Card =
|
|
779
|
+
Card = React111__default.forwardRef(
|
|
780
780
|
({
|
|
781
781
|
className,
|
|
782
782
|
variant = "bordered",
|
|
@@ -812,9 +812,9 @@ var init_Card = __esm({
|
|
|
812
812
|
}
|
|
813
813
|
);
|
|
814
814
|
Card.displayName = "Card";
|
|
815
|
-
CardHeader =
|
|
815
|
+
CardHeader = React111__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
816
816
|
CardHeader.displayName = "CardHeader";
|
|
817
|
-
CardTitle =
|
|
817
|
+
CardTitle = React111__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
818
818
|
"h3",
|
|
819
819
|
{
|
|
820
820
|
ref,
|
|
@@ -827,11 +827,11 @@ var init_Card = __esm({
|
|
|
827
827
|
}
|
|
828
828
|
));
|
|
829
829
|
CardTitle.displayName = "CardTitle";
|
|
830
|
-
CardContent =
|
|
830
|
+
CardContent = React111__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
831
831
|
CardContent.displayName = "CardContent";
|
|
832
832
|
CardBody = CardContent;
|
|
833
833
|
CardBody.displayName = "CardBody";
|
|
834
|
-
CardFooter =
|
|
834
|
+
CardFooter = React111__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
835
835
|
"div",
|
|
836
836
|
{
|
|
837
837
|
ref,
|
|
@@ -884,7 +884,7 @@ var init_Badge = __esm({
|
|
|
884
884
|
md: "px-2.5 py-1 text-sm",
|
|
885
885
|
lg: "px-3 py-1.5 text-base"
|
|
886
886
|
};
|
|
887
|
-
Badge =
|
|
887
|
+
Badge = React111__default.forwardRef(
|
|
888
888
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
889
889
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
890
890
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -923,7 +923,7 @@ var init_Spinner = __esm({
|
|
|
923
923
|
md: "h-6 w-6",
|
|
924
924
|
lg: "h-8 w-8"
|
|
925
925
|
};
|
|
926
|
-
Spinner =
|
|
926
|
+
Spinner = React111__default.forwardRef(
|
|
927
927
|
({ className, size = "md", ...props }, ref) => {
|
|
928
928
|
return /* @__PURE__ */ jsx(
|
|
929
929
|
"div",
|
|
@@ -1204,7 +1204,7 @@ var init_Box = __esm({
|
|
|
1204
1204
|
fixed: "fixed",
|
|
1205
1205
|
sticky: "sticky"
|
|
1206
1206
|
};
|
|
1207
|
-
Box =
|
|
1207
|
+
Box = React111__default.forwardRef(
|
|
1208
1208
|
({
|
|
1209
1209
|
padding,
|
|
1210
1210
|
paddingX,
|
|
@@ -1577,7 +1577,7 @@ var Radio;
|
|
|
1577
1577
|
var init_Radio = __esm({
|
|
1578
1578
|
"components/atoms/Radio.tsx"() {
|
|
1579
1579
|
init_cn();
|
|
1580
|
-
Radio =
|
|
1580
|
+
Radio = React111__default.forwardRef(
|
|
1581
1581
|
({
|
|
1582
1582
|
label,
|
|
1583
1583
|
helperText,
|
|
@@ -1688,7 +1688,7 @@ var init_Switch = __esm({
|
|
|
1688
1688
|
"components/atoms/Switch.tsx"() {
|
|
1689
1689
|
"use client";
|
|
1690
1690
|
init_cn();
|
|
1691
|
-
Switch =
|
|
1691
|
+
Switch = React111.forwardRef(
|
|
1692
1692
|
({
|
|
1693
1693
|
checked,
|
|
1694
1694
|
defaultChecked = false,
|
|
@@ -1699,10 +1699,10 @@ var init_Switch = __esm({
|
|
|
1699
1699
|
name,
|
|
1700
1700
|
className
|
|
1701
1701
|
}, ref) => {
|
|
1702
|
-
const [isChecked, setIsChecked] =
|
|
1702
|
+
const [isChecked, setIsChecked] = React111.useState(
|
|
1703
1703
|
checked !== void 0 ? checked : defaultChecked
|
|
1704
1704
|
);
|
|
1705
|
-
|
|
1705
|
+
React111.useEffect(() => {
|
|
1706
1706
|
if (checked !== void 0) {
|
|
1707
1707
|
setIsChecked(checked);
|
|
1708
1708
|
}
|
|
@@ -2587,8 +2587,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
2587
2587
|
position = "top",
|
|
2588
2588
|
className
|
|
2589
2589
|
}) => {
|
|
2590
|
-
const [isVisible, setIsVisible] =
|
|
2591
|
-
const timeoutRef =
|
|
2590
|
+
const [isVisible, setIsVisible] = React111__default.useState(false);
|
|
2591
|
+
const timeoutRef = React111__default.useRef(null);
|
|
2592
2592
|
const handleMouseEnter = () => {
|
|
2593
2593
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2594
2594
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -2597,7 +2597,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
2597
2597
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2598
2598
|
setIsVisible(false);
|
|
2599
2599
|
};
|
|
2600
|
-
|
|
2600
|
+
React111__default.useEffect(() => {
|
|
2601
2601
|
return () => {
|
|
2602
2602
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2603
2603
|
};
|
|
@@ -2807,7 +2807,7 @@ var init_StatusDot = __esm({
|
|
|
2807
2807
|
md: "w-2.5 h-2.5",
|
|
2808
2808
|
lg: "w-3 h-3"
|
|
2809
2809
|
};
|
|
2810
|
-
StatusDot =
|
|
2810
|
+
StatusDot = React111__default.forwardRef(
|
|
2811
2811
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
2812
2812
|
return /* @__PURE__ */ jsx(
|
|
2813
2813
|
"span",
|
|
@@ -2860,7 +2860,7 @@ var init_TrendIndicator = __esm({
|
|
|
2860
2860
|
down: TrendingDown,
|
|
2861
2861
|
flat: ArrowRight
|
|
2862
2862
|
};
|
|
2863
|
-
TrendIndicator =
|
|
2863
|
+
TrendIndicator = React111__default.forwardRef(
|
|
2864
2864
|
({
|
|
2865
2865
|
className,
|
|
2866
2866
|
value,
|
|
@@ -2927,7 +2927,7 @@ var init_RangeSlider = __esm({
|
|
|
2927
2927
|
md: "w-4 h-4",
|
|
2928
2928
|
lg: "w-5 h-5"
|
|
2929
2929
|
};
|
|
2930
|
-
RangeSlider =
|
|
2930
|
+
RangeSlider = React111__default.forwardRef(
|
|
2931
2931
|
({
|
|
2932
2932
|
className,
|
|
2933
2933
|
min = 0,
|
|
@@ -3523,7 +3523,7 @@ var init_ContentSection = __esm({
|
|
|
3523
3523
|
md: "py-16",
|
|
3524
3524
|
lg: "py-24"
|
|
3525
3525
|
};
|
|
3526
|
-
ContentSection =
|
|
3526
|
+
ContentSection = React111__default.forwardRef(
|
|
3527
3527
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
3528
3528
|
return /* @__PURE__ */ jsx(
|
|
3529
3529
|
Box,
|
|
@@ -4057,7 +4057,7 @@ var init_AnimatedReveal = __esm({
|
|
|
4057
4057
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
4058
4058
|
"none": {}
|
|
4059
4059
|
};
|
|
4060
|
-
AnimatedReveal =
|
|
4060
|
+
AnimatedReveal = React111__default.forwardRef(
|
|
4061
4061
|
({
|
|
4062
4062
|
trigger = "scroll",
|
|
4063
4063
|
animation = "fade-up",
|
|
@@ -4217,7 +4217,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
4217
4217
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
4218
4218
|
"use client";
|
|
4219
4219
|
init_cn();
|
|
4220
|
-
AnimatedGraphic =
|
|
4220
|
+
AnimatedGraphic = React111__default.forwardRef(
|
|
4221
4221
|
({
|
|
4222
4222
|
src,
|
|
4223
4223
|
svgContent,
|
|
@@ -4240,7 +4240,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
4240
4240
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
4241
4241
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
4242
4242
|
const prevAnimateRef = useRef(animate);
|
|
4243
|
-
const setRef =
|
|
4243
|
+
const setRef = React111__default.useCallback(
|
|
4244
4244
|
(node) => {
|
|
4245
4245
|
containerRef.current = node;
|
|
4246
4246
|
if (typeof ref === "function") ref(node);
|
|
@@ -4839,6 +4839,25 @@ var init_Toast = __esm({
|
|
|
4839
4839
|
Toast.displayName = "Toast";
|
|
4840
4840
|
}
|
|
4841
4841
|
});
|
|
4842
|
+
function refId(obj) {
|
|
4843
|
+
if (obj === null || obj === void 0 || typeof obj !== "object") return null;
|
|
4844
|
+
const existing = refIds.get(obj);
|
|
4845
|
+
if (existing !== void 0) return existing;
|
|
4846
|
+
const id = nextRefId++;
|
|
4847
|
+
refIds.set(obj, id);
|
|
4848
|
+
return id;
|
|
4849
|
+
}
|
|
4850
|
+
var slotLog, refIds, nextRefId;
|
|
4851
|
+
var init_SlotsContext = __esm({
|
|
4852
|
+
"runtime/ui/SlotsContext.tsx"() {
|
|
4853
|
+
init_logger();
|
|
4854
|
+
slotLog = createLogger("almadar:ui:slot-render");
|
|
4855
|
+
refIds = /* @__PURE__ */ new WeakMap();
|
|
4856
|
+
nextRefId = 1;
|
|
4857
|
+
createContext({});
|
|
4858
|
+
createContext(null);
|
|
4859
|
+
}
|
|
4860
|
+
});
|
|
4842
4861
|
|
|
4843
4862
|
// locales/en.json
|
|
4844
4863
|
var en_default;
|
|
@@ -5034,7 +5053,7 @@ var init_ErrorBoundary = __esm({
|
|
|
5034
5053
|
"use client";
|
|
5035
5054
|
init_cn();
|
|
5036
5055
|
init_ErrorState();
|
|
5037
|
-
ErrorBoundary = class extends
|
|
5056
|
+
ErrorBoundary = class extends React111__default.Component {
|
|
5038
5057
|
constructor(props) {
|
|
5039
5058
|
super(props);
|
|
5040
5059
|
__publicField(this, "reset", () => {
|
|
@@ -5487,8 +5506,8 @@ var init_Tooltip = __esm({
|
|
|
5487
5506
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
5488
5507
|
};
|
|
5489
5508
|
}, []);
|
|
5490
|
-
const triggerElement =
|
|
5491
|
-
const trigger =
|
|
5509
|
+
const triggerElement = React111__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
5510
|
+
const trigger = React111__default.cloneElement(triggerElement, {
|
|
5492
5511
|
ref: triggerRef,
|
|
5493
5512
|
onMouseEnter: handleMouseEnter,
|
|
5494
5513
|
onMouseLeave: handleMouseLeave,
|
|
@@ -5609,8 +5628,8 @@ var init_Popover = __esm({
|
|
|
5609
5628
|
onMouseEnter: handleOpen,
|
|
5610
5629
|
onMouseLeave: handleClose
|
|
5611
5630
|
};
|
|
5612
|
-
const childElement =
|
|
5613
|
-
const triggerElement =
|
|
5631
|
+
const childElement = React111__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
5632
|
+
const triggerElement = React111__default.cloneElement(
|
|
5614
5633
|
childElement,
|
|
5615
5634
|
{
|
|
5616
5635
|
ref: triggerRef,
|
|
@@ -5727,8 +5746,8 @@ var init_Menu = __esm({
|
|
|
5727
5746
|
"bottom-start": "top-full left-0 mt-2",
|
|
5728
5747
|
"bottom-end": "top-full right-0 mt-2"
|
|
5729
5748
|
};
|
|
5730
|
-
const triggerChild =
|
|
5731
|
-
const triggerElement =
|
|
5749
|
+
const triggerChild = React111__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
5750
|
+
const triggerElement = React111__default.cloneElement(
|
|
5732
5751
|
triggerChild,
|
|
5733
5752
|
{
|
|
5734
5753
|
ref: triggerRef,
|
|
@@ -6247,12 +6266,12 @@ var init_MapView = __esm({
|
|
|
6247
6266
|
shadowSize: [41, 41]
|
|
6248
6267
|
});
|
|
6249
6268
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
6250
|
-
const { useEffect: useEffect66, useRef:
|
|
6269
|
+
const { useEffect: useEffect66, useRef: useRef65, useCallback: useCallback115, useState: useState100 } = React111__default;
|
|
6251
6270
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
6252
6271
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
6253
6272
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
6254
6273
|
const map = useMap();
|
|
6255
|
-
const prevRef =
|
|
6274
|
+
const prevRef = useRef65({ centerLat, centerLng, zoom });
|
|
6256
6275
|
useEffect66(() => {
|
|
6257
6276
|
const prev = prevRef.current;
|
|
6258
6277
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
@@ -6291,8 +6310,8 @@ var init_MapView = __esm({
|
|
|
6291
6310
|
showAttribution = true
|
|
6292
6311
|
}) {
|
|
6293
6312
|
const eventBus = useEventBus2();
|
|
6294
|
-
const [clickedPosition, setClickedPosition] =
|
|
6295
|
-
const handleMapClick =
|
|
6313
|
+
const [clickedPosition, setClickedPosition] = useState100(null);
|
|
6314
|
+
const handleMapClick = useCallback115((lat, lng) => {
|
|
6296
6315
|
if (showClickedPin) {
|
|
6297
6316
|
setClickedPosition({ lat, lng });
|
|
6298
6317
|
}
|
|
@@ -6301,7 +6320,7 @@ var init_MapView = __esm({
|
|
|
6301
6320
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
6302
6321
|
}
|
|
6303
6322
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
6304
|
-
const handleMarkerClick =
|
|
6323
|
+
const handleMarkerClick = useCallback115((marker) => {
|
|
6305
6324
|
onMarkerClick?.(marker);
|
|
6306
6325
|
if (markerClickEvent) {
|
|
6307
6326
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -6478,7 +6497,7 @@ function InputPattern({
|
|
|
6478
6497
|
fieldName
|
|
6479
6498
|
}) {
|
|
6480
6499
|
const { emit } = useEventBus();
|
|
6481
|
-
const [localValue, setLocalValue] =
|
|
6500
|
+
const [localValue, setLocalValue] = React111__default.useState(value);
|
|
6482
6501
|
const handleChange = (e) => {
|
|
6483
6502
|
setLocalValue(e.target.value);
|
|
6484
6503
|
if (onChange) {
|
|
@@ -6516,7 +6535,7 @@ function TextareaPattern({
|
|
|
6516
6535
|
fieldName
|
|
6517
6536
|
}) {
|
|
6518
6537
|
const { emit } = useEventBus();
|
|
6519
|
-
const [localValue, setLocalValue] =
|
|
6538
|
+
const [localValue, setLocalValue] = React111__default.useState(value);
|
|
6520
6539
|
const handleChange = (e) => {
|
|
6521
6540
|
setLocalValue(e.target.value);
|
|
6522
6541
|
if (onChange) {
|
|
@@ -6548,7 +6567,7 @@ function SelectPattern({
|
|
|
6548
6567
|
fieldName
|
|
6549
6568
|
}) {
|
|
6550
6569
|
const { emit } = useEventBus();
|
|
6551
|
-
const [localValue, setLocalValue] =
|
|
6570
|
+
const [localValue, setLocalValue] = React111__default.useState(value);
|
|
6552
6571
|
const handleChange = (e) => {
|
|
6553
6572
|
setLocalValue(e.target.value);
|
|
6554
6573
|
if (onChange) {
|
|
@@ -6577,7 +6596,7 @@ function CheckboxPattern({
|
|
|
6577
6596
|
className
|
|
6578
6597
|
}) {
|
|
6579
6598
|
const { emit } = useEventBus();
|
|
6580
|
-
const [localChecked, setLocalChecked] =
|
|
6599
|
+
const [localChecked, setLocalChecked] = React111__default.useState(checked);
|
|
6581
6600
|
const handleChange = (e) => {
|
|
6582
6601
|
setLocalChecked(e.target.checked);
|
|
6583
6602
|
if (onChange) {
|
|
@@ -6886,9 +6905,9 @@ function ControlButton({
|
|
|
6886
6905
|
className
|
|
6887
6906
|
}) {
|
|
6888
6907
|
const eventBus = useEventBus();
|
|
6889
|
-
const [isPressed, setIsPressed] =
|
|
6908
|
+
const [isPressed, setIsPressed] = React111.useState(false);
|
|
6890
6909
|
const actualPressed = pressed ?? isPressed;
|
|
6891
|
-
const handlePointerDown =
|
|
6910
|
+
const handlePointerDown = React111.useCallback(
|
|
6892
6911
|
(e) => {
|
|
6893
6912
|
e.preventDefault();
|
|
6894
6913
|
if (disabled) return;
|
|
@@ -6898,7 +6917,7 @@ function ControlButton({
|
|
|
6898
6917
|
},
|
|
6899
6918
|
[disabled, pressEvent, eventBus, onPress]
|
|
6900
6919
|
);
|
|
6901
|
-
const handlePointerUp =
|
|
6920
|
+
const handlePointerUp = React111.useCallback(
|
|
6902
6921
|
(e) => {
|
|
6903
6922
|
e.preventDefault();
|
|
6904
6923
|
if (disabled) return;
|
|
@@ -6908,7 +6927,7 @@ function ControlButton({
|
|
|
6908
6927
|
},
|
|
6909
6928
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6910
6929
|
);
|
|
6911
|
-
const handlePointerLeave =
|
|
6930
|
+
const handlePointerLeave = React111.useCallback(
|
|
6912
6931
|
(e) => {
|
|
6913
6932
|
if (isPressed) {
|
|
6914
6933
|
setIsPressed(false);
|
|
@@ -6981,8 +7000,8 @@ function ActionButtons({
|
|
|
6981
7000
|
disabled
|
|
6982
7001
|
}) {
|
|
6983
7002
|
const eventBus = useEventBus();
|
|
6984
|
-
const [activeButtons, setActiveButtons] =
|
|
6985
|
-
const handlePress =
|
|
7003
|
+
const [activeButtons, setActiveButtons] = React111.useState(/* @__PURE__ */ new Set());
|
|
7004
|
+
const handlePress = React111.useCallback(
|
|
6986
7005
|
(id) => {
|
|
6987
7006
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
6988
7007
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -6990,7 +7009,7 @@ function ActionButtons({
|
|
|
6990
7009
|
},
|
|
6991
7010
|
[actionEvent, eventBus, onAction]
|
|
6992
7011
|
);
|
|
6993
|
-
const handleRelease =
|
|
7012
|
+
const handleRelease = React111.useCallback(
|
|
6994
7013
|
(id) => {
|
|
6995
7014
|
setActiveButtons((prev) => {
|
|
6996
7015
|
const next = new Set(prev);
|
|
@@ -8925,7 +8944,7 @@ var init_MarkdownContent = __esm({
|
|
|
8925
8944
|
init_Box();
|
|
8926
8945
|
init_useTranslate();
|
|
8927
8946
|
init_cn();
|
|
8928
|
-
MarkdownContent =
|
|
8947
|
+
MarkdownContent = React111__default.memo(
|
|
8929
8948
|
({ content, direction, className }) => {
|
|
8930
8949
|
const { t: _t } = useTranslate();
|
|
8931
8950
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9142,7 +9161,7 @@ var init_CodeBlock = __esm({
|
|
|
9142
9161
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
9143
9162
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
9144
9163
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
9145
|
-
CodeBlock =
|
|
9164
|
+
CodeBlock = React111__default.memo(
|
|
9146
9165
|
({
|
|
9147
9166
|
code: rawCode,
|
|
9148
9167
|
language = "text",
|
|
@@ -10451,7 +10470,7 @@ var init_StateMachineView = __esm({
|
|
|
10451
10470
|
style: { top: title ? 30 : 0 },
|
|
10452
10471
|
children: [
|
|
10453
10472
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
10454
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
10473
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React111__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
10455
10474
|
StateNode,
|
|
10456
10475
|
{
|
|
10457
10476
|
state,
|
|
@@ -16412,7 +16431,7 @@ function CraftingRecipe({
|
|
|
16412
16431
|
className
|
|
16413
16432
|
}) {
|
|
16414
16433
|
const eventBus = useEventBus();
|
|
16415
|
-
const handleCraft =
|
|
16434
|
+
const handleCraft = React111.useCallback(() => {
|
|
16416
16435
|
onCraft?.();
|
|
16417
16436
|
if (craftEvent) {
|
|
16418
16437
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16429,7 +16448,7 @@ function CraftingRecipe({
|
|
|
16429
16448
|
children: [
|
|
16430
16449
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16431
16450
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16432
|
-
return /* @__PURE__ */ jsxs(
|
|
16451
|
+
return /* @__PURE__ */ jsxs(React111.Fragment, { children: [
|
|
16433
16452
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16434
16453
|
ItemSlot,
|
|
16435
16454
|
{
|
|
@@ -16723,8 +16742,8 @@ function DPad({
|
|
|
16723
16742
|
}) {
|
|
16724
16743
|
const eventBus = useEventBus();
|
|
16725
16744
|
const sizes = sizeMap6[size];
|
|
16726
|
-
const [activeDirections, setActiveDirections] =
|
|
16727
|
-
const handlePress =
|
|
16745
|
+
const [activeDirections, setActiveDirections] = React111.useState(/* @__PURE__ */ new Set());
|
|
16746
|
+
const handlePress = React111.useCallback(
|
|
16728
16747
|
(direction) => {
|
|
16729
16748
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
16730
16749
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -16732,7 +16751,7 @@ function DPad({
|
|
|
16732
16751
|
},
|
|
16733
16752
|
[directionEvent, eventBus, onDirection]
|
|
16734
16753
|
);
|
|
16735
|
-
const handleRelease =
|
|
16754
|
+
const handleRelease = React111.useCallback(
|
|
16736
16755
|
(direction) => {
|
|
16737
16756
|
setActiveDirections((prev) => {
|
|
16738
16757
|
const next = new Set(prev);
|
|
@@ -17664,7 +17683,7 @@ function DataList({
|
|
|
17664
17683
|
}) {
|
|
17665
17684
|
const eventBus = useEventBus();
|
|
17666
17685
|
const { t } = useTranslate();
|
|
17667
|
-
const [visibleCount, setVisibleCount] =
|
|
17686
|
+
const [visibleCount, setVisibleCount] = React111__default.useState(pageSize || Infinity);
|
|
17668
17687
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
17669
17688
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17670
17689
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -17705,7 +17724,7 @@ function DataList({
|
|
|
17705
17724
|
const items2 = data.map((item) => item);
|
|
17706
17725
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17707
17726
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
17708
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17727
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React111__default.Fragment, { children: [
|
|
17709
17728
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17710
17729
|
group.items.map((itemData, index) => {
|
|
17711
17730
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -17897,7 +17916,7 @@ function DataList({
|
|
|
17897
17916
|
className
|
|
17898
17917
|
),
|
|
17899
17918
|
children: [
|
|
17900
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17919
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React111__default.Fragment, { children: [
|
|
17901
17920
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
17902
17921
|
group.items.map(
|
|
17903
17922
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -18713,20 +18732,21 @@ var init_InputGroup = __esm({
|
|
|
18713
18732
|
|
|
18714
18733
|
// lib/debug.ts
|
|
18715
18734
|
function isDebugEnabled() {
|
|
18716
|
-
return
|
|
18735
|
+
if (DEBUG_ENABLED) return true;
|
|
18736
|
+
return typeof window !== "undefined" && window.__ALMADAR_DEBUG_VERIFY__ === true;
|
|
18717
18737
|
}
|
|
18718
18738
|
function debug(...args) {
|
|
18719
|
-
if (
|
|
18739
|
+
if (isDebugEnabled()) {
|
|
18720
18740
|
console.log("[DEBUG]", ...args);
|
|
18721
18741
|
}
|
|
18722
18742
|
}
|
|
18723
18743
|
function debugGroup(label) {
|
|
18724
|
-
if (
|
|
18744
|
+
if (isDebugEnabled()) {
|
|
18725
18745
|
console.group(`[DEBUG] ${label}`);
|
|
18726
18746
|
}
|
|
18727
18747
|
}
|
|
18728
18748
|
function debugGroupEnd() {
|
|
18729
|
-
if (
|
|
18749
|
+
if (isDebugEnabled()) {
|
|
18730
18750
|
console.groupEnd();
|
|
18731
18751
|
}
|
|
18732
18752
|
}
|
|
@@ -19177,7 +19197,7 @@ var init_WizardProgress = __esm({
|
|
|
19177
19197
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
19178
19198
|
const isActive = index === currentStep;
|
|
19179
19199
|
const isCompleted = index < currentStep;
|
|
19180
|
-
return /* @__PURE__ */ jsxs(
|
|
19200
|
+
return /* @__PURE__ */ jsxs(React111__default.Fragment, { children: [
|
|
19181
19201
|
/* @__PURE__ */ jsx(
|
|
19182
19202
|
"button",
|
|
19183
19203
|
{
|
|
@@ -20077,9 +20097,9 @@ function ScoreDisplay({
|
|
|
20077
20097
|
...rest
|
|
20078
20098
|
}) {
|
|
20079
20099
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
20080
|
-
const [displayValue, setDisplayValue] =
|
|
20081
|
-
const [isAnimating, setIsAnimating] =
|
|
20082
|
-
|
|
20100
|
+
const [displayValue, setDisplayValue] = React111.useState(resolvedValue);
|
|
20101
|
+
const [isAnimating, setIsAnimating] = React111.useState(false);
|
|
20102
|
+
React111.useEffect(() => {
|
|
20083
20103
|
if (!animated || displayValue === resolvedValue) {
|
|
20084
20104
|
setDisplayValue(resolvedValue);
|
|
20085
20105
|
return;
|
|
@@ -20229,7 +20249,7 @@ function InventoryGrid({
|
|
|
20229
20249
|
const eventBus = useEventBus();
|
|
20230
20250
|
const slotCount = totalSlots ?? items.length;
|
|
20231
20251
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
20232
|
-
const handleSelect =
|
|
20252
|
+
const handleSelect = React111.useCallback(
|
|
20233
20253
|
(id) => {
|
|
20234
20254
|
onSelect?.(id);
|
|
20235
20255
|
if (selectEvent) {
|
|
@@ -20511,15 +20531,15 @@ function GameCanvas2D({
|
|
|
20511
20531
|
fps = 60,
|
|
20512
20532
|
className
|
|
20513
20533
|
}) {
|
|
20514
|
-
const canvasRef =
|
|
20515
|
-
const rafRef =
|
|
20516
|
-
const frameRef =
|
|
20517
|
-
const lastTimeRef =
|
|
20518
|
-
const onDrawRef =
|
|
20534
|
+
const canvasRef = React111.useRef(null);
|
|
20535
|
+
const rafRef = React111.useRef(0);
|
|
20536
|
+
const frameRef = React111.useRef(0);
|
|
20537
|
+
const lastTimeRef = React111.useRef(0);
|
|
20538
|
+
const onDrawRef = React111.useRef(onDraw);
|
|
20519
20539
|
onDrawRef.current = onDraw;
|
|
20520
|
-
const onTickRef =
|
|
20540
|
+
const onTickRef = React111.useRef(onTick);
|
|
20521
20541
|
onTickRef.current = onTick;
|
|
20522
|
-
|
|
20542
|
+
React111.useEffect(() => {
|
|
20523
20543
|
const canvas = canvasRef.current;
|
|
20524
20544
|
if (!canvas) return;
|
|
20525
20545
|
const ctx = canvas.getContext("2d");
|
|
@@ -20860,7 +20880,7 @@ function TurnPanel({
|
|
|
20860
20880
|
className
|
|
20861
20881
|
}) {
|
|
20862
20882
|
const eventBus = useEventBus();
|
|
20863
|
-
const handleAction =
|
|
20883
|
+
const handleAction = React111.useCallback(
|
|
20864
20884
|
(event) => {
|
|
20865
20885
|
if (event) {
|
|
20866
20886
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -21006,7 +21026,7 @@ function UnitCommandBar({
|
|
|
21006
21026
|
className
|
|
21007
21027
|
}) {
|
|
21008
21028
|
const eventBus = useEventBus();
|
|
21009
|
-
const handleCommand =
|
|
21029
|
+
const handleCommand = React111.useCallback(
|
|
21010
21030
|
(event) => {
|
|
21011
21031
|
if (event) {
|
|
21012
21032
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -21491,7 +21511,7 @@ function GameMenu({
|
|
|
21491
21511
|
} catch {
|
|
21492
21512
|
}
|
|
21493
21513
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21494
|
-
const handleOptionClick =
|
|
21514
|
+
const handleOptionClick = React111.useCallback(
|
|
21495
21515
|
(option) => {
|
|
21496
21516
|
if (option.event && eventBus) {
|
|
21497
21517
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21605,7 +21625,7 @@ function GameOverScreen({
|
|
|
21605
21625
|
} catch {
|
|
21606
21626
|
}
|
|
21607
21627
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21608
|
-
const handleActionClick =
|
|
21628
|
+
const handleActionClick = React111.useCallback(
|
|
21609
21629
|
(action) => {
|
|
21610
21630
|
if (action.event && eventBus) {
|
|
21611
21631
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -24709,7 +24729,7 @@ var init_StepFlow = __esm({
|
|
|
24709
24729
|
className
|
|
24710
24730
|
}) => {
|
|
24711
24731
|
if (orientation === "vertical") {
|
|
24712
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
24732
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React111__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
24713
24733
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
24714
24734
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
24715
24735
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -24720,7 +24740,7 @@ var init_StepFlow = __esm({
|
|
|
24720
24740
|
] })
|
|
24721
24741
|
] }) }, index)) });
|
|
24722
24742
|
}
|
|
24723
|
-
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(
|
|
24743
|
+
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(React111__default.Fragment, { children: [
|
|
24724
24744
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
24725
24745
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
24726
24746
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -26872,7 +26892,7 @@ var init_DocumentViewer = __esm({
|
|
|
26872
26892
|
}
|
|
26873
26893
|
});
|
|
26874
26894
|
function extractTitle(children) {
|
|
26875
|
-
if (!
|
|
26895
|
+
if (!React111__default.isValidElement(children)) return void 0;
|
|
26876
26896
|
const props = children.props;
|
|
26877
26897
|
if (typeof props.title === "string") {
|
|
26878
26898
|
return props.title;
|
|
@@ -26984,7 +27004,7 @@ function LinearView({
|
|
|
26984
27004
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
26985
27005
|
const isDone = i < currentIdx;
|
|
26986
27006
|
const isCurrent = i === currentIdx;
|
|
26987
|
-
return /* @__PURE__ */ jsxs(
|
|
27007
|
+
return /* @__PURE__ */ jsxs(React111__default.Fragment, { children: [
|
|
26988
27008
|
i > 0 && /* @__PURE__ */ jsx(
|
|
26989
27009
|
Typography,
|
|
26990
27010
|
{
|
|
@@ -27734,7 +27754,14 @@ var init_Form = __esm({
|
|
|
27734
27754
|
// Schema-based props
|
|
27735
27755
|
entity,
|
|
27736
27756
|
fields,
|
|
27737
|
-
|
|
27757
|
+
// No `= {}` default: a fresh `{}` evaluated inline on every render
|
|
27758
|
+
// would change the prop reference every tick and bust the useMemo
|
|
27759
|
+
// cache below (`[entity, initialData]` deps), reigniting the
|
|
27760
|
+
// setFormData useEffect on every keystroke and producing an
|
|
27761
|
+
// infinite re-render loop with stuck form inputs. The memo and
|
|
27762
|
+
// submit handler both handle `undefined` already via the
|
|
27763
|
+
// `typeof initialData === 'object'` guard.
|
|
27764
|
+
initialData,
|
|
27738
27765
|
isLoading = false,
|
|
27739
27766
|
error,
|
|
27740
27767
|
submitLabel,
|
|
@@ -27761,10 +27788,12 @@ var init_Form = __esm({
|
|
|
27761
27788
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
27762
27789
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
27763
27790
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
27764
|
-
const
|
|
27765
|
-
|
|
27766
|
-
|
|
27767
|
-
|
|
27791
|
+
const normalizedInitialData = React111__default.useMemo(() => {
|
|
27792
|
+
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
27793
|
+
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
27794
|
+
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
27795
|
+
}, [entity, initialData]);
|
|
27796
|
+
const entityDerivedFields = React111__default.useMemo(() => {
|
|
27768
27797
|
if (fields && fields.length > 0) return void 0;
|
|
27769
27798
|
if (!resolvedEntity) return void 0;
|
|
27770
27799
|
return resolvedEntity.fields.map(
|
|
@@ -27783,14 +27812,27 @@ var init_Form = __esm({
|
|
|
27783
27812
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
27784
27813
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
27785
27814
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
27786
|
-
const [formData, setFormData] =
|
|
27815
|
+
const [formData, setFormData] = React111__default.useState(
|
|
27787
27816
|
normalizedInitialData
|
|
27788
27817
|
);
|
|
27789
|
-
const [collapsedSections, setCollapsedSections] =
|
|
27818
|
+
const [collapsedSections, setCollapsedSections] = React111__default.useState(
|
|
27790
27819
|
/* @__PURE__ */ new Set()
|
|
27791
27820
|
);
|
|
27821
|
+
const formMode = props.mode;
|
|
27822
|
+
const mountedRef = React111__default.useRef(false);
|
|
27823
|
+
if (!mountedRef.current) {
|
|
27824
|
+
mountedRef.current = true;
|
|
27825
|
+
debug("forms", "mount", {
|
|
27826
|
+
mode: formMode,
|
|
27827
|
+
submitEvent,
|
|
27828
|
+
cancelEvent,
|
|
27829
|
+
fieldNames: (fields ?? []).map((f3) => f3.name ?? f3.field).filter(Boolean),
|
|
27830
|
+
initialDataKeys: Object.keys(normalizedInitialData),
|
|
27831
|
+
initialData: normalizedInitialData
|
|
27832
|
+
});
|
|
27833
|
+
}
|
|
27792
27834
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
27793
|
-
const evalContext =
|
|
27835
|
+
const evalContext = React111__default.useMemo(
|
|
27794
27836
|
() => ({
|
|
27795
27837
|
formValues: formData,
|
|
27796
27838
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -27799,12 +27841,18 @@ var init_Form = __esm({
|
|
|
27799
27841
|
}),
|
|
27800
27842
|
[formData, externalContext]
|
|
27801
27843
|
);
|
|
27802
|
-
|
|
27844
|
+
React111__default.useEffect(() => {
|
|
27845
|
+
debug("forms", "initialData-sync", {
|
|
27846
|
+
mode: formMode,
|
|
27847
|
+
normalizedInitialData,
|
|
27848
|
+
prevFormData: formData,
|
|
27849
|
+
willSet: Object.keys(normalizedInitialData).length > 0
|
|
27850
|
+
});
|
|
27803
27851
|
if (Object.keys(normalizedInitialData).length > 0) {
|
|
27804
27852
|
setFormData(normalizedInitialData);
|
|
27805
27853
|
}
|
|
27806
27854
|
}, [normalizedInitialData]);
|
|
27807
|
-
const processCalculations =
|
|
27855
|
+
const processCalculations = React111__default.useCallback(
|
|
27808
27856
|
(changedFieldId, newFormData) => {
|
|
27809
27857
|
if (!hiddenCalculations.length) return;
|
|
27810
27858
|
const context = {
|
|
@@ -27829,7 +27877,7 @@ var init_Form = __esm({
|
|
|
27829
27877
|
},
|
|
27830
27878
|
[hiddenCalculations, externalContext, eventBus]
|
|
27831
27879
|
);
|
|
27832
|
-
const checkViolations =
|
|
27880
|
+
const checkViolations = React111__default.useCallback(
|
|
27833
27881
|
(changedFieldId, newFormData) => {
|
|
27834
27882
|
if (!violationTriggers.length) return;
|
|
27835
27883
|
const context = {
|
|
@@ -27856,6 +27904,7 @@ var init_Form = __esm({
|
|
|
27856
27904
|
);
|
|
27857
27905
|
const handleChange = (name, value) => {
|
|
27858
27906
|
const newFormData = { ...formData, [name]: value };
|
|
27907
|
+
debug("forms", "field-change", { mode: formMode, name, value, prevFormData: formData, newFormData });
|
|
27859
27908
|
setFormData(newFormData);
|
|
27860
27909
|
eventBus.emit("UI:FIELD_CHANGED", {
|
|
27861
27910
|
fieldId: name,
|
|
@@ -27866,7 +27915,7 @@ var init_Form = __esm({
|
|
|
27866
27915
|
processCalculations(name, newFormData);
|
|
27867
27916
|
checkViolations(name, newFormData);
|
|
27868
27917
|
};
|
|
27869
|
-
const isFieldVisible =
|
|
27918
|
+
const isFieldVisible = React111__default.useCallback(
|
|
27870
27919
|
(fieldName) => {
|
|
27871
27920
|
const condition = conditionalFields[fieldName];
|
|
27872
27921
|
if (!condition) return true;
|
|
@@ -27874,7 +27923,7 @@ var init_Form = __esm({
|
|
|
27874
27923
|
},
|
|
27875
27924
|
[conditionalFields, evalContext]
|
|
27876
27925
|
);
|
|
27877
|
-
const isSectionVisible =
|
|
27926
|
+
const isSectionVisible = React111__default.useCallback(
|
|
27878
27927
|
(section) => {
|
|
27879
27928
|
if (!section.condition) return true;
|
|
27880
27929
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -27894,7 +27943,18 @@ var init_Form = __esm({
|
|
|
27894
27943
|
};
|
|
27895
27944
|
const handleSubmit = (e) => {
|
|
27896
27945
|
e.preventDefault();
|
|
27897
|
-
|
|
27946
|
+
debug("forms", "submit-enter", {
|
|
27947
|
+
mode: formMode,
|
|
27948
|
+
submitEvent,
|
|
27949
|
+
formData,
|
|
27950
|
+
normalizedInitialData
|
|
27951
|
+
});
|
|
27952
|
+
const mergedData = {
|
|
27953
|
+
...normalizedInitialData,
|
|
27954
|
+
...formData
|
|
27955
|
+
};
|
|
27956
|
+
const payload = { data: mergedData };
|
|
27957
|
+
debug("forms", "submit-emit", { mode: formMode, submitEvent: `UI:${submitEvent}`, payloadData: payload.data });
|
|
27898
27958
|
eventBus.emit(`UI:${submitEvent}`, payload);
|
|
27899
27959
|
if (onSubmit) {
|
|
27900
27960
|
eventBus.emit(`UI:${onSubmit}`, payload);
|
|
@@ -27907,7 +27967,7 @@ var init_Form = __esm({
|
|
|
27907
27967
|
eventBus.emit(`UI:${onCancel}`);
|
|
27908
27968
|
}
|
|
27909
27969
|
};
|
|
27910
|
-
const renderField =
|
|
27970
|
+
const renderField = React111__default.useCallback(
|
|
27911
27971
|
(field) => {
|
|
27912
27972
|
const fieldName = field.name || field.field;
|
|
27913
27973
|
if (!fieldName) return null;
|
|
@@ -27928,7 +27988,7 @@ var init_Form = __esm({
|
|
|
27928
27988
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
27929
27989
|
);
|
|
27930
27990
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
27931
|
-
const normalizedFields =
|
|
27991
|
+
const normalizedFields = React111__default.useMemo(() => {
|
|
27932
27992
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
27933
27993
|
return effectiveFields.map((field) => {
|
|
27934
27994
|
if (typeof field === "string") {
|
|
@@ -27950,7 +28010,7 @@ var init_Form = __esm({
|
|
|
27950
28010
|
return field;
|
|
27951
28011
|
});
|
|
27952
28012
|
}, [effectiveFields, resolvedEntity]);
|
|
27953
|
-
const schemaFields =
|
|
28013
|
+
const schemaFields = React111__default.useMemo(() => {
|
|
27954
28014
|
if (normalizedFields.length === 0) return null;
|
|
27955
28015
|
if (isDebugEnabled()) {
|
|
27956
28016
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -27960,7 +28020,7 @@ var init_Form = __esm({
|
|
|
27960
28020
|
}
|
|
27961
28021
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
27962
28022
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
27963
|
-
const sectionElements =
|
|
28023
|
+
const sectionElements = React111__default.useMemo(() => {
|
|
27964
28024
|
if (!sections || sections.length === 0) return null;
|
|
27965
28025
|
return sections.map((section) => {
|
|
27966
28026
|
if (!isSectionVisible(section)) {
|
|
@@ -29484,7 +29544,7 @@ var init_List = __esm({
|
|
|
29484
29544
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
29485
29545
|
return [];
|
|
29486
29546
|
}, [entity]);
|
|
29487
|
-
const getItemActions =
|
|
29547
|
+
const getItemActions = React111__default.useCallback(
|
|
29488
29548
|
(item) => {
|
|
29489
29549
|
if (!itemActions) return [];
|
|
29490
29550
|
if (typeof itemActions === "function") {
|
|
@@ -29921,7 +29981,7 @@ var init_MediaGallery = __esm({
|
|
|
29921
29981
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
29922
29982
|
);
|
|
29923
29983
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
29924
|
-
const items =
|
|
29984
|
+
const items = React111__default.useMemo(() => {
|
|
29925
29985
|
if (propItems) return propItems;
|
|
29926
29986
|
if (entityData.length === 0) return [];
|
|
29927
29987
|
return entityData.map((record, idx) => ({
|
|
@@ -30094,9 +30154,9 @@ function MiniMap({
|
|
|
30094
30154
|
viewportRect,
|
|
30095
30155
|
className
|
|
30096
30156
|
}) {
|
|
30097
|
-
const canvasRef =
|
|
30098
|
-
const frameRef =
|
|
30099
|
-
|
|
30157
|
+
const canvasRef = React111.useRef(null);
|
|
30158
|
+
const frameRef = React111.useRef(0);
|
|
30159
|
+
React111.useEffect(() => {
|
|
30100
30160
|
const canvas = canvasRef.current;
|
|
30101
30161
|
if (!canvas) return;
|
|
30102
30162
|
const ctx = canvas.getContext("2d");
|
|
@@ -30178,7 +30238,7 @@ var init_MiniMap = __esm({
|
|
|
30178
30238
|
}
|
|
30179
30239
|
});
|
|
30180
30240
|
function extractTitle2(children) {
|
|
30181
|
-
if (!
|
|
30241
|
+
if (!React111__default.isValidElement(children)) return void 0;
|
|
30182
30242
|
const props = children.props;
|
|
30183
30243
|
if (typeof props.title === "string") {
|
|
30184
30244
|
return props.title;
|
|
@@ -30891,7 +30951,7 @@ var init_PageHeader = __esm({
|
|
|
30891
30951
|
info: "bg-info/10 text-info"
|
|
30892
30952
|
};
|
|
30893
30953
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
30894
|
-
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(
|
|
30954
|
+
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(React111__default.Fragment, { children: [
|
|
30895
30955
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
30896
30956
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
30897
30957
|
"a",
|
|
@@ -31110,7 +31170,7 @@ var init_debugRegistry = __esm({
|
|
|
31110
31170
|
}
|
|
31111
31171
|
});
|
|
31112
31172
|
function useDebugData() {
|
|
31113
|
-
const [data, setData] =
|
|
31173
|
+
const [data, setData] = React111.useState(() => ({
|
|
31114
31174
|
traits: [],
|
|
31115
31175
|
ticks: [],
|
|
31116
31176
|
guards: [],
|
|
@@ -31124,7 +31184,7 @@ function useDebugData() {
|
|
|
31124
31184
|
},
|
|
31125
31185
|
lastUpdate: Date.now()
|
|
31126
31186
|
}));
|
|
31127
|
-
|
|
31187
|
+
React111.useEffect(() => {
|
|
31128
31188
|
const updateData = () => {
|
|
31129
31189
|
setData({
|
|
31130
31190
|
traits: getAllTraits(),
|
|
@@ -31233,12 +31293,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
31233
31293
|
return positions;
|
|
31234
31294
|
}
|
|
31235
31295
|
function WalkMinimap() {
|
|
31236
|
-
const [walkStep, setWalkStep] =
|
|
31237
|
-
const [traits2, setTraits] =
|
|
31238
|
-
const [coveredEdges, setCoveredEdges] =
|
|
31239
|
-
const [completedTraits, setCompletedTraits] =
|
|
31240
|
-
const prevTraitRef =
|
|
31241
|
-
|
|
31296
|
+
const [walkStep, setWalkStep] = React111.useState(null);
|
|
31297
|
+
const [traits2, setTraits] = React111.useState([]);
|
|
31298
|
+
const [coveredEdges, setCoveredEdges] = React111.useState([]);
|
|
31299
|
+
const [completedTraits, setCompletedTraits] = React111.useState(/* @__PURE__ */ new Set());
|
|
31300
|
+
const prevTraitRef = React111.useRef(null);
|
|
31301
|
+
React111.useEffect(() => {
|
|
31242
31302
|
const interval = setInterval(() => {
|
|
31243
31303
|
const w = window;
|
|
31244
31304
|
const step = w.__orbitalWalkStep;
|
|
@@ -31685,15 +31745,15 @@ var init_EntitiesTab = __esm({
|
|
|
31685
31745
|
}
|
|
31686
31746
|
});
|
|
31687
31747
|
function EventFlowTab({ events: events2 }) {
|
|
31688
|
-
const [filter, setFilter] =
|
|
31689
|
-
const containerRef =
|
|
31690
|
-
const [autoScroll, setAutoScroll] =
|
|
31691
|
-
|
|
31748
|
+
const [filter, setFilter] = React111.useState("all");
|
|
31749
|
+
const containerRef = React111.useRef(null);
|
|
31750
|
+
const [autoScroll, setAutoScroll] = React111.useState(true);
|
|
31751
|
+
React111.useEffect(() => {
|
|
31692
31752
|
if (autoScroll && containerRef.current) {
|
|
31693
31753
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
31694
31754
|
}
|
|
31695
31755
|
}, [events2.length, autoScroll]);
|
|
31696
|
-
const filteredEvents =
|
|
31756
|
+
const filteredEvents = React111.useMemo(() => {
|
|
31697
31757
|
if (filter === "all") return events2;
|
|
31698
31758
|
return events2.filter((e) => e.type === filter);
|
|
31699
31759
|
}, [events2, filter]);
|
|
@@ -31812,7 +31872,7 @@ var init_EventFlowTab = __esm({
|
|
|
31812
31872
|
}
|
|
31813
31873
|
});
|
|
31814
31874
|
function GuardsPanel({ guards }) {
|
|
31815
|
-
const [filter, setFilter] =
|
|
31875
|
+
const [filter, setFilter] = React111.useState("all");
|
|
31816
31876
|
if (guards.length === 0) {
|
|
31817
31877
|
return /* @__PURE__ */ jsx(
|
|
31818
31878
|
EmptyState,
|
|
@@ -31825,7 +31885,7 @@ function GuardsPanel({ guards }) {
|
|
|
31825
31885
|
}
|
|
31826
31886
|
const passedCount = guards.filter((g) => g.result).length;
|
|
31827
31887
|
const failedCount = guards.length - passedCount;
|
|
31828
|
-
const filteredGuards =
|
|
31888
|
+
const filteredGuards = React111.useMemo(() => {
|
|
31829
31889
|
if (filter === "all") return guards;
|
|
31830
31890
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
31831
31891
|
return guards.filter((g) => !g.result);
|
|
@@ -31986,10 +32046,10 @@ function EffectBadge({ effect }) {
|
|
|
31986
32046
|
] });
|
|
31987
32047
|
}
|
|
31988
32048
|
function TransitionTimeline({ transitions }) {
|
|
31989
|
-
const containerRef =
|
|
31990
|
-
const [autoScroll, setAutoScroll] =
|
|
31991
|
-
const [expandedId, setExpandedId] =
|
|
31992
|
-
|
|
32049
|
+
const containerRef = React111.useRef(null);
|
|
32050
|
+
const [autoScroll, setAutoScroll] = React111.useState(true);
|
|
32051
|
+
const [expandedId, setExpandedId] = React111.useState(null);
|
|
32052
|
+
React111.useEffect(() => {
|
|
31993
32053
|
if (autoScroll && containerRef.current) {
|
|
31994
32054
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
31995
32055
|
}
|
|
@@ -32275,9 +32335,9 @@ function getAllEvents(traits2) {
|
|
|
32275
32335
|
}
|
|
32276
32336
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
32277
32337
|
const eventBus = useEventBus();
|
|
32278
|
-
const [log3, setLog] =
|
|
32279
|
-
const prevStatesRef =
|
|
32280
|
-
|
|
32338
|
+
const [log3, setLog] = React111.useState([]);
|
|
32339
|
+
const prevStatesRef = React111.useRef(/* @__PURE__ */ new Map());
|
|
32340
|
+
React111.useEffect(() => {
|
|
32281
32341
|
for (const trait of traits2) {
|
|
32282
32342
|
const prev = prevStatesRef.current.get(trait.id);
|
|
32283
32343
|
if (prev && prev !== trait.currentState) {
|
|
@@ -32447,10 +32507,10 @@ function VerifyModePanel({
|
|
|
32447
32507
|
serverCount,
|
|
32448
32508
|
localCount
|
|
32449
32509
|
}) {
|
|
32450
|
-
const [expanded, setExpanded] =
|
|
32451
|
-
const scrollRef =
|
|
32452
|
-
const prevCountRef =
|
|
32453
|
-
|
|
32510
|
+
const [expanded, setExpanded] = React111.useState(true);
|
|
32511
|
+
const scrollRef = React111.useRef(null);
|
|
32512
|
+
const prevCountRef = React111.useRef(0);
|
|
32513
|
+
React111.useEffect(() => {
|
|
32454
32514
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
32455
32515
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
32456
32516
|
}
|
|
@@ -32516,10 +32576,10 @@ function RuntimeDebugger({
|
|
|
32516
32576
|
defaultTab,
|
|
32517
32577
|
schema
|
|
32518
32578
|
}) {
|
|
32519
|
-
const [isCollapsed, setIsCollapsed] =
|
|
32520
|
-
const [isVisible, setIsVisible] =
|
|
32579
|
+
const [isCollapsed, setIsCollapsed] = React111.useState(mode === "verify" ? true : defaultCollapsed);
|
|
32580
|
+
const [isVisible, setIsVisible] = React111.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
32521
32581
|
const debugData = useDebugData();
|
|
32522
|
-
|
|
32582
|
+
React111.useEffect(() => {
|
|
32523
32583
|
if (mode === "inline") return;
|
|
32524
32584
|
return onDebugToggle((enabled) => {
|
|
32525
32585
|
setIsVisible(enabled);
|
|
@@ -32528,7 +32588,7 @@ function RuntimeDebugger({
|
|
|
32528
32588
|
}
|
|
32529
32589
|
});
|
|
32530
32590
|
}, [mode]);
|
|
32531
|
-
|
|
32591
|
+
React111.useEffect(() => {
|
|
32532
32592
|
if (mode === "inline") return;
|
|
32533
32593
|
const handleKeyDown = (e) => {
|
|
32534
32594
|
if (e.key === "`" && isVisible) {
|
|
@@ -33077,7 +33137,7 @@ function SequenceBar({
|
|
|
33077
33137
|
onSlotRemove(index);
|
|
33078
33138
|
}, [onSlotRemove, playing]);
|
|
33079
33139
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
33080
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
33140
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React111__default.Fragment, { children: [
|
|
33081
33141
|
i > 0 && /* @__PURE__ */ jsx(
|
|
33082
33142
|
Typography,
|
|
33083
33143
|
{
|
|
@@ -34533,7 +34593,7 @@ var init_StatCard2 = __esm({
|
|
|
34533
34593
|
const labelToUse = propLabel ?? propTitle;
|
|
34534
34594
|
const eventBus = useEventBus();
|
|
34535
34595
|
const { t } = useTranslate();
|
|
34536
|
-
const handleActionClick =
|
|
34596
|
+
const handleActionClick = React111__default.useCallback(() => {
|
|
34537
34597
|
if (action?.event) {
|
|
34538
34598
|
eventBus.emit(`UI:${action.event}`, {});
|
|
34539
34599
|
}
|
|
@@ -34544,7 +34604,7 @@ var init_StatCard2 = __esm({
|
|
|
34544
34604
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34545
34605
|
const isLoading = externalLoading ?? false;
|
|
34546
34606
|
const error = externalError;
|
|
34547
|
-
const computeMetricValue =
|
|
34607
|
+
const computeMetricValue = React111__default.useCallback(
|
|
34548
34608
|
(metric, items) => {
|
|
34549
34609
|
if (metric.value !== void 0) {
|
|
34550
34610
|
return metric.value;
|
|
@@ -34583,7 +34643,7 @@ var init_StatCard2 = __esm({
|
|
|
34583
34643
|
},
|
|
34584
34644
|
[]
|
|
34585
34645
|
);
|
|
34586
|
-
const schemaStats =
|
|
34646
|
+
const schemaStats = React111__default.useMemo(() => {
|
|
34587
34647
|
if (!metrics || metrics.length === 0) return null;
|
|
34588
34648
|
return metrics.map((metric) => ({
|
|
34589
34649
|
label: metric.label,
|
|
@@ -34591,7 +34651,7 @@ var init_StatCard2 = __esm({
|
|
|
34591
34651
|
format: metric.format
|
|
34592
34652
|
}));
|
|
34593
34653
|
}, [metrics, data, computeMetricValue]);
|
|
34594
|
-
const calculatedTrend =
|
|
34654
|
+
const calculatedTrend = React111__default.useMemo(() => {
|
|
34595
34655
|
if (manualTrend !== void 0) return manualTrend;
|
|
34596
34656
|
if (previousValue === void 0 || currentValue === void 0)
|
|
34597
34657
|
return void 0;
|
|
@@ -35646,7 +35706,7 @@ var init_Timeline = __esm({
|
|
|
35646
35706
|
}) => {
|
|
35647
35707
|
const { t } = useTranslate();
|
|
35648
35708
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
35649
|
-
const items =
|
|
35709
|
+
const items = React111__default.useMemo(() => {
|
|
35650
35710
|
if (propItems) return propItems;
|
|
35651
35711
|
if (entityData.length === 0) return [];
|
|
35652
35712
|
return entityData.map((record, idx) => {
|
|
@@ -35803,7 +35863,7 @@ var init_TimerDisplay = __esm({
|
|
|
35803
35863
|
}
|
|
35804
35864
|
});
|
|
35805
35865
|
function extractToastProps(children) {
|
|
35806
|
-
if (!
|
|
35866
|
+
if (!React111__default.isValidElement(children)) {
|
|
35807
35867
|
if (typeof children === "string") {
|
|
35808
35868
|
return { message: children };
|
|
35809
35869
|
}
|
|
@@ -35841,7 +35901,7 @@ var init_ToastSlot = __esm({
|
|
|
35841
35901
|
eventBus.emit("UI:CLOSE");
|
|
35842
35902
|
};
|
|
35843
35903
|
if (!isVisible) return null;
|
|
35844
|
-
const isCustomContent =
|
|
35904
|
+
const isCustomContent = React111__default.isValidElement(children) && !message;
|
|
35845
35905
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
35846
35906
|
Toast,
|
|
35847
35907
|
{
|
|
@@ -36110,7 +36170,7 @@ var init_WizardContainer = __esm({
|
|
|
36110
36170
|
const isCompleted = index < currentStep;
|
|
36111
36171
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36112
36172
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36113
|
-
return /* @__PURE__ */ jsxs(
|
|
36173
|
+
return /* @__PURE__ */ jsxs(React111__default.Fragment, { children: [
|
|
36114
36174
|
/* @__PURE__ */ jsx(
|
|
36115
36175
|
Button,
|
|
36116
36176
|
{
|
|
@@ -36560,12 +36620,12 @@ var init_XPBar = __esm({
|
|
|
36560
36620
|
}
|
|
36561
36621
|
});
|
|
36562
36622
|
function lazyThree(name, loader) {
|
|
36563
|
-
const Lazy =
|
|
36623
|
+
const Lazy = React111__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
36564
36624
|
function ThreeWrapper(props) {
|
|
36565
|
-
return
|
|
36566
|
-
|
|
36625
|
+
return React111__default.createElement(
|
|
36626
|
+
React111__default.Suspense,
|
|
36567
36627
|
{ fallback: null },
|
|
36568
|
-
|
|
36628
|
+
React111__default.createElement(Lazy, props)
|
|
36569
36629
|
);
|
|
36570
36630
|
}
|
|
36571
36631
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -37053,7 +37113,7 @@ function SuspenseConfigProvider({
|
|
|
37053
37113
|
config,
|
|
37054
37114
|
children
|
|
37055
37115
|
}) {
|
|
37056
|
-
return
|
|
37116
|
+
return React111__default.createElement(
|
|
37057
37117
|
SuspenseConfigContext.Provider,
|
|
37058
37118
|
{ value: config },
|
|
37059
37119
|
children
|
|
@@ -37517,7 +37577,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
37517
37577
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
37518
37578
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
37519
37579
|
}
|
|
37520
|
-
return /* @__PURE__ */ jsx(
|
|
37580
|
+
return /* @__PURE__ */ jsx(React111__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
37521
37581
|
}
|
|
37522
37582
|
if (!child || typeof child !== "object") return null;
|
|
37523
37583
|
const childId = `${parentId}-${index}`;
|
|
@@ -37579,6 +37639,14 @@ function SlotContentRenderer({
|
|
|
37579
37639
|
patternPath
|
|
37580
37640
|
}) {
|
|
37581
37641
|
const entityProp = content.props.entity;
|
|
37642
|
+
if (content.pattern === "form-section") {
|
|
37643
|
+
slotLog.debug("SlotContentRenderer:form-section-render", {
|
|
37644
|
+
contentId: content.id,
|
|
37645
|
+
sourceTrait: content.sourceTrait,
|
|
37646
|
+
entityRefId: refId(entityProp),
|
|
37647
|
+
entityIsObject: entityProp !== null && typeof entityProp === "object" && !Array.isArray(entityProp)
|
|
37648
|
+
});
|
|
37649
|
+
}
|
|
37582
37650
|
if (typeof entityProp === "string" && entityProp.length > 0) {
|
|
37583
37651
|
if (typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production") {
|
|
37584
37652
|
throw new Error(
|
|
@@ -37722,6 +37790,7 @@ var init_UISlotRenderer = __esm({
|
|
|
37722
37790
|
init_Box();
|
|
37723
37791
|
init_Typography();
|
|
37724
37792
|
init_useEventBus();
|
|
37793
|
+
init_SlotsContext();
|
|
37725
37794
|
init_cn();
|
|
37726
37795
|
init_ErrorBoundary();
|
|
37727
37796
|
init_Skeleton();
|
|
@@ -37925,7 +37994,7 @@ var FormSection = ({
|
|
|
37925
37994
|
columns = 1,
|
|
37926
37995
|
className
|
|
37927
37996
|
}) => {
|
|
37928
|
-
const [collapsed, setCollapsed] =
|
|
37997
|
+
const [collapsed, setCollapsed] = React111__default.useState(defaultCollapsed);
|
|
37929
37998
|
const { t } = useTranslate();
|
|
37930
37999
|
const eventBus = useEventBus();
|
|
37931
38000
|
const gridClass = {
|
|
@@ -37933,7 +38002,7 @@ var FormSection = ({
|
|
|
37933
38002
|
2: "grid-cols-1 md:grid-cols-2",
|
|
37934
38003
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
37935
38004
|
}[columns];
|
|
37936
|
-
|
|
38005
|
+
React111__default.useCallback(() => {
|
|
37937
38006
|
if (collapsible) {
|
|
37938
38007
|
setCollapsed((prev) => !prev);
|
|
37939
38008
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|