@almadar/ui 6.3.0 → 6.5.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 +2461 -1553
- package/dist/avl/index.d.cts +206 -17
- package/dist/avl/index.d.ts +206 -17
- package/dist/avl/index.js +1445 -540
- package/dist/components/index.cjs +2035 -1489
- package/dist/components/index.d.cts +197 -1
- package/dist/components/index.d.ts +197 -1
- package/dist/components/index.js +1037 -490
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.js +2 -0
- package/dist/lib/drawable/three/index.cjs +4 -3
- package/dist/lib/drawable/three/index.js +4 -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 +1957 -1319
- package/dist/providers/index.d.cts +4 -1
- package/dist/providers/index.d.ts +4 -1
- package/dist/providers/index.js +1018 -380
- package/dist/runtime/index.cjs +1922 -1284
- package/dist/runtime/index.js +1022 -384
- package/locales/ar.json +2 -0
- package/locales/en.json +2 -0
- package/locales/sl.json +2 -0
- package/package.json +4 -3
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React87 from 'react';
|
|
2
|
+
import React87__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 (React87__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" && !React87__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" && !React87__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 = React87__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 React87__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 = React87__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] = React87.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] = React87.useReducer((x) => x + 1, 0);
|
|
1634
|
+
const canvasRef = React87.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
|
+
React87.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 (React87__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 = React87__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 = React87__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 React87__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 = React87__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 = React87__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 = React87__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 = React87__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] = React87__default.useState(value);
|
|
3784
|
+
const pendingEchoRef = React87__default.useRef(/* @__PURE__ */ new Set());
|
|
3785
|
+
React87__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 = React87__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 = React87__default.forwardRef(
|
|
3875
3980
|
({ className, error, onChange, ...props }, ref) => {
|
|
3876
3981
|
const eventBus = useEventBus();
|
|
3877
3982
|
const handleChange = (e) => {
|
|
@@ -4121,7 +4226,7 @@ var init_Select = __esm({
|
|
|
4121
4226
|
init_cn();
|
|
4122
4227
|
init_Icon();
|
|
4123
4228
|
init_useEventBus();
|
|
4124
|
-
Select =
|
|
4229
|
+
Select = React87__default.forwardRef(
|
|
4125
4230
|
(props, _ref) => {
|
|
4126
4231
|
const { multiple, searchable, clearable } = props;
|
|
4127
4232
|
if (multiple || searchable || clearable) {
|
|
@@ -4138,7 +4243,7 @@ var init_Checkbox = __esm({
|
|
|
4138
4243
|
"components/core/atoms/Checkbox.tsx"() {
|
|
4139
4244
|
init_cn();
|
|
4140
4245
|
init_useEventBus();
|
|
4141
|
-
Checkbox =
|
|
4246
|
+
Checkbox = React87__default.forwardRef(
|
|
4142
4247
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
4143
4248
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
4144
4249
|
const eventBus = useEventBus();
|
|
@@ -4192,7 +4297,7 @@ var init_Spinner = __esm({
|
|
|
4192
4297
|
md: "h-6 w-6",
|
|
4193
4298
|
lg: "h-8 w-8"
|
|
4194
4299
|
};
|
|
4195
|
-
Spinner =
|
|
4300
|
+
Spinner = React87__default.forwardRef(
|
|
4196
4301
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4197
4302
|
if (overlay) {
|
|
4198
4303
|
return /* @__PURE__ */ jsx(
|
|
@@ -4282,7 +4387,7 @@ var init_Card = __esm({
|
|
|
4282
4387
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4283
4388
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4284
4389
|
};
|
|
4285
|
-
Card =
|
|
4390
|
+
Card = React87__default.forwardRef(
|
|
4286
4391
|
({
|
|
4287
4392
|
className,
|
|
4288
4393
|
variant = "bordered",
|
|
@@ -4331,9 +4436,9 @@ var init_Card = __esm({
|
|
|
4331
4436
|
}
|
|
4332
4437
|
);
|
|
4333
4438
|
Card.displayName = "Card";
|
|
4334
|
-
CardHeader =
|
|
4439
|
+
CardHeader = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4335
4440
|
CardHeader.displayName = "CardHeader";
|
|
4336
|
-
CardTitle =
|
|
4441
|
+
CardTitle = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4337
4442
|
"h3",
|
|
4338
4443
|
{
|
|
4339
4444
|
ref,
|
|
@@ -4346,11 +4451,11 @@ var init_Card = __esm({
|
|
|
4346
4451
|
}
|
|
4347
4452
|
));
|
|
4348
4453
|
CardTitle.displayName = "CardTitle";
|
|
4349
|
-
CardContent =
|
|
4454
|
+
CardContent = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4350
4455
|
CardContent.displayName = "CardContent";
|
|
4351
4456
|
CardBody = CardContent;
|
|
4352
4457
|
CardBody.displayName = "CardBody";
|
|
4353
|
-
CardFooter =
|
|
4458
|
+
CardFooter = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4354
4459
|
"div",
|
|
4355
4460
|
{
|
|
4356
4461
|
ref,
|
|
@@ -4437,7 +4542,7 @@ var init_FilterPill = __esm({
|
|
|
4437
4542
|
md: "w-3.5 h-3.5",
|
|
4438
4543
|
lg: "w-4 h-4"
|
|
4439
4544
|
};
|
|
4440
|
-
FilterPill =
|
|
4545
|
+
FilterPill = React87__default.forwardRef(
|
|
4441
4546
|
({
|
|
4442
4547
|
className,
|
|
4443
4548
|
variant = "default",
|
|
@@ -4566,8 +4671,8 @@ var init_Avatar = __esm({
|
|
|
4566
4671
|
actionPayload
|
|
4567
4672
|
}) => {
|
|
4568
4673
|
const eventBus = useEventBus();
|
|
4569
|
-
const [imgFailed, setImgFailed] =
|
|
4570
|
-
|
|
4674
|
+
const [imgFailed, setImgFailed] = React87__default.useState(false);
|
|
4675
|
+
React87__default.useEffect(() => {
|
|
4571
4676
|
setImgFailed(false);
|
|
4572
4677
|
}, [src]);
|
|
4573
4678
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4680,7 +4785,7 @@ var init_Center = __esm({
|
|
|
4680
4785
|
as: Component = "div"
|
|
4681
4786
|
}) => {
|
|
4682
4787
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4683
|
-
return
|
|
4788
|
+
return React87__default.createElement(Component, {
|
|
4684
4789
|
className: cn(
|
|
4685
4790
|
inline ? "inline-flex" : "flex",
|
|
4686
4791
|
horizontal && "justify-center",
|
|
@@ -4948,7 +5053,7 @@ var init_Radio = __esm({
|
|
|
4948
5053
|
md: "w-2.5 h-2.5",
|
|
4949
5054
|
lg: "w-3 h-3"
|
|
4950
5055
|
};
|
|
4951
|
-
Radio =
|
|
5056
|
+
Radio = React87__default.forwardRef(
|
|
4952
5057
|
({
|
|
4953
5058
|
label,
|
|
4954
5059
|
helperText,
|
|
@@ -4965,12 +5070,12 @@ var init_Radio = __esm({
|
|
|
4965
5070
|
onChange,
|
|
4966
5071
|
...props
|
|
4967
5072
|
}, ref) => {
|
|
4968
|
-
const reactId =
|
|
5073
|
+
const reactId = React87__default.useId();
|
|
4969
5074
|
const baseId = id || `radio-${reactId}`;
|
|
4970
5075
|
const hasError = !!error;
|
|
4971
5076
|
const eventBus = useEventBus();
|
|
4972
|
-
const [selected, setSelected] =
|
|
4973
|
-
|
|
5077
|
+
const [selected, setSelected] = React87__default.useState(value);
|
|
5078
|
+
React87__default.useEffect(() => {
|
|
4974
5079
|
if (value !== void 0) setSelected(value);
|
|
4975
5080
|
}, [value]);
|
|
4976
5081
|
const pick = (next, e) => {
|
|
@@ -5152,7 +5257,7 @@ var init_Switch = __esm({
|
|
|
5152
5257
|
"components/core/atoms/Switch.tsx"() {
|
|
5153
5258
|
"use client";
|
|
5154
5259
|
init_cn();
|
|
5155
|
-
Switch =
|
|
5260
|
+
Switch = React87.forwardRef(
|
|
5156
5261
|
({
|
|
5157
5262
|
checked,
|
|
5158
5263
|
defaultChecked = false,
|
|
@@ -5163,10 +5268,10 @@ var init_Switch = __esm({
|
|
|
5163
5268
|
name,
|
|
5164
5269
|
className
|
|
5165
5270
|
}, ref) => {
|
|
5166
|
-
const [isChecked, setIsChecked] =
|
|
5271
|
+
const [isChecked, setIsChecked] = React87.useState(
|
|
5167
5272
|
checked !== void 0 ? checked : defaultChecked
|
|
5168
5273
|
);
|
|
5169
|
-
|
|
5274
|
+
React87.useEffect(() => {
|
|
5170
5275
|
if (checked !== void 0) {
|
|
5171
5276
|
setIsChecked(checked);
|
|
5172
5277
|
}
|
|
@@ -5329,7 +5434,7 @@ var init_Stack = __esm({
|
|
|
5329
5434
|
};
|
|
5330
5435
|
const isHorizontal = direction === "horizontal";
|
|
5331
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";
|
|
5332
|
-
return
|
|
5437
|
+
return React87__default.createElement(
|
|
5333
5438
|
Component,
|
|
5334
5439
|
{
|
|
5335
5440
|
className: cn(
|
|
@@ -5529,7 +5634,7 @@ var Aside;
|
|
|
5529
5634
|
var init_Aside = __esm({
|
|
5530
5635
|
"components/core/atoms/Aside.tsx"() {
|
|
5531
5636
|
init_cn();
|
|
5532
|
-
Aside =
|
|
5637
|
+
Aside = React87__default.forwardRef(
|
|
5533
5638
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5534
5639
|
);
|
|
5535
5640
|
Aside.displayName = "Aside";
|
|
@@ -5608,9 +5713,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5608
5713
|
className
|
|
5609
5714
|
}) => {
|
|
5610
5715
|
const { t } = useTranslate();
|
|
5611
|
-
const [isVisible, setIsVisible] =
|
|
5612
|
-
const timeoutRef =
|
|
5613
|
-
const triggerRef =
|
|
5716
|
+
const [isVisible, setIsVisible] = React87__default.useState(false);
|
|
5717
|
+
const timeoutRef = React87__default.useRef(null);
|
|
5718
|
+
const triggerRef = React87__default.useRef(null);
|
|
5614
5719
|
const handleMouseEnter = () => {
|
|
5615
5720
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5616
5721
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5621,7 +5726,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5621
5726
|
};
|
|
5622
5727
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5623
5728
|
const open = isVisible || revealed;
|
|
5624
|
-
|
|
5729
|
+
React87__default.useEffect(() => {
|
|
5625
5730
|
return () => {
|
|
5626
5731
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5627
5732
|
};
|
|
@@ -5831,7 +5936,7 @@ var init_StatusDot = __esm({
|
|
|
5831
5936
|
md: "w-2.5 h-2.5",
|
|
5832
5937
|
lg: "w-3 h-3"
|
|
5833
5938
|
};
|
|
5834
|
-
StatusDot =
|
|
5939
|
+
StatusDot = React87__default.forwardRef(
|
|
5835
5940
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5836
5941
|
return /* @__PURE__ */ jsx(
|
|
5837
5942
|
"span",
|
|
@@ -5885,7 +5990,7 @@ var init_TrendIndicator = __esm({
|
|
|
5885
5990
|
down: "trending-down",
|
|
5886
5991
|
flat: "arrow-right"
|
|
5887
5992
|
};
|
|
5888
|
-
TrendIndicator =
|
|
5993
|
+
TrendIndicator = React87__default.forwardRef(
|
|
5889
5994
|
({
|
|
5890
5995
|
className,
|
|
5891
5996
|
value,
|
|
@@ -5954,7 +6059,7 @@ var init_RangeSlider = __esm({
|
|
|
5954
6059
|
md: "w-4 h-4",
|
|
5955
6060
|
lg: "w-5 h-5"
|
|
5956
6061
|
};
|
|
5957
|
-
RangeSlider =
|
|
6062
|
+
RangeSlider = React87__default.forwardRef(
|
|
5958
6063
|
({
|
|
5959
6064
|
className,
|
|
5960
6065
|
min = 0,
|
|
@@ -6576,7 +6681,7 @@ var init_ContentSection = __esm({
|
|
|
6576
6681
|
md: "py-16",
|
|
6577
6682
|
lg: "py-24"
|
|
6578
6683
|
};
|
|
6579
|
-
ContentSection =
|
|
6684
|
+
ContentSection = React87__default.forwardRef(
|
|
6580
6685
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6581
6686
|
return /* @__PURE__ */ jsx(
|
|
6582
6687
|
Box,
|
|
@@ -7110,7 +7215,7 @@ var init_AnimatedReveal = __esm({
|
|
|
7110
7215
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
7111
7216
|
"none": {}
|
|
7112
7217
|
};
|
|
7113
|
-
AnimatedReveal =
|
|
7218
|
+
AnimatedReveal = React87__default.forwardRef(
|
|
7114
7219
|
({
|
|
7115
7220
|
trigger = "scroll",
|
|
7116
7221
|
animation = "fade-up",
|
|
@@ -7270,7 +7375,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7270
7375
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7271
7376
|
"use client";
|
|
7272
7377
|
init_cn();
|
|
7273
|
-
AnimatedGraphic =
|
|
7378
|
+
AnimatedGraphic = React87__default.forwardRef(
|
|
7274
7379
|
({
|
|
7275
7380
|
src,
|
|
7276
7381
|
svgContent,
|
|
@@ -7293,7 +7398,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7293
7398
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7294
7399
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7295
7400
|
const prevAnimateRef = useRef(animate);
|
|
7296
|
-
const setRef =
|
|
7401
|
+
const setRef = React87__default.useCallback(
|
|
7297
7402
|
(node) => {
|
|
7298
7403
|
containerRef.current = node;
|
|
7299
7404
|
if (typeof ref === "function") ref(node);
|
|
@@ -8045,9 +8150,9 @@ function ControlButton({
|
|
|
8045
8150
|
className
|
|
8046
8151
|
}) {
|
|
8047
8152
|
const eventBus = useEventBus();
|
|
8048
|
-
const [isPressed, setIsPressed] =
|
|
8153
|
+
const [isPressed, setIsPressed] = React87.useState(false);
|
|
8049
8154
|
const actualPressed = pressed ?? isPressed;
|
|
8050
|
-
const handlePointerDown =
|
|
8155
|
+
const handlePointerDown = React87.useCallback(
|
|
8051
8156
|
(e) => {
|
|
8052
8157
|
e.preventDefault();
|
|
8053
8158
|
if (disabled) return;
|
|
@@ -8057,7 +8162,7 @@ function ControlButton({
|
|
|
8057
8162
|
},
|
|
8058
8163
|
[disabled, pressEvent, eventBus, onPress]
|
|
8059
8164
|
);
|
|
8060
|
-
const handlePointerUp =
|
|
8165
|
+
const handlePointerUp = React87.useCallback(
|
|
8061
8166
|
(e) => {
|
|
8062
8167
|
e.preventDefault();
|
|
8063
8168
|
if (disabled) return;
|
|
@@ -8067,7 +8172,7 @@ function ControlButton({
|
|
|
8067
8172
|
},
|
|
8068
8173
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8069
8174
|
);
|
|
8070
|
-
const handlePointerLeave =
|
|
8175
|
+
const handlePointerLeave = React87.useCallback(
|
|
8071
8176
|
(e) => {
|
|
8072
8177
|
if (isPressed) {
|
|
8073
8178
|
setIsPressed(false);
|
|
@@ -8326,18 +8431,18 @@ function ControlGrid({
|
|
|
8326
8431
|
className
|
|
8327
8432
|
}) {
|
|
8328
8433
|
const eventBus = useEventBus();
|
|
8329
|
-
const [active, setActive] =
|
|
8330
|
-
const [coarse, setCoarse] =
|
|
8434
|
+
const [active, setActive] = React87.useState(/* @__PURE__ */ new Set());
|
|
8435
|
+
const [coarse, setCoarse] = React87.useState(
|
|
8331
8436
|
() => typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches
|
|
8332
8437
|
);
|
|
8333
|
-
|
|
8438
|
+
React87.useEffect(() => {
|
|
8334
8439
|
if (visibility !== "auto" || typeof window === "undefined") return;
|
|
8335
8440
|
const mq = window.matchMedia("(pointer: coarse)");
|
|
8336
8441
|
const onChange = (e) => setCoarse(e.matches);
|
|
8337
8442
|
mq.addEventListener("change", onChange);
|
|
8338
8443
|
return () => mq.removeEventListener("change", onChange);
|
|
8339
8444
|
}, [visibility]);
|
|
8340
|
-
const handlePress =
|
|
8445
|
+
const handlePress = React87.useCallback(
|
|
8341
8446
|
(id) => {
|
|
8342
8447
|
setActive((prev) => new Set(prev).add(id));
|
|
8343
8448
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8351,7 +8456,7 @@ function ControlGrid({
|
|
|
8351
8456
|
},
|
|
8352
8457
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8353
8458
|
);
|
|
8354
|
-
const handleRelease =
|
|
8459
|
+
const handleRelease = React87.useCallback(
|
|
8355
8460
|
(id) => {
|
|
8356
8461
|
setActive((prev) => {
|
|
8357
8462
|
const next = new Set(prev);
|
|
@@ -8714,7 +8819,7 @@ function GameMenu({
|
|
|
8714
8819
|
}) {
|
|
8715
8820
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8716
8821
|
const eventBus = useEventBus();
|
|
8717
|
-
const handleOptionClick =
|
|
8822
|
+
const handleOptionClick = React87.useCallback(
|
|
8718
8823
|
(option) => {
|
|
8719
8824
|
if (option.event) {
|
|
8720
8825
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8950,7 +9055,7 @@ function StateGraph({
|
|
|
8950
9055
|
}) {
|
|
8951
9056
|
const eventBus = useEventBus();
|
|
8952
9057
|
const nodes = states ?? [];
|
|
8953
|
-
const positions =
|
|
9058
|
+
const positions = React87.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8954
9059
|
return /* @__PURE__ */ jsxs(
|
|
8955
9060
|
Box,
|
|
8956
9061
|
{
|
|
@@ -9021,8 +9126,8 @@ function MiniMap({
|
|
|
9021
9126
|
tileAssets,
|
|
9022
9127
|
unitAssets
|
|
9023
9128
|
}) {
|
|
9024
|
-
const canvasRef =
|
|
9025
|
-
const imgCacheRef =
|
|
9129
|
+
const canvasRef = React87.useRef(null);
|
|
9130
|
+
const imgCacheRef = React87.useRef(/* @__PURE__ */ new Map());
|
|
9026
9131
|
function loadImg(url) {
|
|
9027
9132
|
const cached = imgCacheRef.current.get(url);
|
|
9028
9133
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -9038,7 +9143,7 @@ function MiniMap({
|
|
|
9038
9143
|
imgCacheRef.current.set(url, img);
|
|
9039
9144
|
return null;
|
|
9040
9145
|
}
|
|
9041
|
-
|
|
9146
|
+
React87.useEffect(() => {
|
|
9042
9147
|
const canvas = canvasRef.current;
|
|
9043
9148
|
if (!canvas) return;
|
|
9044
9149
|
const ctx = canvas.getContext("2d");
|
|
@@ -10165,7 +10270,7 @@ function proceduralShapes(view, pos, fade, progress) {
|
|
|
10165
10270
|
}
|
|
10166
10271
|
}
|
|
10167
10272
|
}
|
|
10168
|
-
function expandFxItem(view, node, epochNowMs, dim, projector) {
|
|
10273
|
+
function expandFxItem(view, node, epochNowMs, dim, projector, fontFamily) {
|
|
10169
10274
|
if (view.space === "screen") return [];
|
|
10170
10275
|
const tickMs = node.tickMs ?? DEFAULT_TICK_MS;
|
|
10171
10276
|
const { ageMs, progress, fade } = fxLifecycle(view, epochNowMs, tickMs);
|
|
@@ -10202,6 +10307,7 @@ function expandFxItem(view, node, epochNowMs, dim, projector) {
|
|
|
10202
10307
|
}
|
|
10203
10308
|
if (view.message) {
|
|
10204
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";
|
|
10205
10311
|
const text = {
|
|
10206
10312
|
type: "draw-text",
|
|
10207
10313
|
text: view.message,
|
|
@@ -10209,18 +10315,18 @@ function expandFxItem(view, node, epochNowMs, dim, projector) {
|
|
|
10209
10315
|
offsetY: -(0.15 + 0.55 * progress),
|
|
10210
10316
|
color: view.color ?? node.textColor ?? DEFAULT_TEXT_COLOR,
|
|
10211
10317
|
opacity: fade,
|
|
10212
|
-
|
|
10318
|
+
font: `bold ${pxSize ?? 14}px ${family}`
|
|
10213
10319
|
};
|
|
10214
10320
|
out.push(text);
|
|
10215
10321
|
}
|
|
10216
10322
|
return out;
|
|
10217
10323
|
}
|
|
10218
|
-
function expandFxLayer(node, epochNowMs, dim, projector) {
|
|
10324
|
+
function expandFxLayer(node, epochNowMs, dim, projector, fontFamily) {
|
|
10219
10325
|
if (!Array.isArray(node.items)) return [];
|
|
10220
10326
|
const out = [];
|
|
10221
10327
|
for (const item of node.items) {
|
|
10222
10328
|
if (!item || typeof item.id !== "string") continue;
|
|
10223
|
-
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector));
|
|
10329
|
+
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector, fontFamily));
|
|
10224
10330
|
}
|
|
10225
10331
|
return out;
|
|
10226
10332
|
}
|
|
@@ -10287,7 +10393,7 @@ function paintDrawable(painter, node, dctx) {
|
|
|
10287
10393
|
break;
|
|
10288
10394
|
case "draw-fx-layer": {
|
|
10289
10395
|
const epochNow = dctx.time > 0 && typeof performance !== "undefined" ? performance.timeOrigin + dctx.time : 0;
|
|
10290
|
-
for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector)) paintDrawable(painter, child, dctx);
|
|
10396
|
+
for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector, dctx.fontFamily)) paintDrawable(painter, child, dctx);
|
|
10291
10397
|
break;
|
|
10292
10398
|
}
|
|
10293
10399
|
}
|
|
@@ -10397,7 +10503,7 @@ function Canvas2D({
|
|
|
10397
10503
|
const registerChildDrawable = useCallback((node) => {
|
|
10398
10504
|
childDrawablesRef.current.push(node);
|
|
10399
10505
|
}, []);
|
|
10400
|
-
const hasJsxChildren =
|
|
10506
|
+
const hasJsxChildren = React87.Children.count(children) > 0;
|
|
10401
10507
|
function isDrawableLayer(node) {
|
|
10402
10508
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
10403
10509
|
}
|
|
@@ -10955,7 +11061,7 @@ function Canvas({
|
|
|
10955
11061
|
if (mode !== "3d") return;
|
|
10956
11062
|
const next = childDrawablesRef.current;
|
|
10957
11063
|
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
10958
|
-
if (next.length === 0 &&
|
|
11064
|
+
if (next.length === 0 && React87.Children.count(children) > 0) return;
|
|
10959
11065
|
setChildDrawables(
|
|
10960
11066
|
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
10961
11067
|
);
|
|
@@ -10993,7 +11099,7 @@ function Canvas({
|
|
|
10993
11099
|
};
|
|
10994
11100
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10995
11101
|
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
10996
|
-
|
|
11102
|
+
React87.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 }) })
|
|
10997
11103
|
] });
|
|
10998
11104
|
}
|
|
10999
11105
|
return /* @__PURE__ */ jsx(
|
|
@@ -11151,7 +11257,7 @@ function LinearView({
|
|
|
11151
11257
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
11152
11258
|
const isDone = i < currentIdx;
|
|
11153
11259
|
const isCurrent = i === currentIdx;
|
|
11154
|
-
return /* @__PURE__ */ jsxs(
|
|
11260
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
11155
11261
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11156
11262
|
Typography,
|
|
11157
11263
|
{
|
|
@@ -11686,7 +11792,7 @@ function SequenceBar({
|
|
|
11686
11792
|
else onSlotRemove?.(index);
|
|
11687
11793
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
11688
11794
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
11689
|
-
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(React87__default.Fragment, { children: [
|
|
11690
11796
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11691
11797
|
Typography,
|
|
11692
11798
|
{
|
|
@@ -12371,7 +12477,7 @@ var init_LearningCanvas = __esm({
|
|
|
12371
12477
|
if (drawables?.length && projector) {
|
|
12372
12478
|
const painter = createWebPainter(ctx, invalidateRef.current);
|
|
12373
12479
|
const timeMs = needsAnim && typeof performance !== "undefined" ? performance.now() : 0;
|
|
12374
|
-
const dctx = { projector, time: timeMs, invalidate: invalidateRef.current };
|
|
12480
|
+
const dctx = { projector, time: timeMs, invalidate: invalidateRef.current, fontFamily: themeBodyFont(canvas) };
|
|
12375
12481
|
for (const node of drawables) {
|
|
12376
12482
|
paintDrawable(painter, node, dctx);
|
|
12377
12483
|
}
|
|
@@ -12533,7 +12639,7 @@ var init_ErrorBoundary = __esm({
|
|
|
12533
12639
|
}
|
|
12534
12640
|
);
|
|
12535
12641
|
};
|
|
12536
|
-
ErrorBoundary = class extends
|
|
12642
|
+
ErrorBoundary = class extends React87__default.Component {
|
|
12537
12643
|
constructor(props) {
|
|
12538
12644
|
super(props);
|
|
12539
12645
|
__publicField(this, "reset", () => {
|
|
@@ -12802,7 +12908,7 @@ var init_Container = __esm({
|
|
|
12802
12908
|
as: Component = "div"
|
|
12803
12909
|
}) => {
|
|
12804
12910
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
12805
|
-
return
|
|
12911
|
+
return React87__default.createElement(
|
|
12806
12912
|
Component,
|
|
12807
12913
|
{
|
|
12808
12914
|
className: cn(
|
|
@@ -13739,7 +13845,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13739
13845
|
document.addEventListener("mousedown", handleClickOutside);
|
|
13740
13846
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
13741
13847
|
}, [isExpanded, actions]);
|
|
13742
|
-
const
|
|
13848
|
+
const positionClasses2 = {
|
|
13743
13849
|
"bottom-right": "bottom-6 right-6",
|
|
13744
13850
|
"bottom-left": "bottom-6 left-6",
|
|
13745
13851
|
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
@@ -13748,7 +13854,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13748
13854
|
"top-center": "top-6 left-1/2 -translate-x-1/2"
|
|
13749
13855
|
};
|
|
13750
13856
|
if (resolvedAction && (!actions || actions.length === 0)) {
|
|
13751
|
-
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(
|
|
13752
13858
|
Button,
|
|
13753
13859
|
{
|
|
13754
13860
|
variant: resolvedAction.variant || "primary",
|
|
@@ -13776,7 +13882,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13776
13882
|
ref: fabRef,
|
|
13777
13883
|
className: cn(
|
|
13778
13884
|
"fixed z-50 flex flex-col items-end gap-3",
|
|
13779
|
-
|
|
13885
|
+
positionClasses2[position],
|
|
13780
13886
|
position.includes("left") && "items-start",
|
|
13781
13887
|
className
|
|
13782
13888
|
),
|
|
@@ -16712,9 +16818,11 @@ var init_Tabs = __esm({
|
|
|
16712
16818
|
}
|
|
16713
16819
|
};
|
|
16714
16820
|
const handleKeyDown = (e, index) => {
|
|
16715
|
-
|
|
16821
|
+
const prevKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
|
|
16822
|
+
const nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
|
|
16823
|
+
if (e.key === prevKey || e.key === nextKey) {
|
|
16716
16824
|
e.preventDefault();
|
|
16717
|
-
const direction = e.key ===
|
|
16825
|
+
const direction = e.key === prevKey ? -1 : 1;
|
|
16718
16826
|
const nextIndex = (index + direction + safeItems.length) % safeItems.length;
|
|
16719
16827
|
const nextTab = safeItems[nextIndex];
|
|
16720
16828
|
if (nextTab && !nextTab.disabled) {
|
|
@@ -17053,7 +17161,7 @@ function useLanguageReady(language) {
|
|
|
17053
17161
|
}, [language]);
|
|
17054
17162
|
return ready;
|
|
17055
17163
|
}
|
|
17056
|
-
var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
17164
|
+
var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, HIGHLIGHT_CAPACITY_BYTES, CodeBlock;
|
|
17057
17165
|
var init_CodeBlock = __esm({
|
|
17058
17166
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
17059
17167
|
init_cn();
|
|
@@ -17286,7 +17394,8 @@ var init_CodeBlock = __esm({
|
|
|
17286
17394
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17287
17395
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17288
17396
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17289
|
-
|
|
17397
|
+
HIGHLIGHT_CAPACITY_BYTES = 512 * 1024;
|
|
17398
|
+
CodeBlock = React87__default.memo(
|
|
17290
17399
|
({
|
|
17291
17400
|
code: rawCode,
|
|
17292
17401
|
language = "text",
|
|
@@ -17316,6 +17425,8 @@ var init_CodeBlock = __esm({
|
|
|
17316
17425
|
const isOrb = language === "orb";
|
|
17317
17426
|
const isLolo = language === "lolo";
|
|
17318
17427
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
17428
|
+
const overCapacity = code.length > HIGHLIGHT_CAPACITY_BYTES;
|
|
17429
|
+
const plainCodeColor = activeStyle['code[class*="language-"]']?.color ?? "#d4d4d4";
|
|
17319
17430
|
const languageReady = useLanguageReady(language);
|
|
17320
17431
|
const eventBus = useEventBus();
|
|
17321
17432
|
const { t } = useTranslate();
|
|
@@ -17382,8 +17493,8 @@ var init_CodeBlock = __esm({
|
|
|
17382
17493
|
const isFoldable = foldableProp ?? true;
|
|
17383
17494
|
const [collapsed, setCollapsed] = useState(() => /* @__PURE__ */ new Set());
|
|
17384
17495
|
const foldRegions = useMemo(
|
|
17385
|
-
() => isFoldable ? computeFoldRegions(code) : [],
|
|
17386
|
-
[code, isFoldable]
|
|
17496
|
+
() => isFoldable && !overCapacity ? computeFoldRegions(code) : [],
|
|
17497
|
+
[code, isFoldable, overCapacity]
|
|
17387
17498
|
);
|
|
17388
17499
|
const foldStartMap = useMemo(() => {
|
|
17389
17500
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -17417,8 +17528,67 @@ var init_CodeBlock = __esm({
|
|
|
17417
17528
|
useEffect(() => {
|
|
17418
17529
|
setCollapsed(/* @__PURE__ */ new Set());
|
|
17419
17530
|
}, [code]);
|
|
17531
|
+
const editableOverCapacity = editableValue.length > HIGHLIGHT_CAPACITY_BYTES;
|
|
17532
|
+
const editableHighlightedElement = useMemo(
|
|
17533
|
+
() => editableOverCapacity ? /* @__PURE__ */ jsx(
|
|
17534
|
+
"div",
|
|
17535
|
+
{
|
|
17536
|
+
style: {
|
|
17537
|
+
padding: "1rem",
|
|
17538
|
+
margin: 0,
|
|
17539
|
+
whiteSpace: "pre",
|
|
17540
|
+
minWidth: "100%",
|
|
17541
|
+
color: plainCodeColor,
|
|
17542
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17543
|
+
fontSize: "13px",
|
|
17544
|
+
lineHeight: "1.5"
|
|
17545
|
+
},
|
|
17546
|
+
children: editableValue || " "
|
|
17547
|
+
}
|
|
17548
|
+
) : /* @__PURE__ */ jsx(
|
|
17549
|
+
SyntaxHighlighter,
|
|
17550
|
+
{
|
|
17551
|
+
PreTag: "div",
|
|
17552
|
+
language,
|
|
17553
|
+
style: activeStyle,
|
|
17554
|
+
wrapLines: errorLines && errorLines.size > 0,
|
|
17555
|
+
lineProps: errorLineProps,
|
|
17556
|
+
customStyle: {
|
|
17557
|
+
backgroundColor: "transparent",
|
|
17558
|
+
borderRadius: 0,
|
|
17559
|
+
padding: "1rem",
|
|
17560
|
+
margin: 0,
|
|
17561
|
+
whiteSpace: "pre",
|
|
17562
|
+
minWidth: "100%",
|
|
17563
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17564
|
+
fontSize: "13px",
|
|
17565
|
+
lineHeight: "1.5"
|
|
17566
|
+
},
|
|
17567
|
+
codeTagProps: {
|
|
17568
|
+
style: {
|
|
17569
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17570
|
+
fontSize: "13px",
|
|
17571
|
+
lineHeight: "1.5"
|
|
17572
|
+
}
|
|
17573
|
+
},
|
|
17574
|
+
children: editableValue || " "
|
|
17575
|
+
}
|
|
17576
|
+
),
|
|
17577
|
+
[editableValue, editableOverCapacity, plainCodeColor, language, activeStyle, errorLines, errorLineProps, languageReady]
|
|
17578
|
+
);
|
|
17420
17579
|
const highlightedElement = useMemo(
|
|
17421
|
-
() => /* @__PURE__ */ jsx(
|
|
17580
|
+
() => overCapacity ? /* @__PURE__ */ jsx(
|
|
17581
|
+
"div",
|
|
17582
|
+
{
|
|
17583
|
+
style: {
|
|
17584
|
+
margin: 0,
|
|
17585
|
+
whiteSpace: "pre",
|
|
17586
|
+
minWidth: "100%",
|
|
17587
|
+
color: plainCodeColor
|
|
17588
|
+
},
|
|
17589
|
+
children: code
|
|
17590
|
+
}
|
|
17591
|
+
) : /* @__PURE__ */ jsx(
|
|
17422
17592
|
SyntaxHighlighter,
|
|
17423
17593
|
{
|
|
17424
17594
|
PreTag: "div",
|
|
@@ -17440,7 +17610,7 @@ var init_CodeBlock = __esm({
|
|
|
17440
17610
|
children: code
|
|
17441
17611
|
}
|
|
17442
17612
|
),
|
|
17443
|
-
[code, language, activeStyle, languageReady]
|
|
17613
|
+
[code, overCapacity, plainCodeColor, language, activeStyle, languageReady]
|
|
17444
17614
|
);
|
|
17445
17615
|
useLayoutEffect(() => {
|
|
17446
17616
|
const container = codeRef.current;
|
|
@@ -17769,35 +17939,7 @@ var init_CodeBlock = __esm({
|
|
|
17769
17939
|
overflow: "hidden",
|
|
17770
17940
|
pointerEvents: "none"
|
|
17771
17941
|
},
|
|
17772
|
-
children:
|
|
17773
|
-
SyntaxHighlighter,
|
|
17774
|
-
{
|
|
17775
|
-
PreTag: "div",
|
|
17776
|
-
language,
|
|
17777
|
-
style: activeStyle,
|
|
17778
|
-
wrapLines: errorLines && errorLines.size > 0,
|
|
17779
|
-
lineProps: errorLineProps,
|
|
17780
|
-
customStyle: {
|
|
17781
|
-
backgroundColor: "transparent",
|
|
17782
|
-
borderRadius: 0,
|
|
17783
|
-
padding: "1rem",
|
|
17784
|
-
margin: 0,
|
|
17785
|
-
whiteSpace: "pre",
|
|
17786
|
-
minWidth: "100%",
|
|
17787
|
-
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17788
|
-
fontSize: "13px",
|
|
17789
|
-
lineHeight: "1.5"
|
|
17790
|
-
},
|
|
17791
|
-
codeTagProps: {
|
|
17792
|
-
style: {
|
|
17793
|
-
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17794
|
-
fontSize: "13px",
|
|
17795
|
-
lineHeight: "1.5"
|
|
17796
|
-
}
|
|
17797
|
-
},
|
|
17798
|
-
children: editableValue || " "
|
|
17799
|
-
}
|
|
17800
|
-
)
|
|
17942
|
+
children: editableHighlightedElement
|
|
17801
17943
|
}
|
|
17802
17944
|
),
|
|
17803
17945
|
/* @__PURE__ */ jsx(
|
|
@@ -17869,14 +18011,77 @@ var init_CodeBlock = __esm({
|
|
|
17869
18011
|
CodeBlock.displayName = "CodeBlock";
|
|
17870
18012
|
}
|
|
17871
18013
|
});
|
|
18014
|
+
function loadMermaid() {
|
|
18015
|
+
mermaidModule ?? (mermaidModule = import('mermaid').then((m) => m.default));
|
|
18016
|
+
return mermaidModule;
|
|
18017
|
+
}
|
|
18018
|
+
var mermaidModule, MermaidDiagram;
|
|
18019
|
+
var init_MermaidDiagram = __esm({
|
|
18020
|
+
"components/core/molecules/markdown/MermaidDiagram.tsx"() {
|
|
18021
|
+
init_Box();
|
|
18022
|
+
init_Typography();
|
|
18023
|
+
init_CodeBlock();
|
|
18024
|
+
init_cn();
|
|
18025
|
+
mermaidModule = null;
|
|
18026
|
+
MermaidDiagram = React87__default.memo(
|
|
18027
|
+
({ code, className }) => {
|
|
18028
|
+
const { resolvedMode } = useTheme();
|
|
18029
|
+
const containerRef = useRef(null);
|
|
18030
|
+
const [error, setError] = useState(null);
|
|
18031
|
+
const reactId = useId();
|
|
18032
|
+
useEffect(() => {
|
|
18033
|
+
let active = true;
|
|
18034
|
+
void (async () => {
|
|
18035
|
+
try {
|
|
18036
|
+
const mermaid = await loadMermaid();
|
|
18037
|
+
mermaid.initialize({
|
|
18038
|
+
startOnLoad: false,
|
|
18039
|
+
securityLevel: "strict",
|
|
18040
|
+
theme: resolvedMode === "dark" ? "dark" : "default"
|
|
18041
|
+
});
|
|
18042
|
+
const domId = `mermaid-${reactId.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
18043
|
+
const { svg } = await mermaid.render(domId, code);
|
|
18044
|
+
if (!active || !containerRef.current) return;
|
|
18045
|
+
containerRef.current.innerHTML = svg;
|
|
18046
|
+
setError(null);
|
|
18047
|
+
} catch (err) {
|
|
18048
|
+
if (active) setError(err instanceof Error ? err.message : String(err));
|
|
18049
|
+
}
|
|
18050
|
+
})();
|
|
18051
|
+
return () => {
|
|
18052
|
+
active = false;
|
|
18053
|
+
};
|
|
18054
|
+
}, [code, resolvedMode, reactId]);
|
|
18055
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("not-prose my-4", className), children: [
|
|
18056
|
+
error !== null && /* @__PURE__ */ jsxs(Box, { className: "space-y-2 mb-2", children: [
|
|
18057
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-error whitespace-pre-wrap", children: error }),
|
|
18058
|
+
/* @__PURE__ */ jsx(CodeBlock, { code, language: "mermaid" })
|
|
18059
|
+
] }),
|
|
18060
|
+
/* @__PURE__ */ jsx(
|
|
18061
|
+
Box,
|
|
18062
|
+
{
|
|
18063
|
+
ref: containerRef,
|
|
18064
|
+
"data-testid": "mermaid-diagram",
|
|
18065
|
+
className: "overflow-x-auto",
|
|
18066
|
+
style: error !== null ? { display: "none" } : void 0
|
|
18067
|
+
}
|
|
18068
|
+
)
|
|
18069
|
+
] });
|
|
18070
|
+
},
|
|
18071
|
+
(prev, next) => prev.code === next.code && prev.className === next.className
|
|
18072
|
+
);
|
|
18073
|
+
MermaidDiagram.displayName = "MermaidDiagram";
|
|
18074
|
+
}
|
|
18075
|
+
});
|
|
17872
18076
|
var MarkdownContent;
|
|
17873
18077
|
var init_MarkdownContent = __esm({
|
|
17874
18078
|
"components/core/molecules/markdown/MarkdownContent.tsx"() {
|
|
17875
18079
|
init_katex_min();
|
|
17876
18080
|
init_Box();
|
|
17877
18081
|
init_CodeBlock();
|
|
18082
|
+
init_MermaidDiagram();
|
|
17878
18083
|
init_cn();
|
|
17879
|
-
MarkdownContent =
|
|
18084
|
+
MarkdownContent = React87__default.memo(
|
|
17880
18085
|
({ content, direction = "ltr", className }) => {
|
|
17881
18086
|
const { t: _t } = useTranslate();
|
|
17882
18087
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -17921,6 +18126,9 @@ var init_MarkdownContent = __esm({
|
|
|
17921
18126
|
if (!inline) {
|
|
17922
18127
|
const match = /language-(\w+)/.exec(codeClassName ?? "");
|
|
17923
18128
|
const code = String(children).replace(/\n$/, "");
|
|
18129
|
+
if (match?.[1] === "mermaid") {
|
|
18130
|
+
return /* @__PURE__ */ jsx(MermaidDiagram, { code });
|
|
18131
|
+
}
|
|
17924
18132
|
if (match) {
|
|
17925
18133
|
return /* @__PURE__ */ jsx(
|
|
17926
18134
|
CodeBlock,
|
|
@@ -19153,7 +19361,7 @@ var init_StateMachineView = __esm({
|
|
|
19153
19361
|
style: { top: title ? 30 : 0 },
|
|
19154
19362
|
children: [
|
|
19155
19363
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19156
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19364
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React87__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19157
19365
|
StateNode2,
|
|
19158
19366
|
{
|
|
19159
19367
|
state,
|
|
@@ -24000,6 +24208,183 @@ var init_CodeRunnerPanel = __esm({
|
|
|
24000
24208
|
CodeRunnerPanel.displayName = "CodeRunnerPanel";
|
|
24001
24209
|
}
|
|
24002
24210
|
});
|
|
24211
|
+
function matchesQuery(query, text) {
|
|
24212
|
+
if (!query) return true;
|
|
24213
|
+
let qi = 0;
|
|
24214
|
+
const q = query.toLowerCase();
|
|
24215
|
+
const t = text.toLowerCase();
|
|
24216
|
+
for (let ti = 0; ti < t.length && qi < q.length; ti++) {
|
|
24217
|
+
if (t[ti] === q[qi]) qi++;
|
|
24218
|
+
}
|
|
24219
|
+
return qi === q.length;
|
|
24220
|
+
}
|
|
24221
|
+
function commandMatches(command, query) {
|
|
24222
|
+
if (!query) return true;
|
|
24223
|
+
if (matchesQuery(query, command.label)) return true;
|
|
24224
|
+
return (command.keywords ?? []).some((keyword) => matchesQuery(query, keyword));
|
|
24225
|
+
}
|
|
24226
|
+
var UNGROUPED, CommandPalette;
|
|
24227
|
+
var init_CommandPalette = __esm({
|
|
24228
|
+
"components/core/molecules/CommandPalette.tsx"() {
|
|
24229
|
+
"use client";
|
|
24230
|
+
init_Box();
|
|
24231
|
+
init_Stack();
|
|
24232
|
+
init_Typography();
|
|
24233
|
+
init_Icon();
|
|
24234
|
+
init_Input();
|
|
24235
|
+
init_Badge();
|
|
24236
|
+
init_cn();
|
|
24237
|
+
init_useEventBus();
|
|
24238
|
+
init_Modal();
|
|
24239
|
+
UNGROUPED = /* @__PURE__ */ Symbol("command-palette-ungrouped");
|
|
24240
|
+
CommandPalette = ({
|
|
24241
|
+
open,
|
|
24242
|
+
onOpenChange,
|
|
24243
|
+
commands,
|
|
24244
|
+
onSelect,
|
|
24245
|
+
placeholder = "Type a command...",
|
|
24246
|
+
emptyLabel = "No matching commands",
|
|
24247
|
+
className
|
|
24248
|
+
}) => {
|
|
24249
|
+
const eventBus = useEventBus();
|
|
24250
|
+
const [query, setQuery] = useState("");
|
|
24251
|
+
const [highlightIndex, setHighlightIndex] = useState(0);
|
|
24252
|
+
const filtered = useMemo(
|
|
24253
|
+
() => commands.filter((command) => commandMatches(command, query)),
|
|
24254
|
+
[commands, query]
|
|
24255
|
+
);
|
|
24256
|
+
const groups = useMemo(() => {
|
|
24257
|
+
const order = [];
|
|
24258
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
24259
|
+
for (const command of filtered) {
|
|
24260
|
+
const key = command.group ?? UNGROUPED;
|
|
24261
|
+
if (!byGroup.has(key)) {
|
|
24262
|
+
byGroup.set(key, []);
|
|
24263
|
+
order.push(key);
|
|
24264
|
+
}
|
|
24265
|
+
byGroup.get(key).push(command);
|
|
24266
|
+
}
|
|
24267
|
+
return order.map((key) => ({ group: key === UNGROUPED ? void 0 : key, items: byGroup.get(key) }));
|
|
24268
|
+
}, [filtered]);
|
|
24269
|
+
const resetQuery = useCallback(() => {
|
|
24270
|
+
setQuery("");
|
|
24271
|
+
setHighlightIndex(0);
|
|
24272
|
+
}, []);
|
|
24273
|
+
const handleClose = useCallback(() => {
|
|
24274
|
+
resetQuery();
|
|
24275
|
+
onOpenChange(false);
|
|
24276
|
+
}, [onOpenChange, resetQuery]);
|
|
24277
|
+
const handleSelect = useCallback(
|
|
24278
|
+
(command) => {
|
|
24279
|
+
if (command.disabled) return;
|
|
24280
|
+
if (command.event) eventBus.emit(`UI:${command.event}`, { commandId: command.id });
|
|
24281
|
+
if (command.action) eventBus.emit(`UI:${command.action}`, command.actionPayload ?? {});
|
|
24282
|
+
onSelect?.(command);
|
|
24283
|
+
handleClose();
|
|
24284
|
+
},
|
|
24285
|
+
[eventBus, onSelect, handleClose]
|
|
24286
|
+
);
|
|
24287
|
+
const handleQueryChange = useCallback((e) => {
|
|
24288
|
+
setQuery(e.target.value);
|
|
24289
|
+
setHighlightIndex(0);
|
|
24290
|
+
}, []);
|
|
24291
|
+
const handleKeyDown = useCallback(
|
|
24292
|
+
(e) => {
|
|
24293
|
+
if (filtered.length === 0) return;
|
|
24294
|
+
if (e.key === "ArrowDown") {
|
|
24295
|
+
e.preventDefault();
|
|
24296
|
+
setHighlightIndex((prev) => prev < filtered.length - 1 ? prev + 1 : 0);
|
|
24297
|
+
} else if (e.key === "ArrowUp") {
|
|
24298
|
+
e.preventDefault();
|
|
24299
|
+
setHighlightIndex((prev) => prev > 0 ? prev - 1 : filtered.length - 1);
|
|
24300
|
+
} else if (e.key === "Enter") {
|
|
24301
|
+
e.preventDefault();
|
|
24302
|
+
const command = filtered[highlightIndex];
|
|
24303
|
+
if (command) handleSelect(command);
|
|
24304
|
+
}
|
|
24305
|
+
},
|
|
24306
|
+
[filtered, highlightIndex, handleSelect]
|
|
24307
|
+
);
|
|
24308
|
+
return /* @__PURE__ */ jsx(
|
|
24309
|
+
Modal,
|
|
24310
|
+
{
|
|
24311
|
+
isOpen: open,
|
|
24312
|
+
onClose: handleClose,
|
|
24313
|
+
onExited: resetQuery,
|
|
24314
|
+
showCloseButton: false,
|
|
24315
|
+
size: "md",
|
|
24316
|
+
className,
|
|
24317
|
+
children: /* @__PURE__ */ jsx(Box, { "data-testid": "command-palette", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
24318
|
+
/* @__PURE__ */ jsx(
|
|
24319
|
+
Input,
|
|
24320
|
+
{
|
|
24321
|
+
inputType: "search",
|
|
24322
|
+
placeholder,
|
|
24323
|
+
value: query,
|
|
24324
|
+
onChange: handleQueryChange,
|
|
24325
|
+
onKeyDown: handleKeyDown,
|
|
24326
|
+
leftIcon: "search",
|
|
24327
|
+
clearable: query.length > 0,
|
|
24328
|
+
onClear: resetQuery,
|
|
24329
|
+
autoFocus: true,
|
|
24330
|
+
"data-testid": "command-palette-input"
|
|
24331
|
+
}
|
|
24332
|
+
),
|
|
24333
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx(Box, { className: "px-2 py-6 text-center", "data-testid": "command-palette-empty", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: emptyLabel }) }) : /* @__PURE__ */ jsx(
|
|
24334
|
+
Box,
|
|
24335
|
+
{
|
|
24336
|
+
className: "max-h-80 overflow-y-auto",
|
|
24337
|
+
role: "listbox",
|
|
24338
|
+
"aria-label": placeholder,
|
|
24339
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: groups.map(({ group, items }) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
24340
|
+
group ? /* @__PURE__ */ jsx(
|
|
24341
|
+
Typography,
|
|
24342
|
+
{
|
|
24343
|
+
variant: "caption",
|
|
24344
|
+
color: "muted",
|
|
24345
|
+
className: "px-3 pt-2 pb-1 block",
|
|
24346
|
+
children: group
|
|
24347
|
+
}
|
|
24348
|
+
) : null,
|
|
24349
|
+
items.map((command) => {
|
|
24350
|
+
const index = filtered.indexOf(command);
|
|
24351
|
+
const isHighlighted = index === highlightIndex;
|
|
24352
|
+
return /* @__PURE__ */ jsxs(
|
|
24353
|
+
Box,
|
|
24354
|
+
{
|
|
24355
|
+
as: "button",
|
|
24356
|
+
role: "option",
|
|
24357
|
+
"aria-selected": isHighlighted,
|
|
24358
|
+
"aria-disabled": command.disabled || void 0,
|
|
24359
|
+
"data-testid": `command-palette-item-${command.id}`,
|
|
24360
|
+
onMouseEnter: () => !command.disabled && setHighlightIndex(index),
|
|
24361
|
+
onClick: () => handleSelect(command),
|
|
24362
|
+
className: cn(
|
|
24363
|
+
"w-full flex items-center gap-3 px-3 py-2 text-start rounded-sm",
|
|
24364
|
+
"text-sm transition-colors",
|
|
24365
|
+
"focus:outline-none",
|
|
24366
|
+
isHighlighted && "bg-muted",
|
|
24367
|
+
command.disabled && "opacity-50 cursor-not-allowed"
|
|
24368
|
+
),
|
|
24369
|
+
children: [
|
|
24370
|
+
command.icon ? /* @__PURE__ */ jsx(Icon, { icon: command.icon, size: "sm", className: "flex-shrink-0" }) : null,
|
|
24371
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "flex-1 truncate", children: command.label }),
|
|
24372
|
+
command.shortcut ? /* @__PURE__ */ jsx(Badge, { variant: "neutral", size: "sm", children: command.shortcut }) : null
|
|
24373
|
+
]
|
|
24374
|
+
},
|
|
24375
|
+
command.id
|
|
24376
|
+
);
|
|
24377
|
+
})
|
|
24378
|
+
] }, String(group ?? "__ungrouped__"))) })
|
|
24379
|
+
}
|
|
24380
|
+
)
|
|
24381
|
+
] }) })
|
|
24382
|
+
}
|
|
24383
|
+
);
|
|
24384
|
+
};
|
|
24385
|
+
CommandPalette.displayName = "CommandPalette";
|
|
24386
|
+
}
|
|
24387
|
+
});
|
|
24003
24388
|
function formatCount(count) {
|
|
24004
24389
|
if (count >= 1e3) {
|
|
24005
24390
|
return `${(count / 1e3).toFixed(1)}k`;
|
|
@@ -25261,7 +25646,7 @@ var init_Menu = __esm({
|
|
|
25261
25646
|
"bottom-end": "bottom-start"
|
|
25262
25647
|
};
|
|
25263
25648
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25264
|
-
const triggerElement =
|
|
25649
|
+
const triggerElement = React87__default.isValidElement(trigger) ? React87__default.cloneElement(trigger, {
|
|
25265
25650
|
ref: triggerRef,
|
|
25266
25651
|
onClick: handleToggle
|
|
25267
25652
|
}) : /* @__PURE__ */ jsx(
|
|
@@ -25364,14 +25749,14 @@ function useDataDnd(args) {
|
|
|
25364
25749
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25365
25750
|
const enabled = isZone || Boolean(dndRoot);
|
|
25366
25751
|
const eventBus = useEventBus();
|
|
25367
|
-
const parentRoot =
|
|
25752
|
+
const parentRoot = React87__default.useContext(RootCtx);
|
|
25368
25753
|
const isRoot = enabled && parentRoot === null;
|
|
25369
|
-
const zoneId =
|
|
25754
|
+
const zoneId = React87__default.useId();
|
|
25370
25755
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25371
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25372
|
-
const optimisticOrdersRef =
|
|
25756
|
+
const [optimisticOrders, setOptimisticOrders] = React87__default.useState(() => /* @__PURE__ */ new Map());
|
|
25757
|
+
const optimisticOrdersRef = React87__default.useRef(optimisticOrders);
|
|
25373
25758
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25374
|
-
const clearOptimisticOrder =
|
|
25759
|
+
const clearOptimisticOrder = React87__default.useCallback((group) => {
|
|
25375
25760
|
setOptimisticOrders((prev) => {
|
|
25376
25761
|
if (!prev.has(group)) return prev;
|
|
25377
25762
|
const next = new Map(prev);
|
|
@@ -25396,7 +25781,7 @@ function useDataDnd(args) {
|
|
|
25396
25781
|
const raw = it[dndItemIdField];
|
|
25397
25782
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25398
25783
|
}).join("|");
|
|
25399
|
-
const itemIds =
|
|
25784
|
+
const itemIds = React87__default.useMemo(
|
|
25400
25785
|
() => orderedItems.map((it, idx) => {
|
|
25401
25786
|
const raw = it[dndItemIdField];
|
|
25402
25787
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25407,7 +25792,7 @@ function useDataDnd(args) {
|
|
|
25407
25792
|
const raw = it[dndItemIdField];
|
|
25408
25793
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25409
25794
|
}).join("|");
|
|
25410
|
-
|
|
25795
|
+
React87__default.useEffect(() => {
|
|
25411
25796
|
const root = isRoot ? null : parentRoot;
|
|
25412
25797
|
if (root) {
|
|
25413
25798
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25415,20 +25800,20 @@ function useDataDnd(args) {
|
|
|
25415
25800
|
clearOptimisticOrder(ownGroup);
|
|
25416
25801
|
}
|
|
25417
25802
|
}, [itemsContentSig, ownGroup]);
|
|
25418
|
-
const zonesRef =
|
|
25419
|
-
const registerZone =
|
|
25803
|
+
const zonesRef = React87__default.useRef(/* @__PURE__ */ new Map());
|
|
25804
|
+
const registerZone = React87__default.useCallback((zoneId2, meta2) => {
|
|
25420
25805
|
zonesRef.current.set(zoneId2, meta2);
|
|
25421
25806
|
}, []);
|
|
25422
|
-
const unregisterZone =
|
|
25807
|
+
const unregisterZone = React87__default.useCallback((zoneId2) => {
|
|
25423
25808
|
zonesRef.current.delete(zoneId2);
|
|
25424
25809
|
}, []);
|
|
25425
|
-
const [activeDrag, setActiveDrag] =
|
|
25426
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25427
|
-
const meta =
|
|
25810
|
+
const [activeDrag, setActiveDrag] = React87__default.useState(null);
|
|
25811
|
+
const [overZoneGroup, setOverZoneGroup] = React87__default.useState(null);
|
|
25812
|
+
const meta = React87__default.useMemo(
|
|
25428
25813
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25429
25814
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25430
25815
|
);
|
|
25431
|
-
|
|
25816
|
+
React87__default.useEffect(() => {
|
|
25432
25817
|
const target = isRoot ? null : parentRoot;
|
|
25433
25818
|
if (!target) {
|
|
25434
25819
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25447,7 +25832,7 @@ function useDataDnd(args) {
|
|
|
25447
25832
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25448
25833
|
const sensors = useAlmadarDndSensors(true);
|
|
25449
25834
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25450
|
-
const findZoneByItem =
|
|
25835
|
+
const findZoneByItem = React87__default.useCallback(
|
|
25451
25836
|
(id) => {
|
|
25452
25837
|
for (const z of zonesRef.current.values()) {
|
|
25453
25838
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25456,7 +25841,7 @@ function useDataDnd(args) {
|
|
|
25456
25841
|
},
|
|
25457
25842
|
[]
|
|
25458
25843
|
);
|
|
25459
|
-
|
|
25844
|
+
React87__default.useCallback(
|
|
25460
25845
|
(group) => {
|
|
25461
25846
|
for (const z of zonesRef.current.values()) {
|
|
25462
25847
|
if (z.group === group) return z;
|
|
@@ -25465,7 +25850,7 @@ function useDataDnd(args) {
|
|
|
25465
25850
|
},
|
|
25466
25851
|
[]
|
|
25467
25852
|
);
|
|
25468
|
-
const handleDragEnd =
|
|
25853
|
+
const handleDragEnd = React87__default.useCallback(
|
|
25469
25854
|
(event) => {
|
|
25470
25855
|
const { active, over } = event;
|
|
25471
25856
|
const activeIdStr = String(active.id);
|
|
@@ -25556,8 +25941,8 @@ function useDataDnd(args) {
|
|
|
25556
25941
|
},
|
|
25557
25942
|
[eventBus]
|
|
25558
25943
|
);
|
|
25559
|
-
const sortableData =
|
|
25560
|
-
const SortableItem =
|
|
25944
|
+
const sortableData = React87__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25945
|
+
const SortableItem = React87__default.useCallback(
|
|
25561
25946
|
({ id, children }) => {
|
|
25562
25947
|
const {
|
|
25563
25948
|
attributes,
|
|
@@ -25597,7 +25982,7 @@ function useDataDnd(args) {
|
|
|
25597
25982
|
id: droppableId,
|
|
25598
25983
|
data: sortableData
|
|
25599
25984
|
});
|
|
25600
|
-
const ctx =
|
|
25985
|
+
const ctx = React87__default.useContext(RootCtx);
|
|
25601
25986
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25602
25987
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25603
25988
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25612,7 +25997,7 @@ function useDataDnd(args) {
|
|
|
25612
25997
|
showForeignPlaceholder,
|
|
25613
25998
|
ctxAvailable: ctx != null
|
|
25614
25999
|
});
|
|
25615
|
-
|
|
26000
|
+
React87__default.useEffect(() => {
|
|
25616
26001
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25617
26002
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25618
26003
|
return /* @__PURE__ */ jsx(
|
|
@@ -25626,11 +26011,11 @@ function useDataDnd(args) {
|
|
|
25626
26011
|
}
|
|
25627
26012
|
);
|
|
25628
26013
|
};
|
|
25629
|
-
const rootContextValue =
|
|
26014
|
+
const rootContextValue = React87__default.useMemo(
|
|
25630
26015
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25631
26016
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25632
26017
|
);
|
|
25633
|
-
const handleDragStart =
|
|
26018
|
+
const handleDragStart = React87__default.useCallback((event) => {
|
|
25634
26019
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25635
26020
|
const rect = event.active.rect.current.initial;
|
|
25636
26021
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25649,7 +26034,7 @@ function useDataDnd(args) {
|
|
|
25649
26034
|
isRoot
|
|
25650
26035
|
});
|
|
25651
26036
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25652
|
-
const handleDragOver =
|
|
26037
|
+
const handleDragOver = React87__default.useCallback((event) => {
|
|
25653
26038
|
const { active, over } = event;
|
|
25654
26039
|
const overData = over?.data?.current;
|
|
25655
26040
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25719,7 +26104,7 @@ function useDataDnd(args) {
|
|
|
25719
26104
|
return next;
|
|
25720
26105
|
});
|
|
25721
26106
|
}, []);
|
|
25722
|
-
const handleDragCancel =
|
|
26107
|
+
const handleDragCancel = React87__default.useCallback((event) => {
|
|
25723
26108
|
setActiveDrag(null);
|
|
25724
26109
|
setOverZoneGroup(null);
|
|
25725
26110
|
dndLog.warn("dragCancel", {
|
|
@@ -25727,12 +26112,12 @@ function useDataDnd(args) {
|
|
|
25727
26112
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25728
26113
|
});
|
|
25729
26114
|
}, []);
|
|
25730
|
-
const handleDragEndWithCleanup =
|
|
26115
|
+
const handleDragEndWithCleanup = React87__default.useCallback((event) => {
|
|
25731
26116
|
handleDragEnd(event);
|
|
25732
26117
|
setActiveDrag(null);
|
|
25733
26118
|
setOverZoneGroup(null);
|
|
25734
26119
|
}, [handleDragEnd]);
|
|
25735
|
-
const wrapContainer =
|
|
26120
|
+
const wrapContainer = React87__default.useCallback(
|
|
25736
26121
|
(children) => {
|
|
25737
26122
|
if (!enabled) return children;
|
|
25738
26123
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25786,7 +26171,7 @@ var init_useDataDnd = __esm({
|
|
|
25786
26171
|
init_useAlmadarDndCollision();
|
|
25787
26172
|
init_Box();
|
|
25788
26173
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25789
|
-
RootCtx =
|
|
26174
|
+
RootCtx = React87__default.createContext(null);
|
|
25790
26175
|
}
|
|
25791
26176
|
});
|
|
25792
26177
|
function renderIconInput(icon, props) {
|
|
@@ -26301,7 +26686,7 @@ function DataList({
|
|
|
26301
26686
|
}) {
|
|
26302
26687
|
const eventBus = useEventBus();
|
|
26303
26688
|
const { t } = useTranslate();
|
|
26304
|
-
const [visibleCount, setVisibleCount] =
|
|
26689
|
+
const [visibleCount, setVisibleCount] = React87__default.useState(pageSize || Infinity);
|
|
26305
26690
|
const fieldDefs = fields ?? columns ?? [];
|
|
26306
26691
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26307
26692
|
const dnd = useDataDnd({
|
|
@@ -26317,14 +26702,14 @@ function DataList({
|
|
|
26317
26702
|
dndRoot
|
|
26318
26703
|
});
|
|
26319
26704
|
const orderedData = dnd.orderedItems;
|
|
26320
|
-
const allData =
|
|
26705
|
+
const allData = React87__default.useMemo(
|
|
26321
26706
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
26322
26707
|
[orderedData, sortBy, sortDirection]
|
|
26323
26708
|
);
|
|
26324
26709
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26325
26710
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26326
26711
|
const hasRenderProp = typeof children === "function";
|
|
26327
|
-
|
|
26712
|
+
React87__default.useEffect(() => {
|
|
26328
26713
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26329
26714
|
const childrenTypeOf = typeof children;
|
|
26330
26715
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26444,7 +26829,7 @@ function DataList({
|
|
|
26444
26829
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
26445
26830
|
};
|
|
26446
26831
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
26447
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26832
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
26448
26833
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26449
26834
|
group.items.map((itemData, index) => {
|
|
26450
26835
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26660,7 +27045,7 @@ function DataList({
|
|
|
26660
27045
|
className
|
|
26661
27046
|
),
|
|
26662
27047
|
children: [
|
|
26663
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
27048
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
26664
27049
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26665
27050
|
group.items.map(
|
|
26666
27051
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26747,7 +27132,7 @@ var init_FormSection = __esm({
|
|
|
26747
27132
|
columns = 1,
|
|
26748
27133
|
className
|
|
26749
27134
|
}) => {
|
|
26750
|
-
const [collapsed, setCollapsed] =
|
|
27135
|
+
const [collapsed, setCollapsed] = React87__default.useState(defaultCollapsed);
|
|
26751
27136
|
const { t } = useTranslate();
|
|
26752
27137
|
const eventBus = useEventBus();
|
|
26753
27138
|
const gridClass = {
|
|
@@ -26755,7 +27140,7 @@ var init_FormSection = __esm({
|
|
|
26755
27140
|
2: "grid-cols-1 md:grid-cols-2",
|
|
26756
27141
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
26757
27142
|
}[columns];
|
|
26758
|
-
|
|
27143
|
+
React87__default.useCallback(() => {
|
|
26759
27144
|
if (collapsible) {
|
|
26760
27145
|
setCollapsed((prev) => !prev);
|
|
26761
27146
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27053,6 +27438,13 @@ function fileIcon(name) {
|
|
|
27053
27438
|
return "file";
|
|
27054
27439
|
}
|
|
27055
27440
|
}
|
|
27441
|
+
function siblingsOf(target, roots, childrenByParent) {
|
|
27442
|
+
if (target.parentId) {
|
|
27443
|
+
const parentSiblings = childrenByParent.get(target.parentId);
|
|
27444
|
+
if (parentSiblings?.some((sibling) => sibling.id === target.id)) return parentSiblings;
|
|
27445
|
+
}
|
|
27446
|
+
return roots;
|
|
27447
|
+
}
|
|
27056
27448
|
function ancestorsOf(id, byId) {
|
|
27057
27449
|
const out = /* @__PURE__ */ new Set();
|
|
27058
27450
|
if (!id) return out;
|
|
@@ -27070,6 +27462,8 @@ var init_FileTree = __esm({
|
|
|
27070
27462
|
init_Box();
|
|
27071
27463
|
init_Typography();
|
|
27072
27464
|
init_Icon();
|
|
27465
|
+
init_useDraggable();
|
|
27466
|
+
init_useDropZone();
|
|
27073
27467
|
TreeNodeItem = ({
|
|
27074
27468
|
node,
|
|
27075
27469
|
depth,
|
|
@@ -27153,10 +27547,12 @@ var init_FileTree = __esm({
|
|
|
27153
27547
|
depth,
|
|
27154
27548
|
indent,
|
|
27155
27549
|
childrenByParent,
|
|
27550
|
+
roots,
|
|
27156
27551
|
onNodeSelect,
|
|
27157
27552
|
onNodeAction,
|
|
27158
27553
|
nodeActionIcon,
|
|
27159
27554
|
nodeActionLabel,
|
|
27555
|
+
onNodeReorder,
|
|
27160
27556
|
selectedId,
|
|
27161
27557
|
look,
|
|
27162
27558
|
isExpanded,
|
|
@@ -27167,6 +27563,7 @@ var init_FileTree = __esm({
|
|
|
27167
27563
|
const expanded = hasChildren && isExpanded(item.id, depth);
|
|
27168
27564
|
const isSelected = selectedId !== void 0 && selectedId !== "" && item.id === selectedId;
|
|
27169
27565
|
const nav = look === "nav";
|
|
27566
|
+
const rowRef = useRef(null);
|
|
27170
27567
|
const handleClick = useCallback(() => {
|
|
27171
27568
|
if (hasChildren && !onNodeSelect) onToggle(item.id, expanded);
|
|
27172
27569
|
onNodeSelect?.(item.id);
|
|
@@ -27179,16 +27576,50 @@ var init_FileTree = __esm({
|
|
|
27179
27576
|
e.stopPropagation();
|
|
27180
27577
|
onNodeAction?.(item.id);
|
|
27181
27578
|
}, [item.id, onNodeAction]);
|
|
27579
|
+
const { dragProps } = useDraggable({
|
|
27580
|
+
payload: { kind: "tree-node", data: { id: item.id } },
|
|
27581
|
+
disabled: !onNodeReorder
|
|
27582
|
+
});
|
|
27583
|
+
const handleRowDrop = useCallback(
|
|
27584
|
+
(payload, position) => {
|
|
27585
|
+
if (!onNodeReorder) return;
|
|
27586
|
+
const draggedId = typeof payload.data.id === "string" ? payload.data.id : void 0;
|
|
27587
|
+
if (!draggedId || draggedId === item.id) return;
|
|
27588
|
+
const rect = rowRef.current?.getBoundingClientRect();
|
|
27589
|
+
if (!rect || rect.height === 0) return;
|
|
27590
|
+
const relY = position.y - rect.top;
|
|
27591
|
+
const third = rect.height / 3;
|
|
27592
|
+
if (relY >= third && relY <= third * 2) {
|
|
27593
|
+
const existingChildren = childrenByParent.get(item.id);
|
|
27594
|
+
onNodeReorder(draggedId, item.id, existingChildren ? existingChildren.length : 0);
|
|
27595
|
+
return;
|
|
27596
|
+
}
|
|
27597
|
+
const siblings = siblingsOf(item, roots, childrenByParent);
|
|
27598
|
+
const newParentId = siblings === roots ? null : item.parentId ?? null;
|
|
27599
|
+
const targetIndex = siblings.findIndex((sibling) => sibling.id === item.id);
|
|
27600
|
+
const index = relY < third ? targetIndex < 0 ? 0 : targetIndex : targetIndex < 0 ? siblings.length : targetIndex + 1;
|
|
27601
|
+
onNodeReorder(draggedId, newParentId, index);
|
|
27602
|
+
},
|
|
27603
|
+
[onNodeReorder, item, roots, childrenByParent]
|
|
27604
|
+
);
|
|
27605
|
+
const { dropProps } = useDropZone({
|
|
27606
|
+
accepts: ["tree-node"],
|
|
27607
|
+
onDrop: handleRowDrop,
|
|
27608
|
+
disabled: !onNodeReorder
|
|
27609
|
+
});
|
|
27182
27610
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27183
27611
|
/* @__PURE__ */ jsxs(
|
|
27184
27612
|
Box,
|
|
27185
27613
|
{
|
|
27614
|
+
ref: rowRef,
|
|
27186
27615
|
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"}`,
|
|
27187
27616
|
style: { paddingLeft: depth * indent + 8 },
|
|
27188
27617
|
onClick: handleClick,
|
|
27189
27618
|
role: "treeitem",
|
|
27190
27619
|
"aria-selected": isSelected,
|
|
27191
27620
|
"aria-expanded": hasChildren ? expanded : void 0,
|
|
27621
|
+
...dragProps,
|
|
27622
|
+
...dropProps,
|
|
27192
27623
|
children: [
|
|
27193
27624
|
hasChildren ? /* @__PURE__ */ jsx(Box, { onClick: handleChevron, className: "flex items-center flex-shrink-0", role: "button", "aria-label": expanded ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
|
|
27194
27625
|
Icon,
|
|
@@ -27235,10 +27666,12 @@ var init_FileTree = __esm({
|
|
|
27235
27666
|
depth: depth + 1,
|
|
27236
27667
|
indent,
|
|
27237
27668
|
childrenByParent,
|
|
27669
|
+
roots,
|
|
27238
27670
|
onNodeSelect,
|
|
27239
27671
|
onNodeAction,
|
|
27240
27672
|
nodeActionIcon,
|
|
27241
27673
|
nodeActionLabel,
|
|
27674
|
+
onNodeReorder,
|
|
27242
27675
|
selectedId,
|
|
27243
27676
|
look,
|
|
27244
27677
|
isExpanded,
|
|
@@ -27256,14 +27689,15 @@ var init_FileTree = __esm({
|
|
|
27256
27689
|
onNodeAction,
|
|
27257
27690
|
nodeActionIcon,
|
|
27258
27691
|
nodeActionLabel,
|
|
27692
|
+
onNodeReorder,
|
|
27259
27693
|
className,
|
|
27260
27694
|
indent = 16
|
|
27261
27695
|
}) => {
|
|
27262
27696
|
const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
|
|
27263
|
-
const byId =
|
|
27264
|
-
const selectedAncestors =
|
|
27265
|
-
const lastSelectedRef =
|
|
27266
|
-
|
|
27697
|
+
const byId = React87__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
|
|
27698
|
+
const selectedAncestors = React87__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
|
|
27699
|
+
const lastSelectedRef = React87__default.useRef(selectedId);
|
|
27700
|
+
React87__default.useEffect(() => {
|
|
27267
27701
|
if (selectedId === lastSelectedRef.current) return;
|
|
27268
27702
|
lastSelectedRef.current = selectedId;
|
|
27269
27703
|
setOverrides((prev) => {
|
|
@@ -27304,10 +27738,12 @@ var init_FileTree = __esm({
|
|
|
27304
27738
|
depth: 0,
|
|
27305
27739
|
indent,
|
|
27306
27740
|
childrenByParent,
|
|
27741
|
+
roots,
|
|
27307
27742
|
onNodeSelect,
|
|
27308
27743
|
onNodeAction,
|
|
27309
27744
|
nodeActionIcon,
|
|
27310
27745
|
nodeActionLabel,
|
|
27746
|
+
onNodeReorder,
|
|
27311
27747
|
selectedId,
|
|
27312
27748
|
look,
|
|
27313
27749
|
isExpanded,
|
|
@@ -27327,6 +27763,7 @@ var init_FileTree = __esm({
|
|
|
27327
27763
|
onNodeAction,
|
|
27328
27764
|
nodeActionIcon,
|
|
27329
27765
|
nodeActionLabel,
|
|
27766
|
+
onNodeReorder,
|
|
27330
27767
|
className,
|
|
27331
27768
|
indent = 16
|
|
27332
27769
|
}) => {
|
|
@@ -27341,6 +27778,7 @@ var init_FileTree = __esm({
|
|
|
27341
27778
|
onNodeAction,
|
|
27342
27779
|
nodeActionIcon,
|
|
27343
27780
|
nodeActionLabel,
|
|
27781
|
+
onNodeReorder,
|
|
27344
27782
|
className,
|
|
27345
27783
|
indent
|
|
27346
27784
|
}
|
|
@@ -28029,7 +28467,7 @@ var init_Flex = __esm({
|
|
|
28029
28467
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
28030
28468
|
}
|
|
28031
28469
|
}
|
|
28032
|
-
return
|
|
28470
|
+
return React87__default.createElement(Component, {
|
|
28033
28471
|
className: cn(
|
|
28034
28472
|
inline ? "inline-flex" : "flex",
|
|
28035
28473
|
directionStyles[direction],
|
|
@@ -28148,7 +28586,7 @@ var init_Grid = __esm({
|
|
|
28148
28586
|
as: Component = "div"
|
|
28149
28587
|
}) => {
|
|
28150
28588
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
28151
|
-
return
|
|
28589
|
+
return React87__default.createElement(
|
|
28152
28590
|
Component,
|
|
28153
28591
|
{
|
|
28154
28592
|
className: cn(
|
|
@@ -28570,9 +29008,9 @@ var init_Popover = __esm({
|
|
|
28570
29008
|
onMouseLeave: handleClose,
|
|
28571
29009
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
28572
29010
|
};
|
|
28573
|
-
const childElement =
|
|
29011
|
+
const childElement = React87__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28574
29012
|
const childPointerDown = childElement.props.onPointerDown;
|
|
28575
|
-
const triggerElement =
|
|
29013
|
+
const triggerElement = React87__default.cloneElement(
|
|
28576
29014
|
childElement,
|
|
28577
29015
|
{
|
|
28578
29016
|
ref: triggerRef,
|
|
@@ -29186,9 +29624,9 @@ var init_Tooltip = __esm({
|
|
|
29186
29624
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
29187
29625
|
};
|
|
29188
29626
|
}, []);
|
|
29189
|
-
const triggerElement =
|
|
29627
|
+
const triggerElement = React87__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29190
29628
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
29191
|
-
const trigger =
|
|
29629
|
+
const trigger = React87__default.cloneElement(triggerElement, {
|
|
29192
29630
|
ref: triggerRef,
|
|
29193
29631
|
onMouseEnter: handleMouseEnter,
|
|
29194
29632
|
onMouseLeave: handleMouseLeave,
|
|
@@ -29278,7 +29716,7 @@ var init_WizardProgress = __esm({
|
|
|
29278
29716
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
29279
29717
|
const isActive = index === currentStep;
|
|
29280
29718
|
const isCompleted = index < currentStep;
|
|
29281
|
-
return /* @__PURE__ */ jsxs(
|
|
29719
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
29282
29720
|
/* @__PURE__ */ jsx(
|
|
29283
29721
|
"button",
|
|
29284
29722
|
{
|
|
@@ -30340,6 +30778,8 @@ var init_MathCanvas = __esm({
|
|
|
30340
30778
|
gridColor = "var(--color-border, #9ca3af)",
|
|
30341
30779
|
axisColor = "var(--color-muted-foreground, #374151)",
|
|
30342
30780
|
showTickLabels = false,
|
|
30781
|
+
tickLabelFontSize = 10,
|
|
30782
|
+
labelFontSize = 12,
|
|
30343
30783
|
showCurveLabels = false,
|
|
30344
30784
|
curves = [],
|
|
30345
30785
|
points = [],
|
|
@@ -30411,18 +30851,18 @@ var init_MathCanvas = __esm({
|
|
|
30411
30851
|
let kx = 0;
|
|
30412
30852
|
for (let x = Math.ceil(xMin / gridStep) * gridStep; x <= xMax; x += gridStep, kx++) {
|
|
30413
30853
|
if (kx % labelEveryX === 0 && x !== 0) {
|
|
30414
|
-
out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize:
|
|
30854
|
+
out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize: tickLabelFontSize, align: "center" });
|
|
30415
30855
|
}
|
|
30416
30856
|
}
|
|
30417
30857
|
const labelEveryY = Math.max(1, Math.ceil((yMax - yMin) / gridStep / Math.floor(plotH / 28)));
|
|
30418
30858
|
let ky = 0;
|
|
30419
30859
|
for (let y = Math.ceil(yMin / gridStep) * gridStep; y <= yMax; y += gridStep, ky++) {
|
|
30420
30860
|
if (ky % labelEveryY === 0 && y !== 0) {
|
|
30421
|
-
out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize:
|
|
30861
|
+
out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
|
|
30422
30862
|
}
|
|
30423
30863
|
}
|
|
30424
30864
|
if (xMin <= 0 && xMax >= 0 && yMin <= 0 && yMax >= 0) {
|
|
30425
|
-
out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize:
|
|
30865
|
+
out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
|
|
30426
30866
|
}
|
|
30427
30867
|
}
|
|
30428
30868
|
for (const region of regions) {
|
|
@@ -30453,7 +30893,7 @@ var init_MathCanvas = __esm({
|
|
|
30453
30893
|
y: (mapY(region.samples[mid].y) + mapY(baseline)) / 2,
|
|
30454
30894
|
text: region.label,
|
|
30455
30895
|
color,
|
|
30456
|
-
fontSize:
|
|
30896
|
+
fontSize: labelFontSize
|
|
30457
30897
|
});
|
|
30458
30898
|
}
|
|
30459
30899
|
}
|
|
@@ -30492,7 +30932,7 @@ var init_MathCanvas = __esm({
|
|
|
30492
30932
|
const py = mapY(guide.at);
|
|
30493
30933
|
out.push({ type: "line", x1: margin, y1: py, x2: width - margin, y2: py, color, dash });
|
|
30494
30934
|
if (guide.label) {
|
|
30495
|
-
out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize:
|
|
30935
|
+
out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize: labelFontSize, align: "right" });
|
|
30496
30936
|
}
|
|
30497
30937
|
}
|
|
30498
30938
|
}
|
|
@@ -30535,7 +30975,7 @@ var init_MathCanvas = __esm({
|
|
|
30535
30975
|
y: mapY(lastInRange.y) - 6,
|
|
30536
30976
|
text: curve.label,
|
|
30537
30977
|
color: curve.color ?? "#2563eb",
|
|
30538
|
-
fontSize:
|
|
30978
|
+
fontSize: labelFontSize
|
|
30539
30979
|
});
|
|
30540
30980
|
}
|
|
30541
30981
|
}
|
|
@@ -30572,7 +31012,7 @@ var init_MathCanvas = __esm({
|
|
|
30572
31012
|
y: xAxisY - peak - 8,
|
|
30573
31013
|
text: hop.label,
|
|
30574
31014
|
color,
|
|
30575
|
-
fontSize:
|
|
31015
|
+
fontSize: labelFontSize,
|
|
30576
31016
|
align: "center"
|
|
30577
31017
|
});
|
|
30578
31018
|
}
|
|
@@ -30599,7 +31039,7 @@ var init_MathCanvas = __esm({
|
|
|
30599
31039
|
y: mapY(angle.y + 1.35 * radius * Math.sin(rad)),
|
|
30600
31040
|
text: angle.label,
|
|
30601
31041
|
color,
|
|
30602
|
-
fontSize:
|
|
31042
|
+
fontSize: labelFontSize,
|
|
30603
31043
|
align: "center"
|
|
30604
31044
|
});
|
|
30605
31045
|
}
|
|
@@ -30616,7 +31056,7 @@ var init_MathCanvas = __esm({
|
|
|
30616
31056
|
fill: isOpen ? "#ffffff" : p.color ?? "#dc2626"
|
|
30617
31057
|
});
|
|
30618
31058
|
if (p.label) {
|
|
30619
|
-
out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize:
|
|
31059
|
+
out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize: labelFontSize });
|
|
30620
31060
|
}
|
|
30621
31061
|
}
|
|
30622
31062
|
for (const v of vectors) {
|
|
@@ -30627,7 +31067,7 @@ var init_MathCanvas = __esm({
|
|
|
30627
31067
|
const y2 = mapY(v.y + v.vy);
|
|
30628
31068
|
out.push({ type: "arrow", x1, y1, x2, y2, color: v.color ?? "#7c3aed", lineWidth: 2 });
|
|
30629
31069
|
if (v.label) {
|
|
30630
|
-
out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize:
|
|
31070
|
+
out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize: labelFontSize });
|
|
30631
31071
|
}
|
|
30632
31072
|
}
|
|
30633
31073
|
out.push(...shapes);
|
|
@@ -30646,6 +31086,8 @@ var init_MathCanvas = __esm({
|
|
|
30646
31086
|
gridColor,
|
|
30647
31087
|
axisColor,
|
|
30648
31088
|
showTickLabels,
|
|
31089
|
+
tickLabelFontSize,
|
|
31090
|
+
labelFontSize,
|
|
30649
31091
|
showCurveLabels,
|
|
30650
31092
|
curves,
|
|
30651
31093
|
points,
|
|
@@ -31933,13 +32375,13 @@ var init_MapView = __esm({
|
|
|
31933
32375
|
shadowSize: [41, 41]
|
|
31934
32376
|
});
|
|
31935
32377
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
31936
|
-
const { useEffect:
|
|
32378
|
+
const { useEffect: useEffect64, useRef: useRef65, useCallback: useCallback93, useState: useState99 } = React87__default;
|
|
31937
32379
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
31938
32380
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
31939
32381
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
31940
32382
|
const map = useMap();
|
|
31941
|
-
const prevRef =
|
|
31942
|
-
|
|
32383
|
+
const prevRef = useRef65({ centerLat, centerLng, zoom });
|
|
32384
|
+
useEffect64(() => {
|
|
31943
32385
|
const prev = prevRef.current;
|
|
31944
32386
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
31945
32387
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -31950,7 +32392,7 @@ var init_MapView = __esm({
|
|
|
31950
32392
|
}
|
|
31951
32393
|
function MapClickHandler({ onMapClick }) {
|
|
31952
32394
|
const map = useMap();
|
|
31953
|
-
|
|
32395
|
+
useEffect64(() => {
|
|
31954
32396
|
if (!onMapClick) return;
|
|
31955
32397
|
const handler = (e) => {
|
|
31956
32398
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -31978,8 +32420,8 @@ var init_MapView = __esm({
|
|
|
31978
32420
|
showAttribution = true
|
|
31979
32421
|
}) {
|
|
31980
32422
|
const eventBus = useEventBus2();
|
|
31981
|
-
const [clickedPosition, setClickedPosition] =
|
|
31982
|
-
const handleMapClick =
|
|
32423
|
+
const [clickedPosition, setClickedPosition] = useState99(null);
|
|
32424
|
+
const handleMapClick = useCallback93((lat, lng) => {
|
|
31983
32425
|
if (showClickedPin) {
|
|
31984
32426
|
setClickedPosition({ lat, lng });
|
|
31985
32427
|
}
|
|
@@ -31988,7 +32430,7 @@ var init_MapView = __esm({
|
|
|
31988
32430
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
31989
32431
|
}
|
|
31990
32432
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
31991
|
-
const handleMarkerClick =
|
|
32433
|
+
const handleMarkerClick = useCallback93((marker) => {
|
|
31992
32434
|
onMarkerClick?.(marker);
|
|
31993
32435
|
if (markerClickEvent) {
|
|
31994
32436
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -32878,8 +33320,8 @@ function TableView({
|
|
|
32878
33320
|
}) {
|
|
32879
33321
|
const eventBus = useEventBus();
|
|
32880
33322
|
const { t } = useTranslate();
|
|
32881
|
-
const [visibleCount, setVisibleCount] =
|
|
32882
|
-
const [localSelected, setLocalSelected] =
|
|
33323
|
+
const [visibleCount, setVisibleCount] = React87__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
33324
|
+
const [localSelected, setLocalSelected] = React87__default.useState(/* @__PURE__ */ new Set());
|
|
32883
33325
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
32884
33326
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
32885
33327
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -32900,7 +33342,7 @@ function TableView({
|
|
|
32900
33342
|
const hasMore = pageSize > 0 && visibleCount < ordered2.length;
|
|
32901
33343
|
const hasRenderProp = typeof children === "function";
|
|
32902
33344
|
const idField = dndItemIdField ?? "id";
|
|
32903
|
-
|
|
33345
|
+
React87__default.useEffect(() => {
|
|
32904
33346
|
tableViewLog.debug("render", {
|
|
32905
33347
|
rowCount: data.length,
|
|
32906
33348
|
colCount: colDefs.length,
|
|
@@ -32950,7 +33392,7 @@ function TableView({
|
|
|
32950
33392
|
};
|
|
32951
33393
|
eventBus.emit(`UI:${rowClickEvent}`, payload);
|
|
32952
33394
|
};
|
|
32953
|
-
const colFloors =
|
|
33395
|
+
const colFloors = React87__default.useMemo(
|
|
32954
33396
|
() => colDefs.map((col) => {
|
|
32955
33397
|
const longest = data.reduce((widest, row) => {
|
|
32956
33398
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -33093,12 +33535,12 @@ function TableView({
|
|
|
33093
33535
|
]
|
|
33094
33536
|
}
|
|
33095
33537
|
);
|
|
33096
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
33538
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React87__default.Fragment, { children: rowInner }, id);
|
|
33097
33539
|
};
|
|
33098
33540
|
const items = Array.from(data);
|
|
33099
33541
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
33100
33542
|
let runningIndex = 0;
|
|
33101
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
33543
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
33102
33544
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
33103
33545
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
33104
33546
|
] }, gi)) });
|
|
@@ -34329,7 +34771,7 @@ var init_StepFlow = __esm({
|
|
|
34329
34771
|
className
|
|
34330
34772
|
}) => {
|
|
34331
34773
|
if (orientation === "vertical") {
|
|
34332
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
34774
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React87__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
34333
34775
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
34334
34776
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34335
34777
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -34340,7 +34782,7 @@ var init_StepFlow = __esm({
|
|
|
34340
34782
|
] })
|
|
34341
34783
|
] }) }, index)) });
|
|
34342
34784
|
}
|
|
34343
|
-
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(
|
|
34785
|
+
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(React87__default.Fragment, { children: [
|
|
34344
34786
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
34345
34787
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34346
34788
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -35330,7 +35772,7 @@ var init_LikertScale = __esm({
|
|
|
35330
35772
|
md: "text-base",
|
|
35331
35773
|
lg: "text-lg"
|
|
35332
35774
|
};
|
|
35333
|
-
LikertScale =
|
|
35775
|
+
LikertScale = React87__default.forwardRef(
|
|
35334
35776
|
({
|
|
35335
35777
|
question,
|
|
35336
35778
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -35342,7 +35784,7 @@ var init_LikertScale = __esm({
|
|
|
35342
35784
|
variant = "radios",
|
|
35343
35785
|
className
|
|
35344
35786
|
}, ref) => {
|
|
35345
|
-
const groupId =
|
|
35787
|
+
const groupId = React87__default.useId();
|
|
35346
35788
|
const eventBus = useEventBus();
|
|
35347
35789
|
const handleSelect = useCallback(
|
|
35348
35790
|
(next) => {
|
|
@@ -37765,7 +38207,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
37765
38207
|
"aria-label": t("aria.breadcrumb"),
|
|
37766
38208
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
37767
38209
|
const isLast = idx === items.length - 1;
|
|
37768
|
-
return /* @__PURE__ */ jsxs(
|
|
38210
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
37769
38211
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
37770
38212
|
Icon,
|
|
37771
38213
|
{
|
|
@@ -38634,7 +39076,7 @@ var init_MiniStateMachine = __esm({
|
|
|
38634
39076
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
38635
39077
|
const tc = transitionCounts[s.name] ?? 0;
|
|
38636
39078
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
38637
|
-
return /* @__PURE__ */ jsxs(
|
|
39079
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
38638
39080
|
/* @__PURE__ */ jsx(
|
|
38639
39081
|
AvlState,
|
|
38640
39082
|
{
|
|
@@ -38839,7 +39281,7 @@ var init_PageHeader = __esm({
|
|
|
38839
39281
|
info: "bg-info/10 text-info"
|
|
38840
39282
|
};
|
|
38841
39283
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
38842
|
-
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(
|
|
39284
|
+
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(React87__default.Fragment, { children: [
|
|
38843
39285
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
38844
39286
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
38845
39287
|
"a",
|
|
@@ -39197,7 +39639,7 @@ var init_Section = __esm({
|
|
|
39197
39639
|
as: Component = "section"
|
|
39198
39640
|
}) => {
|
|
39199
39641
|
const hasHeader = title || description || action;
|
|
39200
|
-
return
|
|
39642
|
+
return React87__default.createElement(
|
|
39201
39643
|
Component,
|
|
39202
39644
|
{
|
|
39203
39645
|
className: cn(
|
|
@@ -39571,7 +40013,7 @@ var init_WizardContainer = __esm({
|
|
|
39571
40013
|
const isCompleted = index < currentStep;
|
|
39572
40014
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
39573
40015
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
39574
|
-
return /* @__PURE__ */ jsxs(
|
|
40016
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
39575
40017
|
/* @__PURE__ */ jsx(
|
|
39576
40018
|
Button,
|
|
39577
40019
|
{
|
|
@@ -41358,7 +41800,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
41358
41800
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
41359
41801
|
const summary = fieldSummary(unit);
|
|
41360
41802
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
41361
|
-
return /* @__PURE__ */ jsxs(
|
|
41803
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
41362
41804
|
/* @__PURE__ */ jsxs(
|
|
41363
41805
|
Box,
|
|
41364
41806
|
{
|
|
@@ -41455,7 +41897,7 @@ var init_ImportProgress = __esm({
|
|
|
41455
41897
|
PIPELINE.map((key, index) => {
|
|
41456
41898
|
const isComplete = index < currentIndex;
|
|
41457
41899
|
const isActive = index === currentIndex;
|
|
41458
|
-
return /* @__PURE__ */ jsxs(
|
|
41900
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
41459
41901
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
41460
41902
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
41461
41903
|
/* @__PURE__ */ jsx(
|
|
@@ -41583,6 +42025,69 @@ var init_ReflectionBlock = __esm({
|
|
|
41583
42025
|
ReflectionBlock.displayName = "ReflectionBlock";
|
|
41584
42026
|
}
|
|
41585
42027
|
});
|
|
42028
|
+
var positionClasses, FloatingToolbar;
|
|
42029
|
+
var init_FloatingToolbar = __esm({
|
|
42030
|
+
"components/core/molecules/FloatingToolbar.tsx"() {
|
|
42031
|
+
"use client";
|
|
42032
|
+
init_Button();
|
|
42033
|
+
init_Box();
|
|
42034
|
+
init_Divider();
|
|
42035
|
+
init_Typography();
|
|
42036
|
+
init_ButtonGroup();
|
|
42037
|
+
init_cn();
|
|
42038
|
+
init_useEventBus();
|
|
42039
|
+
positionClasses = {
|
|
42040
|
+
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
42041
|
+
"bottom-left": "bottom-6 left-6",
|
|
42042
|
+
"bottom-right": "bottom-6 right-6"
|
|
42043
|
+
};
|
|
42044
|
+
FloatingToolbar = ({
|
|
42045
|
+
items,
|
|
42046
|
+
position = "bottom-center",
|
|
42047
|
+
children,
|
|
42048
|
+
className
|
|
42049
|
+
}) => {
|
|
42050
|
+
const eventBus = useEventBus();
|
|
42051
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position]), children: /* @__PURE__ */ jsxs(
|
|
42052
|
+
ButtonGroup,
|
|
42053
|
+
{
|
|
42054
|
+
variant: "default",
|
|
42055
|
+
orientation: "horizontal",
|
|
42056
|
+
className: cn(
|
|
42057
|
+
"items-center gap-1 rounded-full border border-border",
|
|
42058
|
+
"bg-card/95 backdrop-blur-sm shadow-elevation-popover p-1",
|
|
42059
|
+
className
|
|
42060
|
+
),
|
|
42061
|
+
children: [
|
|
42062
|
+
items.map((item) => /* @__PURE__ */ jsx(
|
|
42063
|
+
Button,
|
|
42064
|
+
{
|
|
42065
|
+
variant: item.active ? "primary" : "ghost",
|
|
42066
|
+
size: "sm",
|
|
42067
|
+
icon: item.icon,
|
|
42068
|
+
action: item.action,
|
|
42069
|
+
actionPayload: item.actionPayload,
|
|
42070
|
+
disabled: item.disabled,
|
|
42071
|
+
"aria-pressed": item.active,
|
|
42072
|
+
"aria-label": item.label,
|
|
42073
|
+
className: "rounded-full",
|
|
42074
|
+
"data-testid": item.testId ?? `floating-toolbar-item-${item.id}`,
|
|
42075
|
+
onClick: () => {
|
|
42076
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { actionId: item.id });
|
|
42077
|
+
},
|
|
42078
|
+
children: /* @__PURE__ */ jsx(Typography, { as: "span", className: "sr-only", children: item.label })
|
|
42079
|
+
},
|
|
42080
|
+
item.id
|
|
42081
|
+
)),
|
|
42082
|
+
children && items.length > 0 && /* @__PURE__ */ jsx(Divider, { orientation: "vertical", className: "h-6 mx-1" }),
|
|
42083
|
+
children
|
|
42084
|
+
]
|
|
42085
|
+
}
|
|
42086
|
+
) });
|
|
42087
|
+
};
|
|
42088
|
+
FloatingToolbar.displayName = "FloatingToolbar";
|
|
42089
|
+
}
|
|
42090
|
+
});
|
|
41586
42091
|
|
|
41587
42092
|
// components/core/molecules/index.ts
|
|
41588
42093
|
var init_molecules2 = __esm({
|
|
@@ -42333,7 +42838,7 @@ var init_DetailPanel = __esm({
|
|
|
42333
42838
|
}) => {
|
|
42334
42839
|
const eventBus = useEventBus();
|
|
42335
42840
|
const { t } = useTranslate();
|
|
42336
|
-
const [titleDraft, setTitleDraft] =
|
|
42841
|
+
const [titleDraft, setTitleDraft] = React87__default.useState(null);
|
|
42337
42842
|
const isFieldDefArray = (arr) => {
|
|
42338
42843
|
if (!arr || arr.length === 0) return false;
|
|
42339
42844
|
const first = arr[0];
|
|
@@ -42726,8 +43231,224 @@ var init_DetailPanel = __esm({
|
|
|
42726
43231
|
DetailPanel.displayName = "DetailPanel";
|
|
42727
43232
|
}
|
|
42728
43233
|
});
|
|
43234
|
+
var SplitPane;
|
|
43235
|
+
var init_SplitPane = __esm({
|
|
43236
|
+
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
43237
|
+
"use client";
|
|
43238
|
+
init_cn();
|
|
43239
|
+
SplitPane = ({
|
|
43240
|
+
direction = "horizontal",
|
|
43241
|
+
ratio: ratioProp = 50,
|
|
43242
|
+
minSize = 100,
|
|
43243
|
+
resizable = true,
|
|
43244
|
+
left,
|
|
43245
|
+
right,
|
|
43246
|
+
className,
|
|
43247
|
+
leftClassName,
|
|
43248
|
+
rightClassName,
|
|
43249
|
+
onRatioChange
|
|
43250
|
+
}) => {
|
|
43251
|
+
const [uncontrolledRatio, setUncontrolledRatio] = useState(ratioProp);
|
|
43252
|
+
const ratio = onRatioChange ? ratioProp : uncontrolledRatio;
|
|
43253
|
+
const containerRef = useRef(null);
|
|
43254
|
+
const isDragging = useRef(false);
|
|
43255
|
+
const handlePointerDown = useCallback(
|
|
43256
|
+
(e) => {
|
|
43257
|
+
if (!resizable) return;
|
|
43258
|
+
e.preventDefault();
|
|
43259
|
+
isDragging.current = true;
|
|
43260
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
43261
|
+
const handlePointerMove = (ev) => {
|
|
43262
|
+
if (!isDragging.current || !containerRef.current) return;
|
|
43263
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
43264
|
+
let newRatio;
|
|
43265
|
+
if (direction === "horizontal") {
|
|
43266
|
+
const x = ev.clientX - rect.left;
|
|
43267
|
+
newRatio = x / rect.width * 100;
|
|
43268
|
+
} else {
|
|
43269
|
+
const y = ev.clientY - rect.top;
|
|
43270
|
+
newRatio = y / rect.height * 100;
|
|
43271
|
+
}
|
|
43272
|
+
const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
|
|
43273
|
+
const maxRatio = 100 - minRatio;
|
|
43274
|
+
newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
|
|
43275
|
+
if (onRatioChange) {
|
|
43276
|
+
onRatioChange(newRatio);
|
|
43277
|
+
} else {
|
|
43278
|
+
setUncontrolledRatio(newRatio);
|
|
43279
|
+
}
|
|
43280
|
+
};
|
|
43281
|
+
const handlePointerUp = () => {
|
|
43282
|
+
isDragging.current = false;
|
|
43283
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
43284
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
43285
|
+
document.removeEventListener("pointercancel", handlePointerUp);
|
|
43286
|
+
};
|
|
43287
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
43288
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
43289
|
+
document.addEventListener("pointercancel", handlePointerUp);
|
|
43290
|
+
},
|
|
43291
|
+
[direction, minSize, resizable, onRatioChange]
|
|
43292
|
+
);
|
|
43293
|
+
const isHorizontal = direction === "horizontal";
|
|
43294
|
+
return /* @__PURE__ */ jsxs(
|
|
43295
|
+
"div",
|
|
43296
|
+
{
|
|
43297
|
+
ref: containerRef,
|
|
43298
|
+
className: cn(
|
|
43299
|
+
"flex w-full h-full",
|
|
43300
|
+
isHorizontal ? "flex-row" : "flex-col",
|
|
43301
|
+
className
|
|
43302
|
+
),
|
|
43303
|
+
children: [
|
|
43304
|
+
/* @__PURE__ */ jsx(
|
|
43305
|
+
"div",
|
|
43306
|
+
{
|
|
43307
|
+
className: cn("flex flex-col overflow-auto", leftClassName),
|
|
43308
|
+
style: {
|
|
43309
|
+
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
43310
|
+
flexShrink: 0
|
|
43311
|
+
},
|
|
43312
|
+
children: left
|
|
43313
|
+
}
|
|
43314
|
+
),
|
|
43315
|
+
resizable && /* @__PURE__ */ jsx(
|
|
43316
|
+
"div",
|
|
43317
|
+
{
|
|
43318
|
+
onPointerDown: handlePointerDown,
|
|
43319
|
+
className: cn(
|
|
43320
|
+
"flex-shrink-0 bg-border transition-colors touch-none",
|
|
43321
|
+
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"
|
|
43322
|
+
)
|
|
43323
|
+
}
|
|
43324
|
+
),
|
|
43325
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex flex-col flex-1 min-h-0 min-w-0 overflow-auto", rightClassName), children: right })
|
|
43326
|
+
]
|
|
43327
|
+
}
|
|
43328
|
+
);
|
|
43329
|
+
};
|
|
43330
|
+
SplitPane.displayName = "SplitPane";
|
|
43331
|
+
}
|
|
43332
|
+
});
|
|
43333
|
+
var DockLayout;
|
|
43334
|
+
var init_DockLayout = __esm({
|
|
43335
|
+
"components/core/organisms/layout/DockLayout.tsx"() {
|
|
43336
|
+
"use client";
|
|
43337
|
+
init_Box();
|
|
43338
|
+
init_Stack();
|
|
43339
|
+
init_cn();
|
|
43340
|
+
init_SplitPane();
|
|
43341
|
+
DockLayout = ({
|
|
43342
|
+
rail,
|
|
43343
|
+
sidebar,
|
|
43344
|
+
main,
|
|
43345
|
+
bottomPanel,
|
|
43346
|
+
statusBar,
|
|
43347
|
+
secondarySidebar,
|
|
43348
|
+
railWidth = 56,
|
|
43349
|
+
secondarySidebarWidth = 280,
|
|
43350
|
+
sidebarCollapsed = false,
|
|
43351
|
+
sidebarWidth = 20,
|
|
43352
|
+
onSidebarWidthChange,
|
|
43353
|
+
sidebarMinSize = 160,
|
|
43354
|
+
bottomPanelCollapsed = false,
|
|
43355
|
+
bottomPanelHeight = 30,
|
|
43356
|
+
onBottomPanelHeightChange,
|
|
43357
|
+
bottomPanelMinSize = 120,
|
|
43358
|
+
secondarySidebarCollapsed = false,
|
|
43359
|
+
className,
|
|
43360
|
+
railClassName,
|
|
43361
|
+
sidebarClassName,
|
|
43362
|
+
mainClassName,
|
|
43363
|
+
bottomPanelClassName,
|
|
43364
|
+
statusBarClassName,
|
|
43365
|
+
secondarySidebarClassName
|
|
43366
|
+
}) => {
|
|
43367
|
+
const showSidebar = Boolean(sidebar) && !sidebarCollapsed;
|
|
43368
|
+
const showBottomPanel = Boolean(bottomPanel) && !bottomPanelCollapsed;
|
|
43369
|
+
const showSecondarySidebar = Boolean(secondarySidebar) && !secondarySidebarCollapsed;
|
|
43370
|
+
const centerRow = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
43371
|
+
/* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 min-h-0 overflow-auto", mainClassName), children: main }),
|
|
43372
|
+
showSecondarySidebar && /* @__PURE__ */ jsx(
|
|
43373
|
+
Box,
|
|
43374
|
+
{
|
|
43375
|
+
className: cn(
|
|
43376
|
+
"flex-shrink-0 h-full overflow-auto border-l border-border",
|
|
43377
|
+
secondarySidebarClassName
|
|
43378
|
+
),
|
|
43379
|
+
style: { width: secondarySidebarWidth },
|
|
43380
|
+
children: secondarySidebar
|
|
43381
|
+
}
|
|
43382
|
+
)
|
|
43383
|
+
] });
|
|
43384
|
+
const sidebarAndCenter = showSidebar ? /* @__PURE__ */ jsx(
|
|
43385
|
+
SplitPane,
|
|
43386
|
+
{
|
|
43387
|
+
direction: "horizontal",
|
|
43388
|
+
ratio: sidebarWidth,
|
|
43389
|
+
onRatioChange: onSidebarWidthChange,
|
|
43390
|
+
minSize: sidebarMinSize,
|
|
43391
|
+
resizable: true,
|
|
43392
|
+
left: /* @__PURE__ */ jsx(Box, { className: cn("h-full overflow-auto", sidebarClassName), children: sidebar }),
|
|
43393
|
+
right: centerRow,
|
|
43394
|
+
className: "flex-1 min-h-0 min-w-0"
|
|
43395
|
+
}
|
|
43396
|
+
) : centerRow;
|
|
43397
|
+
const body = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
43398
|
+
rail && /* @__PURE__ */ jsx(
|
|
43399
|
+
Box,
|
|
43400
|
+
{
|
|
43401
|
+
className: cn(
|
|
43402
|
+
"flex-shrink-0 min-h-0 overflow-auto border-r border-border",
|
|
43403
|
+
railClassName
|
|
43404
|
+
),
|
|
43405
|
+
style: { width: railWidth },
|
|
43406
|
+
children: rail
|
|
43407
|
+
}
|
|
43408
|
+
),
|
|
43409
|
+
sidebarAndCenter
|
|
43410
|
+
] });
|
|
43411
|
+
const bodyPlusBottom = showBottomPanel ? /* @__PURE__ */ jsx(
|
|
43412
|
+
SplitPane,
|
|
43413
|
+
{
|
|
43414
|
+
direction: "vertical",
|
|
43415
|
+
ratio: 100 - bottomPanelHeight,
|
|
43416
|
+
onRatioChange: (topRatio) => onBottomPanelHeightChange?.(100 - topRatio),
|
|
43417
|
+
minSize: bottomPanelMinSize,
|
|
43418
|
+
resizable: true,
|
|
43419
|
+
left: body,
|
|
43420
|
+
right: /* @__PURE__ */ jsx(
|
|
43421
|
+
Box,
|
|
43422
|
+
{
|
|
43423
|
+
className: cn(
|
|
43424
|
+
"h-full overflow-auto border-t border-border",
|
|
43425
|
+
bottomPanelClassName
|
|
43426
|
+
),
|
|
43427
|
+
children: bottomPanel
|
|
43428
|
+
}
|
|
43429
|
+
),
|
|
43430
|
+
className: "flex-1 min-h-0"
|
|
43431
|
+
}
|
|
43432
|
+
) : body;
|
|
43433
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: cn("w-full h-full overflow-hidden", className), children: [
|
|
43434
|
+
bodyPlusBottom,
|
|
43435
|
+
statusBar && /* @__PURE__ */ jsx(
|
|
43436
|
+
Box,
|
|
43437
|
+
{
|
|
43438
|
+
className: cn(
|
|
43439
|
+
"flex-shrink-0 border-t border-border bg-background",
|
|
43440
|
+
statusBarClassName
|
|
43441
|
+
),
|
|
43442
|
+
children: statusBar
|
|
43443
|
+
}
|
|
43444
|
+
)
|
|
43445
|
+
] });
|
|
43446
|
+
};
|
|
43447
|
+
DockLayout.displayName = "DockLayout";
|
|
43448
|
+
}
|
|
43449
|
+
});
|
|
42729
43450
|
function extractTitle(children) {
|
|
42730
|
-
if (!
|
|
43451
|
+
if (!React87__default.isValidElement(children)) return void 0;
|
|
42731
43452
|
const props = children.props;
|
|
42732
43453
|
if (typeof props.title === "string") {
|
|
42733
43454
|
return props.title;
|
|
@@ -43089,7 +43810,7 @@ var init_Form = __esm({
|
|
|
43089
43810
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
43090
43811
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
43091
43812
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
43092
|
-
const normalizedInitialData =
|
|
43813
|
+
const normalizedInitialData = React87__default.useMemo(() => {
|
|
43093
43814
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
43094
43815
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
43095
43816
|
const merged = entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
@@ -43108,7 +43829,7 @@ var init_Form = __esm({
|
|
|
43108
43829
|
}
|
|
43109
43830
|
return normalized;
|
|
43110
43831
|
}, [entity, initialData]);
|
|
43111
|
-
const entityDerivedFields =
|
|
43832
|
+
const entityDerivedFields = React87__default.useMemo(() => {
|
|
43112
43833
|
if (fields && fields.length > 0) return void 0;
|
|
43113
43834
|
if (!resolvedEntity) return void 0;
|
|
43114
43835
|
return resolvedEntity.fields.map(
|
|
@@ -43129,16 +43850,16 @@ var init_Form = __esm({
|
|
|
43129
43850
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
43130
43851
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
43131
43852
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
43132
|
-
const [formData, setFormData] =
|
|
43853
|
+
const [formData, setFormData] = React87__default.useState(
|
|
43133
43854
|
normalizedInitialData
|
|
43134
43855
|
);
|
|
43135
|
-
const [collapsedSections, setCollapsedSections] =
|
|
43856
|
+
const [collapsedSections, setCollapsedSections] = React87__default.useState(
|
|
43136
43857
|
/* @__PURE__ */ new Set()
|
|
43137
43858
|
);
|
|
43138
|
-
const [submitError, setSubmitError] =
|
|
43139
|
-
const formRef =
|
|
43859
|
+
const [submitError, setSubmitError] = React87__default.useState(null);
|
|
43860
|
+
const formRef = React87__default.useRef(null);
|
|
43140
43861
|
const formMode = props.mode;
|
|
43141
|
-
const mountedRef =
|
|
43862
|
+
const mountedRef = React87__default.useRef(false);
|
|
43142
43863
|
if (!mountedRef.current) {
|
|
43143
43864
|
mountedRef.current = true;
|
|
43144
43865
|
debug("forms", "mount", {
|
|
@@ -43151,7 +43872,7 @@ var init_Form = __esm({
|
|
|
43151
43872
|
});
|
|
43152
43873
|
}
|
|
43153
43874
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
43154
|
-
const evalContext =
|
|
43875
|
+
const evalContext = React87__default.useMemo(
|
|
43155
43876
|
() => ({
|
|
43156
43877
|
formValues: formData,
|
|
43157
43878
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -43160,7 +43881,7 @@ var init_Form = __esm({
|
|
|
43160
43881
|
}),
|
|
43161
43882
|
[formData, externalContext]
|
|
43162
43883
|
);
|
|
43163
|
-
|
|
43884
|
+
React87__default.useEffect(() => {
|
|
43164
43885
|
debug("forms", "initialData-sync", {
|
|
43165
43886
|
mode: formMode,
|
|
43166
43887
|
normalizedInitialData,
|
|
@@ -43171,7 +43892,7 @@ var init_Form = __esm({
|
|
|
43171
43892
|
setFormData(normalizedInitialData);
|
|
43172
43893
|
}
|
|
43173
43894
|
}, [normalizedInitialData]);
|
|
43174
|
-
const processCalculations =
|
|
43895
|
+
const processCalculations = React87__default.useCallback(
|
|
43175
43896
|
(changedFieldId, newFormData) => {
|
|
43176
43897
|
if (!hiddenCalculations.length) return;
|
|
43177
43898
|
const context = {
|
|
@@ -43196,7 +43917,7 @@ var init_Form = __esm({
|
|
|
43196
43917
|
},
|
|
43197
43918
|
[hiddenCalculations, externalContext, eventBus]
|
|
43198
43919
|
);
|
|
43199
|
-
const checkViolations =
|
|
43920
|
+
const checkViolations = React87__default.useCallback(
|
|
43200
43921
|
(changedFieldId, newFormData) => {
|
|
43201
43922
|
if (!violationTriggers.length) return;
|
|
43202
43923
|
const context = {
|
|
@@ -43234,7 +43955,7 @@ var init_Form = __esm({
|
|
|
43234
43955
|
processCalculations(name, newFormData);
|
|
43235
43956
|
checkViolations(name, newFormData);
|
|
43236
43957
|
};
|
|
43237
|
-
const isFieldVisible =
|
|
43958
|
+
const isFieldVisible = React87__default.useCallback(
|
|
43238
43959
|
(fieldName2) => {
|
|
43239
43960
|
const condition = conditionalFields[fieldName2];
|
|
43240
43961
|
if (!condition) return true;
|
|
@@ -43242,7 +43963,7 @@ var init_Form = __esm({
|
|
|
43242
43963
|
},
|
|
43243
43964
|
[conditionalFields, evalContext]
|
|
43244
43965
|
);
|
|
43245
|
-
const isSectionVisible =
|
|
43966
|
+
const isSectionVisible = React87__default.useCallback(
|
|
43246
43967
|
(section) => {
|
|
43247
43968
|
if (!section.condition) return true;
|
|
43248
43969
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -43318,7 +44039,7 @@ var init_Form = __esm({
|
|
|
43318
44039
|
eventBus.emit(`UI:${onCancel}`);
|
|
43319
44040
|
}
|
|
43320
44041
|
};
|
|
43321
|
-
const renderField =
|
|
44042
|
+
const renderField = React87__default.useCallback(
|
|
43322
44043
|
(field) => {
|
|
43323
44044
|
const fieldName2 = field.name || field.field;
|
|
43324
44045
|
if (!fieldName2) return null;
|
|
@@ -43340,7 +44061,7 @@ var init_Form = __esm({
|
|
|
43340
44061
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
43341
44062
|
);
|
|
43342
44063
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
43343
|
-
const normalizedFields =
|
|
44064
|
+
const normalizedFields = React87__default.useMemo(() => {
|
|
43344
44065
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
43345
44066
|
return effectiveFields.map((field) => {
|
|
43346
44067
|
if (typeof field === "string") {
|
|
@@ -43375,7 +44096,7 @@ var init_Form = __esm({
|
|
|
43375
44096
|
};
|
|
43376
44097
|
});
|
|
43377
44098
|
}, [effectiveFields, resolvedEntity, fieldOverrides]);
|
|
43378
|
-
const schemaFields =
|
|
44099
|
+
const schemaFields = React87__default.useMemo(() => {
|
|
43379
44100
|
if (normalizedFields.length === 0) return null;
|
|
43380
44101
|
if (isDebugEnabled()) {
|
|
43381
44102
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -43385,7 +44106,7 @@ var init_Form = __esm({
|
|
|
43385
44106
|
}
|
|
43386
44107
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
43387
44108
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
43388
|
-
const sectionElements =
|
|
44109
|
+
const sectionElements = React87__default.useMemo(() => {
|
|
43389
44110
|
if (!sections || sections.length === 0) return null;
|
|
43390
44111
|
return sections.map((section) => {
|
|
43391
44112
|
if (!isSectionVisible(section)) {
|
|
@@ -44221,7 +44942,7 @@ var init_List = __esm({
|
|
|
44221
44942
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
44222
44943
|
return [];
|
|
44223
44944
|
}, [entity]);
|
|
44224
|
-
const getItemActions =
|
|
44945
|
+
const getItemActions = React87__default.useCallback(
|
|
44225
44946
|
(item) => {
|
|
44226
44947
|
if (!itemActions) return [];
|
|
44227
44948
|
if (typeof itemActions === "function") {
|
|
@@ -44703,7 +45424,7 @@ var init_MediaGallery = __esm({
|
|
|
44703
45424
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
44704
45425
|
);
|
|
44705
45426
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
44706
|
-
const items =
|
|
45427
|
+
const items = React87__default.useMemo(() => {
|
|
44707
45428
|
if (propItems && propItems.length > 0) return propItems;
|
|
44708
45429
|
if (entityData.length === 0) return [];
|
|
44709
45430
|
return entityData.map((record, idx) => {
|
|
@@ -44868,7 +45589,7 @@ var init_MediaGallery = __esm({
|
|
|
44868
45589
|
}
|
|
44869
45590
|
});
|
|
44870
45591
|
function extractTitle2(children) {
|
|
44871
|
-
if (!
|
|
45592
|
+
if (!React87__default.isValidElement(children)) return void 0;
|
|
44872
45593
|
const props = children.props;
|
|
44873
45594
|
if (typeof props.title === "string") {
|
|
44874
45595
|
return props.title;
|
|
@@ -45142,7 +45863,7 @@ var init_debugRegistry = __esm({
|
|
|
45142
45863
|
}
|
|
45143
45864
|
});
|
|
45144
45865
|
function useDebugData() {
|
|
45145
|
-
const [data, setData] =
|
|
45866
|
+
const [data, setData] = React87.useState(() => ({
|
|
45146
45867
|
traits: [],
|
|
45147
45868
|
ticks: [],
|
|
45148
45869
|
guards: [],
|
|
@@ -45156,7 +45877,7 @@ function useDebugData() {
|
|
|
45156
45877
|
},
|
|
45157
45878
|
lastUpdate: Date.now()
|
|
45158
45879
|
}));
|
|
45159
|
-
|
|
45880
|
+
React87.useEffect(() => {
|
|
45160
45881
|
const updateData = () => {
|
|
45161
45882
|
setData({
|
|
45162
45883
|
traits: getAllTraits(),
|
|
@@ -45265,12 +45986,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
45265
45986
|
return positions;
|
|
45266
45987
|
}
|
|
45267
45988
|
function WalkMinimap() {
|
|
45268
|
-
const [walkStep, setWalkStep] =
|
|
45269
|
-
const [traits2, setTraits] =
|
|
45270
|
-
const [coveredEdges, setCoveredEdges] =
|
|
45271
|
-
const [completedTraits, setCompletedTraits] =
|
|
45272
|
-
const prevTraitRef =
|
|
45273
|
-
|
|
45989
|
+
const [walkStep, setWalkStep] = React87.useState(null);
|
|
45990
|
+
const [traits2, setTraits] = React87.useState([]);
|
|
45991
|
+
const [coveredEdges, setCoveredEdges] = React87.useState([]);
|
|
45992
|
+
const [completedTraits, setCompletedTraits] = React87.useState(/* @__PURE__ */ new Set());
|
|
45993
|
+
const prevTraitRef = React87.useRef(null);
|
|
45994
|
+
React87.useEffect(() => {
|
|
45274
45995
|
const interval = setInterval(() => {
|
|
45275
45996
|
const w = window;
|
|
45276
45997
|
const step = w.__orbitalWalkStep;
|
|
@@ -45706,15 +46427,15 @@ var init_EntitiesTab = __esm({
|
|
|
45706
46427
|
});
|
|
45707
46428
|
function EventFlowTab({ events: events2 }) {
|
|
45708
46429
|
const { t } = useTranslate();
|
|
45709
|
-
const [filter, setFilter] =
|
|
45710
|
-
const containerRef =
|
|
45711
|
-
const [autoScroll, setAutoScroll] =
|
|
45712
|
-
|
|
46430
|
+
const [filter, setFilter] = React87.useState("all");
|
|
46431
|
+
const containerRef = React87.useRef(null);
|
|
46432
|
+
const [autoScroll, setAutoScroll] = React87.useState(true);
|
|
46433
|
+
React87.useEffect(() => {
|
|
45713
46434
|
if (autoScroll && containerRef.current) {
|
|
45714
46435
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
45715
46436
|
}
|
|
45716
46437
|
}, [events2.length, autoScroll]);
|
|
45717
|
-
const filteredEvents =
|
|
46438
|
+
const filteredEvents = React87.useMemo(() => {
|
|
45718
46439
|
if (filter === "all") return events2;
|
|
45719
46440
|
return events2.filter((e) => e.type === filter);
|
|
45720
46441
|
}, [events2, filter]);
|
|
@@ -45830,7 +46551,7 @@ var init_EventFlowTab = __esm({
|
|
|
45830
46551
|
});
|
|
45831
46552
|
function GuardsPanel({ guards }) {
|
|
45832
46553
|
const { t } = useTranslate();
|
|
45833
|
-
const [filter, setFilter] =
|
|
46554
|
+
const [filter, setFilter] = React87.useState("all");
|
|
45834
46555
|
if (guards.length === 0) {
|
|
45835
46556
|
return /* @__PURE__ */ jsx(
|
|
45836
46557
|
EmptyState,
|
|
@@ -45843,7 +46564,7 @@ function GuardsPanel({ guards }) {
|
|
|
45843
46564
|
}
|
|
45844
46565
|
const passedCount = guards.filter((g) => g.result).length;
|
|
45845
46566
|
const failedCount = guards.length - passedCount;
|
|
45846
|
-
const filteredGuards =
|
|
46567
|
+
const filteredGuards = React87.useMemo(() => {
|
|
45847
46568
|
if (filter === "all") return guards;
|
|
45848
46569
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
45849
46570
|
return guards.filter((g) => !g.result);
|
|
@@ -46006,10 +46727,10 @@ function EffectBadge({ effect }) {
|
|
|
46006
46727
|
}
|
|
46007
46728
|
function TransitionTimeline({ transitions }) {
|
|
46008
46729
|
const { t } = useTranslate();
|
|
46009
|
-
const containerRef =
|
|
46010
|
-
const [autoScroll, setAutoScroll] =
|
|
46011
|
-
const [expandedId, setExpandedId] =
|
|
46012
|
-
|
|
46730
|
+
const containerRef = React87.useRef(null);
|
|
46731
|
+
const [autoScroll, setAutoScroll] = React87.useState(true);
|
|
46732
|
+
const [expandedId, setExpandedId] = React87.useState(null);
|
|
46733
|
+
React87.useEffect(() => {
|
|
46013
46734
|
if (autoScroll && containerRef.current) {
|
|
46014
46735
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46015
46736
|
}
|
|
@@ -46289,9 +47010,9 @@ function getAllEvents(traits2) {
|
|
|
46289
47010
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
46290
47011
|
const eventBus = useEventBus();
|
|
46291
47012
|
const { t } = useTranslate();
|
|
46292
|
-
const [log9, setLog] =
|
|
46293
|
-
const prevStatesRef =
|
|
46294
|
-
|
|
47013
|
+
const [log9, setLog] = React87.useState([]);
|
|
47014
|
+
const prevStatesRef = React87.useRef(/* @__PURE__ */ new Map());
|
|
47015
|
+
React87.useEffect(() => {
|
|
46295
47016
|
for (const trait of traits2) {
|
|
46296
47017
|
const prev = prevStatesRef.current.get(trait.id);
|
|
46297
47018
|
if (prev && prev !== trait.currentState) {
|
|
@@ -46460,10 +47181,10 @@ function VerifyModePanel({
|
|
|
46460
47181
|
localCount
|
|
46461
47182
|
}) {
|
|
46462
47183
|
const { t } = useTranslate();
|
|
46463
|
-
const [expanded, setExpanded] =
|
|
46464
|
-
const scrollRef =
|
|
46465
|
-
const prevCountRef =
|
|
46466
|
-
|
|
47184
|
+
const [expanded, setExpanded] = React87.useState(true);
|
|
47185
|
+
const scrollRef = React87.useRef(null);
|
|
47186
|
+
const prevCountRef = React87.useRef(0);
|
|
47187
|
+
React87.useEffect(() => {
|
|
46467
47188
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
46468
47189
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
46469
47190
|
}
|
|
@@ -46520,10 +47241,10 @@ function RuntimeDebugger({
|
|
|
46520
47241
|
schema
|
|
46521
47242
|
}) {
|
|
46522
47243
|
const { t } = useTranslate();
|
|
46523
|
-
const [isCollapsed, setIsCollapsed] =
|
|
46524
|
-
const [isVisible, setIsVisible] =
|
|
47244
|
+
const [isCollapsed, setIsCollapsed] = React87.useState(mode === "verify" ? true : defaultCollapsed);
|
|
47245
|
+
const [isVisible, setIsVisible] = React87.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
46525
47246
|
const debugData = useDebugData();
|
|
46526
|
-
|
|
47247
|
+
React87.useEffect(() => {
|
|
46527
47248
|
if (mode === "inline") return;
|
|
46528
47249
|
return onDebugToggle((enabled) => {
|
|
46529
47250
|
setIsVisible(enabled);
|
|
@@ -46532,7 +47253,7 @@ function RuntimeDebugger({
|
|
|
46532
47253
|
}
|
|
46533
47254
|
});
|
|
46534
47255
|
}, [mode]);
|
|
46535
|
-
|
|
47256
|
+
React87.useEffect(() => {
|
|
46536
47257
|
if (mode === "inline") return;
|
|
46537
47258
|
const handleKeyDown = (e) => {
|
|
46538
47259
|
if (e.key === "`" && isVisible) {
|
|
@@ -46547,7 +47268,7 @@ function RuntimeDebugger({
|
|
|
46547
47268
|
if (!isVisible) {
|
|
46548
47269
|
return null;
|
|
46549
47270
|
}
|
|
46550
|
-
const
|
|
47271
|
+
const positionClasses2 = {
|
|
46551
47272
|
"bottom-right": "bottom-4 right-4",
|
|
46552
47273
|
"bottom-left": "bottom-4 left-4",
|
|
46553
47274
|
"top-right": "top-4 right-4",
|
|
@@ -46676,7 +47397,7 @@ function RuntimeDebugger({
|
|
|
46676
47397
|
className: cn(
|
|
46677
47398
|
"runtime-debugger",
|
|
46678
47399
|
"fixed",
|
|
46679
|
-
|
|
47400
|
+
positionClasses2[position],
|
|
46680
47401
|
isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
|
|
46681
47402
|
className
|
|
46682
47403
|
),
|
|
@@ -46758,6 +47479,7 @@ var init_SegmentRenderer = __esm({
|
|
|
46758
47479
|
"use client";
|
|
46759
47480
|
init_MarkdownContent();
|
|
46760
47481
|
init_CodeBlock();
|
|
47482
|
+
init_MermaidDiagram();
|
|
46761
47483
|
init_QuizBlock();
|
|
46762
47484
|
init_ActivationBlock();
|
|
46763
47485
|
init_ConnectionBlock();
|
|
@@ -46789,6 +47511,9 @@ var init_SegmentRenderer = __esm({
|
|
|
46789
47511
|
return /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `md-${index}`);
|
|
46790
47512
|
}
|
|
46791
47513
|
if (segment.type === "code") {
|
|
47514
|
+
if (segment.language === "mermaid") {
|
|
47515
|
+
return /* @__PURE__ */ jsx(MermaidDiagram, { code: segment.content }, `code-${index}`);
|
|
47516
|
+
}
|
|
46792
47517
|
if (segment.runnable && onRunCodeSimulation) {
|
|
46793
47518
|
return /* @__PURE__ */ jsx(
|
|
46794
47519
|
CodeRunnerPanel,
|
|
@@ -46921,99 +47646,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
46921
47646
|
ShowcaseOrganism.displayName = "ShowcaseOrganism";
|
|
46922
47647
|
}
|
|
46923
47648
|
});
|
|
46924
|
-
var SplitPane;
|
|
46925
|
-
var init_SplitPane = __esm({
|
|
46926
|
-
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
46927
|
-
"use client";
|
|
46928
|
-
init_cn();
|
|
46929
|
-
SplitPane = ({
|
|
46930
|
-
direction = "horizontal",
|
|
46931
|
-
ratio: initialRatio = 50,
|
|
46932
|
-
minSize = 100,
|
|
46933
|
-
resizable = true,
|
|
46934
|
-
left,
|
|
46935
|
-
right,
|
|
46936
|
-
className,
|
|
46937
|
-
leftClassName,
|
|
46938
|
-
rightClassName
|
|
46939
|
-
}) => {
|
|
46940
|
-
const [ratio, setRatio] = useState(initialRatio);
|
|
46941
|
-
const containerRef = useRef(null);
|
|
46942
|
-
const isDragging = useRef(false);
|
|
46943
|
-
const handlePointerDown = useCallback(
|
|
46944
|
-
(e) => {
|
|
46945
|
-
if (!resizable) return;
|
|
46946
|
-
e.preventDefault();
|
|
46947
|
-
isDragging.current = true;
|
|
46948
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
46949
|
-
const handlePointerMove = (ev) => {
|
|
46950
|
-
if (!isDragging.current || !containerRef.current) return;
|
|
46951
|
-
const rect = containerRef.current.getBoundingClientRect();
|
|
46952
|
-
let newRatio;
|
|
46953
|
-
if (direction === "horizontal") {
|
|
46954
|
-
const x = ev.clientX - rect.left;
|
|
46955
|
-
newRatio = x / rect.width * 100;
|
|
46956
|
-
} else {
|
|
46957
|
-
const y = ev.clientY - rect.top;
|
|
46958
|
-
newRatio = y / rect.height * 100;
|
|
46959
|
-
}
|
|
46960
|
-
const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
|
|
46961
|
-
const maxRatio = 100 - minRatio;
|
|
46962
|
-
newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
|
|
46963
|
-
setRatio(newRatio);
|
|
46964
|
-
};
|
|
46965
|
-
const handlePointerUp = () => {
|
|
46966
|
-
isDragging.current = false;
|
|
46967
|
-
document.removeEventListener("pointermove", handlePointerMove);
|
|
46968
|
-
document.removeEventListener("pointerup", handlePointerUp);
|
|
46969
|
-
document.removeEventListener("pointercancel", handlePointerUp);
|
|
46970
|
-
};
|
|
46971
|
-
document.addEventListener("pointermove", handlePointerMove);
|
|
46972
|
-
document.addEventListener("pointerup", handlePointerUp);
|
|
46973
|
-
document.addEventListener("pointercancel", handlePointerUp);
|
|
46974
|
-
},
|
|
46975
|
-
[direction, minSize, resizable]
|
|
46976
|
-
);
|
|
46977
|
-
const isHorizontal = direction === "horizontal";
|
|
46978
|
-
return /* @__PURE__ */ jsxs(
|
|
46979
|
-
"div",
|
|
46980
|
-
{
|
|
46981
|
-
ref: containerRef,
|
|
46982
|
-
className: cn(
|
|
46983
|
-
"flex w-full h-full",
|
|
46984
|
-
isHorizontal ? "flex-row" : "flex-col",
|
|
46985
|
-
className
|
|
46986
|
-
),
|
|
46987
|
-
children: [
|
|
46988
|
-
/* @__PURE__ */ jsx(
|
|
46989
|
-
"div",
|
|
46990
|
-
{
|
|
46991
|
-
className: cn("overflow-auto", leftClassName),
|
|
46992
|
-
style: {
|
|
46993
|
-
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
46994
|
-
flexShrink: 0
|
|
46995
|
-
},
|
|
46996
|
-
children: left
|
|
46997
|
-
}
|
|
46998
|
-
),
|
|
46999
|
-
resizable && /* @__PURE__ */ jsx(
|
|
47000
|
-
"div",
|
|
47001
|
-
{
|
|
47002
|
-
onPointerDown: handlePointerDown,
|
|
47003
|
-
className: cn(
|
|
47004
|
-
"flex-shrink-0 bg-border transition-colors touch-none",
|
|
47005
|
-
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"
|
|
47006
|
-
)
|
|
47007
|
-
}
|
|
47008
|
-
),
|
|
47009
|
-
/* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
|
|
47010
|
-
]
|
|
47011
|
-
}
|
|
47012
|
-
);
|
|
47013
|
-
};
|
|
47014
|
-
SplitPane.displayName = "SplitPane";
|
|
47015
|
-
}
|
|
47016
|
-
});
|
|
47017
47649
|
var StatCard;
|
|
47018
47650
|
var init_StatCard = __esm({
|
|
47019
47651
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -47052,7 +47684,7 @@ var init_StatCard = __esm({
|
|
|
47052
47684
|
const labelToUse = propLabel ?? propTitle;
|
|
47053
47685
|
const eventBus = useEventBus();
|
|
47054
47686
|
const { t } = useTranslate();
|
|
47055
|
-
const handleActionClick =
|
|
47687
|
+
const handleActionClick = React87__default.useCallback(() => {
|
|
47056
47688
|
if (action?.event) {
|
|
47057
47689
|
eventBus.emit(`UI:${action.event}`, {});
|
|
47058
47690
|
}
|
|
@@ -47063,7 +47695,7 @@ var init_StatCard = __esm({
|
|
|
47063
47695
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
47064
47696
|
const isLoading = externalLoading ?? false;
|
|
47065
47697
|
const error = externalError;
|
|
47066
|
-
const computeMetricValue =
|
|
47698
|
+
const computeMetricValue = React87__default.useCallback(
|
|
47067
47699
|
(metric, items) => {
|
|
47068
47700
|
if (metric.value !== void 0) {
|
|
47069
47701
|
return metric.value;
|
|
@@ -47102,7 +47734,7 @@ var init_StatCard = __esm({
|
|
|
47102
47734
|
},
|
|
47103
47735
|
[]
|
|
47104
47736
|
);
|
|
47105
|
-
const schemaStats =
|
|
47737
|
+
const schemaStats = React87__default.useMemo(() => {
|
|
47106
47738
|
if (!metrics || metrics.length === 0) return null;
|
|
47107
47739
|
return metrics.map((metric) => ({
|
|
47108
47740
|
label: metric.label,
|
|
@@ -47110,7 +47742,7 @@ var init_StatCard = __esm({
|
|
|
47110
47742
|
format: metric.format
|
|
47111
47743
|
}));
|
|
47112
47744
|
}, [metrics, data, computeMetricValue]);
|
|
47113
|
-
const calculatedTrend =
|
|
47745
|
+
const calculatedTrend = React87__default.useMemo(() => {
|
|
47114
47746
|
if (manualTrend !== void 0) return manualTrend;
|
|
47115
47747
|
if (previousValue === void 0 || currentValue === void 0)
|
|
47116
47748
|
return void 0;
|
|
@@ -47750,8 +48382,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
47750
48382
|
] });
|
|
47751
48383
|
};
|
|
47752
48384
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
47753
|
-
const endRef =
|
|
47754
|
-
|
|
48385
|
+
const endRef = React87__default.useRef(null);
|
|
48386
|
+
React87__default.useEffect(() => {
|
|
47755
48387
|
if (!autoScroll) return;
|
|
47756
48388
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
47757
48389
|
}, [activities.length, autoScroll]);
|
|
@@ -47845,7 +48477,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
47845
48477
|
};
|
|
47846
48478
|
SubagentRichCard = ({ subagent }) => {
|
|
47847
48479
|
const { t } = useTranslate();
|
|
47848
|
-
const activities =
|
|
48480
|
+
const activities = React87__default.useMemo(
|
|
47849
48481
|
() => subagentMessagesToActivities(subagent.messages),
|
|
47850
48482
|
[subagent.messages]
|
|
47851
48483
|
);
|
|
@@ -47922,8 +48554,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
47922
48554
|
] });
|
|
47923
48555
|
};
|
|
47924
48556
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
47925
|
-
const endRef =
|
|
47926
|
-
|
|
48557
|
+
const endRef = React87__default.useRef(null);
|
|
48558
|
+
React87__default.useEffect(() => {
|
|
47927
48559
|
if (!autoScroll) return;
|
|
47928
48560
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
47929
48561
|
}, [messages.length, autoScroll]);
|
|
@@ -48358,7 +48990,7 @@ var init_Timeline = __esm({
|
|
|
48358
48990
|
}) => {
|
|
48359
48991
|
const { t } = useTranslate();
|
|
48360
48992
|
const entityData = entity ?? [];
|
|
48361
|
-
const items =
|
|
48993
|
+
const items = React87__default.useMemo(() => {
|
|
48362
48994
|
if (propItems) return propItems;
|
|
48363
48995
|
if (entityData.length === 0) return [];
|
|
48364
48996
|
return entityData.map((record, idx) => {
|
|
@@ -48460,7 +49092,7 @@ var init_Timeline = __esm({
|
|
|
48460
49092
|
}
|
|
48461
49093
|
});
|
|
48462
49094
|
function extractToastProps(children) {
|
|
48463
|
-
if (!
|
|
49095
|
+
if (!React87__default.isValidElement(children)) {
|
|
48464
49096
|
if (typeof children === "string") {
|
|
48465
49097
|
return { message: children };
|
|
48466
49098
|
}
|
|
@@ -48502,7 +49134,7 @@ var init_ToastSlot = __esm({
|
|
|
48502
49134
|
eventBus.emit(`${prefix}CLOSE`);
|
|
48503
49135
|
};
|
|
48504
49136
|
if (!isVisible) return null;
|
|
48505
|
-
const isCustomContent =
|
|
49137
|
+
const isCustomContent = React87__default.isValidElement(children) && !message;
|
|
48506
49138
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
48507
49139
|
Toast,
|
|
48508
49140
|
{
|
|
@@ -48570,6 +49202,7 @@ var init_component_registry_generated = __esm({
|
|
|
48570
49202
|
init_ChoiceButton();
|
|
48571
49203
|
init_CodeBlock();
|
|
48572
49204
|
init_CodeRunnerPanel();
|
|
49205
|
+
init_CommandPalette();
|
|
48573
49206
|
init_CommunityLinks();
|
|
48574
49207
|
init_ConditionalWrapper();
|
|
48575
49208
|
init_ConfettiEffect();
|
|
@@ -48597,6 +49230,7 @@ var init_component_registry_generated = __esm({
|
|
|
48597
49230
|
init_DocSearch();
|
|
48598
49231
|
init_DocSidebar();
|
|
48599
49232
|
init_DocTOC();
|
|
49233
|
+
init_DockLayout();
|
|
48600
49234
|
init_DocumentDetails();
|
|
48601
49235
|
init_DocumentPanel();
|
|
48602
49236
|
init_DocumentViewer();
|
|
@@ -48627,6 +49261,7 @@ var init_component_registry_generated = __esm({
|
|
|
48627
49261
|
init_FlipCard();
|
|
48628
49262
|
init_FlipContainer();
|
|
48629
49263
|
init_FloatingActionButton();
|
|
49264
|
+
init_FloatingToolbar();
|
|
48630
49265
|
init_Form();
|
|
48631
49266
|
init_FormField();
|
|
48632
49267
|
init_FormSection();
|
|
@@ -48842,6 +49477,7 @@ var init_component_registry_generated = __esm({
|
|
|
48842
49477
|
"ChoiceButton": ChoiceButton,
|
|
48843
49478
|
"CodeBlock": CodeBlock,
|
|
48844
49479
|
"CodeRunnerPanel": CodeRunnerPanel,
|
|
49480
|
+
"CommandPalette": CommandPalette,
|
|
48845
49481
|
"CommunityLinks": CommunityLinks,
|
|
48846
49482
|
"ConditionalWrapper": ConditionalWrapper,
|
|
48847
49483
|
"ConfettiEffect": ConfettiEffect,
|
|
@@ -48871,6 +49507,7 @@ var init_component_registry_generated = __esm({
|
|
|
48871
49507
|
"DocSearch": DocSearch,
|
|
48872
49508
|
"DocSidebar": DocSidebar,
|
|
48873
49509
|
"DocTOC": DocTOC,
|
|
49510
|
+
"DockLayout": DockLayout,
|
|
48874
49511
|
"DocumentDetails": DocumentDetails,
|
|
48875
49512
|
"DocumentPanel": DocumentPanel,
|
|
48876
49513
|
"DocumentViewer": DocumentViewer,
|
|
@@ -48901,6 +49538,7 @@ var init_component_registry_generated = __esm({
|
|
|
48901
49538
|
"FlipCard": FlipCard,
|
|
48902
49539
|
"FlipContainer": FlipContainer,
|
|
48903
49540
|
"FloatingActionButton": FloatingActionButton,
|
|
49541
|
+
"FloatingToolbar": FloatingToolbar,
|
|
48904
49542
|
"Form": Form,
|
|
48905
49543
|
"FormField": FormField,
|
|
48906
49544
|
"FormLayout": FormLayout,
|
|
@@ -49088,7 +49726,7 @@ function SuspenseConfigProvider({
|
|
|
49088
49726
|
config,
|
|
49089
49727
|
children
|
|
49090
49728
|
}) {
|
|
49091
|
-
return
|
|
49729
|
+
return React87__default.createElement(
|
|
49092
49730
|
SuspenseConfigContext.Provider,
|
|
49093
49731
|
{ value: config },
|
|
49094
49732
|
children
|
|
@@ -49136,7 +49774,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
49136
49774
|
}
|
|
49137
49775
|
return { name: field, label: humanizeFieldName(field) };
|
|
49138
49776
|
}
|
|
49139
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
49777
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React87__default.isValidElement(field) && !(field instanceof Date)) {
|
|
49140
49778
|
const obj = field;
|
|
49141
49779
|
const fieldName2 = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
49142
49780
|
if (!fieldName2) return field;
|
|
@@ -49189,7 +49827,7 @@ function enrichDetailFields(fields, entityDef) {
|
|
|
49189
49827
|
const meta = metaFor(field);
|
|
49190
49828
|
return meta ? { key: field, ...meta } : field;
|
|
49191
49829
|
}
|
|
49192
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
49830
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React87__default.isValidElement(field) && !(field instanceof Date)) {
|
|
49193
49831
|
const obj = field;
|
|
49194
49832
|
const fieldName2 = typeof obj.key === "string" ? obj.key : typeof obj.name === "string" ? obj.name : void 0;
|
|
49195
49833
|
if (!fieldName2 || obj.type) return field;
|
|
@@ -49648,7 +50286,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
49648
50286
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
49649
50287
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
49650
50288
|
}
|
|
49651
|
-
return /* @__PURE__ */ jsx(
|
|
50289
|
+
return /* @__PURE__ */ jsx(React87__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
49652
50290
|
}
|
|
49653
50291
|
if (!child || typeof child !== "object") return null;
|
|
49654
50292
|
const childId = `${parentId}-${index}`;
|
|
@@ -49705,7 +50343,7 @@ function isPatternConfig(value) {
|
|
|
49705
50343
|
if (value === null || value === void 0) return false;
|
|
49706
50344
|
if (typeof value !== "object") return false;
|
|
49707
50345
|
if (Array.isArray(value)) return false;
|
|
49708
|
-
if (
|
|
50346
|
+
if (React87__default.isValidElement(value)) return false;
|
|
49709
50347
|
if (value instanceof Date) return false;
|
|
49710
50348
|
if (typeof value === "function") return false;
|
|
49711
50349
|
const record = value;
|
|
@@ -49718,9 +50356,9 @@ function renderPatternValue(value) {
|
|
|
49718
50356
|
if (typeof value === "string") return renderPatternChildren(value, () => {
|
|
49719
50357
|
});
|
|
49720
50358
|
if (value instanceof Date) return value.toLocaleString();
|
|
49721
|
-
if (
|
|
50359
|
+
if (React87__default.isValidElement(value)) return value;
|
|
49722
50360
|
if (Array.isArray(value)) {
|
|
49723
|
-
return value.map((item, index) => /* @__PURE__ */ jsx(
|
|
50361
|
+
return value.map((item, index) => /* @__PURE__ */ jsx(React87__default.Fragment, { children: renderPatternValue(item) }, index));
|
|
49724
50362
|
}
|
|
49725
50363
|
if (isPatternConfig(value)) {
|
|
49726
50364
|
const { type, ...props } = value;
|
|
@@ -49730,7 +50368,7 @@ function renderPatternValue(value) {
|
|
|
49730
50368
|
return null;
|
|
49731
50369
|
}
|
|
49732
50370
|
function isPlainConfigObject(value) {
|
|
49733
|
-
if (
|
|
50371
|
+
if (React87__default.isValidElement(value)) return false;
|
|
49734
50372
|
if (value instanceof Date) return false;
|
|
49735
50373
|
const proto = Object.getPrototypeOf(value);
|
|
49736
50374
|
return proto === Object.prototype || proto === null;
|
|
@@ -49904,7 +50542,7 @@ function SlotContentRenderer({
|
|
|
49904
50542
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
49905
50543
|
const slotVal = restProps[slotKey];
|
|
49906
50544
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
49907
|
-
if (
|
|
50545
|
+
if (React87__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
49908
50546
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
49909
50547
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
49910
50548
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -49958,7 +50596,7 @@ function SlotContentRenderer({
|
|
|
49958
50596
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
49959
50597
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
49960
50598
|
const sample = resolvedItems[0];
|
|
49961
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
50599
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React87__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
49962
50600
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
49963
50601
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
49964
50602
|
}
|
|
@@ -50351,7 +50989,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
50351
50989
|
}
|
|
50352
50990
|
return substituted;
|
|
50353
50991
|
}
|
|
50354
|
-
if (body !== null && typeof body === "object" && !
|
|
50992
|
+
if (body !== null && typeof body === "object" && !React87__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
50355
50993
|
const out = {};
|
|
50356
50994
|
for (const [k, v] of Object.entries(body)) {
|
|
50357
50995
|
out[k] = recur(v);
|
|
@@ -50384,7 +51022,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
50384
51022
|
}
|
|
50385
51023
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
50386
51024
|
}
|
|
50387
|
-
if (value !== null && typeof value === "object" && !
|
|
51025
|
+
if (value !== null && typeof value === "object" && !React87__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
50388
51026
|
const out = {};
|
|
50389
51027
|
for (const [k, v] of Object.entries(value)) {
|
|
50390
51028
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -50398,7 +51036,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
50398
51036
|
const resolvedBody = deferLambdaEntityExprs(
|
|
50399
51037
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
50400
51038
|
);
|
|
50401
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
51039
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React87__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
50402
51040
|
return null;
|
|
50403
51041
|
}
|
|
50404
51042
|
const record = resolvedBody;
|
|
@@ -50417,7 +51055,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
50417
51055
|
props: childProps,
|
|
50418
51056
|
priority: 0
|
|
50419
51057
|
};
|
|
50420
|
-
return
|
|
51058
|
+
return React87__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
50421
51059
|
};
|
|
50422
51060
|
}
|
|
50423
51061
|
function convertNode(node, callerKey) {
|
|
@@ -50437,7 +51075,7 @@ function convertNode(node, callerKey) {
|
|
|
50437
51075
|
});
|
|
50438
51076
|
return anyChanged ? mapped : node;
|
|
50439
51077
|
}
|
|
50440
|
-
if (typeof node === "object" && !
|
|
51078
|
+
if (typeof node === "object" && !React87__default.isValidElement(node) && !(node instanceof Date)) {
|
|
50441
51079
|
return convertObjectProps(node);
|
|
50442
51080
|
}
|
|
50443
51081
|
return node;
|