@almadar/ui 5.121.4 → 5.122.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 +1499 -1413
- package/dist/avl/index.js +577 -491
- package/dist/components/index.cjs +1507 -1409
- package/dist/components/index.d.cts +166 -2
- package/dist/components/index.d.ts +166 -2
- package/dist/components/index.js +578 -481
- package/dist/context/index.cjs +24 -0
- package/dist/context/index.js +24 -0
- package/dist/marketing/index.cjs +8 -6
- package/dist/marketing/index.js +8 -6
- package/dist/providers/index.cjs +1382 -1296
- package/dist/providers/index.js +552 -466
- package/dist/runtime/index.cjs +1359 -1273
- package/dist/runtime/index.js +556 -470
- package/package.json +1 -1
- package/tailwind-preset.cjs +121 -2
- package/themes/_base.css +97 -5
- package/themes/_contract.md +25 -0
- package/themes/game-adventure.css +230 -0
- package/themes/game-rpg.css +228 -0
- package/themes/game-sci-fi.css +231 -0
- package/themes/game-ui-pack.css +229 -0
- package/themes/index.css +4 -0
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React84 from 'react';
|
|
2
|
+
import React84__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, lazy, useLayoutEffect, useId, useSyncExternalStore } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
4
4
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
@@ -399,7 +399,7 @@ var init_Box = __esm({
|
|
|
399
399
|
fixed: "fixed",
|
|
400
400
|
sticky: "sticky"
|
|
401
401
|
};
|
|
402
|
-
Box =
|
|
402
|
+
Box = React84__default.forwardRef(
|
|
403
403
|
({
|
|
404
404
|
padding,
|
|
405
405
|
paddingX,
|
|
@@ -464,7 +464,7 @@ var init_Box = __esm({
|
|
|
464
464
|
onPointerDown?.(e);
|
|
465
465
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
466
466
|
const isClickable = action || onClick;
|
|
467
|
-
return
|
|
467
|
+
return React84__default.createElement(
|
|
468
468
|
Component,
|
|
469
469
|
{
|
|
470
470
|
ref,
|
|
@@ -681,7 +681,7 @@ var init_Icon = __esm({
|
|
|
681
681
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
682
682
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
683
683
|
const family = useIconFamily();
|
|
684
|
-
const RenderedComponent =
|
|
684
|
+
const RenderedComponent = React84__default.useMemo(() => {
|
|
685
685
|
if (directIcon) return null;
|
|
686
686
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
687
687
|
}, [directIcon, effectiveName, family]);
|
|
@@ -801,7 +801,7 @@ var init_atlasSlice = __esm({
|
|
|
801
801
|
}
|
|
802
802
|
});
|
|
803
803
|
function useAtlasSliceDataUrl(asset) {
|
|
804
|
-
const [, bump] =
|
|
804
|
+
const [, bump] = React84.useReducer((x) => x + 1, 0);
|
|
805
805
|
if (!isAtlasAsset(asset)) return void 0;
|
|
806
806
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
807
807
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -864,13 +864,13 @@ function AtlasImage({
|
|
|
864
864
|
style,
|
|
865
865
|
"aria-hidden": ariaHidden
|
|
866
866
|
}) {
|
|
867
|
-
const [, bump] =
|
|
868
|
-
const canvasRef =
|
|
867
|
+
const [, bump] = React84.useReducer((x) => x + 1, 0);
|
|
868
|
+
const canvasRef = React84.useRef(null);
|
|
869
869
|
const sliced = isAtlasAsset(asset);
|
|
870
870
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
871
871
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
872
872
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
873
|
-
|
|
873
|
+
React84.useEffect(() => {
|
|
874
874
|
const canvas = canvasRef.current;
|
|
875
875
|
if (!canvas || !img || !rect) return;
|
|
876
876
|
canvas.width = rect.sw;
|
|
@@ -946,7 +946,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
946
946
|
const IconComp = value;
|
|
947
947
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
948
948
|
}
|
|
949
|
-
if (
|
|
949
|
+
if (React84__default.isValidElement(value)) {
|
|
950
950
|
return value;
|
|
951
951
|
}
|
|
952
952
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1023,7 +1023,7 @@ var init_Button = __esm({
|
|
|
1023
1023
|
md: "h-icon-default w-icon-default",
|
|
1024
1024
|
lg: "h-icon-default w-icon-default"
|
|
1025
1025
|
};
|
|
1026
|
-
Button =
|
|
1026
|
+
Button = React84__default.forwardRef(
|
|
1027
1027
|
({
|
|
1028
1028
|
className,
|
|
1029
1029
|
variant = "primary",
|
|
@@ -1065,7 +1065,8 @@ var init_Button = __esm({
|
|
|
1065
1065
|
"font-medium",
|
|
1066
1066
|
"rounded-sm",
|
|
1067
1067
|
"cursor-pointer",
|
|
1068
|
-
"
|
|
1068
|
+
"chrome-button",
|
|
1069
|
+
"transition-all duration-normal",
|
|
1069
1070
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
1070
1071
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1071
1072
|
variantStyles[variant],
|
|
@@ -1091,7 +1092,7 @@ var Dialog;
|
|
|
1091
1092
|
var init_Dialog = __esm({
|
|
1092
1093
|
"components/core/atoms/Dialog.tsx"() {
|
|
1093
1094
|
init_cn();
|
|
1094
|
-
Dialog =
|
|
1095
|
+
Dialog = React84__default.forwardRef(
|
|
1095
1096
|
({
|
|
1096
1097
|
role = "dialog",
|
|
1097
1098
|
"aria-modal": ariaModal = true,
|
|
@@ -1209,7 +1210,7 @@ var init_Typography = __esm({
|
|
|
1209
1210
|
}) => {
|
|
1210
1211
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
1211
1212
|
const Component = as || defaultElements[variant];
|
|
1212
|
-
return
|
|
1213
|
+
return React84__default.createElement(
|
|
1213
1214
|
Component,
|
|
1214
1215
|
{
|
|
1215
1216
|
id,
|
|
@@ -1461,12 +1462,84 @@ var init_Modal = __esm({
|
|
|
1461
1462
|
Modal.displayName = "Modal";
|
|
1462
1463
|
}
|
|
1463
1464
|
});
|
|
1465
|
+
function isMotionEnabled() {
|
|
1466
|
+
if (typeof document === "undefined") return true;
|
|
1467
|
+
if (motionEnabledCache !== null) return motionEnabledCache;
|
|
1468
|
+
const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
|
|
1469
|
+
motionEnabledCache = v !== "off";
|
|
1470
|
+
return motionEnabledCache;
|
|
1471
|
+
}
|
|
1472
|
+
function usePresence(show, opts) {
|
|
1473
|
+
const { animation, animate = true, onExited } = opts;
|
|
1474
|
+
const [mounted, setMounted] = useState(show);
|
|
1475
|
+
const [exiting, setExiting] = useState(false);
|
|
1476
|
+
const prev = useRef(show);
|
|
1477
|
+
const onExitedRef = useRef(onExited);
|
|
1478
|
+
onExitedRef.current = onExited;
|
|
1479
|
+
const safeTimer = useRef(null);
|
|
1480
|
+
const clearSafe = useCallback(() => {
|
|
1481
|
+
if (safeTimer.current) {
|
|
1482
|
+
clearTimeout(safeTimer.current);
|
|
1483
|
+
safeTimer.current = null;
|
|
1484
|
+
}
|
|
1485
|
+
}, []);
|
|
1486
|
+
const finishExit = useCallback(() => {
|
|
1487
|
+
clearSafe();
|
|
1488
|
+
setExiting(false);
|
|
1489
|
+
setMounted(false);
|
|
1490
|
+
onExitedRef.current?.();
|
|
1491
|
+
}, [clearSafe]);
|
|
1492
|
+
useEffect(() => {
|
|
1493
|
+
const moving = animate && isMotionEnabled();
|
|
1494
|
+
if (show && !prev.current) {
|
|
1495
|
+
setExiting(false);
|
|
1496
|
+
setMounted(true);
|
|
1497
|
+
} else if (!show && prev.current) {
|
|
1498
|
+
if (moving) {
|
|
1499
|
+
setExiting(true);
|
|
1500
|
+
clearSafe();
|
|
1501
|
+
safeTimer.current = setTimeout(finishExit, SAFE_EXIT_MS);
|
|
1502
|
+
} else {
|
|
1503
|
+
setMounted(false);
|
|
1504
|
+
setExiting(false);
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
prev.current = show;
|
|
1508
|
+
}, [show, animate, clearSafe, finishExit]);
|
|
1509
|
+
useEffect(() => () => clearSafe(), [clearSafe]);
|
|
1510
|
+
const disabled = !animate || !isMotionEnabled();
|
|
1511
|
+
const className = disabled ? "" : exiting ? `animate-${animation}-out` : `animate-${animation}-in`;
|
|
1512
|
+
const onAnimationEnd = useCallback(
|
|
1513
|
+
(e) => {
|
|
1514
|
+
if (e.target !== e.currentTarget) return;
|
|
1515
|
+
if (exiting) finishExit();
|
|
1516
|
+
},
|
|
1517
|
+
[exiting, finishExit]
|
|
1518
|
+
);
|
|
1519
|
+
return { mounted, exiting, className, onAnimationEnd };
|
|
1520
|
+
}
|
|
1521
|
+
var SAFE_EXIT_MS, motionEnabledCache, Presence;
|
|
1522
|
+
var init_Presence = __esm({
|
|
1523
|
+
"components/core/atoms/Presence.tsx"() {
|
|
1524
|
+
"use client";
|
|
1525
|
+
init_cn();
|
|
1526
|
+
SAFE_EXIT_MS = 1e3;
|
|
1527
|
+
motionEnabledCache = null;
|
|
1528
|
+
Presence = ({ show, className, children, ...opts }) => {
|
|
1529
|
+
const { mounted, className: animClass, onAnimationEnd } = usePresence(show, opts);
|
|
1530
|
+
if (!mounted) return null;
|
|
1531
|
+
return /* @__PURE__ */ jsx("div", { className: cn(animClass, className), onAnimationEnd, children });
|
|
1532
|
+
};
|
|
1533
|
+
Presence.displayName = "Presence";
|
|
1534
|
+
}
|
|
1535
|
+
});
|
|
1464
1536
|
var Overlay;
|
|
1465
1537
|
var init_Overlay = __esm({
|
|
1466
1538
|
"components/core/atoms/Overlay.tsx"() {
|
|
1467
1539
|
"use client";
|
|
1468
1540
|
init_cn();
|
|
1469
1541
|
init_useEventBus();
|
|
1542
|
+
init_Presence();
|
|
1470
1543
|
Overlay = ({
|
|
1471
1544
|
isVisible = true,
|
|
1472
1545
|
onClick,
|
|
@@ -1475,7 +1548,8 @@ var init_Overlay = __esm({
|
|
|
1475
1548
|
action
|
|
1476
1549
|
}) => {
|
|
1477
1550
|
const eventBus = useEventBus();
|
|
1478
|
-
|
|
1551
|
+
const { mounted, className: animClass, onAnimationEnd } = usePresence(isVisible, { animation: "overlay" });
|
|
1552
|
+
if (!mounted) return null;
|
|
1479
1553
|
const handleClick = (e) => {
|
|
1480
1554
|
if (action) {
|
|
1481
1555
|
eventBus.emit(`UI:${action}`, {});
|
|
@@ -1488,11 +1562,12 @@ var init_Overlay = __esm({
|
|
|
1488
1562
|
className: cn(
|
|
1489
1563
|
"fixed inset-0 z-40",
|
|
1490
1564
|
blur && "backdrop-blur-sm",
|
|
1491
|
-
|
|
1565
|
+
animClass,
|
|
1492
1566
|
className
|
|
1493
1567
|
),
|
|
1494
1568
|
style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
|
|
1495
1569
|
onClick: action || onClick ? handleClick : void 0,
|
|
1570
|
+
onAnimationEnd,
|
|
1496
1571
|
"aria-hidden": "true"
|
|
1497
1572
|
}
|
|
1498
1573
|
);
|
|
@@ -1507,6 +1582,7 @@ var init_Drawer = __esm({
|
|
|
1507
1582
|
init_Button();
|
|
1508
1583
|
init_Typography();
|
|
1509
1584
|
init_Overlay();
|
|
1585
|
+
init_Presence();
|
|
1510
1586
|
init_cn();
|
|
1511
1587
|
init_useEventBus();
|
|
1512
1588
|
sizeWidths = {
|
|
@@ -1560,6 +1636,7 @@ var init_Drawer = __esm({
|
|
|
1560
1636
|
document.addEventListener("keydown", handleEscape);
|
|
1561
1637
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
1562
1638
|
}, [isOpen, closeOnEscape, onClose, closeEvent, eventBus]);
|
|
1639
|
+
const { mounted, className: drawerAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
|
|
1563
1640
|
useEffect(() => {
|
|
1564
1641
|
if (isOpen) {
|
|
1565
1642
|
document.body.style.overflow = "hidden";
|
|
@@ -1570,7 +1647,7 @@ var init_Drawer = __esm({
|
|
|
1570
1647
|
document.body.style.overflow = "";
|
|
1571
1648
|
};
|
|
1572
1649
|
}, [isOpen]);
|
|
1573
|
-
if (!
|
|
1650
|
+
if (!mounted) return null;
|
|
1574
1651
|
const handleClose = () => {
|
|
1575
1652
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
1576
1653
|
onClose();
|
|
@@ -1583,7 +1660,7 @@ var init_Drawer = __esm({
|
|
|
1583
1660
|
const widthClass = width in sizeWidths ? sizeWidths[width] : "";
|
|
1584
1661
|
const widthStyle = width in sizeWidths ? void 0 : { width };
|
|
1585
1662
|
const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
|
|
1586
|
-
const
|
|
1663
|
+
const drawerSign = position === "right" ? 1 : -1;
|
|
1587
1664
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1588
1665
|
/* @__PURE__ */ jsx(
|
|
1589
1666
|
Overlay,
|
|
@@ -1605,12 +1682,13 @@ var init_Drawer = __esm({
|
|
|
1605
1682
|
"flex flex-col max-h-screen",
|
|
1606
1683
|
positionClasses,
|
|
1607
1684
|
widthClass,
|
|
1608
|
-
|
|
1685
|
+
drawerAnim,
|
|
1609
1686
|
className
|
|
1610
1687
|
),
|
|
1611
|
-
style: widthStyle,
|
|
1688
|
+
style: { ...widthStyle, "--motion-drawer-sign": drawerSign },
|
|
1612
1689
|
role: "dialog",
|
|
1613
1690
|
"aria-modal": "true",
|
|
1691
|
+
onAnimationEnd,
|
|
1614
1692
|
...title && { "aria-labelledby": "drawer-title" },
|
|
1615
1693
|
children: [
|
|
1616
1694
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
@@ -1649,31 +1727,7 @@ var init_Drawer = __esm({
|
|
|
1649
1727
|
)
|
|
1650
1728
|
]
|
|
1651
1729
|
}
|
|
1652
|
-
)
|
|
1653
|
-
/* @__PURE__ */ jsx("style", { children: `
|
|
1654
|
-
@keyframes slide-in-right {
|
|
1655
|
-
from {
|
|
1656
|
-
transform: translateX(100%);
|
|
1657
|
-
}
|
|
1658
|
-
to {
|
|
1659
|
-
transform: translateX(0);
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
@keyframes slide-in-left {
|
|
1663
|
-
from {
|
|
1664
|
-
transform: translateX(-100%);
|
|
1665
|
-
}
|
|
1666
|
-
to {
|
|
1667
|
-
transform: translateX(0);
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
.animate-slide-in-right {
|
|
1671
|
-
animation: slide-in-right 0.3s ease-out;
|
|
1672
|
-
}
|
|
1673
|
-
.animate-slide-in-left {
|
|
1674
|
-
animation: slide-in-left 0.3s ease-out;
|
|
1675
|
-
}
|
|
1676
|
-
` })
|
|
1730
|
+
)
|
|
1677
1731
|
] });
|
|
1678
1732
|
};
|
|
1679
1733
|
Drawer.displayName = "Drawer";
|
|
@@ -1722,7 +1776,7 @@ var init_Badge = __esm({
|
|
|
1722
1776
|
md: "px-2.5 py-1 text-sm",
|
|
1723
1777
|
lg: "px-3 py-1.5 text-base"
|
|
1724
1778
|
};
|
|
1725
|
-
Badge =
|
|
1779
|
+
Badge = React84__default.forwardRef(
|
|
1726
1780
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
1727
1781
|
const iconSizes3 = {
|
|
1728
1782
|
sm: "h-icon-default w-icon-default",
|
|
@@ -1817,14 +1871,23 @@ var init_Toast = __esm({
|
|
|
1817
1871
|
}) => {
|
|
1818
1872
|
const eventBus = useEventBus();
|
|
1819
1873
|
const { t } = useTranslate();
|
|
1820
|
-
const
|
|
1874
|
+
const [leaving, setLeaving] = useState(false);
|
|
1875
|
+
const doRealDismiss = () => {
|
|
1821
1876
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
1822
1877
|
onDismiss?.();
|
|
1823
1878
|
};
|
|
1879
|
+
const handleDismiss = () => {
|
|
1880
|
+
if (leaving) return;
|
|
1881
|
+
setLeaving(true);
|
|
1882
|
+
};
|
|
1824
1883
|
const handleAction = () => {
|
|
1825
1884
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
1826
1885
|
onAction?.();
|
|
1827
1886
|
};
|
|
1887
|
+
const handleAnimEnd = (e) => {
|
|
1888
|
+
if (e.target !== e.currentTarget) return;
|
|
1889
|
+
if (leaving) doRealDismiss();
|
|
1890
|
+
};
|
|
1828
1891
|
useEffect(() => {
|
|
1829
1892
|
if (duration <= 0 || !onDismiss && !dismissEvent) {
|
|
1830
1893
|
return;
|
|
@@ -1843,10 +1906,12 @@ var init_Toast = __esm({
|
|
|
1843
1906
|
// edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
|
|
1844
1907
|
"border-l-4 p-4 shadow-elevation-toast min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
1845
1908
|
"rounded-sm",
|
|
1909
|
+
leaving ? "animate-toast-out" : "animate-toast-in",
|
|
1846
1910
|
variantClasses[variant],
|
|
1847
1911
|
className
|
|
1848
1912
|
),
|
|
1849
1913
|
role: "alert",
|
|
1914
|
+
onAnimationEnd: handleAnimEnd,
|
|
1850
1915
|
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
|
|
1851
1916
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
1852
1917
|
Icon,
|
|
@@ -2059,7 +2124,7 @@ var init_SvgFlow = __esm({
|
|
|
2059
2124
|
width = 100,
|
|
2060
2125
|
height = 100
|
|
2061
2126
|
}) => {
|
|
2062
|
-
const markerId =
|
|
2127
|
+
const markerId = React84__default.useMemo(() => {
|
|
2063
2128
|
flowIdCounter += 1;
|
|
2064
2129
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2065
2130
|
}, []);
|
|
@@ -2652,7 +2717,7 @@ var init_SvgRing = __esm({
|
|
|
2652
2717
|
width = 100,
|
|
2653
2718
|
height = 100
|
|
2654
2719
|
}) => {
|
|
2655
|
-
const gradientId =
|
|
2720
|
+
const gradientId = React84__default.useMemo(() => {
|
|
2656
2721
|
ringIdCounter += 1;
|
|
2657
2722
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2658
2723
|
}, []);
|
|
@@ -2833,7 +2898,7 @@ var init_Input = __esm({
|
|
|
2833
2898
|
init_cn();
|
|
2834
2899
|
init_Icon();
|
|
2835
2900
|
init_useEventBus();
|
|
2836
|
-
Input =
|
|
2901
|
+
Input = React84__default.forwardRef(
|
|
2837
2902
|
({
|
|
2838
2903
|
className,
|
|
2839
2904
|
inputType,
|
|
@@ -2868,7 +2933,7 @@ var init_Input = __esm({
|
|
|
2868
2933
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
2869
2934
|
const isMultiline = type === "textarea";
|
|
2870
2935
|
const baseClassName = cn(
|
|
2871
|
-
"block w-full rounded-sm transition-all duration-
|
|
2936
|
+
"block w-full rounded-sm transition-all duration-fast",
|
|
2872
2937
|
"border-[length:var(--border-width-thin)] border-border",
|
|
2873
2938
|
isMultiline ? "px-3 py-2 text-sm" : "h-input-md px-3 text-sm",
|
|
2874
2939
|
"bg-card hover:bg-muted focus:bg-card",
|
|
@@ -3001,7 +3066,7 @@ var Label;
|
|
|
3001
3066
|
var init_Label = __esm({
|
|
3002
3067
|
"components/core/atoms/Label.tsx"() {
|
|
3003
3068
|
init_cn();
|
|
3004
|
-
Label =
|
|
3069
|
+
Label = React84__default.forwardRef(
|
|
3005
3070
|
({ className, required, children, ...props }, ref) => {
|
|
3006
3071
|
return /* @__PURE__ */ jsxs(
|
|
3007
3072
|
"label",
|
|
@@ -3028,7 +3093,7 @@ var init_Textarea = __esm({
|
|
|
3028
3093
|
"components/core/atoms/Textarea.tsx"() {
|
|
3029
3094
|
init_cn();
|
|
3030
3095
|
init_useEventBus();
|
|
3031
|
-
Textarea =
|
|
3096
|
+
Textarea = React84__default.forwardRef(
|
|
3032
3097
|
({ className, error, onChange, ...props }, ref) => {
|
|
3033
3098
|
const eventBus = useEventBus();
|
|
3034
3099
|
const handleChange = (e) => {
|
|
@@ -3267,7 +3332,7 @@ var init_Select = __esm({
|
|
|
3267
3332
|
init_cn();
|
|
3268
3333
|
init_Icon();
|
|
3269
3334
|
init_useEventBus();
|
|
3270
|
-
Select =
|
|
3335
|
+
Select = React84__default.forwardRef(
|
|
3271
3336
|
(props, _ref) => {
|
|
3272
3337
|
const { multiple, searchable, clearable } = props;
|
|
3273
3338
|
if (multiple || searchable || clearable) {
|
|
@@ -3284,7 +3349,7 @@ var init_Checkbox = __esm({
|
|
|
3284
3349
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3285
3350
|
init_cn();
|
|
3286
3351
|
init_useEventBus();
|
|
3287
|
-
Checkbox =
|
|
3352
|
+
Checkbox = React84__default.forwardRef(
|
|
3288
3353
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3289
3354
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3290
3355
|
const eventBus = useEventBus();
|
|
@@ -3338,7 +3403,7 @@ var init_Spinner = __esm({
|
|
|
3338
3403
|
md: "h-6 w-6",
|
|
3339
3404
|
lg: "h-8 w-8"
|
|
3340
3405
|
};
|
|
3341
|
-
Spinner =
|
|
3406
|
+
Spinner = React84__default.forwardRef(
|
|
3342
3407
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3343
3408
|
if (overlay) {
|
|
3344
3409
|
return /* @__PURE__ */ jsx(
|
|
@@ -3380,21 +3445,21 @@ var init_Card = __esm({
|
|
|
3380
3445
|
"bg-card",
|
|
3381
3446
|
"border-[length:var(--border-width)] border-border",
|
|
3382
3447
|
"shadow-elevation-card",
|
|
3383
|
-
"transition-all duration-
|
|
3448
|
+
"transition-all duration-normal",
|
|
3384
3449
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
3385
3450
|
].join(" "),
|
|
3386
3451
|
bordered: [
|
|
3387
3452
|
"bg-card",
|
|
3388
3453
|
"border-[length:var(--border-width)] border-border",
|
|
3389
3454
|
"shadow-elevation-card",
|
|
3390
|
-
"transition-all duration-
|
|
3455
|
+
"transition-all duration-normal",
|
|
3391
3456
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
3392
3457
|
].join(" "),
|
|
3393
3458
|
elevated: [
|
|
3394
3459
|
"bg-card",
|
|
3395
3460
|
"border-[length:var(--border-width)] border-border",
|
|
3396
3461
|
"shadow",
|
|
3397
|
-
"transition-all duration-
|
|
3462
|
+
"transition-all duration-normal",
|
|
3398
3463
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
3399
3464
|
].join(" "),
|
|
3400
3465
|
// Interactive variant with theme-specific hover effects
|
|
@@ -3403,7 +3468,7 @@ var init_Card = __esm({
|
|
|
3403
3468
|
"border-[length:var(--border-width)] border-border",
|
|
3404
3469
|
"shadow",
|
|
3405
3470
|
"cursor-pointer",
|
|
3406
|
-
"transition-all duration-
|
|
3471
|
+
"transition-all duration-normal",
|
|
3407
3472
|
"hover:shadow-elevation-dialog"
|
|
3408
3473
|
].join(" ")
|
|
3409
3474
|
};
|
|
@@ -3428,7 +3493,7 @@ var init_Card = __esm({
|
|
|
3428
3493
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3429
3494
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3430
3495
|
};
|
|
3431
|
-
Card =
|
|
3496
|
+
Card = React84__default.forwardRef(
|
|
3432
3497
|
({
|
|
3433
3498
|
className,
|
|
3434
3499
|
variant = "bordered",
|
|
@@ -3454,7 +3519,8 @@ var init_Card = __esm({
|
|
|
3454
3519
|
ref,
|
|
3455
3520
|
className: cn(
|
|
3456
3521
|
"rounded-container relative",
|
|
3457
|
-
"transition-all duration-
|
|
3522
|
+
"transition-all duration-normal",
|
|
3523
|
+
"chrome-panel",
|
|
3458
3524
|
variantStyles4[variant],
|
|
3459
3525
|
paddingStyles2[padding],
|
|
3460
3526
|
lookStyles2[look],
|
|
@@ -3476,9 +3542,9 @@ var init_Card = __esm({
|
|
|
3476
3542
|
}
|
|
3477
3543
|
);
|
|
3478
3544
|
Card.displayName = "Card";
|
|
3479
|
-
CardHeader =
|
|
3545
|
+
CardHeader = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3480
3546
|
CardHeader.displayName = "CardHeader";
|
|
3481
|
-
CardTitle =
|
|
3547
|
+
CardTitle = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3482
3548
|
"h3",
|
|
3483
3549
|
{
|
|
3484
3550
|
ref,
|
|
@@ -3491,11 +3557,11 @@ var init_Card = __esm({
|
|
|
3491
3557
|
}
|
|
3492
3558
|
));
|
|
3493
3559
|
CardTitle.displayName = "CardTitle";
|
|
3494
|
-
CardContent =
|
|
3560
|
+
CardContent = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3495
3561
|
CardContent.displayName = "CardContent";
|
|
3496
3562
|
CardBody = CardContent;
|
|
3497
3563
|
CardBody.displayName = "CardBody";
|
|
3498
|
-
CardFooter =
|
|
3564
|
+
CardFooter = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3499
3565
|
"div",
|
|
3500
3566
|
{
|
|
3501
3567
|
ref,
|
|
@@ -3582,7 +3648,7 @@ var init_FilterPill = __esm({
|
|
|
3582
3648
|
md: "w-3.5 h-3.5",
|
|
3583
3649
|
lg: "w-4 h-4"
|
|
3584
3650
|
};
|
|
3585
|
-
FilterPill =
|
|
3651
|
+
FilterPill = React84__default.forwardRef(
|
|
3586
3652
|
({
|
|
3587
3653
|
className,
|
|
3588
3654
|
variant = "default",
|
|
@@ -3711,8 +3777,8 @@ var init_Avatar = __esm({
|
|
|
3711
3777
|
actionPayload
|
|
3712
3778
|
}) => {
|
|
3713
3779
|
const eventBus = useEventBus();
|
|
3714
|
-
const [imgFailed, setImgFailed] =
|
|
3715
|
-
|
|
3780
|
+
const [imgFailed, setImgFailed] = React84__default.useState(false);
|
|
3781
|
+
React84__default.useEffect(() => {
|
|
3716
3782
|
setImgFailed(false);
|
|
3717
3783
|
}, [src]);
|
|
3718
3784
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -3825,7 +3891,7 @@ var init_Center = __esm({
|
|
|
3825
3891
|
as: Component = "div"
|
|
3826
3892
|
}) => {
|
|
3827
3893
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
3828
|
-
return
|
|
3894
|
+
return React84__default.createElement(Component, {
|
|
3829
3895
|
className: cn(
|
|
3830
3896
|
inline ? "inline-flex" : "flex",
|
|
3831
3897
|
horizontal && "justify-center",
|
|
@@ -4093,7 +4159,7 @@ var init_Radio = __esm({
|
|
|
4093
4159
|
md: "w-2.5 h-2.5",
|
|
4094
4160
|
lg: "w-3 h-3"
|
|
4095
4161
|
};
|
|
4096
|
-
Radio =
|
|
4162
|
+
Radio = React84__default.forwardRef(
|
|
4097
4163
|
({
|
|
4098
4164
|
label,
|
|
4099
4165
|
helperText,
|
|
@@ -4110,12 +4176,12 @@ var init_Radio = __esm({
|
|
|
4110
4176
|
onChange,
|
|
4111
4177
|
...props
|
|
4112
4178
|
}, ref) => {
|
|
4113
|
-
const reactId =
|
|
4179
|
+
const reactId = React84__default.useId();
|
|
4114
4180
|
const baseId = id || `radio-${reactId}`;
|
|
4115
4181
|
const hasError = !!error;
|
|
4116
4182
|
const eventBus = useEventBus();
|
|
4117
|
-
const [selected, setSelected] =
|
|
4118
|
-
|
|
4183
|
+
const [selected, setSelected] = React84__default.useState(value);
|
|
4184
|
+
React84__default.useEffect(() => {
|
|
4119
4185
|
if (value !== void 0) setSelected(value);
|
|
4120
4186
|
}, [value]);
|
|
4121
4187
|
const pick = (next, e) => {
|
|
@@ -4297,7 +4363,7 @@ var init_Switch = __esm({
|
|
|
4297
4363
|
"components/core/atoms/Switch.tsx"() {
|
|
4298
4364
|
"use client";
|
|
4299
4365
|
init_cn();
|
|
4300
|
-
Switch =
|
|
4366
|
+
Switch = React84.forwardRef(
|
|
4301
4367
|
({
|
|
4302
4368
|
checked,
|
|
4303
4369
|
defaultChecked = false,
|
|
@@ -4308,10 +4374,10 @@ var init_Switch = __esm({
|
|
|
4308
4374
|
name,
|
|
4309
4375
|
className
|
|
4310
4376
|
}, ref) => {
|
|
4311
|
-
const [isChecked, setIsChecked] =
|
|
4377
|
+
const [isChecked, setIsChecked] = React84.useState(
|
|
4312
4378
|
checked !== void 0 ? checked : defaultChecked
|
|
4313
4379
|
);
|
|
4314
|
-
|
|
4380
|
+
React84.useEffect(() => {
|
|
4315
4381
|
if (checked !== void 0) {
|
|
4316
4382
|
setIsChecked(checked);
|
|
4317
4383
|
}
|
|
@@ -4342,7 +4408,7 @@ var init_Switch = __esm({
|
|
|
4342
4408
|
// redefine --space-11 to 68px, which makes w-11 enormous and leaves
|
|
4343
4409
|
// the thumb stuck near the left edge. The switch geometry must stay
|
|
4344
4410
|
// proportional regardless of a theme's density scale.
|
|
4345
|
-
"relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
4411
|
+
"relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast",
|
|
4346
4412
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4347
4413
|
isChecked ? "bg-primary" : "bg-muted",
|
|
4348
4414
|
disabled && "cursor-not-allowed opacity-50"
|
|
@@ -4351,7 +4417,7 @@ var init_Switch = __esm({
|
|
|
4351
4417
|
"span",
|
|
4352
4418
|
{
|
|
4353
4419
|
className: cn(
|
|
4354
|
-
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
4420
|
+
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform duration-fast",
|
|
4355
4421
|
isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
|
|
4356
4422
|
)
|
|
4357
4423
|
}
|
|
@@ -4474,7 +4540,7 @@ var init_Stack = __esm({
|
|
|
4474
4540
|
};
|
|
4475
4541
|
const isHorizontal = direction === "horizontal";
|
|
4476
4542
|
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";
|
|
4477
|
-
return
|
|
4543
|
+
return React84__default.createElement(
|
|
4478
4544
|
Component,
|
|
4479
4545
|
{
|
|
4480
4546
|
className: cn(
|
|
@@ -4519,7 +4585,7 @@ var init_TextHighlight = __esm({
|
|
|
4519
4585
|
hoverEvent
|
|
4520
4586
|
}) => {
|
|
4521
4587
|
const eventBus = useEventBus();
|
|
4522
|
-
const baseStyles = "cursor-pointer transition-all duration-
|
|
4588
|
+
const baseStyles = "cursor-pointer transition-all duration-fast";
|
|
4523
4589
|
const typeStyles = {
|
|
4524
4590
|
question: cn(
|
|
4525
4591
|
// Blue border for questions
|
|
@@ -4674,7 +4740,7 @@ var Aside;
|
|
|
4674
4740
|
var init_Aside = __esm({
|
|
4675
4741
|
"components/core/atoms/Aside.tsx"() {
|
|
4676
4742
|
init_cn();
|
|
4677
|
-
Aside =
|
|
4743
|
+
Aside = React84__default.forwardRef(
|
|
4678
4744
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4679
4745
|
);
|
|
4680
4746
|
Aside.displayName = "Aside";
|
|
@@ -4753,9 +4819,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4753
4819
|
className
|
|
4754
4820
|
}) => {
|
|
4755
4821
|
const { t } = useTranslate();
|
|
4756
|
-
const [isVisible, setIsVisible] =
|
|
4757
|
-
const timeoutRef =
|
|
4758
|
-
const triggerRef =
|
|
4822
|
+
const [isVisible, setIsVisible] = React84__default.useState(false);
|
|
4823
|
+
const timeoutRef = React84__default.useRef(null);
|
|
4824
|
+
const triggerRef = React84__default.useRef(null);
|
|
4759
4825
|
const handleMouseEnter = () => {
|
|
4760
4826
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4761
4827
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4766,7 +4832,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4766
4832
|
};
|
|
4767
4833
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
4768
4834
|
const open = isVisible || revealed;
|
|
4769
|
-
|
|
4835
|
+
React84__default.useEffect(() => {
|
|
4770
4836
|
return () => {
|
|
4771
4837
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4772
4838
|
};
|
|
@@ -4976,7 +5042,7 @@ var init_StatusDot = __esm({
|
|
|
4976
5042
|
md: "w-2.5 h-2.5",
|
|
4977
5043
|
lg: "w-3 h-3"
|
|
4978
5044
|
};
|
|
4979
|
-
StatusDot =
|
|
5045
|
+
StatusDot = React84__default.forwardRef(
|
|
4980
5046
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4981
5047
|
return /* @__PURE__ */ jsx(
|
|
4982
5048
|
"span",
|
|
@@ -5030,7 +5096,7 @@ var init_TrendIndicator = __esm({
|
|
|
5030
5096
|
down: "trending-down",
|
|
5031
5097
|
flat: "arrow-right"
|
|
5032
5098
|
};
|
|
5033
|
-
TrendIndicator =
|
|
5099
|
+
TrendIndicator = React84__default.forwardRef(
|
|
5034
5100
|
({
|
|
5035
5101
|
className,
|
|
5036
5102
|
value,
|
|
@@ -5097,7 +5163,7 @@ var init_RangeSlider = __esm({
|
|
|
5097
5163
|
md: "w-4 h-4",
|
|
5098
5164
|
lg: "w-5 h-5"
|
|
5099
5165
|
};
|
|
5100
|
-
RangeSlider =
|
|
5166
|
+
RangeSlider = React84__default.forwardRef(
|
|
5101
5167
|
({
|
|
5102
5168
|
className,
|
|
5103
5169
|
min = 0,
|
|
@@ -5240,7 +5306,7 @@ var init_RangeSlider = __esm({
|
|
|
5240
5306
|
"border-2 border-primary",
|
|
5241
5307
|
"shadow-sm",
|
|
5242
5308
|
"pointer-events-none",
|
|
5243
|
-
"transition-transform duration-
|
|
5309
|
+
"transition-transform duration-instant",
|
|
5244
5310
|
isDragging && "scale-[var(--hover-scale)]",
|
|
5245
5311
|
thumbSizes[size]
|
|
5246
5312
|
),
|
|
@@ -5708,7 +5774,7 @@ var init_ContentSection = __esm({
|
|
|
5708
5774
|
md: "py-16",
|
|
5709
5775
|
lg: "py-24"
|
|
5710
5776
|
};
|
|
5711
|
-
ContentSection =
|
|
5777
|
+
ContentSection = React84__default.forwardRef(
|
|
5712
5778
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5713
5779
|
return /* @__PURE__ */ jsx(
|
|
5714
5780
|
Box,
|
|
@@ -6242,7 +6308,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6242
6308
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6243
6309
|
"none": {}
|
|
6244
6310
|
};
|
|
6245
|
-
AnimatedReveal =
|
|
6311
|
+
AnimatedReveal = React84__default.forwardRef(
|
|
6246
6312
|
({
|
|
6247
6313
|
trigger = "scroll",
|
|
6248
6314
|
animation = "fade-up",
|
|
@@ -6402,7 +6468,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6402
6468
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6403
6469
|
"use client";
|
|
6404
6470
|
init_cn();
|
|
6405
|
-
AnimatedGraphic =
|
|
6471
|
+
AnimatedGraphic = React84__default.forwardRef(
|
|
6406
6472
|
({
|
|
6407
6473
|
src,
|
|
6408
6474
|
svgContent,
|
|
@@ -6425,7 +6491,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6425
6491
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6426
6492
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6427
6493
|
const prevAnimateRef = useRef(animate);
|
|
6428
|
-
const setRef =
|
|
6494
|
+
const setRef = React84__default.useCallback(
|
|
6429
6495
|
(node) => {
|
|
6430
6496
|
containerRef.current = node;
|
|
6431
6497
|
if (typeof ref === "function") ref(node);
|
|
@@ -7154,9 +7220,9 @@ function ControlButton({
|
|
|
7154
7220
|
className
|
|
7155
7221
|
}) {
|
|
7156
7222
|
const eventBus = useEventBus();
|
|
7157
|
-
const [isPressed, setIsPressed] =
|
|
7223
|
+
const [isPressed, setIsPressed] = React84.useState(false);
|
|
7158
7224
|
const actualPressed = pressed ?? isPressed;
|
|
7159
|
-
const handlePointerDown =
|
|
7225
|
+
const handlePointerDown = React84.useCallback(
|
|
7160
7226
|
(e) => {
|
|
7161
7227
|
e.preventDefault();
|
|
7162
7228
|
if (disabled) return;
|
|
@@ -7166,7 +7232,7 @@ function ControlButton({
|
|
|
7166
7232
|
},
|
|
7167
7233
|
[disabled, pressEvent, eventBus, onPress]
|
|
7168
7234
|
);
|
|
7169
|
-
const handlePointerUp =
|
|
7235
|
+
const handlePointerUp = React84.useCallback(
|
|
7170
7236
|
(e) => {
|
|
7171
7237
|
e.preventDefault();
|
|
7172
7238
|
if (disabled) return;
|
|
@@ -7176,7 +7242,7 @@ function ControlButton({
|
|
|
7176
7242
|
},
|
|
7177
7243
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7178
7244
|
);
|
|
7179
|
-
const handlePointerLeave =
|
|
7245
|
+
const handlePointerLeave = React84.useCallback(
|
|
7180
7246
|
(e) => {
|
|
7181
7247
|
if (isPressed) {
|
|
7182
7248
|
setIsPressed(false);
|
|
@@ -7434,8 +7500,8 @@ function ControlGrid({
|
|
|
7434
7500
|
className
|
|
7435
7501
|
}) {
|
|
7436
7502
|
const eventBus = useEventBus();
|
|
7437
|
-
const [active, setActive] =
|
|
7438
|
-
const handlePress =
|
|
7503
|
+
const [active, setActive] = React84.useState(/* @__PURE__ */ new Set());
|
|
7504
|
+
const handlePress = React84.useCallback(
|
|
7439
7505
|
(id) => {
|
|
7440
7506
|
setActive((prev) => new Set(prev).add(id));
|
|
7441
7507
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7449,7 +7515,7 @@ function ControlGrid({
|
|
|
7449
7515
|
},
|
|
7450
7516
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
7451
7517
|
);
|
|
7452
|
-
const handleRelease =
|
|
7518
|
+
const handleRelease = React84.useCallback(
|
|
7453
7519
|
(id) => {
|
|
7454
7520
|
setActive((prev) => {
|
|
7455
7521
|
const next = new Set(prev);
|
|
@@ -7742,17 +7808,18 @@ function GameHud({
|
|
|
7742
7808
|
const mid = Math.ceil(stats.length / 2);
|
|
7743
7809
|
const leftStats = stats.slice(0, mid);
|
|
7744
7810
|
const rightStats = stats.slice(mid);
|
|
7745
|
-
const isTop = position === "top";
|
|
7746
7811
|
return /* @__PURE__ */ jsxs(
|
|
7747
|
-
|
|
7812
|
+
Card,
|
|
7748
7813
|
{
|
|
7814
|
+
variant: "bordered",
|
|
7815
|
+
padding: "none",
|
|
7749
7816
|
className: cn(
|
|
7750
|
-
"flex items-center justify-between w-full",
|
|
7817
|
+
"flex items-center justify-between w-full rounded-none bg-card",
|
|
7751
7818
|
"px-4 py-2 gap-4",
|
|
7752
|
-
|
|
7753
|
-
transparent && (isTop ? "border-b border-white/10 bg-black/40 backdrop-blur-sm" : "border-t border-white/10 bg-black/40 backdrop-blur-sm"),
|
|
7819
|
+
transparent && "backdrop-blur-sm",
|
|
7754
7820
|
className
|
|
7755
7821
|
),
|
|
7822
|
+
style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 40%, transparent)" } : void 0,
|
|
7756
7823
|
children: [
|
|
7757
7824
|
/* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
|
|
7758
7825
|
rightStats.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: rightStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
|
|
@@ -7761,14 +7828,16 @@ function GameHud({
|
|
|
7761
7828
|
);
|
|
7762
7829
|
}
|
|
7763
7830
|
return /* @__PURE__ */ jsx(
|
|
7764
|
-
|
|
7831
|
+
Card,
|
|
7765
7832
|
{
|
|
7766
|
-
|
|
7833
|
+
variant: "bordered",
|
|
7834
|
+
padding: "sm",
|
|
7767
7835
|
className: cn(
|
|
7768
|
-
"z-10 flex items-center gap-4
|
|
7769
|
-
transparent
|
|
7836
|
+
"z-10 relative flex items-center gap-4 bg-card",
|
|
7837
|
+
transparent && "backdrop-blur-sm",
|
|
7770
7838
|
className
|
|
7771
7839
|
),
|
|
7840
|
+
style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 30%, transparent)" } : void 0,
|
|
7772
7841
|
children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i))
|
|
7773
7842
|
}
|
|
7774
7843
|
);
|
|
@@ -7778,6 +7847,7 @@ var init_GameHud = __esm({
|
|
|
7778
7847
|
"components/game/molecules/GameHud.tsx"() {
|
|
7779
7848
|
init_cn();
|
|
7780
7849
|
init_Box();
|
|
7850
|
+
init_Card();
|
|
7781
7851
|
init_StatBadge();
|
|
7782
7852
|
positionMap = {
|
|
7783
7853
|
corners: "inset-0 pointer-events-none"
|
|
@@ -7803,7 +7873,7 @@ function GameMenu({
|
|
|
7803
7873
|
}) {
|
|
7804
7874
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
7805
7875
|
const eventBus = useEventBus();
|
|
7806
|
-
const handleOptionClick =
|
|
7876
|
+
const handleOptionClick = React84.useCallback(
|
|
7807
7877
|
(option) => {
|
|
7808
7878
|
if (option.event) {
|
|
7809
7879
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -7822,39 +7892,48 @@ function GameMenu({
|
|
|
7822
7892
|
{
|
|
7823
7893
|
className: cn(
|
|
7824
7894
|
"min-h-screen w-full flex flex-col items-center justify-center p-8",
|
|
7895
|
+
!background && "bg-background",
|
|
7825
7896
|
className
|
|
7826
7897
|
),
|
|
7827
|
-
style: {
|
|
7828
|
-
background: background ?? "linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0e17 100%)"
|
|
7829
|
-
},
|
|
7898
|
+
style: background ? { background } : void 0,
|
|
7830
7899
|
children: [
|
|
7831
|
-
/* @__PURE__ */ jsxs(
|
|
7832
|
-
|
|
7833
|
-
/* @__PURE__ */ jsx(
|
|
7834
|
-
Typography,
|
|
7835
|
-
{
|
|
7836
|
-
variant: "h1",
|
|
7837
|
-
className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
|
|
7838
|
-
style: {
|
|
7839
|
-
textShadow: "0 4px 12px rgba(0,0,0,0.5)"
|
|
7840
|
-
},
|
|
7841
|
-
children: title
|
|
7842
|
-
}
|
|
7843
|
-
),
|
|
7844
|
-
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
7845
|
-
] }),
|
|
7846
|
-
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
7847
|
-
ChoiceButton,
|
|
7900
|
+
/* @__PURE__ */ jsxs(
|
|
7901
|
+
Card,
|
|
7848
7902
|
{
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7903
|
+
variant: "bordered",
|
|
7904
|
+
padding: "lg",
|
|
7905
|
+
className: "bg-card flex flex-col items-center max-w-md w-full",
|
|
7906
|
+
children: [
|
|
7907
|
+
/* @__PURE__ */ jsxs(Box, { className: "text-center mb-8 animate-fade-in", children: [
|
|
7908
|
+
logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
|
|
7909
|
+
/* @__PURE__ */ jsx(
|
|
7910
|
+
Typography,
|
|
7911
|
+
{
|
|
7912
|
+
variant: "h1",
|
|
7913
|
+
className: "text-4xl md:text-5xl font-bold text-foreground tracking-tight",
|
|
7914
|
+
style: {
|
|
7915
|
+
textShadow: "0 4px 12px rgba(0,0,0,0.5)"
|
|
7916
|
+
},
|
|
7917
|
+
children: title
|
|
7918
|
+
}
|
|
7919
|
+
),
|
|
7920
|
+
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
7921
|
+
] }),
|
|
7922
|
+
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
7923
|
+
ChoiceButton,
|
|
7924
|
+
{
|
|
7925
|
+
text: option.label,
|
|
7926
|
+
index: index + 1,
|
|
7927
|
+
disabled: option.disabled,
|
|
7928
|
+
onClick: () => handleOptionClick(option),
|
|
7929
|
+
className: "text-lg py-4 px-8"
|
|
7930
|
+
},
|
|
7931
|
+
index
|
|
7932
|
+
)) })
|
|
7933
|
+
]
|
|
7934
|
+
}
|
|
7935
|
+
),
|
|
7936
|
+
/* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden -z-10", children: [
|
|
7858
7937
|
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
|
|
7859
7938
|
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
|
|
7860
7939
|
] })
|
|
@@ -7869,6 +7948,7 @@ var init_GameMenu = __esm({
|
|
|
7869
7948
|
init_cn();
|
|
7870
7949
|
init_useEventBus();
|
|
7871
7950
|
init_Box();
|
|
7951
|
+
init_Card();
|
|
7872
7952
|
init_Typography();
|
|
7873
7953
|
init_GameIcon();
|
|
7874
7954
|
init_ChoiceButton();
|
|
@@ -8029,7 +8109,7 @@ function StateGraph({
|
|
|
8029
8109
|
}) {
|
|
8030
8110
|
const eventBus = useEventBus();
|
|
8031
8111
|
const nodes = states ?? [];
|
|
8032
|
-
const positions =
|
|
8112
|
+
const positions = React84.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8033
8113
|
return /* @__PURE__ */ jsxs(
|
|
8034
8114
|
Box,
|
|
8035
8115
|
{
|
|
@@ -8100,8 +8180,8 @@ function MiniMap({
|
|
|
8100
8180
|
tileAssets,
|
|
8101
8181
|
unitAssets
|
|
8102
8182
|
}) {
|
|
8103
|
-
const canvasRef =
|
|
8104
|
-
const imgCacheRef =
|
|
8183
|
+
const canvasRef = React84.useRef(null);
|
|
8184
|
+
const imgCacheRef = React84.useRef(/* @__PURE__ */ new Map());
|
|
8105
8185
|
function loadImg(url) {
|
|
8106
8186
|
const cached = imgCacheRef.current.get(url);
|
|
8107
8187
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8116,7 +8196,7 @@ function MiniMap({
|
|
|
8116
8196
|
imgCacheRef.current.set(url, img);
|
|
8117
8197
|
return null;
|
|
8118
8198
|
}
|
|
8119
|
-
|
|
8199
|
+
React84.useEffect(() => {
|
|
8120
8200
|
const canvas = canvasRef.current;
|
|
8121
8201
|
if (!canvas) return;
|
|
8122
8202
|
const ctx = canvas.getContext("2d");
|
|
@@ -9805,7 +9885,7 @@ function LinearView({
|
|
|
9805
9885
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
9806
9886
|
const isDone = i < currentIdx;
|
|
9807
9887
|
const isCurrent = i === currentIdx;
|
|
9808
|
-
return /* @__PURE__ */ jsxs(
|
|
9888
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
9809
9889
|
i > 0 && /* @__PURE__ */ jsx(
|
|
9810
9890
|
Typography,
|
|
9811
9891
|
{
|
|
@@ -10340,7 +10420,7 @@ function SequenceBar({
|
|
|
10340
10420
|
else onSlotRemove?.(index);
|
|
10341
10421
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
10342
10422
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
10343
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
10423
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
10344
10424
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10345
10425
|
Typography,
|
|
10346
10426
|
{
|
|
@@ -10427,6 +10507,7 @@ var init_GameShell = __esm({
|
|
|
10427
10507
|
"components/game/templates/GameShell.tsx"() {
|
|
10428
10508
|
init_cn();
|
|
10429
10509
|
init_Box();
|
|
10510
|
+
init_Card();
|
|
10430
10511
|
init_Typography();
|
|
10431
10512
|
init_AtlasImage();
|
|
10432
10513
|
FONT_BASE = "https://almadar-kflow-assets.web.app/shared/_shared/kenney-fonts/fonts";
|
|
@@ -10455,13 +10536,14 @@ var init_GameShell = __esm({
|
|
|
10455
10536
|
showTopBar = true,
|
|
10456
10537
|
children,
|
|
10457
10538
|
backgroundAsset,
|
|
10458
|
-
|
|
10459
|
-
|
|
10539
|
+
fontFamily = "future",
|
|
10540
|
+
"data-theme": dataTheme
|
|
10460
10541
|
}) => {
|
|
10461
10542
|
const font = GAME_FONTS[fontFamily] ?? fontFamily;
|
|
10462
10543
|
return /* @__PURE__ */ jsxs(
|
|
10463
10544
|
Box,
|
|
10464
10545
|
{
|
|
10546
|
+
"data-theme": dataTheme || void 0,
|
|
10465
10547
|
className: cn("game-shell", className),
|
|
10466
10548
|
style: {
|
|
10467
10549
|
position: "relative",
|
|
@@ -10469,7 +10551,7 @@ var init_GameShell = __esm({
|
|
|
10469
10551
|
height: "100vh",
|
|
10470
10552
|
overflow: "hidden",
|
|
10471
10553
|
background: "var(--color-background, #0a0a0f)",
|
|
10472
|
-
color: "var(--color-
|
|
10554
|
+
color: "var(--color-foreground, #e0e0e0)",
|
|
10473
10555
|
fontFamily: `'${font}', system-ui, sans-serif`
|
|
10474
10556
|
},
|
|
10475
10557
|
children: [
|
|
@@ -10501,19 +10583,12 @@ var init_GameShell = __esm({
|
|
|
10501
10583
|
},
|
|
10502
10584
|
children: [
|
|
10503
10585
|
showTopBar && /* @__PURE__ */ jsx(
|
|
10504
|
-
|
|
10586
|
+
Card,
|
|
10505
10587
|
{
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
style: {
|
|
10511
|
-
padding: "6px 16px",
|
|
10512
|
-
background: hudBackgroundAsset ? void 0 : "rgba(18, 18, 31, 0.85)",
|
|
10513
|
-
borderRadius: hudBackgroundAsset ? void 0 : 10,
|
|
10514
|
-
boxShadow: "0 4px 14px rgba(0,0,0,0.45)",
|
|
10515
|
-
flexShrink: 0
|
|
10516
|
-
},
|
|
10588
|
+
variant: "bordered",
|
|
10589
|
+
padding: "none",
|
|
10590
|
+
className: "game-shell__title bg-card pointer-events-auto",
|
|
10591
|
+
style: { padding: "6px 16px", flexShrink: 0 },
|
|
10517
10592
|
children: /* @__PURE__ */ jsx(
|
|
10518
10593
|
Typography,
|
|
10519
10594
|
{
|
|
@@ -10994,7 +11069,7 @@ var init_ErrorBoundary = __esm({
|
|
|
10994
11069
|
}
|
|
10995
11070
|
);
|
|
10996
11071
|
};
|
|
10997
|
-
ErrorBoundary = class extends
|
|
11072
|
+
ErrorBoundary = class extends React84__default.Component {
|
|
10998
11073
|
constructor(props) {
|
|
10999
11074
|
super(props);
|
|
11000
11075
|
__publicField(this, "reset", () => {
|
|
@@ -11644,7 +11719,7 @@ var init_Container = __esm({
|
|
|
11644
11719
|
as: Component = "div"
|
|
11645
11720
|
}) => {
|
|
11646
11721
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
11647
|
-
return
|
|
11722
|
+
return React84__default.createElement(
|
|
11648
11723
|
Component,
|
|
11649
11724
|
{
|
|
11650
11725
|
className: cn(
|
|
@@ -14471,7 +14546,7 @@ var init_CodeBlock = __esm({
|
|
|
14471
14546
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
14472
14547
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
14473
14548
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
14474
|
-
CodeBlock =
|
|
14549
|
+
CodeBlock = React84__default.memo(
|
|
14475
14550
|
({
|
|
14476
14551
|
code: rawCode,
|
|
14477
14552
|
language = "text",
|
|
@@ -15058,7 +15133,7 @@ var init_MarkdownContent = __esm({
|
|
|
15058
15133
|
init_Box();
|
|
15059
15134
|
init_CodeBlock();
|
|
15060
15135
|
init_cn();
|
|
15061
|
-
MarkdownContent =
|
|
15136
|
+
MarkdownContent = React84__default.memo(
|
|
15062
15137
|
({ content, direction = "ltr", className }) => {
|
|
15063
15138
|
const { t: _t } = useTranslate();
|
|
15064
15139
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16021,7 +16096,7 @@ var init_StateMachineView = __esm({
|
|
|
16021
16096
|
Box,
|
|
16022
16097
|
{
|
|
16023
16098
|
className: cn(
|
|
16024
|
-
"fixed z-50 animate-in fade-in-0 zoom-in-95 duration-
|
|
16099
|
+
"fixed z-50 animate-in fade-in-0 zoom-in-95 duration-fast",
|
|
16025
16100
|
tooltip.pinned ? "pointer-events-auto" : "pointer-events-none"
|
|
16026
16101
|
),
|
|
16027
16102
|
style: {
|
|
@@ -16385,7 +16460,7 @@ var init_StateMachineView = __esm({
|
|
|
16385
16460
|
style: { top: title ? 30 : 0 },
|
|
16386
16461
|
children: [
|
|
16387
16462
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
16388
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
16463
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React84__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
16389
16464
|
StateNode2,
|
|
16390
16465
|
{
|
|
16391
16466
|
state,
|
|
@@ -18424,6 +18499,129 @@ var init_Breadcrumb = __esm({
|
|
|
18424
18499
|
Breadcrumb.displayName = "Breadcrumb";
|
|
18425
18500
|
}
|
|
18426
18501
|
});
|
|
18502
|
+
function useSafeEventBus2() {
|
|
18503
|
+
try {
|
|
18504
|
+
return useEventBus();
|
|
18505
|
+
} catch {
|
|
18506
|
+
return { emit: () => {
|
|
18507
|
+
}, on: () => () => {
|
|
18508
|
+
}, once: () => {
|
|
18509
|
+
} };
|
|
18510
|
+
}
|
|
18511
|
+
}
|
|
18512
|
+
var log8, lookStyles4, ButtonGroup;
|
|
18513
|
+
var init_ButtonGroup = __esm({
|
|
18514
|
+
"components/core/molecules/ButtonGroup.tsx"() {
|
|
18515
|
+
"use client";
|
|
18516
|
+
init_cn();
|
|
18517
|
+
init_atoms();
|
|
18518
|
+
init_useEventBus();
|
|
18519
|
+
log8 = createLogger("almadar:ui:button-group");
|
|
18520
|
+
lookStyles4 = {
|
|
18521
|
+
"right-aligned-buttons": "",
|
|
18522
|
+
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
18523
|
+
"inline-row": "gap-2 inline-flex",
|
|
18524
|
+
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
18525
|
+
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
18526
|
+
};
|
|
18527
|
+
ButtonGroup = ({
|
|
18528
|
+
children,
|
|
18529
|
+
primary,
|
|
18530
|
+
secondary,
|
|
18531
|
+
variant = "default",
|
|
18532
|
+
orientation = "horizontal",
|
|
18533
|
+
className,
|
|
18534
|
+
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
18535
|
+
entity: _entity,
|
|
18536
|
+
filters,
|
|
18537
|
+
look = "right-aligned-buttons"
|
|
18538
|
+
}) => {
|
|
18539
|
+
const eventBus = useSafeEventBus2();
|
|
18540
|
+
const variantClasses2 = {
|
|
18541
|
+
default: "gap-0",
|
|
18542
|
+
segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
|
|
18543
|
+
toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
|
|
18544
|
+
};
|
|
18545
|
+
const orientationClasses = {
|
|
18546
|
+
horizontal: "flex-row",
|
|
18547
|
+
vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
|
|
18548
|
+
};
|
|
18549
|
+
const handleActionClick = (action) => {
|
|
18550
|
+
if (action.event) {
|
|
18551
|
+
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
18552
|
+
}
|
|
18553
|
+
if (action.navigatesTo) {
|
|
18554
|
+
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
18555
|
+
}
|
|
18556
|
+
};
|
|
18557
|
+
const renderFormActions = () => {
|
|
18558
|
+
const buttons = [];
|
|
18559
|
+
if (secondary) {
|
|
18560
|
+
secondary.forEach((action, index) => {
|
|
18561
|
+
buttons.push(
|
|
18562
|
+
/* @__PURE__ */ jsx(
|
|
18563
|
+
Button,
|
|
18564
|
+
{
|
|
18565
|
+
type: action.actionType === "submit" ? "submit" : "button",
|
|
18566
|
+
variant: action.variant || "ghost",
|
|
18567
|
+
onClick: () => handleActionClick(action),
|
|
18568
|
+
children: action.label
|
|
18569
|
+
},
|
|
18570
|
+
`secondary-${index}`
|
|
18571
|
+
)
|
|
18572
|
+
);
|
|
18573
|
+
});
|
|
18574
|
+
}
|
|
18575
|
+
if (primary) {
|
|
18576
|
+
const isSubmit = primary.actionType === "submit";
|
|
18577
|
+
buttons.push(
|
|
18578
|
+
/* @__PURE__ */ jsx(
|
|
18579
|
+
Button,
|
|
18580
|
+
{
|
|
18581
|
+
type: isSubmit ? "submit" : "button",
|
|
18582
|
+
variant: primary.variant || "primary",
|
|
18583
|
+
onClick: () => handleActionClick(primary),
|
|
18584
|
+
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
18585
|
+
children: primary.label
|
|
18586
|
+
},
|
|
18587
|
+
"primary"
|
|
18588
|
+
)
|
|
18589
|
+
);
|
|
18590
|
+
}
|
|
18591
|
+
return buttons;
|
|
18592
|
+
};
|
|
18593
|
+
const renderFilters = () => {
|
|
18594
|
+
if (!filters || filters.length === 0) return null;
|
|
18595
|
+
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
18596
|
+
Button,
|
|
18597
|
+
{
|
|
18598
|
+
variant: "ghost",
|
|
18599
|
+
onClick: () => {
|
|
18600
|
+
log8.debug("Filter clicked", { field: filter.field });
|
|
18601
|
+
},
|
|
18602
|
+
children: filter.label
|
|
18603
|
+
},
|
|
18604
|
+
`filter-${filter.field}-${index}`
|
|
18605
|
+
));
|
|
18606
|
+
};
|
|
18607
|
+
return /* @__PURE__ */ jsx(
|
|
18608
|
+
"div",
|
|
18609
|
+
{
|
|
18610
|
+
className: cn(
|
|
18611
|
+
"inline-flex gap-2",
|
|
18612
|
+
variantClasses2[variant],
|
|
18613
|
+
orientationClasses[orientation],
|
|
18614
|
+
lookStyles4[look],
|
|
18615
|
+
className
|
|
18616
|
+
),
|
|
18617
|
+
role: "group",
|
|
18618
|
+
children: children || renderFilters() || renderFormActions()
|
|
18619
|
+
}
|
|
18620
|
+
);
|
|
18621
|
+
};
|
|
18622
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
18623
|
+
}
|
|
18624
|
+
});
|
|
18427
18625
|
function useSwipeGesture(callbacks, options = {}) {
|
|
18428
18626
|
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
18429
18627
|
const startX = useRef(0);
|
|
@@ -19233,7 +19431,7 @@ var init_CardGrid = __esm({
|
|
|
19233
19431
|
CardGrid.displayName = "CardGrid";
|
|
19234
19432
|
}
|
|
19235
19433
|
});
|
|
19236
|
-
function
|
|
19434
|
+
function useSafeEventBus3() {
|
|
19237
19435
|
try {
|
|
19238
19436
|
return useEventBus();
|
|
19239
19437
|
} catch {
|
|
@@ -19269,7 +19467,7 @@ var init_Carousel = __esm({
|
|
|
19269
19467
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
19270
19468
|
const scrollRef = useRef(null);
|
|
19271
19469
|
const autoPlayRef = useRef(null);
|
|
19272
|
-
const eventBus =
|
|
19470
|
+
const eventBus = useSafeEventBus3();
|
|
19273
19471
|
const { t } = useTranslate();
|
|
19274
19472
|
const safeItems = items ?? [];
|
|
19275
19473
|
const totalSlides = safeItems.length;
|
|
@@ -19631,7 +19829,7 @@ var init_Chart = __esm({
|
|
|
19631
19829
|
return /* @__PURE__ */ jsx(
|
|
19632
19830
|
Box,
|
|
19633
19831
|
{
|
|
19634
|
-
className: "h-full rounded-r-sm transition-all duration-
|
|
19832
|
+
className: "h-full rounded-r-sm transition-all duration-slow ease-standard min-w-[2px] cursor-pointer hover:opacity-80",
|
|
19635
19833
|
style: {
|
|
19636
19834
|
width: `${ratio}%`,
|
|
19637
19835
|
backgroundColor: color
|
|
@@ -19687,7 +19885,7 @@ var init_Chart = __esm({
|
|
|
19687
19885
|
Box,
|
|
19688
19886
|
{
|
|
19689
19887
|
className: cn(
|
|
19690
|
-
"rounded-t-sm transition-all duration-
|
|
19888
|
+
"rounded-t-sm transition-all duration-slow ease-standard min-h-[4px] cursor-pointer hover:opacity-80",
|
|
19691
19889
|
histogram ? "flex-1 mx-0" : "flex-1"
|
|
19692
19890
|
),
|
|
19693
19891
|
style: {
|
|
@@ -19737,7 +19935,7 @@ var init_Chart = __esm({
|
|
|
19737
19935
|
return /* @__PURE__ */ jsx(
|
|
19738
19936
|
Box,
|
|
19739
19937
|
{
|
|
19740
|
-
className: "w-full transition-all duration-
|
|
19938
|
+
className: "w-full transition-all duration-slow ease-standard cursor-pointer hover:opacity-80",
|
|
19741
19939
|
style: {
|
|
19742
19940
|
height: `${ratio}%`,
|
|
19743
19941
|
backgroundColor: color
|
|
@@ -19827,7 +20025,7 @@ var init_Chart = __esm({
|
|
|
19827
20025
|
fill: seg.color,
|
|
19828
20026
|
stroke: "var(--color-card)",
|
|
19829
20027
|
strokeWidth: "2",
|
|
19830
|
-
className: "transition-opacity duration-
|
|
20028
|
+
className: "transition-opacity duration-fast hover:opacity-80 cursor-pointer",
|
|
19831
20029
|
onClick: () => onPointClick?.(
|
|
19832
20030
|
{ label: seg.label, value: seg.value, color: seg.color },
|
|
19833
20031
|
"default"
|
|
@@ -22040,8 +22238,8 @@ var init_Menu = __esm({
|
|
|
22040
22238
|
"bottom-end": "bottom-start"
|
|
22041
22239
|
};
|
|
22042
22240
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22043
|
-
const triggerChild =
|
|
22044
|
-
const triggerElement =
|
|
22241
|
+
const triggerChild = React84__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22242
|
+
const triggerElement = React84__default.cloneElement(
|
|
22045
22243
|
triggerChild,
|
|
22046
22244
|
{
|
|
22047
22245
|
ref: triggerRef,
|
|
@@ -22136,14 +22334,14 @@ function useDataDnd(args) {
|
|
|
22136
22334
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22137
22335
|
const enabled = isZone || Boolean(dndRoot);
|
|
22138
22336
|
const eventBus = useEventBus();
|
|
22139
|
-
const parentRoot =
|
|
22337
|
+
const parentRoot = React84__default.useContext(RootCtx);
|
|
22140
22338
|
const isRoot = enabled && parentRoot === null;
|
|
22141
|
-
const zoneId =
|
|
22339
|
+
const zoneId = React84__default.useId();
|
|
22142
22340
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22143
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22144
|
-
const optimisticOrdersRef =
|
|
22341
|
+
const [optimisticOrders, setOptimisticOrders] = React84__default.useState(() => /* @__PURE__ */ new Map());
|
|
22342
|
+
const optimisticOrdersRef = React84__default.useRef(optimisticOrders);
|
|
22145
22343
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22146
|
-
const clearOptimisticOrder =
|
|
22344
|
+
const clearOptimisticOrder = React84__default.useCallback((group) => {
|
|
22147
22345
|
setOptimisticOrders((prev) => {
|
|
22148
22346
|
if (!prev.has(group)) return prev;
|
|
22149
22347
|
const next = new Map(prev);
|
|
@@ -22168,7 +22366,7 @@ function useDataDnd(args) {
|
|
|
22168
22366
|
const raw = it[dndItemIdField];
|
|
22169
22367
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
22170
22368
|
}).join("|");
|
|
22171
|
-
const itemIds =
|
|
22369
|
+
const itemIds = React84__default.useMemo(
|
|
22172
22370
|
() => orderedItems.map((it, idx) => {
|
|
22173
22371
|
const raw = it[dndItemIdField];
|
|
22174
22372
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -22179,7 +22377,7 @@ function useDataDnd(args) {
|
|
|
22179
22377
|
const raw = it[dndItemIdField];
|
|
22180
22378
|
return raw != null ? String(raw) : `__${idx}`;
|
|
22181
22379
|
}).join("|");
|
|
22182
|
-
|
|
22380
|
+
React84__default.useEffect(() => {
|
|
22183
22381
|
const root = isRoot ? null : parentRoot;
|
|
22184
22382
|
if (root) {
|
|
22185
22383
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22187,20 +22385,20 @@ function useDataDnd(args) {
|
|
|
22187
22385
|
clearOptimisticOrder(ownGroup);
|
|
22188
22386
|
}
|
|
22189
22387
|
}, [itemsContentSig, ownGroup]);
|
|
22190
|
-
const zonesRef =
|
|
22191
|
-
const registerZone =
|
|
22388
|
+
const zonesRef = React84__default.useRef(/* @__PURE__ */ new Map());
|
|
22389
|
+
const registerZone = React84__default.useCallback((zoneId2, meta2) => {
|
|
22192
22390
|
zonesRef.current.set(zoneId2, meta2);
|
|
22193
22391
|
}, []);
|
|
22194
|
-
const unregisterZone =
|
|
22392
|
+
const unregisterZone = React84__default.useCallback((zoneId2) => {
|
|
22195
22393
|
zonesRef.current.delete(zoneId2);
|
|
22196
22394
|
}, []);
|
|
22197
|
-
const [activeDrag, setActiveDrag] =
|
|
22198
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22199
|
-
const meta =
|
|
22395
|
+
const [activeDrag, setActiveDrag] = React84__default.useState(null);
|
|
22396
|
+
const [overZoneGroup, setOverZoneGroup] = React84__default.useState(null);
|
|
22397
|
+
const meta = React84__default.useMemo(
|
|
22200
22398
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22201
22399
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22202
22400
|
);
|
|
22203
|
-
|
|
22401
|
+
React84__default.useEffect(() => {
|
|
22204
22402
|
const target = isRoot ? null : parentRoot;
|
|
22205
22403
|
if (!target) {
|
|
22206
22404
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22219,7 +22417,7 @@ function useDataDnd(args) {
|
|
|
22219
22417
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22220
22418
|
const sensors = useAlmadarDndSensors(true);
|
|
22221
22419
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22222
|
-
const findZoneByItem =
|
|
22420
|
+
const findZoneByItem = React84__default.useCallback(
|
|
22223
22421
|
(id) => {
|
|
22224
22422
|
for (const z of zonesRef.current.values()) {
|
|
22225
22423
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22228,7 +22426,7 @@ function useDataDnd(args) {
|
|
|
22228
22426
|
},
|
|
22229
22427
|
[]
|
|
22230
22428
|
);
|
|
22231
|
-
|
|
22429
|
+
React84__default.useCallback(
|
|
22232
22430
|
(group) => {
|
|
22233
22431
|
for (const z of zonesRef.current.values()) {
|
|
22234
22432
|
if (z.group === group) return z;
|
|
@@ -22237,7 +22435,7 @@ function useDataDnd(args) {
|
|
|
22237
22435
|
},
|
|
22238
22436
|
[]
|
|
22239
22437
|
);
|
|
22240
|
-
const handleDragEnd =
|
|
22438
|
+
const handleDragEnd = React84__default.useCallback(
|
|
22241
22439
|
(event) => {
|
|
22242
22440
|
const { active, over } = event;
|
|
22243
22441
|
const activeIdStr = String(active.id);
|
|
@@ -22328,8 +22526,8 @@ function useDataDnd(args) {
|
|
|
22328
22526
|
},
|
|
22329
22527
|
[eventBus]
|
|
22330
22528
|
);
|
|
22331
|
-
const sortableData =
|
|
22332
|
-
const SortableItem =
|
|
22529
|
+
const sortableData = React84__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22530
|
+
const SortableItem = React84__default.useCallback(
|
|
22333
22531
|
({ id, children }) => {
|
|
22334
22532
|
const {
|
|
22335
22533
|
attributes,
|
|
@@ -22369,7 +22567,7 @@ function useDataDnd(args) {
|
|
|
22369
22567
|
id: droppableId,
|
|
22370
22568
|
data: sortableData
|
|
22371
22569
|
});
|
|
22372
|
-
const ctx =
|
|
22570
|
+
const ctx = React84__default.useContext(RootCtx);
|
|
22373
22571
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22374
22572
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22375
22573
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22384,7 +22582,7 @@ function useDataDnd(args) {
|
|
|
22384
22582
|
showForeignPlaceholder,
|
|
22385
22583
|
ctxAvailable: ctx != null
|
|
22386
22584
|
});
|
|
22387
|
-
|
|
22585
|
+
React84__default.useEffect(() => {
|
|
22388
22586
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22389
22587
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22390
22588
|
return /* @__PURE__ */ jsx(
|
|
@@ -22398,11 +22596,11 @@ function useDataDnd(args) {
|
|
|
22398
22596
|
}
|
|
22399
22597
|
);
|
|
22400
22598
|
};
|
|
22401
|
-
const rootContextValue =
|
|
22599
|
+
const rootContextValue = React84__default.useMemo(
|
|
22402
22600
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22403
22601
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22404
22602
|
);
|
|
22405
|
-
const handleDragStart =
|
|
22603
|
+
const handleDragStart = React84__default.useCallback((event) => {
|
|
22406
22604
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22407
22605
|
const rect = event.active.rect.current.initial;
|
|
22408
22606
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22421,7 +22619,7 @@ function useDataDnd(args) {
|
|
|
22421
22619
|
isRoot
|
|
22422
22620
|
});
|
|
22423
22621
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22424
|
-
const handleDragOver =
|
|
22622
|
+
const handleDragOver = React84__default.useCallback((event) => {
|
|
22425
22623
|
const { active, over } = event;
|
|
22426
22624
|
const overData = over?.data?.current;
|
|
22427
22625
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22491,7 +22689,7 @@ function useDataDnd(args) {
|
|
|
22491
22689
|
return next;
|
|
22492
22690
|
});
|
|
22493
22691
|
}, []);
|
|
22494
|
-
const handleDragCancel =
|
|
22692
|
+
const handleDragCancel = React84__default.useCallback((event) => {
|
|
22495
22693
|
setActiveDrag(null);
|
|
22496
22694
|
setOverZoneGroup(null);
|
|
22497
22695
|
dndLog.warn("dragCancel", {
|
|
@@ -22499,12 +22697,12 @@ function useDataDnd(args) {
|
|
|
22499
22697
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22500
22698
|
});
|
|
22501
22699
|
}, []);
|
|
22502
|
-
const handleDragEndWithCleanup =
|
|
22700
|
+
const handleDragEndWithCleanup = React84__default.useCallback((event) => {
|
|
22503
22701
|
handleDragEnd(event);
|
|
22504
22702
|
setActiveDrag(null);
|
|
22505
22703
|
setOverZoneGroup(null);
|
|
22506
22704
|
}, [handleDragEnd]);
|
|
22507
|
-
const wrapContainer =
|
|
22705
|
+
const wrapContainer = React84__default.useCallback(
|
|
22508
22706
|
(children) => {
|
|
22509
22707
|
if (!enabled) return children;
|
|
22510
22708
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22558,7 +22756,7 @@ var init_useDataDnd = __esm({
|
|
|
22558
22756
|
init_useAlmadarDndCollision();
|
|
22559
22757
|
init_Box();
|
|
22560
22758
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22561
|
-
RootCtx =
|
|
22759
|
+
RootCtx = React84__default.createContext(null);
|
|
22562
22760
|
}
|
|
22563
22761
|
});
|
|
22564
22762
|
function renderIconInput(icon, props) {
|
|
@@ -22755,7 +22953,7 @@ function DataGrid({
|
|
|
22755
22953
|
/* @__PURE__ */ jsx(
|
|
22756
22954
|
Box,
|
|
22757
22955
|
{
|
|
22758
|
-
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass,
|
|
22956
|
+
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles5[look], className),
|
|
22759
22957
|
style: scrollX ? { gridAutoFlow: "column", gridAutoColumns: `minmax(${minCardWidth}px, 1fr)` } : gridTemplateColumns ? { gridTemplateColumns } : void 0,
|
|
22760
22958
|
children: data.map((item, index) => {
|
|
22761
22959
|
const itemData = item;
|
|
@@ -22950,7 +23148,7 @@ function DataGrid({
|
|
|
22950
23148
|
] })
|
|
22951
23149
|
);
|
|
22952
23150
|
}
|
|
22953
|
-
var dataGridLog, BADGE_VARIANTS, gapStyles5,
|
|
23151
|
+
var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles5;
|
|
22954
23152
|
var init_DataGrid = __esm({
|
|
22955
23153
|
"components/core/molecules/DataGrid.tsx"() {
|
|
22956
23154
|
"use client";
|
|
@@ -22985,7 +23183,7 @@ var init_DataGrid = __esm({
|
|
|
22985
23183
|
lg: "gap-6",
|
|
22986
23184
|
xl: "gap-8"
|
|
22987
23185
|
};
|
|
22988
|
-
|
|
23186
|
+
lookStyles5 = {
|
|
22989
23187
|
dense: "gap-2 [&>*]:p-card-sm",
|
|
22990
23188
|
spacious: "gap-8 [&>*]:p-card-lg",
|
|
22991
23189
|
striped: "[&>*:nth-child(even)]:bg-muted/30",
|
|
@@ -23085,7 +23283,7 @@ function DataList({
|
|
|
23085
23283
|
}) {
|
|
23086
23284
|
const eventBus = useEventBus();
|
|
23087
23285
|
const { t } = useTranslate();
|
|
23088
|
-
const [visibleCount, setVisibleCount] =
|
|
23286
|
+
const [visibleCount, setVisibleCount] = React84__default.useState(pageSize || Infinity);
|
|
23089
23287
|
const fieldDefs = fields ?? columns ?? [];
|
|
23090
23288
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23091
23289
|
const dnd = useDataDnd({
|
|
@@ -23104,7 +23302,7 @@ function DataList({
|
|
|
23104
23302
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23105
23303
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23106
23304
|
const hasRenderProp = typeof children === "function";
|
|
23107
|
-
|
|
23305
|
+
React84__default.useEffect(() => {
|
|
23108
23306
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23109
23307
|
const childrenTypeOf = typeof children;
|
|
23110
23308
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23208,7 +23406,7 @@ function DataList({
|
|
|
23208
23406
|
const items2 = [...data];
|
|
23209
23407
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
23210
23408
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
23211
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23409
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
23212
23410
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23213
23411
|
group.items.map((itemData, index) => {
|
|
23214
23412
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23349,7 +23547,7 @@ function DataList({
|
|
|
23349
23547
|
className
|
|
23350
23548
|
),
|
|
23351
23549
|
children: [
|
|
23352
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23550
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
23353
23551
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23354
23552
|
group.items.map(
|
|
23355
23553
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23434,7 +23632,7 @@ var init_FormSection = __esm({
|
|
|
23434
23632
|
columns = 1,
|
|
23435
23633
|
className
|
|
23436
23634
|
}) => {
|
|
23437
|
-
const [collapsed, setCollapsed] =
|
|
23635
|
+
const [collapsed, setCollapsed] = React84__default.useState(defaultCollapsed);
|
|
23438
23636
|
const { t } = useTranslate();
|
|
23439
23637
|
const eventBus = useEventBus();
|
|
23440
23638
|
const gridClass = {
|
|
@@ -23442,7 +23640,7 @@ var init_FormSection = __esm({
|
|
|
23442
23640
|
2: "grid-cols-1 md:grid-cols-2",
|
|
23443
23641
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
23444
23642
|
}[columns];
|
|
23445
|
-
|
|
23643
|
+
React84__default.useCallback(() => {
|
|
23446
23644
|
if (collapsible) {
|
|
23447
23645
|
setCollapsed((prev) => !prev);
|
|
23448
23646
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -23700,129 +23898,6 @@ var init_FormField = __esm({
|
|
|
23700
23898
|
FormField.displayName = "FormField";
|
|
23701
23899
|
}
|
|
23702
23900
|
});
|
|
23703
|
-
function useSafeEventBus3() {
|
|
23704
|
-
try {
|
|
23705
|
-
return useEventBus();
|
|
23706
|
-
} catch {
|
|
23707
|
-
return { emit: () => {
|
|
23708
|
-
}, on: () => () => {
|
|
23709
|
-
}, once: () => {
|
|
23710
|
-
} };
|
|
23711
|
-
}
|
|
23712
|
-
}
|
|
23713
|
-
var log8, lookStyles5, ButtonGroup;
|
|
23714
|
-
var init_ButtonGroup = __esm({
|
|
23715
|
-
"components/core/molecules/ButtonGroup.tsx"() {
|
|
23716
|
-
"use client";
|
|
23717
|
-
init_cn();
|
|
23718
|
-
init_atoms();
|
|
23719
|
-
init_useEventBus();
|
|
23720
|
-
log8 = createLogger("almadar:ui:button-group");
|
|
23721
|
-
lookStyles5 = {
|
|
23722
|
-
"right-aligned-buttons": "",
|
|
23723
|
-
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
23724
|
-
"inline-row": "gap-2 inline-flex",
|
|
23725
|
-
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
23726
|
-
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
23727
|
-
};
|
|
23728
|
-
ButtonGroup = ({
|
|
23729
|
-
children,
|
|
23730
|
-
primary,
|
|
23731
|
-
secondary,
|
|
23732
|
-
variant = "default",
|
|
23733
|
-
orientation = "horizontal",
|
|
23734
|
-
className,
|
|
23735
|
-
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
23736
|
-
entity: _entity,
|
|
23737
|
-
filters,
|
|
23738
|
-
look = "right-aligned-buttons"
|
|
23739
|
-
}) => {
|
|
23740
|
-
const eventBus = useSafeEventBus3();
|
|
23741
|
-
const variantClasses2 = {
|
|
23742
|
-
default: "gap-0",
|
|
23743
|
-
segmented: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0",
|
|
23744
|
-
toggle: "gap-0 [&>button]:rounded-none [&>button:first-child]:rounded-l-lg [&>button:last-child]:rounded-r-lg [&>button:not(:first-child)]:border-l-0"
|
|
23745
|
-
};
|
|
23746
|
-
const orientationClasses = {
|
|
23747
|
-
horizontal: "flex-row",
|
|
23748
|
-
vertical: "flex-col [&>button:first-child]:rounded-t-lg [&>button:last-child]:rounded-b-lg [&>button:not(:first-child)]:border-t-0 [&>button:not(:first-child)]:border-l"
|
|
23749
|
-
};
|
|
23750
|
-
const handleActionClick = (action) => {
|
|
23751
|
-
if (action.event) {
|
|
23752
|
-
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
23753
|
-
}
|
|
23754
|
-
if (action.navigatesTo) {
|
|
23755
|
-
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
23756
|
-
}
|
|
23757
|
-
};
|
|
23758
|
-
const renderFormActions = () => {
|
|
23759
|
-
const buttons = [];
|
|
23760
|
-
if (secondary) {
|
|
23761
|
-
secondary.forEach((action, index) => {
|
|
23762
|
-
buttons.push(
|
|
23763
|
-
/* @__PURE__ */ jsx(
|
|
23764
|
-
Button,
|
|
23765
|
-
{
|
|
23766
|
-
type: action.actionType === "submit" ? "submit" : "button",
|
|
23767
|
-
variant: action.variant || "ghost",
|
|
23768
|
-
onClick: () => handleActionClick(action),
|
|
23769
|
-
children: action.label
|
|
23770
|
-
},
|
|
23771
|
-
`secondary-${index}`
|
|
23772
|
-
)
|
|
23773
|
-
);
|
|
23774
|
-
});
|
|
23775
|
-
}
|
|
23776
|
-
if (primary) {
|
|
23777
|
-
const isSubmit = primary.actionType === "submit";
|
|
23778
|
-
buttons.push(
|
|
23779
|
-
/* @__PURE__ */ jsx(
|
|
23780
|
-
Button,
|
|
23781
|
-
{
|
|
23782
|
-
type: isSubmit ? "submit" : "button",
|
|
23783
|
-
variant: primary.variant || "primary",
|
|
23784
|
-
onClick: () => handleActionClick(primary),
|
|
23785
|
-
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
23786
|
-
children: primary.label
|
|
23787
|
-
},
|
|
23788
|
-
"primary"
|
|
23789
|
-
)
|
|
23790
|
-
);
|
|
23791
|
-
}
|
|
23792
|
-
return buttons;
|
|
23793
|
-
};
|
|
23794
|
-
const renderFilters = () => {
|
|
23795
|
-
if (!filters || filters.length === 0) return null;
|
|
23796
|
-
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
23797
|
-
Button,
|
|
23798
|
-
{
|
|
23799
|
-
variant: "ghost",
|
|
23800
|
-
onClick: () => {
|
|
23801
|
-
log8.debug("Filter clicked", { field: filter.field });
|
|
23802
|
-
},
|
|
23803
|
-
children: filter.label
|
|
23804
|
-
},
|
|
23805
|
-
`filter-${filter.field}-${index}`
|
|
23806
|
-
));
|
|
23807
|
-
};
|
|
23808
|
-
return /* @__PURE__ */ jsx(
|
|
23809
|
-
"div",
|
|
23810
|
-
{
|
|
23811
|
-
className: cn(
|
|
23812
|
-
"inline-flex gap-2",
|
|
23813
|
-
variantClasses2[variant],
|
|
23814
|
-
orientationClasses[orientation],
|
|
23815
|
-
lookStyles5[look],
|
|
23816
|
-
className
|
|
23817
|
-
),
|
|
23818
|
-
role: "group",
|
|
23819
|
-
children: children || renderFilters() || renderFormActions()
|
|
23820
|
-
}
|
|
23821
|
-
);
|
|
23822
|
-
};
|
|
23823
|
-
ButtonGroup.displayName = "ButtonGroup";
|
|
23824
|
-
}
|
|
23825
|
-
});
|
|
23826
23901
|
function getOrCreateStore(query) {
|
|
23827
23902
|
if (!queryStores.has(query)) {
|
|
23828
23903
|
queryStores.set(query, {
|
|
@@ -23999,7 +24074,7 @@ var init_FilterGroup = __esm({
|
|
|
23999
24074
|
type: "button",
|
|
24000
24075
|
onClick: () => handleFilterSelect(filter.field, null),
|
|
24001
24076
|
className: cn(
|
|
24002
|
-
"px-3 py-1.5 text-sm font-medium transition-all duration-
|
|
24077
|
+
"px-3 py-1.5 text-sm font-medium transition-all duration-fast",
|
|
24003
24078
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
24004
24079
|
),
|
|
24005
24080
|
children: t("filterGroup.all")
|
|
@@ -24011,7 +24086,7 @@ var init_FilterGroup = __esm({
|
|
|
24011
24086
|
type: "button",
|
|
24012
24087
|
onClick: () => handleFilterSelect(filter.field, option),
|
|
24013
24088
|
className: cn(
|
|
24014
|
-
"px-3 py-1.5 text-sm font-medium transition-all duration-
|
|
24089
|
+
"px-3 py-1.5 text-sm font-medium transition-all duration-fast",
|
|
24015
24090
|
"border-l-[length:var(--border-width)] border-border",
|
|
24016
24091
|
selectedValues[filter.field] === option ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
24017
24092
|
),
|
|
@@ -24392,7 +24467,7 @@ var init_Flex = __esm({
|
|
|
24392
24467
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
24393
24468
|
}
|
|
24394
24469
|
}
|
|
24395
|
-
return
|
|
24470
|
+
return React84__default.createElement(Component, {
|
|
24396
24471
|
className: cn(
|
|
24397
24472
|
inline ? "inline-flex" : "flex",
|
|
24398
24473
|
directionStyles[direction],
|
|
@@ -24511,7 +24586,7 @@ var init_Grid = __esm({
|
|
|
24511
24586
|
as: Component = "div"
|
|
24512
24587
|
}) => {
|
|
24513
24588
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
24514
|
-
return
|
|
24589
|
+
return React84__default.createElement(
|
|
24515
24590
|
Component,
|
|
24516
24591
|
{
|
|
24517
24592
|
className: cn(
|
|
@@ -24622,6 +24697,7 @@ var init_Popover = __esm({
|
|
|
24622
24697
|
"components/core/molecules/Popover.tsx"() {
|
|
24623
24698
|
"use client";
|
|
24624
24699
|
init_Typography();
|
|
24700
|
+
init_Presence();
|
|
24625
24701
|
init_cn();
|
|
24626
24702
|
init_useTapReveal();
|
|
24627
24703
|
arrowClasses = {
|
|
@@ -24645,6 +24721,7 @@ var init_Popover = __esm({
|
|
|
24645
24721
|
const [popoverWidth, setPopoverWidth] = useState(0);
|
|
24646
24722
|
const triggerRef = useRef(null);
|
|
24647
24723
|
const popoverRef = useRef(null);
|
|
24724
|
+
const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "popover" });
|
|
24648
24725
|
const updatePosition = () => {
|
|
24649
24726
|
if (triggerRef.current) {
|
|
24650
24727
|
setTriggerRect(triggerRef.current.getBoundingClientRect());
|
|
@@ -24670,10 +24747,11 @@ var init_Popover = __esm({
|
|
|
24670
24747
|
useEffect(() => {
|
|
24671
24748
|
if (isOpen) {
|
|
24672
24749
|
updatePosition();
|
|
24673
|
-
} else {
|
|
24674
|
-
setPopoverWidth(0);
|
|
24675
24750
|
}
|
|
24676
24751
|
}, [isOpen]);
|
|
24752
|
+
useEffect(() => {
|
|
24753
|
+
if (!mounted) setPopoverWidth(0);
|
|
24754
|
+
}, [mounted]);
|
|
24677
24755
|
useLayoutEffect(() => {
|
|
24678
24756
|
if (isOpen && popoverRef.current) {
|
|
24679
24757
|
const measured = popoverRef.current.offsetWidth;
|
|
@@ -24707,9 +24785,9 @@ var init_Popover = __esm({
|
|
|
24707
24785
|
onMouseLeave: handleClose,
|
|
24708
24786
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
24709
24787
|
};
|
|
24710
|
-
const childElement =
|
|
24788
|
+
const childElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
24711
24789
|
const childPointerDown = childElement.props.onPointerDown;
|
|
24712
|
-
const triggerElement =
|
|
24790
|
+
const triggerElement = React84__default.cloneElement(
|
|
24713
24791
|
childElement,
|
|
24714
24792
|
{
|
|
24715
24793
|
ref: triggerRef,
|
|
@@ -24722,13 +24800,14 @@ var init_Popover = __esm({
|
|
|
24722
24800
|
} : void 0
|
|
24723
24801
|
}
|
|
24724
24802
|
);
|
|
24725
|
-
const panel =
|
|
24803
|
+
const panel = mounted && triggerRect ? /* @__PURE__ */ jsxs(
|
|
24726
24804
|
"div",
|
|
24727
24805
|
{
|
|
24728
24806
|
ref: popoverRef,
|
|
24729
24807
|
className: cn(
|
|
24730
24808
|
"fixed z-50 p-4",
|
|
24731
24809
|
"bg-card border-2 border-border shadow-elevation-popover",
|
|
24810
|
+
panelAnim,
|
|
24732
24811
|
className
|
|
24733
24812
|
),
|
|
24734
24813
|
style: {
|
|
@@ -24736,6 +24815,7 @@ var init_Popover = __esm({
|
|
|
24736
24815
|
...popoverWidth === 0 ? { visibility: "hidden" } : void 0
|
|
24737
24816
|
},
|
|
24738
24817
|
role: "dialog",
|
|
24818
|
+
onAnimationEnd,
|
|
24739
24819
|
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
24740
24820
|
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
24741
24821
|
children: [
|
|
@@ -25149,6 +25229,7 @@ var init_SidePanel = __esm({
|
|
|
25149
25229
|
init_Box();
|
|
25150
25230
|
init_Button();
|
|
25151
25231
|
init_Typography();
|
|
25232
|
+
init_Presence();
|
|
25152
25233
|
init_cn();
|
|
25153
25234
|
init_useEventBus();
|
|
25154
25235
|
SidePanel = ({
|
|
@@ -25168,15 +25249,17 @@ var init_SidePanel = __esm({
|
|
|
25168
25249
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
25169
25250
|
onClose();
|
|
25170
25251
|
};
|
|
25171
|
-
|
|
25252
|
+
const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
|
|
25253
|
+
const drawerSign = position === "right" ? 1 : -1;
|
|
25254
|
+
if (!mounted) return null;
|
|
25172
25255
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25173
|
-
showOverlay && /* @__PURE__ */ jsx(
|
|
25256
|
+
showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
|
|
25174
25257
|
Box,
|
|
25175
25258
|
{
|
|
25176
25259
|
className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
|
|
25177
25260
|
onClick: handleClose
|
|
25178
25261
|
}
|
|
25179
|
-
),
|
|
25262
|
+
) }),
|
|
25180
25263
|
/* @__PURE__ */ jsxs(
|
|
25181
25264
|
Aside,
|
|
25182
25265
|
{
|
|
@@ -25186,11 +25269,13 @@ var init_SidePanel = __esm({
|
|
|
25186
25269
|
"border-l-2 border-border",
|
|
25187
25270
|
position === "left" && "border-l-0 border-r-2",
|
|
25188
25271
|
"flex flex-col",
|
|
25189
|
-
|
|
25272
|
+
panelAnim,
|
|
25190
25273
|
width,
|
|
25191
25274
|
position === "right" ? "right-0" : "left-0",
|
|
25192
25275
|
className
|
|
25193
25276
|
),
|
|
25277
|
+
style: { "--motion-drawer-sign": drawerSign },
|
|
25278
|
+
onAnimationEnd,
|
|
25194
25279
|
children: [
|
|
25195
25280
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
|
|
25196
25281
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
|
|
@@ -25311,9 +25396,9 @@ var init_Tooltip = __esm({
|
|
|
25311
25396
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
25312
25397
|
};
|
|
25313
25398
|
}, []);
|
|
25314
|
-
const triggerElement =
|
|
25399
|
+
const triggerElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25315
25400
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
25316
|
-
const trigger =
|
|
25401
|
+
const trigger = React84__default.cloneElement(triggerElement, {
|
|
25317
25402
|
ref: triggerRef,
|
|
25318
25403
|
onMouseEnter: handleMouseEnter,
|
|
25319
25404
|
onMouseLeave: handleMouseLeave,
|
|
@@ -25403,7 +25488,7 @@ var init_WizardProgress = __esm({
|
|
|
25403
25488
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
25404
25489
|
const isActive = index === currentStep;
|
|
25405
25490
|
const isCompleted = index < currentStep;
|
|
25406
|
-
return /* @__PURE__ */ jsxs(
|
|
25491
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
25407
25492
|
/* @__PURE__ */ jsx(
|
|
25408
25493
|
"button",
|
|
25409
25494
|
{
|
|
@@ -25954,7 +26039,7 @@ var init_FormSectionHeader = __esm({
|
|
|
25954
26039
|
name: "chevron-down",
|
|
25955
26040
|
size: "sm",
|
|
25956
26041
|
className: cn(
|
|
25957
|
-
"text-muted-foreground transition-transform duration-
|
|
26042
|
+
"text-muted-foreground transition-transform duration-fast shrink-0",
|
|
25958
26043
|
isCollapsed && "-rotate-90"
|
|
25959
26044
|
)
|
|
25960
26045
|
}
|
|
@@ -26964,13 +27049,13 @@ var init_MapView = __esm({
|
|
|
26964
27049
|
shadowSize: [41, 41]
|
|
26965
27050
|
});
|
|
26966
27051
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
26967
|
-
const { useEffect:
|
|
27052
|
+
const { useEffect: useEffect62, useRef: useRef59, useCallback: useCallback93, useState: useState91 } = React84__default;
|
|
26968
27053
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
26969
27054
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
26970
27055
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
26971
27056
|
const map = useMap();
|
|
26972
|
-
const prevRef =
|
|
26973
|
-
|
|
27057
|
+
const prevRef = useRef59({ centerLat, centerLng, zoom });
|
|
27058
|
+
useEffect62(() => {
|
|
26974
27059
|
const prev = prevRef.current;
|
|
26975
27060
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
26976
27061
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -26981,7 +27066,7 @@ var init_MapView = __esm({
|
|
|
26981
27066
|
}
|
|
26982
27067
|
function MapClickHandler({ onMapClick }) {
|
|
26983
27068
|
const map = useMap();
|
|
26984
|
-
|
|
27069
|
+
useEffect62(() => {
|
|
26985
27070
|
if (!onMapClick) return;
|
|
26986
27071
|
const handler = (e) => {
|
|
26987
27072
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -27009,8 +27094,8 @@ var init_MapView = __esm({
|
|
|
27009
27094
|
showAttribution = true
|
|
27010
27095
|
}) {
|
|
27011
27096
|
const eventBus = useEventBus2();
|
|
27012
|
-
const [clickedPosition, setClickedPosition] =
|
|
27013
|
-
const handleMapClick =
|
|
27097
|
+
const [clickedPosition, setClickedPosition] = useState91(null);
|
|
27098
|
+
const handleMapClick = useCallback93((lat, lng) => {
|
|
27014
27099
|
if (showClickedPin) {
|
|
27015
27100
|
setClickedPosition({ lat, lng });
|
|
27016
27101
|
}
|
|
@@ -27019,7 +27104,7 @@ var init_MapView = __esm({
|
|
|
27019
27104
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
27020
27105
|
}
|
|
27021
27106
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
27022
|
-
const handleMarkerClick =
|
|
27107
|
+
const handleMarkerClick = useCallback93((marker) => {
|
|
27023
27108
|
onMarkerClick?.(marker);
|
|
27024
27109
|
if (markerClickEvent) {
|
|
27025
27110
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -27219,7 +27304,7 @@ var init_NumberStepper = __esm({
|
|
|
27219
27304
|
"text-foreground",
|
|
27220
27305
|
"hover:bg-muted",
|
|
27221
27306
|
"active:bg-muted",
|
|
27222
|
-
"transition-colors duration-
|
|
27307
|
+
"transition-colors duration-instant",
|
|
27223
27308
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
27224
27309
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
27225
27310
|
styles.button
|
|
@@ -27260,7 +27345,7 @@ var init_NumberStepper = __esm({
|
|
|
27260
27345
|
"text-foreground",
|
|
27261
27346
|
"hover:bg-muted",
|
|
27262
27347
|
"active:bg-muted",
|
|
27263
|
-
"transition-colors duration-
|
|
27348
|
+
"transition-colors duration-instant",
|
|
27264
27349
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
27265
27350
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
27266
27351
|
styles.button
|
|
@@ -27384,7 +27469,7 @@ var init_StarRating = __esm({
|
|
|
27384
27469
|
className: cn(
|
|
27385
27470
|
styles.star,
|
|
27386
27471
|
"text-foreground/30",
|
|
27387
|
-
"transition-colors duration-
|
|
27472
|
+
"transition-colors duration-instant"
|
|
27388
27473
|
),
|
|
27389
27474
|
strokeWidth: 1.5
|
|
27390
27475
|
}
|
|
@@ -27397,7 +27482,7 @@ var init_StarRating = __esm({
|
|
|
27397
27482
|
styles.star,
|
|
27398
27483
|
"absolute inset-0",
|
|
27399
27484
|
"text-warning fill-warning",
|
|
27400
|
-
"transition-colors duration-
|
|
27485
|
+
"transition-colors duration-instant"
|
|
27401
27486
|
),
|
|
27402
27487
|
strokeWidth: 1.5,
|
|
27403
27488
|
style: isHalf ? { clipPath: "inset(0 50% 0 0)" } : void 0
|
|
@@ -27552,7 +27637,7 @@ var init_UploadDropZone = __esm({
|
|
|
27552
27637
|
"relative flex flex-col items-center justify-center",
|
|
27553
27638
|
"p-8 rounded-sm",
|
|
27554
27639
|
"border-2 border-dashed",
|
|
27555
|
-
"transition-colors duration-
|
|
27640
|
+
"transition-colors duration-fast",
|
|
27556
27641
|
"cursor-pointer",
|
|
27557
27642
|
isDragOver ? "border-primary bg-primary bg-opacity-5" : "border-border bg-surface",
|
|
27558
27643
|
error && "border-error",
|
|
@@ -27879,8 +27964,8 @@ function TableView({
|
|
|
27879
27964
|
}) {
|
|
27880
27965
|
const eventBus = useEventBus();
|
|
27881
27966
|
const { t } = useTranslate();
|
|
27882
|
-
const [visibleCount, setVisibleCount] =
|
|
27883
|
-
const [localSelected, setLocalSelected] =
|
|
27967
|
+
const [visibleCount, setVisibleCount] = React84__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
27968
|
+
const [localSelected, setLocalSelected] = React84__default.useState(/* @__PURE__ */ new Set());
|
|
27884
27969
|
const colDefs = columns ?? fields ?? [];
|
|
27885
27970
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
27886
27971
|
const dnd = useDataDnd({
|
|
@@ -27960,7 +28045,7 @@ function TableView({
|
|
|
27960
28045
|
className: cn(
|
|
27961
28046
|
"grid items-center gap-3 sticky top-0 z-10",
|
|
27962
28047
|
"bg-[var(--color-surface-subtle)] border-b border-[var(--color-border)]",
|
|
27963
|
-
"text-
|
|
28048
|
+
"text-muted-foreground uppercase text-xs font-semibold tracking-wide",
|
|
27964
28049
|
lk.headPad
|
|
27965
28050
|
),
|
|
27966
28051
|
children: [
|
|
@@ -28075,12 +28160,12 @@ function TableView({
|
|
|
28075
28160
|
]
|
|
28076
28161
|
}
|
|
28077
28162
|
);
|
|
28078
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
28163
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React84__default.Fragment, { children: rowInner }, id);
|
|
28079
28164
|
};
|
|
28080
28165
|
const items = Array.from(data);
|
|
28081
28166
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
28082
28167
|
let runningIndex = 0;
|
|
28083
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
28168
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
28084
28169
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
28085
28170
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
28086
28171
|
] }, gi)) });
|
|
@@ -28816,7 +28901,7 @@ function SortableListInner({
|
|
|
28816
28901
|
"flex items-center justify-center",
|
|
28817
28902
|
"text-muted-foreground",
|
|
28818
28903
|
"hover:text-foreground",
|
|
28819
|
-
"transition-colors duration-
|
|
28904
|
+
"transition-colors duration-instant",
|
|
28820
28905
|
"px-1"
|
|
28821
28906
|
),
|
|
28822
28907
|
"aria-grabbed": ariaGrabbed,
|
|
@@ -28843,7 +28928,7 @@ function SortableListInner({
|
|
|
28843
28928
|
gap: "sm",
|
|
28844
28929
|
align: "center",
|
|
28845
28930
|
className: cn(
|
|
28846
|
-
"transition-opacity duration-
|
|
28931
|
+
"transition-opacity duration-fast",
|
|
28847
28932
|
isBeingDragged && "opacity-50"
|
|
28848
28933
|
),
|
|
28849
28934
|
children: [
|
|
@@ -29015,7 +29100,7 @@ var init_PullToRefresh = __esm({
|
|
|
29015
29100
|
children: /* @__PURE__ */ jsx(
|
|
29016
29101
|
Box,
|
|
29017
29102
|
{
|
|
29018
|
-
className: "transition-transform duration-
|
|
29103
|
+
className: "transition-transform duration-fast",
|
|
29019
29104
|
style: {
|
|
29020
29105
|
transform: `scale(${isRefreshing ? 1 : pullProgress})`,
|
|
29021
29106
|
opacity: isRefreshing ? 1 : pullProgress
|
|
@@ -29437,7 +29522,7 @@ var init_StepFlow = __esm({
|
|
|
29437
29522
|
className
|
|
29438
29523
|
}) => {
|
|
29439
29524
|
if (orientation === "vertical") {
|
|
29440
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29525
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React84__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
29441
29526
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29442
29527
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29443
29528
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29448,7 +29533,7 @@ var init_StepFlow = __esm({
|
|
|
29448
29533
|
] })
|
|
29449
29534
|
] }) }, index)) });
|
|
29450
29535
|
}
|
|
29451
|
-
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(
|
|
29536
|
+
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(React84__default.Fragment, { children: [
|
|
29452
29537
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29453
29538
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29454
29539
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -30354,7 +30439,7 @@ var init_VoteStack = __esm({
|
|
|
30354
30439
|
isUp ? "text-primary" : "text-muted-foreground",
|
|
30355
30440
|
"hover:bg-muted",
|
|
30356
30441
|
"active:bg-muted",
|
|
30357
|
-
"transition-colors duration-
|
|
30442
|
+
"transition-colors duration-instant",
|
|
30358
30443
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
30359
30444
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30360
30445
|
styles.button
|
|
@@ -30391,7 +30476,7 @@ var init_VoteStack = __esm({
|
|
|
30391
30476
|
isDown ? "text-primary" : "text-muted-foreground",
|
|
30392
30477
|
"hover:bg-muted",
|
|
30393
30478
|
"active:bg-muted",
|
|
30394
|
-
"transition-colors duration-
|
|
30479
|
+
"transition-colors duration-instant",
|
|
30395
30480
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
30396
30481
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30397
30482
|
styles.button
|
|
@@ -30438,7 +30523,7 @@ var init_LikertScale = __esm({
|
|
|
30438
30523
|
md: "text-base",
|
|
30439
30524
|
lg: "text-lg"
|
|
30440
30525
|
};
|
|
30441
|
-
LikertScale =
|
|
30526
|
+
LikertScale = React84__default.forwardRef(
|
|
30442
30527
|
({
|
|
30443
30528
|
question,
|
|
30444
30529
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -30450,7 +30535,7 @@ var init_LikertScale = __esm({
|
|
|
30450
30535
|
variant = "radios",
|
|
30451
30536
|
className
|
|
30452
30537
|
}, ref) => {
|
|
30453
|
-
const groupId =
|
|
30538
|
+
const groupId = React84__default.useId();
|
|
30454
30539
|
const eventBus = useEventBus();
|
|
30455
30540
|
const handleSelect = useCallback(
|
|
30456
30541
|
(next) => {
|
|
@@ -30503,7 +30588,7 @@ var init_LikertScale = __esm({
|
|
|
30503
30588
|
disabled,
|
|
30504
30589
|
onClick: () => handleSelect(opt.value),
|
|
30505
30590
|
className: cn(
|
|
30506
|
-
"flex-1 text-center font-medium transition-colors duration-
|
|
30591
|
+
"flex-1 text-center font-medium transition-colors duration-instant",
|
|
30507
30592
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30508
30593
|
"disabled:cursor-not-allowed",
|
|
30509
30594
|
"rounded-none gap-0 shadow-none border-none",
|
|
@@ -32732,7 +32817,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
32732
32817
|
"aria-label": t("aria.breadcrumb"),
|
|
32733
32818
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
32734
32819
|
const isLast = idx === items.length - 1;
|
|
32735
|
-
return /* @__PURE__ */ jsxs(
|
|
32820
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
32736
32821
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
32737
32822
|
Icon,
|
|
32738
32823
|
{
|
|
@@ -33601,7 +33686,7 @@ var init_MiniStateMachine = __esm({
|
|
|
33601
33686
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
33602
33687
|
const tc = transitionCounts[s.name] ?? 0;
|
|
33603
33688
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
33604
|
-
return /* @__PURE__ */ jsxs(
|
|
33689
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
33605
33690
|
/* @__PURE__ */ jsx(
|
|
33606
33691
|
AvlState,
|
|
33607
33692
|
{
|
|
@@ -33805,7 +33890,7 @@ var init_PageHeader = __esm({
|
|
|
33805
33890
|
info: "bg-info/10 text-info"
|
|
33806
33891
|
};
|
|
33807
33892
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
33808
|
-
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(
|
|
33893
|
+
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(React84__default.Fragment, { children: [
|
|
33809
33894
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
33810
33895
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
33811
33896
|
"a",
|
|
@@ -34163,7 +34248,7 @@ var init_Section = __esm({
|
|
|
34163
34248
|
as: Component = "section"
|
|
34164
34249
|
}) => {
|
|
34165
34250
|
const hasHeader = title || description || action;
|
|
34166
|
-
return
|
|
34251
|
+
return React84__default.createElement(
|
|
34167
34252
|
Component,
|
|
34168
34253
|
{
|
|
34169
34254
|
className: cn(
|
|
@@ -34230,7 +34315,7 @@ var init_Sidebar = __esm({
|
|
|
34230
34315
|
variant: "ghost",
|
|
34231
34316
|
onClick: item.onClick,
|
|
34232
34317
|
className: cn(
|
|
34233
|
-
"w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-
|
|
34318
|
+
"w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-fast group relative",
|
|
34234
34319
|
"rounded-sm border-[length:var(--border-width-thin)] border-transparent",
|
|
34235
34320
|
isActive ? [
|
|
34236
34321
|
"bg-primary text-primary-foreground",
|
|
@@ -34304,7 +34389,7 @@ var init_Sidebar = __esm({
|
|
|
34304
34389
|
className: cn(
|
|
34305
34390
|
"flex flex-col h-full",
|
|
34306
34391
|
"bg-card border-e border-border",
|
|
34307
|
-
"transition-all duration-
|
|
34392
|
+
"transition-all duration-normal ease-standard",
|
|
34308
34393
|
collapsed ? "w-20" : "w-64",
|
|
34309
34394
|
className
|
|
34310
34395
|
),
|
|
@@ -34537,7 +34622,7 @@ var init_WizardContainer = __esm({
|
|
|
34537
34622
|
const isCompleted = index < currentStep;
|
|
34538
34623
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
34539
34624
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
34540
|
-
return /* @__PURE__ */ jsxs(
|
|
34625
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
34541
34626
|
/* @__PURE__ */ jsx(
|
|
34542
34627
|
Button,
|
|
34543
34628
|
{
|
|
@@ -37140,7 +37225,7 @@ var init_DetailPanel = __esm({
|
|
|
37140
37225
|
}
|
|
37141
37226
|
});
|
|
37142
37227
|
function extractTitle(children) {
|
|
37143
|
-
if (!
|
|
37228
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
37144
37229
|
const props = children.props;
|
|
37145
37230
|
if (typeof props.title === "string") {
|
|
37146
37231
|
return props.title;
|
|
@@ -37490,12 +37575,12 @@ var init_Form = __esm({
|
|
|
37490
37575
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
37491
37576
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
37492
37577
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
37493
|
-
const normalizedInitialData =
|
|
37578
|
+
const normalizedInitialData = React84__default.useMemo(() => {
|
|
37494
37579
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
37495
37580
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
37496
37581
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
37497
37582
|
}, [entity, initialData]);
|
|
37498
|
-
const entityDerivedFields =
|
|
37583
|
+
const entityDerivedFields = React84__default.useMemo(() => {
|
|
37499
37584
|
if (fields && fields.length > 0) return void 0;
|
|
37500
37585
|
if (!resolvedEntity) return void 0;
|
|
37501
37586
|
return resolvedEntity.fields.map(
|
|
@@ -37516,16 +37601,16 @@ var init_Form = __esm({
|
|
|
37516
37601
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
37517
37602
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
37518
37603
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
37519
|
-
const [formData, setFormData] =
|
|
37604
|
+
const [formData, setFormData] = React84__default.useState(
|
|
37520
37605
|
normalizedInitialData
|
|
37521
37606
|
);
|
|
37522
|
-
const [collapsedSections, setCollapsedSections] =
|
|
37607
|
+
const [collapsedSections, setCollapsedSections] = React84__default.useState(
|
|
37523
37608
|
/* @__PURE__ */ new Set()
|
|
37524
37609
|
);
|
|
37525
|
-
const [submitError, setSubmitError] =
|
|
37526
|
-
const formRef =
|
|
37610
|
+
const [submitError, setSubmitError] = React84__default.useState(null);
|
|
37611
|
+
const formRef = React84__default.useRef(null);
|
|
37527
37612
|
const formMode = props.mode;
|
|
37528
|
-
const mountedRef =
|
|
37613
|
+
const mountedRef = React84__default.useRef(false);
|
|
37529
37614
|
if (!mountedRef.current) {
|
|
37530
37615
|
mountedRef.current = true;
|
|
37531
37616
|
debug("forms", "mount", {
|
|
@@ -37538,7 +37623,7 @@ var init_Form = __esm({
|
|
|
37538
37623
|
});
|
|
37539
37624
|
}
|
|
37540
37625
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
37541
|
-
const evalContext =
|
|
37626
|
+
const evalContext = React84__default.useMemo(
|
|
37542
37627
|
() => ({
|
|
37543
37628
|
formValues: formData,
|
|
37544
37629
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -37547,7 +37632,7 @@ var init_Form = __esm({
|
|
|
37547
37632
|
}),
|
|
37548
37633
|
[formData, externalContext]
|
|
37549
37634
|
);
|
|
37550
|
-
|
|
37635
|
+
React84__default.useEffect(() => {
|
|
37551
37636
|
debug("forms", "initialData-sync", {
|
|
37552
37637
|
mode: formMode,
|
|
37553
37638
|
normalizedInitialData,
|
|
@@ -37558,7 +37643,7 @@ var init_Form = __esm({
|
|
|
37558
37643
|
setFormData(normalizedInitialData);
|
|
37559
37644
|
}
|
|
37560
37645
|
}, [normalizedInitialData]);
|
|
37561
|
-
const processCalculations =
|
|
37646
|
+
const processCalculations = React84__default.useCallback(
|
|
37562
37647
|
(changedFieldId, newFormData) => {
|
|
37563
37648
|
if (!hiddenCalculations.length) return;
|
|
37564
37649
|
const context = {
|
|
@@ -37583,7 +37668,7 @@ var init_Form = __esm({
|
|
|
37583
37668
|
},
|
|
37584
37669
|
[hiddenCalculations, externalContext, eventBus]
|
|
37585
37670
|
);
|
|
37586
|
-
const checkViolations =
|
|
37671
|
+
const checkViolations = React84__default.useCallback(
|
|
37587
37672
|
(changedFieldId, newFormData) => {
|
|
37588
37673
|
if (!violationTriggers.length) return;
|
|
37589
37674
|
const context = {
|
|
@@ -37621,7 +37706,7 @@ var init_Form = __esm({
|
|
|
37621
37706
|
processCalculations(name, newFormData);
|
|
37622
37707
|
checkViolations(name, newFormData);
|
|
37623
37708
|
};
|
|
37624
|
-
const isFieldVisible =
|
|
37709
|
+
const isFieldVisible = React84__default.useCallback(
|
|
37625
37710
|
(fieldName) => {
|
|
37626
37711
|
const condition = conditionalFields[fieldName];
|
|
37627
37712
|
if (!condition) return true;
|
|
@@ -37629,7 +37714,7 @@ var init_Form = __esm({
|
|
|
37629
37714
|
},
|
|
37630
37715
|
[conditionalFields, evalContext]
|
|
37631
37716
|
);
|
|
37632
|
-
const isSectionVisible =
|
|
37717
|
+
const isSectionVisible = React84__default.useCallback(
|
|
37633
37718
|
(section) => {
|
|
37634
37719
|
if (!section.condition) return true;
|
|
37635
37720
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -37705,7 +37790,7 @@ var init_Form = __esm({
|
|
|
37705
37790
|
eventBus.emit(`UI:${onCancel}`);
|
|
37706
37791
|
}
|
|
37707
37792
|
};
|
|
37708
|
-
const renderField =
|
|
37793
|
+
const renderField = React84__default.useCallback(
|
|
37709
37794
|
(field) => {
|
|
37710
37795
|
const fieldName = field.name || field.field;
|
|
37711
37796
|
if (!fieldName) return null;
|
|
@@ -37726,7 +37811,7 @@ var init_Form = __esm({
|
|
|
37726
37811
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
37727
37812
|
);
|
|
37728
37813
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
37729
|
-
const normalizedFields =
|
|
37814
|
+
const normalizedFields = React84__default.useMemo(() => {
|
|
37730
37815
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
37731
37816
|
return effectiveFields.map((field) => {
|
|
37732
37817
|
if (typeof field === "string") {
|
|
@@ -37750,7 +37835,7 @@ var init_Form = __esm({
|
|
|
37750
37835
|
return field;
|
|
37751
37836
|
});
|
|
37752
37837
|
}, [effectiveFields, resolvedEntity]);
|
|
37753
|
-
const schemaFields =
|
|
37838
|
+
const schemaFields = React84__default.useMemo(() => {
|
|
37754
37839
|
if (normalizedFields.length === 0) return null;
|
|
37755
37840
|
if (isDebugEnabled()) {
|
|
37756
37841
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -37760,7 +37845,7 @@ var init_Form = __esm({
|
|
|
37760
37845
|
}
|
|
37761
37846
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
37762
37847
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
37763
|
-
const sectionElements =
|
|
37848
|
+
const sectionElements = React84__default.useMemo(() => {
|
|
37764
37849
|
if (!sections || sections.length === 0) return null;
|
|
37765
37850
|
return sections.map((section) => {
|
|
37766
37851
|
if (!isSectionVisible(section)) {
|
|
@@ -38443,7 +38528,7 @@ var init_List = __esm({
|
|
|
38443
38528
|
Box,
|
|
38444
38529
|
{
|
|
38445
38530
|
className: cn(
|
|
38446
|
-
"h-full rounded-full transition-all duration-
|
|
38531
|
+
"h-full rounded-full transition-all duration-slow",
|
|
38447
38532
|
clampedValue >= 100 ? "bg-success" : clampedValue >= 70 ? "bg-info" : clampedValue >= 40 ? "bg-warning" : "bg-muted-foreground"
|
|
38448
38533
|
),
|
|
38449
38534
|
style: { width: `${clampedValue}%` }
|
|
@@ -38485,7 +38570,7 @@ var init_List = __esm({
|
|
|
38485
38570
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
38486
38571
|
return [];
|
|
38487
38572
|
}, [entity]);
|
|
38488
|
-
const getItemActions =
|
|
38573
|
+
const getItemActions = React84__default.useCallback(
|
|
38489
38574
|
(item) => {
|
|
38490
38575
|
if (!itemActions) return [];
|
|
38491
38576
|
if (typeof itemActions === "function") {
|
|
@@ -38612,7 +38697,7 @@ var init_List = __esm({
|
|
|
38612
38697
|
{
|
|
38613
38698
|
className: cn(
|
|
38614
38699
|
"group flex items-center gap-5 px-6 py-5",
|
|
38615
|
-
"transition-all duration-
|
|
38700
|
+
"transition-all duration-normal ease-standard",
|
|
38616
38701
|
hasExplicitClick && "cursor-pointer",
|
|
38617
38702
|
// Hover state
|
|
38618
38703
|
"hover:bg-muted/80",
|
|
@@ -38719,7 +38804,7 @@ var init_List = __esm({
|
|
|
38719
38804
|
variant: "ghost",
|
|
38720
38805
|
action: editAction.event,
|
|
38721
38806
|
className: cn(
|
|
38722
|
-
"p-2 rounded-lg transition-all duration-
|
|
38807
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
38723
38808
|
"hover:bg-primary/10 hover:text-primary",
|
|
38724
38809
|
"text-muted-foreground",
|
|
38725
38810
|
"active:scale-95"
|
|
@@ -38735,7 +38820,7 @@ var init_List = __esm({
|
|
|
38735
38820
|
variant: "ghost",
|
|
38736
38821
|
action: viewAction.event,
|
|
38737
38822
|
className: cn(
|
|
38738
|
-
"p-2 rounded-lg transition-all duration-
|
|
38823
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
38739
38824
|
"hover:bg-muted hover:text-foreground",
|
|
38740
38825
|
"text-muted-foreground",
|
|
38741
38826
|
"active:scale-95"
|
|
@@ -38757,7 +38842,7 @@ var init_List = __esm({
|
|
|
38757
38842
|
{
|
|
38758
38843
|
variant: "ghost",
|
|
38759
38844
|
className: cn(
|
|
38760
|
-
"p-2 rounded-lg transition-all duration-
|
|
38845
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
38761
38846
|
"hover:bg-muted hover:shadow-sm",
|
|
38762
38847
|
"text-muted-foreground hover:text-foreground",
|
|
38763
38848
|
"active:scale-95"
|
|
@@ -38969,7 +39054,7 @@ var init_MediaGallery = __esm({
|
|
|
38969
39054
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
38970
39055
|
);
|
|
38971
39056
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
38972
|
-
const items =
|
|
39057
|
+
const items = React84__default.useMemo(() => {
|
|
38973
39058
|
if (propItems && propItems.length > 0) return propItems;
|
|
38974
39059
|
if (entityData.length === 0) return [];
|
|
38975
39060
|
return entityData.map((record, idx) => {
|
|
@@ -39047,7 +39132,7 @@ var init_MediaGallery = __esm({
|
|
|
39047
39132
|
{
|
|
39048
39133
|
className: cn(
|
|
39049
39134
|
"group relative overflow-hidden rounded-md cursor-pointer",
|
|
39050
|
-
"border-2 transition-all duration-
|
|
39135
|
+
"border-2 transition-all duration-fast",
|
|
39051
39136
|
isSelected ? "border-primary ring-2 ring-primary/30" : "border-transparent hover:border-border",
|
|
39052
39137
|
ASPECT_CLASSES[aspectRatio]
|
|
39053
39138
|
),
|
|
@@ -39068,14 +39153,14 @@ var init_MediaGallery = __esm({
|
|
|
39068
39153
|
{
|
|
39069
39154
|
className: cn(
|
|
39070
39155
|
"absolute inset-0 bg-foreground/0 group-hover:bg-foreground/20",
|
|
39071
|
-
"transition-colors duration-
|
|
39156
|
+
"transition-colors duration-fast flex items-center justify-center"
|
|
39072
39157
|
),
|
|
39073
39158
|
children: /* @__PURE__ */ jsx(
|
|
39074
39159
|
Icon,
|
|
39075
39160
|
{
|
|
39076
39161
|
icon: ZoomIn,
|
|
39077
39162
|
size: "md",
|
|
39078
|
-
className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-
|
|
39163
|
+
className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-fast"
|
|
39079
39164
|
}
|
|
39080
39165
|
)
|
|
39081
39166
|
}
|
|
@@ -39133,7 +39218,7 @@ var init_MediaGallery = __esm({
|
|
|
39133
39218
|
}
|
|
39134
39219
|
});
|
|
39135
39220
|
function extractTitle2(children) {
|
|
39136
|
-
if (!
|
|
39221
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
39137
39222
|
const props = children.props;
|
|
39138
39223
|
if (typeof props.title === "string") {
|
|
39139
39224
|
return props.title;
|
|
@@ -39388,7 +39473,7 @@ var init_debugRegistry = __esm({
|
|
|
39388
39473
|
}
|
|
39389
39474
|
});
|
|
39390
39475
|
function useDebugData() {
|
|
39391
|
-
const [data, setData] =
|
|
39476
|
+
const [data, setData] = React84.useState(() => ({
|
|
39392
39477
|
traits: [],
|
|
39393
39478
|
ticks: [],
|
|
39394
39479
|
guards: [],
|
|
@@ -39402,7 +39487,7 @@ function useDebugData() {
|
|
|
39402
39487
|
},
|
|
39403
39488
|
lastUpdate: Date.now()
|
|
39404
39489
|
}));
|
|
39405
|
-
|
|
39490
|
+
React84.useEffect(() => {
|
|
39406
39491
|
const updateData = () => {
|
|
39407
39492
|
setData({
|
|
39408
39493
|
traits: getAllTraits(),
|
|
@@ -39511,12 +39596,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
39511
39596
|
return positions;
|
|
39512
39597
|
}
|
|
39513
39598
|
function WalkMinimap() {
|
|
39514
|
-
const [walkStep, setWalkStep] =
|
|
39515
|
-
const [traits2, setTraits] =
|
|
39516
|
-
const [coveredEdges, setCoveredEdges] =
|
|
39517
|
-
const [completedTraits, setCompletedTraits] =
|
|
39518
|
-
const prevTraitRef =
|
|
39519
|
-
|
|
39599
|
+
const [walkStep, setWalkStep] = React84.useState(null);
|
|
39600
|
+
const [traits2, setTraits] = React84.useState([]);
|
|
39601
|
+
const [coveredEdges, setCoveredEdges] = React84.useState([]);
|
|
39602
|
+
const [completedTraits, setCompletedTraits] = React84.useState(/* @__PURE__ */ new Set());
|
|
39603
|
+
const prevTraitRef = React84.useRef(null);
|
|
39604
|
+
React84.useEffect(() => {
|
|
39520
39605
|
const interval = setInterval(() => {
|
|
39521
39606
|
const w = window;
|
|
39522
39607
|
const step = w.__orbitalWalkStep;
|
|
@@ -39952,15 +40037,15 @@ var init_EntitiesTab = __esm({
|
|
|
39952
40037
|
});
|
|
39953
40038
|
function EventFlowTab({ events: events2 }) {
|
|
39954
40039
|
const { t } = useTranslate();
|
|
39955
|
-
const [filter, setFilter] =
|
|
39956
|
-
const containerRef =
|
|
39957
|
-
const [autoScroll, setAutoScroll] =
|
|
39958
|
-
|
|
40040
|
+
const [filter, setFilter] = React84.useState("all");
|
|
40041
|
+
const containerRef = React84.useRef(null);
|
|
40042
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
40043
|
+
React84.useEffect(() => {
|
|
39959
40044
|
if (autoScroll && containerRef.current) {
|
|
39960
40045
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39961
40046
|
}
|
|
39962
40047
|
}, [events2.length, autoScroll]);
|
|
39963
|
-
const filteredEvents =
|
|
40048
|
+
const filteredEvents = React84.useMemo(() => {
|
|
39964
40049
|
if (filter === "all") return events2;
|
|
39965
40050
|
return events2.filter((e) => e.type === filter);
|
|
39966
40051
|
}, [events2, filter]);
|
|
@@ -40076,7 +40161,7 @@ var init_EventFlowTab = __esm({
|
|
|
40076
40161
|
});
|
|
40077
40162
|
function GuardsPanel({ guards }) {
|
|
40078
40163
|
const { t } = useTranslate();
|
|
40079
|
-
const [filter, setFilter] =
|
|
40164
|
+
const [filter, setFilter] = React84.useState("all");
|
|
40080
40165
|
if (guards.length === 0) {
|
|
40081
40166
|
return /* @__PURE__ */ jsx(
|
|
40082
40167
|
EmptyState,
|
|
@@ -40089,7 +40174,7 @@ function GuardsPanel({ guards }) {
|
|
|
40089
40174
|
}
|
|
40090
40175
|
const passedCount = guards.filter((g) => g.result).length;
|
|
40091
40176
|
const failedCount = guards.length - passedCount;
|
|
40092
|
-
const filteredGuards =
|
|
40177
|
+
const filteredGuards = React84.useMemo(() => {
|
|
40093
40178
|
if (filter === "all") return guards;
|
|
40094
40179
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
40095
40180
|
return guards.filter((g) => !g.result);
|
|
@@ -40252,10 +40337,10 @@ function EffectBadge({ effect }) {
|
|
|
40252
40337
|
}
|
|
40253
40338
|
function TransitionTimeline({ transitions }) {
|
|
40254
40339
|
const { t } = useTranslate();
|
|
40255
|
-
const containerRef =
|
|
40256
|
-
const [autoScroll, setAutoScroll] =
|
|
40257
|
-
const [expandedId, setExpandedId] =
|
|
40258
|
-
|
|
40340
|
+
const containerRef = React84.useRef(null);
|
|
40341
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
40342
|
+
const [expandedId, setExpandedId] = React84.useState(null);
|
|
40343
|
+
React84.useEffect(() => {
|
|
40259
40344
|
if (autoScroll && containerRef.current) {
|
|
40260
40345
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40261
40346
|
}
|
|
@@ -40535,9 +40620,9 @@ function getAllEvents(traits2) {
|
|
|
40535
40620
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
40536
40621
|
const eventBus = useEventBus();
|
|
40537
40622
|
const { t } = useTranslate();
|
|
40538
|
-
const [log13, setLog] =
|
|
40539
|
-
const prevStatesRef =
|
|
40540
|
-
|
|
40623
|
+
const [log13, setLog] = React84.useState([]);
|
|
40624
|
+
const prevStatesRef = React84.useRef(/* @__PURE__ */ new Map());
|
|
40625
|
+
React84.useEffect(() => {
|
|
40541
40626
|
for (const trait of traits2) {
|
|
40542
40627
|
const prev = prevStatesRef.current.get(trait.id);
|
|
40543
40628
|
if (prev && prev !== trait.currentState) {
|
|
@@ -40706,10 +40791,10 @@ function VerifyModePanel({
|
|
|
40706
40791
|
localCount
|
|
40707
40792
|
}) {
|
|
40708
40793
|
const { t } = useTranslate();
|
|
40709
|
-
const [expanded, setExpanded] =
|
|
40710
|
-
const scrollRef =
|
|
40711
|
-
const prevCountRef =
|
|
40712
|
-
|
|
40794
|
+
const [expanded, setExpanded] = React84.useState(true);
|
|
40795
|
+
const scrollRef = React84.useRef(null);
|
|
40796
|
+
const prevCountRef = React84.useRef(0);
|
|
40797
|
+
React84.useEffect(() => {
|
|
40713
40798
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
40714
40799
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
40715
40800
|
}
|
|
@@ -40766,10 +40851,10 @@ function RuntimeDebugger({
|
|
|
40766
40851
|
schema
|
|
40767
40852
|
}) {
|
|
40768
40853
|
const { t } = useTranslate();
|
|
40769
|
-
const [isCollapsed, setIsCollapsed] =
|
|
40770
|
-
const [isVisible, setIsVisible] =
|
|
40854
|
+
const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
|
|
40855
|
+
const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
40771
40856
|
const debugData = useDebugData();
|
|
40772
|
-
|
|
40857
|
+
React84.useEffect(() => {
|
|
40773
40858
|
if (mode === "inline") return;
|
|
40774
40859
|
return onDebugToggle((enabled) => {
|
|
40775
40860
|
setIsVisible(enabled);
|
|
@@ -40778,7 +40863,7 @@ function RuntimeDebugger({
|
|
|
40778
40863
|
}
|
|
40779
40864
|
});
|
|
40780
40865
|
}, [mode]);
|
|
40781
|
-
|
|
40866
|
+
React84.useEffect(() => {
|
|
40782
40867
|
if (mode === "inline") return;
|
|
40783
40868
|
const handleKeyDown = (e) => {
|
|
40784
40869
|
if (e.key === "`" && isVisible) {
|
|
@@ -41298,7 +41383,7 @@ var init_StatCard = __esm({
|
|
|
41298
41383
|
const labelToUse = propLabel ?? propTitle;
|
|
41299
41384
|
const eventBus = useEventBus();
|
|
41300
41385
|
const { t } = useTranslate();
|
|
41301
|
-
const handleActionClick =
|
|
41386
|
+
const handleActionClick = React84__default.useCallback(() => {
|
|
41302
41387
|
if (action?.event) {
|
|
41303
41388
|
eventBus.emit(`UI:${action.event}`, {});
|
|
41304
41389
|
}
|
|
@@ -41309,7 +41394,7 @@ var init_StatCard = __esm({
|
|
|
41309
41394
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
41310
41395
|
const isLoading = externalLoading ?? false;
|
|
41311
41396
|
const error = externalError;
|
|
41312
|
-
const computeMetricValue =
|
|
41397
|
+
const computeMetricValue = React84__default.useCallback(
|
|
41313
41398
|
(metric, items) => {
|
|
41314
41399
|
if (metric.value !== void 0) {
|
|
41315
41400
|
return metric.value;
|
|
@@ -41348,7 +41433,7 @@ var init_StatCard = __esm({
|
|
|
41348
41433
|
},
|
|
41349
41434
|
[]
|
|
41350
41435
|
);
|
|
41351
|
-
const schemaStats =
|
|
41436
|
+
const schemaStats = React84__default.useMemo(() => {
|
|
41352
41437
|
if (!metrics || metrics.length === 0) return null;
|
|
41353
41438
|
return metrics.map((metric) => ({
|
|
41354
41439
|
label: metric.label,
|
|
@@ -41356,7 +41441,7 @@ var init_StatCard = __esm({
|
|
|
41356
41441
|
format: metric.format
|
|
41357
41442
|
}));
|
|
41358
41443
|
}, [metrics, data, computeMetricValue]);
|
|
41359
|
-
const calculatedTrend =
|
|
41444
|
+
const calculatedTrend = React84__default.useMemo(() => {
|
|
41360
41445
|
if (manualTrend !== void 0) return manualTrend;
|
|
41361
41446
|
if (previousValue === void 0 || currentValue === void 0)
|
|
41362
41447
|
return void 0;
|
|
@@ -41996,8 +42081,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
41996
42081
|
] });
|
|
41997
42082
|
};
|
|
41998
42083
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
41999
|
-
const endRef =
|
|
42000
|
-
|
|
42084
|
+
const endRef = React84__default.useRef(null);
|
|
42085
|
+
React84__default.useEffect(() => {
|
|
42001
42086
|
if (!autoScroll) return;
|
|
42002
42087
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
42003
42088
|
}, [activities.length, autoScroll]);
|
|
@@ -42091,7 +42176,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
42091
42176
|
};
|
|
42092
42177
|
SubagentRichCard = ({ subagent }) => {
|
|
42093
42178
|
const { t } = useTranslate();
|
|
42094
|
-
const activities =
|
|
42179
|
+
const activities = React84__default.useMemo(
|
|
42095
42180
|
() => subagentMessagesToActivities(subagent.messages),
|
|
42096
42181
|
[subagent.messages]
|
|
42097
42182
|
);
|
|
@@ -42168,8 +42253,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
42168
42253
|
] });
|
|
42169
42254
|
};
|
|
42170
42255
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
42171
|
-
const endRef =
|
|
42172
|
-
|
|
42256
|
+
const endRef = React84__default.useRef(null);
|
|
42257
|
+
React84__default.useEffect(() => {
|
|
42173
42258
|
if (!autoScroll) return;
|
|
42174
42259
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
42175
42260
|
}, [messages.length, autoScroll]);
|
|
@@ -42604,7 +42689,7 @@ var init_Timeline = __esm({
|
|
|
42604
42689
|
}) => {
|
|
42605
42690
|
const { t } = useTranslate();
|
|
42606
42691
|
const entityData = entity ?? [];
|
|
42607
|
-
const items =
|
|
42692
|
+
const items = React84__default.useMemo(() => {
|
|
42608
42693
|
if (propItems) return propItems;
|
|
42609
42694
|
if (entityData.length === 0) return [];
|
|
42610
42695
|
return entityData.map((record, idx) => {
|
|
@@ -42706,7 +42791,7 @@ var init_Timeline = __esm({
|
|
|
42706
42791
|
}
|
|
42707
42792
|
});
|
|
42708
42793
|
function extractToastProps(children) {
|
|
42709
|
-
if (!
|
|
42794
|
+
if (!React84__default.isValidElement(children)) {
|
|
42710
42795
|
if (typeof children === "string") {
|
|
42711
42796
|
return { message: children };
|
|
42712
42797
|
}
|
|
@@ -42748,7 +42833,7 @@ var init_ToastSlot = __esm({
|
|
|
42748
42833
|
eventBus.emit(`${prefix}CLOSE`);
|
|
42749
42834
|
};
|
|
42750
42835
|
if (!isVisible) return null;
|
|
42751
|
-
const isCustomContent =
|
|
42836
|
+
const isCustomContent = React84__default.isValidElement(children) && !message;
|
|
42752
42837
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
42753
42838
|
Toast,
|
|
42754
42839
|
{
|
|
@@ -42796,6 +42881,7 @@ var init_component_registry_generated = __esm({
|
|
|
42796
42881
|
init_LayoutPatterns();
|
|
42797
42882
|
init_BranchingLogicBuilder();
|
|
42798
42883
|
init_Breadcrumb();
|
|
42884
|
+
init_ButtonGroup();
|
|
42799
42885
|
init_CTABanner();
|
|
42800
42886
|
init_CalendarGrid();
|
|
42801
42887
|
init_Canvas();
|
|
@@ -42866,8 +42952,8 @@ var init_component_registry_generated = __esm({
|
|
|
42866
42952
|
init_FlipContainer();
|
|
42867
42953
|
init_FloatingActionButton();
|
|
42868
42954
|
init_Form();
|
|
42869
|
-
init_FormSection();
|
|
42870
42955
|
init_FormField();
|
|
42956
|
+
init_FormSection();
|
|
42871
42957
|
init_FormSectionHeader();
|
|
42872
42958
|
init_GameAudioToggle();
|
|
42873
42959
|
init_GameHud();
|
|
@@ -43053,6 +43139,7 @@ var init_component_registry_generated = __esm({
|
|
|
43053
43139
|
"BranchingLogicBuilder": BranchingLogicBuilder,
|
|
43054
43140
|
"Breadcrumb": Breadcrumb,
|
|
43055
43141
|
"Button": ButtonPattern,
|
|
43142
|
+
"ButtonGroup": ButtonGroup,
|
|
43056
43143
|
"ButtonPattern": ButtonPattern,
|
|
43057
43144
|
"CTABanner": CTABanner,
|
|
43058
43145
|
"CalendarGrid": CalendarGrid,
|
|
@@ -43126,7 +43213,6 @@ var init_component_registry_generated = __esm({
|
|
|
43126
43213
|
"FlipContainer": FlipContainer,
|
|
43127
43214
|
"FloatingActionButton": FloatingActionButton,
|
|
43128
43215
|
"Form": Form,
|
|
43129
|
-
"FormActions": FormActions,
|
|
43130
43216
|
"FormField": FormField,
|
|
43131
43217
|
"FormLayout": FormLayout,
|
|
43132
43218
|
"FormSectionHeader": FormSectionHeader,
|
|
@@ -43306,7 +43392,7 @@ function SuspenseConfigProvider({
|
|
|
43306
43392
|
config,
|
|
43307
43393
|
children
|
|
43308
43394
|
}) {
|
|
43309
|
-
return
|
|
43395
|
+
return React84__default.createElement(
|
|
43310
43396
|
SuspenseConfigContext.Provider,
|
|
43311
43397
|
{ value: config },
|
|
43312
43398
|
children
|
|
@@ -43348,7 +43434,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
43348
43434
|
}
|
|
43349
43435
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
43350
43436
|
}
|
|
43351
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
43437
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React84__default.isValidElement(field) && !(field instanceof Date)) {
|
|
43352
43438
|
const obj = field;
|
|
43353
43439
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
43354
43440
|
if (!fieldName) return field;
|
|
@@ -43801,7 +43887,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
43801
43887
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
43802
43888
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
43803
43889
|
}
|
|
43804
|
-
return /* @__PURE__ */ jsx(
|
|
43890
|
+
return /* @__PURE__ */ jsx(React84__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
43805
43891
|
}
|
|
43806
43892
|
if (!child || typeof child !== "object") return null;
|
|
43807
43893
|
const childId = `${parentId}-${index}`;
|
|
@@ -43854,14 +43940,14 @@ function isPatternConfig(value) {
|
|
|
43854
43940
|
if (value === null || value === void 0) return false;
|
|
43855
43941
|
if (typeof value !== "object") return false;
|
|
43856
43942
|
if (Array.isArray(value)) return false;
|
|
43857
|
-
if (
|
|
43943
|
+
if (React84__default.isValidElement(value)) return false;
|
|
43858
43944
|
if (value instanceof Date) return false;
|
|
43859
43945
|
if (typeof value === "function") return false;
|
|
43860
43946
|
const record = value;
|
|
43861
43947
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
43862
43948
|
}
|
|
43863
43949
|
function isPlainConfigObject(value) {
|
|
43864
|
-
if (
|
|
43950
|
+
if (React84__default.isValidElement(value)) return false;
|
|
43865
43951
|
if (value instanceof Date) return false;
|
|
43866
43952
|
const proto = Object.getPrototypeOf(value);
|
|
43867
43953
|
return proto === Object.prototype || proto === null;
|
|
@@ -43989,7 +44075,7 @@ function SlotContentRenderer({
|
|
|
43989
44075
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
43990
44076
|
const slotVal = restProps[slotKey];
|
|
43991
44077
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
43992
|
-
if (
|
|
44078
|
+
if (React84__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
43993
44079
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
43994
44080
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
43995
44081
|
slotVal,
|
|
@@ -44042,7 +44128,7 @@ function SlotContentRenderer({
|
|
|
44042
44128
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
44043
44129
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
44044
44130
|
const sample = resolvedItems[0];
|
|
44045
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
44131
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React84__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
44046
44132
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
44047
44133
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
44048
44134
|
}
|