@almadar/ui 6.2.0 → 6.4.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 +2227 -1519
- package/dist/avl/index.d.cts +206 -17
- package/dist/avl/index.d.ts +206 -17
- package/dist/avl/index.js +1211 -506
- package/dist/components/index.cjs +1978 -1455
- package/dist/components/index.d.cts +206 -6
- package/dist/components/index.d.ts +206 -6
- package/dist/components/index.js +980 -456
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.js +2 -0
- package/dist/lib/drawable/three/index.cjs +5 -3
- package/dist/lib/drawable/three/index.js +5 -3
- package/dist/locales/index.cjs +6 -0
- package/dist/locales/index.js +6 -0
- package/dist/marketing/index.cjs +1 -1
- package/dist/marketing/index.js +1 -1
- package/dist/providers/index.cjs +1723 -1285
- package/dist/providers/index.d.cts +4 -1
- package/dist/providers/index.d.ts +4 -1
- package/dist/providers/index.js +784 -346
- package/dist/runtime/index.cjs +1688 -1250
- package/dist/runtime/index.js +788 -350
- package/locales/ar.json +2 -0
- package/locales/en.json +2 -0
- package/locales/sl.json +2 -0
- package/package.json +5 -4
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React86 from 'react';
|
|
2
|
+
import React86__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useSyncExternalStore, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, RenderSlotProvider, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, CurrentPagePathProvider, NavStackProvider, OrbitalProvider, TraitScopeProvider, useNavStack, ServerBridgeProvider, useCurrentPagePath, useRenderSlot, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
@@ -793,6 +793,112 @@ var init_useTapReveal = __esm({
|
|
|
793
793
|
"hooks/useTapReveal.ts"() {
|
|
794
794
|
}
|
|
795
795
|
});
|
|
796
|
+
function useDraggable({ payload, disabled = false }) {
|
|
797
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
798
|
+
const eventBus = useEventBus();
|
|
799
|
+
const handleDragStart = useCallback(
|
|
800
|
+
(e) => {
|
|
801
|
+
if (disabled) {
|
|
802
|
+
e.preventDefault();
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
|
|
806
|
+
e.dataTransfer.effectAllowed = "copy";
|
|
807
|
+
setIsDragging(true);
|
|
808
|
+
eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
|
|
809
|
+
},
|
|
810
|
+
[disabled, payload, eventBus]
|
|
811
|
+
);
|
|
812
|
+
const handleDragEnd = useCallback(
|
|
813
|
+
(e) => {
|
|
814
|
+
setIsDragging(false);
|
|
815
|
+
eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
|
|
816
|
+
},
|
|
817
|
+
[payload, eventBus]
|
|
818
|
+
);
|
|
819
|
+
const dragProps = useMemo(
|
|
820
|
+
() => ({
|
|
821
|
+
draggable: !disabled,
|
|
822
|
+
onDragStart: handleDragStart,
|
|
823
|
+
onDragEnd: handleDragEnd,
|
|
824
|
+
"aria-grabbed": isDragging
|
|
825
|
+
}),
|
|
826
|
+
[disabled, handleDragStart, handleDragEnd, isDragging]
|
|
827
|
+
);
|
|
828
|
+
return { dragProps, isDragging };
|
|
829
|
+
}
|
|
830
|
+
var ALMADAR_DND_MIME;
|
|
831
|
+
var init_useDraggable = __esm({
|
|
832
|
+
"hooks/useDraggable.ts"() {
|
|
833
|
+
"use client";
|
|
834
|
+
init_useEventBus();
|
|
835
|
+
ALMADAR_DND_MIME = "application/x-almadar-dnd";
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
function parsePayload(e) {
|
|
839
|
+
try {
|
|
840
|
+
const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
|
|
841
|
+
if (!raw) return null;
|
|
842
|
+
const parsed = JSON.parse(raw);
|
|
843
|
+
if (typeof parsed.kind !== "string" || !parsed.data) return null;
|
|
844
|
+
return parsed;
|
|
845
|
+
} catch {
|
|
846
|
+
return null;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
function hasAlmadarPayload(e) {
|
|
850
|
+
return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
|
|
851
|
+
}
|
|
852
|
+
function useDropZone({ accepts, onDrop, disabled = false }) {
|
|
853
|
+
const [isOver, setIsOver] = useState(false);
|
|
854
|
+
const eventBus = useEventBus();
|
|
855
|
+
const handleDragOver = useCallback(
|
|
856
|
+
(e) => {
|
|
857
|
+
if (disabled) return;
|
|
858
|
+
if (!hasAlmadarPayload(e)) return;
|
|
859
|
+
e.preventDefault();
|
|
860
|
+
e.dataTransfer.dropEffect = "copy";
|
|
861
|
+
setIsOver(true);
|
|
862
|
+
},
|
|
863
|
+
[disabled]
|
|
864
|
+
);
|
|
865
|
+
const handleDragLeave = useCallback(
|
|
866
|
+
(e) => {
|
|
867
|
+
setIsOver(false);
|
|
868
|
+
},
|
|
869
|
+
[]
|
|
870
|
+
);
|
|
871
|
+
const handleDrop = useCallback(
|
|
872
|
+
(e) => {
|
|
873
|
+
e.preventDefault();
|
|
874
|
+
setIsOver(false);
|
|
875
|
+
if (disabled) return;
|
|
876
|
+
const payload = parsePayload(e);
|
|
877
|
+
if (!payload) return;
|
|
878
|
+
if (!accepts.includes(payload.kind)) return;
|
|
879
|
+
const position = { x: e.clientX, y: e.clientY };
|
|
880
|
+
onDrop(payload, position);
|
|
881
|
+
eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
|
|
882
|
+
},
|
|
883
|
+
[disabled, accepts, onDrop, eventBus]
|
|
884
|
+
);
|
|
885
|
+
const dropProps = useMemo(
|
|
886
|
+
() => ({
|
|
887
|
+
onDragOver: handleDragOver,
|
|
888
|
+
onDragLeave: handleDragLeave,
|
|
889
|
+
onDrop: handleDrop
|
|
890
|
+
}),
|
|
891
|
+
[handleDragOver, handleDragLeave, handleDrop]
|
|
892
|
+
);
|
|
893
|
+
return { dropProps, isOver };
|
|
894
|
+
}
|
|
895
|
+
var init_useDropZone = __esm({
|
|
896
|
+
"hooks/useDropZone.ts"() {
|
|
897
|
+
"use client";
|
|
898
|
+
init_useEventBus();
|
|
899
|
+
init_useDraggable();
|
|
900
|
+
}
|
|
901
|
+
});
|
|
796
902
|
function usePerfBuffer() {
|
|
797
903
|
return useSyncExternalStore(perfStore.subscribe, perfStore.getSnapshot, perfStore.getSnapshot);
|
|
798
904
|
}
|
|
@@ -821,7 +927,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
821
927
|
function isPlainObject(value) {
|
|
822
928
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
823
929
|
if (Array.isArray(value)) return false;
|
|
824
|
-
if (
|
|
930
|
+
if (React86__default.isValidElement(value)) return false;
|
|
825
931
|
if (value instanceof Date) return false;
|
|
826
932
|
if (typeof value === "function") return false;
|
|
827
933
|
return true;
|
|
@@ -830,7 +936,7 @@ function isEvaluatorResolvedData(value) {
|
|
|
830
936
|
return evaluatorResolvedData.has(value);
|
|
831
937
|
}
|
|
832
938
|
function brandResolved(value) {
|
|
833
|
-
if (value !== null && typeof value === "object" && !
|
|
939
|
+
if (value !== null && typeof value === "object" && !React86__default.isValidElement(value) && !(value instanceof Date)) {
|
|
834
940
|
resolvedMarkerFree.add(value);
|
|
835
941
|
}
|
|
836
942
|
}
|
|
@@ -863,7 +969,7 @@ function walkValue(value, scopeTrait, entity, config, state) {
|
|
|
863
969
|
}
|
|
864
970
|
const resolved = resolveMarkerExpression(value.expression, entity, config, state);
|
|
865
971
|
markerResolutionCache.set(value, { entity, config, state, resolved });
|
|
866
|
-
if (resolved !== null && typeof resolved === "object" && !
|
|
972
|
+
if (resolved !== null && typeof resolved === "object" && !React86__default.isValidElement(resolved) && !(resolved instanceof Date)) {
|
|
867
973
|
resolvedMarkerFree.add(resolved);
|
|
868
974
|
evaluatorResolvedData.add(resolved);
|
|
869
975
|
}
|
|
@@ -1050,7 +1156,7 @@ var init_Box = __esm({
|
|
|
1050
1156
|
fixed: "fixed",
|
|
1051
1157
|
sticky: "sticky"
|
|
1052
1158
|
};
|
|
1053
|
-
Box =
|
|
1159
|
+
Box = React86__default.forwardRef(
|
|
1054
1160
|
({
|
|
1055
1161
|
padding,
|
|
1056
1162
|
paddingX,
|
|
@@ -1115,7 +1221,7 @@ var init_Box = __esm({
|
|
|
1115
1221
|
onPointerDown?.(e);
|
|
1116
1222
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
1117
1223
|
const isClickable = action || onClick;
|
|
1118
|
-
return
|
|
1224
|
+
return React86__default.createElement(
|
|
1119
1225
|
Component,
|
|
1120
1226
|
{
|
|
1121
1227
|
ref,
|
|
@@ -1332,7 +1438,7 @@ var init_Icon = __esm({
|
|
|
1332
1438
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1333
1439
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1334
1440
|
const family = useIconFamily();
|
|
1335
|
-
const RenderedComponent =
|
|
1441
|
+
const RenderedComponent = React86__default.useMemo(() => {
|
|
1336
1442
|
if (directIcon) return null;
|
|
1337
1443
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1338
1444
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1461,7 +1567,7 @@ var init_atlasSlice = __esm({
|
|
|
1461
1567
|
}
|
|
1462
1568
|
});
|
|
1463
1569
|
function useAtlasSliceDataUrl(asset) {
|
|
1464
|
-
const [, bump] =
|
|
1570
|
+
const [, bump] = React86.useReducer((x) => x + 1, 0);
|
|
1465
1571
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1466
1572
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1467
1573
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1524,13 +1630,13 @@ function AtlasImage({
|
|
|
1524
1630
|
style,
|
|
1525
1631
|
"aria-hidden": ariaHidden
|
|
1526
1632
|
}) {
|
|
1527
|
-
const [, bump] =
|
|
1528
|
-
const canvasRef =
|
|
1633
|
+
const [, bump] = React86.useReducer((x) => x + 1, 0);
|
|
1634
|
+
const canvasRef = React86.useRef(null);
|
|
1529
1635
|
const sliced = isAtlasAsset(asset);
|
|
1530
1636
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1531
1637
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1532
1638
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1533
|
-
|
|
1639
|
+
React86.useEffect(() => {
|
|
1534
1640
|
const canvas = canvasRef.current;
|
|
1535
1641
|
if (!canvas || !img || !rect) return;
|
|
1536
1642
|
canvas.width = rect.sw;
|
|
@@ -1606,7 +1712,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1606
1712
|
const IconComp = value;
|
|
1607
1713
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1608
1714
|
}
|
|
1609
|
-
if (
|
|
1715
|
+
if (React86__default.isValidElement(value)) {
|
|
1610
1716
|
return value;
|
|
1611
1717
|
}
|
|
1612
1718
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1683,7 +1789,7 @@ var init_Button = __esm({
|
|
|
1683
1789
|
md: "h-icon-default w-icon-default",
|
|
1684
1790
|
lg: "h-icon-default w-icon-default"
|
|
1685
1791
|
};
|
|
1686
|
-
Button =
|
|
1792
|
+
Button = React86__default.forwardRef(
|
|
1687
1793
|
({
|
|
1688
1794
|
className,
|
|
1689
1795
|
variant = "primary",
|
|
@@ -1753,7 +1859,7 @@ var Dialog;
|
|
|
1753
1859
|
var init_Dialog = __esm({
|
|
1754
1860
|
"components/core/atoms/Dialog.tsx"() {
|
|
1755
1861
|
init_cn();
|
|
1756
|
-
Dialog =
|
|
1862
|
+
Dialog = React86__default.forwardRef(
|
|
1757
1863
|
({
|
|
1758
1864
|
role = "dialog",
|
|
1759
1865
|
"aria-modal": ariaModal = true,
|
|
@@ -1964,7 +2070,7 @@ var init_Typography = __esm({
|
|
|
1964
2070
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
1965
2071
|
body = formatValue(body, format);
|
|
1966
2072
|
}
|
|
1967
|
-
return
|
|
2073
|
+
return React86__default.createElement(
|
|
1968
2074
|
Component,
|
|
1969
2075
|
{
|
|
1970
2076
|
id,
|
|
@@ -2174,7 +2280,6 @@ var init_Modal = __esm({
|
|
|
2174
2280
|
),
|
|
2175
2281
|
style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
|
|
2176
2282
|
onClick: handleOverlayClick,
|
|
2177
|
-
"aria-hidden": "true",
|
|
2178
2283
|
children: /* @__PURE__ */ jsxs(
|
|
2179
2284
|
Dialog,
|
|
2180
2285
|
{
|
|
@@ -2409,7 +2514,7 @@ var init_Drawer = __esm({
|
|
|
2409
2514
|
};
|
|
2410
2515
|
const widthClass = width in sizeWidths ? sizeWidths[width] : "";
|
|
2411
2516
|
const widthStyle = width in sizeWidths ? void 0 : { width };
|
|
2412
|
-
const
|
|
2517
|
+
const positionClasses2 = position === "right" ? "right-0 border-l" : "left-0 border-r";
|
|
2413
2518
|
const drawerSign = position === "right" ? 1 : -1;
|
|
2414
2519
|
const slideTransform = position === "right" ? "translateX(100%)" : "translateX(-100%)";
|
|
2415
2520
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -2431,7 +2536,7 @@ var init_Drawer = __esm({
|
|
|
2431
2536
|
className: cn(
|
|
2432
2537
|
"fixed top-0 bottom-0 z-50",
|
|
2433
2538
|
"flex flex-col max-h-screen",
|
|
2434
|
-
|
|
2539
|
+
positionClasses2,
|
|
2435
2540
|
widthClass,
|
|
2436
2541
|
drawerAnim,
|
|
2437
2542
|
className
|
|
@@ -2527,7 +2632,7 @@ var init_Badge = __esm({
|
|
|
2527
2632
|
md: "px-2.5 py-1 text-sm",
|
|
2528
2633
|
lg: "px-3 py-1.5 text-base"
|
|
2529
2634
|
};
|
|
2530
|
-
Badge =
|
|
2635
|
+
Badge = React86__default.forwardRef(
|
|
2531
2636
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2532
2637
|
const iconSizes3 = {
|
|
2533
2638
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2877,7 +2982,7 @@ var init_SvgFlow = __esm({
|
|
|
2877
2982
|
width = 100,
|
|
2878
2983
|
height = 100
|
|
2879
2984
|
}) => {
|
|
2880
|
-
const markerId =
|
|
2985
|
+
const markerId = React86__default.useMemo(() => {
|
|
2881
2986
|
flowIdCounter += 1;
|
|
2882
2987
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2883
2988
|
}, []);
|
|
@@ -3470,7 +3575,7 @@ var init_SvgRing = __esm({
|
|
|
3470
3575
|
width = 100,
|
|
3471
3576
|
height = 100
|
|
3472
3577
|
}) => {
|
|
3473
|
-
const gradientId =
|
|
3578
|
+
const gradientId = React86__default.useMemo(() => {
|
|
3474
3579
|
ringIdCounter += 1;
|
|
3475
3580
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3476
3581
|
}, []);
|
|
@@ -3651,7 +3756,7 @@ var init_Input = __esm({
|
|
|
3651
3756
|
init_cn();
|
|
3652
3757
|
init_Icon();
|
|
3653
3758
|
init_useEventBus();
|
|
3654
|
-
Input =
|
|
3759
|
+
Input = React86__default.forwardRef(
|
|
3655
3760
|
({
|
|
3656
3761
|
className,
|
|
3657
3762
|
inputType,
|
|
@@ -3675,9 +3780,9 @@ var init_Input = __esm({
|
|
|
3675
3780
|
const eventBus = useEventBus();
|
|
3676
3781
|
const type = inputType || htmlType || "text";
|
|
3677
3782
|
const isDeclarative = typeof onChange === "string";
|
|
3678
|
-
const [localValue, setLocalValue] =
|
|
3679
|
-
const pendingEchoRef =
|
|
3680
|
-
|
|
3783
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
3784
|
+
const pendingEchoRef = React86__default.useRef(/* @__PURE__ */ new Set());
|
|
3785
|
+
React86__default.useEffect(() => {
|
|
3681
3786
|
if (!isDeclarative) return;
|
|
3682
3787
|
const incoming = value == null ? "" : String(value);
|
|
3683
3788
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -3844,7 +3949,7 @@ var Label;
|
|
|
3844
3949
|
var init_Label = __esm({
|
|
3845
3950
|
"components/core/atoms/Label.tsx"() {
|
|
3846
3951
|
init_cn();
|
|
3847
|
-
Label =
|
|
3952
|
+
Label = React86__default.forwardRef(
|
|
3848
3953
|
({ className, required, children, ...props }, ref) => {
|
|
3849
3954
|
return /* @__PURE__ */ jsxs(
|
|
3850
3955
|
"label",
|
|
@@ -3871,7 +3976,7 @@ var init_Textarea = __esm({
|
|
|
3871
3976
|
"components/core/atoms/Textarea.tsx"() {
|
|
3872
3977
|
init_cn();
|
|
3873
3978
|
init_useEventBus();
|
|
3874
|
-
Textarea =
|
|
3979
|
+
Textarea = React86__default.forwardRef(
|
|
3875
3980
|
({ className, error, onChange, ...props }, ref) => {
|
|
3876
3981
|
const eventBus = useEventBus();
|
|
3877
3982
|
const handleChange = (e) => {
|
|
@@ -3925,6 +4030,7 @@ function NativeSelect({
|
|
|
3925
4030
|
error,
|
|
3926
4031
|
onChange,
|
|
3927
4032
|
onValueChange,
|
|
4033
|
+
action,
|
|
3928
4034
|
value,
|
|
3929
4035
|
...props
|
|
3930
4036
|
}) {
|
|
@@ -3936,6 +4042,9 @@ function NativeSelect({
|
|
|
3936
4042
|
onChange?.(e);
|
|
3937
4043
|
}
|
|
3938
4044
|
dispatchValueChange(onValueChange, eventBus, e.target.value);
|
|
4045
|
+
if (action) {
|
|
4046
|
+
eventBus.emit(`UI:${action}`, { value: e.target.value });
|
|
4047
|
+
}
|
|
3939
4048
|
};
|
|
3940
4049
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3941
4050
|
/* @__PURE__ */ jsxs(
|
|
@@ -3971,6 +4080,7 @@ function RichSelect({
|
|
|
3971
4080
|
error,
|
|
3972
4081
|
onChange,
|
|
3973
4082
|
onValueChange,
|
|
4083
|
+
action,
|
|
3974
4084
|
value,
|
|
3975
4085
|
multiple,
|
|
3976
4086
|
searchable,
|
|
@@ -3996,6 +4106,9 @@ function RichSelect({
|
|
|
3996
4106
|
eventBus.emit(`UI:${onChange}`, { value: next });
|
|
3997
4107
|
}
|
|
3998
4108
|
dispatchValueChange(onValueChange, eventBus, next);
|
|
4109
|
+
if (action) {
|
|
4110
|
+
eventBus.emit(`UI:${action}`, { value: next });
|
|
4111
|
+
}
|
|
3999
4112
|
};
|
|
4000
4113
|
const clear = (e) => {
|
|
4001
4114
|
e.stopPropagation();
|
|
@@ -4004,6 +4117,9 @@ function RichSelect({
|
|
|
4004
4117
|
eventBus.emit(`UI:${onChange}`, { value: next });
|
|
4005
4118
|
}
|
|
4006
4119
|
dispatchValueChange(onValueChange, eventBus, next);
|
|
4120
|
+
if (action) {
|
|
4121
|
+
eventBus.emit(`UI:${action}`, { value: next });
|
|
4122
|
+
}
|
|
4007
4123
|
};
|
|
4008
4124
|
useEffect(() => {
|
|
4009
4125
|
const handler = (e) => {
|
|
@@ -4110,7 +4226,7 @@ var init_Select = __esm({
|
|
|
4110
4226
|
init_cn();
|
|
4111
4227
|
init_Icon();
|
|
4112
4228
|
init_useEventBus();
|
|
4113
|
-
Select =
|
|
4229
|
+
Select = React86__default.forwardRef(
|
|
4114
4230
|
(props, _ref) => {
|
|
4115
4231
|
const { multiple, searchable, clearable } = props;
|
|
4116
4232
|
if (multiple || searchable || clearable) {
|
|
@@ -4127,7 +4243,7 @@ var init_Checkbox = __esm({
|
|
|
4127
4243
|
"components/core/atoms/Checkbox.tsx"() {
|
|
4128
4244
|
init_cn();
|
|
4129
4245
|
init_useEventBus();
|
|
4130
|
-
Checkbox =
|
|
4246
|
+
Checkbox = React86__default.forwardRef(
|
|
4131
4247
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
4132
4248
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
4133
4249
|
const eventBus = useEventBus();
|
|
@@ -4181,7 +4297,7 @@ var init_Spinner = __esm({
|
|
|
4181
4297
|
md: "h-6 w-6",
|
|
4182
4298
|
lg: "h-8 w-8"
|
|
4183
4299
|
};
|
|
4184
|
-
Spinner =
|
|
4300
|
+
Spinner = React86__default.forwardRef(
|
|
4185
4301
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4186
4302
|
if (overlay) {
|
|
4187
4303
|
return /* @__PURE__ */ jsx(
|
|
@@ -4271,7 +4387,7 @@ var init_Card = __esm({
|
|
|
4271
4387
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4272
4388
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4273
4389
|
};
|
|
4274
|
-
Card =
|
|
4390
|
+
Card = React86__default.forwardRef(
|
|
4275
4391
|
({
|
|
4276
4392
|
className,
|
|
4277
4393
|
variant = "bordered",
|
|
@@ -4320,9 +4436,9 @@ var init_Card = __esm({
|
|
|
4320
4436
|
}
|
|
4321
4437
|
);
|
|
4322
4438
|
Card.displayName = "Card";
|
|
4323
|
-
CardHeader =
|
|
4439
|
+
CardHeader = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4324
4440
|
CardHeader.displayName = "CardHeader";
|
|
4325
|
-
CardTitle =
|
|
4441
|
+
CardTitle = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4326
4442
|
"h3",
|
|
4327
4443
|
{
|
|
4328
4444
|
ref,
|
|
@@ -4335,11 +4451,11 @@ var init_Card = __esm({
|
|
|
4335
4451
|
}
|
|
4336
4452
|
));
|
|
4337
4453
|
CardTitle.displayName = "CardTitle";
|
|
4338
|
-
CardContent =
|
|
4454
|
+
CardContent = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4339
4455
|
CardContent.displayName = "CardContent";
|
|
4340
4456
|
CardBody = CardContent;
|
|
4341
4457
|
CardBody.displayName = "CardBody";
|
|
4342
|
-
CardFooter =
|
|
4458
|
+
CardFooter = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4343
4459
|
"div",
|
|
4344
4460
|
{
|
|
4345
4461
|
ref,
|
|
@@ -4426,7 +4542,7 @@ var init_FilterPill = __esm({
|
|
|
4426
4542
|
md: "w-3.5 h-3.5",
|
|
4427
4543
|
lg: "w-4 h-4"
|
|
4428
4544
|
};
|
|
4429
|
-
FilterPill =
|
|
4545
|
+
FilterPill = React86__default.forwardRef(
|
|
4430
4546
|
({
|
|
4431
4547
|
className,
|
|
4432
4548
|
variant = "default",
|
|
@@ -4555,8 +4671,8 @@ var init_Avatar = __esm({
|
|
|
4555
4671
|
actionPayload
|
|
4556
4672
|
}) => {
|
|
4557
4673
|
const eventBus = useEventBus();
|
|
4558
|
-
const [imgFailed, setImgFailed] =
|
|
4559
|
-
|
|
4674
|
+
const [imgFailed, setImgFailed] = React86__default.useState(false);
|
|
4675
|
+
React86__default.useEffect(() => {
|
|
4560
4676
|
setImgFailed(false);
|
|
4561
4677
|
}, [src]);
|
|
4562
4678
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4669,7 +4785,7 @@ var init_Center = __esm({
|
|
|
4669
4785
|
as: Component = "div"
|
|
4670
4786
|
}) => {
|
|
4671
4787
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4672
|
-
return
|
|
4788
|
+
return React86__default.createElement(Component, {
|
|
4673
4789
|
className: cn(
|
|
4674
4790
|
inline ? "inline-flex" : "flex",
|
|
4675
4791
|
horizontal && "justify-center",
|
|
@@ -4937,7 +5053,7 @@ var init_Radio = __esm({
|
|
|
4937
5053
|
md: "w-2.5 h-2.5",
|
|
4938
5054
|
lg: "w-3 h-3"
|
|
4939
5055
|
};
|
|
4940
|
-
Radio =
|
|
5056
|
+
Radio = React86__default.forwardRef(
|
|
4941
5057
|
({
|
|
4942
5058
|
label,
|
|
4943
5059
|
helperText,
|
|
@@ -4954,12 +5070,12 @@ var init_Radio = __esm({
|
|
|
4954
5070
|
onChange,
|
|
4955
5071
|
...props
|
|
4956
5072
|
}, ref) => {
|
|
4957
|
-
const reactId =
|
|
5073
|
+
const reactId = React86__default.useId();
|
|
4958
5074
|
const baseId = id || `radio-${reactId}`;
|
|
4959
5075
|
const hasError = !!error;
|
|
4960
5076
|
const eventBus = useEventBus();
|
|
4961
|
-
const [selected, setSelected] =
|
|
4962
|
-
|
|
5077
|
+
const [selected, setSelected] = React86__default.useState(value);
|
|
5078
|
+
React86__default.useEffect(() => {
|
|
4963
5079
|
if (value !== void 0) setSelected(value);
|
|
4964
5080
|
}, [value]);
|
|
4965
5081
|
const pick = (next, e) => {
|
|
@@ -5141,7 +5257,7 @@ var init_Switch = __esm({
|
|
|
5141
5257
|
"components/core/atoms/Switch.tsx"() {
|
|
5142
5258
|
"use client";
|
|
5143
5259
|
init_cn();
|
|
5144
|
-
Switch =
|
|
5260
|
+
Switch = React86.forwardRef(
|
|
5145
5261
|
({
|
|
5146
5262
|
checked,
|
|
5147
5263
|
defaultChecked = false,
|
|
@@ -5152,10 +5268,10 @@ var init_Switch = __esm({
|
|
|
5152
5268
|
name,
|
|
5153
5269
|
className
|
|
5154
5270
|
}, ref) => {
|
|
5155
|
-
const [isChecked, setIsChecked] =
|
|
5271
|
+
const [isChecked, setIsChecked] = React86.useState(
|
|
5156
5272
|
checked !== void 0 ? checked : defaultChecked
|
|
5157
5273
|
);
|
|
5158
|
-
|
|
5274
|
+
React86.useEffect(() => {
|
|
5159
5275
|
if (checked !== void 0) {
|
|
5160
5276
|
setIsChecked(checked);
|
|
5161
5277
|
}
|
|
@@ -5318,7 +5434,7 @@ var init_Stack = __esm({
|
|
|
5318
5434
|
};
|
|
5319
5435
|
const isHorizontal = direction === "horizontal";
|
|
5320
5436
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
5321
|
-
return
|
|
5437
|
+
return React86__default.createElement(
|
|
5322
5438
|
Component,
|
|
5323
5439
|
{
|
|
5324
5440
|
className: cn(
|
|
@@ -5518,7 +5634,7 @@ var Aside;
|
|
|
5518
5634
|
var init_Aside = __esm({
|
|
5519
5635
|
"components/core/atoms/Aside.tsx"() {
|
|
5520
5636
|
init_cn();
|
|
5521
|
-
Aside =
|
|
5637
|
+
Aside = React86__default.forwardRef(
|
|
5522
5638
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5523
5639
|
);
|
|
5524
5640
|
Aside.displayName = "Aside";
|
|
@@ -5597,9 +5713,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5597
5713
|
className
|
|
5598
5714
|
}) => {
|
|
5599
5715
|
const { t } = useTranslate();
|
|
5600
|
-
const [isVisible, setIsVisible] =
|
|
5601
|
-
const timeoutRef =
|
|
5602
|
-
const triggerRef =
|
|
5716
|
+
const [isVisible, setIsVisible] = React86__default.useState(false);
|
|
5717
|
+
const timeoutRef = React86__default.useRef(null);
|
|
5718
|
+
const triggerRef = React86__default.useRef(null);
|
|
5603
5719
|
const handleMouseEnter = () => {
|
|
5604
5720
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5605
5721
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5610,7 +5726,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5610
5726
|
};
|
|
5611
5727
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5612
5728
|
const open = isVisible || revealed;
|
|
5613
|
-
|
|
5729
|
+
React86__default.useEffect(() => {
|
|
5614
5730
|
return () => {
|
|
5615
5731
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5616
5732
|
};
|
|
@@ -5820,7 +5936,7 @@ var init_StatusDot = __esm({
|
|
|
5820
5936
|
md: "w-2.5 h-2.5",
|
|
5821
5937
|
lg: "w-3 h-3"
|
|
5822
5938
|
};
|
|
5823
|
-
StatusDot =
|
|
5939
|
+
StatusDot = React86__default.forwardRef(
|
|
5824
5940
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5825
5941
|
return /* @__PURE__ */ jsx(
|
|
5826
5942
|
"span",
|
|
@@ -5874,7 +5990,7 @@ var init_TrendIndicator = __esm({
|
|
|
5874
5990
|
down: "trending-down",
|
|
5875
5991
|
flat: "arrow-right"
|
|
5876
5992
|
};
|
|
5877
|
-
TrendIndicator =
|
|
5993
|
+
TrendIndicator = React86__default.forwardRef(
|
|
5878
5994
|
({
|
|
5879
5995
|
className,
|
|
5880
5996
|
value,
|
|
@@ -5943,7 +6059,7 @@ var init_RangeSlider = __esm({
|
|
|
5943
6059
|
md: "w-4 h-4",
|
|
5944
6060
|
lg: "w-5 h-5"
|
|
5945
6061
|
};
|
|
5946
|
-
RangeSlider =
|
|
6062
|
+
RangeSlider = React86__default.forwardRef(
|
|
5947
6063
|
({
|
|
5948
6064
|
className,
|
|
5949
6065
|
min = 0,
|
|
@@ -6565,7 +6681,7 @@ var init_ContentSection = __esm({
|
|
|
6565
6681
|
md: "py-16",
|
|
6566
6682
|
lg: "py-24"
|
|
6567
6683
|
};
|
|
6568
|
-
ContentSection =
|
|
6684
|
+
ContentSection = React86__default.forwardRef(
|
|
6569
6685
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6570
6686
|
return /* @__PURE__ */ jsx(
|
|
6571
6687
|
Box,
|
|
@@ -7099,7 +7215,7 @@ var init_AnimatedReveal = __esm({
|
|
|
7099
7215
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
7100
7216
|
"none": {}
|
|
7101
7217
|
};
|
|
7102
|
-
AnimatedReveal =
|
|
7218
|
+
AnimatedReveal = React86__default.forwardRef(
|
|
7103
7219
|
({
|
|
7104
7220
|
trigger = "scroll",
|
|
7105
7221
|
animation = "fade-up",
|
|
@@ -7259,7 +7375,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7259
7375
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7260
7376
|
"use client";
|
|
7261
7377
|
init_cn();
|
|
7262
|
-
AnimatedGraphic =
|
|
7378
|
+
AnimatedGraphic = React86__default.forwardRef(
|
|
7263
7379
|
({
|
|
7264
7380
|
src,
|
|
7265
7381
|
svgContent,
|
|
@@ -7282,7 +7398,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7282
7398
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7283
7399
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7284
7400
|
const prevAnimateRef = useRef(animate);
|
|
7285
|
-
const setRef =
|
|
7401
|
+
const setRef = React86__default.useCallback(
|
|
7286
7402
|
(node) => {
|
|
7287
7403
|
containerRef.current = node;
|
|
7288
7404
|
if (typeof ref === "function") ref(node);
|
|
@@ -8034,9 +8150,9 @@ function ControlButton({
|
|
|
8034
8150
|
className
|
|
8035
8151
|
}) {
|
|
8036
8152
|
const eventBus = useEventBus();
|
|
8037
|
-
const [isPressed, setIsPressed] =
|
|
8153
|
+
const [isPressed, setIsPressed] = React86.useState(false);
|
|
8038
8154
|
const actualPressed = pressed ?? isPressed;
|
|
8039
|
-
const handlePointerDown =
|
|
8155
|
+
const handlePointerDown = React86.useCallback(
|
|
8040
8156
|
(e) => {
|
|
8041
8157
|
e.preventDefault();
|
|
8042
8158
|
if (disabled) return;
|
|
@@ -8046,7 +8162,7 @@ function ControlButton({
|
|
|
8046
8162
|
},
|
|
8047
8163
|
[disabled, pressEvent, eventBus, onPress]
|
|
8048
8164
|
);
|
|
8049
|
-
const handlePointerUp =
|
|
8165
|
+
const handlePointerUp = React86.useCallback(
|
|
8050
8166
|
(e) => {
|
|
8051
8167
|
e.preventDefault();
|
|
8052
8168
|
if (disabled) return;
|
|
@@ -8056,7 +8172,7 @@ function ControlButton({
|
|
|
8056
8172
|
},
|
|
8057
8173
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8058
8174
|
);
|
|
8059
|
-
const handlePointerLeave =
|
|
8175
|
+
const handlePointerLeave = React86.useCallback(
|
|
8060
8176
|
(e) => {
|
|
8061
8177
|
if (isPressed) {
|
|
8062
8178
|
setIsPressed(false);
|
|
@@ -8315,18 +8431,18 @@ function ControlGrid({
|
|
|
8315
8431
|
className
|
|
8316
8432
|
}) {
|
|
8317
8433
|
const eventBus = useEventBus();
|
|
8318
|
-
const [active, setActive] =
|
|
8319
|
-
const [coarse, setCoarse] =
|
|
8434
|
+
const [active, setActive] = React86.useState(/* @__PURE__ */ new Set());
|
|
8435
|
+
const [coarse, setCoarse] = React86.useState(
|
|
8320
8436
|
() => typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches
|
|
8321
8437
|
);
|
|
8322
|
-
|
|
8438
|
+
React86.useEffect(() => {
|
|
8323
8439
|
if (visibility !== "auto" || typeof window === "undefined") return;
|
|
8324
8440
|
const mq = window.matchMedia("(pointer: coarse)");
|
|
8325
8441
|
const onChange = (e) => setCoarse(e.matches);
|
|
8326
8442
|
mq.addEventListener("change", onChange);
|
|
8327
8443
|
return () => mq.removeEventListener("change", onChange);
|
|
8328
8444
|
}, [visibility]);
|
|
8329
|
-
const handlePress =
|
|
8445
|
+
const handlePress = React86.useCallback(
|
|
8330
8446
|
(id) => {
|
|
8331
8447
|
setActive((prev) => new Set(prev).add(id));
|
|
8332
8448
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8340,7 +8456,7 @@ function ControlGrid({
|
|
|
8340
8456
|
},
|
|
8341
8457
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8342
8458
|
);
|
|
8343
|
-
const handleRelease =
|
|
8459
|
+
const handleRelease = React86.useCallback(
|
|
8344
8460
|
(id) => {
|
|
8345
8461
|
setActive((prev) => {
|
|
8346
8462
|
const next = new Set(prev);
|
|
@@ -8703,7 +8819,7 @@ function GameMenu({
|
|
|
8703
8819
|
}) {
|
|
8704
8820
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8705
8821
|
const eventBus = useEventBus();
|
|
8706
|
-
const handleOptionClick =
|
|
8822
|
+
const handleOptionClick = React86.useCallback(
|
|
8707
8823
|
(option) => {
|
|
8708
8824
|
if (option.event) {
|
|
8709
8825
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8939,7 +9055,7 @@ function StateGraph({
|
|
|
8939
9055
|
}) {
|
|
8940
9056
|
const eventBus = useEventBus();
|
|
8941
9057
|
const nodes = states ?? [];
|
|
8942
|
-
const positions =
|
|
9058
|
+
const positions = React86.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8943
9059
|
return /* @__PURE__ */ jsxs(
|
|
8944
9060
|
Box,
|
|
8945
9061
|
{
|
|
@@ -9010,8 +9126,8 @@ function MiniMap({
|
|
|
9010
9126
|
tileAssets,
|
|
9011
9127
|
unitAssets
|
|
9012
9128
|
}) {
|
|
9013
|
-
const canvasRef =
|
|
9014
|
-
const imgCacheRef =
|
|
9129
|
+
const canvasRef = React86.useRef(null);
|
|
9130
|
+
const imgCacheRef = React86.useRef(/* @__PURE__ */ new Map());
|
|
9015
9131
|
function loadImg(url) {
|
|
9016
9132
|
const cached = imgCacheRef.current.get(url);
|
|
9017
9133
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -9027,7 +9143,7 @@ function MiniMap({
|
|
|
9027
9143
|
imgCacheRef.current.set(url, img);
|
|
9028
9144
|
return null;
|
|
9029
9145
|
}
|
|
9030
|
-
|
|
9146
|
+
React86.useEffect(() => {
|
|
9031
9147
|
const canvas = canvasRef.current;
|
|
9032
9148
|
if (!canvas) return;
|
|
9033
9149
|
const ctx = canvas.getContext("2d");
|
|
@@ -10154,7 +10270,7 @@ function proceduralShapes(view, pos, fade, progress) {
|
|
|
10154
10270
|
}
|
|
10155
10271
|
}
|
|
10156
10272
|
}
|
|
10157
|
-
function expandFxItem(view, node, epochNowMs, dim) {
|
|
10273
|
+
function expandFxItem(view, node, epochNowMs, dim, projector, fontFamily) {
|
|
10158
10274
|
if (view.space === "screen") return [];
|
|
10159
10275
|
const tickMs = node.tickMs ?? DEFAULT_TICK_MS;
|
|
10160
10276
|
const { ageMs, progress, fade } = fxLifecycle(view, epochNowMs, tickMs);
|
|
@@ -10190,24 +10306,27 @@ function expandFxItem(view, node, epochNowMs, dim) {
|
|
|
10190
10306
|
out.push(...proceduralShapes(view, pos, fade, progress));
|
|
10191
10307
|
}
|
|
10192
10308
|
if (view.message) {
|
|
10309
|
+
const pxSize = projector && view.size !== void 0 ? Math.max(10, Math.round(view.size * projector.tileWidth)) : void 0;
|
|
10310
|
+
const family = fontFamily ?? "system-ui, sans-serif";
|
|
10193
10311
|
const text = {
|
|
10194
10312
|
type: "draw-text",
|
|
10195
10313
|
text: view.message,
|
|
10196
10314
|
position: pos,
|
|
10197
10315
|
offsetY: -(0.15 + 0.55 * progress),
|
|
10198
10316
|
color: view.color ?? node.textColor ?? DEFAULT_TEXT_COLOR,
|
|
10199
|
-
opacity: fade
|
|
10317
|
+
opacity: fade,
|
|
10318
|
+
font: `bold ${pxSize ?? 14}px ${family}`
|
|
10200
10319
|
};
|
|
10201
10320
|
out.push(text);
|
|
10202
10321
|
}
|
|
10203
10322
|
return out;
|
|
10204
10323
|
}
|
|
10205
|
-
function expandFxLayer(node, epochNowMs, dim) {
|
|
10324
|
+
function expandFxLayer(node, epochNowMs, dim, projector, fontFamily) {
|
|
10206
10325
|
if (!Array.isArray(node.items)) return [];
|
|
10207
10326
|
const out = [];
|
|
10208
10327
|
for (const item of node.items) {
|
|
10209
10328
|
if (!item || typeof item.id !== "string") continue;
|
|
10210
|
-
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim));
|
|
10329
|
+
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector, fontFamily));
|
|
10211
10330
|
}
|
|
10212
10331
|
return out;
|
|
10213
10332
|
}
|
|
@@ -10274,7 +10393,7 @@ function paintDrawable(painter, node, dctx) {
|
|
|
10274
10393
|
break;
|
|
10275
10394
|
case "draw-fx-layer": {
|
|
10276
10395
|
const epochNow = dctx.time > 0 && typeof performance !== "undefined" ? performance.timeOrigin + dctx.time : 0;
|
|
10277
|
-
for (const child of expandFxLayer(node, epochNow, "2d")) paintDrawable(painter, child, dctx);
|
|
10396
|
+
for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector, dctx.fontFamily)) paintDrawable(painter, child, dctx);
|
|
10278
10397
|
break;
|
|
10279
10398
|
}
|
|
10280
10399
|
}
|
|
@@ -10384,7 +10503,7 @@ function Canvas2D({
|
|
|
10384
10503
|
const registerChildDrawable = useCallback((node) => {
|
|
10385
10504
|
childDrawablesRef.current.push(node);
|
|
10386
10505
|
}, []);
|
|
10387
|
-
const hasJsxChildren =
|
|
10506
|
+
const hasJsxChildren = React86.Children.count(children) > 0;
|
|
10388
10507
|
function isDrawableLayer(node) {
|
|
10389
10508
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
10390
10509
|
}
|
|
@@ -10942,7 +11061,7 @@ function Canvas({
|
|
|
10942
11061
|
if (mode !== "3d") return;
|
|
10943
11062
|
const next = childDrawablesRef.current;
|
|
10944
11063
|
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
10945
|
-
if (next.length === 0 &&
|
|
11064
|
+
if (next.length === 0 && React86.Children.count(children) > 0) return;
|
|
10946
11065
|
setChildDrawables(
|
|
10947
11066
|
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
10948
11067
|
);
|
|
@@ -10980,7 +11099,7 @@ function Canvas({
|
|
|
10980
11099
|
};
|
|
10981
11100
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10982
11101
|
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
10983
|
-
|
|
11102
|
+
React86.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
|
|
10984
11103
|
] });
|
|
10985
11104
|
}
|
|
10986
11105
|
return /* @__PURE__ */ jsx(
|
|
@@ -11138,7 +11257,7 @@ function LinearView({
|
|
|
11138
11257
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
11139
11258
|
const isDone = i < currentIdx;
|
|
11140
11259
|
const isCurrent = i === currentIdx;
|
|
11141
|
-
return /* @__PURE__ */ jsxs(
|
|
11260
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
11142
11261
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11143
11262
|
Typography,
|
|
11144
11263
|
{
|
|
@@ -11673,7 +11792,7 @@ function SequenceBar({
|
|
|
11673
11792
|
else onSlotRemove?.(index);
|
|
11674
11793
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
11675
11794
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
11676
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
11795
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
11677
11796
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11678
11797
|
Typography,
|
|
11679
11798
|
{
|
|
@@ -12358,7 +12477,7 @@ var init_LearningCanvas = __esm({
|
|
|
12358
12477
|
if (drawables?.length && projector) {
|
|
12359
12478
|
const painter = createWebPainter(ctx, invalidateRef.current);
|
|
12360
12479
|
const timeMs = needsAnim && typeof performance !== "undefined" ? performance.now() : 0;
|
|
12361
|
-
const dctx = { projector, time: timeMs, invalidate: invalidateRef.current };
|
|
12480
|
+
const dctx = { projector, time: timeMs, invalidate: invalidateRef.current, fontFamily: themeBodyFont(canvas) };
|
|
12362
12481
|
for (const node of drawables) {
|
|
12363
12482
|
paintDrawable(painter, node, dctx);
|
|
12364
12483
|
}
|
|
@@ -12520,7 +12639,7 @@ var init_ErrorBoundary = __esm({
|
|
|
12520
12639
|
}
|
|
12521
12640
|
);
|
|
12522
12641
|
};
|
|
12523
|
-
ErrorBoundary = class extends
|
|
12642
|
+
ErrorBoundary = class extends React86__default.Component {
|
|
12524
12643
|
constructor(props) {
|
|
12525
12644
|
super(props);
|
|
12526
12645
|
__publicField(this, "reset", () => {
|
|
@@ -12789,7 +12908,7 @@ var init_Container = __esm({
|
|
|
12789
12908
|
as: Component = "div"
|
|
12790
12909
|
}) => {
|
|
12791
12910
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
12792
|
-
return
|
|
12911
|
+
return React86__default.createElement(
|
|
12793
12912
|
Component,
|
|
12794
12913
|
{
|
|
12795
12914
|
className: cn(
|
|
@@ -13726,7 +13845,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13726
13845
|
document.addEventListener("mousedown", handleClickOutside);
|
|
13727
13846
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
13728
13847
|
}, [isExpanded, actions]);
|
|
13729
|
-
const
|
|
13848
|
+
const positionClasses2 = {
|
|
13730
13849
|
"bottom-right": "bottom-6 right-6",
|
|
13731
13850
|
"bottom-left": "bottom-6 left-6",
|
|
13732
13851
|
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
@@ -13735,7 +13854,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13735
13854
|
"top-center": "top-6 left-1/2 -translate-x-1/2"
|
|
13736
13855
|
};
|
|
13737
13856
|
if (resolvedAction && (!actions || actions.length === 0)) {
|
|
13738
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50",
|
|
13857
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses2[position], className), children: /* @__PURE__ */ jsx(
|
|
13739
13858
|
Button,
|
|
13740
13859
|
{
|
|
13741
13860
|
variant: resolvedAction.variant || "primary",
|
|
@@ -13763,7 +13882,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13763
13882
|
ref: fabRef,
|
|
13764
13883
|
className: cn(
|
|
13765
13884
|
"fixed z-50 flex flex-col items-end gap-3",
|
|
13766
|
-
|
|
13885
|
+
positionClasses2[position],
|
|
13767
13886
|
position.includes("left") && "items-start",
|
|
13768
13887
|
className
|
|
13769
13888
|
),
|
|
@@ -16699,9 +16818,11 @@ var init_Tabs = __esm({
|
|
|
16699
16818
|
}
|
|
16700
16819
|
};
|
|
16701
16820
|
const handleKeyDown = (e, index) => {
|
|
16702
|
-
|
|
16821
|
+
const prevKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
|
|
16822
|
+
const nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
|
|
16823
|
+
if (e.key === prevKey || e.key === nextKey) {
|
|
16703
16824
|
e.preventDefault();
|
|
16704
|
-
const direction = e.key ===
|
|
16825
|
+
const direction = e.key === prevKey ? -1 : 1;
|
|
16705
16826
|
const nextIndex = (index + direction + safeItems.length) % safeItems.length;
|
|
16706
16827
|
const nextTab = safeItems[nextIndex];
|
|
16707
16828
|
if (nextTab && !nextTab.disabled) {
|
|
@@ -17273,7 +17394,7 @@ var init_CodeBlock = __esm({
|
|
|
17273
17394
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17274
17395
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17275
17396
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17276
|
-
CodeBlock =
|
|
17397
|
+
CodeBlock = React86__default.memo(
|
|
17277
17398
|
({
|
|
17278
17399
|
code: rawCode,
|
|
17279
17400
|
language = "text",
|
|
@@ -17856,14 +17977,77 @@ var init_CodeBlock = __esm({
|
|
|
17856
17977
|
CodeBlock.displayName = "CodeBlock";
|
|
17857
17978
|
}
|
|
17858
17979
|
});
|
|
17980
|
+
function loadMermaid() {
|
|
17981
|
+
mermaidModule ?? (mermaidModule = import('mermaid').then((m) => m.default));
|
|
17982
|
+
return mermaidModule;
|
|
17983
|
+
}
|
|
17984
|
+
var mermaidModule, MermaidDiagram;
|
|
17985
|
+
var init_MermaidDiagram = __esm({
|
|
17986
|
+
"components/core/molecules/markdown/MermaidDiagram.tsx"() {
|
|
17987
|
+
init_Box();
|
|
17988
|
+
init_Typography();
|
|
17989
|
+
init_CodeBlock();
|
|
17990
|
+
init_cn();
|
|
17991
|
+
mermaidModule = null;
|
|
17992
|
+
MermaidDiagram = React86__default.memo(
|
|
17993
|
+
({ code, className }) => {
|
|
17994
|
+
const { resolvedMode } = useTheme();
|
|
17995
|
+
const containerRef = useRef(null);
|
|
17996
|
+
const [error, setError] = useState(null);
|
|
17997
|
+
const reactId = useId();
|
|
17998
|
+
useEffect(() => {
|
|
17999
|
+
let active = true;
|
|
18000
|
+
void (async () => {
|
|
18001
|
+
try {
|
|
18002
|
+
const mermaid = await loadMermaid();
|
|
18003
|
+
mermaid.initialize({
|
|
18004
|
+
startOnLoad: false,
|
|
18005
|
+
securityLevel: "strict",
|
|
18006
|
+
theme: resolvedMode === "dark" ? "dark" : "default"
|
|
18007
|
+
});
|
|
18008
|
+
const domId = `mermaid-${reactId.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
18009
|
+
const { svg } = await mermaid.render(domId, code);
|
|
18010
|
+
if (!active || !containerRef.current) return;
|
|
18011
|
+
containerRef.current.innerHTML = svg;
|
|
18012
|
+
setError(null);
|
|
18013
|
+
} catch (err) {
|
|
18014
|
+
if (active) setError(err instanceof Error ? err.message : String(err));
|
|
18015
|
+
}
|
|
18016
|
+
})();
|
|
18017
|
+
return () => {
|
|
18018
|
+
active = false;
|
|
18019
|
+
};
|
|
18020
|
+
}, [code, resolvedMode, reactId]);
|
|
18021
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("not-prose my-4", className), children: [
|
|
18022
|
+
error !== null && /* @__PURE__ */ jsxs(Box, { className: "space-y-2 mb-2", children: [
|
|
18023
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-error whitespace-pre-wrap", children: error }),
|
|
18024
|
+
/* @__PURE__ */ jsx(CodeBlock, { code, language: "mermaid" })
|
|
18025
|
+
] }),
|
|
18026
|
+
/* @__PURE__ */ jsx(
|
|
18027
|
+
Box,
|
|
18028
|
+
{
|
|
18029
|
+
ref: containerRef,
|
|
18030
|
+
"data-testid": "mermaid-diagram",
|
|
18031
|
+
className: "overflow-x-auto",
|
|
18032
|
+
style: error !== null ? { display: "none" } : void 0
|
|
18033
|
+
}
|
|
18034
|
+
)
|
|
18035
|
+
] });
|
|
18036
|
+
},
|
|
18037
|
+
(prev, next) => prev.code === next.code && prev.className === next.className
|
|
18038
|
+
);
|
|
18039
|
+
MermaidDiagram.displayName = "MermaidDiagram";
|
|
18040
|
+
}
|
|
18041
|
+
});
|
|
17859
18042
|
var MarkdownContent;
|
|
17860
18043
|
var init_MarkdownContent = __esm({
|
|
17861
18044
|
"components/core/molecules/markdown/MarkdownContent.tsx"() {
|
|
17862
18045
|
init_katex_min();
|
|
17863
18046
|
init_Box();
|
|
17864
18047
|
init_CodeBlock();
|
|
18048
|
+
init_MermaidDiagram();
|
|
17865
18049
|
init_cn();
|
|
17866
|
-
MarkdownContent =
|
|
18050
|
+
MarkdownContent = React86__default.memo(
|
|
17867
18051
|
({ content, direction = "ltr", className }) => {
|
|
17868
18052
|
const { t: _t } = useTranslate();
|
|
17869
18053
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -17908,6 +18092,9 @@ var init_MarkdownContent = __esm({
|
|
|
17908
18092
|
if (!inline) {
|
|
17909
18093
|
const match = /language-(\w+)/.exec(codeClassName ?? "");
|
|
17910
18094
|
const code = String(children).replace(/\n$/, "");
|
|
18095
|
+
if (match?.[1] === "mermaid") {
|
|
18096
|
+
return /* @__PURE__ */ jsx(MermaidDiagram, { code });
|
|
18097
|
+
}
|
|
17911
18098
|
if (match) {
|
|
17912
18099
|
return /* @__PURE__ */ jsx(
|
|
17913
18100
|
CodeBlock,
|
|
@@ -19140,7 +19327,7 @@ var init_StateMachineView = __esm({
|
|
|
19140
19327
|
style: { top: title ? 30 : 0 },
|
|
19141
19328
|
children: [
|
|
19142
19329
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19143
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19330
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19144
19331
|
StateNode2,
|
|
19145
19332
|
{
|
|
19146
19333
|
state,
|
|
@@ -25248,7 +25435,7 @@ var init_Menu = __esm({
|
|
|
25248
25435
|
"bottom-end": "bottom-start"
|
|
25249
25436
|
};
|
|
25250
25437
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25251
|
-
const triggerElement =
|
|
25438
|
+
const triggerElement = React86__default.isValidElement(trigger) ? React86__default.cloneElement(trigger, {
|
|
25252
25439
|
ref: triggerRef,
|
|
25253
25440
|
onClick: handleToggle
|
|
25254
25441
|
}) : /* @__PURE__ */ jsx(
|
|
@@ -25351,14 +25538,14 @@ function useDataDnd(args) {
|
|
|
25351
25538
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25352
25539
|
const enabled = isZone || Boolean(dndRoot);
|
|
25353
25540
|
const eventBus = useEventBus();
|
|
25354
|
-
const parentRoot =
|
|
25541
|
+
const parentRoot = React86__default.useContext(RootCtx);
|
|
25355
25542
|
const isRoot = enabled && parentRoot === null;
|
|
25356
|
-
const zoneId =
|
|
25543
|
+
const zoneId = React86__default.useId();
|
|
25357
25544
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25358
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25359
|
-
const optimisticOrdersRef =
|
|
25545
|
+
const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
|
|
25546
|
+
const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
|
|
25360
25547
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25361
|
-
const clearOptimisticOrder =
|
|
25548
|
+
const clearOptimisticOrder = React86__default.useCallback((group) => {
|
|
25362
25549
|
setOptimisticOrders((prev) => {
|
|
25363
25550
|
if (!prev.has(group)) return prev;
|
|
25364
25551
|
const next = new Map(prev);
|
|
@@ -25383,7 +25570,7 @@ function useDataDnd(args) {
|
|
|
25383
25570
|
const raw = it[dndItemIdField];
|
|
25384
25571
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25385
25572
|
}).join("|");
|
|
25386
|
-
const itemIds =
|
|
25573
|
+
const itemIds = React86__default.useMemo(
|
|
25387
25574
|
() => orderedItems.map((it, idx) => {
|
|
25388
25575
|
const raw = it[dndItemIdField];
|
|
25389
25576
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25394,7 +25581,7 @@ function useDataDnd(args) {
|
|
|
25394
25581
|
const raw = it[dndItemIdField];
|
|
25395
25582
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25396
25583
|
}).join("|");
|
|
25397
|
-
|
|
25584
|
+
React86__default.useEffect(() => {
|
|
25398
25585
|
const root = isRoot ? null : parentRoot;
|
|
25399
25586
|
if (root) {
|
|
25400
25587
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25402,20 +25589,20 @@ function useDataDnd(args) {
|
|
|
25402
25589
|
clearOptimisticOrder(ownGroup);
|
|
25403
25590
|
}
|
|
25404
25591
|
}, [itemsContentSig, ownGroup]);
|
|
25405
|
-
const zonesRef =
|
|
25406
|
-
const registerZone =
|
|
25592
|
+
const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
|
|
25593
|
+
const registerZone = React86__default.useCallback((zoneId2, meta2) => {
|
|
25407
25594
|
zonesRef.current.set(zoneId2, meta2);
|
|
25408
25595
|
}, []);
|
|
25409
|
-
const unregisterZone =
|
|
25596
|
+
const unregisterZone = React86__default.useCallback((zoneId2) => {
|
|
25410
25597
|
zonesRef.current.delete(zoneId2);
|
|
25411
25598
|
}, []);
|
|
25412
|
-
const [activeDrag, setActiveDrag] =
|
|
25413
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25414
|
-
const meta =
|
|
25599
|
+
const [activeDrag, setActiveDrag] = React86__default.useState(null);
|
|
25600
|
+
const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
|
|
25601
|
+
const meta = React86__default.useMemo(
|
|
25415
25602
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25416
25603
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25417
25604
|
);
|
|
25418
|
-
|
|
25605
|
+
React86__default.useEffect(() => {
|
|
25419
25606
|
const target = isRoot ? null : parentRoot;
|
|
25420
25607
|
if (!target) {
|
|
25421
25608
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25434,7 +25621,7 @@ function useDataDnd(args) {
|
|
|
25434
25621
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25435
25622
|
const sensors = useAlmadarDndSensors(true);
|
|
25436
25623
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25437
|
-
const findZoneByItem =
|
|
25624
|
+
const findZoneByItem = React86__default.useCallback(
|
|
25438
25625
|
(id) => {
|
|
25439
25626
|
for (const z of zonesRef.current.values()) {
|
|
25440
25627
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25443,7 +25630,7 @@ function useDataDnd(args) {
|
|
|
25443
25630
|
},
|
|
25444
25631
|
[]
|
|
25445
25632
|
);
|
|
25446
|
-
|
|
25633
|
+
React86__default.useCallback(
|
|
25447
25634
|
(group) => {
|
|
25448
25635
|
for (const z of zonesRef.current.values()) {
|
|
25449
25636
|
if (z.group === group) return z;
|
|
@@ -25452,7 +25639,7 @@ function useDataDnd(args) {
|
|
|
25452
25639
|
},
|
|
25453
25640
|
[]
|
|
25454
25641
|
);
|
|
25455
|
-
const handleDragEnd =
|
|
25642
|
+
const handleDragEnd = React86__default.useCallback(
|
|
25456
25643
|
(event) => {
|
|
25457
25644
|
const { active, over } = event;
|
|
25458
25645
|
const activeIdStr = String(active.id);
|
|
@@ -25543,8 +25730,8 @@ function useDataDnd(args) {
|
|
|
25543
25730
|
},
|
|
25544
25731
|
[eventBus]
|
|
25545
25732
|
);
|
|
25546
|
-
const sortableData =
|
|
25547
|
-
const SortableItem =
|
|
25733
|
+
const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25734
|
+
const SortableItem = React86__default.useCallback(
|
|
25548
25735
|
({ id, children }) => {
|
|
25549
25736
|
const {
|
|
25550
25737
|
attributes,
|
|
@@ -25584,7 +25771,7 @@ function useDataDnd(args) {
|
|
|
25584
25771
|
id: droppableId,
|
|
25585
25772
|
data: sortableData
|
|
25586
25773
|
});
|
|
25587
|
-
const ctx =
|
|
25774
|
+
const ctx = React86__default.useContext(RootCtx);
|
|
25588
25775
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25589
25776
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25590
25777
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25599,7 +25786,7 @@ function useDataDnd(args) {
|
|
|
25599
25786
|
showForeignPlaceholder,
|
|
25600
25787
|
ctxAvailable: ctx != null
|
|
25601
25788
|
});
|
|
25602
|
-
|
|
25789
|
+
React86__default.useEffect(() => {
|
|
25603
25790
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25604
25791
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25605
25792
|
return /* @__PURE__ */ jsx(
|
|
@@ -25613,11 +25800,11 @@ function useDataDnd(args) {
|
|
|
25613
25800
|
}
|
|
25614
25801
|
);
|
|
25615
25802
|
};
|
|
25616
|
-
const rootContextValue =
|
|
25803
|
+
const rootContextValue = React86__default.useMemo(
|
|
25617
25804
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25618
25805
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25619
25806
|
);
|
|
25620
|
-
const handleDragStart =
|
|
25807
|
+
const handleDragStart = React86__default.useCallback((event) => {
|
|
25621
25808
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25622
25809
|
const rect = event.active.rect.current.initial;
|
|
25623
25810
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25636,7 +25823,7 @@ function useDataDnd(args) {
|
|
|
25636
25823
|
isRoot
|
|
25637
25824
|
});
|
|
25638
25825
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25639
|
-
const handleDragOver =
|
|
25826
|
+
const handleDragOver = React86__default.useCallback((event) => {
|
|
25640
25827
|
const { active, over } = event;
|
|
25641
25828
|
const overData = over?.data?.current;
|
|
25642
25829
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25706,7 +25893,7 @@ function useDataDnd(args) {
|
|
|
25706
25893
|
return next;
|
|
25707
25894
|
});
|
|
25708
25895
|
}, []);
|
|
25709
|
-
const handleDragCancel =
|
|
25896
|
+
const handleDragCancel = React86__default.useCallback((event) => {
|
|
25710
25897
|
setActiveDrag(null);
|
|
25711
25898
|
setOverZoneGroup(null);
|
|
25712
25899
|
dndLog.warn("dragCancel", {
|
|
@@ -25714,12 +25901,12 @@ function useDataDnd(args) {
|
|
|
25714
25901
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25715
25902
|
});
|
|
25716
25903
|
}, []);
|
|
25717
|
-
const handleDragEndWithCleanup =
|
|
25904
|
+
const handleDragEndWithCleanup = React86__default.useCallback((event) => {
|
|
25718
25905
|
handleDragEnd(event);
|
|
25719
25906
|
setActiveDrag(null);
|
|
25720
25907
|
setOverZoneGroup(null);
|
|
25721
25908
|
}, [handleDragEnd]);
|
|
25722
|
-
const wrapContainer =
|
|
25909
|
+
const wrapContainer = React86__default.useCallback(
|
|
25723
25910
|
(children) => {
|
|
25724
25911
|
if (!enabled) return children;
|
|
25725
25912
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25773,7 +25960,7 @@ var init_useDataDnd = __esm({
|
|
|
25773
25960
|
init_useAlmadarDndCollision();
|
|
25774
25961
|
init_Box();
|
|
25775
25962
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25776
|
-
RootCtx =
|
|
25963
|
+
RootCtx = React86__default.createContext(null);
|
|
25777
25964
|
}
|
|
25778
25965
|
});
|
|
25779
25966
|
function renderIconInput(icon, props) {
|
|
@@ -26288,7 +26475,7 @@ function DataList({
|
|
|
26288
26475
|
}) {
|
|
26289
26476
|
const eventBus = useEventBus();
|
|
26290
26477
|
const { t } = useTranslate();
|
|
26291
|
-
const [visibleCount, setVisibleCount] =
|
|
26478
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
|
|
26292
26479
|
const fieldDefs = fields ?? columns ?? [];
|
|
26293
26480
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26294
26481
|
const dnd = useDataDnd({
|
|
@@ -26304,14 +26491,14 @@ function DataList({
|
|
|
26304
26491
|
dndRoot
|
|
26305
26492
|
});
|
|
26306
26493
|
const orderedData = dnd.orderedItems;
|
|
26307
|
-
const allData =
|
|
26494
|
+
const allData = React86__default.useMemo(
|
|
26308
26495
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
26309
26496
|
[orderedData, sortBy, sortDirection]
|
|
26310
26497
|
);
|
|
26311
26498
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26312
26499
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26313
26500
|
const hasRenderProp = typeof children === "function";
|
|
26314
|
-
|
|
26501
|
+
React86__default.useEffect(() => {
|
|
26315
26502
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26316
26503
|
const childrenTypeOf = typeof children;
|
|
26317
26504
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26431,7 +26618,7 @@ function DataList({
|
|
|
26431
26618
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
26432
26619
|
};
|
|
26433
26620
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
26434
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26621
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
26435
26622
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26436
26623
|
group.items.map((itemData, index) => {
|
|
26437
26624
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26647,7 +26834,7 @@ function DataList({
|
|
|
26647
26834
|
className
|
|
26648
26835
|
),
|
|
26649
26836
|
children: [
|
|
26650
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26837
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
26651
26838
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26652
26839
|
group.items.map(
|
|
26653
26840
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26734,7 +26921,7 @@ var init_FormSection = __esm({
|
|
|
26734
26921
|
columns = 1,
|
|
26735
26922
|
className
|
|
26736
26923
|
}) => {
|
|
26737
|
-
const [collapsed, setCollapsed] =
|
|
26924
|
+
const [collapsed, setCollapsed] = React86__default.useState(defaultCollapsed);
|
|
26738
26925
|
const { t } = useTranslate();
|
|
26739
26926
|
const eventBus = useEventBus();
|
|
26740
26927
|
const gridClass = {
|
|
@@ -26742,7 +26929,7 @@ var init_FormSection = __esm({
|
|
|
26742
26929
|
2: "grid-cols-1 md:grid-cols-2",
|
|
26743
26930
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
26744
26931
|
}[columns];
|
|
26745
|
-
|
|
26932
|
+
React86__default.useCallback(() => {
|
|
26746
26933
|
if (collapsible) {
|
|
26747
26934
|
setCollapsed((prev) => !prev);
|
|
26748
26935
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27040,6 +27227,13 @@ function fileIcon(name) {
|
|
|
27040
27227
|
return "file";
|
|
27041
27228
|
}
|
|
27042
27229
|
}
|
|
27230
|
+
function siblingsOf(target, roots, childrenByParent) {
|
|
27231
|
+
if (target.parentId) {
|
|
27232
|
+
const parentSiblings = childrenByParent.get(target.parentId);
|
|
27233
|
+
if (parentSiblings?.some((sibling) => sibling.id === target.id)) return parentSiblings;
|
|
27234
|
+
}
|
|
27235
|
+
return roots;
|
|
27236
|
+
}
|
|
27043
27237
|
function ancestorsOf(id, byId) {
|
|
27044
27238
|
const out = /* @__PURE__ */ new Set();
|
|
27045
27239
|
if (!id) return out;
|
|
@@ -27057,6 +27251,8 @@ var init_FileTree = __esm({
|
|
|
27057
27251
|
init_Box();
|
|
27058
27252
|
init_Typography();
|
|
27059
27253
|
init_Icon();
|
|
27254
|
+
init_useDraggable();
|
|
27255
|
+
init_useDropZone();
|
|
27060
27256
|
TreeNodeItem = ({
|
|
27061
27257
|
node,
|
|
27062
27258
|
depth,
|
|
@@ -27140,10 +27336,12 @@ var init_FileTree = __esm({
|
|
|
27140
27336
|
depth,
|
|
27141
27337
|
indent,
|
|
27142
27338
|
childrenByParent,
|
|
27339
|
+
roots,
|
|
27143
27340
|
onNodeSelect,
|
|
27144
27341
|
onNodeAction,
|
|
27145
27342
|
nodeActionIcon,
|
|
27146
27343
|
nodeActionLabel,
|
|
27344
|
+
onNodeReorder,
|
|
27147
27345
|
selectedId,
|
|
27148
27346
|
look,
|
|
27149
27347
|
isExpanded,
|
|
@@ -27154,6 +27352,7 @@ var init_FileTree = __esm({
|
|
|
27154
27352
|
const expanded = hasChildren && isExpanded(item.id, depth);
|
|
27155
27353
|
const isSelected = selectedId !== void 0 && selectedId !== "" && item.id === selectedId;
|
|
27156
27354
|
const nav = look === "nav";
|
|
27355
|
+
const rowRef = useRef(null);
|
|
27157
27356
|
const handleClick = useCallback(() => {
|
|
27158
27357
|
if (hasChildren && !onNodeSelect) onToggle(item.id, expanded);
|
|
27159
27358
|
onNodeSelect?.(item.id);
|
|
@@ -27166,16 +27365,50 @@ var init_FileTree = __esm({
|
|
|
27166
27365
|
e.stopPropagation();
|
|
27167
27366
|
onNodeAction?.(item.id);
|
|
27168
27367
|
}, [item.id, onNodeAction]);
|
|
27368
|
+
const { dragProps } = useDraggable({
|
|
27369
|
+
payload: { kind: "tree-node", data: { id: item.id } },
|
|
27370
|
+
disabled: !onNodeReorder
|
|
27371
|
+
});
|
|
27372
|
+
const handleRowDrop = useCallback(
|
|
27373
|
+
(payload, position) => {
|
|
27374
|
+
if (!onNodeReorder) return;
|
|
27375
|
+
const draggedId = typeof payload.data.id === "string" ? payload.data.id : void 0;
|
|
27376
|
+
if (!draggedId || draggedId === item.id) return;
|
|
27377
|
+
const rect = rowRef.current?.getBoundingClientRect();
|
|
27378
|
+
if (!rect || rect.height === 0) return;
|
|
27379
|
+
const relY = position.y - rect.top;
|
|
27380
|
+
const third = rect.height / 3;
|
|
27381
|
+
if (relY >= third && relY <= third * 2) {
|
|
27382
|
+
const existingChildren = childrenByParent.get(item.id);
|
|
27383
|
+
onNodeReorder(draggedId, item.id, existingChildren ? existingChildren.length : 0);
|
|
27384
|
+
return;
|
|
27385
|
+
}
|
|
27386
|
+
const siblings = siblingsOf(item, roots, childrenByParent);
|
|
27387
|
+
const newParentId = siblings === roots ? null : item.parentId ?? null;
|
|
27388
|
+
const targetIndex = siblings.findIndex((sibling) => sibling.id === item.id);
|
|
27389
|
+
const index = relY < third ? targetIndex < 0 ? 0 : targetIndex : targetIndex < 0 ? siblings.length : targetIndex + 1;
|
|
27390
|
+
onNodeReorder(draggedId, newParentId, index);
|
|
27391
|
+
},
|
|
27392
|
+
[onNodeReorder, item, roots, childrenByParent]
|
|
27393
|
+
);
|
|
27394
|
+
const { dropProps } = useDropZone({
|
|
27395
|
+
accepts: ["tree-node"],
|
|
27396
|
+
onDrop: handleRowDrop,
|
|
27397
|
+
disabled: !onNodeReorder
|
|
27398
|
+
});
|
|
27169
27399
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27170
27400
|
/* @__PURE__ */ jsxs(
|
|
27171
27401
|
Box,
|
|
27172
27402
|
{
|
|
27403
|
+
ref: rowRef,
|
|
27173
27404
|
className: `group/treerow flex items-center gap-1.5 px-2 cursor-pointer rounded-sm transition-colors ${nav ? "py-1" : "py-0.5"} ${isSelected ? "bg-primary text-primary-foreground" : nav ? "text-foreground hover:bg-muted" : "hover:bg-muted"}`,
|
|
27174
27405
|
style: { paddingLeft: depth * indent + 8 },
|
|
27175
27406
|
onClick: handleClick,
|
|
27176
27407
|
role: "treeitem",
|
|
27177
27408
|
"aria-selected": isSelected,
|
|
27178
27409
|
"aria-expanded": hasChildren ? expanded : void 0,
|
|
27410
|
+
...dragProps,
|
|
27411
|
+
...dropProps,
|
|
27179
27412
|
children: [
|
|
27180
27413
|
hasChildren ? /* @__PURE__ */ jsx(Box, { onClick: handleChevron, className: "flex items-center flex-shrink-0", role: "button", "aria-label": expanded ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
|
|
27181
27414
|
Icon,
|
|
@@ -27222,10 +27455,12 @@ var init_FileTree = __esm({
|
|
|
27222
27455
|
depth: depth + 1,
|
|
27223
27456
|
indent,
|
|
27224
27457
|
childrenByParent,
|
|
27458
|
+
roots,
|
|
27225
27459
|
onNodeSelect,
|
|
27226
27460
|
onNodeAction,
|
|
27227
27461
|
nodeActionIcon,
|
|
27228
27462
|
nodeActionLabel,
|
|
27463
|
+
onNodeReorder,
|
|
27229
27464
|
selectedId,
|
|
27230
27465
|
look,
|
|
27231
27466
|
isExpanded,
|
|
@@ -27243,14 +27478,15 @@ var init_FileTree = __esm({
|
|
|
27243
27478
|
onNodeAction,
|
|
27244
27479
|
nodeActionIcon,
|
|
27245
27480
|
nodeActionLabel,
|
|
27481
|
+
onNodeReorder,
|
|
27246
27482
|
className,
|
|
27247
27483
|
indent = 16
|
|
27248
27484
|
}) => {
|
|
27249
27485
|
const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
|
|
27250
|
-
const byId =
|
|
27251
|
-
const selectedAncestors =
|
|
27252
|
-
const lastSelectedRef =
|
|
27253
|
-
|
|
27486
|
+
const byId = React86__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
|
|
27487
|
+
const selectedAncestors = React86__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
|
|
27488
|
+
const lastSelectedRef = React86__default.useRef(selectedId);
|
|
27489
|
+
React86__default.useEffect(() => {
|
|
27254
27490
|
if (selectedId === lastSelectedRef.current) return;
|
|
27255
27491
|
lastSelectedRef.current = selectedId;
|
|
27256
27492
|
setOverrides((prev) => {
|
|
@@ -27291,10 +27527,12 @@ var init_FileTree = __esm({
|
|
|
27291
27527
|
depth: 0,
|
|
27292
27528
|
indent,
|
|
27293
27529
|
childrenByParent,
|
|
27530
|
+
roots,
|
|
27294
27531
|
onNodeSelect,
|
|
27295
27532
|
onNodeAction,
|
|
27296
27533
|
nodeActionIcon,
|
|
27297
27534
|
nodeActionLabel,
|
|
27535
|
+
onNodeReorder,
|
|
27298
27536
|
selectedId,
|
|
27299
27537
|
look,
|
|
27300
27538
|
isExpanded,
|
|
@@ -27314,6 +27552,7 @@ var init_FileTree = __esm({
|
|
|
27314
27552
|
onNodeAction,
|
|
27315
27553
|
nodeActionIcon,
|
|
27316
27554
|
nodeActionLabel,
|
|
27555
|
+
onNodeReorder,
|
|
27317
27556
|
className,
|
|
27318
27557
|
indent = 16
|
|
27319
27558
|
}) => {
|
|
@@ -27328,6 +27567,7 @@ var init_FileTree = __esm({
|
|
|
27328
27567
|
onNodeAction,
|
|
27329
27568
|
nodeActionIcon,
|
|
27330
27569
|
nodeActionLabel,
|
|
27570
|
+
onNodeReorder,
|
|
27331
27571
|
className,
|
|
27332
27572
|
indent
|
|
27333
27573
|
}
|
|
@@ -28016,7 +28256,7 @@ var init_Flex = __esm({
|
|
|
28016
28256
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
28017
28257
|
}
|
|
28018
28258
|
}
|
|
28019
|
-
return
|
|
28259
|
+
return React86__default.createElement(Component, {
|
|
28020
28260
|
className: cn(
|
|
28021
28261
|
inline ? "inline-flex" : "flex",
|
|
28022
28262
|
directionStyles[direction],
|
|
@@ -28135,7 +28375,7 @@ var init_Grid = __esm({
|
|
|
28135
28375
|
as: Component = "div"
|
|
28136
28376
|
}) => {
|
|
28137
28377
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
28138
|
-
return
|
|
28378
|
+
return React86__default.createElement(
|
|
28139
28379
|
Component,
|
|
28140
28380
|
{
|
|
28141
28381
|
className: cn(
|
|
@@ -28557,9 +28797,9 @@ var init_Popover = __esm({
|
|
|
28557
28797
|
onMouseLeave: handleClose,
|
|
28558
28798
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
28559
28799
|
};
|
|
28560
|
-
const childElement =
|
|
28800
|
+
const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28561
28801
|
const childPointerDown = childElement.props.onPointerDown;
|
|
28562
|
-
const triggerElement =
|
|
28802
|
+
const triggerElement = React86__default.cloneElement(
|
|
28563
28803
|
childElement,
|
|
28564
28804
|
{
|
|
28565
28805
|
ref: triggerRef,
|
|
@@ -29173,9 +29413,9 @@ var init_Tooltip = __esm({
|
|
|
29173
29413
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
29174
29414
|
};
|
|
29175
29415
|
}, []);
|
|
29176
|
-
const triggerElement =
|
|
29416
|
+
const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29177
29417
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
29178
|
-
const trigger =
|
|
29418
|
+
const trigger = React86__default.cloneElement(triggerElement, {
|
|
29179
29419
|
ref: triggerRef,
|
|
29180
29420
|
onMouseEnter: handleMouseEnter,
|
|
29181
29421
|
onMouseLeave: handleMouseLeave,
|
|
@@ -29265,7 +29505,7 @@ var init_WizardProgress = __esm({
|
|
|
29265
29505
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
29266
29506
|
const isActive = index === currentStep;
|
|
29267
29507
|
const isCompleted = index < currentStep;
|
|
29268
|
-
return /* @__PURE__ */ jsxs(
|
|
29508
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
29269
29509
|
/* @__PURE__ */ jsx(
|
|
29270
29510
|
"button",
|
|
29271
29511
|
{
|
|
@@ -30327,6 +30567,8 @@ var init_MathCanvas = __esm({
|
|
|
30327
30567
|
gridColor = "var(--color-border, #9ca3af)",
|
|
30328
30568
|
axisColor = "var(--color-muted-foreground, #374151)",
|
|
30329
30569
|
showTickLabels = false,
|
|
30570
|
+
tickLabelFontSize = 10,
|
|
30571
|
+
labelFontSize = 12,
|
|
30330
30572
|
showCurveLabels = false,
|
|
30331
30573
|
curves = [],
|
|
30332
30574
|
points = [],
|
|
@@ -30398,18 +30640,18 @@ var init_MathCanvas = __esm({
|
|
|
30398
30640
|
let kx = 0;
|
|
30399
30641
|
for (let x = Math.ceil(xMin / gridStep) * gridStep; x <= xMax; x += gridStep, kx++) {
|
|
30400
30642
|
if (kx % labelEveryX === 0 && x !== 0) {
|
|
30401
|
-
out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize:
|
|
30643
|
+
out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize: tickLabelFontSize, align: "center" });
|
|
30402
30644
|
}
|
|
30403
30645
|
}
|
|
30404
30646
|
const labelEveryY = Math.max(1, Math.ceil((yMax - yMin) / gridStep / Math.floor(plotH / 28)));
|
|
30405
30647
|
let ky = 0;
|
|
30406
30648
|
for (let y = Math.ceil(yMin / gridStep) * gridStep; y <= yMax; y += gridStep, ky++) {
|
|
30407
30649
|
if (ky % labelEveryY === 0 && y !== 0) {
|
|
30408
|
-
out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize:
|
|
30650
|
+
out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
|
|
30409
30651
|
}
|
|
30410
30652
|
}
|
|
30411
30653
|
if (xMin <= 0 && xMax >= 0 && yMin <= 0 && yMax >= 0) {
|
|
30412
|
-
out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize:
|
|
30654
|
+
out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
|
|
30413
30655
|
}
|
|
30414
30656
|
}
|
|
30415
30657
|
for (const region of regions) {
|
|
@@ -30440,7 +30682,7 @@ var init_MathCanvas = __esm({
|
|
|
30440
30682
|
y: (mapY(region.samples[mid].y) + mapY(baseline)) / 2,
|
|
30441
30683
|
text: region.label,
|
|
30442
30684
|
color,
|
|
30443
|
-
fontSize:
|
|
30685
|
+
fontSize: labelFontSize
|
|
30444
30686
|
});
|
|
30445
30687
|
}
|
|
30446
30688
|
}
|
|
@@ -30479,7 +30721,7 @@ var init_MathCanvas = __esm({
|
|
|
30479
30721
|
const py = mapY(guide.at);
|
|
30480
30722
|
out.push({ type: "line", x1: margin, y1: py, x2: width - margin, y2: py, color, dash });
|
|
30481
30723
|
if (guide.label) {
|
|
30482
|
-
out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize:
|
|
30724
|
+
out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize: labelFontSize, align: "right" });
|
|
30483
30725
|
}
|
|
30484
30726
|
}
|
|
30485
30727
|
}
|
|
@@ -30522,7 +30764,7 @@ var init_MathCanvas = __esm({
|
|
|
30522
30764
|
y: mapY(lastInRange.y) - 6,
|
|
30523
30765
|
text: curve.label,
|
|
30524
30766
|
color: curve.color ?? "#2563eb",
|
|
30525
|
-
fontSize:
|
|
30767
|
+
fontSize: labelFontSize
|
|
30526
30768
|
});
|
|
30527
30769
|
}
|
|
30528
30770
|
}
|
|
@@ -30559,7 +30801,7 @@ var init_MathCanvas = __esm({
|
|
|
30559
30801
|
y: xAxisY - peak - 8,
|
|
30560
30802
|
text: hop.label,
|
|
30561
30803
|
color,
|
|
30562
|
-
fontSize:
|
|
30804
|
+
fontSize: labelFontSize,
|
|
30563
30805
|
align: "center"
|
|
30564
30806
|
});
|
|
30565
30807
|
}
|
|
@@ -30586,7 +30828,7 @@ var init_MathCanvas = __esm({
|
|
|
30586
30828
|
y: mapY(angle.y + 1.35 * radius * Math.sin(rad)),
|
|
30587
30829
|
text: angle.label,
|
|
30588
30830
|
color,
|
|
30589
|
-
fontSize:
|
|
30831
|
+
fontSize: labelFontSize,
|
|
30590
30832
|
align: "center"
|
|
30591
30833
|
});
|
|
30592
30834
|
}
|
|
@@ -30603,7 +30845,7 @@ var init_MathCanvas = __esm({
|
|
|
30603
30845
|
fill: isOpen ? "#ffffff" : p.color ?? "#dc2626"
|
|
30604
30846
|
});
|
|
30605
30847
|
if (p.label) {
|
|
30606
|
-
out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize:
|
|
30848
|
+
out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize: labelFontSize });
|
|
30607
30849
|
}
|
|
30608
30850
|
}
|
|
30609
30851
|
for (const v of vectors) {
|
|
@@ -30614,7 +30856,7 @@ var init_MathCanvas = __esm({
|
|
|
30614
30856
|
const y2 = mapY(v.y + v.vy);
|
|
30615
30857
|
out.push({ type: "arrow", x1, y1, x2, y2, color: v.color ?? "#7c3aed", lineWidth: 2 });
|
|
30616
30858
|
if (v.label) {
|
|
30617
|
-
out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize:
|
|
30859
|
+
out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize: labelFontSize });
|
|
30618
30860
|
}
|
|
30619
30861
|
}
|
|
30620
30862
|
out.push(...shapes);
|
|
@@ -30633,6 +30875,8 @@ var init_MathCanvas = __esm({
|
|
|
30633
30875
|
gridColor,
|
|
30634
30876
|
axisColor,
|
|
30635
30877
|
showTickLabels,
|
|
30878
|
+
tickLabelFontSize,
|
|
30879
|
+
labelFontSize,
|
|
30636
30880
|
showCurveLabels,
|
|
30637
30881
|
curves,
|
|
30638
30882
|
points,
|
|
@@ -31920,13 +32164,13 @@ var init_MapView = __esm({
|
|
|
31920
32164
|
shadowSize: [41, 41]
|
|
31921
32165
|
});
|
|
31922
32166
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
31923
|
-
const { useEffect:
|
|
32167
|
+
const { useEffect: useEffect64, useRef: useRef65, useCallback: useCallback92, useState: useState98 } = React86__default;
|
|
31924
32168
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
31925
32169
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
31926
32170
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
31927
32171
|
const map = useMap();
|
|
31928
|
-
const prevRef =
|
|
31929
|
-
|
|
32172
|
+
const prevRef = useRef65({ centerLat, centerLng, zoom });
|
|
32173
|
+
useEffect64(() => {
|
|
31930
32174
|
const prev = prevRef.current;
|
|
31931
32175
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
31932
32176
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -31937,7 +32181,7 @@ var init_MapView = __esm({
|
|
|
31937
32181
|
}
|
|
31938
32182
|
function MapClickHandler({ onMapClick }) {
|
|
31939
32183
|
const map = useMap();
|
|
31940
|
-
|
|
32184
|
+
useEffect64(() => {
|
|
31941
32185
|
if (!onMapClick) return;
|
|
31942
32186
|
const handler = (e) => {
|
|
31943
32187
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -31965,8 +32209,8 @@ var init_MapView = __esm({
|
|
|
31965
32209
|
showAttribution = true
|
|
31966
32210
|
}) {
|
|
31967
32211
|
const eventBus = useEventBus2();
|
|
31968
|
-
const [clickedPosition, setClickedPosition] =
|
|
31969
|
-
const handleMapClick =
|
|
32212
|
+
const [clickedPosition, setClickedPosition] = useState98(null);
|
|
32213
|
+
const handleMapClick = useCallback92((lat, lng) => {
|
|
31970
32214
|
if (showClickedPin) {
|
|
31971
32215
|
setClickedPosition({ lat, lng });
|
|
31972
32216
|
}
|
|
@@ -31975,7 +32219,7 @@ var init_MapView = __esm({
|
|
|
31975
32219
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
31976
32220
|
}
|
|
31977
32221
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
31978
|
-
const handleMarkerClick =
|
|
32222
|
+
const handleMarkerClick = useCallback92((marker) => {
|
|
31979
32223
|
onMarkerClick?.(marker);
|
|
31980
32224
|
if (markerClickEvent) {
|
|
31981
32225
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -32865,8 +33109,8 @@ function TableView({
|
|
|
32865
33109
|
}) {
|
|
32866
33110
|
const eventBus = useEventBus();
|
|
32867
33111
|
const { t } = useTranslate();
|
|
32868
|
-
const [visibleCount, setVisibleCount] =
|
|
32869
|
-
const [localSelected, setLocalSelected] =
|
|
33112
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
33113
|
+
const [localSelected, setLocalSelected] = React86__default.useState(/* @__PURE__ */ new Set());
|
|
32870
33114
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
32871
33115
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
32872
33116
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -32887,7 +33131,7 @@ function TableView({
|
|
|
32887
33131
|
const hasMore = pageSize > 0 && visibleCount < ordered2.length;
|
|
32888
33132
|
const hasRenderProp = typeof children === "function";
|
|
32889
33133
|
const idField = dndItemIdField ?? "id";
|
|
32890
|
-
|
|
33134
|
+
React86__default.useEffect(() => {
|
|
32891
33135
|
tableViewLog.debug("render", {
|
|
32892
33136
|
rowCount: data.length,
|
|
32893
33137
|
colCount: colDefs.length,
|
|
@@ -32937,7 +33181,7 @@ function TableView({
|
|
|
32937
33181
|
};
|
|
32938
33182
|
eventBus.emit(`UI:${rowClickEvent}`, payload);
|
|
32939
33183
|
};
|
|
32940
|
-
const colFloors =
|
|
33184
|
+
const colFloors = React86__default.useMemo(
|
|
32941
33185
|
() => colDefs.map((col) => {
|
|
32942
33186
|
const longest = data.reduce((widest, row) => {
|
|
32943
33187
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -33080,12 +33324,12 @@ function TableView({
|
|
|
33080
33324
|
]
|
|
33081
33325
|
}
|
|
33082
33326
|
);
|
|
33083
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
33327
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React86__default.Fragment, { children: rowInner }, id);
|
|
33084
33328
|
};
|
|
33085
33329
|
const items = Array.from(data);
|
|
33086
33330
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
33087
33331
|
let runningIndex = 0;
|
|
33088
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
33332
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
33089
33333
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
33090
33334
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
33091
33335
|
] }, gi)) });
|
|
@@ -34316,7 +34560,7 @@ var init_StepFlow = __esm({
|
|
|
34316
34560
|
className
|
|
34317
34561
|
}) => {
|
|
34318
34562
|
if (orientation === "vertical") {
|
|
34319
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
34563
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
34320
34564
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
34321
34565
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34322
34566
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -34327,7 +34571,7 @@ var init_StepFlow = __esm({
|
|
|
34327
34571
|
] })
|
|
34328
34572
|
] }) }, index)) });
|
|
34329
34573
|
}
|
|
34330
|
-
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(
|
|
34574
|
+
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(React86__default.Fragment, { children: [
|
|
34331
34575
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
34332
34576
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34333
34577
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -35317,7 +35561,7 @@ var init_LikertScale = __esm({
|
|
|
35317
35561
|
md: "text-base",
|
|
35318
35562
|
lg: "text-lg"
|
|
35319
35563
|
};
|
|
35320
|
-
LikertScale =
|
|
35564
|
+
LikertScale = React86__default.forwardRef(
|
|
35321
35565
|
({
|
|
35322
35566
|
question,
|
|
35323
35567
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -35329,7 +35573,7 @@ var init_LikertScale = __esm({
|
|
|
35329
35573
|
variant = "radios",
|
|
35330
35574
|
className
|
|
35331
35575
|
}, ref) => {
|
|
35332
|
-
const groupId =
|
|
35576
|
+
const groupId = React86__default.useId();
|
|
35333
35577
|
const eventBus = useEventBus();
|
|
35334
35578
|
const handleSelect = useCallback(
|
|
35335
35579
|
(next) => {
|
|
@@ -37752,7 +37996,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
37752
37996
|
"aria-label": t("aria.breadcrumb"),
|
|
37753
37997
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
37754
37998
|
const isLast = idx === items.length - 1;
|
|
37755
|
-
return /* @__PURE__ */ jsxs(
|
|
37999
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
37756
38000
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
37757
38001
|
Icon,
|
|
37758
38002
|
{
|
|
@@ -38621,7 +38865,7 @@ var init_MiniStateMachine = __esm({
|
|
|
38621
38865
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
38622
38866
|
const tc = transitionCounts[s.name] ?? 0;
|
|
38623
38867
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
38624
|
-
return /* @__PURE__ */ jsxs(
|
|
38868
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
38625
38869
|
/* @__PURE__ */ jsx(
|
|
38626
38870
|
AvlState,
|
|
38627
38871
|
{
|
|
@@ -38826,7 +39070,7 @@ var init_PageHeader = __esm({
|
|
|
38826
39070
|
info: "bg-info/10 text-info"
|
|
38827
39071
|
};
|
|
38828
39072
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
38829
|
-
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(
|
|
39073
|
+
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(React86__default.Fragment, { children: [
|
|
38830
39074
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
38831
39075
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
38832
39076
|
"a",
|
|
@@ -39184,7 +39428,7 @@ var init_Section = __esm({
|
|
|
39184
39428
|
as: Component = "section"
|
|
39185
39429
|
}) => {
|
|
39186
39430
|
const hasHeader = title || description || action;
|
|
39187
|
-
return
|
|
39431
|
+
return React86__default.createElement(
|
|
39188
39432
|
Component,
|
|
39189
39433
|
{
|
|
39190
39434
|
className: cn(
|
|
@@ -39558,7 +39802,7 @@ var init_WizardContainer = __esm({
|
|
|
39558
39802
|
const isCompleted = index < currentStep;
|
|
39559
39803
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
39560
39804
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
39561
|
-
return /* @__PURE__ */ jsxs(
|
|
39805
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
39562
39806
|
/* @__PURE__ */ jsx(
|
|
39563
39807
|
Button,
|
|
39564
39808
|
{
|
|
@@ -41345,7 +41589,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
41345
41589
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
41346
41590
|
const summary = fieldSummary(unit);
|
|
41347
41591
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
41348
|
-
return /* @__PURE__ */ jsxs(
|
|
41592
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
41349
41593
|
/* @__PURE__ */ jsxs(
|
|
41350
41594
|
Box,
|
|
41351
41595
|
{
|
|
@@ -41442,7 +41686,7 @@ var init_ImportProgress = __esm({
|
|
|
41442
41686
|
PIPELINE.map((key, index) => {
|
|
41443
41687
|
const isComplete = index < currentIndex;
|
|
41444
41688
|
const isActive = index === currentIndex;
|
|
41445
|
-
return /* @__PURE__ */ jsxs(
|
|
41689
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
41446
41690
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
41447
41691
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
41448
41692
|
/* @__PURE__ */ jsx(
|
|
@@ -41570,6 +41814,69 @@ var init_ReflectionBlock = __esm({
|
|
|
41570
41814
|
ReflectionBlock.displayName = "ReflectionBlock";
|
|
41571
41815
|
}
|
|
41572
41816
|
});
|
|
41817
|
+
var positionClasses, FloatingToolbar;
|
|
41818
|
+
var init_FloatingToolbar = __esm({
|
|
41819
|
+
"components/core/molecules/FloatingToolbar.tsx"() {
|
|
41820
|
+
"use client";
|
|
41821
|
+
init_Button();
|
|
41822
|
+
init_Box();
|
|
41823
|
+
init_Divider();
|
|
41824
|
+
init_Typography();
|
|
41825
|
+
init_ButtonGroup();
|
|
41826
|
+
init_cn();
|
|
41827
|
+
init_useEventBus();
|
|
41828
|
+
positionClasses = {
|
|
41829
|
+
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
41830
|
+
"bottom-left": "bottom-6 left-6",
|
|
41831
|
+
"bottom-right": "bottom-6 right-6"
|
|
41832
|
+
};
|
|
41833
|
+
FloatingToolbar = ({
|
|
41834
|
+
items,
|
|
41835
|
+
position = "bottom-center",
|
|
41836
|
+
children,
|
|
41837
|
+
className
|
|
41838
|
+
}) => {
|
|
41839
|
+
const eventBus = useEventBus();
|
|
41840
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position]), children: /* @__PURE__ */ jsxs(
|
|
41841
|
+
ButtonGroup,
|
|
41842
|
+
{
|
|
41843
|
+
variant: "default",
|
|
41844
|
+
orientation: "horizontal",
|
|
41845
|
+
className: cn(
|
|
41846
|
+
"items-center gap-1 rounded-full border border-border",
|
|
41847
|
+
"bg-card/95 backdrop-blur-sm shadow-elevation-popover p-1",
|
|
41848
|
+
className
|
|
41849
|
+
),
|
|
41850
|
+
children: [
|
|
41851
|
+
items.map((item) => /* @__PURE__ */ jsx(
|
|
41852
|
+
Button,
|
|
41853
|
+
{
|
|
41854
|
+
variant: item.active ? "primary" : "ghost",
|
|
41855
|
+
size: "sm",
|
|
41856
|
+
icon: item.icon,
|
|
41857
|
+
action: item.action,
|
|
41858
|
+
actionPayload: item.actionPayload,
|
|
41859
|
+
disabled: item.disabled,
|
|
41860
|
+
"aria-pressed": item.active,
|
|
41861
|
+
"aria-label": item.label,
|
|
41862
|
+
className: "rounded-full",
|
|
41863
|
+
"data-testid": item.testId ?? `floating-toolbar-item-${item.id}`,
|
|
41864
|
+
onClick: () => {
|
|
41865
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { actionId: item.id });
|
|
41866
|
+
},
|
|
41867
|
+
children: /* @__PURE__ */ jsx(Typography, { as: "span", className: "sr-only", children: item.label })
|
|
41868
|
+
},
|
|
41869
|
+
item.id
|
|
41870
|
+
)),
|
|
41871
|
+
children && items.length > 0 && /* @__PURE__ */ jsx(Divider, { orientation: "vertical", className: "h-6 mx-1" }),
|
|
41872
|
+
children
|
|
41873
|
+
]
|
|
41874
|
+
}
|
|
41875
|
+
) });
|
|
41876
|
+
};
|
|
41877
|
+
FloatingToolbar.displayName = "FloatingToolbar";
|
|
41878
|
+
}
|
|
41879
|
+
});
|
|
41573
41880
|
|
|
41574
41881
|
// components/core/molecules/index.ts
|
|
41575
41882
|
var init_molecules2 = __esm({
|
|
@@ -42320,7 +42627,7 @@ var init_DetailPanel = __esm({
|
|
|
42320
42627
|
}) => {
|
|
42321
42628
|
const eventBus = useEventBus();
|
|
42322
42629
|
const { t } = useTranslate();
|
|
42323
|
-
const [titleDraft, setTitleDraft] =
|
|
42630
|
+
const [titleDraft, setTitleDraft] = React86__default.useState(null);
|
|
42324
42631
|
const isFieldDefArray = (arr) => {
|
|
42325
42632
|
if (!arr || arr.length === 0) return false;
|
|
42326
42633
|
const first = arr[0];
|
|
@@ -42713,8 +43020,224 @@ var init_DetailPanel = __esm({
|
|
|
42713
43020
|
DetailPanel.displayName = "DetailPanel";
|
|
42714
43021
|
}
|
|
42715
43022
|
});
|
|
43023
|
+
var SplitPane;
|
|
43024
|
+
var init_SplitPane = __esm({
|
|
43025
|
+
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
43026
|
+
"use client";
|
|
43027
|
+
init_cn();
|
|
43028
|
+
SplitPane = ({
|
|
43029
|
+
direction = "horizontal",
|
|
43030
|
+
ratio: ratioProp = 50,
|
|
43031
|
+
minSize = 100,
|
|
43032
|
+
resizable = true,
|
|
43033
|
+
left,
|
|
43034
|
+
right,
|
|
43035
|
+
className,
|
|
43036
|
+
leftClassName,
|
|
43037
|
+
rightClassName,
|
|
43038
|
+
onRatioChange
|
|
43039
|
+
}) => {
|
|
43040
|
+
const [uncontrolledRatio, setUncontrolledRatio] = useState(ratioProp);
|
|
43041
|
+
const ratio = onRatioChange ? ratioProp : uncontrolledRatio;
|
|
43042
|
+
const containerRef = useRef(null);
|
|
43043
|
+
const isDragging = useRef(false);
|
|
43044
|
+
const handlePointerDown = useCallback(
|
|
43045
|
+
(e) => {
|
|
43046
|
+
if (!resizable) return;
|
|
43047
|
+
e.preventDefault();
|
|
43048
|
+
isDragging.current = true;
|
|
43049
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
43050
|
+
const handlePointerMove = (ev) => {
|
|
43051
|
+
if (!isDragging.current || !containerRef.current) return;
|
|
43052
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
43053
|
+
let newRatio;
|
|
43054
|
+
if (direction === "horizontal") {
|
|
43055
|
+
const x = ev.clientX - rect.left;
|
|
43056
|
+
newRatio = x / rect.width * 100;
|
|
43057
|
+
} else {
|
|
43058
|
+
const y = ev.clientY - rect.top;
|
|
43059
|
+
newRatio = y / rect.height * 100;
|
|
43060
|
+
}
|
|
43061
|
+
const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
|
|
43062
|
+
const maxRatio = 100 - minRatio;
|
|
43063
|
+
newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
|
|
43064
|
+
if (onRatioChange) {
|
|
43065
|
+
onRatioChange(newRatio);
|
|
43066
|
+
} else {
|
|
43067
|
+
setUncontrolledRatio(newRatio);
|
|
43068
|
+
}
|
|
43069
|
+
};
|
|
43070
|
+
const handlePointerUp = () => {
|
|
43071
|
+
isDragging.current = false;
|
|
43072
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
43073
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
43074
|
+
document.removeEventListener("pointercancel", handlePointerUp);
|
|
43075
|
+
};
|
|
43076
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
43077
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
43078
|
+
document.addEventListener("pointercancel", handlePointerUp);
|
|
43079
|
+
},
|
|
43080
|
+
[direction, minSize, resizable, onRatioChange]
|
|
43081
|
+
);
|
|
43082
|
+
const isHorizontal = direction === "horizontal";
|
|
43083
|
+
return /* @__PURE__ */ jsxs(
|
|
43084
|
+
"div",
|
|
43085
|
+
{
|
|
43086
|
+
ref: containerRef,
|
|
43087
|
+
className: cn(
|
|
43088
|
+
"flex w-full h-full",
|
|
43089
|
+
isHorizontal ? "flex-row" : "flex-col",
|
|
43090
|
+
className
|
|
43091
|
+
),
|
|
43092
|
+
children: [
|
|
43093
|
+
/* @__PURE__ */ jsx(
|
|
43094
|
+
"div",
|
|
43095
|
+
{
|
|
43096
|
+
className: cn("overflow-auto", leftClassName),
|
|
43097
|
+
style: {
|
|
43098
|
+
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
43099
|
+
flexShrink: 0
|
|
43100
|
+
},
|
|
43101
|
+
children: left
|
|
43102
|
+
}
|
|
43103
|
+
),
|
|
43104
|
+
resizable && /* @__PURE__ */ jsx(
|
|
43105
|
+
"div",
|
|
43106
|
+
{
|
|
43107
|
+
onPointerDown: handlePointerDown,
|
|
43108
|
+
className: cn(
|
|
43109
|
+
"flex-shrink-0 bg-border transition-colors touch-none",
|
|
43110
|
+
isHorizontal ? "w-1 cursor-col-resize hover:w-1.5 hover:bg-muted-foreground" : "h-1 cursor-row-resize hover:h-1.5 hover:bg-muted-foreground"
|
|
43111
|
+
)
|
|
43112
|
+
}
|
|
43113
|
+
),
|
|
43114
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
|
|
43115
|
+
]
|
|
43116
|
+
}
|
|
43117
|
+
);
|
|
43118
|
+
};
|
|
43119
|
+
SplitPane.displayName = "SplitPane";
|
|
43120
|
+
}
|
|
43121
|
+
});
|
|
43122
|
+
var DockLayout;
|
|
43123
|
+
var init_DockLayout = __esm({
|
|
43124
|
+
"components/core/organisms/layout/DockLayout.tsx"() {
|
|
43125
|
+
"use client";
|
|
43126
|
+
init_Box();
|
|
43127
|
+
init_Stack();
|
|
43128
|
+
init_cn();
|
|
43129
|
+
init_SplitPane();
|
|
43130
|
+
DockLayout = ({
|
|
43131
|
+
rail,
|
|
43132
|
+
sidebar,
|
|
43133
|
+
main,
|
|
43134
|
+
bottomPanel,
|
|
43135
|
+
statusBar,
|
|
43136
|
+
secondarySidebar,
|
|
43137
|
+
railWidth = 56,
|
|
43138
|
+
secondarySidebarWidth = 280,
|
|
43139
|
+
sidebarCollapsed = false,
|
|
43140
|
+
sidebarWidth = 20,
|
|
43141
|
+
onSidebarWidthChange,
|
|
43142
|
+
sidebarMinSize = 160,
|
|
43143
|
+
bottomPanelCollapsed = false,
|
|
43144
|
+
bottomPanelHeight = 30,
|
|
43145
|
+
onBottomPanelHeightChange,
|
|
43146
|
+
bottomPanelMinSize = 120,
|
|
43147
|
+
secondarySidebarCollapsed = false,
|
|
43148
|
+
className,
|
|
43149
|
+
railClassName,
|
|
43150
|
+
sidebarClassName,
|
|
43151
|
+
mainClassName,
|
|
43152
|
+
bottomPanelClassName,
|
|
43153
|
+
statusBarClassName,
|
|
43154
|
+
secondarySidebarClassName
|
|
43155
|
+
}) => {
|
|
43156
|
+
const showSidebar = Boolean(sidebar) && !sidebarCollapsed;
|
|
43157
|
+
const showBottomPanel = Boolean(bottomPanel) && !bottomPanelCollapsed;
|
|
43158
|
+
const showSecondarySidebar = Boolean(secondarySidebar) && !secondarySidebarCollapsed;
|
|
43159
|
+
const centerRow = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
43160
|
+
/* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 h-full overflow-auto", mainClassName), children: main }),
|
|
43161
|
+
showSecondarySidebar && /* @__PURE__ */ jsx(
|
|
43162
|
+
Box,
|
|
43163
|
+
{
|
|
43164
|
+
className: cn(
|
|
43165
|
+
"flex-shrink-0 h-full overflow-auto border-l border-border",
|
|
43166
|
+
secondarySidebarClassName
|
|
43167
|
+
),
|
|
43168
|
+
style: { width: secondarySidebarWidth },
|
|
43169
|
+
children: secondarySidebar
|
|
43170
|
+
}
|
|
43171
|
+
)
|
|
43172
|
+
] });
|
|
43173
|
+
const sidebarAndCenter = showSidebar ? /* @__PURE__ */ jsx(
|
|
43174
|
+
SplitPane,
|
|
43175
|
+
{
|
|
43176
|
+
direction: "horizontal",
|
|
43177
|
+
ratio: sidebarWidth,
|
|
43178
|
+
onRatioChange: onSidebarWidthChange,
|
|
43179
|
+
minSize: sidebarMinSize,
|
|
43180
|
+
resizable: true,
|
|
43181
|
+
left: /* @__PURE__ */ jsx(Box, { className: cn("h-full overflow-auto", sidebarClassName), children: sidebar }),
|
|
43182
|
+
right: centerRow,
|
|
43183
|
+
className: "flex-1 min-h-0 min-w-0"
|
|
43184
|
+
}
|
|
43185
|
+
) : centerRow;
|
|
43186
|
+
const body = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
43187
|
+
rail && /* @__PURE__ */ jsx(
|
|
43188
|
+
Box,
|
|
43189
|
+
{
|
|
43190
|
+
className: cn(
|
|
43191
|
+
"flex-shrink-0 h-full overflow-auto border-r border-border",
|
|
43192
|
+
railClassName
|
|
43193
|
+
),
|
|
43194
|
+
style: { width: railWidth },
|
|
43195
|
+
children: rail
|
|
43196
|
+
}
|
|
43197
|
+
),
|
|
43198
|
+
sidebarAndCenter
|
|
43199
|
+
] });
|
|
43200
|
+
const bodyPlusBottom = showBottomPanel ? /* @__PURE__ */ jsx(
|
|
43201
|
+
SplitPane,
|
|
43202
|
+
{
|
|
43203
|
+
direction: "vertical",
|
|
43204
|
+
ratio: 100 - bottomPanelHeight,
|
|
43205
|
+
onRatioChange: (topRatio) => onBottomPanelHeightChange?.(100 - topRatio),
|
|
43206
|
+
minSize: bottomPanelMinSize,
|
|
43207
|
+
resizable: true,
|
|
43208
|
+
left: body,
|
|
43209
|
+
right: /* @__PURE__ */ jsx(
|
|
43210
|
+
Box,
|
|
43211
|
+
{
|
|
43212
|
+
className: cn(
|
|
43213
|
+
"h-full overflow-auto border-t border-border",
|
|
43214
|
+
bottomPanelClassName
|
|
43215
|
+
),
|
|
43216
|
+
children: bottomPanel
|
|
43217
|
+
}
|
|
43218
|
+
),
|
|
43219
|
+
className: "flex-1 min-h-0"
|
|
43220
|
+
}
|
|
43221
|
+
) : body;
|
|
43222
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: cn("w-full h-full overflow-hidden", className), children: [
|
|
43223
|
+
bodyPlusBottom,
|
|
43224
|
+
statusBar && /* @__PURE__ */ jsx(
|
|
43225
|
+
Box,
|
|
43226
|
+
{
|
|
43227
|
+
className: cn(
|
|
43228
|
+
"flex-shrink-0 border-t border-border bg-background",
|
|
43229
|
+
statusBarClassName
|
|
43230
|
+
),
|
|
43231
|
+
children: statusBar
|
|
43232
|
+
}
|
|
43233
|
+
)
|
|
43234
|
+
] });
|
|
43235
|
+
};
|
|
43236
|
+
DockLayout.displayName = "DockLayout";
|
|
43237
|
+
}
|
|
43238
|
+
});
|
|
42716
43239
|
function extractTitle(children) {
|
|
42717
|
-
if (!
|
|
43240
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
42718
43241
|
const props = children.props;
|
|
42719
43242
|
if (typeof props.title === "string") {
|
|
42720
43243
|
return props.title;
|
|
@@ -43076,7 +43599,7 @@ var init_Form = __esm({
|
|
|
43076
43599
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
43077
43600
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
43078
43601
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
43079
|
-
const normalizedInitialData =
|
|
43602
|
+
const normalizedInitialData = React86__default.useMemo(() => {
|
|
43080
43603
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
43081
43604
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
43082
43605
|
const merged = entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
@@ -43095,7 +43618,7 @@ var init_Form = __esm({
|
|
|
43095
43618
|
}
|
|
43096
43619
|
return normalized;
|
|
43097
43620
|
}, [entity, initialData]);
|
|
43098
|
-
const entityDerivedFields =
|
|
43621
|
+
const entityDerivedFields = React86__default.useMemo(() => {
|
|
43099
43622
|
if (fields && fields.length > 0) return void 0;
|
|
43100
43623
|
if (!resolvedEntity) return void 0;
|
|
43101
43624
|
return resolvedEntity.fields.map(
|
|
@@ -43116,16 +43639,16 @@ var init_Form = __esm({
|
|
|
43116
43639
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
43117
43640
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
43118
43641
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
43119
|
-
const [formData, setFormData] =
|
|
43642
|
+
const [formData, setFormData] = React86__default.useState(
|
|
43120
43643
|
normalizedInitialData
|
|
43121
43644
|
);
|
|
43122
|
-
const [collapsedSections, setCollapsedSections] =
|
|
43645
|
+
const [collapsedSections, setCollapsedSections] = React86__default.useState(
|
|
43123
43646
|
/* @__PURE__ */ new Set()
|
|
43124
43647
|
);
|
|
43125
|
-
const [submitError, setSubmitError] =
|
|
43126
|
-
const formRef =
|
|
43648
|
+
const [submitError, setSubmitError] = React86__default.useState(null);
|
|
43649
|
+
const formRef = React86__default.useRef(null);
|
|
43127
43650
|
const formMode = props.mode;
|
|
43128
|
-
const mountedRef =
|
|
43651
|
+
const mountedRef = React86__default.useRef(false);
|
|
43129
43652
|
if (!mountedRef.current) {
|
|
43130
43653
|
mountedRef.current = true;
|
|
43131
43654
|
debug("forms", "mount", {
|
|
@@ -43138,7 +43661,7 @@ var init_Form = __esm({
|
|
|
43138
43661
|
});
|
|
43139
43662
|
}
|
|
43140
43663
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
43141
|
-
const evalContext =
|
|
43664
|
+
const evalContext = React86__default.useMemo(
|
|
43142
43665
|
() => ({
|
|
43143
43666
|
formValues: formData,
|
|
43144
43667
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -43147,7 +43670,7 @@ var init_Form = __esm({
|
|
|
43147
43670
|
}),
|
|
43148
43671
|
[formData, externalContext]
|
|
43149
43672
|
);
|
|
43150
|
-
|
|
43673
|
+
React86__default.useEffect(() => {
|
|
43151
43674
|
debug("forms", "initialData-sync", {
|
|
43152
43675
|
mode: formMode,
|
|
43153
43676
|
normalizedInitialData,
|
|
@@ -43158,7 +43681,7 @@ var init_Form = __esm({
|
|
|
43158
43681
|
setFormData(normalizedInitialData);
|
|
43159
43682
|
}
|
|
43160
43683
|
}, [normalizedInitialData]);
|
|
43161
|
-
const processCalculations =
|
|
43684
|
+
const processCalculations = React86__default.useCallback(
|
|
43162
43685
|
(changedFieldId, newFormData) => {
|
|
43163
43686
|
if (!hiddenCalculations.length) return;
|
|
43164
43687
|
const context = {
|
|
@@ -43183,7 +43706,7 @@ var init_Form = __esm({
|
|
|
43183
43706
|
},
|
|
43184
43707
|
[hiddenCalculations, externalContext, eventBus]
|
|
43185
43708
|
);
|
|
43186
|
-
const checkViolations =
|
|
43709
|
+
const checkViolations = React86__default.useCallback(
|
|
43187
43710
|
(changedFieldId, newFormData) => {
|
|
43188
43711
|
if (!violationTriggers.length) return;
|
|
43189
43712
|
const context = {
|
|
@@ -43221,7 +43744,7 @@ var init_Form = __esm({
|
|
|
43221
43744
|
processCalculations(name, newFormData);
|
|
43222
43745
|
checkViolations(name, newFormData);
|
|
43223
43746
|
};
|
|
43224
|
-
const isFieldVisible =
|
|
43747
|
+
const isFieldVisible = React86__default.useCallback(
|
|
43225
43748
|
(fieldName2) => {
|
|
43226
43749
|
const condition = conditionalFields[fieldName2];
|
|
43227
43750
|
if (!condition) return true;
|
|
@@ -43229,7 +43752,7 @@ var init_Form = __esm({
|
|
|
43229
43752
|
},
|
|
43230
43753
|
[conditionalFields, evalContext]
|
|
43231
43754
|
);
|
|
43232
|
-
const isSectionVisible =
|
|
43755
|
+
const isSectionVisible = React86__default.useCallback(
|
|
43233
43756
|
(section) => {
|
|
43234
43757
|
if (!section.condition) return true;
|
|
43235
43758
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -43305,7 +43828,7 @@ var init_Form = __esm({
|
|
|
43305
43828
|
eventBus.emit(`UI:${onCancel}`);
|
|
43306
43829
|
}
|
|
43307
43830
|
};
|
|
43308
|
-
const renderField =
|
|
43831
|
+
const renderField = React86__default.useCallback(
|
|
43309
43832
|
(field) => {
|
|
43310
43833
|
const fieldName2 = field.name || field.field;
|
|
43311
43834
|
if (!fieldName2) return null;
|
|
@@ -43327,7 +43850,7 @@ var init_Form = __esm({
|
|
|
43327
43850
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
43328
43851
|
);
|
|
43329
43852
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
43330
|
-
const normalizedFields =
|
|
43853
|
+
const normalizedFields = React86__default.useMemo(() => {
|
|
43331
43854
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
43332
43855
|
return effectiveFields.map((field) => {
|
|
43333
43856
|
if (typeof field === "string") {
|
|
@@ -43362,7 +43885,7 @@ var init_Form = __esm({
|
|
|
43362
43885
|
};
|
|
43363
43886
|
});
|
|
43364
43887
|
}, [effectiveFields, resolvedEntity, fieldOverrides]);
|
|
43365
|
-
const schemaFields =
|
|
43888
|
+
const schemaFields = React86__default.useMemo(() => {
|
|
43366
43889
|
if (normalizedFields.length === 0) return null;
|
|
43367
43890
|
if (isDebugEnabled()) {
|
|
43368
43891
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -43372,7 +43895,7 @@ var init_Form = __esm({
|
|
|
43372
43895
|
}
|
|
43373
43896
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
43374
43897
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
43375
|
-
const sectionElements =
|
|
43898
|
+
const sectionElements = React86__default.useMemo(() => {
|
|
43376
43899
|
if (!sections || sections.length === 0) return null;
|
|
43377
43900
|
return sections.map((section) => {
|
|
43378
43901
|
if (!isSectionVisible(section)) {
|
|
@@ -44208,7 +44731,7 @@ var init_List = __esm({
|
|
|
44208
44731
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
44209
44732
|
return [];
|
|
44210
44733
|
}, [entity]);
|
|
44211
|
-
const getItemActions =
|
|
44734
|
+
const getItemActions = React86__default.useCallback(
|
|
44212
44735
|
(item) => {
|
|
44213
44736
|
if (!itemActions) return [];
|
|
44214
44737
|
if (typeof itemActions === "function") {
|
|
@@ -44690,7 +45213,7 @@ var init_MediaGallery = __esm({
|
|
|
44690
45213
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
44691
45214
|
);
|
|
44692
45215
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
44693
|
-
const items =
|
|
45216
|
+
const items = React86__default.useMemo(() => {
|
|
44694
45217
|
if (propItems && propItems.length > 0) return propItems;
|
|
44695
45218
|
if (entityData.length === 0) return [];
|
|
44696
45219
|
return entityData.map((record, idx) => {
|
|
@@ -44855,7 +45378,7 @@ var init_MediaGallery = __esm({
|
|
|
44855
45378
|
}
|
|
44856
45379
|
});
|
|
44857
45380
|
function extractTitle2(children) {
|
|
44858
|
-
if (!
|
|
45381
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
44859
45382
|
const props = children.props;
|
|
44860
45383
|
if (typeof props.title === "string") {
|
|
44861
45384
|
return props.title;
|
|
@@ -45129,7 +45652,7 @@ var init_debugRegistry = __esm({
|
|
|
45129
45652
|
}
|
|
45130
45653
|
});
|
|
45131
45654
|
function useDebugData() {
|
|
45132
|
-
const [data, setData] =
|
|
45655
|
+
const [data, setData] = React86.useState(() => ({
|
|
45133
45656
|
traits: [],
|
|
45134
45657
|
ticks: [],
|
|
45135
45658
|
guards: [],
|
|
@@ -45143,7 +45666,7 @@ function useDebugData() {
|
|
|
45143
45666
|
},
|
|
45144
45667
|
lastUpdate: Date.now()
|
|
45145
45668
|
}));
|
|
45146
|
-
|
|
45669
|
+
React86.useEffect(() => {
|
|
45147
45670
|
const updateData = () => {
|
|
45148
45671
|
setData({
|
|
45149
45672
|
traits: getAllTraits(),
|
|
@@ -45252,12 +45775,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
45252
45775
|
return positions;
|
|
45253
45776
|
}
|
|
45254
45777
|
function WalkMinimap() {
|
|
45255
|
-
const [walkStep, setWalkStep] =
|
|
45256
|
-
const [traits2, setTraits] =
|
|
45257
|
-
const [coveredEdges, setCoveredEdges] =
|
|
45258
|
-
const [completedTraits, setCompletedTraits] =
|
|
45259
|
-
const prevTraitRef =
|
|
45260
|
-
|
|
45778
|
+
const [walkStep, setWalkStep] = React86.useState(null);
|
|
45779
|
+
const [traits2, setTraits] = React86.useState([]);
|
|
45780
|
+
const [coveredEdges, setCoveredEdges] = React86.useState([]);
|
|
45781
|
+
const [completedTraits, setCompletedTraits] = React86.useState(/* @__PURE__ */ new Set());
|
|
45782
|
+
const prevTraitRef = React86.useRef(null);
|
|
45783
|
+
React86.useEffect(() => {
|
|
45261
45784
|
const interval = setInterval(() => {
|
|
45262
45785
|
const w = window;
|
|
45263
45786
|
const step = w.__orbitalWalkStep;
|
|
@@ -45693,15 +46216,15 @@ var init_EntitiesTab = __esm({
|
|
|
45693
46216
|
});
|
|
45694
46217
|
function EventFlowTab({ events: events2 }) {
|
|
45695
46218
|
const { t } = useTranslate();
|
|
45696
|
-
const [filter, setFilter] =
|
|
45697
|
-
const containerRef =
|
|
45698
|
-
const [autoScroll, setAutoScroll] =
|
|
45699
|
-
|
|
46219
|
+
const [filter, setFilter] = React86.useState("all");
|
|
46220
|
+
const containerRef = React86.useRef(null);
|
|
46221
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
46222
|
+
React86.useEffect(() => {
|
|
45700
46223
|
if (autoScroll && containerRef.current) {
|
|
45701
46224
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
45702
46225
|
}
|
|
45703
46226
|
}, [events2.length, autoScroll]);
|
|
45704
|
-
const filteredEvents =
|
|
46227
|
+
const filteredEvents = React86.useMemo(() => {
|
|
45705
46228
|
if (filter === "all") return events2;
|
|
45706
46229
|
return events2.filter((e) => e.type === filter);
|
|
45707
46230
|
}, [events2, filter]);
|
|
@@ -45817,7 +46340,7 @@ var init_EventFlowTab = __esm({
|
|
|
45817
46340
|
});
|
|
45818
46341
|
function GuardsPanel({ guards }) {
|
|
45819
46342
|
const { t } = useTranslate();
|
|
45820
|
-
const [filter, setFilter] =
|
|
46343
|
+
const [filter, setFilter] = React86.useState("all");
|
|
45821
46344
|
if (guards.length === 0) {
|
|
45822
46345
|
return /* @__PURE__ */ jsx(
|
|
45823
46346
|
EmptyState,
|
|
@@ -45830,7 +46353,7 @@ function GuardsPanel({ guards }) {
|
|
|
45830
46353
|
}
|
|
45831
46354
|
const passedCount = guards.filter((g) => g.result).length;
|
|
45832
46355
|
const failedCount = guards.length - passedCount;
|
|
45833
|
-
const filteredGuards =
|
|
46356
|
+
const filteredGuards = React86.useMemo(() => {
|
|
45834
46357
|
if (filter === "all") return guards;
|
|
45835
46358
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
45836
46359
|
return guards.filter((g) => !g.result);
|
|
@@ -45993,10 +46516,10 @@ function EffectBadge({ effect }) {
|
|
|
45993
46516
|
}
|
|
45994
46517
|
function TransitionTimeline({ transitions }) {
|
|
45995
46518
|
const { t } = useTranslate();
|
|
45996
|
-
const containerRef =
|
|
45997
|
-
const [autoScroll, setAutoScroll] =
|
|
45998
|
-
const [expandedId, setExpandedId] =
|
|
45999
|
-
|
|
46519
|
+
const containerRef = React86.useRef(null);
|
|
46520
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
46521
|
+
const [expandedId, setExpandedId] = React86.useState(null);
|
|
46522
|
+
React86.useEffect(() => {
|
|
46000
46523
|
if (autoScroll && containerRef.current) {
|
|
46001
46524
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46002
46525
|
}
|
|
@@ -46276,9 +46799,9 @@ function getAllEvents(traits2) {
|
|
|
46276
46799
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
46277
46800
|
const eventBus = useEventBus();
|
|
46278
46801
|
const { t } = useTranslate();
|
|
46279
|
-
const [log9, setLog] =
|
|
46280
|
-
const prevStatesRef =
|
|
46281
|
-
|
|
46802
|
+
const [log9, setLog] = React86.useState([]);
|
|
46803
|
+
const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
|
|
46804
|
+
React86.useEffect(() => {
|
|
46282
46805
|
for (const trait of traits2) {
|
|
46283
46806
|
const prev = prevStatesRef.current.get(trait.id);
|
|
46284
46807
|
if (prev && prev !== trait.currentState) {
|
|
@@ -46447,10 +46970,10 @@ function VerifyModePanel({
|
|
|
46447
46970
|
localCount
|
|
46448
46971
|
}) {
|
|
46449
46972
|
const { t } = useTranslate();
|
|
46450
|
-
const [expanded, setExpanded] =
|
|
46451
|
-
const scrollRef =
|
|
46452
|
-
const prevCountRef =
|
|
46453
|
-
|
|
46973
|
+
const [expanded, setExpanded] = React86.useState(true);
|
|
46974
|
+
const scrollRef = React86.useRef(null);
|
|
46975
|
+
const prevCountRef = React86.useRef(0);
|
|
46976
|
+
React86.useEffect(() => {
|
|
46454
46977
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
46455
46978
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
46456
46979
|
}
|
|
@@ -46507,10 +47030,10 @@ function RuntimeDebugger({
|
|
|
46507
47030
|
schema
|
|
46508
47031
|
}) {
|
|
46509
47032
|
const { t } = useTranslate();
|
|
46510
|
-
const [isCollapsed, setIsCollapsed] =
|
|
46511
|
-
const [isVisible, setIsVisible] =
|
|
47033
|
+
const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
|
|
47034
|
+
const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
46512
47035
|
const debugData = useDebugData();
|
|
46513
|
-
|
|
47036
|
+
React86.useEffect(() => {
|
|
46514
47037
|
if (mode === "inline") return;
|
|
46515
47038
|
return onDebugToggle((enabled) => {
|
|
46516
47039
|
setIsVisible(enabled);
|
|
@@ -46519,7 +47042,7 @@ function RuntimeDebugger({
|
|
|
46519
47042
|
}
|
|
46520
47043
|
});
|
|
46521
47044
|
}, [mode]);
|
|
46522
|
-
|
|
47045
|
+
React86.useEffect(() => {
|
|
46523
47046
|
if (mode === "inline") return;
|
|
46524
47047
|
const handleKeyDown = (e) => {
|
|
46525
47048
|
if (e.key === "`" && isVisible) {
|
|
@@ -46534,7 +47057,7 @@ function RuntimeDebugger({
|
|
|
46534
47057
|
if (!isVisible) {
|
|
46535
47058
|
return null;
|
|
46536
47059
|
}
|
|
46537
|
-
const
|
|
47060
|
+
const positionClasses2 = {
|
|
46538
47061
|
"bottom-right": "bottom-4 right-4",
|
|
46539
47062
|
"bottom-left": "bottom-4 left-4",
|
|
46540
47063
|
"top-right": "top-4 right-4",
|
|
@@ -46663,7 +47186,7 @@ function RuntimeDebugger({
|
|
|
46663
47186
|
className: cn(
|
|
46664
47187
|
"runtime-debugger",
|
|
46665
47188
|
"fixed",
|
|
46666
|
-
|
|
47189
|
+
positionClasses2[position],
|
|
46667
47190
|
isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
|
|
46668
47191
|
className
|
|
46669
47192
|
),
|
|
@@ -46745,6 +47268,7 @@ var init_SegmentRenderer = __esm({
|
|
|
46745
47268
|
"use client";
|
|
46746
47269
|
init_MarkdownContent();
|
|
46747
47270
|
init_CodeBlock();
|
|
47271
|
+
init_MermaidDiagram();
|
|
46748
47272
|
init_QuizBlock();
|
|
46749
47273
|
init_ActivationBlock();
|
|
46750
47274
|
init_ConnectionBlock();
|
|
@@ -46776,6 +47300,9 @@ var init_SegmentRenderer = __esm({
|
|
|
46776
47300
|
return /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `md-${index}`);
|
|
46777
47301
|
}
|
|
46778
47302
|
if (segment.type === "code") {
|
|
47303
|
+
if (segment.language === "mermaid") {
|
|
47304
|
+
return /* @__PURE__ */ jsx(MermaidDiagram, { code: segment.content }, `code-${index}`);
|
|
47305
|
+
}
|
|
46779
47306
|
if (segment.runnable && onRunCodeSimulation) {
|
|
46780
47307
|
return /* @__PURE__ */ jsx(
|
|
46781
47308
|
CodeRunnerPanel,
|
|
@@ -46908,99 +47435,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
46908
47435
|
ShowcaseOrganism.displayName = "ShowcaseOrganism";
|
|
46909
47436
|
}
|
|
46910
47437
|
});
|
|
46911
|
-
var SplitPane;
|
|
46912
|
-
var init_SplitPane = __esm({
|
|
46913
|
-
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
46914
|
-
"use client";
|
|
46915
|
-
init_cn();
|
|
46916
|
-
SplitPane = ({
|
|
46917
|
-
direction = "horizontal",
|
|
46918
|
-
ratio: initialRatio = 50,
|
|
46919
|
-
minSize = 100,
|
|
46920
|
-
resizable = true,
|
|
46921
|
-
left,
|
|
46922
|
-
right,
|
|
46923
|
-
className,
|
|
46924
|
-
leftClassName,
|
|
46925
|
-
rightClassName
|
|
46926
|
-
}) => {
|
|
46927
|
-
const [ratio, setRatio] = useState(initialRatio);
|
|
46928
|
-
const containerRef = useRef(null);
|
|
46929
|
-
const isDragging = useRef(false);
|
|
46930
|
-
const handlePointerDown = useCallback(
|
|
46931
|
-
(e) => {
|
|
46932
|
-
if (!resizable) return;
|
|
46933
|
-
e.preventDefault();
|
|
46934
|
-
isDragging.current = true;
|
|
46935
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
46936
|
-
const handlePointerMove = (ev) => {
|
|
46937
|
-
if (!isDragging.current || !containerRef.current) return;
|
|
46938
|
-
const rect = containerRef.current.getBoundingClientRect();
|
|
46939
|
-
let newRatio;
|
|
46940
|
-
if (direction === "horizontal") {
|
|
46941
|
-
const x = ev.clientX - rect.left;
|
|
46942
|
-
newRatio = x / rect.width * 100;
|
|
46943
|
-
} else {
|
|
46944
|
-
const y = ev.clientY - rect.top;
|
|
46945
|
-
newRatio = y / rect.height * 100;
|
|
46946
|
-
}
|
|
46947
|
-
const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
|
|
46948
|
-
const maxRatio = 100 - minRatio;
|
|
46949
|
-
newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
|
|
46950
|
-
setRatio(newRatio);
|
|
46951
|
-
};
|
|
46952
|
-
const handlePointerUp = () => {
|
|
46953
|
-
isDragging.current = false;
|
|
46954
|
-
document.removeEventListener("pointermove", handlePointerMove);
|
|
46955
|
-
document.removeEventListener("pointerup", handlePointerUp);
|
|
46956
|
-
document.removeEventListener("pointercancel", handlePointerUp);
|
|
46957
|
-
};
|
|
46958
|
-
document.addEventListener("pointermove", handlePointerMove);
|
|
46959
|
-
document.addEventListener("pointerup", handlePointerUp);
|
|
46960
|
-
document.addEventListener("pointercancel", handlePointerUp);
|
|
46961
|
-
},
|
|
46962
|
-
[direction, minSize, resizable]
|
|
46963
|
-
);
|
|
46964
|
-
const isHorizontal = direction === "horizontal";
|
|
46965
|
-
return /* @__PURE__ */ jsxs(
|
|
46966
|
-
"div",
|
|
46967
|
-
{
|
|
46968
|
-
ref: containerRef,
|
|
46969
|
-
className: cn(
|
|
46970
|
-
"flex w-full h-full",
|
|
46971
|
-
isHorizontal ? "flex-row" : "flex-col",
|
|
46972
|
-
className
|
|
46973
|
-
),
|
|
46974
|
-
children: [
|
|
46975
|
-
/* @__PURE__ */ jsx(
|
|
46976
|
-
"div",
|
|
46977
|
-
{
|
|
46978
|
-
className: cn("overflow-auto", leftClassName),
|
|
46979
|
-
style: {
|
|
46980
|
-
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
46981
|
-
flexShrink: 0
|
|
46982
|
-
},
|
|
46983
|
-
children: left
|
|
46984
|
-
}
|
|
46985
|
-
),
|
|
46986
|
-
resizable && /* @__PURE__ */ jsx(
|
|
46987
|
-
"div",
|
|
46988
|
-
{
|
|
46989
|
-
onPointerDown: handlePointerDown,
|
|
46990
|
-
className: cn(
|
|
46991
|
-
"flex-shrink-0 bg-border transition-colors touch-none",
|
|
46992
|
-
isHorizontal ? "w-1 cursor-col-resize hover:w-1.5 hover:bg-muted-foreground" : "h-1 cursor-row-resize hover:h-1.5 hover:bg-muted-foreground"
|
|
46993
|
-
)
|
|
46994
|
-
}
|
|
46995
|
-
),
|
|
46996
|
-
/* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
|
|
46997
|
-
]
|
|
46998
|
-
}
|
|
46999
|
-
);
|
|
47000
|
-
};
|
|
47001
|
-
SplitPane.displayName = "SplitPane";
|
|
47002
|
-
}
|
|
47003
|
-
});
|
|
47004
47438
|
var StatCard;
|
|
47005
47439
|
var init_StatCard = __esm({
|
|
47006
47440
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -47039,7 +47473,7 @@ var init_StatCard = __esm({
|
|
|
47039
47473
|
const labelToUse = propLabel ?? propTitle;
|
|
47040
47474
|
const eventBus = useEventBus();
|
|
47041
47475
|
const { t } = useTranslate();
|
|
47042
|
-
const handleActionClick =
|
|
47476
|
+
const handleActionClick = React86__default.useCallback(() => {
|
|
47043
47477
|
if (action?.event) {
|
|
47044
47478
|
eventBus.emit(`UI:${action.event}`, {});
|
|
47045
47479
|
}
|
|
@@ -47050,7 +47484,7 @@ var init_StatCard = __esm({
|
|
|
47050
47484
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
47051
47485
|
const isLoading = externalLoading ?? false;
|
|
47052
47486
|
const error = externalError;
|
|
47053
|
-
const computeMetricValue =
|
|
47487
|
+
const computeMetricValue = React86__default.useCallback(
|
|
47054
47488
|
(metric, items) => {
|
|
47055
47489
|
if (metric.value !== void 0) {
|
|
47056
47490
|
return metric.value;
|
|
@@ -47089,7 +47523,7 @@ var init_StatCard = __esm({
|
|
|
47089
47523
|
},
|
|
47090
47524
|
[]
|
|
47091
47525
|
);
|
|
47092
|
-
const schemaStats =
|
|
47526
|
+
const schemaStats = React86__default.useMemo(() => {
|
|
47093
47527
|
if (!metrics || metrics.length === 0) return null;
|
|
47094
47528
|
return metrics.map((metric) => ({
|
|
47095
47529
|
label: metric.label,
|
|
@@ -47097,7 +47531,7 @@ var init_StatCard = __esm({
|
|
|
47097
47531
|
format: metric.format
|
|
47098
47532
|
}));
|
|
47099
47533
|
}, [metrics, data, computeMetricValue]);
|
|
47100
|
-
const calculatedTrend =
|
|
47534
|
+
const calculatedTrend = React86__default.useMemo(() => {
|
|
47101
47535
|
if (manualTrend !== void 0) return manualTrend;
|
|
47102
47536
|
if (previousValue === void 0 || currentValue === void 0)
|
|
47103
47537
|
return void 0;
|
|
@@ -47737,8 +48171,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
47737
48171
|
] });
|
|
47738
48172
|
};
|
|
47739
48173
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
47740
|
-
const endRef =
|
|
47741
|
-
|
|
48174
|
+
const endRef = React86__default.useRef(null);
|
|
48175
|
+
React86__default.useEffect(() => {
|
|
47742
48176
|
if (!autoScroll) return;
|
|
47743
48177
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
47744
48178
|
}, [activities.length, autoScroll]);
|
|
@@ -47832,7 +48266,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
47832
48266
|
};
|
|
47833
48267
|
SubagentRichCard = ({ subagent }) => {
|
|
47834
48268
|
const { t } = useTranslate();
|
|
47835
|
-
const activities =
|
|
48269
|
+
const activities = React86__default.useMemo(
|
|
47836
48270
|
() => subagentMessagesToActivities(subagent.messages),
|
|
47837
48271
|
[subagent.messages]
|
|
47838
48272
|
);
|
|
@@ -47909,8 +48343,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
47909
48343
|
] });
|
|
47910
48344
|
};
|
|
47911
48345
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
47912
|
-
const endRef =
|
|
47913
|
-
|
|
48346
|
+
const endRef = React86__default.useRef(null);
|
|
48347
|
+
React86__default.useEffect(() => {
|
|
47914
48348
|
if (!autoScroll) return;
|
|
47915
48349
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
47916
48350
|
}, [messages.length, autoScroll]);
|
|
@@ -48345,7 +48779,7 @@ var init_Timeline = __esm({
|
|
|
48345
48779
|
}) => {
|
|
48346
48780
|
const { t } = useTranslate();
|
|
48347
48781
|
const entityData = entity ?? [];
|
|
48348
|
-
const items =
|
|
48782
|
+
const items = React86__default.useMemo(() => {
|
|
48349
48783
|
if (propItems) return propItems;
|
|
48350
48784
|
if (entityData.length === 0) return [];
|
|
48351
48785
|
return entityData.map((record, idx) => {
|
|
@@ -48447,7 +48881,7 @@ var init_Timeline = __esm({
|
|
|
48447
48881
|
}
|
|
48448
48882
|
});
|
|
48449
48883
|
function extractToastProps(children) {
|
|
48450
|
-
if (!
|
|
48884
|
+
if (!React86__default.isValidElement(children)) {
|
|
48451
48885
|
if (typeof children === "string") {
|
|
48452
48886
|
return { message: children };
|
|
48453
48887
|
}
|
|
@@ -48489,7 +48923,7 @@ var init_ToastSlot = __esm({
|
|
|
48489
48923
|
eventBus.emit(`${prefix}CLOSE`);
|
|
48490
48924
|
};
|
|
48491
48925
|
if (!isVisible) return null;
|
|
48492
|
-
const isCustomContent =
|
|
48926
|
+
const isCustomContent = React86__default.isValidElement(children) && !message;
|
|
48493
48927
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
48494
48928
|
Toast,
|
|
48495
48929
|
{
|
|
@@ -48584,6 +49018,7 @@ var init_component_registry_generated = __esm({
|
|
|
48584
49018
|
init_DocSearch();
|
|
48585
49019
|
init_DocSidebar();
|
|
48586
49020
|
init_DocTOC();
|
|
49021
|
+
init_DockLayout();
|
|
48587
49022
|
init_DocumentDetails();
|
|
48588
49023
|
init_DocumentPanel();
|
|
48589
49024
|
init_DocumentViewer();
|
|
@@ -48614,6 +49049,7 @@ var init_component_registry_generated = __esm({
|
|
|
48614
49049
|
init_FlipCard();
|
|
48615
49050
|
init_FlipContainer();
|
|
48616
49051
|
init_FloatingActionButton();
|
|
49052
|
+
init_FloatingToolbar();
|
|
48617
49053
|
init_Form();
|
|
48618
49054
|
init_FormField();
|
|
48619
49055
|
init_FormSection();
|
|
@@ -48858,6 +49294,7 @@ var init_component_registry_generated = __esm({
|
|
|
48858
49294
|
"DocSearch": DocSearch,
|
|
48859
49295
|
"DocSidebar": DocSidebar,
|
|
48860
49296
|
"DocTOC": DocTOC,
|
|
49297
|
+
"DockLayout": DockLayout,
|
|
48861
49298
|
"DocumentDetails": DocumentDetails,
|
|
48862
49299
|
"DocumentPanel": DocumentPanel,
|
|
48863
49300
|
"DocumentViewer": DocumentViewer,
|
|
@@ -48888,6 +49325,7 @@ var init_component_registry_generated = __esm({
|
|
|
48888
49325
|
"FlipCard": FlipCard,
|
|
48889
49326
|
"FlipContainer": FlipContainer,
|
|
48890
49327
|
"FloatingActionButton": FloatingActionButton,
|
|
49328
|
+
"FloatingToolbar": FloatingToolbar,
|
|
48891
49329
|
"Form": Form,
|
|
48892
49330
|
"FormField": FormField,
|
|
48893
49331
|
"FormLayout": FormLayout,
|
|
@@ -49075,7 +49513,7 @@ function SuspenseConfigProvider({
|
|
|
49075
49513
|
config,
|
|
49076
49514
|
children
|
|
49077
49515
|
}) {
|
|
49078
|
-
return
|
|
49516
|
+
return React86__default.createElement(
|
|
49079
49517
|
SuspenseConfigContext.Provider,
|
|
49080
49518
|
{ value: config },
|
|
49081
49519
|
children
|
|
@@ -49123,7 +49561,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
49123
49561
|
}
|
|
49124
49562
|
return { name: field, label: humanizeFieldName(field) };
|
|
49125
49563
|
}
|
|
49126
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
49564
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React86__default.isValidElement(field) && !(field instanceof Date)) {
|
|
49127
49565
|
const obj = field;
|
|
49128
49566
|
const fieldName2 = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
49129
49567
|
if (!fieldName2) return field;
|
|
@@ -49176,7 +49614,7 @@ function enrichDetailFields(fields, entityDef) {
|
|
|
49176
49614
|
const meta = metaFor(field);
|
|
49177
49615
|
return meta ? { key: field, ...meta } : field;
|
|
49178
49616
|
}
|
|
49179
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
49617
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React86__default.isValidElement(field) && !(field instanceof Date)) {
|
|
49180
49618
|
const obj = field;
|
|
49181
49619
|
const fieldName2 = typeof obj.key === "string" ? obj.key : typeof obj.name === "string" ? obj.name : void 0;
|
|
49182
49620
|
if (!fieldName2 || obj.type) return field;
|
|
@@ -49635,7 +50073,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
49635
50073
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
49636
50074
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
49637
50075
|
}
|
|
49638
|
-
return /* @__PURE__ */ jsx(
|
|
50076
|
+
return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
49639
50077
|
}
|
|
49640
50078
|
if (!child || typeof child !== "object") return null;
|
|
49641
50079
|
const childId = `${parentId}-${index}`;
|
|
@@ -49692,7 +50130,7 @@ function isPatternConfig(value) {
|
|
|
49692
50130
|
if (value === null || value === void 0) return false;
|
|
49693
50131
|
if (typeof value !== "object") return false;
|
|
49694
50132
|
if (Array.isArray(value)) return false;
|
|
49695
|
-
if (
|
|
50133
|
+
if (React86__default.isValidElement(value)) return false;
|
|
49696
50134
|
if (value instanceof Date) return false;
|
|
49697
50135
|
if (typeof value === "function") return false;
|
|
49698
50136
|
const record = value;
|
|
@@ -49705,9 +50143,9 @@ function renderPatternValue(value) {
|
|
|
49705
50143
|
if (typeof value === "string") return renderPatternChildren(value, () => {
|
|
49706
50144
|
});
|
|
49707
50145
|
if (value instanceof Date) return value.toLocaleString();
|
|
49708
|
-
if (
|
|
50146
|
+
if (React86__default.isValidElement(value)) return value;
|
|
49709
50147
|
if (Array.isArray(value)) {
|
|
49710
|
-
return value.map((item, index) => /* @__PURE__ */ jsx(
|
|
50148
|
+
return value.map((item, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderPatternValue(item) }, index));
|
|
49711
50149
|
}
|
|
49712
50150
|
if (isPatternConfig(value)) {
|
|
49713
50151
|
const { type, ...props } = value;
|
|
@@ -49717,7 +50155,7 @@ function renderPatternValue(value) {
|
|
|
49717
50155
|
return null;
|
|
49718
50156
|
}
|
|
49719
50157
|
function isPlainConfigObject(value) {
|
|
49720
|
-
if (
|
|
50158
|
+
if (React86__default.isValidElement(value)) return false;
|
|
49721
50159
|
if (value instanceof Date) return false;
|
|
49722
50160
|
const proto = Object.getPrototypeOf(value);
|
|
49723
50161
|
return proto === Object.prototype || proto === null;
|
|
@@ -49891,7 +50329,7 @@ function SlotContentRenderer({
|
|
|
49891
50329
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
49892
50330
|
const slotVal = restProps[slotKey];
|
|
49893
50331
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
49894
|
-
if (
|
|
50332
|
+
if (React86__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
49895
50333
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
49896
50334
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
49897
50335
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -49945,7 +50383,7 @@ function SlotContentRenderer({
|
|
|
49945
50383
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
49946
50384
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
49947
50385
|
const sample = resolvedItems[0];
|
|
49948
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
50386
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React86__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
49949
50387
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
49950
50388
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
49951
50389
|
}
|
|
@@ -50338,7 +50776,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
50338
50776
|
}
|
|
50339
50777
|
return substituted;
|
|
50340
50778
|
}
|
|
50341
|
-
if (body !== null && typeof body === "object" && !
|
|
50779
|
+
if (body !== null && typeof body === "object" && !React86__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
50342
50780
|
const out = {};
|
|
50343
50781
|
for (const [k, v] of Object.entries(body)) {
|
|
50344
50782
|
out[k] = recur(v);
|
|
@@ -50371,7 +50809,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
50371
50809
|
}
|
|
50372
50810
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
50373
50811
|
}
|
|
50374
|
-
if (value !== null && typeof value === "object" && !
|
|
50812
|
+
if (value !== null && typeof value === "object" && !React86__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
50375
50813
|
const out = {};
|
|
50376
50814
|
for (const [k, v] of Object.entries(value)) {
|
|
50377
50815
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -50385,7 +50823,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
50385
50823
|
const resolvedBody = deferLambdaEntityExprs(
|
|
50386
50824
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
50387
50825
|
);
|
|
50388
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
50826
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React86__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
50389
50827
|
return null;
|
|
50390
50828
|
}
|
|
50391
50829
|
const record = resolvedBody;
|
|
@@ -50404,7 +50842,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
50404
50842
|
props: childProps,
|
|
50405
50843
|
priority: 0
|
|
50406
50844
|
};
|
|
50407
|
-
return
|
|
50845
|
+
return React86__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
50408
50846
|
};
|
|
50409
50847
|
}
|
|
50410
50848
|
function convertNode(node, callerKey) {
|
|
@@ -50424,7 +50862,7 @@ function convertNode(node, callerKey) {
|
|
|
50424
50862
|
});
|
|
50425
50863
|
return anyChanged ? mapped : node;
|
|
50426
50864
|
}
|
|
50427
|
-
if (typeof node === "object" && !
|
|
50865
|
+
if (typeof node === "object" && !React86__default.isValidElement(node) && !(node instanceof Date)) {
|
|
50428
50866
|
return convertObjectProps(node);
|
|
50429
50867
|
}
|
|
50430
50868
|
return node;
|