@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/avl/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React91 from 'react';
|
|
3
|
+
import React91__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
4
|
import { getAllPages, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
@@ -3177,7 +3177,7 @@ var init_Typography = __esm({
|
|
|
3177
3177
|
}) => {
|
|
3178
3178
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
3179
3179
|
const Component = as || defaultElements[variant];
|
|
3180
|
-
return
|
|
3180
|
+
return React91__default.createElement(
|
|
3181
3181
|
Component,
|
|
3182
3182
|
{
|
|
3183
3183
|
id,
|
|
@@ -3523,7 +3523,7 @@ var init_Box = __esm({
|
|
|
3523
3523
|
fixed: "fixed",
|
|
3524
3524
|
sticky: "sticky"
|
|
3525
3525
|
};
|
|
3526
|
-
Box =
|
|
3526
|
+
Box = React91__default.forwardRef(
|
|
3527
3527
|
({
|
|
3528
3528
|
padding,
|
|
3529
3529
|
paddingX,
|
|
@@ -3588,7 +3588,7 @@ var init_Box = __esm({
|
|
|
3588
3588
|
onPointerDown?.(e);
|
|
3589
3589
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3590
3590
|
const isClickable = action || onClick;
|
|
3591
|
-
return
|
|
3591
|
+
return React91__default.createElement(
|
|
3592
3592
|
Component,
|
|
3593
3593
|
{
|
|
3594
3594
|
ref,
|
|
@@ -3684,7 +3684,7 @@ var init_Stack = __esm({
|
|
|
3684
3684
|
};
|
|
3685
3685
|
const isHorizontal = direction === "horizontal";
|
|
3686
3686
|
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";
|
|
3687
|
-
return
|
|
3687
|
+
return React91__default.createElement(
|
|
3688
3688
|
Component,
|
|
3689
3689
|
{
|
|
3690
3690
|
className: cn(
|
|
@@ -4176,7 +4176,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4176
4176
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4177
4177
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4178
4178
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
4179
|
-
return /* @__PURE__ */ jsxs(
|
|
4179
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
4180
4180
|
/* @__PURE__ */ jsx(
|
|
4181
4181
|
AvlState,
|
|
4182
4182
|
{
|
|
@@ -4627,7 +4627,7 @@ var init_Icon = __esm({
|
|
|
4627
4627
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
4628
4628
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
4629
4629
|
const family = useIconFamily();
|
|
4630
|
-
const RenderedComponent =
|
|
4630
|
+
const RenderedComponent = React91__default.useMemo(() => {
|
|
4631
4631
|
if (directIcon) return null;
|
|
4632
4632
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
4633
4633
|
}, [directIcon, effectiveName, family]);
|
|
@@ -4747,7 +4747,7 @@ var init_atlasSlice = __esm({
|
|
|
4747
4747
|
}
|
|
4748
4748
|
});
|
|
4749
4749
|
function useAtlasSliceDataUrl(asset) {
|
|
4750
|
-
const [, bump] =
|
|
4750
|
+
const [, bump] = React91.useReducer((x) => x + 1, 0);
|
|
4751
4751
|
if (!isAtlasAsset(asset)) return void 0;
|
|
4752
4752
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
4753
4753
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -4810,13 +4810,13 @@ function AtlasImage({
|
|
|
4810
4810
|
style,
|
|
4811
4811
|
"aria-hidden": ariaHidden
|
|
4812
4812
|
}) {
|
|
4813
|
-
const [, bump] =
|
|
4814
|
-
const canvasRef =
|
|
4813
|
+
const [, bump] = React91.useReducer((x) => x + 1, 0);
|
|
4814
|
+
const canvasRef = React91.useRef(null);
|
|
4815
4815
|
const sliced = isAtlasAsset(asset);
|
|
4816
4816
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
4817
4817
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
4818
4818
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
4819
|
-
|
|
4819
|
+
React91.useEffect(() => {
|
|
4820
4820
|
const canvas = canvasRef.current;
|
|
4821
4821
|
if (!canvas || !img || !rect) return;
|
|
4822
4822
|
canvas.width = rect.sw;
|
|
@@ -4892,7 +4892,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
4892
4892
|
const IconComp = value;
|
|
4893
4893
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
4894
4894
|
}
|
|
4895
|
-
if (
|
|
4895
|
+
if (React91__default.isValidElement(value)) {
|
|
4896
4896
|
return value;
|
|
4897
4897
|
}
|
|
4898
4898
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -4969,7 +4969,7 @@ var init_Button = __esm({
|
|
|
4969
4969
|
md: "h-icon-default w-icon-default",
|
|
4970
4970
|
lg: "h-icon-default w-icon-default"
|
|
4971
4971
|
};
|
|
4972
|
-
Button =
|
|
4972
|
+
Button = React91__default.forwardRef(
|
|
4973
4973
|
({
|
|
4974
4974
|
className,
|
|
4975
4975
|
variant = "primary",
|
|
@@ -5011,7 +5011,8 @@ var init_Button = __esm({
|
|
|
5011
5011
|
"font-medium",
|
|
5012
5012
|
"rounded-sm",
|
|
5013
5013
|
"cursor-pointer",
|
|
5014
|
-
"
|
|
5014
|
+
"chrome-button",
|
|
5015
|
+
"transition-all duration-normal",
|
|
5015
5016
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
5016
5017
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5017
5018
|
variantStyles2[variant],
|
|
@@ -5037,7 +5038,7 @@ var Dialog;
|
|
|
5037
5038
|
var init_Dialog = __esm({
|
|
5038
5039
|
"components/core/atoms/Dialog.tsx"() {
|
|
5039
5040
|
init_cn();
|
|
5040
|
-
Dialog =
|
|
5041
|
+
Dialog = React91__default.forwardRef(
|
|
5041
5042
|
({
|
|
5042
5043
|
role = "dialog",
|
|
5043
5044
|
"aria-modal": ariaModal = true,
|
|
@@ -5289,12 +5290,84 @@ var init_Modal = __esm({
|
|
|
5289
5290
|
Modal.displayName = "Modal";
|
|
5290
5291
|
}
|
|
5291
5292
|
});
|
|
5293
|
+
function isMotionEnabled() {
|
|
5294
|
+
if (typeof document === "undefined") return true;
|
|
5295
|
+
if (motionEnabledCache !== null) return motionEnabledCache;
|
|
5296
|
+
const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
|
|
5297
|
+
motionEnabledCache = v !== "off";
|
|
5298
|
+
return motionEnabledCache;
|
|
5299
|
+
}
|
|
5300
|
+
function usePresence(show, opts) {
|
|
5301
|
+
const { animation, animate = true, onExited } = opts;
|
|
5302
|
+
const [mounted, setMounted] = useState(show);
|
|
5303
|
+
const [exiting, setExiting] = useState(false);
|
|
5304
|
+
const prev = useRef(show);
|
|
5305
|
+
const onExitedRef = useRef(onExited);
|
|
5306
|
+
onExitedRef.current = onExited;
|
|
5307
|
+
const safeTimer = useRef(null);
|
|
5308
|
+
const clearSafe = useCallback(() => {
|
|
5309
|
+
if (safeTimer.current) {
|
|
5310
|
+
clearTimeout(safeTimer.current);
|
|
5311
|
+
safeTimer.current = null;
|
|
5312
|
+
}
|
|
5313
|
+
}, []);
|
|
5314
|
+
const finishExit = useCallback(() => {
|
|
5315
|
+
clearSafe();
|
|
5316
|
+
setExiting(false);
|
|
5317
|
+
setMounted(false);
|
|
5318
|
+
onExitedRef.current?.();
|
|
5319
|
+
}, [clearSafe]);
|
|
5320
|
+
useEffect(() => {
|
|
5321
|
+
const moving = animate && isMotionEnabled();
|
|
5322
|
+
if (show && !prev.current) {
|
|
5323
|
+
setExiting(false);
|
|
5324
|
+
setMounted(true);
|
|
5325
|
+
} else if (!show && prev.current) {
|
|
5326
|
+
if (moving) {
|
|
5327
|
+
setExiting(true);
|
|
5328
|
+
clearSafe();
|
|
5329
|
+
safeTimer.current = setTimeout(finishExit, SAFE_EXIT_MS);
|
|
5330
|
+
} else {
|
|
5331
|
+
setMounted(false);
|
|
5332
|
+
setExiting(false);
|
|
5333
|
+
}
|
|
5334
|
+
}
|
|
5335
|
+
prev.current = show;
|
|
5336
|
+
}, [show, animate, clearSafe, finishExit]);
|
|
5337
|
+
useEffect(() => () => clearSafe(), [clearSafe]);
|
|
5338
|
+
const disabled = !animate || !isMotionEnabled();
|
|
5339
|
+
const className = disabled ? "" : exiting ? `animate-${animation}-out` : `animate-${animation}-in`;
|
|
5340
|
+
const onAnimationEnd = useCallback(
|
|
5341
|
+
(e) => {
|
|
5342
|
+
if (e.target !== e.currentTarget) return;
|
|
5343
|
+
if (exiting) finishExit();
|
|
5344
|
+
},
|
|
5345
|
+
[exiting, finishExit]
|
|
5346
|
+
);
|
|
5347
|
+
return { mounted, exiting, className, onAnimationEnd };
|
|
5348
|
+
}
|
|
5349
|
+
var SAFE_EXIT_MS, motionEnabledCache, Presence;
|
|
5350
|
+
var init_Presence = __esm({
|
|
5351
|
+
"components/core/atoms/Presence.tsx"() {
|
|
5352
|
+
"use client";
|
|
5353
|
+
init_cn();
|
|
5354
|
+
SAFE_EXIT_MS = 1e3;
|
|
5355
|
+
motionEnabledCache = null;
|
|
5356
|
+
Presence = ({ show, className, children, ...opts }) => {
|
|
5357
|
+
const { mounted, className: animClass, onAnimationEnd } = usePresence(show, opts);
|
|
5358
|
+
if (!mounted) return null;
|
|
5359
|
+
return /* @__PURE__ */ jsx("div", { className: cn(animClass, className), onAnimationEnd, children });
|
|
5360
|
+
};
|
|
5361
|
+
Presence.displayName = "Presence";
|
|
5362
|
+
}
|
|
5363
|
+
});
|
|
5292
5364
|
var Overlay;
|
|
5293
5365
|
var init_Overlay = __esm({
|
|
5294
5366
|
"components/core/atoms/Overlay.tsx"() {
|
|
5295
5367
|
"use client";
|
|
5296
5368
|
init_cn();
|
|
5297
5369
|
init_useEventBus();
|
|
5370
|
+
init_Presence();
|
|
5298
5371
|
Overlay = ({
|
|
5299
5372
|
isVisible = true,
|
|
5300
5373
|
onClick,
|
|
@@ -5303,7 +5376,8 @@ var init_Overlay = __esm({
|
|
|
5303
5376
|
action
|
|
5304
5377
|
}) => {
|
|
5305
5378
|
const eventBus = useEventBus();
|
|
5306
|
-
|
|
5379
|
+
const { mounted, className: animClass, onAnimationEnd } = usePresence(isVisible, { animation: "overlay" });
|
|
5380
|
+
if (!mounted) return null;
|
|
5307
5381
|
const handleClick = (e) => {
|
|
5308
5382
|
if (action) {
|
|
5309
5383
|
eventBus.emit(`UI:${action}`, {});
|
|
@@ -5316,11 +5390,12 @@ var init_Overlay = __esm({
|
|
|
5316
5390
|
className: cn(
|
|
5317
5391
|
"fixed inset-0 z-40",
|
|
5318
5392
|
blur && "backdrop-blur-sm",
|
|
5319
|
-
|
|
5393
|
+
animClass,
|
|
5320
5394
|
className
|
|
5321
5395
|
),
|
|
5322
5396
|
style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
|
|
5323
5397
|
onClick: action || onClick ? handleClick : void 0,
|
|
5398
|
+
onAnimationEnd,
|
|
5324
5399
|
"aria-hidden": "true"
|
|
5325
5400
|
}
|
|
5326
5401
|
);
|
|
@@ -5335,6 +5410,7 @@ var init_Drawer = __esm({
|
|
|
5335
5410
|
init_Button();
|
|
5336
5411
|
init_Typography();
|
|
5337
5412
|
init_Overlay();
|
|
5413
|
+
init_Presence();
|
|
5338
5414
|
init_cn();
|
|
5339
5415
|
init_useEventBus();
|
|
5340
5416
|
sizeWidths = {
|
|
@@ -5388,6 +5464,7 @@ var init_Drawer = __esm({
|
|
|
5388
5464
|
document.addEventListener("keydown", handleEscape);
|
|
5389
5465
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
5390
5466
|
}, [isOpen, closeOnEscape, onClose, closeEvent, eventBus]);
|
|
5467
|
+
const { mounted, className: drawerAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
|
|
5391
5468
|
useEffect(() => {
|
|
5392
5469
|
if (isOpen) {
|
|
5393
5470
|
document.body.style.overflow = "hidden";
|
|
@@ -5398,7 +5475,7 @@ var init_Drawer = __esm({
|
|
|
5398
5475
|
document.body.style.overflow = "";
|
|
5399
5476
|
};
|
|
5400
5477
|
}, [isOpen]);
|
|
5401
|
-
if (!
|
|
5478
|
+
if (!mounted) return null;
|
|
5402
5479
|
const handleClose = () => {
|
|
5403
5480
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
5404
5481
|
onClose();
|
|
@@ -5411,7 +5488,7 @@ var init_Drawer = __esm({
|
|
|
5411
5488
|
const widthClass = width in sizeWidths ? sizeWidths[width] : "";
|
|
5412
5489
|
const widthStyle = width in sizeWidths ? void 0 : { width };
|
|
5413
5490
|
const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
|
|
5414
|
-
const
|
|
5491
|
+
const drawerSign = position === "right" ? 1 : -1;
|
|
5415
5492
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5416
5493
|
/* @__PURE__ */ jsx(
|
|
5417
5494
|
Overlay,
|
|
@@ -5433,12 +5510,13 @@ var init_Drawer = __esm({
|
|
|
5433
5510
|
"flex flex-col max-h-screen",
|
|
5434
5511
|
positionClasses,
|
|
5435
5512
|
widthClass,
|
|
5436
|
-
|
|
5513
|
+
drawerAnim,
|
|
5437
5514
|
className
|
|
5438
5515
|
),
|
|
5439
|
-
style: widthStyle,
|
|
5516
|
+
style: { ...widthStyle, "--motion-drawer-sign": drawerSign },
|
|
5440
5517
|
role: "dialog",
|
|
5441
5518
|
"aria-modal": "true",
|
|
5519
|
+
onAnimationEnd,
|
|
5442
5520
|
...title && { "aria-labelledby": "drawer-title" },
|
|
5443
5521
|
children: [
|
|
5444
5522
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
@@ -5477,31 +5555,7 @@ var init_Drawer = __esm({
|
|
|
5477
5555
|
)
|
|
5478
5556
|
]
|
|
5479
5557
|
}
|
|
5480
|
-
)
|
|
5481
|
-
/* @__PURE__ */ jsx("style", { children: `
|
|
5482
|
-
@keyframes slide-in-right {
|
|
5483
|
-
from {
|
|
5484
|
-
transform: translateX(100%);
|
|
5485
|
-
}
|
|
5486
|
-
to {
|
|
5487
|
-
transform: translateX(0);
|
|
5488
|
-
}
|
|
5489
|
-
}
|
|
5490
|
-
@keyframes slide-in-left {
|
|
5491
|
-
from {
|
|
5492
|
-
transform: translateX(-100%);
|
|
5493
|
-
}
|
|
5494
|
-
to {
|
|
5495
|
-
transform: translateX(0);
|
|
5496
|
-
}
|
|
5497
|
-
}
|
|
5498
|
-
.animate-slide-in-right {
|
|
5499
|
-
animation: slide-in-right 0.3s ease-out;
|
|
5500
|
-
}
|
|
5501
|
-
.animate-slide-in-left {
|
|
5502
|
-
animation: slide-in-left 0.3s ease-out;
|
|
5503
|
-
}
|
|
5504
|
-
` })
|
|
5558
|
+
)
|
|
5505
5559
|
] });
|
|
5506
5560
|
};
|
|
5507
5561
|
Drawer.displayName = "Drawer";
|
|
@@ -5550,7 +5604,7 @@ var init_Badge = __esm({
|
|
|
5550
5604
|
md: "px-2.5 py-1 text-sm",
|
|
5551
5605
|
lg: "px-3 py-1.5 text-base"
|
|
5552
5606
|
};
|
|
5553
|
-
Badge =
|
|
5607
|
+
Badge = React91__default.forwardRef(
|
|
5554
5608
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5555
5609
|
const iconSizes3 = {
|
|
5556
5610
|
sm: "h-icon-default w-icon-default",
|
|
@@ -5645,14 +5699,23 @@ var init_Toast = __esm({
|
|
|
5645
5699
|
}) => {
|
|
5646
5700
|
const eventBus = useEventBus();
|
|
5647
5701
|
const { t } = useTranslate();
|
|
5648
|
-
const
|
|
5702
|
+
const [leaving, setLeaving] = useState(false);
|
|
5703
|
+
const doRealDismiss = () => {
|
|
5649
5704
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
5650
5705
|
onDismiss?.();
|
|
5651
5706
|
};
|
|
5707
|
+
const handleDismiss = () => {
|
|
5708
|
+
if (leaving) return;
|
|
5709
|
+
setLeaving(true);
|
|
5710
|
+
};
|
|
5652
5711
|
const handleAction = () => {
|
|
5653
5712
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
5654
5713
|
onAction?.();
|
|
5655
5714
|
};
|
|
5715
|
+
const handleAnimEnd = (e) => {
|
|
5716
|
+
if (e.target !== e.currentTarget) return;
|
|
5717
|
+
if (leaving) doRealDismiss();
|
|
5718
|
+
};
|
|
5656
5719
|
useEffect(() => {
|
|
5657
5720
|
if (duration <= 0 || !onDismiss && !dismissEvent) {
|
|
5658
5721
|
return;
|
|
@@ -5671,10 +5734,12 @@ var init_Toast = __esm({
|
|
|
5671
5734
|
// edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
|
|
5672
5735
|
"border-l-4 p-4 shadow-elevation-toast min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
5673
5736
|
"rounded-sm",
|
|
5737
|
+
leaving ? "animate-toast-out" : "animate-toast-in",
|
|
5674
5738
|
variantClasses[variant],
|
|
5675
5739
|
className
|
|
5676
5740
|
),
|
|
5677
5741
|
role: "alert",
|
|
5742
|
+
onAnimationEnd: handleAnimEnd,
|
|
5678
5743
|
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
|
|
5679
5744
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
5680
5745
|
Icon,
|
|
@@ -5887,7 +5952,7 @@ var init_SvgFlow = __esm({
|
|
|
5887
5952
|
width = 100,
|
|
5888
5953
|
height = 100
|
|
5889
5954
|
}) => {
|
|
5890
|
-
const markerId =
|
|
5955
|
+
const markerId = React91__default.useMemo(() => {
|
|
5891
5956
|
flowIdCounter += 1;
|
|
5892
5957
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
5893
5958
|
}, []);
|
|
@@ -6480,7 +6545,7 @@ var init_SvgRing = __esm({
|
|
|
6480
6545
|
width = 100,
|
|
6481
6546
|
height = 100
|
|
6482
6547
|
}) => {
|
|
6483
|
-
const gradientId =
|
|
6548
|
+
const gradientId = React91__default.useMemo(() => {
|
|
6484
6549
|
ringIdCounter += 1;
|
|
6485
6550
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6486
6551
|
}, []);
|
|
@@ -6661,7 +6726,7 @@ var init_Input = __esm({
|
|
|
6661
6726
|
init_cn();
|
|
6662
6727
|
init_Icon();
|
|
6663
6728
|
init_useEventBus();
|
|
6664
|
-
Input =
|
|
6729
|
+
Input = React91__default.forwardRef(
|
|
6665
6730
|
({
|
|
6666
6731
|
className,
|
|
6667
6732
|
inputType,
|
|
@@ -6696,7 +6761,7 @@ var init_Input = __esm({
|
|
|
6696
6761
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
6697
6762
|
const isMultiline = type === "textarea";
|
|
6698
6763
|
const baseClassName = cn(
|
|
6699
|
-
"block w-full rounded-sm transition-all duration-
|
|
6764
|
+
"block w-full rounded-sm transition-all duration-fast",
|
|
6700
6765
|
"border-[length:var(--border-width-thin)] border-border",
|
|
6701
6766
|
isMultiline ? "px-3 py-2 text-sm" : "h-input-md px-3 text-sm",
|
|
6702
6767
|
"bg-card hover:bg-muted focus:bg-card",
|
|
@@ -6829,7 +6894,7 @@ var Label;
|
|
|
6829
6894
|
var init_Label = __esm({
|
|
6830
6895
|
"components/core/atoms/Label.tsx"() {
|
|
6831
6896
|
init_cn();
|
|
6832
|
-
Label =
|
|
6897
|
+
Label = React91__default.forwardRef(
|
|
6833
6898
|
({ className, required, children, ...props }, ref) => {
|
|
6834
6899
|
return /* @__PURE__ */ jsxs(
|
|
6835
6900
|
"label",
|
|
@@ -6856,7 +6921,7 @@ var init_Textarea = __esm({
|
|
|
6856
6921
|
"components/core/atoms/Textarea.tsx"() {
|
|
6857
6922
|
init_cn();
|
|
6858
6923
|
init_useEventBus();
|
|
6859
|
-
Textarea =
|
|
6924
|
+
Textarea = React91__default.forwardRef(
|
|
6860
6925
|
({ className, error, onChange, ...props }, ref) => {
|
|
6861
6926
|
const eventBus = useEventBus();
|
|
6862
6927
|
const handleChange = (e) => {
|
|
@@ -7095,7 +7160,7 @@ var init_Select = __esm({
|
|
|
7095
7160
|
init_cn();
|
|
7096
7161
|
init_Icon();
|
|
7097
7162
|
init_useEventBus();
|
|
7098
|
-
Select =
|
|
7163
|
+
Select = React91__default.forwardRef(
|
|
7099
7164
|
(props, _ref) => {
|
|
7100
7165
|
const { multiple, searchable, clearable } = props;
|
|
7101
7166
|
if (multiple || searchable || clearable) {
|
|
@@ -7112,7 +7177,7 @@ var init_Checkbox = __esm({
|
|
|
7112
7177
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7113
7178
|
init_cn();
|
|
7114
7179
|
init_useEventBus();
|
|
7115
|
-
Checkbox =
|
|
7180
|
+
Checkbox = React91__default.forwardRef(
|
|
7116
7181
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7117
7182
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7118
7183
|
const eventBus = useEventBus();
|
|
@@ -7166,7 +7231,7 @@ var init_Spinner = __esm({
|
|
|
7166
7231
|
md: "h-6 w-6",
|
|
7167
7232
|
lg: "h-8 w-8"
|
|
7168
7233
|
};
|
|
7169
|
-
Spinner =
|
|
7234
|
+
Spinner = React91__default.forwardRef(
|
|
7170
7235
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7171
7236
|
if (overlay) {
|
|
7172
7237
|
return /* @__PURE__ */ jsx(
|
|
@@ -7208,21 +7273,21 @@ var init_Card = __esm({
|
|
|
7208
7273
|
"bg-card",
|
|
7209
7274
|
"border-[length:var(--border-width)] border-border",
|
|
7210
7275
|
"shadow-elevation-card",
|
|
7211
|
-
"transition-all duration-
|
|
7276
|
+
"transition-all duration-normal",
|
|
7212
7277
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
7213
7278
|
].join(" "),
|
|
7214
7279
|
bordered: [
|
|
7215
7280
|
"bg-card",
|
|
7216
7281
|
"border-[length:var(--border-width)] border-border",
|
|
7217
7282
|
"shadow-elevation-card",
|
|
7218
|
-
"transition-all duration-
|
|
7283
|
+
"transition-all duration-normal",
|
|
7219
7284
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
7220
7285
|
].join(" "),
|
|
7221
7286
|
elevated: [
|
|
7222
7287
|
"bg-card",
|
|
7223
7288
|
"border-[length:var(--border-width)] border-border",
|
|
7224
7289
|
"shadow",
|
|
7225
|
-
"transition-all duration-
|
|
7290
|
+
"transition-all duration-normal",
|
|
7226
7291
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
7227
7292
|
].join(" "),
|
|
7228
7293
|
// Interactive variant with theme-specific hover effects
|
|
@@ -7231,7 +7296,7 @@ var init_Card = __esm({
|
|
|
7231
7296
|
"border-[length:var(--border-width)] border-border",
|
|
7232
7297
|
"shadow",
|
|
7233
7298
|
"cursor-pointer",
|
|
7234
|
-
"transition-all duration-
|
|
7299
|
+
"transition-all duration-normal",
|
|
7235
7300
|
"hover:shadow-elevation-dialog"
|
|
7236
7301
|
].join(" ")
|
|
7237
7302
|
};
|
|
@@ -7256,7 +7321,7 @@ var init_Card = __esm({
|
|
|
7256
7321
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7257
7322
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7258
7323
|
};
|
|
7259
|
-
Card =
|
|
7324
|
+
Card = React91__default.forwardRef(
|
|
7260
7325
|
({
|
|
7261
7326
|
className,
|
|
7262
7327
|
variant = "bordered",
|
|
@@ -7282,7 +7347,8 @@ var init_Card = __esm({
|
|
|
7282
7347
|
ref,
|
|
7283
7348
|
className: cn(
|
|
7284
7349
|
"rounded-container relative",
|
|
7285
|
-
"transition-all duration-
|
|
7350
|
+
"transition-all duration-normal",
|
|
7351
|
+
"chrome-panel",
|
|
7286
7352
|
variantStyles4[variant],
|
|
7287
7353
|
paddingStyles2[padding],
|
|
7288
7354
|
lookStyles2[look],
|
|
@@ -7304,9 +7370,9 @@ var init_Card = __esm({
|
|
|
7304
7370
|
}
|
|
7305
7371
|
);
|
|
7306
7372
|
Card.displayName = "Card";
|
|
7307
|
-
CardHeader =
|
|
7373
|
+
CardHeader = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7308
7374
|
CardHeader.displayName = "CardHeader";
|
|
7309
|
-
CardTitle =
|
|
7375
|
+
CardTitle = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7310
7376
|
"h3",
|
|
7311
7377
|
{
|
|
7312
7378
|
ref,
|
|
@@ -7319,11 +7385,11 @@ var init_Card = __esm({
|
|
|
7319
7385
|
}
|
|
7320
7386
|
));
|
|
7321
7387
|
CardTitle.displayName = "CardTitle";
|
|
7322
|
-
CardContent =
|
|
7388
|
+
CardContent = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7323
7389
|
CardContent.displayName = "CardContent";
|
|
7324
7390
|
CardBody = CardContent;
|
|
7325
7391
|
CardBody.displayName = "CardBody";
|
|
7326
|
-
CardFooter =
|
|
7392
|
+
CardFooter = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7327
7393
|
"div",
|
|
7328
7394
|
{
|
|
7329
7395
|
ref,
|
|
@@ -7410,7 +7476,7 @@ var init_FilterPill = __esm({
|
|
|
7410
7476
|
md: "w-3.5 h-3.5",
|
|
7411
7477
|
lg: "w-4 h-4"
|
|
7412
7478
|
};
|
|
7413
|
-
FilterPill =
|
|
7479
|
+
FilterPill = React91__default.forwardRef(
|
|
7414
7480
|
({
|
|
7415
7481
|
className,
|
|
7416
7482
|
variant = "default",
|
|
@@ -7539,8 +7605,8 @@ var init_Avatar = __esm({
|
|
|
7539
7605
|
actionPayload
|
|
7540
7606
|
}) => {
|
|
7541
7607
|
const eventBus = useEventBus();
|
|
7542
|
-
const [imgFailed, setImgFailed] =
|
|
7543
|
-
|
|
7608
|
+
const [imgFailed, setImgFailed] = React91__default.useState(false);
|
|
7609
|
+
React91__default.useEffect(() => {
|
|
7544
7610
|
setImgFailed(false);
|
|
7545
7611
|
}, [src]);
|
|
7546
7612
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -7653,7 +7719,7 @@ var init_Center = __esm({
|
|
|
7653
7719
|
as: Component = "div"
|
|
7654
7720
|
}) => {
|
|
7655
7721
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
7656
|
-
return
|
|
7722
|
+
return React91__default.createElement(Component, {
|
|
7657
7723
|
className: cn(
|
|
7658
7724
|
inline ? "inline-flex" : "flex",
|
|
7659
7725
|
horizontal && "justify-center",
|
|
@@ -7921,7 +7987,7 @@ var init_Radio = __esm({
|
|
|
7921
7987
|
md: "w-2.5 h-2.5",
|
|
7922
7988
|
lg: "w-3 h-3"
|
|
7923
7989
|
};
|
|
7924
|
-
Radio =
|
|
7990
|
+
Radio = React91__default.forwardRef(
|
|
7925
7991
|
({
|
|
7926
7992
|
label,
|
|
7927
7993
|
helperText,
|
|
@@ -7938,12 +8004,12 @@ var init_Radio = __esm({
|
|
|
7938
8004
|
onChange,
|
|
7939
8005
|
...props
|
|
7940
8006
|
}, ref) => {
|
|
7941
|
-
const reactId =
|
|
8007
|
+
const reactId = React91__default.useId();
|
|
7942
8008
|
const baseId = id || `radio-${reactId}`;
|
|
7943
8009
|
const hasError = !!error;
|
|
7944
8010
|
const eventBus = useEventBus();
|
|
7945
|
-
const [selected, setSelected] =
|
|
7946
|
-
|
|
8011
|
+
const [selected, setSelected] = React91__default.useState(value);
|
|
8012
|
+
React91__default.useEffect(() => {
|
|
7947
8013
|
if (value !== void 0) setSelected(value);
|
|
7948
8014
|
}, [value]);
|
|
7949
8015
|
const pick = (next, e) => {
|
|
@@ -8125,7 +8191,7 @@ var init_Switch = __esm({
|
|
|
8125
8191
|
"components/core/atoms/Switch.tsx"() {
|
|
8126
8192
|
"use client";
|
|
8127
8193
|
init_cn();
|
|
8128
|
-
Switch =
|
|
8194
|
+
Switch = React91.forwardRef(
|
|
8129
8195
|
({
|
|
8130
8196
|
checked,
|
|
8131
8197
|
defaultChecked = false,
|
|
@@ -8136,10 +8202,10 @@ var init_Switch = __esm({
|
|
|
8136
8202
|
name,
|
|
8137
8203
|
className
|
|
8138
8204
|
}, ref) => {
|
|
8139
|
-
const [isChecked, setIsChecked] =
|
|
8205
|
+
const [isChecked, setIsChecked] = React91.useState(
|
|
8140
8206
|
checked !== void 0 ? checked : defaultChecked
|
|
8141
8207
|
);
|
|
8142
|
-
|
|
8208
|
+
React91.useEffect(() => {
|
|
8143
8209
|
if (checked !== void 0) {
|
|
8144
8210
|
setIsChecked(checked);
|
|
8145
8211
|
}
|
|
@@ -8170,7 +8236,7 @@ var init_Switch = __esm({
|
|
|
8170
8236
|
// redefine --space-11 to 68px, which makes w-11 enormous and leaves
|
|
8171
8237
|
// the thumb stuck near the left edge. The switch geometry must stay
|
|
8172
8238
|
// proportional regardless of a theme's density scale.
|
|
8173
|
-
"relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
8239
|
+
"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",
|
|
8174
8240
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
8175
8241
|
isChecked ? "bg-primary" : "bg-muted",
|
|
8176
8242
|
disabled && "cursor-not-allowed opacity-50"
|
|
@@ -8179,7 +8245,7 @@ var init_Switch = __esm({
|
|
|
8179
8245
|
"span",
|
|
8180
8246
|
{
|
|
8181
8247
|
className: cn(
|
|
8182
|
-
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
8248
|
+
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform duration-fast",
|
|
8183
8249
|
isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
|
|
8184
8250
|
)
|
|
8185
8251
|
}
|
|
@@ -8262,7 +8328,7 @@ var init_TextHighlight = __esm({
|
|
|
8262
8328
|
hoverEvent
|
|
8263
8329
|
}) => {
|
|
8264
8330
|
const eventBus = useEventBus();
|
|
8265
|
-
const baseStyles = "cursor-pointer transition-all duration-
|
|
8331
|
+
const baseStyles = "cursor-pointer transition-all duration-fast";
|
|
8266
8332
|
const typeStyles = {
|
|
8267
8333
|
question: cn(
|
|
8268
8334
|
// Blue border for questions
|
|
@@ -8417,7 +8483,7 @@ var Aside;
|
|
|
8417
8483
|
var init_Aside = __esm({
|
|
8418
8484
|
"components/core/atoms/Aside.tsx"() {
|
|
8419
8485
|
init_cn();
|
|
8420
|
-
Aside =
|
|
8486
|
+
Aside = React91__default.forwardRef(
|
|
8421
8487
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8422
8488
|
);
|
|
8423
8489
|
Aside.displayName = "Aside";
|
|
@@ -8496,9 +8562,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8496
8562
|
className
|
|
8497
8563
|
}) => {
|
|
8498
8564
|
const { t } = useTranslate();
|
|
8499
|
-
const [isVisible, setIsVisible] =
|
|
8500
|
-
const timeoutRef =
|
|
8501
|
-
const triggerRef =
|
|
8565
|
+
const [isVisible, setIsVisible] = React91__default.useState(false);
|
|
8566
|
+
const timeoutRef = React91__default.useRef(null);
|
|
8567
|
+
const triggerRef = React91__default.useRef(null);
|
|
8502
8568
|
const handleMouseEnter = () => {
|
|
8503
8569
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8504
8570
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8509,7 +8575,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8509
8575
|
};
|
|
8510
8576
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8511
8577
|
const open = isVisible || revealed;
|
|
8512
|
-
|
|
8578
|
+
React91__default.useEffect(() => {
|
|
8513
8579
|
return () => {
|
|
8514
8580
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8515
8581
|
};
|
|
@@ -8719,7 +8785,7 @@ var init_StatusDot = __esm({
|
|
|
8719
8785
|
md: "w-2.5 h-2.5",
|
|
8720
8786
|
lg: "w-3 h-3"
|
|
8721
8787
|
};
|
|
8722
|
-
StatusDot =
|
|
8788
|
+
StatusDot = React91__default.forwardRef(
|
|
8723
8789
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
8724
8790
|
return /* @__PURE__ */ jsx(
|
|
8725
8791
|
"span",
|
|
@@ -8773,7 +8839,7 @@ var init_TrendIndicator = __esm({
|
|
|
8773
8839
|
down: "trending-down",
|
|
8774
8840
|
flat: "arrow-right"
|
|
8775
8841
|
};
|
|
8776
|
-
TrendIndicator =
|
|
8842
|
+
TrendIndicator = React91__default.forwardRef(
|
|
8777
8843
|
({
|
|
8778
8844
|
className,
|
|
8779
8845
|
value,
|
|
@@ -8840,7 +8906,7 @@ var init_RangeSlider = __esm({
|
|
|
8840
8906
|
md: "w-4 h-4",
|
|
8841
8907
|
lg: "w-5 h-5"
|
|
8842
8908
|
};
|
|
8843
|
-
RangeSlider =
|
|
8909
|
+
RangeSlider = React91__default.forwardRef(
|
|
8844
8910
|
({
|
|
8845
8911
|
className,
|
|
8846
8912
|
min = 0,
|
|
@@ -8983,7 +9049,7 @@ var init_RangeSlider = __esm({
|
|
|
8983
9049
|
"border-2 border-primary",
|
|
8984
9050
|
"shadow-sm",
|
|
8985
9051
|
"pointer-events-none",
|
|
8986
|
-
"transition-transform duration-
|
|
9052
|
+
"transition-transform duration-instant",
|
|
8987
9053
|
isDragging && "scale-[var(--hover-scale)]",
|
|
8988
9054
|
thumbSizes[size]
|
|
8989
9055
|
),
|
|
@@ -9451,7 +9517,7 @@ var init_ContentSection = __esm({
|
|
|
9451
9517
|
md: "py-16",
|
|
9452
9518
|
lg: "py-24"
|
|
9453
9519
|
};
|
|
9454
|
-
ContentSection =
|
|
9520
|
+
ContentSection = React91__default.forwardRef(
|
|
9455
9521
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9456
9522
|
return /* @__PURE__ */ jsx(
|
|
9457
9523
|
Box,
|
|
@@ -9985,7 +10051,7 @@ var init_AnimatedReveal = __esm({
|
|
|
9985
10051
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
9986
10052
|
"none": {}
|
|
9987
10053
|
};
|
|
9988
|
-
AnimatedReveal =
|
|
10054
|
+
AnimatedReveal = React91__default.forwardRef(
|
|
9989
10055
|
({
|
|
9990
10056
|
trigger = "scroll",
|
|
9991
10057
|
animation = "fade-up",
|
|
@@ -10145,7 +10211,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10145
10211
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10146
10212
|
"use client";
|
|
10147
10213
|
init_cn();
|
|
10148
|
-
AnimatedGraphic =
|
|
10214
|
+
AnimatedGraphic = React91__default.forwardRef(
|
|
10149
10215
|
({
|
|
10150
10216
|
src,
|
|
10151
10217
|
svgContent,
|
|
@@ -10168,7 +10234,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10168
10234
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10169
10235
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10170
10236
|
const prevAnimateRef = useRef(animate);
|
|
10171
|
-
const setRef =
|
|
10237
|
+
const setRef = React91__default.useCallback(
|
|
10172
10238
|
(node) => {
|
|
10173
10239
|
containerRef.current = node;
|
|
10174
10240
|
if (typeof ref === "function") ref(node);
|
|
@@ -10896,9 +10962,9 @@ function ControlButton({
|
|
|
10896
10962
|
className
|
|
10897
10963
|
}) {
|
|
10898
10964
|
const eventBus = useEventBus();
|
|
10899
|
-
const [isPressed, setIsPressed] =
|
|
10965
|
+
const [isPressed, setIsPressed] = React91.useState(false);
|
|
10900
10966
|
const actualPressed = pressed ?? isPressed;
|
|
10901
|
-
const handlePointerDown =
|
|
10967
|
+
const handlePointerDown = React91.useCallback(
|
|
10902
10968
|
(e) => {
|
|
10903
10969
|
e.preventDefault();
|
|
10904
10970
|
if (disabled) return;
|
|
@@ -10908,7 +10974,7 @@ function ControlButton({
|
|
|
10908
10974
|
},
|
|
10909
10975
|
[disabled, pressEvent, eventBus, onPress]
|
|
10910
10976
|
);
|
|
10911
|
-
const handlePointerUp =
|
|
10977
|
+
const handlePointerUp = React91.useCallback(
|
|
10912
10978
|
(e) => {
|
|
10913
10979
|
e.preventDefault();
|
|
10914
10980
|
if (disabled) return;
|
|
@@ -10918,7 +10984,7 @@ function ControlButton({
|
|
|
10918
10984
|
},
|
|
10919
10985
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
10920
10986
|
);
|
|
10921
|
-
const handlePointerLeave =
|
|
10987
|
+
const handlePointerLeave = React91.useCallback(
|
|
10922
10988
|
(e) => {
|
|
10923
10989
|
if (isPressed) {
|
|
10924
10990
|
setIsPressed(false);
|
|
@@ -11176,8 +11242,8 @@ function ControlGrid({
|
|
|
11176
11242
|
className
|
|
11177
11243
|
}) {
|
|
11178
11244
|
const eventBus = useEventBus();
|
|
11179
|
-
const [active, setActive] =
|
|
11180
|
-
const handlePress =
|
|
11245
|
+
const [active, setActive] = React91.useState(/* @__PURE__ */ new Set());
|
|
11246
|
+
const handlePress = React91.useCallback(
|
|
11181
11247
|
(id) => {
|
|
11182
11248
|
setActive((prev) => new Set(prev).add(id));
|
|
11183
11249
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -11191,7 +11257,7 @@ function ControlGrid({
|
|
|
11191
11257
|
},
|
|
11192
11258
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
11193
11259
|
);
|
|
11194
|
-
const handleRelease =
|
|
11260
|
+
const handleRelease = React91.useCallback(
|
|
11195
11261
|
(id) => {
|
|
11196
11262
|
setActive((prev) => {
|
|
11197
11263
|
const next = new Set(prev);
|
|
@@ -11484,17 +11550,18 @@ function GameHud({
|
|
|
11484
11550
|
const mid = Math.ceil(stats.length / 2);
|
|
11485
11551
|
const leftStats = stats.slice(0, mid);
|
|
11486
11552
|
const rightStats = stats.slice(mid);
|
|
11487
|
-
const isTop = position === "top";
|
|
11488
11553
|
return /* @__PURE__ */ jsxs(
|
|
11489
|
-
|
|
11554
|
+
Card,
|
|
11490
11555
|
{
|
|
11556
|
+
variant: "bordered",
|
|
11557
|
+
padding: "none",
|
|
11491
11558
|
className: cn(
|
|
11492
|
-
"flex items-center justify-between w-full",
|
|
11559
|
+
"flex items-center justify-between w-full rounded-none bg-card",
|
|
11493
11560
|
"px-4 py-2 gap-4",
|
|
11494
|
-
|
|
11495
|
-
transparent && (isTop ? "border-b border-white/10 bg-black/40 backdrop-blur-sm" : "border-t border-white/10 bg-black/40 backdrop-blur-sm"),
|
|
11561
|
+
transparent && "backdrop-blur-sm",
|
|
11496
11562
|
className
|
|
11497
11563
|
),
|
|
11564
|
+
style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 40%, transparent)" } : void 0,
|
|
11498
11565
|
children: [
|
|
11499
11566
|
/* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
|
|
11500
11567
|
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)) })
|
|
@@ -11503,14 +11570,16 @@ function GameHud({
|
|
|
11503
11570
|
);
|
|
11504
11571
|
}
|
|
11505
11572
|
return /* @__PURE__ */ jsx(
|
|
11506
|
-
|
|
11573
|
+
Card,
|
|
11507
11574
|
{
|
|
11508
|
-
|
|
11575
|
+
variant: "bordered",
|
|
11576
|
+
padding: "sm",
|
|
11509
11577
|
className: cn(
|
|
11510
|
-
"z-10 flex items-center gap-4
|
|
11511
|
-
transparent
|
|
11578
|
+
"z-10 relative flex items-center gap-4 bg-card",
|
|
11579
|
+
transparent && "backdrop-blur-sm",
|
|
11512
11580
|
className
|
|
11513
11581
|
),
|
|
11582
|
+
style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 30%, transparent)" } : void 0,
|
|
11514
11583
|
children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i))
|
|
11515
11584
|
}
|
|
11516
11585
|
);
|
|
@@ -11520,6 +11589,7 @@ var init_GameHud = __esm({
|
|
|
11520
11589
|
"components/game/molecules/GameHud.tsx"() {
|
|
11521
11590
|
init_cn();
|
|
11522
11591
|
init_Box();
|
|
11592
|
+
init_Card();
|
|
11523
11593
|
init_StatBadge();
|
|
11524
11594
|
positionMap = {
|
|
11525
11595
|
corners: "inset-0 pointer-events-none"
|
|
@@ -11545,7 +11615,7 @@ function GameMenu({
|
|
|
11545
11615
|
}) {
|
|
11546
11616
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
11547
11617
|
const eventBus = useEventBus();
|
|
11548
|
-
const handleOptionClick =
|
|
11618
|
+
const handleOptionClick = React91.useCallback(
|
|
11549
11619
|
(option) => {
|
|
11550
11620
|
if (option.event) {
|
|
11551
11621
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -11564,39 +11634,48 @@ function GameMenu({
|
|
|
11564
11634
|
{
|
|
11565
11635
|
className: cn(
|
|
11566
11636
|
"min-h-screen w-full flex flex-col items-center justify-center p-8",
|
|
11637
|
+
!background && "bg-background",
|
|
11567
11638
|
className
|
|
11568
11639
|
),
|
|
11569
|
-
style: {
|
|
11570
|
-
background: background ?? "linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0e17 100%)"
|
|
11571
|
-
},
|
|
11640
|
+
style: background ? { background } : void 0,
|
|
11572
11641
|
children: [
|
|
11573
|
-
/* @__PURE__ */ jsxs(
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11642
|
+
/* @__PURE__ */ jsxs(
|
|
11643
|
+
Card,
|
|
11644
|
+
{
|
|
11645
|
+
variant: "bordered",
|
|
11646
|
+
padding: "lg",
|
|
11647
|
+
className: "bg-card flex flex-col items-center max-w-md w-full",
|
|
11648
|
+
children: [
|
|
11649
|
+
/* @__PURE__ */ jsxs(Box, { className: "text-center mb-8 animate-fade-in", children: [
|
|
11650
|
+
logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
|
|
11651
|
+
/* @__PURE__ */ jsx(
|
|
11652
|
+
Typography,
|
|
11653
|
+
{
|
|
11654
|
+
variant: "h1",
|
|
11655
|
+
className: "text-4xl md:text-5xl font-bold text-foreground tracking-tight",
|
|
11656
|
+
style: {
|
|
11657
|
+
textShadow: "0 4px 12px rgba(0,0,0,0.5)"
|
|
11658
|
+
},
|
|
11659
|
+
children: title
|
|
11660
|
+
}
|
|
11661
|
+
),
|
|
11662
|
+
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
11663
|
+
] }),
|
|
11664
|
+
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
11665
|
+
ChoiceButton,
|
|
11666
|
+
{
|
|
11667
|
+
text: option.label,
|
|
11668
|
+
index: index + 1,
|
|
11669
|
+
disabled: option.disabled,
|
|
11670
|
+
onClick: () => handleOptionClick(option),
|
|
11671
|
+
className: "text-lg py-4 px-8"
|
|
11672
|
+
},
|
|
11673
|
+
index
|
|
11674
|
+
)) })
|
|
11675
|
+
]
|
|
11676
|
+
}
|
|
11677
|
+
),
|
|
11678
|
+
/* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden -z-10", children: [
|
|
11600
11679
|
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
|
|
11601
11680
|
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
|
|
11602
11681
|
] })
|
|
@@ -11611,6 +11690,7 @@ var init_GameMenu = __esm({
|
|
|
11611
11690
|
init_cn();
|
|
11612
11691
|
init_useEventBus();
|
|
11613
11692
|
init_Box();
|
|
11693
|
+
init_Card();
|
|
11614
11694
|
init_Typography();
|
|
11615
11695
|
init_GameIcon();
|
|
11616
11696
|
init_ChoiceButton();
|
|
@@ -11771,7 +11851,7 @@ function StateGraph({
|
|
|
11771
11851
|
}) {
|
|
11772
11852
|
const eventBus = useEventBus();
|
|
11773
11853
|
const nodes = states ?? [];
|
|
11774
|
-
const positions =
|
|
11854
|
+
const positions = React91.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
11775
11855
|
return /* @__PURE__ */ jsxs(
|
|
11776
11856
|
Box,
|
|
11777
11857
|
{
|
|
@@ -11842,8 +11922,8 @@ function MiniMap({
|
|
|
11842
11922
|
tileAssets,
|
|
11843
11923
|
unitAssets
|
|
11844
11924
|
}) {
|
|
11845
|
-
const canvasRef =
|
|
11846
|
-
const imgCacheRef =
|
|
11925
|
+
const canvasRef = React91.useRef(null);
|
|
11926
|
+
const imgCacheRef = React91.useRef(/* @__PURE__ */ new Map());
|
|
11847
11927
|
function loadImg(url) {
|
|
11848
11928
|
const cached = imgCacheRef.current.get(url);
|
|
11849
11929
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -11858,7 +11938,7 @@ function MiniMap({
|
|
|
11858
11938
|
imgCacheRef.current.set(url, img);
|
|
11859
11939
|
return null;
|
|
11860
11940
|
}
|
|
11861
|
-
|
|
11941
|
+
React91.useEffect(() => {
|
|
11862
11942
|
const canvas = canvasRef.current;
|
|
11863
11943
|
if (!canvas) return;
|
|
11864
11944
|
const ctx = canvas.getContext("2d");
|
|
@@ -13280,7 +13360,7 @@ function LinearView({
|
|
|
13280
13360
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
13281
13361
|
const isDone = i < currentIdx;
|
|
13282
13362
|
const isCurrent = i === currentIdx;
|
|
13283
|
-
return /* @__PURE__ */ jsxs(
|
|
13363
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
13284
13364
|
i > 0 && /* @__PURE__ */ jsx(
|
|
13285
13365
|
Typography,
|
|
13286
13366
|
{
|
|
@@ -13815,7 +13895,7 @@ function SequenceBar({
|
|
|
13815
13895
|
else onSlotRemove?.(index);
|
|
13816
13896
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
13817
13897
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
13818
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
13898
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
13819
13899
|
i > 0 && /* @__PURE__ */ jsx(
|
|
13820
13900
|
Typography,
|
|
13821
13901
|
{
|
|
@@ -13902,6 +13982,7 @@ var init_GameShell = __esm({
|
|
|
13902
13982
|
"components/game/templates/GameShell.tsx"() {
|
|
13903
13983
|
init_cn();
|
|
13904
13984
|
init_Box();
|
|
13985
|
+
init_Card();
|
|
13905
13986
|
init_Typography();
|
|
13906
13987
|
init_AtlasImage();
|
|
13907
13988
|
FONT_BASE = "https://almadar-kflow-assets.web.app/shared/_shared/kenney-fonts/fonts";
|
|
@@ -13930,13 +14011,14 @@ var init_GameShell = __esm({
|
|
|
13930
14011
|
showTopBar = true,
|
|
13931
14012
|
children,
|
|
13932
14013
|
backgroundAsset,
|
|
13933
|
-
|
|
13934
|
-
|
|
14014
|
+
fontFamily = "future",
|
|
14015
|
+
"data-theme": dataTheme
|
|
13935
14016
|
}) => {
|
|
13936
14017
|
const font = GAME_FONTS[fontFamily] ?? fontFamily;
|
|
13937
14018
|
return /* @__PURE__ */ jsxs(
|
|
13938
14019
|
Box,
|
|
13939
14020
|
{
|
|
14021
|
+
"data-theme": dataTheme || void 0,
|
|
13940
14022
|
className: cn("game-shell", className),
|
|
13941
14023
|
style: {
|
|
13942
14024
|
position: "relative",
|
|
@@ -13944,7 +14026,7 @@ var init_GameShell = __esm({
|
|
|
13944
14026
|
height: "100vh",
|
|
13945
14027
|
overflow: "hidden",
|
|
13946
14028
|
background: "var(--color-background, #0a0a0f)",
|
|
13947
|
-
color: "var(--color-
|
|
14029
|
+
color: "var(--color-foreground, #e0e0e0)",
|
|
13948
14030
|
fontFamily: `'${font}', system-ui, sans-serif`
|
|
13949
14031
|
},
|
|
13950
14032
|
children: [
|
|
@@ -13976,19 +14058,12 @@ var init_GameShell = __esm({
|
|
|
13976
14058
|
},
|
|
13977
14059
|
children: [
|
|
13978
14060
|
showTopBar && /* @__PURE__ */ jsx(
|
|
13979
|
-
|
|
14061
|
+
Card,
|
|
13980
14062
|
{
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
style: {
|
|
13986
|
-
padding: "6px 16px",
|
|
13987
|
-
background: hudBackgroundAsset ? void 0 : "rgba(18, 18, 31, 0.85)",
|
|
13988
|
-
borderRadius: hudBackgroundAsset ? void 0 : 10,
|
|
13989
|
-
boxShadow: "0 4px 14px rgba(0,0,0,0.45)",
|
|
13990
|
-
flexShrink: 0
|
|
13991
|
-
},
|
|
14063
|
+
variant: "bordered",
|
|
14064
|
+
padding: "none",
|
|
14065
|
+
className: "game-shell__title bg-card pointer-events-auto",
|
|
14066
|
+
style: { padding: "6px 16px", flexShrink: 0 },
|
|
13992
14067
|
children: /* @__PURE__ */ jsx(
|
|
13993
14068
|
Typography,
|
|
13994
14069
|
{
|
|
@@ -14469,7 +14544,7 @@ var init_ErrorBoundary = __esm({
|
|
|
14469
14544
|
}
|
|
14470
14545
|
);
|
|
14471
14546
|
};
|
|
14472
|
-
ErrorBoundary = class extends
|
|
14547
|
+
ErrorBoundary = class extends React91__default.Component {
|
|
14473
14548
|
constructor(props) {
|
|
14474
14549
|
super(props);
|
|
14475
14550
|
__publicField(this, "reset", () => {
|
|
@@ -14736,7 +14811,7 @@ var init_Container = __esm({
|
|
|
14736
14811
|
as: Component = "div"
|
|
14737
14812
|
}) => {
|
|
14738
14813
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
14739
|
-
return
|
|
14814
|
+
return React91__default.createElement(
|
|
14740
14815
|
Component,
|
|
14741
14816
|
{
|
|
14742
14817
|
className: cn(
|
|
@@ -16736,7 +16811,7 @@ var init_CodeBlock = __esm({
|
|
|
16736
16811
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
16737
16812
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
16738
16813
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
16739
|
-
CodeBlock =
|
|
16814
|
+
CodeBlock = React91__default.memo(
|
|
16740
16815
|
({
|
|
16741
16816
|
code: rawCode,
|
|
16742
16817
|
language = "text",
|
|
@@ -17323,7 +17398,7 @@ var init_MarkdownContent = __esm({
|
|
|
17323
17398
|
init_Box();
|
|
17324
17399
|
init_CodeBlock();
|
|
17325
17400
|
init_cn();
|
|
17326
|
-
MarkdownContent =
|
|
17401
|
+
MarkdownContent = React91__default.memo(
|
|
17327
17402
|
({ content, direction = "ltr", className }) => {
|
|
17328
17403
|
const { t: _t } = useTranslate();
|
|
17329
17404
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -18286,7 +18361,7 @@ var init_StateMachineView = __esm({
|
|
|
18286
18361
|
Box,
|
|
18287
18362
|
{
|
|
18288
18363
|
className: cn(
|
|
18289
|
-
"fixed z-50 animate-in fade-in-0 zoom-in-95 duration-
|
|
18364
|
+
"fixed z-50 animate-in fade-in-0 zoom-in-95 duration-fast",
|
|
18290
18365
|
tooltip.pinned ? "pointer-events-auto" : "pointer-events-none"
|
|
18291
18366
|
),
|
|
18292
18367
|
style: {
|
|
@@ -18650,7 +18725,7 @@ var init_StateMachineView = __esm({
|
|
|
18650
18725
|
style: { top: title ? 30 : 0 },
|
|
18651
18726
|
children: [
|
|
18652
18727
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
18653
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
18728
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React91__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
18654
18729
|
StateNode2,
|
|
18655
18730
|
{
|
|
18656
18731
|
state,
|
|
@@ -20689,6 +20764,129 @@ var init_Breadcrumb = __esm({
|
|
|
20689
20764
|
Breadcrumb.displayName = "Breadcrumb";
|
|
20690
20765
|
}
|
|
20691
20766
|
});
|
|
20767
|
+
function useSafeEventBus2() {
|
|
20768
|
+
try {
|
|
20769
|
+
return useEventBus();
|
|
20770
|
+
} catch {
|
|
20771
|
+
return { emit: () => {
|
|
20772
|
+
}, on: () => () => {
|
|
20773
|
+
}, once: () => {
|
|
20774
|
+
} };
|
|
20775
|
+
}
|
|
20776
|
+
}
|
|
20777
|
+
var log5, lookStyles4, ButtonGroup;
|
|
20778
|
+
var init_ButtonGroup = __esm({
|
|
20779
|
+
"components/core/molecules/ButtonGroup.tsx"() {
|
|
20780
|
+
"use client";
|
|
20781
|
+
init_cn();
|
|
20782
|
+
init_atoms();
|
|
20783
|
+
init_useEventBus();
|
|
20784
|
+
log5 = createLogger("almadar:ui:button-group");
|
|
20785
|
+
lookStyles4 = {
|
|
20786
|
+
"right-aligned-buttons": "",
|
|
20787
|
+
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
20788
|
+
"inline-row": "gap-2 inline-flex",
|
|
20789
|
+
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
20790
|
+
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
20791
|
+
};
|
|
20792
|
+
ButtonGroup = ({
|
|
20793
|
+
children,
|
|
20794
|
+
primary,
|
|
20795
|
+
secondary,
|
|
20796
|
+
variant = "default",
|
|
20797
|
+
orientation = "horizontal",
|
|
20798
|
+
className,
|
|
20799
|
+
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
20800
|
+
entity: _entity,
|
|
20801
|
+
filters,
|
|
20802
|
+
look = "right-aligned-buttons"
|
|
20803
|
+
}) => {
|
|
20804
|
+
const eventBus = useSafeEventBus2();
|
|
20805
|
+
const variantClasses2 = {
|
|
20806
|
+
default: "gap-0",
|
|
20807
|
+
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",
|
|
20808
|
+
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"
|
|
20809
|
+
};
|
|
20810
|
+
const orientationClasses = {
|
|
20811
|
+
horizontal: "flex-row",
|
|
20812
|
+
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"
|
|
20813
|
+
};
|
|
20814
|
+
const handleActionClick = (action) => {
|
|
20815
|
+
if (action.event) {
|
|
20816
|
+
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
20817
|
+
}
|
|
20818
|
+
if (action.navigatesTo) {
|
|
20819
|
+
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
20820
|
+
}
|
|
20821
|
+
};
|
|
20822
|
+
const renderFormActions = () => {
|
|
20823
|
+
const buttons = [];
|
|
20824
|
+
if (secondary) {
|
|
20825
|
+
secondary.forEach((action, index) => {
|
|
20826
|
+
buttons.push(
|
|
20827
|
+
/* @__PURE__ */ jsx(
|
|
20828
|
+
Button,
|
|
20829
|
+
{
|
|
20830
|
+
type: action.actionType === "submit" ? "submit" : "button",
|
|
20831
|
+
variant: action.variant || "ghost",
|
|
20832
|
+
onClick: () => handleActionClick(action),
|
|
20833
|
+
children: action.label
|
|
20834
|
+
},
|
|
20835
|
+
`secondary-${index}`
|
|
20836
|
+
)
|
|
20837
|
+
);
|
|
20838
|
+
});
|
|
20839
|
+
}
|
|
20840
|
+
if (primary) {
|
|
20841
|
+
const isSubmit = primary.actionType === "submit";
|
|
20842
|
+
buttons.push(
|
|
20843
|
+
/* @__PURE__ */ jsx(
|
|
20844
|
+
Button,
|
|
20845
|
+
{
|
|
20846
|
+
type: isSubmit ? "submit" : "button",
|
|
20847
|
+
variant: primary.variant || "primary",
|
|
20848
|
+
onClick: () => handleActionClick(primary),
|
|
20849
|
+
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
20850
|
+
children: primary.label
|
|
20851
|
+
},
|
|
20852
|
+
"primary"
|
|
20853
|
+
)
|
|
20854
|
+
);
|
|
20855
|
+
}
|
|
20856
|
+
return buttons;
|
|
20857
|
+
};
|
|
20858
|
+
const renderFilters = () => {
|
|
20859
|
+
if (!filters || filters.length === 0) return null;
|
|
20860
|
+
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
20861
|
+
Button,
|
|
20862
|
+
{
|
|
20863
|
+
variant: "ghost",
|
|
20864
|
+
onClick: () => {
|
|
20865
|
+
log5.debug("Filter clicked", { field: filter.field });
|
|
20866
|
+
},
|
|
20867
|
+
children: filter.label
|
|
20868
|
+
},
|
|
20869
|
+
`filter-${filter.field}-${index}`
|
|
20870
|
+
));
|
|
20871
|
+
};
|
|
20872
|
+
return /* @__PURE__ */ jsx(
|
|
20873
|
+
"div",
|
|
20874
|
+
{
|
|
20875
|
+
className: cn(
|
|
20876
|
+
"inline-flex gap-2",
|
|
20877
|
+
variantClasses2[variant],
|
|
20878
|
+
orientationClasses[orientation],
|
|
20879
|
+
lookStyles4[look],
|
|
20880
|
+
className
|
|
20881
|
+
),
|
|
20882
|
+
role: "group",
|
|
20883
|
+
children: children || renderFilters() || renderFormActions()
|
|
20884
|
+
}
|
|
20885
|
+
);
|
|
20886
|
+
};
|
|
20887
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
20888
|
+
}
|
|
20889
|
+
});
|
|
20692
20890
|
function useSwipeGesture(callbacks, options = {}) {
|
|
20693
20891
|
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
20694
20892
|
const startX = useRef(0);
|
|
@@ -21498,7 +21696,7 @@ var init_CardGrid = __esm({
|
|
|
21498
21696
|
CardGrid.displayName = "CardGrid";
|
|
21499
21697
|
}
|
|
21500
21698
|
});
|
|
21501
|
-
function
|
|
21699
|
+
function useSafeEventBus3() {
|
|
21502
21700
|
try {
|
|
21503
21701
|
return useEventBus();
|
|
21504
21702
|
} catch {
|
|
@@ -21534,7 +21732,7 @@ var init_Carousel = __esm({
|
|
|
21534
21732
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
21535
21733
|
const scrollRef = useRef(null);
|
|
21536
21734
|
const autoPlayRef = useRef(null);
|
|
21537
|
-
const eventBus =
|
|
21735
|
+
const eventBus = useSafeEventBus3();
|
|
21538
21736
|
const { t } = useTranslate();
|
|
21539
21737
|
const safeItems = items ?? [];
|
|
21540
21738
|
const totalSlides = safeItems.length;
|
|
@@ -21896,7 +22094,7 @@ var init_Chart = __esm({
|
|
|
21896
22094
|
return /* @__PURE__ */ jsx(
|
|
21897
22095
|
Box,
|
|
21898
22096
|
{
|
|
21899
|
-
className: "h-full rounded-r-sm transition-all duration-
|
|
22097
|
+
className: "h-full rounded-r-sm transition-all duration-slow ease-standard min-w-[2px] cursor-pointer hover:opacity-80",
|
|
21900
22098
|
style: {
|
|
21901
22099
|
width: `${ratio}%`,
|
|
21902
22100
|
backgroundColor: color
|
|
@@ -21952,7 +22150,7 @@ var init_Chart = __esm({
|
|
|
21952
22150
|
Box,
|
|
21953
22151
|
{
|
|
21954
22152
|
className: cn(
|
|
21955
|
-
"rounded-t-sm transition-all duration-
|
|
22153
|
+
"rounded-t-sm transition-all duration-slow ease-standard min-h-[4px] cursor-pointer hover:opacity-80",
|
|
21956
22154
|
histogram ? "flex-1 mx-0" : "flex-1"
|
|
21957
22155
|
),
|
|
21958
22156
|
style: {
|
|
@@ -22002,7 +22200,7 @@ var init_Chart = __esm({
|
|
|
22002
22200
|
return /* @__PURE__ */ jsx(
|
|
22003
22201
|
Box,
|
|
22004
22202
|
{
|
|
22005
|
-
className: "w-full transition-all duration-
|
|
22203
|
+
className: "w-full transition-all duration-slow ease-standard cursor-pointer hover:opacity-80",
|
|
22006
22204
|
style: {
|
|
22007
22205
|
height: `${ratio}%`,
|
|
22008
22206
|
backgroundColor: color
|
|
@@ -22092,7 +22290,7 @@ var init_Chart = __esm({
|
|
|
22092
22290
|
fill: seg.color,
|
|
22093
22291
|
stroke: "var(--color-card)",
|
|
22094
22292
|
strokeWidth: "2",
|
|
22095
|
-
className: "transition-opacity duration-
|
|
22293
|
+
className: "transition-opacity duration-fast hover:opacity-80 cursor-pointer",
|
|
22096
22294
|
onClick: () => onPointClick?.(
|
|
22097
22295
|
{ label: seg.label, value: seg.value, color: seg.color },
|
|
22098
22296
|
"default"
|
|
@@ -24305,8 +24503,8 @@ var init_Menu = __esm({
|
|
|
24305
24503
|
"bottom-end": "bottom-start"
|
|
24306
24504
|
};
|
|
24307
24505
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
24308
|
-
const triggerChild =
|
|
24309
|
-
const triggerElement =
|
|
24506
|
+
const triggerChild = React91__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
24507
|
+
const triggerElement = React91__default.cloneElement(
|
|
24310
24508
|
triggerChild,
|
|
24311
24509
|
{
|
|
24312
24510
|
ref: triggerRef,
|
|
@@ -24401,14 +24599,14 @@ function useDataDnd(args) {
|
|
|
24401
24599
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
24402
24600
|
const enabled = isZone || Boolean(dndRoot);
|
|
24403
24601
|
const eventBus = useEventBus();
|
|
24404
|
-
const parentRoot =
|
|
24602
|
+
const parentRoot = React91__default.useContext(RootCtx);
|
|
24405
24603
|
const isRoot = enabled && parentRoot === null;
|
|
24406
|
-
const zoneId =
|
|
24604
|
+
const zoneId = React91__default.useId();
|
|
24407
24605
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
24408
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
24409
|
-
const optimisticOrdersRef =
|
|
24606
|
+
const [optimisticOrders, setOptimisticOrders] = React91__default.useState(() => /* @__PURE__ */ new Map());
|
|
24607
|
+
const optimisticOrdersRef = React91__default.useRef(optimisticOrders);
|
|
24410
24608
|
optimisticOrdersRef.current = optimisticOrders;
|
|
24411
|
-
const clearOptimisticOrder =
|
|
24609
|
+
const clearOptimisticOrder = React91__default.useCallback((group) => {
|
|
24412
24610
|
setOptimisticOrders((prev) => {
|
|
24413
24611
|
if (!prev.has(group)) return prev;
|
|
24414
24612
|
const next = new Map(prev);
|
|
@@ -24433,7 +24631,7 @@ function useDataDnd(args) {
|
|
|
24433
24631
|
const raw = it[dndItemIdField];
|
|
24434
24632
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
24435
24633
|
}).join("|");
|
|
24436
|
-
const itemIds =
|
|
24634
|
+
const itemIds = React91__default.useMemo(
|
|
24437
24635
|
() => orderedItems.map((it, idx) => {
|
|
24438
24636
|
const raw = it[dndItemIdField];
|
|
24439
24637
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -24444,7 +24642,7 @@ function useDataDnd(args) {
|
|
|
24444
24642
|
const raw = it[dndItemIdField];
|
|
24445
24643
|
return raw != null ? String(raw) : `__${idx}`;
|
|
24446
24644
|
}).join("|");
|
|
24447
|
-
|
|
24645
|
+
React91__default.useEffect(() => {
|
|
24448
24646
|
const root = isRoot ? null : parentRoot;
|
|
24449
24647
|
if (root) {
|
|
24450
24648
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -24452,20 +24650,20 @@ function useDataDnd(args) {
|
|
|
24452
24650
|
clearOptimisticOrder(ownGroup);
|
|
24453
24651
|
}
|
|
24454
24652
|
}, [itemsContentSig, ownGroup]);
|
|
24455
|
-
const zonesRef =
|
|
24456
|
-
const registerZone =
|
|
24653
|
+
const zonesRef = React91__default.useRef(/* @__PURE__ */ new Map());
|
|
24654
|
+
const registerZone = React91__default.useCallback((zoneId2, meta2) => {
|
|
24457
24655
|
zonesRef.current.set(zoneId2, meta2);
|
|
24458
24656
|
}, []);
|
|
24459
|
-
const unregisterZone =
|
|
24657
|
+
const unregisterZone = React91__default.useCallback((zoneId2) => {
|
|
24460
24658
|
zonesRef.current.delete(zoneId2);
|
|
24461
24659
|
}, []);
|
|
24462
|
-
const [activeDrag, setActiveDrag] =
|
|
24463
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
24464
|
-
const meta =
|
|
24660
|
+
const [activeDrag, setActiveDrag] = React91__default.useState(null);
|
|
24661
|
+
const [overZoneGroup, setOverZoneGroup] = React91__default.useState(null);
|
|
24662
|
+
const meta = React91__default.useMemo(
|
|
24465
24663
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
24466
24664
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
24467
24665
|
);
|
|
24468
|
-
|
|
24666
|
+
React91__default.useEffect(() => {
|
|
24469
24667
|
const target = isRoot ? null : parentRoot;
|
|
24470
24668
|
if (!target) {
|
|
24471
24669
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -24484,7 +24682,7 @@ function useDataDnd(args) {
|
|
|
24484
24682
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
24485
24683
|
const sensors = useAlmadarDndSensors(true);
|
|
24486
24684
|
const collisionDetection = almadarDndCollisionDetection;
|
|
24487
|
-
const findZoneByItem =
|
|
24685
|
+
const findZoneByItem = React91__default.useCallback(
|
|
24488
24686
|
(id) => {
|
|
24489
24687
|
for (const z of zonesRef.current.values()) {
|
|
24490
24688
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -24493,7 +24691,7 @@ function useDataDnd(args) {
|
|
|
24493
24691
|
},
|
|
24494
24692
|
[]
|
|
24495
24693
|
);
|
|
24496
|
-
|
|
24694
|
+
React91__default.useCallback(
|
|
24497
24695
|
(group) => {
|
|
24498
24696
|
for (const z of zonesRef.current.values()) {
|
|
24499
24697
|
if (z.group === group) return z;
|
|
@@ -24502,7 +24700,7 @@ function useDataDnd(args) {
|
|
|
24502
24700
|
},
|
|
24503
24701
|
[]
|
|
24504
24702
|
);
|
|
24505
|
-
const handleDragEnd =
|
|
24703
|
+
const handleDragEnd = React91__default.useCallback(
|
|
24506
24704
|
(event) => {
|
|
24507
24705
|
const { active, over } = event;
|
|
24508
24706
|
const activeIdStr = String(active.id);
|
|
@@ -24593,8 +24791,8 @@ function useDataDnd(args) {
|
|
|
24593
24791
|
},
|
|
24594
24792
|
[eventBus]
|
|
24595
24793
|
);
|
|
24596
|
-
const sortableData =
|
|
24597
|
-
const SortableItem =
|
|
24794
|
+
const sortableData = React91__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24795
|
+
const SortableItem = React91__default.useCallback(
|
|
24598
24796
|
({ id, children }) => {
|
|
24599
24797
|
const {
|
|
24600
24798
|
attributes,
|
|
@@ -24634,7 +24832,7 @@ function useDataDnd(args) {
|
|
|
24634
24832
|
id: droppableId,
|
|
24635
24833
|
data: sortableData
|
|
24636
24834
|
});
|
|
24637
|
-
const ctx =
|
|
24835
|
+
const ctx = React91__default.useContext(RootCtx);
|
|
24638
24836
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
24639
24837
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
24640
24838
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -24649,7 +24847,7 @@ function useDataDnd(args) {
|
|
|
24649
24847
|
showForeignPlaceholder,
|
|
24650
24848
|
ctxAvailable: ctx != null
|
|
24651
24849
|
});
|
|
24652
|
-
|
|
24850
|
+
React91__default.useEffect(() => {
|
|
24653
24851
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
24654
24852
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
24655
24853
|
return /* @__PURE__ */ jsx(
|
|
@@ -24663,11 +24861,11 @@ function useDataDnd(args) {
|
|
|
24663
24861
|
}
|
|
24664
24862
|
);
|
|
24665
24863
|
};
|
|
24666
|
-
const rootContextValue =
|
|
24864
|
+
const rootContextValue = React91__default.useMemo(
|
|
24667
24865
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
24668
24866
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
24669
24867
|
);
|
|
24670
|
-
const handleDragStart =
|
|
24868
|
+
const handleDragStart = React91__default.useCallback((event) => {
|
|
24671
24869
|
const sourceZone = findZoneByItem(event.active.id);
|
|
24672
24870
|
const rect = event.active.rect.current.initial;
|
|
24673
24871
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -24686,7 +24884,7 @@ function useDataDnd(args) {
|
|
|
24686
24884
|
isRoot
|
|
24687
24885
|
});
|
|
24688
24886
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
24689
|
-
const handleDragOver =
|
|
24887
|
+
const handleDragOver = React91__default.useCallback((event) => {
|
|
24690
24888
|
const { active, over } = event;
|
|
24691
24889
|
const overData = over?.data?.current;
|
|
24692
24890
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -24756,7 +24954,7 @@ function useDataDnd(args) {
|
|
|
24756
24954
|
return next;
|
|
24757
24955
|
});
|
|
24758
24956
|
}, []);
|
|
24759
|
-
const handleDragCancel =
|
|
24957
|
+
const handleDragCancel = React91__default.useCallback((event) => {
|
|
24760
24958
|
setActiveDrag(null);
|
|
24761
24959
|
setOverZoneGroup(null);
|
|
24762
24960
|
dndLog.warn("dragCancel", {
|
|
@@ -24764,12 +24962,12 @@ function useDataDnd(args) {
|
|
|
24764
24962
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
24765
24963
|
});
|
|
24766
24964
|
}, []);
|
|
24767
|
-
const handleDragEndWithCleanup =
|
|
24965
|
+
const handleDragEndWithCleanup = React91__default.useCallback((event) => {
|
|
24768
24966
|
handleDragEnd(event);
|
|
24769
24967
|
setActiveDrag(null);
|
|
24770
24968
|
setOverZoneGroup(null);
|
|
24771
24969
|
}, [handleDragEnd]);
|
|
24772
|
-
const wrapContainer =
|
|
24970
|
+
const wrapContainer = React91__default.useCallback(
|
|
24773
24971
|
(children) => {
|
|
24774
24972
|
if (!enabled) return children;
|
|
24775
24973
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24823,7 +25021,7 @@ var init_useDataDnd = __esm({
|
|
|
24823
25021
|
init_useAlmadarDndCollision();
|
|
24824
25022
|
init_Box();
|
|
24825
25023
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24826
|
-
RootCtx =
|
|
25024
|
+
RootCtx = React91__default.createContext(null);
|
|
24827
25025
|
}
|
|
24828
25026
|
});
|
|
24829
25027
|
function renderIconInput(icon, props) {
|
|
@@ -25020,7 +25218,7 @@ function DataGrid({
|
|
|
25020
25218
|
/* @__PURE__ */ jsx(
|
|
25021
25219
|
Box,
|
|
25022
25220
|
{
|
|
25023
|
-
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass,
|
|
25221
|
+
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles5[look], className),
|
|
25024
25222
|
style: scrollX ? { gridAutoFlow: "column", gridAutoColumns: `minmax(${minCardWidth}px, 1fr)` } : gridTemplateColumns ? { gridTemplateColumns } : void 0,
|
|
25025
25223
|
children: data.map((item, index) => {
|
|
25026
25224
|
const itemData = item;
|
|
@@ -25215,7 +25413,7 @@ function DataGrid({
|
|
|
25215
25413
|
] })
|
|
25216
25414
|
);
|
|
25217
25415
|
}
|
|
25218
|
-
var dataGridLog, BADGE_VARIANTS, gapStyles5,
|
|
25416
|
+
var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles5;
|
|
25219
25417
|
var init_DataGrid = __esm({
|
|
25220
25418
|
"components/core/molecules/DataGrid.tsx"() {
|
|
25221
25419
|
"use client";
|
|
@@ -25250,7 +25448,7 @@ var init_DataGrid = __esm({
|
|
|
25250
25448
|
lg: "gap-6",
|
|
25251
25449
|
xl: "gap-8"
|
|
25252
25450
|
};
|
|
25253
|
-
|
|
25451
|
+
lookStyles5 = {
|
|
25254
25452
|
dense: "gap-2 [&>*]:p-card-sm",
|
|
25255
25453
|
spacious: "gap-8 [&>*]:p-card-lg",
|
|
25256
25454
|
striped: "[&>*:nth-child(even)]:bg-muted/30",
|
|
@@ -25350,7 +25548,7 @@ function DataList({
|
|
|
25350
25548
|
}) {
|
|
25351
25549
|
const eventBus = useEventBus();
|
|
25352
25550
|
const { t } = useTranslate();
|
|
25353
|
-
const [visibleCount, setVisibleCount] =
|
|
25551
|
+
const [visibleCount, setVisibleCount] = React91__default.useState(pageSize || Infinity);
|
|
25354
25552
|
const fieldDefs = fields ?? columns ?? [];
|
|
25355
25553
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
25356
25554
|
const dnd = useDataDnd({
|
|
@@ -25369,7 +25567,7 @@ function DataList({
|
|
|
25369
25567
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
25370
25568
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
25371
25569
|
const hasRenderProp = typeof children === "function";
|
|
25372
|
-
|
|
25570
|
+
React91__default.useEffect(() => {
|
|
25373
25571
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
25374
25572
|
const childrenTypeOf = typeof children;
|
|
25375
25573
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -25473,7 +25671,7 @@ function DataList({
|
|
|
25473
25671
|
const items2 = [...data];
|
|
25474
25672
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
25475
25673
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
25476
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25674
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
25477
25675
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
25478
25676
|
group.items.map((itemData, index) => {
|
|
25479
25677
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -25614,7 +25812,7 @@ function DataList({
|
|
|
25614
25812
|
className
|
|
25615
25813
|
),
|
|
25616
25814
|
children: [
|
|
25617
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25815
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
25618
25816
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
25619
25817
|
group.items.map(
|
|
25620
25818
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -25699,7 +25897,7 @@ var init_FormSection = __esm({
|
|
|
25699
25897
|
columns = 1,
|
|
25700
25898
|
className
|
|
25701
25899
|
}) => {
|
|
25702
|
-
const [collapsed, setCollapsed] =
|
|
25900
|
+
const [collapsed, setCollapsed] = React91__default.useState(defaultCollapsed);
|
|
25703
25901
|
const { t } = useTranslate();
|
|
25704
25902
|
const eventBus = useEventBus();
|
|
25705
25903
|
const gridClass = {
|
|
@@ -25707,7 +25905,7 @@ var init_FormSection = __esm({
|
|
|
25707
25905
|
2: "grid-cols-1 md:grid-cols-2",
|
|
25708
25906
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
25709
25907
|
}[columns];
|
|
25710
|
-
|
|
25908
|
+
React91__default.useCallback(() => {
|
|
25711
25909
|
if (collapsible) {
|
|
25712
25910
|
setCollapsed((prev) => !prev);
|
|
25713
25911
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -25965,129 +26163,6 @@ var init_FormField = __esm({
|
|
|
25965
26163
|
FormField.displayName = "FormField";
|
|
25966
26164
|
}
|
|
25967
26165
|
});
|
|
25968
|
-
function useSafeEventBus3() {
|
|
25969
|
-
try {
|
|
25970
|
-
return useEventBus();
|
|
25971
|
-
} catch {
|
|
25972
|
-
return { emit: () => {
|
|
25973
|
-
}, on: () => () => {
|
|
25974
|
-
}, once: () => {
|
|
25975
|
-
} };
|
|
25976
|
-
}
|
|
25977
|
-
}
|
|
25978
|
-
var log5, lookStyles5, ButtonGroup;
|
|
25979
|
-
var init_ButtonGroup = __esm({
|
|
25980
|
-
"components/core/molecules/ButtonGroup.tsx"() {
|
|
25981
|
-
"use client";
|
|
25982
|
-
init_cn();
|
|
25983
|
-
init_atoms();
|
|
25984
|
-
init_useEventBus();
|
|
25985
|
-
log5 = createLogger("almadar:ui:button-group");
|
|
25986
|
-
lookStyles5 = {
|
|
25987
|
-
"right-aligned-buttons": "",
|
|
25988
|
-
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
25989
|
-
"inline-row": "gap-2 inline-flex",
|
|
25990
|
-
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
25991
|
-
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
25992
|
-
};
|
|
25993
|
-
ButtonGroup = ({
|
|
25994
|
-
children,
|
|
25995
|
-
primary,
|
|
25996
|
-
secondary,
|
|
25997
|
-
variant = "default",
|
|
25998
|
-
orientation = "horizontal",
|
|
25999
|
-
className,
|
|
26000
|
-
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
26001
|
-
entity: _entity,
|
|
26002
|
-
filters,
|
|
26003
|
-
look = "right-aligned-buttons"
|
|
26004
|
-
}) => {
|
|
26005
|
-
const eventBus = useSafeEventBus3();
|
|
26006
|
-
const variantClasses2 = {
|
|
26007
|
-
default: "gap-0",
|
|
26008
|
-
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",
|
|
26009
|
-
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"
|
|
26010
|
-
};
|
|
26011
|
-
const orientationClasses = {
|
|
26012
|
-
horizontal: "flex-row",
|
|
26013
|
-
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"
|
|
26014
|
-
};
|
|
26015
|
-
const handleActionClick = (action) => {
|
|
26016
|
-
if (action.event) {
|
|
26017
|
-
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
26018
|
-
}
|
|
26019
|
-
if (action.navigatesTo) {
|
|
26020
|
-
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
26021
|
-
}
|
|
26022
|
-
};
|
|
26023
|
-
const renderFormActions = () => {
|
|
26024
|
-
const buttons = [];
|
|
26025
|
-
if (secondary) {
|
|
26026
|
-
secondary.forEach((action, index) => {
|
|
26027
|
-
buttons.push(
|
|
26028
|
-
/* @__PURE__ */ jsx(
|
|
26029
|
-
Button,
|
|
26030
|
-
{
|
|
26031
|
-
type: action.actionType === "submit" ? "submit" : "button",
|
|
26032
|
-
variant: action.variant || "ghost",
|
|
26033
|
-
onClick: () => handleActionClick(action),
|
|
26034
|
-
children: action.label
|
|
26035
|
-
},
|
|
26036
|
-
`secondary-${index}`
|
|
26037
|
-
)
|
|
26038
|
-
);
|
|
26039
|
-
});
|
|
26040
|
-
}
|
|
26041
|
-
if (primary) {
|
|
26042
|
-
const isSubmit = primary.actionType === "submit";
|
|
26043
|
-
buttons.push(
|
|
26044
|
-
/* @__PURE__ */ jsx(
|
|
26045
|
-
Button,
|
|
26046
|
-
{
|
|
26047
|
-
type: isSubmit ? "submit" : "button",
|
|
26048
|
-
variant: primary.variant || "primary",
|
|
26049
|
-
onClick: () => handleActionClick(primary),
|
|
26050
|
-
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
26051
|
-
children: primary.label
|
|
26052
|
-
},
|
|
26053
|
-
"primary"
|
|
26054
|
-
)
|
|
26055
|
-
);
|
|
26056
|
-
}
|
|
26057
|
-
return buttons;
|
|
26058
|
-
};
|
|
26059
|
-
const renderFilters = () => {
|
|
26060
|
-
if (!filters || filters.length === 0) return null;
|
|
26061
|
-
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
26062
|
-
Button,
|
|
26063
|
-
{
|
|
26064
|
-
variant: "ghost",
|
|
26065
|
-
onClick: () => {
|
|
26066
|
-
log5.debug("Filter clicked", { field: filter.field });
|
|
26067
|
-
},
|
|
26068
|
-
children: filter.label
|
|
26069
|
-
},
|
|
26070
|
-
`filter-${filter.field}-${index}`
|
|
26071
|
-
));
|
|
26072
|
-
};
|
|
26073
|
-
return /* @__PURE__ */ jsx(
|
|
26074
|
-
"div",
|
|
26075
|
-
{
|
|
26076
|
-
className: cn(
|
|
26077
|
-
"inline-flex gap-2",
|
|
26078
|
-
variantClasses2[variant],
|
|
26079
|
-
orientationClasses[orientation],
|
|
26080
|
-
lookStyles5[look],
|
|
26081
|
-
className
|
|
26082
|
-
),
|
|
26083
|
-
role: "group",
|
|
26084
|
-
children: children || renderFilters() || renderFormActions()
|
|
26085
|
-
}
|
|
26086
|
-
);
|
|
26087
|
-
};
|
|
26088
|
-
ButtonGroup.displayName = "ButtonGroup";
|
|
26089
|
-
}
|
|
26090
|
-
});
|
|
26091
26166
|
function getOrCreateStore(query) {
|
|
26092
26167
|
if (!queryStores.has(query)) {
|
|
26093
26168
|
queryStores.set(query, {
|
|
@@ -26264,7 +26339,7 @@ var init_FilterGroup = __esm({
|
|
|
26264
26339
|
type: "button",
|
|
26265
26340
|
onClick: () => handleFilterSelect(filter.field, null),
|
|
26266
26341
|
className: cn(
|
|
26267
|
-
"px-3 py-1.5 text-sm font-medium transition-all duration-
|
|
26342
|
+
"px-3 py-1.5 text-sm font-medium transition-all duration-fast",
|
|
26268
26343
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
26269
26344
|
),
|
|
26270
26345
|
children: t("filterGroup.all")
|
|
@@ -26276,7 +26351,7 @@ var init_FilterGroup = __esm({
|
|
|
26276
26351
|
type: "button",
|
|
26277
26352
|
onClick: () => handleFilterSelect(filter.field, option),
|
|
26278
26353
|
className: cn(
|
|
26279
|
-
"px-3 py-1.5 text-sm font-medium transition-all duration-
|
|
26354
|
+
"px-3 py-1.5 text-sm font-medium transition-all duration-fast",
|
|
26280
26355
|
"border-l-[length:var(--border-width)] border-border",
|
|
26281
26356
|
selectedValues[filter.field] === option ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
26282
26357
|
),
|
|
@@ -26657,7 +26732,7 @@ var init_Flex = __esm({
|
|
|
26657
26732
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
26658
26733
|
}
|
|
26659
26734
|
}
|
|
26660
|
-
return
|
|
26735
|
+
return React91__default.createElement(Component, {
|
|
26661
26736
|
className: cn(
|
|
26662
26737
|
inline ? "inline-flex" : "flex",
|
|
26663
26738
|
directionStyles[direction],
|
|
@@ -26776,7 +26851,7 @@ var init_Grid = __esm({
|
|
|
26776
26851
|
as: Component = "div"
|
|
26777
26852
|
}) => {
|
|
26778
26853
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
26779
|
-
return
|
|
26854
|
+
return React91__default.createElement(
|
|
26780
26855
|
Component,
|
|
26781
26856
|
{
|
|
26782
26857
|
className: cn(
|
|
@@ -26887,6 +26962,7 @@ var init_Popover = __esm({
|
|
|
26887
26962
|
"components/core/molecules/Popover.tsx"() {
|
|
26888
26963
|
"use client";
|
|
26889
26964
|
init_Typography();
|
|
26965
|
+
init_Presence();
|
|
26890
26966
|
init_cn();
|
|
26891
26967
|
init_useTapReveal();
|
|
26892
26968
|
arrowClasses = {
|
|
@@ -26910,6 +26986,7 @@ var init_Popover = __esm({
|
|
|
26910
26986
|
const [popoverWidth, setPopoverWidth] = useState(0);
|
|
26911
26987
|
const triggerRef = useRef(null);
|
|
26912
26988
|
const popoverRef = useRef(null);
|
|
26989
|
+
const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "popover" });
|
|
26913
26990
|
const updatePosition = () => {
|
|
26914
26991
|
if (triggerRef.current) {
|
|
26915
26992
|
setTriggerRect(triggerRef.current.getBoundingClientRect());
|
|
@@ -26935,10 +27012,11 @@ var init_Popover = __esm({
|
|
|
26935
27012
|
useEffect(() => {
|
|
26936
27013
|
if (isOpen) {
|
|
26937
27014
|
updatePosition();
|
|
26938
|
-
} else {
|
|
26939
|
-
setPopoverWidth(0);
|
|
26940
27015
|
}
|
|
26941
27016
|
}, [isOpen]);
|
|
27017
|
+
useEffect(() => {
|
|
27018
|
+
if (!mounted) setPopoverWidth(0);
|
|
27019
|
+
}, [mounted]);
|
|
26942
27020
|
useLayoutEffect(() => {
|
|
26943
27021
|
if (isOpen && popoverRef.current) {
|
|
26944
27022
|
const measured = popoverRef.current.offsetWidth;
|
|
@@ -26972,9 +27050,9 @@ var init_Popover = __esm({
|
|
|
26972
27050
|
onMouseLeave: handleClose,
|
|
26973
27051
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26974
27052
|
};
|
|
26975
|
-
const childElement =
|
|
27053
|
+
const childElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26976
27054
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26977
|
-
const triggerElement =
|
|
27055
|
+
const triggerElement = React91__default.cloneElement(
|
|
26978
27056
|
childElement,
|
|
26979
27057
|
{
|
|
26980
27058
|
ref: triggerRef,
|
|
@@ -26987,13 +27065,14 @@ var init_Popover = __esm({
|
|
|
26987
27065
|
} : void 0
|
|
26988
27066
|
}
|
|
26989
27067
|
);
|
|
26990
|
-
const panel =
|
|
27068
|
+
const panel = mounted && triggerRect ? /* @__PURE__ */ jsxs(
|
|
26991
27069
|
"div",
|
|
26992
27070
|
{
|
|
26993
27071
|
ref: popoverRef,
|
|
26994
27072
|
className: cn(
|
|
26995
27073
|
"fixed z-50 p-4",
|
|
26996
27074
|
"bg-card border-2 border-border shadow-elevation-popover",
|
|
27075
|
+
panelAnim,
|
|
26997
27076
|
className
|
|
26998
27077
|
),
|
|
26999
27078
|
style: {
|
|
@@ -27001,6 +27080,7 @@ var init_Popover = __esm({
|
|
|
27001
27080
|
...popoverWidth === 0 ? { visibility: "hidden" } : void 0
|
|
27002
27081
|
},
|
|
27003
27082
|
role: "dialog",
|
|
27083
|
+
onAnimationEnd,
|
|
27004
27084
|
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
27005
27085
|
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
27006
27086
|
children: [
|
|
@@ -27414,6 +27494,7 @@ var init_SidePanel = __esm({
|
|
|
27414
27494
|
init_Box();
|
|
27415
27495
|
init_Button();
|
|
27416
27496
|
init_Typography();
|
|
27497
|
+
init_Presence();
|
|
27417
27498
|
init_cn();
|
|
27418
27499
|
init_useEventBus();
|
|
27419
27500
|
SidePanel = ({
|
|
@@ -27433,15 +27514,17 @@ var init_SidePanel = __esm({
|
|
|
27433
27514
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
27434
27515
|
onClose();
|
|
27435
27516
|
};
|
|
27436
|
-
|
|
27517
|
+
const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
|
|
27518
|
+
const drawerSign = position === "right" ? 1 : -1;
|
|
27519
|
+
if (!mounted) return null;
|
|
27437
27520
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27438
|
-
showOverlay && /* @__PURE__ */ jsx(
|
|
27521
|
+
showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
|
|
27439
27522
|
Box,
|
|
27440
27523
|
{
|
|
27441
27524
|
className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
|
|
27442
27525
|
onClick: handleClose
|
|
27443
27526
|
}
|
|
27444
|
-
),
|
|
27527
|
+
) }),
|
|
27445
27528
|
/* @__PURE__ */ jsxs(
|
|
27446
27529
|
Aside,
|
|
27447
27530
|
{
|
|
@@ -27451,11 +27534,13 @@ var init_SidePanel = __esm({
|
|
|
27451
27534
|
"border-l-2 border-border",
|
|
27452
27535
|
position === "left" && "border-l-0 border-r-2",
|
|
27453
27536
|
"flex flex-col",
|
|
27454
|
-
|
|
27537
|
+
panelAnim,
|
|
27455
27538
|
width,
|
|
27456
27539
|
position === "right" ? "right-0" : "left-0",
|
|
27457
27540
|
className
|
|
27458
27541
|
),
|
|
27542
|
+
style: { "--motion-drawer-sign": drawerSign },
|
|
27543
|
+
onAnimationEnd,
|
|
27459
27544
|
children: [
|
|
27460
27545
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
|
|
27461
27546
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
|
|
@@ -27576,9 +27661,9 @@ var init_Tooltip = __esm({
|
|
|
27576
27661
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
27577
27662
|
};
|
|
27578
27663
|
}, []);
|
|
27579
|
-
const triggerElement =
|
|
27664
|
+
const triggerElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27580
27665
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
27581
|
-
const trigger =
|
|
27666
|
+
const trigger = React91__default.cloneElement(triggerElement, {
|
|
27582
27667
|
ref: triggerRef,
|
|
27583
27668
|
onMouseEnter: handleMouseEnter,
|
|
27584
27669
|
onMouseLeave: handleMouseLeave,
|
|
@@ -27668,7 +27753,7 @@ var init_WizardProgress = __esm({
|
|
|
27668
27753
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
27669
27754
|
const isActive = index === currentStep;
|
|
27670
27755
|
const isCompleted = index < currentStep;
|
|
27671
|
-
return /* @__PURE__ */ jsxs(
|
|
27756
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
27672
27757
|
/* @__PURE__ */ jsx(
|
|
27673
27758
|
"button",
|
|
27674
27759
|
{
|
|
@@ -28219,7 +28304,7 @@ var init_FormSectionHeader = __esm({
|
|
|
28219
28304
|
name: "chevron-down",
|
|
28220
28305
|
size: "sm",
|
|
28221
28306
|
className: cn(
|
|
28222
|
-
"text-muted-foreground transition-transform duration-
|
|
28307
|
+
"text-muted-foreground transition-transform duration-fast shrink-0",
|
|
28223
28308
|
isCollapsed && "-rotate-90"
|
|
28224
28309
|
)
|
|
28225
28310
|
}
|
|
@@ -29229,13 +29314,13 @@ var init_MapView = __esm({
|
|
|
29229
29314
|
shadowSize: [41, 41]
|
|
29230
29315
|
});
|
|
29231
29316
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
29232
|
-
const { useEffect:
|
|
29317
|
+
const { useEffect: useEffect63, useRef: useRef61, useCallback: useCallback93, useState: useState97 } = React91__default;
|
|
29233
29318
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
29234
29319
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
29235
29320
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
29236
29321
|
const map = useMap();
|
|
29237
|
-
const prevRef =
|
|
29238
|
-
|
|
29322
|
+
const prevRef = useRef61({ centerLat, centerLng, zoom });
|
|
29323
|
+
useEffect63(() => {
|
|
29239
29324
|
const prev = prevRef.current;
|
|
29240
29325
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
29241
29326
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -29246,7 +29331,7 @@ var init_MapView = __esm({
|
|
|
29246
29331
|
}
|
|
29247
29332
|
function MapClickHandler({ onMapClick }) {
|
|
29248
29333
|
const map = useMap();
|
|
29249
|
-
|
|
29334
|
+
useEffect63(() => {
|
|
29250
29335
|
if (!onMapClick) return;
|
|
29251
29336
|
const handler = (e) => {
|
|
29252
29337
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -29274,8 +29359,8 @@ var init_MapView = __esm({
|
|
|
29274
29359
|
showAttribution = true
|
|
29275
29360
|
}) {
|
|
29276
29361
|
const eventBus = useEventBus2();
|
|
29277
|
-
const [clickedPosition, setClickedPosition] =
|
|
29278
|
-
const handleMapClick =
|
|
29362
|
+
const [clickedPosition, setClickedPosition] = useState97(null);
|
|
29363
|
+
const handleMapClick = useCallback93((lat, lng) => {
|
|
29279
29364
|
if (showClickedPin) {
|
|
29280
29365
|
setClickedPosition({ lat, lng });
|
|
29281
29366
|
}
|
|
@@ -29284,7 +29369,7 @@ var init_MapView = __esm({
|
|
|
29284
29369
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
29285
29370
|
}
|
|
29286
29371
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
29287
|
-
const handleMarkerClick =
|
|
29372
|
+
const handleMarkerClick = useCallback93((marker) => {
|
|
29288
29373
|
onMarkerClick?.(marker);
|
|
29289
29374
|
if (markerClickEvent) {
|
|
29290
29375
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -29484,7 +29569,7 @@ var init_NumberStepper = __esm({
|
|
|
29484
29569
|
"text-foreground",
|
|
29485
29570
|
"hover:bg-muted",
|
|
29486
29571
|
"active:bg-muted",
|
|
29487
|
-
"transition-colors duration-
|
|
29572
|
+
"transition-colors duration-instant",
|
|
29488
29573
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
29489
29574
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
29490
29575
|
styles.button
|
|
@@ -29525,7 +29610,7 @@ var init_NumberStepper = __esm({
|
|
|
29525
29610
|
"text-foreground",
|
|
29526
29611
|
"hover:bg-muted",
|
|
29527
29612
|
"active:bg-muted",
|
|
29528
|
-
"transition-colors duration-
|
|
29613
|
+
"transition-colors duration-instant",
|
|
29529
29614
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
29530
29615
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
29531
29616
|
styles.button
|
|
@@ -29649,7 +29734,7 @@ var init_StarRating = __esm({
|
|
|
29649
29734
|
className: cn(
|
|
29650
29735
|
styles.star,
|
|
29651
29736
|
"text-foreground/30",
|
|
29652
|
-
"transition-colors duration-
|
|
29737
|
+
"transition-colors duration-instant"
|
|
29653
29738
|
),
|
|
29654
29739
|
strokeWidth: 1.5
|
|
29655
29740
|
}
|
|
@@ -29662,7 +29747,7 @@ var init_StarRating = __esm({
|
|
|
29662
29747
|
styles.star,
|
|
29663
29748
|
"absolute inset-0",
|
|
29664
29749
|
"text-warning fill-warning",
|
|
29665
|
-
"transition-colors duration-
|
|
29750
|
+
"transition-colors duration-instant"
|
|
29666
29751
|
),
|
|
29667
29752
|
strokeWidth: 1.5,
|
|
29668
29753
|
style: isHalf ? { clipPath: "inset(0 50% 0 0)" } : void 0
|
|
@@ -29817,7 +29902,7 @@ var init_UploadDropZone = __esm({
|
|
|
29817
29902
|
"relative flex flex-col items-center justify-center",
|
|
29818
29903
|
"p-8 rounded-sm",
|
|
29819
29904
|
"border-2 border-dashed",
|
|
29820
|
-
"transition-colors duration-
|
|
29905
|
+
"transition-colors duration-fast",
|
|
29821
29906
|
"cursor-pointer",
|
|
29822
29907
|
isDragOver ? "border-primary bg-primary bg-opacity-5" : "border-border bg-surface",
|
|
29823
29908
|
error && "border-error",
|
|
@@ -30144,8 +30229,8 @@ function TableView({
|
|
|
30144
30229
|
}) {
|
|
30145
30230
|
const eventBus = useEventBus();
|
|
30146
30231
|
const { t } = useTranslate();
|
|
30147
|
-
const [visibleCount, setVisibleCount] =
|
|
30148
|
-
const [localSelected, setLocalSelected] =
|
|
30232
|
+
const [visibleCount, setVisibleCount] = React91__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
30233
|
+
const [localSelected, setLocalSelected] = React91__default.useState(/* @__PURE__ */ new Set());
|
|
30149
30234
|
const colDefs = columns ?? fields ?? [];
|
|
30150
30235
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
30151
30236
|
const dnd = useDataDnd({
|
|
@@ -30225,7 +30310,7 @@ function TableView({
|
|
|
30225
30310
|
className: cn(
|
|
30226
30311
|
"grid items-center gap-3 sticky top-0 z-10",
|
|
30227
30312
|
"bg-[var(--color-surface-subtle)] border-b border-[var(--color-border)]",
|
|
30228
|
-
"text-
|
|
30313
|
+
"text-muted-foreground uppercase text-xs font-semibold tracking-wide",
|
|
30229
30314
|
lk.headPad
|
|
30230
30315
|
),
|
|
30231
30316
|
children: [
|
|
@@ -30340,12 +30425,12 @@ function TableView({
|
|
|
30340
30425
|
]
|
|
30341
30426
|
}
|
|
30342
30427
|
);
|
|
30343
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
30428
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React91__default.Fragment, { children: rowInner }, id);
|
|
30344
30429
|
};
|
|
30345
30430
|
const items = Array.from(data);
|
|
30346
30431
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
30347
30432
|
let runningIndex = 0;
|
|
30348
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
30433
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
30349
30434
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
30350
30435
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
30351
30436
|
] }, gi)) });
|
|
@@ -31081,7 +31166,7 @@ function SortableListInner({
|
|
|
31081
31166
|
"flex items-center justify-center",
|
|
31082
31167
|
"text-muted-foreground",
|
|
31083
31168
|
"hover:text-foreground",
|
|
31084
|
-
"transition-colors duration-
|
|
31169
|
+
"transition-colors duration-instant",
|
|
31085
31170
|
"px-1"
|
|
31086
31171
|
),
|
|
31087
31172
|
"aria-grabbed": ariaGrabbed,
|
|
@@ -31108,7 +31193,7 @@ function SortableListInner({
|
|
|
31108
31193
|
gap: "sm",
|
|
31109
31194
|
align: "center",
|
|
31110
31195
|
className: cn(
|
|
31111
|
-
"transition-opacity duration-
|
|
31196
|
+
"transition-opacity duration-fast",
|
|
31112
31197
|
isBeingDragged && "opacity-50"
|
|
31113
31198
|
),
|
|
31114
31199
|
children: [
|
|
@@ -31280,7 +31365,7 @@ var init_PullToRefresh = __esm({
|
|
|
31280
31365
|
children: /* @__PURE__ */ jsx(
|
|
31281
31366
|
Box,
|
|
31282
31367
|
{
|
|
31283
|
-
className: "transition-transform duration-
|
|
31368
|
+
className: "transition-transform duration-fast",
|
|
31284
31369
|
style: {
|
|
31285
31370
|
transform: `scale(${isRefreshing ? 1 : pullProgress})`,
|
|
31286
31371
|
opacity: isRefreshing ? 1 : pullProgress
|
|
@@ -31702,7 +31787,7 @@ var init_StepFlow = __esm({
|
|
|
31702
31787
|
className
|
|
31703
31788
|
}) => {
|
|
31704
31789
|
if (orientation === "vertical") {
|
|
31705
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
31790
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React91__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
31706
31791
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
31707
31792
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31708
31793
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -31713,7 +31798,7 @@ var init_StepFlow = __esm({
|
|
|
31713
31798
|
] })
|
|
31714
31799
|
] }) }, index)) });
|
|
31715
31800
|
}
|
|
31716
|
-
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(
|
|
31801
|
+
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(React91__default.Fragment, { children: [
|
|
31717
31802
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
31718
31803
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31719
31804
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -32619,7 +32704,7 @@ var init_VoteStack = __esm({
|
|
|
32619
32704
|
isUp ? "text-primary" : "text-muted-foreground",
|
|
32620
32705
|
"hover:bg-muted",
|
|
32621
32706
|
"active:bg-muted",
|
|
32622
|
-
"transition-colors duration-
|
|
32707
|
+
"transition-colors duration-instant",
|
|
32623
32708
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
32624
32709
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
32625
32710
|
styles.button
|
|
@@ -32656,7 +32741,7 @@ var init_VoteStack = __esm({
|
|
|
32656
32741
|
isDown ? "text-primary" : "text-muted-foreground",
|
|
32657
32742
|
"hover:bg-muted",
|
|
32658
32743
|
"active:bg-muted",
|
|
32659
|
-
"transition-colors duration-
|
|
32744
|
+
"transition-colors duration-instant",
|
|
32660
32745
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
32661
32746
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
32662
32747
|
styles.button
|
|
@@ -32703,7 +32788,7 @@ var init_LikertScale = __esm({
|
|
|
32703
32788
|
md: "text-base",
|
|
32704
32789
|
lg: "text-lg"
|
|
32705
32790
|
};
|
|
32706
|
-
LikertScale =
|
|
32791
|
+
LikertScale = React91__default.forwardRef(
|
|
32707
32792
|
({
|
|
32708
32793
|
question,
|
|
32709
32794
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -32715,7 +32800,7 @@ var init_LikertScale = __esm({
|
|
|
32715
32800
|
variant = "radios",
|
|
32716
32801
|
className
|
|
32717
32802
|
}, ref) => {
|
|
32718
|
-
const groupId =
|
|
32803
|
+
const groupId = React91__default.useId();
|
|
32719
32804
|
const eventBus = useEventBus();
|
|
32720
32805
|
const handleSelect = useCallback(
|
|
32721
32806
|
(next) => {
|
|
@@ -32768,7 +32853,7 @@ var init_LikertScale = __esm({
|
|
|
32768
32853
|
disabled,
|
|
32769
32854
|
onClick: () => handleSelect(opt.value),
|
|
32770
32855
|
className: cn(
|
|
32771
|
-
"flex-1 text-center font-medium transition-colors duration-
|
|
32856
|
+
"flex-1 text-center font-medium transition-colors duration-instant",
|
|
32772
32857
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
32773
32858
|
"disabled:cursor-not-allowed",
|
|
32774
32859
|
"rounded-none gap-0 shadow-none border-none",
|
|
@@ -34997,7 +35082,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
34997
35082
|
"aria-label": t("aria.breadcrumb"),
|
|
34998
35083
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
34999
35084
|
const isLast = idx === items.length - 1;
|
|
35000
|
-
return /* @__PURE__ */ jsxs(
|
|
35085
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
35001
35086
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
35002
35087
|
Icon,
|
|
35003
35088
|
{
|
|
@@ -35661,7 +35746,7 @@ var init_PageHeader = __esm({
|
|
|
35661
35746
|
info: "bg-info/10 text-info"
|
|
35662
35747
|
};
|
|
35663
35748
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35664
|
-
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(
|
|
35749
|
+
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(React91__default.Fragment, { children: [
|
|
35665
35750
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35666
35751
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35667
35752
|
"a",
|
|
@@ -36019,7 +36104,7 @@ var init_Section = __esm({
|
|
|
36019
36104
|
as: Component = "section"
|
|
36020
36105
|
}) => {
|
|
36021
36106
|
const hasHeader = title || description || action;
|
|
36022
|
-
return
|
|
36107
|
+
return React91__default.createElement(
|
|
36023
36108
|
Component,
|
|
36024
36109
|
{
|
|
36025
36110
|
className: cn(
|
|
@@ -36086,7 +36171,7 @@ var init_Sidebar = __esm({
|
|
|
36086
36171
|
variant: "ghost",
|
|
36087
36172
|
onClick: item.onClick,
|
|
36088
36173
|
className: cn(
|
|
36089
|
-
"w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-
|
|
36174
|
+
"w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-fast group relative",
|
|
36090
36175
|
"rounded-sm border-[length:var(--border-width-thin)] border-transparent",
|
|
36091
36176
|
isActive ? [
|
|
36092
36177
|
"bg-primary text-primary-foreground",
|
|
@@ -36160,7 +36245,7 @@ var init_Sidebar = __esm({
|
|
|
36160
36245
|
className: cn(
|
|
36161
36246
|
"flex flex-col h-full",
|
|
36162
36247
|
"bg-card border-e border-border",
|
|
36163
|
-
"transition-all duration-
|
|
36248
|
+
"transition-all duration-normal ease-standard",
|
|
36164
36249
|
collapsed ? "w-20" : "w-64",
|
|
36165
36250
|
className
|
|
36166
36251
|
),
|
|
@@ -36393,7 +36478,7 @@ var init_WizardContainer = __esm({
|
|
|
36393
36478
|
const isCompleted = index < currentStep;
|
|
36394
36479
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36395
36480
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36396
|
-
return /* @__PURE__ */ jsxs(
|
|
36481
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
36397
36482
|
/* @__PURE__ */ jsx(
|
|
36398
36483
|
Button,
|
|
36399
36484
|
{
|
|
@@ -38996,7 +39081,7 @@ var init_DetailPanel = __esm({
|
|
|
38996
39081
|
}
|
|
38997
39082
|
});
|
|
38998
39083
|
function extractTitle(children) {
|
|
38999
|
-
if (!
|
|
39084
|
+
if (!React91__default.isValidElement(children)) return void 0;
|
|
39000
39085
|
const props = children.props;
|
|
39001
39086
|
if (typeof props.title === "string") {
|
|
39002
39087
|
return props.title;
|
|
@@ -39346,12 +39431,12 @@ var init_Form = __esm({
|
|
|
39346
39431
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
39347
39432
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
39348
39433
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
39349
|
-
const normalizedInitialData =
|
|
39434
|
+
const normalizedInitialData = React91__default.useMemo(() => {
|
|
39350
39435
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
39351
39436
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
39352
39437
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
39353
39438
|
}, [entity, initialData]);
|
|
39354
|
-
const entityDerivedFields =
|
|
39439
|
+
const entityDerivedFields = React91__default.useMemo(() => {
|
|
39355
39440
|
if (fields && fields.length > 0) return void 0;
|
|
39356
39441
|
if (!resolvedEntity) return void 0;
|
|
39357
39442
|
return resolvedEntity.fields.map(
|
|
@@ -39372,16 +39457,16 @@ var init_Form = __esm({
|
|
|
39372
39457
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
39373
39458
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
39374
39459
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
39375
|
-
const [formData, setFormData] =
|
|
39460
|
+
const [formData, setFormData] = React91__default.useState(
|
|
39376
39461
|
normalizedInitialData
|
|
39377
39462
|
);
|
|
39378
|
-
const [collapsedSections, setCollapsedSections] =
|
|
39463
|
+
const [collapsedSections, setCollapsedSections] = React91__default.useState(
|
|
39379
39464
|
/* @__PURE__ */ new Set()
|
|
39380
39465
|
);
|
|
39381
|
-
const [submitError, setSubmitError] =
|
|
39382
|
-
const formRef =
|
|
39466
|
+
const [submitError, setSubmitError] = React91__default.useState(null);
|
|
39467
|
+
const formRef = React91__default.useRef(null);
|
|
39383
39468
|
const formMode = props.mode;
|
|
39384
|
-
const mountedRef =
|
|
39469
|
+
const mountedRef = React91__default.useRef(false);
|
|
39385
39470
|
if (!mountedRef.current) {
|
|
39386
39471
|
mountedRef.current = true;
|
|
39387
39472
|
debug("forms", "mount", {
|
|
@@ -39394,7 +39479,7 @@ var init_Form = __esm({
|
|
|
39394
39479
|
});
|
|
39395
39480
|
}
|
|
39396
39481
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
39397
|
-
const evalContext =
|
|
39482
|
+
const evalContext = React91__default.useMemo(
|
|
39398
39483
|
() => ({
|
|
39399
39484
|
formValues: formData,
|
|
39400
39485
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -39403,7 +39488,7 @@ var init_Form = __esm({
|
|
|
39403
39488
|
}),
|
|
39404
39489
|
[formData, externalContext]
|
|
39405
39490
|
);
|
|
39406
|
-
|
|
39491
|
+
React91__default.useEffect(() => {
|
|
39407
39492
|
debug("forms", "initialData-sync", {
|
|
39408
39493
|
mode: formMode,
|
|
39409
39494
|
normalizedInitialData,
|
|
@@ -39414,7 +39499,7 @@ var init_Form = __esm({
|
|
|
39414
39499
|
setFormData(normalizedInitialData);
|
|
39415
39500
|
}
|
|
39416
39501
|
}, [normalizedInitialData]);
|
|
39417
|
-
const processCalculations =
|
|
39502
|
+
const processCalculations = React91__default.useCallback(
|
|
39418
39503
|
(changedFieldId, newFormData) => {
|
|
39419
39504
|
if (!hiddenCalculations.length) return;
|
|
39420
39505
|
const context = {
|
|
@@ -39439,7 +39524,7 @@ var init_Form = __esm({
|
|
|
39439
39524
|
},
|
|
39440
39525
|
[hiddenCalculations, externalContext, eventBus]
|
|
39441
39526
|
);
|
|
39442
|
-
const checkViolations =
|
|
39527
|
+
const checkViolations = React91__default.useCallback(
|
|
39443
39528
|
(changedFieldId, newFormData) => {
|
|
39444
39529
|
if (!violationTriggers.length) return;
|
|
39445
39530
|
const context = {
|
|
@@ -39477,7 +39562,7 @@ var init_Form = __esm({
|
|
|
39477
39562
|
processCalculations(name, newFormData);
|
|
39478
39563
|
checkViolations(name, newFormData);
|
|
39479
39564
|
};
|
|
39480
|
-
const isFieldVisible =
|
|
39565
|
+
const isFieldVisible = React91__default.useCallback(
|
|
39481
39566
|
(fieldName) => {
|
|
39482
39567
|
const condition = conditionalFields[fieldName];
|
|
39483
39568
|
if (!condition) return true;
|
|
@@ -39485,7 +39570,7 @@ var init_Form = __esm({
|
|
|
39485
39570
|
},
|
|
39486
39571
|
[conditionalFields, evalContext]
|
|
39487
39572
|
);
|
|
39488
|
-
const isSectionVisible =
|
|
39573
|
+
const isSectionVisible = React91__default.useCallback(
|
|
39489
39574
|
(section) => {
|
|
39490
39575
|
if (!section.condition) return true;
|
|
39491
39576
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -39561,7 +39646,7 @@ var init_Form = __esm({
|
|
|
39561
39646
|
eventBus.emit(`UI:${onCancel}`);
|
|
39562
39647
|
}
|
|
39563
39648
|
};
|
|
39564
|
-
const renderField =
|
|
39649
|
+
const renderField = React91__default.useCallback(
|
|
39565
39650
|
(field) => {
|
|
39566
39651
|
const fieldName = field.name || field.field;
|
|
39567
39652
|
if (!fieldName) return null;
|
|
@@ -39582,7 +39667,7 @@ var init_Form = __esm({
|
|
|
39582
39667
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
39583
39668
|
);
|
|
39584
39669
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
39585
|
-
const normalizedFields =
|
|
39670
|
+
const normalizedFields = React91__default.useMemo(() => {
|
|
39586
39671
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
39587
39672
|
return effectiveFields.map((field) => {
|
|
39588
39673
|
if (typeof field === "string") {
|
|
@@ -39606,7 +39691,7 @@ var init_Form = __esm({
|
|
|
39606
39691
|
return field;
|
|
39607
39692
|
});
|
|
39608
39693
|
}, [effectiveFields, resolvedEntity]);
|
|
39609
|
-
const schemaFields =
|
|
39694
|
+
const schemaFields = React91__default.useMemo(() => {
|
|
39610
39695
|
if (normalizedFields.length === 0) return null;
|
|
39611
39696
|
if (isDebugEnabled()) {
|
|
39612
39697
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -39616,7 +39701,7 @@ var init_Form = __esm({
|
|
|
39616
39701
|
}
|
|
39617
39702
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
39618
39703
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
39619
|
-
const sectionElements =
|
|
39704
|
+
const sectionElements = React91__default.useMemo(() => {
|
|
39620
39705
|
if (!sections || sections.length === 0) return null;
|
|
39621
39706
|
return sections.map((section) => {
|
|
39622
39707
|
if (!isSectionVisible(section)) {
|
|
@@ -40299,7 +40384,7 @@ var init_List = __esm({
|
|
|
40299
40384
|
Box,
|
|
40300
40385
|
{
|
|
40301
40386
|
className: cn(
|
|
40302
|
-
"h-full rounded-full transition-all duration-
|
|
40387
|
+
"h-full rounded-full transition-all duration-slow",
|
|
40303
40388
|
clampedValue >= 100 ? "bg-success" : clampedValue >= 70 ? "bg-info" : clampedValue >= 40 ? "bg-warning" : "bg-muted-foreground"
|
|
40304
40389
|
),
|
|
40305
40390
|
style: { width: `${clampedValue}%` }
|
|
@@ -40341,7 +40426,7 @@ var init_List = __esm({
|
|
|
40341
40426
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
40342
40427
|
return [];
|
|
40343
40428
|
}, [entity]);
|
|
40344
|
-
const getItemActions =
|
|
40429
|
+
const getItemActions = React91__default.useCallback(
|
|
40345
40430
|
(item) => {
|
|
40346
40431
|
if (!itemActions) return [];
|
|
40347
40432
|
if (typeof itemActions === "function") {
|
|
@@ -40468,7 +40553,7 @@ var init_List = __esm({
|
|
|
40468
40553
|
{
|
|
40469
40554
|
className: cn(
|
|
40470
40555
|
"group flex items-center gap-5 px-6 py-5",
|
|
40471
|
-
"transition-all duration-
|
|
40556
|
+
"transition-all duration-normal ease-standard",
|
|
40472
40557
|
hasExplicitClick && "cursor-pointer",
|
|
40473
40558
|
// Hover state
|
|
40474
40559
|
"hover:bg-muted/80",
|
|
@@ -40575,7 +40660,7 @@ var init_List = __esm({
|
|
|
40575
40660
|
variant: "ghost",
|
|
40576
40661
|
action: editAction.event,
|
|
40577
40662
|
className: cn(
|
|
40578
|
-
"p-2 rounded-lg transition-all duration-
|
|
40663
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
40579
40664
|
"hover:bg-primary/10 hover:text-primary",
|
|
40580
40665
|
"text-muted-foreground",
|
|
40581
40666
|
"active:scale-95"
|
|
@@ -40591,7 +40676,7 @@ var init_List = __esm({
|
|
|
40591
40676
|
variant: "ghost",
|
|
40592
40677
|
action: viewAction.event,
|
|
40593
40678
|
className: cn(
|
|
40594
|
-
"p-2 rounded-lg transition-all duration-
|
|
40679
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
40595
40680
|
"hover:bg-muted hover:text-foreground",
|
|
40596
40681
|
"text-muted-foreground",
|
|
40597
40682
|
"active:scale-95"
|
|
@@ -40613,7 +40698,7 @@ var init_List = __esm({
|
|
|
40613
40698
|
{
|
|
40614
40699
|
variant: "ghost",
|
|
40615
40700
|
className: cn(
|
|
40616
|
-
"p-2 rounded-lg transition-all duration-
|
|
40701
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
40617
40702
|
"hover:bg-muted hover:shadow-sm",
|
|
40618
40703
|
"text-muted-foreground hover:text-foreground",
|
|
40619
40704
|
"active:scale-95"
|
|
@@ -40825,7 +40910,7 @@ var init_MediaGallery = __esm({
|
|
|
40825
40910
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
40826
40911
|
);
|
|
40827
40912
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
40828
|
-
const items =
|
|
40913
|
+
const items = React91__default.useMemo(() => {
|
|
40829
40914
|
if (propItems && propItems.length > 0) return propItems;
|
|
40830
40915
|
if (entityData.length === 0) return [];
|
|
40831
40916
|
return entityData.map((record, idx) => {
|
|
@@ -40903,7 +40988,7 @@ var init_MediaGallery = __esm({
|
|
|
40903
40988
|
{
|
|
40904
40989
|
className: cn(
|
|
40905
40990
|
"group relative overflow-hidden rounded-md cursor-pointer",
|
|
40906
|
-
"border-2 transition-all duration-
|
|
40991
|
+
"border-2 transition-all duration-fast",
|
|
40907
40992
|
isSelected ? "border-primary ring-2 ring-primary/30" : "border-transparent hover:border-border",
|
|
40908
40993
|
ASPECT_CLASSES[aspectRatio]
|
|
40909
40994
|
),
|
|
@@ -40924,14 +41009,14 @@ var init_MediaGallery = __esm({
|
|
|
40924
41009
|
{
|
|
40925
41010
|
className: cn(
|
|
40926
41011
|
"absolute inset-0 bg-foreground/0 group-hover:bg-foreground/20",
|
|
40927
|
-
"transition-colors duration-
|
|
41012
|
+
"transition-colors duration-fast flex items-center justify-center"
|
|
40928
41013
|
),
|
|
40929
41014
|
children: /* @__PURE__ */ jsx(
|
|
40930
41015
|
Icon,
|
|
40931
41016
|
{
|
|
40932
41017
|
icon: ZoomIn,
|
|
40933
41018
|
size: "md",
|
|
40934
|
-
className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-
|
|
41019
|
+
className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-fast"
|
|
40935
41020
|
}
|
|
40936
41021
|
)
|
|
40937
41022
|
}
|
|
@@ -40989,7 +41074,7 @@ var init_MediaGallery = __esm({
|
|
|
40989
41074
|
}
|
|
40990
41075
|
});
|
|
40991
41076
|
function extractTitle2(children) {
|
|
40992
|
-
if (!
|
|
41077
|
+
if (!React91__default.isValidElement(children)) return void 0;
|
|
40993
41078
|
const props = children.props;
|
|
40994
41079
|
if (typeof props.title === "string") {
|
|
40995
41080
|
return props.title;
|
|
@@ -41263,7 +41348,7 @@ var init_debugRegistry = __esm({
|
|
|
41263
41348
|
}
|
|
41264
41349
|
});
|
|
41265
41350
|
function useDebugData() {
|
|
41266
|
-
const [data, setData] =
|
|
41351
|
+
const [data, setData] = React91.useState(() => ({
|
|
41267
41352
|
traits: [],
|
|
41268
41353
|
ticks: [],
|
|
41269
41354
|
guards: [],
|
|
@@ -41277,7 +41362,7 @@ function useDebugData() {
|
|
|
41277
41362
|
},
|
|
41278
41363
|
lastUpdate: Date.now()
|
|
41279
41364
|
}));
|
|
41280
|
-
|
|
41365
|
+
React91.useEffect(() => {
|
|
41281
41366
|
const updateData = () => {
|
|
41282
41367
|
setData({
|
|
41283
41368
|
traits: getAllTraits(),
|
|
@@ -41386,12 +41471,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
41386
41471
|
return positions;
|
|
41387
41472
|
}
|
|
41388
41473
|
function WalkMinimap() {
|
|
41389
|
-
const [walkStep, setWalkStep] =
|
|
41390
|
-
const [traits2, setTraits] =
|
|
41391
|
-
const [coveredEdges, setCoveredEdges] =
|
|
41392
|
-
const [completedTraits, setCompletedTraits] =
|
|
41393
|
-
const prevTraitRef =
|
|
41394
|
-
|
|
41474
|
+
const [walkStep, setWalkStep] = React91.useState(null);
|
|
41475
|
+
const [traits2, setTraits] = React91.useState([]);
|
|
41476
|
+
const [coveredEdges, setCoveredEdges] = React91.useState([]);
|
|
41477
|
+
const [completedTraits, setCompletedTraits] = React91.useState(/* @__PURE__ */ new Set());
|
|
41478
|
+
const prevTraitRef = React91.useRef(null);
|
|
41479
|
+
React91.useEffect(() => {
|
|
41395
41480
|
const interval = setInterval(() => {
|
|
41396
41481
|
const w = window;
|
|
41397
41482
|
const step = w.__orbitalWalkStep;
|
|
@@ -41827,15 +41912,15 @@ var init_EntitiesTab = __esm({
|
|
|
41827
41912
|
});
|
|
41828
41913
|
function EventFlowTab({ events: events2 }) {
|
|
41829
41914
|
const { t } = useTranslate();
|
|
41830
|
-
const [filter, setFilter] =
|
|
41831
|
-
const containerRef =
|
|
41832
|
-
const [autoScroll, setAutoScroll] =
|
|
41833
|
-
|
|
41915
|
+
const [filter, setFilter] = React91.useState("all");
|
|
41916
|
+
const containerRef = React91.useRef(null);
|
|
41917
|
+
const [autoScroll, setAutoScroll] = React91.useState(true);
|
|
41918
|
+
React91.useEffect(() => {
|
|
41834
41919
|
if (autoScroll && containerRef.current) {
|
|
41835
41920
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41836
41921
|
}
|
|
41837
41922
|
}, [events2.length, autoScroll]);
|
|
41838
|
-
const filteredEvents =
|
|
41923
|
+
const filteredEvents = React91.useMemo(() => {
|
|
41839
41924
|
if (filter === "all") return events2;
|
|
41840
41925
|
return events2.filter((e) => e.type === filter);
|
|
41841
41926
|
}, [events2, filter]);
|
|
@@ -41951,7 +42036,7 @@ var init_EventFlowTab = __esm({
|
|
|
41951
42036
|
});
|
|
41952
42037
|
function GuardsPanel({ guards }) {
|
|
41953
42038
|
const { t } = useTranslate();
|
|
41954
|
-
const [filter, setFilter] =
|
|
42039
|
+
const [filter, setFilter] = React91.useState("all");
|
|
41955
42040
|
if (guards.length === 0) {
|
|
41956
42041
|
return /* @__PURE__ */ jsx(
|
|
41957
42042
|
EmptyState,
|
|
@@ -41964,7 +42049,7 @@ function GuardsPanel({ guards }) {
|
|
|
41964
42049
|
}
|
|
41965
42050
|
const passedCount = guards.filter((g) => g.result).length;
|
|
41966
42051
|
const failedCount = guards.length - passedCount;
|
|
41967
|
-
const filteredGuards =
|
|
42052
|
+
const filteredGuards = React91.useMemo(() => {
|
|
41968
42053
|
if (filter === "all") return guards;
|
|
41969
42054
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
41970
42055
|
return guards.filter((g) => !g.result);
|
|
@@ -42127,10 +42212,10 @@ function EffectBadge({ effect }) {
|
|
|
42127
42212
|
}
|
|
42128
42213
|
function TransitionTimeline({ transitions }) {
|
|
42129
42214
|
const { t } = useTranslate();
|
|
42130
|
-
const containerRef =
|
|
42131
|
-
const [autoScroll, setAutoScroll] =
|
|
42132
|
-
const [expandedId, setExpandedId] =
|
|
42133
|
-
|
|
42215
|
+
const containerRef = React91.useRef(null);
|
|
42216
|
+
const [autoScroll, setAutoScroll] = React91.useState(true);
|
|
42217
|
+
const [expandedId, setExpandedId] = React91.useState(null);
|
|
42218
|
+
React91.useEffect(() => {
|
|
42134
42219
|
if (autoScroll && containerRef.current) {
|
|
42135
42220
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
42136
42221
|
}
|
|
@@ -42410,9 +42495,9 @@ function getAllEvents(traits2) {
|
|
|
42410
42495
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
42411
42496
|
const eventBus = useEventBus();
|
|
42412
42497
|
const { t } = useTranslate();
|
|
42413
|
-
const [log11, setLog] =
|
|
42414
|
-
const prevStatesRef =
|
|
42415
|
-
|
|
42498
|
+
const [log11, setLog] = React91.useState([]);
|
|
42499
|
+
const prevStatesRef = React91.useRef(/* @__PURE__ */ new Map());
|
|
42500
|
+
React91.useEffect(() => {
|
|
42416
42501
|
for (const trait of traits2) {
|
|
42417
42502
|
const prev = prevStatesRef.current.get(trait.id);
|
|
42418
42503
|
if (prev && prev !== trait.currentState) {
|
|
@@ -42581,10 +42666,10 @@ function VerifyModePanel({
|
|
|
42581
42666
|
localCount
|
|
42582
42667
|
}) {
|
|
42583
42668
|
const { t } = useTranslate();
|
|
42584
|
-
const [expanded, setExpanded] =
|
|
42585
|
-
const scrollRef =
|
|
42586
|
-
const prevCountRef =
|
|
42587
|
-
|
|
42669
|
+
const [expanded, setExpanded] = React91.useState(true);
|
|
42670
|
+
const scrollRef = React91.useRef(null);
|
|
42671
|
+
const prevCountRef = React91.useRef(0);
|
|
42672
|
+
React91.useEffect(() => {
|
|
42588
42673
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
42589
42674
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
42590
42675
|
}
|
|
@@ -42641,10 +42726,10 @@ function RuntimeDebugger({
|
|
|
42641
42726
|
schema
|
|
42642
42727
|
}) {
|
|
42643
42728
|
const { t } = useTranslate();
|
|
42644
|
-
const [isCollapsed, setIsCollapsed] =
|
|
42645
|
-
const [isVisible, setIsVisible] =
|
|
42729
|
+
const [isCollapsed, setIsCollapsed] = React91.useState(mode === "verify" ? true : defaultCollapsed);
|
|
42730
|
+
const [isVisible, setIsVisible] = React91.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
42646
42731
|
const debugData = useDebugData();
|
|
42647
|
-
|
|
42732
|
+
React91.useEffect(() => {
|
|
42648
42733
|
if (mode === "inline") return;
|
|
42649
42734
|
return onDebugToggle((enabled) => {
|
|
42650
42735
|
setIsVisible(enabled);
|
|
@@ -42653,7 +42738,7 @@ function RuntimeDebugger({
|
|
|
42653
42738
|
}
|
|
42654
42739
|
});
|
|
42655
42740
|
}, [mode]);
|
|
42656
|
-
|
|
42741
|
+
React91.useEffect(() => {
|
|
42657
42742
|
if (mode === "inline") return;
|
|
42658
42743
|
const handleKeyDown = (e) => {
|
|
42659
42744
|
if (e.key === "`" && isVisible) {
|
|
@@ -43173,7 +43258,7 @@ var init_StatCard = __esm({
|
|
|
43173
43258
|
const labelToUse = propLabel ?? propTitle;
|
|
43174
43259
|
const eventBus = useEventBus();
|
|
43175
43260
|
const { t } = useTranslate();
|
|
43176
|
-
const handleActionClick =
|
|
43261
|
+
const handleActionClick = React91__default.useCallback(() => {
|
|
43177
43262
|
if (action?.event) {
|
|
43178
43263
|
eventBus.emit(`UI:${action.event}`, {});
|
|
43179
43264
|
}
|
|
@@ -43184,7 +43269,7 @@ var init_StatCard = __esm({
|
|
|
43184
43269
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
43185
43270
|
const isLoading = externalLoading ?? false;
|
|
43186
43271
|
const error = externalError;
|
|
43187
|
-
const computeMetricValue =
|
|
43272
|
+
const computeMetricValue = React91__default.useCallback(
|
|
43188
43273
|
(metric, items) => {
|
|
43189
43274
|
if (metric.value !== void 0) {
|
|
43190
43275
|
return metric.value;
|
|
@@ -43223,7 +43308,7 @@ var init_StatCard = __esm({
|
|
|
43223
43308
|
},
|
|
43224
43309
|
[]
|
|
43225
43310
|
);
|
|
43226
|
-
const schemaStats =
|
|
43311
|
+
const schemaStats = React91__default.useMemo(() => {
|
|
43227
43312
|
if (!metrics || metrics.length === 0) return null;
|
|
43228
43313
|
return metrics.map((metric) => ({
|
|
43229
43314
|
label: metric.label,
|
|
@@ -43231,7 +43316,7 @@ var init_StatCard = __esm({
|
|
|
43231
43316
|
format: metric.format
|
|
43232
43317
|
}));
|
|
43233
43318
|
}, [metrics, data, computeMetricValue]);
|
|
43234
|
-
const calculatedTrend =
|
|
43319
|
+
const calculatedTrend = React91__default.useMemo(() => {
|
|
43235
43320
|
if (manualTrend !== void 0) return manualTrend;
|
|
43236
43321
|
if (previousValue === void 0 || currentValue === void 0)
|
|
43237
43322
|
return void 0;
|
|
@@ -43871,8 +43956,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43871
43956
|
] });
|
|
43872
43957
|
};
|
|
43873
43958
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
43874
|
-
const endRef =
|
|
43875
|
-
|
|
43959
|
+
const endRef = React91__default.useRef(null);
|
|
43960
|
+
React91__default.useEffect(() => {
|
|
43876
43961
|
if (!autoScroll) return;
|
|
43877
43962
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43878
43963
|
}, [activities.length, autoScroll]);
|
|
@@ -43966,7 +44051,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
43966
44051
|
};
|
|
43967
44052
|
SubagentRichCard = ({ subagent }) => {
|
|
43968
44053
|
const { t } = useTranslate();
|
|
43969
|
-
const activities =
|
|
44054
|
+
const activities = React91__default.useMemo(
|
|
43970
44055
|
() => subagentMessagesToActivities(subagent.messages),
|
|
43971
44056
|
[subagent.messages]
|
|
43972
44057
|
);
|
|
@@ -44043,8 +44128,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
44043
44128
|
] });
|
|
44044
44129
|
};
|
|
44045
44130
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
44046
|
-
const endRef =
|
|
44047
|
-
|
|
44131
|
+
const endRef = React91__default.useRef(null);
|
|
44132
|
+
React91__default.useEffect(() => {
|
|
44048
44133
|
if (!autoScroll) return;
|
|
44049
44134
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
44050
44135
|
}, [messages.length, autoScroll]);
|
|
@@ -44479,7 +44564,7 @@ var init_Timeline = __esm({
|
|
|
44479
44564
|
}) => {
|
|
44480
44565
|
const { t } = useTranslate();
|
|
44481
44566
|
const entityData = entity ?? [];
|
|
44482
|
-
const items =
|
|
44567
|
+
const items = React91__default.useMemo(() => {
|
|
44483
44568
|
if (propItems) return propItems;
|
|
44484
44569
|
if (entityData.length === 0) return [];
|
|
44485
44570
|
return entityData.map((record, idx) => {
|
|
@@ -44581,7 +44666,7 @@ var init_Timeline = __esm({
|
|
|
44581
44666
|
}
|
|
44582
44667
|
});
|
|
44583
44668
|
function extractToastProps(children) {
|
|
44584
|
-
if (!
|
|
44669
|
+
if (!React91__default.isValidElement(children)) {
|
|
44585
44670
|
if (typeof children === "string") {
|
|
44586
44671
|
return { message: children };
|
|
44587
44672
|
}
|
|
@@ -44623,7 +44708,7 @@ var init_ToastSlot = __esm({
|
|
|
44623
44708
|
eventBus.emit(`${prefix}CLOSE`);
|
|
44624
44709
|
};
|
|
44625
44710
|
if (!isVisible) return null;
|
|
44626
|
-
const isCustomContent =
|
|
44711
|
+
const isCustomContent = React91__default.isValidElement(children) && !message;
|
|
44627
44712
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
44628
44713
|
Toast,
|
|
44629
44714
|
{
|
|
@@ -44671,6 +44756,7 @@ var init_component_registry_generated = __esm({
|
|
|
44671
44756
|
init_LayoutPatterns();
|
|
44672
44757
|
init_BranchingLogicBuilder();
|
|
44673
44758
|
init_Breadcrumb();
|
|
44759
|
+
init_ButtonGroup();
|
|
44674
44760
|
init_CTABanner();
|
|
44675
44761
|
init_CalendarGrid();
|
|
44676
44762
|
init_Canvas();
|
|
@@ -44741,8 +44827,8 @@ var init_component_registry_generated = __esm({
|
|
|
44741
44827
|
init_FlipContainer();
|
|
44742
44828
|
init_FloatingActionButton();
|
|
44743
44829
|
init_Form();
|
|
44744
|
-
init_FormSection();
|
|
44745
44830
|
init_FormField();
|
|
44831
|
+
init_FormSection();
|
|
44746
44832
|
init_FormSectionHeader();
|
|
44747
44833
|
init_GameAudioToggle();
|
|
44748
44834
|
init_GameHud();
|
|
@@ -44928,6 +45014,7 @@ var init_component_registry_generated = __esm({
|
|
|
44928
45014
|
"BranchingLogicBuilder": BranchingLogicBuilder,
|
|
44929
45015
|
"Breadcrumb": Breadcrumb,
|
|
44930
45016
|
"Button": ButtonPattern,
|
|
45017
|
+
"ButtonGroup": ButtonGroup,
|
|
44931
45018
|
"ButtonPattern": ButtonPattern,
|
|
44932
45019
|
"CTABanner": CTABanner,
|
|
44933
45020
|
"CalendarGrid": CalendarGrid,
|
|
@@ -45001,7 +45088,6 @@ var init_component_registry_generated = __esm({
|
|
|
45001
45088
|
"FlipContainer": FlipContainer,
|
|
45002
45089
|
"FloatingActionButton": FloatingActionButton,
|
|
45003
45090
|
"Form": Form,
|
|
45004
|
-
"FormActions": FormActions,
|
|
45005
45091
|
"FormField": FormField,
|
|
45006
45092
|
"FormLayout": FormLayout,
|
|
45007
45093
|
"FormSectionHeader": FormSectionHeader,
|
|
@@ -45181,7 +45267,7 @@ function SuspenseConfigProvider({
|
|
|
45181
45267
|
config,
|
|
45182
45268
|
children
|
|
45183
45269
|
}) {
|
|
45184
|
-
return
|
|
45270
|
+
return React91__default.createElement(
|
|
45185
45271
|
SuspenseConfigContext.Provider,
|
|
45186
45272
|
{ value: config },
|
|
45187
45273
|
children
|
|
@@ -45223,7 +45309,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
45223
45309
|
}
|
|
45224
45310
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
45225
45311
|
}
|
|
45226
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
45312
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React91__default.isValidElement(field) && !(field instanceof Date)) {
|
|
45227
45313
|
const obj = field;
|
|
45228
45314
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
45229
45315
|
if (!fieldName) return field;
|
|
@@ -45676,7 +45762,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45676
45762
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45677
45763
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45678
45764
|
}
|
|
45679
|
-
return /* @__PURE__ */ jsx(
|
|
45765
|
+
return /* @__PURE__ */ jsx(React91__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45680
45766
|
}
|
|
45681
45767
|
if (!child || typeof child !== "object") return null;
|
|
45682
45768
|
const childId = `${parentId}-${index}`;
|
|
@@ -45729,14 +45815,14 @@ function isPatternConfig(value) {
|
|
|
45729
45815
|
if (value === null || value === void 0) return false;
|
|
45730
45816
|
if (typeof value !== "object") return false;
|
|
45731
45817
|
if (Array.isArray(value)) return false;
|
|
45732
|
-
if (
|
|
45818
|
+
if (React91__default.isValidElement(value)) return false;
|
|
45733
45819
|
if (value instanceof Date) return false;
|
|
45734
45820
|
if (typeof value === "function") return false;
|
|
45735
45821
|
const record = value;
|
|
45736
45822
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
45737
45823
|
}
|
|
45738
45824
|
function isPlainConfigObject(value) {
|
|
45739
|
-
if (
|
|
45825
|
+
if (React91__default.isValidElement(value)) return false;
|
|
45740
45826
|
if (value instanceof Date) return false;
|
|
45741
45827
|
const proto = Object.getPrototypeOf(value);
|
|
45742
45828
|
return proto === Object.prototype || proto === null;
|
|
@@ -45864,7 +45950,7 @@ function SlotContentRenderer({
|
|
|
45864
45950
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
45865
45951
|
const slotVal = restProps[slotKey];
|
|
45866
45952
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
45867
|
-
if (
|
|
45953
|
+
if (React91__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
45868
45954
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
45869
45955
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
45870
45956
|
slotVal,
|
|
@@ -45917,7 +46003,7 @@ function SlotContentRenderer({
|
|
|
45917
46003
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
45918
46004
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
45919
46005
|
const sample = resolvedItems[0];
|
|
45920
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
46006
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React91__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
45921
46007
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
45922
46008
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
45923
46009
|
}
|
|
@@ -46282,7 +46368,7 @@ var AvlTransition = ({
|
|
|
46282
46368
|
opacity = 1,
|
|
46283
46369
|
className
|
|
46284
46370
|
}) => {
|
|
46285
|
-
const ids =
|
|
46371
|
+
const ids = React91__default.useMemo(() => {
|
|
46286
46372
|
avlTransitionId += 1;
|
|
46287
46373
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
46288
46374
|
}, []);
|
|
@@ -46843,7 +46929,7 @@ var AvlStateMachine = ({
|
|
|
46843
46929
|
color = "var(--color-primary)",
|
|
46844
46930
|
animated = false
|
|
46845
46931
|
}) => {
|
|
46846
|
-
const ids =
|
|
46932
|
+
const ids = React91__default.useMemo(() => {
|
|
46847
46933
|
avlSmId += 1;
|
|
46848
46934
|
const base = `avl-sm-${avlSmId}`;
|
|
46849
46935
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -47042,7 +47128,7 @@ var AvlOrbitalUnit = ({
|
|
|
47042
47128
|
color = "var(--color-primary)",
|
|
47043
47129
|
animated = false
|
|
47044
47130
|
}) => {
|
|
47045
|
-
const ids =
|
|
47131
|
+
const ids = React91__default.useMemo(() => {
|
|
47046
47132
|
avlOuId += 1;
|
|
47047
47133
|
const base = `avl-ou-${avlOuId}`;
|
|
47048
47134
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -47138,7 +47224,7 @@ var AvlClosedCircuit = ({
|
|
|
47138
47224
|
color = "var(--color-primary)",
|
|
47139
47225
|
animated = false
|
|
47140
47226
|
}) => {
|
|
47141
|
-
const ids =
|
|
47227
|
+
const ids = React91__default.useMemo(() => {
|
|
47142
47228
|
avlCcId += 1;
|
|
47143
47229
|
const base = `avl-cc-${avlCcId}`;
|
|
47144
47230
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -47293,7 +47379,7 @@ var AvlEmitListen = ({
|
|
|
47293
47379
|
color = "var(--color-primary)",
|
|
47294
47380
|
animated = false
|
|
47295
47381
|
}) => {
|
|
47296
|
-
const ids =
|
|
47382
|
+
const ids = React91__default.useMemo(() => {
|
|
47297
47383
|
avlElId += 1;
|
|
47298
47384
|
const base = `avl-el-${avlElId}`;
|
|
47299
47385
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -47567,7 +47653,7 @@ function renderNode(node, color, glowId) {
|
|
|
47567
47653
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
47568
47654
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
47569
47655
|
const nc = nodeColor(node.type, color);
|
|
47570
|
-
return /* @__PURE__ */ jsxs(
|
|
47656
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
47571
47657
|
node.children.map((child, i) => {
|
|
47572
47658
|
const childR = Math.max(
|
|
47573
47659
|
child.type === "operator" ? 20 : 16,
|
|
@@ -47624,7 +47710,7 @@ var AvlExprTree = ({
|
|
|
47624
47710
|
className,
|
|
47625
47711
|
color = "var(--color-primary)"
|
|
47626
47712
|
}) => {
|
|
47627
|
-
const ids =
|
|
47713
|
+
const ids = React91__default.useMemo(() => {
|
|
47628
47714
|
avlEtId += 1;
|
|
47629
47715
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
47630
47716
|
}, []);
|
|
@@ -48459,7 +48545,7 @@ var SystemNode = ({ data }) => {
|
|
|
48459
48545
|
stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
|
|
48460
48546
|
const tc = transitionCounts[s.name] ?? 0;
|
|
48461
48547
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
48462
|
-
return /* @__PURE__ */ jsxs(
|
|
48548
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
48463
48549
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
|
|
48464
48550
|
i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
|
|
48465
48551
|
] }, s.name);
|
|
@@ -49541,7 +49627,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
49541
49627
|
}
|
|
49542
49628
|
return substituted;
|
|
49543
49629
|
}
|
|
49544
|
-
if (body !== null && typeof body === "object" && !
|
|
49630
|
+
if (body !== null && typeof body === "object" && !React91__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
49545
49631
|
const out = {};
|
|
49546
49632
|
for (const [k, v] of Object.entries(body)) {
|
|
49547
49633
|
out[k] = recur(v);
|
|
@@ -49560,7 +49646,7 @@ function getSlotContentRenderer2() {
|
|
|
49560
49646
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
49561
49647
|
return (item, index) => {
|
|
49562
49648
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
49563
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
49649
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React91__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
49564
49650
|
return null;
|
|
49565
49651
|
}
|
|
49566
49652
|
const record = resolvedBody;
|
|
@@ -49579,7 +49665,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
49579
49665
|
props: childProps,
|
|
49580
49666
|
priority: 0
|
|
49581
49667
|
};
|
|
49582
|
-
return
|
|
49668
|
+
return React91__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
49583
49669
|
};
|
|
49584
49670
|
}
|
|
49585
49671
|
function convertNode(node, callerKey) {
|
|
@@ -49598,7 +49684,7 @@ function convertNode(node, callerKey) {
|
|
|
49598
49684
|
});
|
|
49599
49685
|
return anyChanged ? mapped : node;
|
|
49600
49686
|
}
|
|
49601
|
-
if (typeof node === "object" && !
|
|
49687
|
+
if (typeof node === "object" && !React91__default.isValidElement(node) && !(node instanceof Date)) {
|
|
49602
49688
|
return convertObjectProps(node);
|
|
49603
49689
|
}
|
|
49604
49690
|
return node;
|
|
@@ -51471,8 +51557,8 @@ function CanvasDndProvider({
|
|
|
51471
51557
|
}) {
|
|
51472
51558
|
const eventBus = useEventBus();
|
|
51473
51559
|
const sensors = useAlmadarDndSensors(false);
|
|
51474
|
-
const [activePayload, setActivePayload] =
|
|
51475
|
-
const handleDragStart =
|
|
51560
|
+
const [activePayload, setActivePayload] = React91__default.useState(null);
|
|
51561
|
+
const handleDragStart = React91__default.useCallback((e) => {
|
|
51476
51562
|
const data = e.active.data.current;
|
|
51477
51563
|
const payload = data?.payload;
|
|
51478
51564
|
if (payload) {
|
|
@@ -51483,7 +51569,7 @@ function CanvasDndProvider({
|
|
|
51483
51569
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
51484
51570
|
}
|
|
51485
51571
|
}, [eventBus]);
|
|
51486
|
-
const handleDragEnd =
|
|
51572
|
+
const handleDragEnd = React91__default.useCallback((e) => {
|
|
51487
51573
|
setActivePayload(null);
|
|
51488
51574
|
const activeData = e.active.data.current;
|
|
51489
51575
|
const payload = activeData?.payload;
|
|
@@ -51512,7 +51598,7 @@ function CanvasDndProvider({
|
|
|
51512
51598
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
51513
51599
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
51514
51600
|
}, [eventBus, onDrop]);
|
|
51515
|
-
const handleDragCancel =
|
|
51601
|
+
const handleDragCancel = React91__default.useCallback(() => {
|
|
51516
51602
|
setActivePayload(null);
|
|
51517
51603
|
log9.info("dragCancel");
|
|
51518
51604
|
}, []);
|
|
@@ -52270,7 +52356,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
52270
52356
|
}
|
|
52271
52357
|
);
|
|
52272
52358
|
};
|
|
52273
|
-
var OrbPreviewNode =
|
|
52359
|
+
var OrbPreviewNode = React91__default.memo(OrbPreviewNodeInner);
|
|
52274
52360
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
52275
52361
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
52276
52362
|
type: typeof OrbPreviewNode,
|
|
@@ -52375,7 +52461,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
52375
52461
|
) })
|
|
52376
52462
|
] });
|
|
52377
52463
|
};
|
|
52378
|
-
var EventFlowEdge =
|
|
52464
|
+
var EventFlowEdge = React91__default.memo(EventFlowEdgeInner);
|
|
52379
52465
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
52380
52466
|
|
|
52381
52467
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -52522,7 +52608,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
52522
52608
|
}
|
|
52523
52609
|
);
|
|
52524
52610
|
};
|
|
52525
|
-
var BehaviorComposeNode =
|
|
52611
|
+
var BehaviorComposeNode = React91__default.memo(BehaviorComposeNodeInner);
|
|
52526
52612
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
52527
52613
|
|
|
52528
52614
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -53548,7 +53634,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
53548
53634
|
}
|
|
53549
53635
|
);
|
|
53550
53636
|
};
|
|
53551
|
-
var TraitCardNode =
|
|
53637
|
+
var TraitCardNode = React91__default.memo(TraitCardNodeInner);
|
|
53552
53638
|
TraitCardNode.displayName = "TraitCardNode";
|
|
53553
53639
|
|
|
53554
53640
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -53629,7 +53715,7 @@ function FlowCanvasInner({
|
|
|
53629
53715
|
initialOrbital
|
|
53630
53716
|
);
|
|
53631
53717
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
53632
|
-
const screenSizeUserOverrideRef =
|
|
53718
|
+
const screenSizeUserOverrideRef = React91__default.useRef(false);
|
|
53633
53719
|
const [screenSize, setScreenSize] = useState(
|
|
53634
53720
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
53635
53721
|
);
|
|
@@ -54013,7 +54099,7 @@ var ZoomBreadcrumb = ({
|
|
|
54013
54099
|
if (eventName && band === "detail") {
|
|
54014
54100
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
54015
54101
|
}
|
|
54016
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
54102
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
54017
54103
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
54018
54104
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
54019
54105
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -54354,7 +54440,7 @@ var EventWireOverlay = ({
|
|
|
54354
54440
|
containerW,
|
|
54355
54441
|
containerH
|
|
54356
54442
|
}) => {
|
|
54357
|
-
const ids =
|
|
54443
|
+
const ids = React91__default.useMemo(() => {
|
|
54358
54444
|
avlOczWireId += 1;
|
|
54359
54445
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
54360
54446
|
}, []);
|
|
@@ -54721,7 +54807,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
54721
54807
|
borderRadius: 6,
|
|
54722
54808
|
border: `1px solid ${color}`
|
|
54723
54809
|
},
|
|
54724
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
54810
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
54725
54811
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
54726
54812
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
54727
54813
|
Box,
|