@almadar/ui 5.121.4 → 5.122.1
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 +1504 -1414
- package/dist/avl/index.js +582 -492
- package/dist/components/index.cjs +1512 -1410
- package/dist/components/index.d.cts +168 -2
- package/dist/components/index.d.ts +168 -2
- package/dist/components/index.js +583 -482
- 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 +1387 -1297
- package/dist/providers/index.js +557 -467
- package/dist/runtime/index.cjs +1364 -1274
- package/dist/runtime/index.js +561 -471
- 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,
|
|
@@ -5093,6 +5094,7 @@ var init_Modal = __esm({
|
|
|
5093
5094
|
isOpen = true,
|
|
5094
5095
|
onClose = () => {
|
|
5095
5096
|
},
|
|
5097
|
+
onExited,
|
|
5096
5098
|
title,
|
|
5097
5099
|
children = null,
|
|
5098
5100
|
footer,
|
|
@@ -5119,7 +5121,10 @@ var init_Modal = __esm({
|
|
|
5119
5121
|
wasOpenRef.current = isOpen;
|
|
5120
5122
|
}, [isOpen]);
|
|
5121
5123
|
const handleAnimEnd = (e) => {
|
|
5122
|
-
if (closing && e.target === e.currentTarget)
|
|
5124
|
+
if (closing && e.target === e.currentTarget) {
|
|
5125
|
+
setClosing(false);
|
|
5126
|
+
onExited?.();
|
|
5127
|
+
}
|
|
5123
5128
|
};
|
|
5124
5129
|
useEffect(() => {
|
|
5125
5130
|
if (isOpen) {
|
|
@@ -5289,12 +5294,84 @@ var init_Modal = __esm({
|
|
|
5289
5294
|
Modal.displayName = "Modal";
|
|
5290
5295
|
}
|
|
5291
5296
|
});
|
|
5297
|
+
function isMotionEnabled() {
|
|
5298
|
+
if (typeof document === "undefined") return true;
|
|
5299
|
+
if (motionEnabledCache !== null) return motionEnabledCache;
|
|
5300
|
+
const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
|
|
5301
|
+
motionEnabledCache = v !== "off";
|
|
5302
|
+
return motionEnabledCache;
|
|
5303
|
+
}
|
|
5304
|
+
function usePresence(show, opts) {
|
|
5305
|
+
const { animation, animate = true, onExited } = opts;
|
|
5306
|
+
const [mounted, setMounted] = useState(show);
|
|
5307
|
+
const [exiting, setExiting] = useState(false);
|
|
5308
|
+
const prev = useRef(show);
|
|
5309
|
+
const onExitedRef = useRef(onExited);
|
|
5310
|
+
onExitedRef.current = onExited;
|
|
5311
|
+
const safeTimer = useRef(null);
|
|
5312
|
+
const clearSafe = useCallback(() => {
|
|
5313
|
+
if (safeTimer.current) {
|
|
5314
|
+
clearTimeout(safeTimer.current);
|
|
5315
|
+
safeTimer.current = null;
|
|
5316
|
+
}
|
|
5317
|
+
}, []);
|
|
5318
|
+
const finishExit = useCallback(() => {
|
|
5319
|
+
clearSafe();
|
|
5320
|
+
setExiting(false);
|
|
5321
|
+
setMounted(false);
|
|
5322
|
+
onExitedRef.current?.();
|
|
5323
|
+
}, [clearSafe]);
|
|
5324
|
+
useEffect(() => {
|
|
5325
|
+
const moving = animate && isMotionEnabled();
|
|
5326
|
+
if (show && !prev.current) {
|
|
5327
|
+
setExiting(false);
|
|
5328
|
+
setMounted(true);
|
|
5329
|
+
} else if (!show && prev.current) {
|
|
5330
|
+
if (moving) {
|
|
5331
|
+
setExiting(true);
|
|
5332
|
+
clearSafe();
|
|
5333
|
+
safeTimer.current = setTimeout(finishExit, SAFE_EXIT_MS);
|
|
5334
|
+
} else {
|
|
5335
|
+
setMounted(false);
|
|
5336
|
+
setExiting(false);
|
|
5337
|
+
}
|
|
5338
|
+
}
|
|
5339
|
+
prev.current = show;
|
|
5340
|
+
}, [show, animate, clearSafe, finishExit]);
|
|
5341
|
+
useEffect(() => () => clearSafe(), [clearSafe]);
|
|
5342
|
+
const disabled = !animate || !isMotionEnabled();
|
|
5343
|
+
const className = disabled ? "" : exiting ? `animate-${animation}-out` : `animate-${animation}-in`;
|
|
5344
|
+
const onAnimationEnd = useCallback(
|
|
5345
|
+
(e) => {
|
|
5346
|
+
if (e.target !== e.currentTarget) return;
|
|
5347
|
+
if (exiting) finishExit();
|
|
5348
|
+
},
|
|
5349
|
+
[exiting, finishExit]
|
|
5350
|
+
);
|
|
5351
|
+
return { mounted, exiting, className, onAnimationEnd };
|
|
5352
|
+
}
|
|
5353
|
+
var SAFE_EXIT_MS, motionEnabledCache, Presence;
|
|
5354
|
+
var init_Presence = __esm({
|
|
5355
|
+
"components/core/atoms/Presence.tsx"() {
|
|
5356
|
+
"use client";
|
|
5357
|
+
init_cn();
|
|
5358
|
+
SAFE_EXIT_MS = 1e3;
|
|
5359
|
+
motionEnabledCache = null;
|
|
5360
|
+
Presence = ({ show, className, children, ...opts }) => {
|
|
5361
|
+
const { mounted, className: animClass, onAnimationEnd } = usePresence(show, opts);
|
|
5362
|
+
if (!mounted) return null;
|
|
5363
|
+
return /* @__PURE__ */ jsx("div", { className: cn(animClass, className), onAnimationEnd, children });
|
|
5364
|
+
};
|
|
5365
|
+
Presence.displayName = "Presence";
|
|
5366
|
+
}
|
|
5367
|
+
});
|
|
5292
5368
|
var Overlay;
|
|
5293
5369
|
var init_Overlay = __esm({
|
|
5294
5370
|
"components/core/atoms/Overlay.tsx"() {
|
|
5295
5371
|
"use client";
|
|
5296
5372
|
init_cn();
|
|
5297
5373
|
init_useEventBus();
|
|
5374
|
+
init_Presence();
|
|
5298
5375
|
Overlay = ({
|
|
5299
5376
|
isVisible = true,
|
|
5300
5377
|
onClick,
|
|
@@ -5303,7 +5380,8 @@ var init_Overlay = __esm({
|
|
|
5303
5380
|
action
|
|
5304
5381
|
}) => {
|
|
5305
5382
|
const eventBus = useEventBus();
|
|
5306
|
-
|
|
5383
|
+
const { mounted, className: animClass, onAnimationEnd } = usePresence(isVisible, { animation: "overlay" });
|
|
5384
|
+
if (!mounted) return null;
|
|
5307
5385
|
const handleClick = (e) => {
|
|
5308
5386
|
if (action) {
|
|
5309
5387
|
eventBus.emit(`UI:${action}`, {});
|
|
@@ -5316,11 +5394,12 @@ var init_Overlay = __esm({
|
|
|
5316
5394
|
className: cn(
|
|
5317
5395
|
"fixed inset-0 z-40",
|
|
5318
5396
|
blur && "backdrop-blur-sm",
|
|
5319
|
-
|
|
5397
|
+
animClass,
|
|
5320
5398
|
className
|
|
5321
5399
|
),
|
|
5322
5400
|
style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
|
|
5323
5401
|
onClick: action || onClick ? handleClick : void 0,
|
|
5402
|
+
onAnimationEnd,
|
|
5324
5403
|
"aria-hidden": "true"
|
|
5325
5404
|
}
|
|
5326
5405
|
);
|
|
@@ -5335,6 +5414,7 @@ var init_Drawer = __esm({
|
|
|
5335
5414
|
init_Button();
|
|
5336
5415
|
init_Typography();
|
|
5337
5416
|
init_Overlay();
|
|
5417
|
+
init_Presence();
|
|
5338
5418
|
init_cn();
|
|
5339
5419
|
init_useEventBus();
|
|
5340
5420
|
sizeWidths = {
|
|
@@ -5388,6 +5468,7 @@ var init_Drawer = __esm({
|
|
|
5388
5468
|
document.addEventListener("keydown", handleEscape);
|
|
5389
5469
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
5390
5470
|
}, [isOpen, closeOnEscape, onClose, closeEvent, eventBus]);
|
|
5471
|
+
const { mounted, className: drawerAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
|
|
5391
5472
|
useEffect(() => {
|
|
5392
5473
|
if (isOpen) {
|
|
5393
5474
|
document.body.style.overflow = "hidden";
|
|
@@ -5398,7 +5479,7 @@ var init_Drawer = __esm({
|
|
|
5398
5479
|
document.body.style.overflow = "";
|
|
5399
5480
|
};
|
|
5400
5481
|
}, [isOpen]);
|
|
5401
|
-
if (!
|
|
5482
|
+
if (!mounted) return null;
|
|
5402
5483
|
const handleClose = () => {
|
|
5403
5484
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
5404
5485
|
onClose();
|
|
@@ -5411,7 +5492,7 @@ var init_Drawer = __esm({
|
|
|
5411
5492
|
const widthClass = width in sizeWidths ? sizeWidths[width] : "";
|
|
5412
5493
|
const widthStyle = width in sizeWidths ? void 0 : { width };
|
|
5413
5494
|
const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
|
|
5414
|
-
const
|
|
5495
|
+
const drawerSign = position === "right" ? 1 : -1;
|
|
5415
5496
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5416
5497
|
/* @__PURE__ */ jsx(
|
|
5417
5498
|
Overlay,
|
|
@@ -5433,12 +5514,13 @@ var init_Drawer = __esm({
|
|
|
5433
5514
|
"flex flex-col max-h-screen",
|
|
5434
5515
|
positionClasses,
|
|
5435
5516
|
widthClass,
|
|
5436
|
-
|
|
5517
|
+
drawerAnim,
|
|
5437
5518
|
className
|
|
5438
5519
|
),
|
|
5439
|
-
style: widthStyle,
|
|
5520
|
+
style: { ...widthStyle, "--motion-drawer-sign": drawerSign },
|
|
5440
5521
|
role: "dialog",
|
|
5441
5522
|
"aria-modal": "true",
|
|
5523
|
+
onAnimationEnd,
|
|
5442
5524
|
...title && { "aria-labelledby": "drawer-title" },
|
|
5443
5525
|
children: [
|
|
5444
5526
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
@@ -5477,31 +5559,7 @@ var init_Drawer = __esm({
|
|
|
5477
5559
|
)
|
|
5478
5560
|
]
|
|
5479
5561
|
}
|
|
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
|
-
` })
|
|
5562
|
+
)
|
|
5505
5563
|
] });
|
|
5506
5564
|
};
|
|
5507
5565
|
Drawer.displayName = "Drawer";
|
|
@@ -5550,7 +5608,7 @@ var init_Badge = __esm({
|
|
|
5550
5608
|
md: "px-2.5 py-1 text-sm",
|
|
5551
5609
|
lg: "px-3 py-1.5 text-base"
|
|
5552
5610
|
};
|
|
5553
|
-
Badge =
|
|
5611
|
+
Badge = React91__default.forwardRef(
|
|
5554
5612
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5555
5613
|
const iconSizes3 = {
|
|
5556
5614
|
sm: "h-icon-default w-icon-default",
|
|
@@ -5645,14 +5703,23 @@ var init_Toast = __esm({
|
|
|
5645
5703
|
}) => {
|
|
5646
5704
|
const eventBus = useEventBus();
|
|
5647
5705
|
const { t } = useTranslate();
|
|
5648
|
-
const
|
|
5706
|
+
const [leaving, setLeaving] = useState(false);
|
|
5707
|
+
const doRealDismiss = () => {
|
|
5649
5708
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
5650
5709
|
onDismiss?.();
|
|
5651
5710
|
};
|
|
5711
|
+
const handleDismiss = () => {
|
|
5712
|
+
if (leaving) return;
|
|
5713
|
+
setLeaving(true);
|
|
5714
|
+
};
|
|
5652
5715
|
const handleAction = () => {
|
|
5653
5716
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
5654
5717
|
onAction?.();
|
|
5655
5718
|
};
|
|
5719
|
+
const handleAnimEnd = (e) => {
|
|
5720
|
+
if (e.target !== e.currentTarget) return;
|
|
5721
|
+
if (leaving) doRealDismiss();
|
|
5722
|
+
};
|
|
5656
5723
|
useEffect(() => {
|
|
5657
5724
|
if (duration <= 0 || !onDismiss && !dismissEvent) {
|
|
5658
5725
|
return;
|
|
@@ -5671,10 +5738,12 @@ var init_Toast = __esm({
|
|
|
5671
5738
|
// edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
|
|
5672
5739
|
"border-l-4 p-4 shadow-elevation-toast min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
5673
5740
|
"rounded-sm",
|
|
5741
|
+
leaving ? "animate-toast-out" : "animate-toast-in",
|
|
5674
5742
|
variantClasses[variant],
|
|
5675
5743
|
className
|
|
5676
5744
|
),
|
|
5677
5745
|
role: "alert",
|
|
5746
|
+
onAnimationEnd: handleAnimEnd,
|
|
5678
5747
|
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
|
|
5679
5748
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
5680
5749
|
Icon,
|
|
@@ -5887,7 +5956,7 @@ var init_SvgFlow = __esm({
|
|
|
5887
5956
|
width = 100,
|
|
5888
5957
|
height = 100
|
|
5889
5958
|
}) => {
|
|
5890
|
-
const markerId =
|
|
5959
|
+
const markerId = React91__default.useMemo(() => {
|
|
5891
5960
|
flowIdCounter += 1;
|
|
5892
5961
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
5893
5962
|
}, []);
|
|
@@ -6480,7 +6549,7 @@ var init_SvgRing = __esm({
|
|
|
6480
6549
|
width = 100,
|
|
6481
6550
|
height = 100
|
|
6482
6551
|
}) => {
|
|
6483
|
-
const gradientId =
|
|
6552
|
+
const gradientId = React91__default.useMemo(() => {
|
|
6484
6553
|
ringIdCounter += 1;
|
|
6485
6554
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6486
6555
|
}, []);
|
|
@@ -6661,7 +6730,7 @@ var init_Input = __esm({
|
|
|
6661
6730
|
init_cn();
|
|
6662
6731
|
init_Icon();
|
|
6663
6732
|
init_useEventBus();
|
|
6664
|
-
Input =
|
|
6733
|
+
Input = React91__default.forwardRef(
|
|
6665
6734
|
({
|
|
6666
6735
|
className,
|
|
6667
6736
|
inputType,
|
|
@@ -6696,7 +6765,7 @@ var init_Input = __esm({
|
|
|
6696
6765
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
6697
6766
|
const isMultiline = type === "textarea";
|
|
6698
6767
|
const baseClassName = cn(
|
|
6699
|
-
"block w-full rounded-sm transition-all duration-
|
|
6768
|
+
"block w-full rounded-sm transition-all duration-fast",
|
|
6700
6769
|
"border-[length:var(--border-width-thin)] border-border",
|
|
6701
6770
|
isMultiline ? "px-3 py-2 text-sm" : "h-input-md px-3 text-sm",
|
|
6702
6771
|
"bg-card hover:bg-muted focus:bg-card",
|
|
@@ -6829,7 +6898,7 @@ var Label;
|
|
|
6829
6898
|
var init_Label = __esm({
|
|
6830
6899
|
"components/core/atoms/Label.tsx"() {
|
|
6831
6900
|
init_cn();
|
|
6832
|
-
Label =
|
|
6901
|
+
Label = React91__default.forwardRef(
|
|
6833
6902
|
({ className, required, children, ...props }, ref) => {
|
|
6834
6903
|
return /* @__PURE__ */ jsxs(
|
|
6835
6904
|
"label",
|
|
@@ -6856,7 +6925,7 @@ var init_Textarea = __esm({
|
|
|
6856
6925
|
"components/core/atoms/Textarea.tsx"() {
|
|
6857
6926
|
init_cn();
|
|
6858
6927
|
init_useEventBus();
|
|
6859
|
-
Textarea =
|
|
6928
|
+
Textarea = React91__default.forwardRef(
|
|
6860
6929
|
({ className, error, onChange, ...props }, ref) => {
|
|
6861
6930
|
const eventBus = useEventBus();
|
|
6862
6931
|
const handleChange = (e) => {
|
|
@@ -7095,7 +7164,7 @@ var init_Select = __esm({
|
|
|
7095
7164
|
init_cn();
|
|
7096
7165
|
init_Icon();
|
|
7097
7166
|
init_useEventBus();
|
|
7098
|
-
Select =
|
|
7167
|
+
Select = React91__default.forwardRef(
|
|
7099
7168
|
(props, _ref) => {
|
|
7100
7169
|
const { multiple, searchable, clearable } = props;
|
|
7101
7170
|
if (multiple || searchable || clearable) {
|
|
@@ -7112,7 +7181,7 @@ var init_Checkbox = __esm({
|
|
|
7112
7181
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7113
7182
|
init_cn();
|
|
7114
7183
|
init_useEventBus();
|
|
7115
|
-
Checkbox =
|
|
7184
|
+
Checkbox = React91__default.forwardRef(
|
|
7116
7185
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7117
7186
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7118
7187
|
const eventBus = useEventBus();
|
|
@@ -7166,7 +7235,7 @@ var init_Spinner = __esm({
|
|
|
7166
7235
|
md: "h-6 w-6",
|
|
7167
7236
|
lg: "h-8 w-8"
|
|
7168
7237
|
};
|
|
7169
|
-
Spinner =
|
|
7238
|
+
Spinner = React91__default.forwardRef(
|
|
7170
7239
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7171
7240
|
if (overlay) {
|
|
7172
7241
|
return /* @__PURE__ */ jsx(
|
|
@@ -7208,21 +7277,21 @@ var init_Card = __esm({
|
|
|
7208
7277
|
"bg-card",
|
|
7209
7278
|
"border-[length:var(--border-width)] border-border",
|
|
7210
7279
|
"shadow-elevation-card",
|
|
7211
|
-
"transition-all duration-
|
|
7280
|
+
"transition-all duration-normal",
|
|
7212
7281
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
7213
7282
|
].join(" "),
|
|
7214
7283
|
bordered: [
|
|
7215
7284
|
"bg-card",
|
|
7216
7285
|
"border-[length:var(--border-width)] border-border",
|
|
7217
7286
|
"shadow-elevation-card",
|
|
7218
|
-
"transition-all duration-
|
|
7287
|
+
"transition-all duration-normal",
|
|
7219
7288
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
7220
7289
|
].join(" "),
|
|
7221
7290
|
elevated: [
|
|
7222
7291
|
"bg-card",
|
|
7223
7292
|
"border-[length:var(--border-width)] border-border",
|
|
7224
7293
|
"shadow",
|
|
7225
|
-
"transition-all duration-
|
|
7294
|
+
"transition-all duration-normal",
|
|
7226
7295
|
"hover:shadow-elevation-dialog hover:translate-y-[var(--hover-translate-y)]"
|
|
7227
7296
|
].join(" "),
|
|
7228
7297
|
// Interactive variant with theme-specific hover effects
|
|
@@ -7231,7 +7300,7 @@ var init_Card = __esm({
|
|
|
7231
7300
|
"border-[length:var(--border-width)] border-border",
|
|
7232
7301
|
"shadow",
|
|
7233
7302
|
"cursor-pointer",
|
|
7234
|
-
"transition-all duration-
|
|
7303
|
+
"transition-all duration-normal",
|
|
7235
7304
|
"hover:shadow-elevation-dialog"
|
|
7236
7305
|
].join(" ")
|
|
7237
7306
|
};
|
|
@@ -7256,7 +7325,7 @@ var init_Card = __esm({
|
|
|
7256
7325
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7257
7326
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7258
7327
|
};
|
|
7259
|
-
Card =
|
|
7328
|
+
Card = React91__default.forwardRef(
|
|
7260
7329
|
({
|
|
7261
7330
|
className,
|
|
7262
7331
|
variant = "bordered",
|
|
@@ -7282,7 +7351,8 @@ var init_Card = __esm({
|
|
|
7282
7351
|
ref,
|
|
7283
7352
|
className: cn(
|
|
7284
7353
|
"rounded-container relative",
|
|
7285
|
-
"transition-all duration-
|
|
7354
|
+
"transition-all duration-normal",
|
|
7355
|
+
"chrome-panel",
|
|
7286
7356
|
variantStyles4[variant],
|
|
7287
7357
|
paddingStyles2[padding],
|
|
7288
7358
|
lookStyles2[look],
|
|
@@ -7304,9 +7374,9 @@ var init_Card = __esm({
|
|
|
7304
7374
|
}
|
|
7305
7375
|
);
|
|
7306
7376
|
Card.displayName = "Card";
|
|
7307
|
-
CardHeader =
|
|
7377
|
+
CardHeader = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7308
7378
|
CardHeader.displayName = "CardHeader";
|
|
7309
|
-
CardTitle =
|
|
7379
|
+
CardTitle = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7310
7380
|
"h3",
|
|
7311
7381
|
{
|
|
7312
7382
|
ref,
|
|
@@ -7319,11 +7389,11 @@ var init_Card = __esm({
|
|
|
7319
7389
|
}
|
|
7320
7390
|
));
|
|
7321
7391
|
CardTitle.displayName = "CardTitle";
|
|
7322
|
-
CardContent =
|
|
7392
|
+
CardContent = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7323
7393
|
CardContent.displayName = "CardContent";
|
|
7324
7394
|
CardBody = CardContent;
|
|
7325
7395
|
CardBody.displayName = "CardBody";
|
|
7326
|
-
CardFooter =
|
|
7396
|
+
CardFooter = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7327
7397
|
"div",
|
|
7328
7398
|
{
|
|
7329
7399
|
ref,
|
|
@@ -7410,7 +7480,7 @@ var init_FilterPill = __esm({
|
|
|
7410
7480
|
md: "w-3.5 h-3.5",
|
|
7411
7481
|
lg: "w-4 h-4"
|
|
7412
7482
|
};
|
|
7413
|
-
FilterPill =
|
|
7483
|
+
FilterPill = React91__default.forwardRef(
|
|
7414
7484
|
({
|
|
7415
7485
|
className,
|
|
7416
7486
|
variant = "default",
|
|
@@ -7539,8 +7609,8 @@ var init_Avatar = __esm({
|
|
|
7539
7609
|
actionPayload
|
|
7540
7610
|
}) => {
|
|
7541
7611
|
const eventBus = useEventBus();
|
|
7542
|
-
const [imgFailed, setImgFailed] =
|
|
7543
|
-
|
|
7612
|
+
const [imgFailed, setImgFailed] = React91__default.useState(false);
|
|
7613
|
+
React91__default.useEffect(() => {
|
|
7544
7614
|
setImgFailed(false);
|
|
7545
7615
|
}, [src]);
|
|
7546
7616
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -7653,7 +7723,7 @@ var init_Center = __esm({
|
|
|
7653
7723
|
as: Component = "div"
|
|
7654
7724
|
}) => {
|
|
7655
7725
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
7656
|
-
return
|
|
7726
|
+
return React91__default.createElement(Component, {
|
|
7657
7727
|
className: cn(
|
|
7658
7728
|
inline ? "inline-flex" : "flex",
|
|
7659
7729
|
horizontal && "justify-center",
|
|
@@ -7921,7 +7991,7 @@ var init_Radio = __esm({
|
|
|
7921
7991
|
md: "w-2.5 h-2.5",
|
|
7922
7992
|
lg: "w-3 h-3"
|
|
7923
7993
|
};
|
|
7924
|
-
Radio =
|
|
7994
|
+
Radio = React91__default.forwardRef(
|
|
7925
7995
|
({
|
|
7926
7996
|
label,
|
|
7927
7997
|
helperText,
|
|
@@ -7938,12 +8008,12 @@ var init_Radio = __esm({
|
|
|
7938
8008
|
onChange,
|
|
7939
8009
|
...props
|
|
7940
8010
|
}, ref) => {
|
|
7941
|
-
const reactId =
|
|
8011
|
+
const reactId = React91__default.useId();
|
|
7942
8012
|
const baseId = id || `radio-${reactId}`;
|
|
7943
8013
|
const hasError = !!error;
|
|
7944
8014
|
const eventBus = useEventBus();
|
|
7945
|
-
const [selected, setSelected] =
|
|
7946
|
-
|
|
8015
|
+
const [selected, setSelected] = React91__default.useState(value);
|
|
8016
|
+
React91__default.useEffect(() => {
|
|
7947
8017
|
if (value !== void 0) setSelected(value);
|
|
7948
8018
|
}, [value]);
|
|
7949
8019
|
const pick = (next, e) => {
|
|
@@ -8125,7 +8195,7 @@ var init_Switch = __esm({
|
|
|
8125
8195
|
"components/core/atoms/Switch.tsx"() {
|
|
8126
8196
|
"use client";
|
|
8127
8197
|
init_cn();
|
|
8128
|
-
Switch =
|
|
8198
|
+
Switch = React91.forwardRef(
|
|
8129
8199
|
({
|
|
8130
8200
|
checked,
|
|
8131
8201
|
defaultChecked = false,
|
|
@@ -8136,10 +8206,10 @@ var init_Switch = __esm({
|
|
|
8136
8206
|
name,
|
|
8137
8207
|
className
|
|
8138
8208
|
}, ref) => {
|
|
8139
|
-
const [isChecked, setIsChecked] =
|
|
8209
|
+
const [isChecked, setIsChecked] = React91.useState(
|
|
8140
8210
|
checked !== void 0 ? checked : defaultChecked
|
|
8141
8211
|
);
|
|
8142
|
-
|
|
8212
|
+
React91.useEffect(() => {
|
|
8143
8213
|
if (checked !== void 0) {
|
|
8144
8214
|
setIsChecked(checked);
|
|
8145
8215
|
}
|
|
@@ -8170,7 +8240,7 @@ var init_Switch = __esm({
|
|
|
8170
8240
|
// redefine --space-11 to 68px, which makes w-11 enormous and leaves
|
|
8171
8241
|
// the thumb stuck near the left edge. The switch geometry must stay
|
|
8172
8242
|
// 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",
|
|
8243
|
+
"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
8244
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
8175
8245
|
isChecked ? "bg-primary" : "bg-muted",
|
|
8176
8246
|
disabled && "cursor-not-allowed opacity-50"
|
|
@@ -8179,7 +8249,7 @@ var init_Switch = __esm({
|
|
|
8179
8249
|
"span",
|
|
8180
8250
|
{
|
|
8181
8251
|
className: cn(
|
|
8182
|
-
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
8252
|
+
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform duration-fast",
|
|
8183
8253
|
isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
|
|
8184
8254
|
)
|
|
8185
8255
|
}
|
|
@@ -8262,7 +8332,7 @@ var init_TextHighlight = __esm({
|
|
|
8262
8332
|
hoverEvent
|
|
8263
8333
|
}) => {
|
|
8264
8334
|
const eventBus = useEventBus();
|
|
8265
|
-
const baseStyles = "cursor-pointer transition-all duration-
|
|
8335
|
+
const baseStyles = "cursor-pointer transition-all duration-fast";
|
|
8266
8336
|
const typeStyles = {
|
|
8267
8337
|
question: cn(
|
|
8268
8338
|
// Blue border for questions
|
|
@@ -8417,7 +8487,7 @@ var Aside;
|
|
|
8417
8487
|
var init_Aside = __esm({
|
|
8418
8488
|
"components/core/atoms/Aside.tsx"() {
|
|
8419
8489
|
init_cn();
|
|
8420
|
-
Aside =
|
|
8490
|
+
Aside = React91__default.forwardRef(
|
|
8421
8491
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8422
8492
|
);
|
|
8423
8493
|
Aside.displayName = "Aside";
|
|
@@ -8496,9 +8566,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8496
8566
|
className
|
|
8497
8567
|
}) => {
|
|
8498
8568
|
const { t } = useTranslate();
|
|
8499
|
-
const [isVisible, setIsVisible] =
|
|
8500
|
-
const timeoutRef =
|
|
8501
|
-
const triggerRef =
|
|
8569
|
+
const [isVisible, setIsVisible] = React91__default.useState(false);
|
|
8570
|
+
const timeoutRef = React91__default.useRef(null);
|
|
8571
|
+
const triggerRef = React91__default.useRef(null);
|
|
8502
8572
|
const handleMouseEnter = () => {
|
|
8503
8573
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8504
8574
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8509,7 +8579,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8509
8579
|
};
|
|
8510
8580
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8511
8581
|
const open = isVisible || revealed;
|
|
8512
|
-
|
|
8582
|
+
React91__default.useEffect(() => {
|
|
8513
8583
|
return () => {
|
|
8514
8584
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8515
8585
|
};
|
|
@@ -8719,7 +8789,7 @@ var init_StatusDot = __esm({
|
|
|
8719
8789
|
md: "w-2.5 h-2.5",
|
|
8720
8790
|
lg: "w-3 h-3"
|
|
8721
8791
|
};
|
|
8722
|
-
StatusDot =
|
|
8792
|
+
StatusDot = React91__default.forwardRef(
|
|
8723
8793
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
8724
8794
|
return /* @__PURE__ */ jsx(
|
|
8725
8795
|
"span",
|
|
@@ -8773,7 +8843,7 @@ var init_TrendIndicator = __esm({
|
|
|
8773
8843
|
down: "trending-down",
|
|
8774
8844
|
flat: "arrow-right"
|
|
8775
8845
|
};
|
|
8776
|
-
TrendIndicator =
|
|
8846
|
+
TrendIndicator = React91__default.forwardRef(
|
|
8777
8847
|
({
|
|
8778
8848
|
className,
|
|
8779
8849
|
value,
|
|
@@ -8840,7 +8910,7 @@ var init_RangeSlider = __esm({
|
|
|
8840
8910
|
md: "w-4 h-4",
|
|
8841
8911
|
lg: "w-5 h-5"
|
|
8842
8912
|
};
|
|
8843
|
-
RangeSlider =
|
|
8913
|
+
RangeSlider = React91__default.forwardRef(
|
|
8844
8914
|
({
|
|
8845
8915
|
className,
|
|
8846
8916
|
min = 0,
|
|
@@ -8983,7 +9053,7 @@ var init_RangeSlider = __esm({
|
|
|
8983
9053
|
"border-2 border-primary",
|
|
8984
9054
|
"shadow-sm",
|
|
8985
9055
|
"pointer-events-none",
|
|
8986
|
-
"transition-transform duration-
|
|
9056
|
+
"transition-transform duration-instant",
|
|
8987
9057
|
isDragging && "scale-[var(--hover-scale)]",
|
|
8988
9058
|
thumbSizes[size]
|
|
8989
9059
|
),
|
|
@@ -9451,7 +9521,7 @@ var init_ContentSection = __esm({
|
|
|
9451
9521
|
md: "py-16",
|
|
9452
9522
|
lg: "py-24"
|
|
9453
9523
|
};
|
|
9454
|
-
ContentSection =
|
|
9524
|
+
ContentSection = React91__default.forwardRef(
|
|
9455
9525
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9456
9526
|
return /* @__PURE__ */ jsx(
|
|
9457
9527
|
Box,
|
|
@@ -9985,7 +10055,7 @@ var init_AnimatedReveal = __esm({
|
|
|
9985
10055
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
9986
10056
|
"none": {}
|
|
9987
10057
|
};
|
|
9988
|
-
AnimatedReveal =
|
|
10058
|
+
AnimatedReveal = React91__default.forwardRef(
|
|
9989
10059
|
({
|
|
9990
10060
|
trigger = "scroll",
|
|
9991
10061
|
animation = "fade-up",
|
|
@@ -10145,7 +10215,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10145
10215
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10146
10216
|
"use client";
|
|
10147
10217
|
init_cn();
|
|
10148
|
-
AnimatedGraphic =
|
|
10218
|
+
AnimatedGraphic = React91__default.forwardRef(
|
|
10149
10219
|
({
|
|
10150
10220
|
src,
|
|
10151
10221
|
svgContent,
|
|
@@ -10168,7 +10238,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10168
10238
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10169
10239
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10170
10240
|
const prevAnimateRef = useRef(animate);
|
|
10171
|
-
const setRef =
|
|
10241
|
+
const setRef = React91__default.useCallback(
|
|
10172
10242
|
(node) => {
|
|
10173
10243
|
containerRef.current = node;
|
|
10174
10244
|
if (typeof ref === "function") ref(node);
|
|
@@ -10896,9 +10966,9 @@ function ControlButton({
|
|
|
10896
10966
|
className
|
|
10897
10967
|
}) {
|
|
10898
10968
|
const eventBus = useEventBus();
|
|
10899
|
-
const [isPressed, setIsPressed] =
|
|
10969
|
+
const [isPressed, setIsPressed] = React91.useState(false);
|
|
10900
10970
|
const actualPressed = pressed ?? isPressed;
|
|
10901
|
-
const handlePointerDown =
|
|
10971
|
+
const handlePointerDown = React91.useCallback(
|
|
10902
10972
|
(e) => {
|
|
10903
10973
|
e.preventDefault();
|
|
10904
10974
|
if (disabled) return;
|
|
@@ -10908,7 +10978,7 @@ function ControlButton({
|
|
|
10908
10978
|
},
|
|
10909
10979
|
[disabled, pressEvent, eventBus, onPress]
|
|
10910
10980
|
);
|
|
10911
|
-
const handlePointerUp =
|
|
10981
|
+
const handlePointerUp = React91.useCallback(
|
|
10912
10982
|
(e) => {
|
|
10913
10983
|
e.preventDefault();
|
|
10914
10984
|
if (disabled) return;
|
|
@@ -10918,7 +10988,7 @@ function ControlButton({
|
|
|
10918
10988
|
},
|
|
10919
10989
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
10920
10990
|
);
|
|
10921
|
-
const handlePointerLeave =
|
|
10991
|
+
const handlePointerLeave = React91.useCallback(
|
|
10922
10992
|
(e) => {
|
|
10923
10993
|
if (isPressed) {
|
|
10924
10994
|
setIsPressed(false);
|
|
@@ -11176,8 +11246,8 @@ function ControlGrid({
|
|
|
11176
11246
|
className
|
|
11177
11247
|
}) {
|
|
11178
11248
|
const eventBus = useEventBus();
|
|
11179
|
-
const [active, setActive] =
|
|
11180
|
-
const handlePress =
|
|
11249
|
+
const [active, setActive] = React91.useState(/* @__PURE__ */ new Set());
|
|
11250
|
+
const handlePress = React91.useCallback(
|
|
11181
11251
|
(id) => {
|
|
11182
11252
|
setActive((prev) => new Set(prev).add(id));
|
|
11183
11253
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -11191,7 +11261,7 @@ function ControlGrid({
|
|
|
11191
11261
|
},
|
|
11192
11262
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
11193
11263
|
);
|
|
11194
|
-
const handleRelease =
|
|
11264
|
+
const handleRelease = React91.useCallback(
|
|
11195
11265
|
(id) => {
|
|
11196
11266
|
setActive((prev) => {
|
|
11197
11267
|
const next = new Set(prev);
|
|
@@ -11484,17 +11554,18 @@ function GameHud({
|
|
|
11484
11554
|
const mid = Math.ceil(stats.length / 2);
|
|
11485
11555
|
const leftStats = stats.slice(0, mid);
|
|
11486
11556
|
const rightStats = stats.slice(mid);
|
|
11487
|
-
const isTop = position === "top";
|
|
11488
11557
|
return /* @__PURE__ */ jsxs(
|
|
11489
|
-
|
|
11558
|
+
Card,
|
|
11490
11559
|
{
|
|
11560
|
+
variant: "bordered",
|
|
11561
|
+
padding: "none",
|
|
11491
11562
|
className: cn(
|
|
11492
|
-
"flex items-center justify-between w-full",
|
|
11563
|
+
"flex items-center justify-between w-full rounded-none bg-card",
|
|
11493
11564
|
"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"),
|
|
11565
|
+
transparent && "backdrop-blur-sm",
|
|
11496
11566
|
className
|
|
11497
11567
|
),
|
|
11568
|
+
style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 40%, transparent)" } : void 0,
|
|
11498
11569
|
children: [
|
|
11499
11570
|
/* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
|
|
11500
11571
|
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 +11574,16 @@ function GameHud({
|
|
|
11503
11574
|
);
|
|
11504
11575
|
}
|
|
11505
11576
|
return /* @__PURE__ */ jsx(
|
|
11506
|
-
|
|
11577
|
+
Card,
|
|
11507
11578
|
{
|
|
11508
|
-
|
|
11579
|
+
variant: "bordered",
|
|
11580
|
+
padding: "sm",
|
|
11509
11581
|
className: cn(
|
|
11510
|
-
"z-10 flex items-center gap-4
|
|
11511
|
-
transparent
|
|
11582
|
+
"z-10 relative flex items-center gap-4 bg-card",
|
|
11583
|
+
transparent && "backdrop-blur-sm",
|
|
11512
11584
|
className
|
|
11513
11585
|
),
|
|
11586
|
+
style: transparent ? { backgroundColor: "color-mix(in srgb, var(--color-card) 30%, transparent)" } : void 0,
|
|
11514
11587
|
children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i))
|
|
11515
11588
|
}
|
|
11516
11589
|
);
|
|
@@ -11520,6 +11593,7 @@ var init_GameHud = __esm({
|
|
|
11520
11593
|
"components/game/molecules/GameHud.tsx"() {
|
|
11521
11594
|
init_cn();
|
|
11522
11595
|
init_Box();
|
|
11596
|
+
init_Card();
|
|
11523
11597
|
init_StatBadge();
|
|
11524
11598
|
positionMap = {
|
|
11525
11599
|
corners: "inset-0 pointer-events-none"
|
|
@@ -11545,7 +11619,7 @@ function GameMenu({
|
|
|
11545
11619
|
}) {
|
|
11546
11620
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
11547
11621
|
const eventBus = useEventBus();
|
|
11548
|
-
const handleOptionClick =
|
|
11622
|
+
const handleOptionClick = React91.useCallback(
|
|
11549
11623
|
(option) => {
|
|
11550
11624
|
if (option.event) {
|
|
11551
11625
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -11564,39 +11638,48 @@ function GameMenu({
|
|
|
11564
11638
|
{
|
|
11565
11639
|
className: cn(
|
|
11566
11640
|
"min-h-screen w-full flex flex-col items-center justify-center p-8",
|
|
11641
|
+
!background && "bg-background",
|
|
11567
11642
|
className
|
|
11568
11643
|
),
|
|
11569
|
-
style: {
|
|
11570
|
-
background: background ?? "linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0e17 100%)"
|
|
11571
|
-
},
|
|
11644
|
+
style: background ? { background } : void 0,
|
|
11572
11645
|
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
|
-
|
|
11646
|
+
/* @__PURE__ */ jsxs(
|
|
11647
|
+
Card,
|
|
11648
|
+
{
|
|
11649
|
+
variant: "bordered",
|
|
11650
|
+
padding: "lg",
|
|
11651
|
+
className: "bg-card flex flex-col items-center max-w-md w-full",
|
|
11652
|
+
children: [
|
|
11653
|
+
/* @__PURE__ */ jsxs(Box, { className: "text-center mb-8 animate-fade-in", children: [
|
|
11654
|
+
logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
|
|
11655
|
+
/* @__PURE__ */ jsx(
|
|
11656
|
+
Typography,
|
|
11657
|
+
{
|
|
11658
|
+
variant: "h1",
|
|
11659
|
+
className: "text-4xl md:text-5xl font-bold text-foreground tracking-tight",
|
|
11660
|
+
style: {
|
|
11661
|
+
textShadow: "0 4px 12px rgba(0,0,0,0.5)"
|
|
11662
|
+
},
|
|
11663
|
+
children: title
|
|
11664
|
+
}
|
|
11665
|
+
),
|
|
11666
|
+
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
11667
|
+
] }),
|
|
11668
|
+
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
11669
|
+
ChoiceButton,
|
|
11670
|
+
{
|
|
11671
|
+
text: option.label,
|
|
11672
|
+
index: index + 1,
|
|
11673
|
+
disabled: option.disabled,
|
|
11674
|
+
onClick: () => handleOptionClick(option),
|
|
11675
|
+
className: "text-lg py-4 px-8"
|
|
11676
|
+
},
|
|
11677
|
+
index
|
|
11678
|
+
)) })
|
|
11679
|
+
]
|
|
11680
|
+
}
|
|
11681
|
+
),
|
|
11682
|
+
/* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden -z-10", children: [
|
|
11600
11683
|
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
|
|
11601
11684
|
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
|
|
11602
11685
|
] })
|
|
@@ -11611,6 +11694,7 @@ var init_GameMenu = __esm({
|
|
|
11611
11694
|
init_cn();
|
|
11612
11695
|
init_useEventBus();
|
|
11613
11696
|
init_Box();
|
|
11697
|
+
init_Card();
|
|
11614
11698
|
init_Typography();
|
|
11615
11699
|
init_GameIcon();
|
|
11616
11700
|
init_ChoiceButton();
|
|
@@ -11771,7 +11855,7 @@ function StateGraph({
|
|
|
11771
11855
|
}) {
|
|
11772
11856
|
const eventBus = useEventBus();
|
|
11773
11857
|
const nodes = states ?? [];
|
|
11774
|
-
const positions =
|
|
11858
|
+
const positions = React91.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
11775
11859
|
return /* @__PURE__ */ jsxs(
|
|
11776
11860
|
Box,
|
|
11777
11861
|
{
|
|
@@ -11842,8 +11926,8 @@ function MiniMap({
|
|
|
11842
11926
|
tileAssets,
|
|
11843
11927
|
unitAssets
|
|
11844
11928
|
}) {
|
|
11845
|
-
const canvasRef =
|
|
11846
|
-
const imgCacheRef =
|
|
11929
|
+
const canvasRef = React91.useRef(null);
|
|
11930
|
+
const imgCacheRef = React91.useRef(/* @__PURE__ */ new Map());
|
|
11847
11931
|
function loadImg(url) {
|
|
11848
11932
|
const cached = imgCacheRef.current.get(url);
|
|
11849
11933
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -11858,7 +11942,7 @@ function MiniMap({
|
|
|
11858
11942
|
imgCacheRef.current.set(url, img);
|
|
11859
11943
|
return null;
|
|
11860
11944
|
}
|
|
11861
|
-
|
|
11945
|
+
React91.useEffect(() => {
|
|
11862
11946
|
const canvas = canvasRef.current;
|
|
11863
11947
|
if (!canvas) return;
|
|
11864
11948
|
const ctx = canvas.getContext("2d");
|
|
@@ -13280,7 +13364,7 @@ function LinearView({
|
|
|
13280
13364
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
13281
13365
|
const isDone = i < currentIdx;
|
|
13282
13366
|
const isCurrent = i === currentIdx;
|
|
13283
|
-
return /* @__PURE__ */ jsxs(
|
|
13367
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
13284
13368
|
i > 0 && /* @__PURE__ */ jsx(
|
|
13285
13369
|
Typography,
|
|
13286
13370
|
{
|
|
@@ -13815,7 +13899,7 @@ function SequenceBar({
|
|
|
13815
13899
|
else onSlotRemove?.(index);
|
|
13816
13900
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
13817
13901
|
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(
|
|
13902
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
13819
13903
|
i > 0 && /* @__PURE__ */ jsx(
|
|
13820
13904
|
Typography,
|
|
13821
13905
|
{
|
|
@@ -13902,6 +13986,7 @@ var init_GameShell = __esm({
|
|
|
13902
13986
|
"components/game/templates/GameShell.tsx"() {
|
|
13903
13987
|
init_cn();
|
|
13904
13988
|
init_Box();
|
|
13989
|
+
init_Card();
|
|
13905
13990
|
init_Typography();
|
|
13906
13991
|
init_AtlasImage();
|
|
13907
13992
|
FONT_BASE = "https://almadar-kflow-assets.web.app/shared/_shared/kenney-fonts/fonts";
|
|
@@ -13930,13 +14015,14 @@ var init_GameShell = __esm({
|
|
|
13930
14015
|
showTopBar = true,
|
|
13931
14016
|
children,
|
|
13932
14017
|
backgroundAsset,
|
|
13933
|
-
|
|
13934
|
-
|
|
14018
|
+
fontFamily = "future",
|
|
14019
|
+
"data-theme": dataTheme
|
|
13935
14020
|
}) => {
|
|
13936
14021
|
const font = GAME_FONTS[fontFamily] ?? fontFamily;
|
|
13937
14022
|
return /* @__PURE__ */ jsxs(
|
|
13938
14023
|
Box,
|
|
13939
14024
|
{
|
|
14025
|
+
"data-theme": dataTheme || void 0,
|
|
13940
14026
|
className: cn("game-shell", className),
|
|
13941
14027
|
style: {
|
|
13942
14028
|
position: "relative",
|
|
@@ -13944,7 +14030,7 @@ var init_GameShell = __esm({
|
|
|
13944
14030
|
height: "100vh",
|
|
13945
14031
|
overflow: "hidden",
|
|
13946
14032
|
background: "var(--color-background, #0a0a0f)",
|
|
13947
|
-
color: "var(--color-
|
|
14033
|
+
color: "var(--color-foreground, #e0e0e0)",
|
|
13948
14034
|
fontFamily: `'${font}', system-ui, sans-serif`
|
|
13949
14035
|
},
|
|
13950
14036
|
children: [
|
|
@@ -13976,19 +14062,12 @@ var init_GameShell = __esm({
|
|
|
13976
14062
|
},
|
|
13977
14063
|
children: [
|
|
13978
14064
|
showTopBar && /* @__PURE__ */ jsx(
|
|
13979
|
-
|
|
14065
|
+
Card,
|
|
13980
14066
|
{
|
|
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
|
-
},
|
|
14067
|
+
variant: "bordered",
|
|
14068
|
+
padding: "none",
|
|
14069
|
+
className: "game-shell__title bg-card pointer-events-auto",
|
|
14070
|
+
style: { padding: "6px 16px", flexShrink: 0 },
|
|
13992
14071
|
children: /* @__PURE__ */ jsx(
|
|
13993
14072
|
Typography,
|
|
13994
14073
|
{
|
|
@@ -14469,7 +14548,7 @@ var init_ErrorBoundary = __esm({
|
|
|
14469
14548
|
}
|
|
14470
14549
|
);
|
|
14471
14550
|
};
|
|
14472
|
-
ErrorBoundary = class extends
|
|
14551
|
+
ErrorBoundary = class extends React91__default.Component {
|
|
14473
14552
|
constructor(props) {
|
|
14474
14553
|
super(props);
|
|
14475
14554
|
__publicField(this, "reset", () => {
|
|
@@ -14736,7 +14815,7 @@ var init_Container = __esm({
|
|
|
14736
14815
|
as: Component = "div"
|
|
14737
14816
|
}) => {
|
|
14738
14817
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
14739
|
-
return
|
|
14818
|
+
return React91__default.createElement(
|
|
14740
14819
|
Component,
|
|
14741
14820
|
{
|
|
14742
14821
|
className: cn(
|
|
@@ -16736,7 +16815,7 @@ var init_CodeBlock = __esm({
|
|
|
16736
16815
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
16737
16816
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
16738
16817
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
16739
|
-
CodeBlock =
|
|
16818
|
+
CodeBlock = React91__default.memo(
|
|
16740
16819
|
({
|
|
16741
16820
|
code: rawCode,
|
|
16742
16821
|
language = "text",
|
|
@@ -17323,7 +17402,7 @@ var init_MarkdownContent = __esm({
|
|
|
17323
17402
|
init_Box();
|
|
17324
17403
|
init_CodeBlock();
|
|
17325
17404
|
init_cn();
|
|
17326
|
-
MarkdownContent =
|
|
17405
|
+
MarkdownContent = React91__default.memo(
|
|
17327
17406
|
({ content, direction = "ltr", className }) => {
|
|
17328
17407
|
const { t: _t } = useTranslate();
|
|
17329
17408
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -18286,7 +18365,7 @@ var init_StateMachineView = __esm({
|
|
|
18286
18365
|
Box,
|
|
18287
18366
|
{
|
|
18288
18367
|
className: cn(
|
|
18289
|
-
"fixed z-50 animate-in fade-in-0 zoom-in-95 duration-
|
|
18368
|
+
"fixed z-50 animate-in fade-in-0 zoom-in-95 duration-fast",
|
|
18290
18369
|
tooltip.pinned ? "pointer-events-auto" : "pointer-events-none"
|
|
18291
18370
|
),
|
|
18292
18371
|
style: {
|
|
@@ -18650,7 +18729,7 @@ var init_StateMachineView = __esm({
|
|
|
18650
18729
|
style: { top: title ? 30 : 0 },
|
|
18651
18730
|
children: [
|
|
18652
18731
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
18653
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
18732
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React91__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
18654
18733
|
StateNode2,
|
|
18655
18734
|
{
|
|
18656
18735
|
state,
|
|
@@ -20689,6 +20768,129 @@ var init_Breadcrumb = __esm({
|
|
|
20689
20768
|
Breadcrumb.displayName = "Breadcrumb";
|
|
20690
20769
|
}
|
|
20691
20770
|
});
|
|
20771
|
+
function useSafeEventBus2() {
|
|
20772
|
+
try {
|
|
20773
|
+
return useEventBus();
|
|
20774
|
+
} catch {
|
|
20775
|
+
return { emit: () => {
|
|
20776
|
+
}, on: () => () => {
|
|
20777
|
+
}, once: () => {
|
|
20778
|
+
} };
|
|
20779
|
+
}
|
|
20780
|
+
}
|
|
20781
|
+
var log5, lookStyles4, ButtonGroup;
|
|
20782
|
+
var init_ButtonGroup = __esm({
|
|
20783
|
+
"components/core/molecules/ButtonGroup.tsx"() {
|
|
20784
|
+
"use client";
|
|
20785
|
+
init_cn();
|
|
20786
|
+
init_atoms();
|
|
20787
|
+
init_useEventBus();
|
|
20788
|
+
log5 = createLogger("almadar:ui:button-group");
|
|
20789
|
+
lookStyles4 = {
|
|
20790
|
+
"right-aligned-buttons": "",
|
|
20791
|
+
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
20792
|
+
"inline-row": "gap-2 inline-flex",
|
|
20793
|
+
"dropdown-menu": "[&>button:not(:first-child)]:hidden",
|
|
20794
|
+
"command-palette-trigger": "[&>button:not(:first-child)]:hidden"
|
|
20795
|
+
};
|
|
20796
|
+
ButtonGroup = ({
|
|
20797
|
+
children,
|
|
20798
|
+
primary,
|
|
20799
|
+
secondary,
|
|
20800
|
+
variant = "default",
|
|
20801
|
+
orientation = "horizontal",
|
|
20802
|
+
className,
|
|
20803
|
+
// Filter-group pattern props (entity and filters are used for schema-driven filtering)
|
|
20804
|
+
entity: _entity,
|
|
20805
|
+
filters,
|
|
20806
|
+
look = "right-aligned-buttons"
|
|
20807
|
+
}) => {
|
|
20808
|
+
const eventBus = useSafeEventBus2();
|
|
20809
|
+
const variantClasses2 = {
|
|
20810
|
+
default: "gap-0",
|
|
20811
|
+
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",
|
|
20812
|
+
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"
|
|
20813
|
+
};
|
|
20814
|
+
const orientationClasses = {
|
|
20815
|
+
horizontal: "flex-row",
|
|
20816
|
+
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"
|
|
20817
|
+
};
|
|
20818
|
+
const handleActionClick = (action) => {
|
|
20819
|
+
if (action.event) {
|
|
20820
|
+
eventBus.emit("UI:DISPATCH", { event: action.event });
|
|
20821
|
+
}
|
|
20822
|
+
if (action.navigatesTo) {
|
|
20823
|
+
eventBus.emit("UI:NAVIGATE", { url: action.navigatesTo });
|
|
20824
|
+
}
|
|
20825
|
+
};
|
|
20826
|
+
const renderFormActions = () => {
|
|
20827
|
+
const buttons = [];
|
|
20828
|
+
if (secondary) {
|
|
20829
|
+
secondary.forEach((action, index) => {
|
|
20830
|
+
buttons.push(
|
|
20831
|
+
/* @__PURE__ */ jsx(
|
|
20832
|
+
Button,
|
|
20833
|
+
{
|
|
20834
|
+
type: action.actionType === "submit" ? "submit" : "button",
|
|
20835
|
+
variant: action.variant || "ghost",
|
|
20836
|
+
onClick: () => handleActionClick(action),
|
|
20837
|
+
children: action.label
|
|
20838
|
+
},
|
|
20839
|
+
`secondary-${index}`
|
|
20840
|
+
)
|
|
20841
|
+
);
|
|
20842
|
+
});
|
|
20843
|
+
}
|
|
20844
|
+
if (primary) {
|
|
20845
|
+
const isSubmit = primary.actionType === "submit";
|
|
20846
|
+
buttons.push(
|
|
20847
|
+
/* @__PURE__ */ jsx(
|
|
20848
|
+
Button,
|
|
20849
|
+
{
|
|
20850
|
+
type: isSubmit ? "submit" : "button",
|
|
20851
|
+
variant: primary.variant || "primary",
|
|
20852
|
+
onClick: () => handleActionClick(primary),
|
|
20853
|
+
"data-testid": isSubmit ? "form-submit" : void 0,
|
|
20854
|
+
children: primary.label
|
|
20855
|
+
},
|
|
20856
|
+
"primary"
|
|
20857
|
+
)
|
|
20858
|
+
);
|
|
20859
|
+
}
|
|
20860
|
+
return buttons;
|
|
20861
|
+
};
|
|
20862
|
+
const renderFilters = () => {
|
|
20863
|
+
if (!filters || filters.length === 0) return null;
|
|
20864
|
+
return filters.map((filter, index) => /* @__PURE__ */ jsx(
|
|
20865
|
+
Button,
|
|
20866
|
+
{
|
|
20867
|
+
variant: "ghost",
|
|
20868
|
+
onClick: () => {
|
|
20869
|
+
log5.debug("Filter clicked", { field: filter.field });
|
|
20870
|
+
},
|
|
20871
|
+
children: filter.label
|
|
20872
|
+
},
|
|
20873
|
+
`filter-${filter.field}-${index}`
|
|
20874
|
+
));
|
|
20875
|
+
};
|
|
20876
|
+
return /* @__PURE__ */ jsx(
|
|
20877
|
+
"div",
|
|
20878
|
+
{
|
|
20879
|
+
className: cn(
|
|
20880
|
+
"inline-flex gap-2",
|
|
20881
|
+
variantClasses2[variant],
|
|
20882
|
+
orientationClasses[orientation],
|
|
20883
|
+
lookStyles4[look],
|
|
20884
|
+
className
|
|
20885
|
+
),
|
|
20886
|
+
role: "group",
|
|
20887
|
+
children: children || renderFilters() || renderFormActions()
|
|
20888
|
+
}
|
|
20889
|
+
);
|
|
20890
|
+
};
|
|
20891
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
20892
|
+
}
|
|
20893
|
+
});
|
|
20692
20894
|
function useSwipeGesture(callbacks, options = {}) {
|
|
20693
20895
|
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
20694
20896
|
const startX = useRef(0);
|
|
@@ -21498,7 +21700,7 @@ var init_CardGrid = __esm({
|
|
|
21498
21700
|
CardGrid.displayName = "CardGrid";
|
|
21499
21701
|
}
|
|
21500
21702
|
});
|
|
21501
|
-
function
|
|
21703
|
+
function useSafeEventBus3() {
|
|
21502
21704
|
try {
|
|
21503
21705
|
return useEventBus();
|
|
21504
21706
|
} catch {
|
|
@@ -21534,7 +21736,7 @@ var init_Carousel = __esm({
|
|
|
21534
21736
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
21535
21737
|
const scrollRef = useRef(null);
|
|
21536
21738
|
const autoPlayRef = useRef(null);
|
|
21537
|
-
const eventBus =
|
|
21739
|
+
const eventBus = useSafeEventBus3();
|
|
21538
21740
|
const { t } = useTranslate();
|
|
21539
21741
|
const safeItems = items ?? [];
|
|
21540
21742
|
const totalSlides = safeItems.length;
|
|
@@ -21896,7 +22098,7 @@ var init_Chart = __esm({
|
|
|
21896
22098
|
return /* @__PURE__ */ jsx(
|
|
21897
22099
|
Box,
|
|
21898
22100
|
{
|
|
21899
|
-
className: "h-full rounded-r-sm transition-all duration-
|
|
22101
|
+
className: "h-full rounded-r-sm transition-all duration-slow ease-standard min-w-[2px] cursor-pointer hover:opacity-80",
|
|
21900
22102
|
style: {
|
|
21901
22103
|
width: `${ratio}%`,
|
|
21902
22104
|
backgroundColor: color
|
|
@@ -21952,7 +22154,7 @@ var init_Chart = __esm({
|
|
|
21952
22154
|
Box,
|
|
21953
22155
|
{
|
|
21954
22156
|
className: cn(
|
|
21955
|
-
"rounded-t-sm transition-all duration-
|
|
22157
|
+
"rounded-t-sm transition-all duration-slow ease-standard min-h-[4px] cursor-pointer hover:opacity-80",
|
|
21956
22158
|
histogram ? "flex-1 mx-0" : "flex-1"
|
|
21957
22159
|
),
|
|
21958
22160
|
style: {
|
|
@@ -22002,7 +22204,7 @@ var init_Chart = __esm({
|
|
|
22002
22204
|
return /* @__PURE__ */ jsx(
|
|
22003
22205
|
Box,
|
|
22004
22206
|
{
|
|
22005
|
-
className: "w-full transition-all duration-
|
|
22207
|
+
className: "w-full transition-all duration-slow ease-standard cursor-pointer hover:opacity-80",
|
|
22006
22208
|
style: {
|
|
22007
22209
|
height: `${ratio}%`,
|
|
22008
22210
|
backgroundColor: color
|
|
@@ -22092,7 +22294,7 @@ var init_Chart = __esm({
|
|
|
22092
22294
|
fill: seg.color,
|
|
22093
22295
|
stroke: "var(--color-card)",
|
|
22094
22296
|
strokeWidth: "2",
|
|
22095
|
-
className: "transition-opacity duration-
|
|
22297
|
+
className: "transition-opacity duration-fast hover:opacity-80 cursor-pointer",
|
|
22096
22298
|
onClick: () => onPointClick?.(
|
|
22097
22299
|
{ label: seg.label, value: seg.value, color: seg.color },
|
|
22098
22300
|
"default"
|
|
@@ -24305,8 +24507,8 @@ var init_Menu = __esm({
|
|
|
24305
24507
|
"bottom-end": "bottom-start"
|
|
24306
24508
|
};
|
|
24307
24509
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
24308
|
-
const triggerChild =
|
|
24309
|
-
const triggerElement =
|
|
24510
|
+
const triggerChild = React91__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
24511
|
+
const triggerElement = React91__default.cloneElement(
|
|
24310
24512
|
triggerChild,
|
|
24311
24513
|
{
|
|
24312
24514
|
ref: triggerRef,
|
|
@@ -24401,14 +24603,14 @@ function useDataDnd(args) {
|
|
|
24401
24603
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
24402
24604
|
const enabled = isZone || Boolean(dndRoot);
|
|
24403
24605
|
const eventBus = useEventBus();
|
|
24404
|
-
const parentRoot =
|
|
24606
|
+
const parentRoot = React91__default.useContext(RootCtx);
|
|
24405
24607
|
const isRoot = enabled && parentRoot === null;
|
|
24406
|
-
const zoneId =
|
|
24608
|
+
const zoneId = React91__default.useId();
|
|
24407
24609
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
24408
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
24409
|
-
const optimisticOrdersRef =
|
|
24610
|
+
const [optimisticOrders, setOptimisticOrders] = React91__default.useState(() => /* @__PURE__ */ new Map());
|
|
24611
|
+
const optimisticOrdersRef = React91__default.useRef(optimisticOrders);
|
|
24410
24612
|
optimisticOrdersRef.current = optimisticOrders;
|
|
24411
|
-
const clearOptimisticOrder =
|
|
24613
|
+
const clearOptimisticOrder = React91__default.useCallback((group) => {
|
|
24412
24614
|
setOptimisticOrders((prev) => {
|
|
24413
24615
|
if (!prev.has(group)) return prev;
|
|
24414
24616
|
const next = new Map(prev);
|
|
@@ -24433,7 +24635,7 @@ function useDataDnd(args) {
|
|
|
24433
24635
|
const raw = it[dndItemIdField];
|
|
24434
24636
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
24435
24637
|
}).join("|");
|
|
24436
|
-
const itemIds =
|
|
24638
|
+
const itemIds = React91__default.useMemo(
|
|
24437
24639
|
() => orderedItems.map((it, idx) => {
|
|
24438
24640
|
const raw = it[dndItemIdField];
|
|
24439
24641
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -24444,7 +24646,7 @@ function useDataDnd(args) {
|
|
|
24444
24646
|
const raw = it[dndItemIdField];
|
|
24445
24647
|
return raw != null ? String(raw) : `__${idx}`;
|
|
24446
24648
|
}).join("|");
|
|
24447
|
-
|
|
24649
|
+
React91__default.useEffect(() => {
|
|
24448
24650
|
const root = isRoot ? null : parentRoot;
|
|
24449
24651
|
if (root) {
|
|
24450
24652
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -24452,20 +24654,20 @@ function useDataDnd(args) {
|
|
|
24452
24654
|
clearOptimisticOrder(ownGroup);
|
|
24453
24655
|
}
|
|
24454
24656
|
}, [itemsContentSig, ownGroup]);
|
|
24455
|
-
const zonesRef =
|
|
24456
|
-
const registerZone =
|
|
24657
|
+
const zonesRef = React91__default.useRef(/* @__PURE__ */ new Map());
|
|
24658
|
+
const registerZone = React91__default.useCallback((zoneId2, meta2) => {
|
|
24457
24659
|
zonesRef.current.set(zoneId2, meta2);
|
|
24458
24660
|
}, []);
|
|
24459
|
-
const unregisterZone =
|
|
24661
|
+
const unregisterZone = React91__default.useCallback((zoneId2) => {
|
|
24460
24662
|
zonesRef.current.delete(zoneId2);
|
|
24461
24663
|
}, []);
|
|
24462
|
-
const [activeDrag, setActiveDrag] =
|
|
24463
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
24464
|
-
const meta =
|
|
24664
|
+
const [activeDrag, setActiveDrag] = React91__default.useState(null);
|
|
24665
|
+
const [overZoneGroup, setOverZoneGroup] = React91__default.useState(null);
|
|
24666
|
+
const meta = React91__default.useMemo(
|
|
24465
24667
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
24466
24668
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
24467
24669
|
);
|
|
24468
|
-
|
|
24670
|
+
React91__default.useEffect(() => {
|
|
24469
24671
|
const target = isRoot ? null : parentRoot;
|
|
24470
24672
|
if (!target) {
|
|
24471
24673
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -24484,7 +24686,7 @@ function useDataDnd(args) {
|
|
|
24484
24686
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
24485
24687
|
const sensors = useAlmadarDndSensors(true);
|
|
24486
24688
|
const collisionDetection = almadarDndCollisionDetection;
|
|
24487
|
-
const findZoneByItem =
|
|
24689
|
+
const findZoneByItem = React91__default.useCallback(
|
|
24488
24690
|
(id) => {
|
|
24489
24691
|
for (const z of zonesRef.current.values()) {
|
|
24490
24692
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -24493,7 +24695,7 @@ function useDataDnd(args) {
|
|
|
24493
24695
|
},
|
|
24494
24696
|
[]
|
|
24495
24697
|
);
|
|
24496
|
-
|
|
24698
|
+
React91__default.useCallback(
|
|
24497
24699
|
(group) => {
|
|
24498
24700
|
for (const z of zonesRef.current.values()) {
|
|
24499
24701
|
if (z.group === group) return z;
|
|
@@ -24502,7 +24704,7 @@ function useDataDnd(args) {
|
|
|
24502
24704
|
},
|
|
24503
24705
|
[]
|
|
24504
24706
|
);
|
|
24505
|
-
const handleDragEnd =
|
|
24707
|
+
const handleDragEnd = React91__default.useCallback(
|
|
24506
24708
|
(event) => {
|
|
24507
24709
|
const { active, over } = event;
|
|
24508
24710
|
const activeIdStr = String(active.id);
|
|
@@ -24593,8 +24795,8 @@ function useDataDnd(args) {
|
|
|
24593
24795
|
},
|
|
24594
24796
|
[eventBus]
|
|
24595
24797
|
);
|
|
24596
|
-
const sortableData =
|
|
24597
|
-
const SortableItem =
|
|
24798
|
+
const sortableData = React91__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24799
|
+
const SortableItem = React91__default.useCallback(
|
|
24598
24800
|
({ id, children }) => {
|
|
24599
24801
|
const {
|
|
24600
24802
|
attributes,
|
|
@@ -24634,7 +24836,7 @@ function useDataDnd(args) {
|
|
|
24634
24836
|
id: droppableId,
|
|
24635
24837
|
data: sortableData
|
|
24636
24838
|
});
|
|
24637
|
-
const ctx =
|
|
24839
|
+
const ctx = React91__default.useContext(RootCtx);
|
|
24638
24840
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
24639
24841
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
24640
24842
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -24649,7 +24851,7 @@ function useDataDnd(args) {
|
|
|
24649
24851
|
showForeignPlaceholder,
|
|
24650
24852
|
ctxAvailable: ctx != null
|
|
24651
24853
|
});
|
|
24652
|
-
|
|
24854
|
+
React91__default.useEffect(() => {
|
|
24653
24855
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
24654
24856
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
24655
24857
|
return /* @__PURE__ */ jsx(
|
|
@@ -24663,11 +24865,11 @@ function useDataDnd(args) {
|
|
|
24663
24865
|
}
|
|
24664
24866
|
);
|
|
24665
24867
|
};
|
|
24666
|
-
const rootContextValue =
|
|
24868
|
+
const rootContextValue = React91__default.useMemo(
|
|
24667
24869
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
24668
24870
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
24669
24871
|
);
|
|
24670
|
-
const handleDragStart =
|
|
24872
|
+
const handleDragStart = React91__default.useCallback((event) => {
|
|
24671
24873
|
const sourceZone = findZoneByItem(event.active.id);
|
|
24672
24874
|
const rect = event.active.rect.current.initial;
|
|
24673
24875
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -24686,7 +24888,7 @@ function useDataDnd(args) {
|
|
|
24686
24888
|
isRoot
|
|
24687
24889
|
});
|
|
24688
24890
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
24689
|
-
const handleDragOver =
|
|
24891
|
+
const handleDragOver = React91__default.useCallback((event) => {
|
|
24690
24892
|
const { active, over } = event;
|
|
24691
24893
|
const overData = over?.data?.current;
|
|
24692
24894
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -24756,7 +24958,7 @@ function useDataDnd(args) {
|
|
|
24756
24958
|
return next;
|
|
24757
24959
|
});
|
|
24758
24960
|
}, []);
|
|
24759
|
-
const handleDragCancel =
|
|
24961
|
+
const handleDragCancel = React91__default.useCallback((event) => {
|
|
24760
24962
|
setActiveDrag(null);
|
|
24761
24963
|
setOverZoneGroup(null);
|
|
24762
24964
|
dndLog.warn("dragCancel", {
|
|
@@ -24764,12 +24966,12 @@ function useDataDnd(args) {
|
|
|
24764
24966
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
24765
24967
|
});
|
|
24766
24968
|
}, []);
|
|
24767
|
-
const handleDragEndWithCleanup =
|
|
24969
|
+
const handleDragEndWithCleanup = React91__default.useCallback((event) => {
|
|
24768
24970
|
handleDragEnd(event);
|
|
24769
24971
|
setActiveDrag(null);
|
|
24770
24972
|
setOverZoneGroup(null);
|
|
24771
24973
|
}, [handleDragEnd]);
|
|
24772
|
-
const wrapContainer =
|
|
24974
|
+
const wrapContainer = React91__default.useCallback(
|
|
24773
24975
|
(children) => {
|
|
24774
24976
|
if (!enabled) return children;
|
|
24775
24977
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24823,7 +25025,7 @@ var init_useDataDnd = __esm({
|
|
|
24823
25025
|
init_useAlmadarDndCollision();
|
|
24824
25026
|
init_Box();
|
|
24825
25027
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24826
|
-
RootCtx =
|
|
25028
|
+
RootCtx = React91__default.createContext(null);
|
|
24827
25029
|
}
|
|
24828
25030
|
});
|
|
24829
25031
|
function renderIconInput(icon, props) {
|
|
@@ -25020,7 +25222,7 @@ function DataGrid({
|
|
|
25020
25222
|
/* @__PURE__ */ jsx(
|
|
25021
25223
|
Box,
|
|
25022
25224
|
{
|
|
25023
|
-
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass,
|
|
25225
|
+
className: cn("grid", gapStyles5[gap], scrollX ? "grid-flow-col overflow-x-auto" : colsClass, lookStyles5[look], className),
|
|
25024
25226
|
style: scrollX ? { gridAutoFlow: "column", gridAutoColumns: `minmax(${minCardWidth}px, 1fr)` } : gridTemplateColumns ? { gridTemplateColumns } : void 0,
|
|
25025
25227
|
children: data.map((item, index) => {
|
|
25026
25228
|
const itemData = item;
|
|
@@ -25215,7 +25417,7 @@ function DataGrid({
|
|
|
25215
25417
|
] })
|
|
25216
25418
|
);
|
|
25217
25419
|
}
|
|
25218
|
-
var dataGridLog, BADGE_VARIANTS, gapStyles5,
|
|
25420
|
+
var dataGridLog, BADGE_VARIANTS, gapStyles5, lookStyles5;
|
|
25219
25421
|
var init_DataGrid = __esm({
|
|
25220
25422
|
"components/core/molecules/DataGrid.tsx"() {
|
|
25221
25423
|
"use client";
|
|
@@ -25250,7 +25452,7 @@ var init_DataGrid = __esm({
|
|
|
25250
25452
|
lg: "gap-6",
|
|
25251
25453
|
xl: "gap-8"
|
|
25252
25454
|
};
|
|
25253
|
-
|
|
25455
|
+
lookStyles5 = {
|
|
25254
25456
|
dense: "gap-2 [&>*]:p-card-sm",
|
|
25255
25457
|
spacious: "gap-8 [&>*]:p-card-lg",
|
|
25256
25458
|
striped: "[&>*:nth-child(even)]:bg-muted/30",
|
|
@@ -25350,7 +25552,7 @@ function DataList({
|
|
|
25350
25552
|
}) {
|
|
25351
25553
|
const eventBus = useEventBus();
|
|
25352
25554
|
const { t } = useTranslate();
|
|
25353
|
-
const [visibleCount, setVisibleCount] =
|
|
25555
|
+
const [visibleCount, setVisibleCount] = React91__default.useState(pageSize || Infinity);
|
|
25354
25556
|
const fieldDefs = fields ?? columns ?? [];
|
|
25355
25557
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
25356
25558
|
const dnd = useDataDnd({
|
|
@@ -25369,7 +25571,7 @@ function DataList({
|
|
|
25369
25571
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
25370
25572
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
25371
25573
|
const hasRenderProp = typeof children === "function";
|
|
25372
|
-
|
|
25574
|
+
React91__default.useEffect(() => {
|
|
25373
25575
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
25374
25576
|
const childrenTypeOf = typeof children;
|
|
25375
25577
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -25473,7 +25675,7 @@ function DataList({
|
|
|
25473
25675
|
const items2 = [...data];
|
|
25474
25676
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
25475
25677
|
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(
|
|
25678
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
25477
25679
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
25478
25680
|
group.items.map((itemData, index) => {
|
|
25479
25681
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -25614,7 +25816,7 @@ function DataList({
|
|
|
25614
25816
|
className
|
|
25615
25817
|
),
|
|
25616
25818
|
children: [
|
|
25617
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25819
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
25618
25820
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
25619
25821
|
group.items.map(
|
|
25620
25822
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -25699,7 +25901,7 @@ var init_FormSection = __esm({
|
|
|
25699
25901
|
columns = 1,
|
|
25700
25902
|
className
|
|
25701
25903
|
}) => {
|
|
25702
|
-
const [collapsed, setCollapsed] =
|
|
25904
|
+
const [collapsed, setCollapsed] = React91__default.useState(defaultCollapsed);
|
|
25703
25905
|
const { t } = useTranslate();
|
|
25704
25906
|
const eventBus = useEventBus();
|
|
25705
25907
|
const gridClass = {
|
|
@@ -25707,7 +25909,7 @@ var init_FormSection = __esm({
|
|
|
25707
25909
|
2: "grid-cols-1 md:grid-cols-2",
|
|
25708
25910
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
25709
25911
|
}[columns];
|
|
25710
|
-
|
|
25912
|
+
React91__default.useCallback(() => {
|
|
25711
25913
|
if (collapsible) {
|
|
25712
25914
|
setCollapsed((prev) => !prev);
|
|
25713
25915
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -25965,129 +26167,6 @@ var init_FormField = __esm({
|
|
|
25965
26167
|
FormField.displayName = "FormField";
|
|
25966
26168
|
}
|
|
25967
26169
|
});
|
|
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
26170
|
function getOrCreateStore(query) {
|
|
26092
26171
|
if (!queryStores.has(query)) {
|
|
26093
26172
|
queryStores.set(query, {
|
|
@@ -26264,7 +26343,7 @@ var init_FilterGroup = __esm({
|
|
|
26264
26343
|
type: "button",
|
|
26265
26344
|
onClick: () => handleFilterSelect(filter.field, null),
|
|
26266
26345
|
className: cn(
|
|
26267
|
-
"px-3 py-1.5 text-sm font-medium transition-all duration-
|
|
26346
|
+
"px-3 py-1.5 text-sm font-medium transition-all duration-fast",
|
|
26268
26347
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
26269
26348
|
),
|
|
26270
26349
|
children: t("filterGroup.all")
|
|
@@ -26276,7 +26355,7 @@ var init_FilterGroup = __esm({
|
|
|
26276
26355
|
type: "button",
|
|
26277
26356
|
onClick: () => handleFilterSelect(filter.field, option),
|
|
26278
26357
|
className: cn(
|
|
26279
|
-
"px-3 py-1.5 text-sm font-medium transition-all duration-
|
|
26358
|
+
"px-3 py-1.5 text-sm font-medium transition-all duration-fast",
|
|
26280
26359
|
"border-l-[length:var(--border-width)] border-border",
|
|
26281
26360
|
selectedValues[filter.field] === option ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
26282
26361
|
),
|
|
@@ -26657,7 +26736,7 @@ var init_Flex = __esm({
|
|
|
26657
26736
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
26658
26737
|
}
|
|
26659
26738
|
}
|
|
26660
|
-
return
|
|
26739
|
+
return React91__default.createElement(Component, {
|
|
26661
26740
|
className: cn(
|
|
26662
26741
|
inline ? "inline-flex" : "flex",
|
|
26663
26742
|
directionStyles[direction],
|
|
@@ -26776,7 +26855,7 @@ var init_Grid = __esm({
|
|
|
26776
26855
|
as: Component = "div"
|
|
26777
26856
|
}) => {
|
|
26778
26857
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
26779
|
-
return
|
|
26858
|
+
return React91__default.createElement(
|
|
26780
26859
|
Component,
|
|
26781
26860
|
{
|
|
26782
26861
|
className: cn(
|
|
@@ -26887,6 +26966,7 @@ var init_Popover = __esm({
|
|
|
26887
26966
|
"components/core/molecules/Popover.tsx"() {
|
|
26888
26967
|
"use client";
|
|
26889
26968
|
init_Typography();
|
|
26969
|
+
init_Presence();
|
|
26890
26970
|
init_cn();
|
|
26891
26971
|
init_useTapReveal();
|
|
26892
26972
|
arrowClasses = {
|
|
@@ -26910,6 +26990,7 @@ var init_Popover = __esm({
|
|
|
26910
26990
|
const [popoverWidth, setPopoverWidth] = useState(0);
|
|
26911
26991
|
const triggerRef = useRef(null);
|
|
26912
26992
|
const popoverRef = useRef(null);
|
|
26993
|
+
const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "popover" });
|
|
26913
26994
|
const updatePosition = () => {
|
|
26914
26995
|
if (triggerRef.current) {
|
|
26915
26996
|
setTriggerRect(triggerRef.current.getBoundingClientRect());
|
|
@@ -26935,10 +27016,11 @@ var init_Popover = __esm({
|
|
|
26935
27016
|
useEffect(() => {
|
|
26936
27017
|
if (isOpen) {
|
|
26937
27018
|
updatePosition();
|
|
26938
|
-
} else {
|
|
26939
|
-
setPopoverWidth(0);
|
|
26940
27019
|
}
|
|
26941
27020
|
}, [isOpen]);
|
|
27021
|
+
useEffect(() => {
|
|
27022
|
+
if (!mounted) setPopoverWidth(0);
|
|
27023
|
+
}, [mounted]);
|
|
26942
27024
|
useLayoutEffect(() => {
|
|
26943
27025
|
if (isOpen && popoverRef.current) {
|
|
26944
27026
|
const measured = popoverRef.current.offsetWidth;
|
|
@@ -26972,9 +27054,9 @@ var init_Popover = __esm({
|
|
|
26972
27054
|
onMouseLeave: handleClose,
|
|
26973
27055
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26974
27056
|
};
|
|
26975
|
-
const childElement =
|
|
27057
|
+
const childElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26976
27058
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26977
|
-
const triggerElement =
|
|
27059
|
+
const triggerElement = React91__default.cloneElement(
|
|
26978
27060
|
childElement,
|
|
26979
27061
|
{
|
|
26980
27062
|
ref: triggerRef,
|
|
@@ -26987,13 +27069,14 @@ var init_Popover = __esm({
|
|
|
26987
27069
|
} : void 0
|
|
26988
27070
|
}
|
|
26989
27071
|
);
|
|
26990
|
-
const panel =
|
|
27072
|
+
const panel = mounted && triggerRect ? /* @__PURE__ */ jsxs(
|
|
26991
27073
|
"div",
|
|
26992
27074
|
{
|
|
26993
27075
|
ref: popoverRef,
|
|
26994
27076
|
className: cn(
|
|
26995
27077
|
"fixed z-50 p-4",
|
|
26996
27078
|
"bg-card border-2 border-border shadow-elevation-popover",
|
|
27079
|
+
panelAnim,
|
|
26997
27080
|
className
|
|
26998
27081
|
),
|
|
26999
27082
|
style: {
|
|
@@ -27001,6 +27084,7 @@ var init_Popover = __esm({
|
|
|
27001
27084
|
...popoverWidth === 0 ? { visibility: "hidden" } : void 0
|
|
27002
27085
|
},
|
|
27003
27086
|
role: "dialog",
|
|
27087
|
+
onAnimationEnd,
|
|
27004
27088
|
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
27005
27089
|
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
27006
27090
|
children: [
|
|
@@ -27414,6 +27498,7 @@ var init_SidePanel = __esm({
|
|
|
27414
27498
|
init_Box();
|
|
27415
27499
|
init_Button();
|
|
27416
27500
|
init_Typography();
|
|
27501
|
+
init_Presence();
|
|
27417
27502
|
init_cn();
|
|
27418
27503
|
init_useEventBus();
|
|
27419
27504
|
SidePanel = ({
|
|
@@ -27433,15 +27518,17 @@ var init_SidePanel = __esm({
|
|
|
27433
27518
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
27434
27519
|
onClose();
|
|
27435
27520
|
};
|
|
27436
|
-
|
|
27521
|
+
const { mounted, className: panelAnim, onAnimationEnd } = usePresence(isOpen, { animation: "drawer" });
|
|
27522
|
+
const drawerSign = position === "right" ? 1 : -1;
|
|
27523
|
+
if (!mounted) return null;
|
|
27437
27524
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27438
|
-
showOverlay && /* @__PURE__ */ jsx(
|
|
27525
|
+
showOverlay && /* @__PURE__ */ jsx(Presence, { show: isOpen, animation: "overlay", children: /* @__PURE__ */ jsx(
|
|
27439
27526
|
Box,
|
|
27440
27527
|
{
|
|
27441
27528
|
className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
|
|
27442
27529
|
onClick: handleClose
|
|
27443
27530
|
}
|
|
27444
|
-
),
|
|
27531
|
+
) }),
|
|
27445
27532
|
/* @__PURE__ */ jsxs(
|
|
27446
27533
|
Aside,
|
|
27447
27534
|
{
|
|
@@ -27451,11 +27538,13 @@ var init_SidePanel = __esm({
|
|
|
27451
27538
|
"border-l-2 border-border",
|
|
27452
27539
|
position === "left" && "border-l-0 border-r-2",
|
|
27453
27540
|
"flex flex-col",
|
|
27454
|
-
|
|
27541
|
+
panelAnim,
|
|
27455
27542
|
width,
|
|
27456
27543
|
position === "right" ? "right-0" : "left-0",
|
|
27457
27544
|
className
|
|
27458
27545
|
),
|
|
27546
|
+
style: { "--motion-drawer-sign": drawerSign },
|
|
27547
|
+
onAnimationEnd,
|
|
27459
27548
|
children: [
|
|
27460
27549
|
/* @__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
27550
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
|
|
@@ -27576,9 +27665,9 @@ var init_Tooltip = __esm({
|
|
|
27576
27665
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
27577
27666
|
};
|
|
27578
27667
|
}, []);
|
|
27579
|
-
const triggerElement =
|
|
27668
|
+
const triggerElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27580
27669
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
27581
|
-
const trigger =
|
|
27670
|
+
const trigger = React91__default.cloneElement(triggerElement, {
|
|
27582
27671
|
ref: triggerRef,
|
|
27583
27672
|
onMouseEnter: handleMouseEnter,
|
|
27584
27673
|
onMouseLeave: handleMouseLeave,
|
|
@@ -27668,7 +27757,7 @@ var init_WizardProgress = __esm({
|
|
|
27668
27757
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
27669
27758
|
const isActive = index === currentStep;
|
|
27670
27759
|
const isCompleted = index < currentStep;
|
|
27671
|
-
return /* @__PURE__ */ jsxs(
|
|
27760
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
27672
27761
|
/* @__PURE__ */ jsx(
|
|
27673
27762
|
"button",
|
|
27674
27763
|
{
|
|
@@ -28219,7 +28308,7 @@ var init_FormSectionHeader = __esm({
|
|
|
28219
28308
|
name: "chevron-down",
|
|
28220
28309
|
size: "sm",
|
|
28221
28310
|
className: cn(
|
|
28222
|
-
"text-muted-foreground transition-transform duration-
|
|
28311
|
+
"text-muted-foreground transition-transform duration-fast shrink-0",
|
|
28223
28312
|
isCollapsed && "-rotate-90"
|
|
28224
28313
|
)
|
|
28225
28314
|
}
|
|
@@ -29229,13 +29318,13 @@ var init_MapView = __esm({
|
|
|
29229
29318
|
shadowSize: [41, 41]
|
|
29230
29319
|
});
|
|
29231
29320
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
29232
|
-
const { useEffect:
|
|
29321
|
+
const { useEffect: useEffect63, useRef: useRef61, useCallback: useCallback93, useState: useState97 } = React91__default;
|
|
29233
29322
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
29234
29323
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
29235
29324
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
29236
29325
|
const map = useMap();
|
|
29237
|
-
const prevRef =
|
|
29238
|
-
|
|
29326
|
+
const prevRef = useRef61({ centerLat, centerLng, zoom });
|
|
29327
|
+
useEffect63(() => {
|
|
29239
29328
|
const prev = prevRef.current;
|
|
29240
29329
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
29241
29330
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -29246,7 +29335,7 @@ var init_MapView = __esm({
|
|
|
29246
29335
|
}
|
|
29247
29336
|
function MapClickHandler({ onMapClick }) {
|
|
29248
29337
|
const map = useMap();
|
|
29249
|
-
|
|
29338
|
+
useEffect63(() => {
|
|
29250
29339
|
if (!onMapClick) return;
|
|
29251
29340
|
const handler = (e) => {
|
|
29252
29341
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -29274,8 +29363,8 @@ var init_MapView = __esm({
|
|
|
29274
29363
|
showAttribution = true
|
|
29275
29364
|
}) {
|
|
29276
29365
|
const eventBus = useEventBus2();
|
|
29277
|
-
const [clickedPosition, setClickedPosition] =
|
|
29278
|
-
const handleMapClick =
|
|
29366
|
+
const [clickedPosition, setClickedPosition] = useState97(null);
|
|
29367
|
+
const handleMapClick = useCallback93((lat, lng) => {
|
|
29279
29368
|
if (showClickedPin) {
|
|
29280
29369
|
setClickedPosition({ lat, lng });
|
|
29281
29370
|
}
|
|
@@ -29284,7 +29373,7 @@ var init_MapView = __esm({
|
|
|
29284
29373
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
29285
29374
|
}
|
|
29286
29375
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
29287
|
-
const handleMarkerClick =
|
|
29376
|
+
const handleMarkerClick = useCallback93((marker) => {
|
|
29288
29377
|
onMarkerClick?.(marker);
|
|
29289
29378
|
if (markerClickEvent) {
|
|
29290
29379
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -29484,7 +29573,7 @@ var init_NumberStepper = __esm({
|
|
|
29484
29573
|
"text-foreground",
|
|
29485
29574
|
"hover:bg-muted",
|
|
29486
29575
|
"active:bg-muted",
|
|
29487
|
-
"transition-colors duration-
|
|
29576
|
+
"transition-colors duration-instant",
|
|
29488
29577
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
29489
29578
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
29490
29579
|
styles.button
|
|
@@ -29525,7 +29614,7 @@ var init_NumberStepper = __esm({
|
|
|
29525
29614
|
"text-foreground",
|
|
29526
29615
|
"hover:bg-muted",
|
|
29527
29616
|
"active:bg-muted",
|
|
29528
|
-
"transition-colors duration-
|
|
29617
|
+
"transition-colors duration-instant",
|
|
29529
29618
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
29530
29619
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
29531
29620
|
styles.button
|
|
@@ -29649,7 +29738,7 @@ var init_StarRating = __esm({
|
|
|
29649
29738
|
className: cn(
|
|
29650
29739
|
styles.star,
|
|
29651
29740
|
"text-foreground/30",
|
|
29652
|
-
"transition-colors duration-
|
|
29741
|
+
"transition-colors duration-instant"
|
|
29653
29742
|
),
|
|
29654
29743
|
strokeWidth: 1.5
|
|
29655
29744
|
}
|
|
@@ -29662,7 +29751,7 @@ var init_StarRating = __esm({
|
|
|
29662
29751
|
styles.star,
|
|
29663
29752
|
"absolute inset-0",
|
|
29664
29753
|
"text-warning fill-warning",
|
|
29665
|
-
"transition-colors duration-
|
|
29754
|
+
"transition-colors duration-instant"
|
|
29666
29755
|
),
|
|
29667
29756
|
strokeWidth: 1.5,
|
|
29668
29757
|
style: isHalf ? { clipPath: "inset(0 50% 0 0)" } : void 0
|
|
@@ -29817,7 +29906,7 @@ var init_UploadDropZone = __esm({
|
|
|
29817
29906
|
"relative flex flex-col items-center justify-center",
|
|
29818
29907
|
"p-8 rounded-sm",
|
|
29819
29908
|
"border-2 border-dashed",
|
|
29820
|
-
"transition-colors duration-
|
|
29909
|
+
"transition-colors duration-fast",
|
|
29821
29910
|
"cursor-pointer",
|
|
29822
29911
|
isDragOver ? "border-primary bg-primary bg-opacity-5" : "border-border bg-surface",
|
|
29823
29912
|
error && "border-error",
|
|
@@ -30144,8 +30233,8 @@ function TableView({
|
|
|
30144
30233
|
}) {
|
|
30145
30234
|
const eventBus = useEventBus();
|
|
30146
30235
|
const { t } = useTranslate();
|
|
30147
|
-
const [visibleCount, setVisibleCount] =
|
|
30148
|
-
const [localSelected, setLocalSelected] =
|
|
30236
|
+
const [visibleCount, setVisibleCount] = React91__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
30237
|
+
const [localSelected, setLocalSelected] = React91__default.useState(/* @__PURE__ */ new Set());
|
|
30149
30238
|
const colDefs = columns ?? fields ?? [];
|
|
30150
30239
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
30151
30240
|
const dnd = useDataDnd({
|
|
@@ -30225,7 +30314,7 @@ function TableView({
|
|
|
30225
30314
|
className: cn(
|
|
30226
30315
|
"grid items-center gap-3 sticky top-0 z-10",
|
|
30227
30316
|
"bg-[var(--color-surface-subtle)] border-b border-[var(--color-border)]",
|
|
30228
|
-
"text-
|
|
30317
|
+
"text-muted-foreground uppercase text-xs font-semibold tracking-wide",
|
|
30229
30318
|
lk.headPad
|
|
30230
30319
|
),
|
|
30231
30320
|
children: [
|
|
@@ -30340,12 +30429,12 @@ function TableView({
|
|
|
30340
30429
|
]
|
|
30341
30430
|
}
|
|
30342
30431
|
);
|
|
30343
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
30432
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React91__default.Fragment, { children: rowInner }, id);
|
|
30344
30433
|
};
|
|
30345
30434
|
const items = Array.from(data);
|
|
30346
30435
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
30347
30436
|
let runningIndex = 0;
|
|
30348
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
30437
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
30349
30438
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
30350
30439
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
30351
30440
|
] }, gi)) });
|
|
@@ -31081,7 +31170,7 @@ function SortableListInner({
|
|
|
31081
31170
|
"flex items-center justify-center",
|
|
31082
31171
|
"text-muted-foreground",
|
|
31083
31172
|
"hover:text-foreground",
|
|
31084
|
-
"transition-colors duration-
|
|
31173
|
+
"transition-colors duration-instant",
|
|
31085
31174
|
"px-1"
|
|
31086
31175
|
),
|
|
31087
31176
|
"aria-grabbed": ariaGrabbed,
|
|
@@ -31108,7 +31197,7 @@ function SortableListInner({
|
|
|
31108
31197
|
gap: "sm",
|
|
31109
31198
|
align: "center",
|
|
31110
31199
|
className: cn(
|
|
31111
|
-
"transition-opacity duration-
|
|
31200
|
+
"transition-opacity duration-fast",
|
|
31112
31201
|
isBeingDragged && "opacity-50"
|
|
31113
31202
|
),
|
|
31114
31203
|
children: [
|
|
@@ -31280,7 +31369,7 @@ var init_PullToRefresh = __esm({
|
|
|
31280
31369
|
children: /* @__PURE__ */ jsx(
|
|
31281
31370
|
Box,
|
|
31282
31371
|
{
|
|
31283
|
-
className: "transition-transform duration-
|
|
31372
|
+
className: "transition-transform duration-fast",
|
|
31284
31373
|
style: {
|
|
31285
31374
|
transform: `scale(${isRefreshing ? 1 : pullProgress})`,
|
|
31286
31375
|
opacity: isRefreshing ? 1 : pullProgress
|
|
@@ -31702,7 +31791,7 @@ var init_StepFlow = __esm({
|
|
|
31702
31791
|
className
|
|
31703
31792
|
}) => {
|
|
31704
31793
|
if (orientation === "vertical") {
|
|
31705
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
31794
|
+
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
31795
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
31707
31796
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31708
31797
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -31713,7 +31802,7 @@ var init_StepFlow = __esm({
|
|
|
31713
31802
|
] })
|
|
31714
31803
|
] }) }, index)) });
|
|
31715
31804
|
}
|
|
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(
|
|
31805
|
+
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
31806
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
31718
31807
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31719
31808
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -32619,7 +32708,7 @@ var init_VoteStack = __esm({
|
|
|
32619
32708
|
isUp ? "text-primary" : "text-muted-foreground",
|
|
32620
32709
|
"hover:bg-muted",
|
|
32621
32710
|
"active:bg-muted",
|
|
32622
|
-
"transition-colors duration-
|
|
32711
|
+
"transition-colors duration-instant",
|
|
32623
32712
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
32624
32713
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
32625
32714
|
styles.button
|
|
@@ -32656,7 +32745,7 @@ var init_VoteStack = __esm({
|
|
|
32656
32745
|
isDown ? "text-primary" : "text-muted-foreground",
|
|
32657
32746
|
"hover:bg-muted",
|
|
32658
32747
|
"active:bg-muted",
|
|
32659
|
-
"transition-colors duration-
|
|
32748
|
+
"transition-colors duration-instant",
|
|
32660
32749
|
"disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
32661
32750
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
32662
32751
|
styles.button
|
|
@@ -32703,7 +32792,7 @@ var init_LikertScale = __esm({
|
|
|
32703
32792
|
md: "text-base",
|
|
32704
32793
|
lg: "text-lg"
|
|
32705
32794
|
};
|
|
32706
|
-
LikertScale =
|
|
32795
|
+
LikertScale = React91__default.forwardRef(
|
|
32707
32796
|
({
|
|
32708
32797
|
question,
|
|
32709
32798
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -32715,7 +32804,7 @@ var init_LikertScale = __esm({
|
|
|
32715
32804
|
variant = "radios",
|
|
32716
32805
|
className
|
|
32717
32806
|
}, ref) => {
|
|
32718
|
-
const groupId =
|
|
32807
|
+
const groupId = React91__default.useId();
|
|
32719
32808
|
const eventBus = useEventBus();
|
|
32720
32809
|
const handleSelect = useCallback(
|
|
32721
32810
|
(next) => {
|
|
@@ -32768,7 +32857,7 @@ var init_LikertScale = __esm({
|
|
|
32768
32857
|
disabled,
|
|
32769
32858
|
onClick: () => handleSelect(opt.value),
|
|
32770
32859
|
className: cn(
|
|
32771
|
-
"flex-1 text-center font-medium transition-colors duration-
|
|
32860
|
+
"flex-1 text-center font-medium transition-colors duration-instant",
|
|
32772
32861
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
32773
32862
|
"disabled:cursor-not-allowed",
|
|
32774
32863
|
"rounded-none gap-0 shadow-none border-none",
|
|
@@ -34997,7 +35086,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
34997
35086
|
"aria-label": t("aria.breadcrumb"),
|
|
34998
35087
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
34999
35088
|
const isLast = idx === items.length - 1;
|
|
35000
|
-
return /* @__PURE__ */ jsxs(
|
|
35089
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
35001
35090
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
35002
35091
|
Icon,
|
|
35003
35092
|
{
|
|
@@ -35661,7 +35750,7 @@ var init_PageHeader = __esm({
|
|
|
35661
35750
|
info: "bg-info/10 text-info"
|
|
35662
35751
|
};
|
|
35663
35752
|
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(
|
|
35753
|
+
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
35754
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35666
35755
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35667
35756
|
"a",
|
|
@@ -36019,7 +36108,7 @@ var init_Section = __esm({
|
|
|
36019
36108
|
as: Component = "section"
|
|
36020
36109
|
}) => {
|
|
36021
36110
|
const hasHeader = title || description || action;
|
|
36022
|
-
return
|
|
36111
|
+
return React91__default.createElement(
|
|
36023
36112
|
Component,
|
|
36024
36113
|
{
|
|
36025
36114
|
className: cn(
|
|
@@ -36086,7 +36175,7 @@ var init_Sidebar = __esm({
|
|
|
36086
36175
|
variant: "ghost",
|
|
36087
36176
|
onClick: item.onClick,
|
|
36088
36177
|
className: cn(
|
|
36089
|
-
"w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-
|
|
36178
|
+
"w-full flex items-center gap-3 px-3 py-2.5 transition-all duration-fast group relative",
|
|
36090
36179
|
"rounded-sm border-[length:var(--border-width-thin)] border-transparent",
|
|
36091
36180
|
isActive ? [
|
|
36092
36181
|
"bg-primary text-primary-foreground",
|
|
@@ -36160,7 +36249,7 @@ var init_Sidebar = __esm({
|
|
|
36160
36249
|
className: cn(
|
|
36161
36250
|
"flex flex-col h-full",
|
|
36162
36251
|
"bg-card border-e border-border",
|
|
36163
|
-
"transition-all duration-
|
|
36252
|
+
"transition-all duration-normal ease-standard",
|
|
36164
36253
|
collapsed ? "w-20" : "w-64",
|
|
36165
36254
|
className
|
|
36166
36255
|
),
|
|
@@ -36393,7 +36482,7 @@ var init_WizardContainer = __esm({
|
|
|
36393
36482
|
const isCompleted = index < currentStep;
|
|
36394
36483
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36395
36484
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36396
|
-
return /* @__PURE__ */ jsxs(
|
|
36485
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
36397
36486
|
/* @__PURE__ */ jsx(
|
|
36398
36487
|
Button,
|
|
36399
36488
|
{
|
|
@@ -38996,7 +39085,7 @@ var init_DetailPanel = __esm({
|
|
|
38996
39085
|
}
|
|
38997
39086
|
});
|
|
38998
39087
|
function extractTitle(children) {
|
|
38999
|
-
if (!
|
|
39088
|
+
if (!React91__default.isValidElement(children)) return void 0;
|
|
39000
39089
|
const props = children.props;
|
|
39001
39090
|
if (typeof props.title === "string") {
|
|
39002
39091
|
return props.title;
|
|
@@ -39346,12 +39435,12 @@ var init_Form = __esm({
|
|
|
39346
39435
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
39347
39436
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
39348
39437
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
39349
|
-
const normalizedInitialData =
|
|
39438
|
+
const normalizedInitialData = React91__default.useMemo(() => {
|
|
39350
39439
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
39351
39440
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
39352
39441
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
39353
39442
|
}, [entity, initialData]);
|
|
39354
|
-
const entityDerivedFields =
|
|
39443
|
+
const entityDerivedFields = React91__default.useMemo(() => {
|
|
39355
39444
|
if (fields && fields.length > 0) return void 0;
|
|
39356
39445
|
if (!resolvedEntity) return void 0;
|
|
39357
39446
|
return resolvedEntity.fields.map(
|
|
@@ -39372,16 +39461,16 @@ var init_Form = __esm({
|
|
|
39372
39461
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
39373
39462
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
39374
39463
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
39375
|
-
const [formData, setFormData] =
|
|
39464
|
+
const [formData, setFormData] = React91__default.useState(
|
|
39376
39465
|
normalizedInitialData
|
|
39377
39466
|
);
|
|
39378
|
-
const [collapsedSections, setCollapsedSections] =
|
|
39467
|
+
const [collapsedSections, setCollapsedSections] = React91__default.useState(
|
|
39379
39468
|
/* @__PURE__ */ new Set()
|
|
39380
39469
|
);
|
|
39381
|
-
const [submitError, setSubmitError] =
|
|
39382
|
-
const formRef =
|
|
39470
|
+
const [submitError, setSubmitError] = React91__default.useState(null);
|
|
39471
|
+
const formRef = React91__default.useRef(null);
|
|
39383
39472
|
const formMode = props.mode;
|
|
39384
|
-
const mountedRef =
|
|
39473
|
+
const mountedRef = React91__default.useRef(false);
|
|
39385
39474
|
if (!mountedRef.current) {
|
|
39386
39475
|
mountedRef.current = true;
|
|
39387
39476
|
debug("forms", "mount", {
|
|
@@ -39394,7 +39483,7 @@ var init_Form = __esm({
|
|
|
39394
39483
|
});
|
|
39395
39484
|
}
|
|
39396
39485
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
39397
|
-
const evalContext =
|
|
39486
|
+
const evalContext = React91__default.useMemo(
|
|
39398
39487
|
() => ({
|
|
39399
39488
|
formValues: formData,
|
|
39400
39489
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -39403,7 +39492,7 @@ var init_Form = __esm({
|
|
|
39403
39492
|
}),
|
|
39404
39493
|
[formData, externalContext]
|
|
39405
39494
|
);
|
|
39406
|
-
|
|
39495
|
+
React91__default.useEffect(() => {
|
|
39407
39496
|
debug("forms", "initialData-sync", {
|
|
39408
39497
|
mode: formMode,
|
|
39409
39498
|
normalizedInitialData,
|
|
@@ -39414,7 +39503,7 @@ var init_Form = __esm({
|
|
|
39414
39503
|
setFormData(normalizedInitialData);
|
|
39415
39504
|
}
|
|
39416
39505
|
}, [normalizedInitialData]);
|
|
39417
|
-
const processCalculations =
|
|
39506
|
+
const processCalculations = React91__default.useCallback(
|
|
39418
39507
|
(changedFieldId, newFormData) => {
|
|
39419
39508
|
if (!hiddenCalculations.length) return;
|
|
39420
39509
|
const context = {
|
|
@@ -39439,7 +39528,7 @@ var init_Form = __esm({
|
|
|
39439
39528
|
},
|
|
39440
39529
|
[hiddenCalculations, externalContext, eventBus]
|
|
39441
39530
|
);
|
|
39442
|
-
const checkViolations =
|
|
39531
|
+
const checkViolations = React91__default.useCallback(
|
|
39443
39532
|
(changedFieldId, newFormData) => {
|
|
39444
39533
|
if (!violationTriggers.length) return;
|
|
39445
39534
|
const context = {
|
|
@@ -39477,7 +39566,7 @@ var init_Form = __esm({
|
|
|
39477
39566
|
processCalculations(name, newFormData);
|
|
39478
39567
|
checkViolations(name, newFormData);
|
|
39479
39568
|
};
|
|
39480
|
-
const isFieldVisible =
|
|
39569
|
+
const isFieldVisible = React91__default.useCallback(
|
|
39481
39570
|
(fieldName) => {
|
|
39482
39571
|
const condition = conditionalFields[fieldName];
|
|
39483
39572
|
if (!condition) return true;
|
|
@@ -39485,7 +39574,7 @@ var init_Form = __esm({
|
|
|
39485
39574
|
},
|
|
39486
39575
|
[conditionalFields, evalContext]
|
|
39487
39576
|
);
|
|
39488
|
-
const isSectionVisible =
|
|
39577
|
+
const isSectionVisible = React91__default.useCallback(
|
|
39489
39578
|
(section) => {
|
|
39490
39579
|
if (!section.condition) return true;
|
|
39491
39580
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -39561,7 +39650,7 @@ var init_Form = __esm({
|
|
|
39561
39650
|
eventBus.emit(`UI:${onCancel}`);
|
|
39562
39651
|
}
|
|
39563
39652
|
};
|
|
39564
|
-
const renderField =
|
|
39653
|
+
const renderField = React91__default.useCallback(
|
|
39565
39654
|
(field) => {
|
|
39566
39655
|
const fieldName = field.name || field.field;
|
|
39567
39656
|
if (!fieldName) return null;
|
|
@@ -39582,7 +39671,7 @@ var init_Form = __esm({
|
|
|
39582
39671
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
39583
39672
|
);
|
|
39584
39673
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
39585
|
-
const normalizedFields =
|
|
39674
|
+
const normalizedFields = React91__default.useMemo(() => {
|
|
39586
39675
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
39587
39676
|
return effectiveFields.map((field) => {
|
|
39588
39677
|
if (typeof field === "string") {
|
|
@@ -39606,7 +39695,7 @@ var init_Form = __esm({
|
|
|
39606
39695
|
return field;
|
|
39607
39696
|
});
|
|
39608
39697
|
}, [effectiveFields, resolvedEntity]);
|
|
39609
|
-
const schemaFields =
|
|
39698
|
+
const schemaFields = React91__default.useMemo(() => {
|
|
39610
39699
|
if (normalizedFields.length === 0) return null;
|
|
39611
39700
|
if (isDebugEnabled()) {
|
|
39612
39701
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -39616,7 +39705,7 @@ var init_Form = __esm({
|
|
|
39616
39705
|
}
|
|
39617
39706
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
39618
39707
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
39619
|
-
const sectionElements =
|
|
39708
|
+
const sectionElements = React91__default.useMemo(() => {
|
|
39620
39709
|
if (!sections || sections.length === 0) return null;
|
|
39621
39710
|
return sections.map((section) => {
|
|
39622
39711
|
if (!isSectionVisible(section)) {
|
|
@@ -40299,7 +40388,7 @@ var init_List = __esm({
|
|
|
40299
40388
|
Box,
|
|
40300
40389
|
{
|
|
40301
40390
|
className: cn(
|
|
40302
|
-
"h-full rounded-full transition-all duration-
|
|
40391
|
+
"h-full rounded-full transition-all duration-slow",
|
|
40303
40392
|
clampedValue >= 100 ? "bg-success" : clampedValue >= 70 ? "bg-info" : clampedValue >= 40 ? "bg-warning" : "bg-muted-foreground"
|
|
40304
40393
|
),
|
|
40305
40394
|
style: { width: `${clampedValue}%` }
|
|
@@ -40341,7 +40430,7 @@ var init_List = __esm({
|
|
|
40341
40430
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
40342
40431
|
return [];
|
|
40343
40432
|
}, [entity]);
|
|
40344
|
-
const getItemActions =
|
|
40433
|
+
const getItemActions = React91__default.useCallback(
|
|
40345
40434
|
(item) => {
|
|
40346
40435
|
if (!itemActions) return [];
|
|
40347
40436
|
if (typeof itemActions === "function") {
|
|
@@ -40468,7 +40557,7 @@ var init_List = __esm({
|
|
|
40468
40557
|
{
|
|
40469
40558
|
className: cn(
|
|
40470
40559
|
"group flex items-center gap-5 px-6 py-5",
|
|
40471
|
-
"transition-all duration-
|
|
40560
|
+
"transition-all duration-normal ease-standard",
|
|
40472
40561
|
hasExplicitClick && "cursor-pointer",
|
|
40473
40562
|
// Hover state
|
|
40474
40563
|
"hover:bg-muted/80",
|
|
@@ -40575,7 +40664,7 @@ var init_List = __esm({
|
|
|
40575
40664
|
variant: "ghost",
|
|
40576
40665
|
action: editAction.event,
|
|
40577
40666
|
className: cn(
|
|
40578
|
-
"p-2 rounded-lg transition-all duration-
|
|
40667
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
40579
40668
|
"hover:bg-primary/10 hover:text-primary",
|
|
40580
40669
|
"text-muted-foreground",
|
|
40581
40670
|
"active:scale-95"
|
|
@@ -40591,7 +40680,7 @@ var init_List = __esm({
|
|
|
40591
40680
|
variant: "ghost",
|
|
40592
40681
|
action: viewAction.event,
|
|
40593
40682
|
className: cn(
|
|
40594
|
-
"p-2 rounded-lg transition-all duration-
|
|
40683
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
40595
40684
|
"hover:bg-muted hover:text-foreground",
|
|
40596
40685
|
"text-muted-foreground",
|
|
40597
40686
|
"active:scale-95"
|
|
@@ -40613,7 +40702,7 @@ var init_List = __esm({
|
|
|
40613
40702
|
{
|
|
40614
40703
|
variant: "ghost",
|
|
40615
40704
|
className: cn(
|
|
40616
|
-
"p-2 rounded-lg transition-all duration-
|
|
40705
|
+
"p-2 rounded-lg transition-all duration-fast",
|
|
40617
40706
|
"hover:bg-muted hover:shadow-sm",
|
|
40618
40707
|
"text-muted-foreground hover:text-foreground",
|
|
40619
40708
|
"active:scale-95"
|
|
@@ -40825,7 +40914,7 @@ var init_MediaGallery = __esm({
|
|
|
40825
40914
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
40826
40915
|
);
|
|
40827
40916
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
40828
|
-
const items =
|
|
40917
|
+
const items = React91__default.useMemo(() => {
|
|
40829
40918
|
if (propItems && propItems.length > 0) return propItems;
|
|
40830
40919
|
if (entityData.length === 0) return [];
|
|
40831
40920
|
return entityData.map((record, idx) => {
|
|
@@ -40903,7 +40992,7 @@ var init_MediaGallery = __esm({
|
|
|
40903
40992
|
{
|
|
40904
40993
|
className: cn(
|
|
40905
40994
|
"group relative overflow-hidden rounded-md cursor-pointer",
|
|
40906
|
-
"border-2 transition-all duration-
|
|
40995
|
+
"border-2 transition-all duration-fast",
|
|
40907
40996
|
isSelected ? "border-primary ring-2 ring-primary/30" : "border-transparent hover:border-border",
|
|
40908
40997
|
ASPECT_CLASSES[aspectRatio]
|
|
40909
40998
|
),
|
|
@@ -40924,14 +41013,14 @@ var init_MediaGallery = __esm({
|
|
|
40924
41013
|
{
|
|
40925
41014
|
className: cn(
|
|
40926
41015
|
"absolute inset-0 bg-foreground/0 group-hover:bg-foreground/20",
|
|
40927
|
-
"transition-colors duration-
|
|
41016
|
+
"transition-colors duration-fast flex items-center justify-center"
|
|
40928
41017
|
),
|
|
40929
41018
|
children: /* @__PURE__ */ jsx(
|
|
40930
41019
|
Icon,
|
|
40931
41020
|
{
|
|
40932
41021
|
icon: ZoomIn,
|
|
40933
41022
|
size: "md",
|
|
40934
|
-
className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-
|
|
41023
|
+
className: "text-white opacity-0 group-hover:opacity-100 transition-opacity duration-fast"
|
|
40935
41024
|
}
|
|
40936
41025
|
)
|
|
40937
41026
|
}
|
|
@@ -40989,7 +41078,7 @@ var init_MediaGallery = __esm({
|
|
|
40989
41078
|
}
|
|
40990
41079
|
});
|
|
40991
41080
|
function extractTitle2(children) {
|
|
40992
|
-
if (!
|
|
41081
|
+
if (!React91__default.isValidElement(children)) return void 0;
|
|
40993
41082
|
const props = children.props;
|
|
40994
41083
|
if (typeof props.title === "string") {
|
|
40995
41084
|
return props.title;
|
|
@@ -41263,7 +41352,7 @@ var init_debugRegistry = __esm({
|
|
|
41263
41352
|
}
|
|
41264
41353
|
});
|
|
41265
41354
|
function useDebugData() {
|
|
41266
|
-
const [data, setData] =
|
|
41355
|
+
const [data, setData] = React91.useState(() => ({
|
|
41267
41356
|
traits: [],
|
|
41268
41357
|
ticks: [],
|
|
41269
41358
|
guards: [],
|
|
@@ -41277,7 +41366,7 @@ function useDebugData() {
|
|
|
41277
41366
|
},
|
|
41278
41367
|
lastUpdate: Date.now()
|
|
41279
41368
|
}));
|
|
41280
|
-
|
|
41369
|
+
React91.useEffect(() => {
|
|
41281
41370
|
const updateData = () => {
|
|
41282
41371
|
setData({
|
|
41283
41372
|
traits: getAllTraits(),
|
|
@@ -41386,12 +41475,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
41386
41475
|
return positions;
|
|
41387
41476
|
}
|
|
41388
41477
|
function WalkMinimap() {
|
|
41389
|
-
const [walkStep, setWalkStep] =
|
|
41390
|
-
const [traits2, setTraits] =
|
|
41391
|
-
const [coveredEdges, setCoveredEdges] =
|
|
41392
|
-
const [completedTraits, setCompletedTraits] =
|
|
41393
|
-
const prevTraitRef =
|
|
41394
|
-
|
|
41478
|
+
const [walkStep, setWalkStep] = React91.useState(null);
|
|
41479
|
+
const [traits2, setTraits] = React91.useState([]);
|
|
41480
|
+
const [coveredEdges, setCoveredEdges] = React91.useState([]);
|
|
41481
|
+
const [completedTraits, setCompletedTraits] = React91.useState(/* @__PURE__ */ new Set());
|
|
41482
|
+
const prevTraitRef = React91.useRef(null);
|
|
41483
|
+
React91.useEffect(() => {
|
|
41395
41484
|
const interval = setInterval(() => {
|
|
41396
41485
|
const w = window;
|
|
41397
41486
|
const step = w.__orbitalWalkStep;
|
|
@@ -41827,15 +41916,15 @@ var init_EntitiesTab = __esm({
|
|
|
41827
41916
|
});
|
|
41828
41917
|
function EventFlowTab({ events: events2 }) {
|
|
41829
41918
|
const { t } = useTranslate();
|
|
41830
|
-
const [filter, setFilter] =
|
|
41831
|
-
const containerRef =
|
|
41832
|
-
const [autoScroll, setAutoScroll] =
|
|
41833
|
-
|
|
41919
|
+
const [filter, setFilter] = React91.useState("all");
|
|
41920
|
+
const containerRef = React91.useRef(null);
|
|
41921
|
+
const [autoScroll, setAutoScroll] = React91.useState(true);
|
|
41922
|
+
React91.useEffect(() => {
|
|
41834
41923
|
if (autoScroll && containerRef.current) {
|
|
41835
41924
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41836
41925
|
}
|
|
41837
41926
|
}, [events2.length, autoScroll]);
|
|
41838
|
-
const filteredEvents =
|
|
41927
|
+
const filteredEvents = React91.useMemo(() => {
|
|
41839
41928
|
if (filter === "all") return events2;
|
|
41840
41929
|
return events2.filter((e) => e.type === filter);
|
|
41841
41930
|
}, [events2, filter]);
|
|
@@ -41951,7 +42040,7 @@ var init_EventFlowTab = __esm({
|
|
|
41951
42040
|
});
|
|
41952
42041
|
function GuardsPanel({ guards }) {
|
|
41953
42042
|
const { t } = useTranslate();
|
|
41954
|
-
const [filter, setFilter] =
|
|
42043
|
+
const [filter, setFilter] = React91.useState("all");
|
|
41955
42044
|
if (guards.length === 0) {
|
|
41956
42045
|
return /* @__PURE__ */ jsx(
|
|
41957
42046
|
EmptyState,
|
|
@@ -41964,7 +42053,7 @@ function GuardsPanel({ guards }) {
|
|
|
41964
42053
|
}
|
|
41965
42054
|
const passedCount = guards.filter((g) => g.result).length;
|
|
41966
42055
|
const failedCount = guards.length - passedCount;
|
|
41967
|
-
const filteredGuards =
|
|
42056
|
+
const filteredGuards = React91.useMemo(() => {
|
|
41968
42057
|
if (filter === "all") return guards;
|
|
41969
42058
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
41970
42059
|
return guards.filter((g) => !g.result);
|
|
@@ -42127,10 +42216,10 @@ function EffectBadge({ effect }) {
|
|
|
42127
42216
|
}
|
|
42128
42217
|
function TransitionTimeline({ transitions }) {
|
|
42129
42218
|
const { t } = useTranslate();
|
|
42130
|
-
const containerRef =
|
|
42131
|
-
const [autoScroll, setAutoScroll] =
|
|
42132
|
-
const [expandedId, setExpandedId] =
|
|
42133
|
-
|
|
42219
|
+
const containerRef = React91.useRef(null);
|
|
42220
|
+
const [autoScroll, setAutoScroll] = React91.useState(true);
|
|
42221
|
+
const [expandedId, setExpandedId] = React91.useState(null);
|
|
42222
|
+
React91.useEffect(() => {
|
|
42134
42223
|
if (autoScroll && containerRef.current) {
|
|
42135
42224
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
42136
42225
|
}
|
|
@@ -42410,9 +42499,9 @@ function getAllEvents(traits2) {
|
|
|
42410
42499
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
42411
42500
|
const eventBus = useEventBus();
|
|
42412
42501
|
const { t } = useTranslate();
|
|
42413
|
-
const [log11, setLog] =
|
|
42414
|
-
const prevStatesRef =
|
|
42415
|
-
|
|
42502
|
+
const [log11, setLog] = React91.useState([]);
|
|
42503
|
+
const prevStatesRef = React91.useRef(/* @__PURE__ */ new Map());
|
|
42504
|
+
React91.useEffect(() => {
|
|
42416
42505
|
for (const trait of traits2) {
|
|
42417
42506
|
const prev = prevStatesRef.current.get(trait.id);
|
|
42418
42507
|
if (prev && prev !== trait.currentState) {
|
|
@@ -42581,10 +42670,10 @@ function VerifyModePanel({
|
|
|
42581
42670
|
localCount
|
|
42582
42671
|
}) {
|
|
42583
42672
|
const { t } = useTranslate();
|
|
42584
|
-
const [expanded, setExpanded] =
|
|
42585
|
-
const scrollRef =
|
|
42586
|
-
const prevCountRef =
|
|
42587
|
-
|
|
42673
|
+
const [expanded, setExpanded] = React91.useState(true);
|
|
42674
|
+
const scrollRef = React91.useRef(null);
|
|
42675
|
+
const prevCountRef = React91.useRef(0);
|
|
42676
|
+
React91.useEffect(() => {
|
|
42588
42677
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
42589
42678
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
42590
42679
|
}
|
|
@@ -42641,10 +42730,10 @@ function RuntimeDebugger({
|
|
|
42641
42730
|
schema
|
|
42642
42731
|
}) {
|
|
42643
42732
|
const { t } = useTranslate();
|
|
42644
|
-
const [isCollapsed, setIsCollapsed] =
|
|
42645
|
-
const [isVisible, setIsVisible] =
|
|
42733
|
+
const [isCollapsed, setIsCollapsed] = React91.useState(mode === "verify" ? true : defaultCollapsed);
|
|
42734
|
+
const [isVisible, setIsVisible] = React91.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
42646
42735
|
const debugData = useDebugData();
|
|
42647
|
-
|
|
42736
|
+
React91.useEffect(() => {
|
|
42648
42737
|
if (mode === "inline") return;
|
|
42649
42738
|
return onDebugToggle((enabled) => {
|
|
42650
42739
|
setIsVisible(enabled);
|
|
@@ -42653,7 +42742,7 @@ function RuntimeDebugger({
|
|
|
42653
42742
|
}
|
|
42654
42743
|
});
|
|
42655
42744
|
}, [mode]);
|
|
42656
|
-
|
|
42745
|
+
React91.useEffect(() => {
|
|
42657
42746
|
if (mode === "inline") return;
|
|
42658
42747
|
const handleKeyDown = (e) => {
|
|
42659
42748
|
if (e.key === "`" && isVisible) {
|
|
@@ -43173,7 +43262,7 @@ var init_StatCard = __esm({
|
|
|
43173
43262
|
const labelToUse = propLabel ?? propTitle;
|
|
43174
43263
|
const eventBus = useEventBus();
|
|
43175
43264
|
const { t } = useTranslate();
|
|
43176
|
-
const handleActionClick =
|
|
43265
|
+
const handleActionClick = React91__default.useCallback(() => {
|
|
43177
43266
|
if (action?.event) {
|
|
43178
43267
|
eventBus.emit(`UI:${action.event}`, {});
|
|
43179
43268
|
}
|
|
@@ -43184,7 +43273,7 @@ var init_StatCard = __esm({
|
|
|
43184
43273
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
43185
43274
|
const isLoading = externalLoading ?? false;
|
|
43186
43275
|
const error = externalError;
|
|
43187
|
-
const computeMetricValue =
|
|
43276
|
+
const computeMetricValue = React91__default.useCallback(
|
|
43188
43277
|
(metric, items) => {
|
|
43189
43278
|
if (metric.value !== void 0) {
|
|
43190
43279
|
return metric.value;
|
|
@@ -43223,7 +43312,7 @@ var init_StatCard = __esm({
|
|
|
43223
43312
|
},
|
|
43224
43313
|
[]
|
|
43225
43314
|
);
|
|
43226
|
-
const schemaStats =
|
|
43315
|
+
const schemaStats = React91__default.useMemo(() => {
|
|
43227
43316
|
if (!metrics || metrics.length === 0) return null;
|
|
43228
43317
|
return metrics.map((metric) => ({
|
|
43229
43318
|
label: metric.label,
|
|
@@ -43231,7 +43320,7 @@ var init_StatCard = __esm({
|
|
|
43231
43320
|
format: metric.format
|
|
43232
43321
|
}));
|
|
43233
43322
|
}, [metrics, data, computeMetricValue]);
|
|
43234
|
-
const calculatedTrend =
|
|
43323
|
+
const calculatedTrend = React91__default.useMemo(() => {
|
|
43235
43324
|
if (manualTrend !== void 0) return manualTrend;
|
|
43236
43325
|
if (previousValue === void 0 || currentValue === void 0)
|
|
43237
43326
|
return void 0;
|
|
@@ -43871,8 +43960,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43871
43960
|
] });
|
|
43872
43961
|
};
|
|
43873
43962
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
43874
|
-
const endRef =
|
|
43875
|
-
|
|
43963
|
+
const endRef = React91__default.useRef(null);
|
|
43964
|
+
React91__default.useEffect(() => {
|
|
43876
43965
|
if (!autoScroll) return;
|
|
43877
43966
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43878
43967
|
}, [activities.length, autoScroll]);
|
|
@@ -43966,7 +44055,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
43966
44055
|
};
|
|
43967
44056
|
SubagentRichCard = ({ subagent }) => {
|
|
43968
44057
|
const { t } = useTranslate();
|
|
43969
|
-
const activities =
|
|
44058
|
+
const activities = React91__default.useMemo(
|
|
43970
44059
|
() => subagentMessagesToActivities(subagent.messages),
|
|
43971
44060
|
[subagent.messages]
|
|
43972
44061
|
);
|
|
@@ -44043,8 +44132,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
44043
44132
|
] });
|
|
44044
44133
|
};
|
|
44045
44134
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
44046
|
-
const endRef =
|
|
44047
|
-
|
|
44135
|
+
const endRef = React91__default.useRef(null);
|
|
44136
|
+
React91__default.useEffect(() => {
|
|
44048
44137
|
if (!autoScroll) return;
|
|
44049
44138
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
44050
44139
|
}, [messages.length, autoScroll]);
|
|
@@ -44479,7 +44568,7 @@ var init_Timeline = __esm({
|
|
|
44479
44568
|
}) => {
|
|
44480
44569
|
const { t } = useTranslate();
|
|
44481
44570
|
const entityData = entity ?? [];
|
|
44482
|
-
const items =
|
|
44571
|
+
const items = React91__default.useMemo(() => {
|
|
44483
44572
|
if (propItems) return propItems;
|
|
44484
44573
|
if (entityData.length === 0) return [];
|
|
44485
44574
|
return entityData.map((record, idx) => {
|
|
@@ -44581,7 +44670,7 @@ var init_Timeline = __esm({
|
|
|
44581
44670
|
}
|
|
44582
44671
|
});
|
|
44583
44672
|
function extractToastProps(children) {
|
|
44584
|
-
if (!
|
|
44673
|
+
if (!React91__default.isValidElement(children)) {
|
|
44585
44674
|
if (typeof children === "string") {
|
|
44586
44675
|
return { message: children };
|
|
44587
44676
|
}
|
|
@@ -44623,7 +44712,7 @@ var init_ToastSlot = __esm({
|
|
|
44623
44712
|
eventBus.emit(`${prefix}CLOSE`);
|
|
44624
44713
|
};
|
|
44625
44714
|
if (!isVisible) return null;
|
|
44626
|
-
const isCustomContent =
|
|
44715
|
+
const isCustomContent = React91__default.isValidElement(children) && !message;
|
|
44627
44716
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
44628
44717
|
Toast,
|
|
44629
44718
|
{
|
|
@@ -44671,6 +44760,7 @@ var init_component_registry_generated = __esm({
|
|
|
44671
44760
|
init_LayoutPatterns();
|
|
44672
44761
|
init_BranchingLogicBuilder();
|
|
44673
44762
|
init_Breadcrumb();
|
|
44763
|
+
init_ButtonGroup();
|
|
44674
44764
|
init_CTABanner();
|
|
44675
44765
|
init_CalendarGrid();
|
|
44676
44766
|
init_Canvas();
|
|
@@ -44741,8 +44831,8 @@ var init_component_registry_generated = __esm({
|
|
|
44741
44831
|
init_FlipContainer();
|
|
44742
44832
|
init_FloatingActionButton();
|
|
44743
44833
|
init_Form();
|
|
44744
|
-
init_FormSection();
|
|
44745
44834
|
init_FormField();
|
|
44835
|
+
init_FormSection();
|
|
44746
44836
|
init_FormSectionHeader();
|
|
44747
44837
|
init_GameAudioToggle();
|
|
44748
44838
|
init_GameHud();
|
|
@@ -44928,6 +45018,7 @@ var init_component_registry_generated = __esm({
|
|
|
44928
45018
|
"BranchingLogicBuilder": BranchingLogicBuilder,
|
|
44929
45019
|
"Breadcrumb": Breadcrumb,
|
|
44930
45020
|
"Button": ButtonPattern,
|
|
45021
|
+
"ButtonGroup": ButtonGroup,
|
|
44931
45022
|
"ButtonPattern": ButtonPattern,
|
|
44932
45023
|
"CTABanner": CTABanner,
|
|
44933
45024
|
"CalendarGrid": CalendarGrid,
|
|
@@ -45001,7 +45092,6 @@ var init_component_registry_generated = __esm({
|
|
|
45001
45092
|
"FlipContainer": FlipContainer,
|
|
45002
45093
|
"FloatingActionButton": FloatingActionButton,
|
|
45003
45094
|
"Form": Form,
|
|
45004
|
-
"FormActions": FormActions,
|
|
45005
45095
|
"FormField": FormField,
|
|
45006
45096
|
"FormLayout": FormLayout,
|
|
45007
45097
|
"FormSectionHeader": FormSectionHeader,
|
|
@@ -45181,7 +45271,7 @@ function SuspenseConfigProvider({
|
|
|
45181
45271
|
config,
|
|
45182
45272
|
children
|
|
45183
45273
|
}) {
|
|
45184
|
-
return
|
|
45274
|
+
return React91__default.createElement(
|
|
45185
45275
|
SuspenseConfigContext.Provider,
|
|
45186
45276
|
{ value: config },
|
|
45187
45277
|
children
|
|
@@ -45223,7 +45313,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
45223
45313
|
}
|
|
45224
45314
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
45225
45315
|
}
|
|
45226
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
45316
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React91__default.isValidElement(field) && !(field instanceof Date)) {
|
|
45227
45317
|
const obj = field;
|
|
45228
45318
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
45229
45319
|
if (!fieldName) return field;
|
|
@@ -45676,7 +45766,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45676
45766
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45677
45767
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45678
45768
|
}
|
|
45679
|
-
return /* @__PURE__ */ jsx(
|
|
45769
|
+
return /* @__PURE__ */ jsx(React91__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45680
45770
|
}
|
|
45681
45771
|
if (!child || typeof child !== "object") return null;
|
|
45682
45772
|
const childId = `${parentId}-${index}`;
|
|
@@ -45729,14 +45819,14 @@ function isPatternConfig(value) {
|
|
|
45729
45819
|
if (value === null || value === void 0) return false;
|
|
45730
45820
|
if (typeof value !== "object") return false;
|
|
45731
45821
|
if (Array.isArray(value)) return false;
|
|
45732
|
-
if (
|
|
45822
|
+
if (React91__default.isValidElement(value)) return false;
|
|
45733
45823
|
if (value instanceof Date) return false;
|
|
45734
45824
|
if (typeof value === "function") return false;
|
|
45735
45825
|
const record = value;
|
|
45736
45826
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
45737
45827
|
}
|
|
45738
45828
|
function isPlainConfigObject(value) {
|
|
45739
|
-
if (
|
|
45829
|
+
if (React91__default.isValidElement(value)) return false;
|
|
45740
45830
|
if (value instanceof Date) return false;
|
|
45741
45831
|
const proto = Object.getPrototypeOf(value);
|
|
45742
45832
|
return proto === Object.prototype || proto === null;
|
|
@@ -45864,7 +45954,7 @@ function SlotContentRenderer({
|
|
|
45864
45954
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
45865
45955
|
const slotVal = restProps[slotKey];
|
|
45866
45956
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
45867
|
-
if (
|
|
45957
|
+
if (React91__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
45868
45958
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
45869
45959
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
45870
45960
|
slotVal,
|
|
@@ -45917,7 +46007,7 @@ function SlotContentRenderer({
|
|
|
45917
46007
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
45918
46008
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
45919
46009
|
const sample = resolvedItems[0];
|
|
45920
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
46010
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React91__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
45921
46011
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
45922
46012
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
45923
46013
|
}
|
|
@@ -46282,7 +46372,7 @@ var AvlTransition = ({
|
|
|
46282
46372
|
opacity = 1,
|
|
46283
46373
|
className
|
|
46284
46374
|
}) => {
|
|
46285
|
-
const ids =
|
|
46375
|
+
const ids = React91__default.useMemo(() => {
|
|
46286
46376
|
avlTransitionId += 1;
|
|
46287
46377
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
46288
46378
|
}, []);
|
|
@@ -46843,7 +46933,7 @@ var AvlStateMachine = ({
|
|
|
46843
46933
|
color = "var(--color-primary)",
|
|
46844
46934
|
animated = false
|
|
46845
46935
|
}) => {
|
|
46846
|
-
const ids =
|
|
46936
|
+
const ids = React91__default.useMemo(() => {
|
|
46847
46937
|
avlSmId += 1;
|
|
46848
46938
|
const base = `avl-sm-${avlSmId}`;
|
|
46849
46939
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -47042,7 +47132,7 @@ var AvlOrbitalUnit = ({
|
|
|
47042
47132
|
color = "var(--color-primary)",
|
|
47043
47133
|
animated = false
|
|
47044
47134
|
}) => {
|
|
47045
|
-
const ids =
|
|
47135
|
+
const ids = React91__default.useMemo(() => {
|
|
47046
47136
|
avlOuId += 1;
|
|
47047
47137
|
const base = `avl-ou-${avlOuId}`;
|
|
47048
47138
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -47138,7 +47228,7 @@ var AvlClosedCircuit = ({
|
|
|
47138
47228
|
color = "var(--color-primary)",
|
|
47139
47229
|
animated = false
|
|
47140
47230
|
}) => {
|
|
47141
|
-
const ids =
|
|
47231
|
+
const ids = React91__default.useMemo(() => {
|
|
47142
47232
|
avlCcId += 1;
|
|
47143
47233
|
const base = `avl-cc-${avlCcId}`;
|
|
47144
47234
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -47293,7 +47383,7 @@ var AvlEmitListen = ({
|
|
|
47293
47383
|
color = "var(--color-primary)",
|
|
47294
47384
|
animated = false
|
|
47295
47385
|
}) => {
|
|
47296
|
-
const ids =
|
|
47386
|
+
const ids = React91__default.useMemo(() => {
|
|
47297
47387
|
avlElId += 1;
|
|
47298
47388
|
const base = `avl-el-${avlElId}`;
|
|
47299
47389
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -47567,7 +47657,7 @@ function renderNode(node, color, glowId) {
|
|
|
47567
47657
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
47568
47658
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
47569
47659
|
const nc = nodeColor(node.type, color);
|
|
47570
|
-
return /* @__PURE__ */ jsxs(
|
|
47660
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
47571
47661
|
node.children.map((child, i) => {
|
|
47572
47662
|
const childR = Math.max(
|
|
47573
47663
|
child.type === "operator" ? 20 : 16,
|
|
@@ -47624,7 +47714,7 @@ var AvlExprTree = ({
|
|
|
47624
47714
|
className,
|
|
47625
47715
|
color = "var(--color-primary)"
|
|
47626
47716
|
}) => {
|
|
47627
|
-
const ids =
|
|
47717
|
+
const ids = React91__default.useMemo(() => {
|
|
47628
47718
|
avlEtId += 1;
|
|
47629
47719
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
47630
47720
|
}, []);
|
|
@@ -48459,7 +48549,7 @@ var SystemNode = ({ data }) => {
|
|
|
48459
48549
|
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
48550
|
const tc = transitionCounts[s.name] ?? 0;
|
|
48461
48551
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
48462
|
-
return /* @__PURE__ */ jsxs(
|
|
48552
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
48463
48553
|
/* @__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
48554
|
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
48555
|
] }, s.name);
|
|
@@ -49541,7 +49631,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
49541
49631
|
}
|
|
49542
49632
|
return substituted;
|
|
49543
49633
|
}
|
|
49544
|
-
if (body !== null && typeof body === "object" && !
|
|
49634
|
+
if (body !== null && typeof body === "object" && !React91__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
49545
49635
|
const out = {};
|
|
49546
49636
|
for (const [k, v] of Object.entries(body)) {
|
|
49547
49637
|
out[k] = recur(v);
|
|
@@ -49560,7 +49650,7 @@ function getSlotContentRenderer2() {
|
|
|
49560
49650
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
49561
49651
|
return (item, index) => {
|
|
49562
49652
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
49563
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
49653
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React91__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
49564
49654
|
return null;
|
|
49565
49655
|
}
|
|
49566
49656
|
const record = resolvedBody;
|
|
@@ -49579,7 +49669,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
49579
49669
|
props: childProps,
|
|
49580
49670
|
priority: 0
|
|
49581
49671
|
};
|
|
49582
|
-
return
|
|
49672
|
+
return React91__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
49583
49673
|
};
|
|
49584
49674
|
}
|
|
49585
49675
|
function convertNode(node, callerKey) {
|
|
@@ -49598,7 +49688,7 @@ function convertNode(node, callerKey) {
|
|
|
49598
49688
|
});
|
|
49599
49689
|
return anyChanged ? mapped : node;
|
|
49600
49690
|
}
|
|
49601
|
-
if (typeof node === "object" && !
|
|
49691
|
+
if (typeof node === "object" && !React91__default.isValidElement(node) && !(node instanceof Date)) {
|
|
49602
49692
|
return convertObjectProps(node);
|
|
49603
49693
|
}
|
|
49604
49694
|
return node;
|
|
@@ -51471,8 +51561,8 @@ function CanvasDndProvider({
|
|
|
51471
51561
|
}) {
|
|
51472
51562
|
const eventBus = useEventBus();
|
|
51473
51563
|
const sensors = useAlmadarDndSensors(false);
|
|
51474
|
-
const [activePayload, setActivePayload] =
|
|
51475
|
-
const handleDragStart =
|
|
51564
|
+
const [activePayload, setActivePayload] = React91__default.useState(null);
|
|
51565
|
+
const handleDragStart = React91__default.useCallback((e) => {
|
|
51476
51566
|
const data = e.active.data.current;
|
|
51477
51567
|
const payload = data?.payload;
|
|
51478
51568
|
if (payload) {
|
|
@@ -51483,7 +51573,7 @@ function CanvasDndProvider({
|
|
|
51483
51573
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
51484
51574
|
}
|
|
51485
51575
|
}, [eventBus]);
|
|
51486
|
-
const handleDragEnd =
|
|
51576
|
+
const handleDragEnd = React91__default.useCallback((e) => {
|
|
51487
51577
|
setActivePayload(null);
|
|
51488
51578
|
const activeData = e.active.data.current;
|
|
51489
51579
|
const payload = activeData?.payload;
|
|
@@ -51512,7 +51602,7 @@ function CanvasDndProvider({
|
|
|
51512
51602
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
51513
51603
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
51514
51604
|
}, [eventBus, onDrop]);
|
|
51515
|
-
const handleDragCancel =
|
|
51605
|
+
const handleDragCancel = React91__default.useCallback(() => {
|
|
51516
51606
|
setActivePayload(null);
|
|
51517
51607
|
log9.info("dragCancel");
|
|
51518
51608
|
}, []);
|
|
@@ -52270,7 +52360,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
52270
52360
|
}
|
|
52271
52361
|
);
|
|
52272
52362
|
};
|
|
52273
|
-
var OrbPreviewNode =
|
|
52363
|
+
var OrbPreviewNode = React91__default.memo(OrbPreviewNodeInner);
|
|
52274
52364
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
52275
52365
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
52276
52366
|
type: typeof OrbPreviewNode,
|
|
@@ -52375,7 +52465,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
52375
52465
|
) })
|
|
52376
52466
|
] });
|
|
52377
52467
|
};
|
|
52378
|
-
var EventFlowEdge =
|
|
52468
|
+
var EventFlowEdge = React91__default.memo(EventFlowEdgeInner);
|
|
52379
52469
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
52380
52470
|
|
|
52381
52471
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -52522,7 +52612,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
52522
52612
|
}
|
|
52523
52613
|
);
|
|
52524
52614
|
};
|
|
52525
|
-
var BehaviorComposeNode =
|
|
52615
|
+
var BehaviorComposeNode = React91__default.memo(BehaviorComposeNodeInner);
|
|
52526
52616
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
52527
52617
|
|
|
52528
52618
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -53548,7 +53638,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
53548
53638
|
}
|
|
53549
53639
|
);
|
|
53550
53640
|
};
|
|
53551
|
-
var TraitCardNode =
|
|
53641
|
+
var TraitCardNode = React91__default.memo(TraitCardNodeInner);
|
|
53552
53642
|
TraitCardNode.displayName = "TraitCardNode";
|
|
53553
53643
|
|
|
53554
53644
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -53629,7 +53719,7 @@ function FlowCanvasInner({
|
|
|
53629
53719
|
initialOrbital
|
|
53630
53720
|
);
|
|
53631
53721
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
53632
|
-
const screenSizeUserOverrideRef =
|
|
53722
|
+
const screenSizeUserOverrideRef = React91__default.useRef(false);
|
|
53633
53723
|
const [screenSize, setScreenSize] = useState(
|
|
53634
53724
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
53635
53725
|
);
|
|
@@ -54013,7 +54103,7 @@ var ZoomBreadcrumb = ({
|
|
|
54013
54103
|
if (eventName && band === "detail") {
|
|
54014
54104
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
54015
54105
|
}
|
|
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(
|
|
54106
|
+
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
54107
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
54018
54108
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
54019
54109
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -54354,7 +54444,7 @@ var EventWireOverlay = ({
|
|
|
54354
54444
|
containerW,
|
|
54355
54445
|
containerH
|
|
54356
54446
|
}) => {
|
|
54357
|
-
const ids =
|
|
54447
|
+
const ids = React91__default.useMemo(() => {
|
|
54358
54448
|
avlOczWireId += 1;
|
|
54359
54449
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
54360
54450
|
}, []);
|
|
@@ -54721,7 +54811,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
54721
54811
|
borderRadius: 6,
|
|
54722
54812
|
border: `1px solid ${color}`
|
|
54723
54813
|
},
|
|
54724
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
54814
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
54725
54815
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
54726
54816
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
54727
54817
|
Box,
|