@almadar/ui 5.25.0 → 5.25.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 +1376 -1987
- package/dist/avl/index.js +310 -921
- package/dist/components/core/atoms/Typography.d.ts +0 -18
- package/dist/components/core/atoms/index.d.ts +1 -1
- package/dist/components/core/organisms/ComponentPatterns.d.ts +0 -3
- package/dist/components/game/atoms/DialogueBubble.d.ts +2 -1
- package/dist/components/game/atoms/Sprite.d.ts +2 -2
- package/dist/components/index.cjs +1409 -1458
- package/dist/components/index.js +507 -556
- package/dist/docs/index.cjs +2 -2
- package/dist/docs/index.js +2 -2
- package/dist/marketing/index.cjs +4 -4
- package/dist/marketing/index.js +4 -4
- package/dist/providers/index.cjs +1196 -1807
- package/dist/providers/index.js +281 -892
- package/dist/runtime/index.cjs +1236 -1847
- package/dist/runtime/index.js +285 -896
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React86 from 'react';
|
|
2
|
+
import React86__default, { createContext, useMemo, useContext, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -393,7 +393,7 @@ var init_Box = __esm({
|
|
|
393
393
|
fixed: "fixed",
|
|
394
394
|
sticky: "sticky"
|
|
395
395
|
};
|
|
396
|
-
Box =
|
|
396
|
+
Box = React86__default.forwardRef(
|
|
397
397
|
({
|
|
398
398
|
padding,
|
|
399
399
|
paddingX,
|
|
@@ -443,7 +443,7 @@ var init_Box = __esm({
|
|
|
443
443
|
onMouseLeave?.(e);
|
|
444
444
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
445
445
|
const isClickable = action || onClick;
|
|
446
|
-
return
|
|
446
|
+
return React86__default.createElement(
|
|
447
447
|
Component,
|
|
448
448
|
{
|
|
449
449
|
ref,
|
|
@@ -1226,7 +1226,7 @@ var init_Icon = __esm({
|
|
|
1226
1226
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1227
1227
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1228
1228
|
const family = useIconFamily();
|
|
1229
|
-
const RenderedComponent =
|
|
1229
|
+
const RenderedComponent = React86__default.useMemo(() => {
|
|
1230
1230
|
if (directIcon) return null;
|
|
1231
1231
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1232
1232
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1284,7 +1284,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1284
1284
|
const IconComp = value;
|
|
1285
1285
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1286
1286
|
}
|
|
1287
|
-
if (
|
|
1287
|
+
if (React86__default.isValidElement(value)) {
|
|
1288
1288
|
return value;
|
|
1289
1289
|
}
|
|
1290
1290
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1360,7 +1360,7 @@ var init_Button = __esm({
|
|
|
1360
1360
|
md: "h-icon-default w-icon-default",
|
|
1361
1361
|
lg: "h-icon-default w-icon-default"
|
|
1362
1362
|
};
|
|
1363
|
-
Button =
|
|
1363
|
+
Button = React86__default.forwardRef(
|
|
1364
1364
|
({
|
|
1365
1365
|
className,
|
|
1366
1366
|
variant = "primary",
|
|
@@ -1425,7 +1425,7 @@ var Dialog;
|
|
|
1425
1425
|
var init_Dialog = __esm({
|
|
1426
1426
|
"components/core/atoms/Dialog.tsx"() {
|
|
1427
1427
|
init_cn();
|
|
1428
|
-
Dialog =
|
|
1428
|
+
Dialog = React86__default.forwardRef(
|
|
1429
1429
|
({
|
|
1430
1430
|
role = "dialog",
|
|
1431
1431
|
"aria-modal": ariaModal = true,
|
|
@@ -1451,11 +1451,9 @@ var init_Dialog = __esm({
|
|
|
1451
1451
|
// components/core/atoms/Typography.tsx
|
|
1452
1452
|
var Typography_exports = {};
|
|
1453
1453
|
__export(Typography_exports, {
|
|
1454
|
-
Heading: () => Heading,
|
|
1455
|
-
Text: () => Text,
|
|
1456
1454
|
Typography: () => Typography
|
|
1457
1455
|
});
|
|
1458
|
-
var variantStyles2, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography
|
|
1456
|
+
var variantStyles2, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography;
|
|
1459
1457
|
var init_Typography = __esm({
|
|
1460
1458
|
"components/core/atoms/Typography.tsx"() {
|
|
1461
1459
|
init_cn();
|
|
@@ -1566,46 +1564,6 @@ var init_Typography = __esm({
|
|
|
1566
1564
|
);
|
|
1567
1565
|
};
|
|
1568
1566
|
Typography.displayName = "Typography";
|
|
1569
|
-
sizeStyles2 = {
|
|
1570
|
-
xs: "text-xs",
|
|
1571
|
-
sm: "text-sm",
|
|
1572
|
-
md: "text-base",
|
|
1573
|
-
lg: "text-lg",
|
|
1574
|
-
xl: "text-xl",
|
|
1575
|
-
"2xl": "text-2xl",
|
|
1576
|
-
"3xl": "text-3xl"
|
|
1577
|
-
};
|
|
1578
|
-
Heading = ({
|
|
1579
|
-
level = 2,
|
|
1580
|
-
size,
|
|
1581
|
-
className,
|
|
1582
|
-
...props
|
|
1583
|
-
}) => {
|
|
1584
|
-
const variant = `h${level}`;
|
|
1585
|
-
const sizeClass = size ? sizeStyles2[size] : void 0;
|
|
1586
|
-
return /* @__PURE__ */ jsx(
|
|
1587
|
-
Typography,
|
|
1588
|
-
{
|
|
1589
|
-
variant,
|
|
1590
|
-
className: cn(sizeClass, className),
|
|
1591
|
-
...props
|
|
1592
|
-
}
|
|
1593
|
-
);
|
|
1594
|
-
};
|
|
1595
|
-
Heading.displayName = "Heading";
|
|
1596
|
-
Text = ({
|
|
1597
|
-
variant = "body",
|
|
1598
|
-
...props
|
|
1599
|
-
}) => {
|
|
1600
|
-
return /* @__PURE__ */ jsx(
|
|
1601
|
-
Typography,
|
|
1602
|
-
{
|
|
1603
|
-
variant,
|
|
1604
|
-
...props
|
|
1605
|
-
}
|
|
1606
|
-
);
|
|
1607
|
-
};
|
|
1608
|
-
Text.displayName = "Text";
|
|
1609
1567
|
}
|
|
1610
1568
|
});
|
|
1611
1569
|
var Overlay;
|
|
@@ -2047,7 +2005,7 @@ var init_Drawer = __esm({
|
|
|
2047
2005
|
Drawer.displayName = "Drawer";
|
|
2048
2006
|
}
|
|
2049
2007
|
});
|
|
2050
|
-
var variantStyles3,
|
|
2008
|
+
var variantStyles3, sizeStyles2, Badge;
|
|
2051
2009
|
var init_Badge = __esm({
|
|
2052
2010
|
"components/core/atoms/Badge.tsx"() {
|
|
2053
2011
|
init_cn();
|
|
@@ -2084,12 +2042,12 @@ var init_Badge = __esm({
|
|
|
2084
2042
|
"border-[length:var(--border-width-thin)] border-border"
|
|
2085
2043
|
].join(" ")
|
|
2086
2044
|
};
|
|
2087
|
-
|
|
2045
|
+
sizeStyles2 = {
|
|
2088
2046
|
sm: "px-2 py-0.5 text-xs",
|
|
2089
2047
|
md: "px-2.5 py-1 text-sm",
|
|
2090
2048
|
lg: "px-3 py-1.5 text-base"
|
|
2091
2049
|
};
|
|
2092
|
-
Badge =
|
|
2050
|
+
Badge = React86__default.forwardRef(
|
|
2093
2051
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2094
2052
|
const iconSizes3 = {
|
|
2095
2053
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2104,7 +2062,7 @@ var init_Badge = __esm({
|
|
|
2104
2062
|
className: cn(
|
|
2105
2063
|
"inline-flex items-center gap-1 font-bold rounded-sm",
|
|
2106
2064
|
variantStyles3[variant],
|
|
2107
|
-
|
|
2065
|
+
sizeStyles2[size],
|
|
2108
2066
|
onRemove && "pr-1",
|
|
2109
2067
|
className
|
|
2110
2068
|
),
|
|
@@ -2405,7 +2363,7 @@ var init_SvgFlow = __esm({
|
|
|
2405
2363
|
opacity = 1,
|
|
2406
2364
|
className
|
|
2407
2365
|
}) => {
|
|
2408
|
-
const markerId =
|
|
2366
|
+
const markerId = React86__default.useMemo(() => {
|
|
2409
2367
|
flowIdCounter += 1;
|
|
2410
2368
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2411
2369
|
}, []);
|
|
@@ -2948,7 +2906,7 @@ var init_SvgRing = __esm({
|
|
|
2948
2906
|
className,
|
|
2949
2907
|
label
|
|
2950
2908
|
}) => {
|
|
2951
|
-
const gradientId =
|
|
2909
|
+
const gradientId = React86__default.useMemo(() => {
|
|
2952
2910
|
ringIdCounter += 1;
|
|
2953
2911
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2954
2912
|
}, []);
|
|
@@ -3110,7 +3068,7 @@ var init_Input = __esm({
|
|
|
3110
3068
|
"components/core/atoms/Input.tsx"() {
|
|
3111
3069
|
init_cn();
|
|
3112
3070
|
init_Icon();
|
|
3113
|
-
Input =
|
|
3071
|
+
Input = React86__default.forwardRef(
|
|
3114
3072
|
({
|
|
3115
3073
|
className,
|
|
3116
3074
|
inputType,
|
|
@@ -3231,7 +3189,7 @@ var Label;
|
|
|
3231
3189
|
var init_Label = __esm({
|
|
3232
3190
|
"components/core/atoms/Label.tsx"() {
|
|
3233
3191
|
init_cn();
|
|
3234
|
-
Label =
|
|
3192
|
+
Label = React86__default.forwardRef(
|
|
3235
3193
|
({ className, required, children, ...props }, ref) => {
|
|
3236
3194
|
return /* @__PURE__ */ jsxs(
|
|
3237
3195
|
"label",
|
|
@@ -3257,7 +3215,7 @@ var Textarea;
|
|
|
3257
3215
|
var init_Textarea = __esm({
|
|
3258
3216
|
"components/core/atoms/Textarea.tsx"() {
|
|
3259
3217
|
init_cn();
|
|
3260
|
-
Textarea =
|
|
3218
|
+
Textarea = React86__default.forwardRef(
|
|
3261
3219
|
({ className, error, ...props }, ref) => {
|
|
3262
3220
|
return /* @__PURE__ */ jsx(
|
|
3263
3221
|
"textarea",
|
|
@@ -3287,7 +3245,7 @@ var init_Select = __esm({
|
|
|
3287
3245
|
"components/core/atoms/Select.tsx"() {
|
|
3288
3246
|
init_cn();
|
|
3289
3247
|
init_Icon();
|
|
3290
|
-
Select =
|
|
3248
|
+
Select = React86__default.forwardRef(
|
|
3291
3249
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
3292
3250
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3293
3251
|
/* @__PURE__ */ jsxs(
|
|
@@ -3329,7 +3287,7 @@ var Checkbox;
|
|
|
3329
3287
|
var init_Checkbox = __esm({
|
|
3330
3288
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3331
3289
|
init_cn();
|
|
3332
|
-
Checkbox =
|
|
3290
|
+
Checkbox = React86__default.forwardRef(
|
|
3333
3291
|
({ className, label, id, ...props }, ref) => {
|
|
3334
3292
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3335
3293
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -3420,7 +3378,7 @@ var init_Card = __esm({
|
|
|
3420
3378
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3421
3379
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3422
3380
|
};
|
|
3423
|
-
Card =
|
|
3381
|
+
Card = React86__default.forwardRef(
|
|
3424
3382
|
({
|
|
3425
3383
|
className,
|
|
3426
3384
|
variant = "bordered",
|
|
@@ -3458,9 +3416,9 @@ var init_Card = __esm({
|
|
|
3458
3416
|
}
|
|
3459
3417
|
);
|
|
3460
3418
|
Card.displayName = "Card";
|
|
3461
|
-
CardHeader =
|
|
3419
|
+
CardHeader = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3462
3420
|
CardHeader.displayName = "CardHeader";
|
|
3463
|
-
CardTitle =
|
|
3421
|
+
CardTitle = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3464
3422
|
"h3",
|
|
3465
3423
|
{
|
|
3466
3424
|
ref,
|
|
@@ -3473,11 +3431,11 @@ var init_Card = __esm({
|
|
|
3473
3431
|
}
|
|
3474
3432
|
));
|
|
3475
3433
|
CardTitle.displayName = "CardTitle";
|
|
3476
|
-
CardContent =
|
|
3434
|
+
CardContent = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3477
3435
|
CardContent.displayName = "CardContent";
|
|
3478
3436
|
CardBody = CardContent;
|
|
3479
3437
|
CardBody.displayName = "CardBody";
|
|
3480
|
-
CardFooter =
|
|
3438
|
+
CardFooter = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3481
3439
|
"div",
|
|
3482
3440
|
{
|
|
3483
3441
|
ref,
|
|
@@ -3488,7 +3446,7 @@ var init_Card = __esm({
|
|
|
3488
3446
|
CardFooter.displayName = "CardFooter";
|
|
3489
3447
|
}
|
|
3490
3448
|
});
|
|
3491
|
-
var variantStyles5,
|
|
3449
|
+
var variantStyles5, sizeStyles3, iconSizes, FilterPill;
|
|
3492
3450
|
var init_FilterPill = __esm({
|
|
3493
3451
|
"components/core/atoms/FilterPill.tsx"() {
|
|
3494
3452
|
init_cn();
|
|
@@ -3522,7 +3480,7 @@ var init_FilterPill = __esm({
|
|
|
3522
3480
|
"border-[length:var(--border-width-thin)] border-border"
|
|
3523
3481
|
].join(" ")
|
|
3524
3482
|
};
|
|
3525
|
-
|
|
3483
|
+
sizeStyles3 = {
|
|
3526
3484
|
sm: "px-2 py-0.5 text-xs",
|
|
3527
3485
|
md: "px-2.5 py-1 text-sm",
|
|
3528
3486
|
lg: "px-3 py-1.5 text-base"
|
|
@@ -3532,7 +3490,7 @@ var init_FilterPill = __esm({
|
|
|
3532
3490
|
md: "w-3.5 h-3.5",
|
|
3533
3491
|
lg: "w-4 h-4"
|
|
3534
3492
|
};
|
|
3535
|
-
FilterPill =
|
|
3493
|
+
FilterPill = React86__default.forwardRef(
|
|
3536
3494
|
({
|
|
3537
3495
|
className,
|
|
3538
3496
|
variant = "default",
|
|
@@ -3566,7 +3524,7 @@ var init_FilterPill = __esm({
|
|
|
3566
3524
|
className: cn(
|
|
3567
3525
|
"inline-flex items-center gap-1 font-bold rounded-pill",
|
|
3568
3526
|
variantStyles5[variant],
|
|
3569
|
-
|
|
3527
|
+
sizeStyles3[size],
|
|
3570
3528
|
(onClick || clickEvent) && "cursor-pointer",
|
|
3571
3529
|
className
|
|
3572
3530
|
),
|
|
@@ -3598,18 +3556,18 @@ var init_FilterPill = __esm({
|
|
|
3598
3556
|
FilterPill.displayName = "FilterPill";
|
|
3599
3557
|
}
|
|
3600
3558
|
});
|
|
3601
|
-
var
|
|
3559
|
+
var sizeStyles4, Spinner;
|
|
3602
3560
|
var init_Spinner = __esm({
|
|
3603
3561
|
"components/core/atoms/Spinner.tsx"() {
|
|
3604
3562
|
init_cn();
|
|
3605
3563
|
init_Icon();
|
|
3606
|
-
|
|
3564
|
+
sizeStyles4 = {
|
|
3607
3565
|
xs: "h-3 w-3",
|
|
3608
3566
|
sm: "h-icon-default w-icon-default",
|
|
3609
3567
|
md: "h-6 w-6",
|
|
3610
3568
|
lg: "h-8 w-8"
|
|
3611
3569
|
};
|
|
3612
|
-
Spinner =
|
|
3570
|
+
Spinner = React86__default.forwardRef(
|
|
3613
3571
|
({ className, size = "md", ...props }, ref) => {
|
|
3614
3572
|
return /* @__PURE__ */ jsx(
|
|
3615
3573
|
"div",
|
|
@@ -3617,7 +3575,7 @@ var init_Spinner = __esm({
|
|
|
3617
3575
|
ref,
|
|
3618
3576
|
className: cn("text-foreground", className),
|
|
3619
3577
|
...props,
|
|
3620
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin",
|
|
3578
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles4[size]) })
|
|
3621
3579
|
}
|
|
3622
3580
|
);
|
|
3623
3581
|
}
|
|
@@ -3688,8 +3646,8 @@ var init_Avatar = __esm({
|
|
|
3688
3646
|
actionPayload
|
|
3689
3647
|
}) => {
|
|
3690
3648
|
const eventBus = useEventBus();
|
|
3691
|
-
const [imgFailed, setImgFailed] =
|
|
3692
|
-
|
|
3649
|
+
const [imgFailed, setImgFailed] = React86__default.useState(false);
|
|
3650
|
+
React86__default.useEffect(() => {
|
|
3693
3651
|
setImgFailed(false);
|
|
3694
3652
|
}, [src]);
|
|
3695
3653
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4074,7 +4032,7 @@ var init_Radio = __esm({
|
|
|
4074
4032
|
md: "w-2.5 h-2.5",
|
|
4075
4033
|
lg: "w-3 h-3"
|
|
4076
4034
|
};
|
|
4077
|
-
Radio =
|
|
4035
|
+
Radio = React86__default.forwardRef(
|
|
4078
4036
|
({
|
|
4079
4037
|
label,
|
|
4080
4038
|
helperText,
|
|
@@ -4091,12 +4049,12 @@ var init_Radio = __esm({
|
|
|
4091
4049
|
onChange,
|
|
4092
4050
|
...props
|
|
4093
4051
|
}, ref) => {
|
|
4094
|
-
const reactId =
|
|
4052
|
+
const reactId = React86__default.useId();
|
|
4095
4053
|
const baseId = id || `radio-${reactId}`;
|
|
4096
4054
|
const hasError = !!error;
|
|
4097
4055
|
const eventBus = useEventBus();
|
|
4098
|
-
const [selected, setSelected] =
|
|
4099
|
-
|
|
4056
|
+
const [selected, setSelected] = React86__default.useState(value);
|
|
4057
|
+
React86__default.useEffect(() => {
|
|
4100
4058
|
if (value !== void 0) setSelected(value);
|
|
4101
4059
|
}, [value]);
|
|
4102
4060
|
const pick = (next, e) => {
|
|
@@ -4278,7 +4236,7 @@ var init_Switch = __esm({
|
|
|
4278
4236
|
"components/core/atoms/Switch.tsx"() {
|
|
4279
4237
|
"use client";
|
|
4280
4238
|
init_cn();
|
|
4281
|
-
Switch =
|
|
4239
|
+
Switch = React86.forwardRef(
|
|
4282
4240
|
({
|
|
4283
4241
|
checked,
|
|
4284
4242
|
defaultChecked = false,
|
|
@@ -4289,10 +4247,10 @@ var init_Switch = __esm({
|
|
|
4289
4247
|
name,
|
|
4290
4248
|
className
|
|
4291
4249
|
}, ref) => {
|
|
4292
|
-
const [isChecked, setIsChecked] =
|
|
4250
|
+
const [isChecked, setIsChecked] = React86.useState(
|
|
4293
4251
|
checked !== void 0 ? checked : defaultChecked
|
|
4294
4252
|
);
|
|
4295
|
-
|
|
4253
|
+
React86.useEffect(() => {
|
|
4296
4254
|
if (checked !== void 0) {
|
|
4297
4255
|
setIsChecked(checked);
|
|
4298
4256
|
}
|
|
@@ -4823,7 +4781,7 @@ var Aside;
|
|
|
4823
4781
|
var init_Aside = __esm({
|
|
4824
4782
|
"components/core/atoms/Aside.tsx"() {
|
|
4825
4783
|
init_cn();
|
|
4826
|
-
Aside =
|
|
4784
|
+
Aside = React86__default.forwardRef(
|
|
4827
4785
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4828
4786
|
);
|
|
4829
4787
|
Aside.displayName = "Aside";
|
|
@@ -4901,8 +4859,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4901
4859
|
className
|
|
4902
4860
|
}) => {
|
|
4903
4861
|
const { t } = useTranslate();
|
|
4904
|
-
const [isVisible, setIsVisible] =
|
|
4905
|
-
const timeoutRef =
|
|
4862
|
+
const [isVisible, setIsVisible] = React86__default.useState(false);
|
|
4863
|
+
const timeoutRef = React86__default.useRef(null);
|
|
4906
4864
|
const handleMouseEnter = () => {
|
|
4907
4865
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4908
4866
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4911,7 +4869,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4911
4869
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4912
4870
|
setIsVisible(false);
|
|
4913
4871
|
};
|
|
4914
|
-
|
|
4872
|
+
React86__default.useEffect(() => {
|
|
4915
4873
|
return () => {
|
|
4916
4874
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4917
4875
|
};
|
|
@@ -5096,7 +5054,7 @@ var init_TimeSlotCell = __esm({
|
|
|
5096
5054
|
TimeSlotCell.displayName = "TimeSlotCell";
|
|
5097
5055
|
}
|
|
5098
5056
|
});
|
|
5099
|
-
var statusColors, pulseRingColors,
|
|
5057
|
+
var statusColors, pulseRingColors, sizeStyles5, StatusDot;
|
|
5100
5058
|
var init_StatusDot = __esm({
|
|
5101
5059
|
"components/core/atoms/StatusDot.tsx"() {
|
|
5102
5060
|
init_cn();
|
|
@@ -5116,12 +5074,12 @@ var init_StatusDot = __esm({
|
|
|
5116
5074
|
warning: "ring-warning",
|
|
5117
5075
|
critical: "ring-error"
|
|
5118
5076
|
};
|
|
5119
|
-
|
|
5077
|
+
sizeStyles5 = {
|
|
5120
5078
|
sm: "w-2 h-2",
|
|
5121
5079
|
md: "w-2.5 h-2.5",
|
|
5122
5080
|
lg: "w-3 h-3"
|
|
5123
5081
|
};
|
|
5124
|
-
StatusDot =
|
|
5082
|
+
StatusDot = React86__default.forwardRef(
|
|
5125
5083
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5126
5084
|
return /* @__PURE__ */ jsx(
|
|
5127
5085
|
"span",
|
|
@@ -5130,7 +5088,7 @@ var init_StatusDot = __esm({
|
|
|
5130
5088
|
className: cn(
|
|
5131
5089
|
"inline-block rounded-full flex-shrink-0",
|
|
5132
5090
|
statusColors[status],
|
|
5133
|
-
|
|
5091
|
+
sizeStyles5[size],
|
|
5134
5092
|
pulse && [
|
|
5135
5093
|
"animate-pulse",
|
|
5136
5094
|
"ring-2 ring-offset-1",
|
|
@@ -5160,12 +5118,12 @@ function resolveColor(dir, invert) {
|
|
|
5160
5118
|
const isGood = invert ? !isPositive : isPositive;
|
|
5161
5119
|
return isGood ? "text-success" : "text-error";
|
|
5162
5120
|
}
|
|
5163
|
-
var
|
|
5121
|
+
var sizeStyles6, iconNameMap, TrendIndicator;
|
|
5164
5122
|
var init_TrendIndicator = __esm({
|
|
5165
5123
|
"components/core/atoms/TrendIndicator.tsx"() {
|
|
5166
5124
|
init_Icon();
|
|
5167
5125
|
init_cn();
|
|
5168
|
-
|
|
5126
|
+
sizeStyles6 = {
|
|
5169
5127
|
sm: { icon: "w-3 h-3", text: "text-xs" },
|
|
5170
5128
|
md: { icon: "w-4 h-4", text: "text-sm" },
|
|
5171
5129
|
lg: { icon: "w-5 h-5", text: "text-base" }
|
|
@@ -5175,7 +5133,7 @@ var init_TrendIndicator = __esm({
|
|
|
5175
5133
|
down: "trending-down",
|
|
5176
5134
|
flat: "arrow-right"
|
|
5177
5135
|
};
|
|
5178
|
-
TrendIndicator =
|
|
5136
|
+
TrendIndicator = React86__default.forwardRef(
|
|
5179
5137
|
({
|
|
5180
5138
|
className,
|
|
5181
5139
|
value,
|
|
@@ -5189,7 +5147,7 @@ var init_TrendIndicator = __esm({
|
|
|
5189
5147
|
const dir = resolveDirection(value, direction);
|
|
5190
5148
|
const colorClass = resolveColor(dir, invert);
|
|
5191
5149
|
const iconName = iconNameMap[dir];
|
|
5192
|
-
const styles =
|
|
5150
|
+
const styles = sizeStyles6[size];
|
|
5193
5151
|
const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
|
|
5194
5152
|
const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
|
|
5195
5153
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5242,7 +5200,7 @@ var init_RangeSlider = __esm({
|
|
|
5242
5200
|
md: "w-4 h-4",
|
|
5243
5201
|
lg: "w-5 h-5"
|
|
5244
5202
|
};
|
|
5245
|
-
RangeSlider =
|
|
5203
|
+
RangeSlider = React86__default.forwardRef(
|
|
5246
5204
|
({
|
|
5247
5205
|
className,
|
|
5248
5206
|
min = 0,
|
|
@@ -5750,7 +5708,7 @@ var init_ContentSection = __esm({
|
|
|
5750
5708
|
md: "py-16",
|
|
5751
5709
|
lg: "py-24"
|
|
5752
5710
|
};
|
|
5753
|
-
ContentSection =
|
|
5711
|
+
ContentSection = React86__default.forwardRef(
|
|
5754
5712
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5755
5713
|
return /* @__PURE__ */ jsx(
|
|
5756
5714
|
Box,
|
|
@@ -6284,7 +6242,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6284
6242
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6285
6243
|
"none": {}
|
|
6286
6244
|
};
|
|
6287
|
-
AnimatedReveal =
|
|
6245
|
+
AnimatedReveal = React86__default.forwardRef(
|
|
6288
6246
|
({
|
|
6289
6247
|
trigger = "scroll",
|
|
6290
6248
|
animation = "fade-up",
|
|
@@ -6444,7 +6402,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6444
6402
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6445
6403
|
"use client";
|
|
6446
6404
|
init_cn();
|
|
6447
|
-
AnimatedGraphic =
|
|
6405
|
+
AnimatedGraphic = React86__default.forwardRef(
|
|
6448
6406
|
({
|
|
6449
6407
|
src,
|
|
6450
6408
|
svgContent,
|
|
@@ -6467,7 +6425,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6467
6425
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6468
6426
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6469
6427
|
const prevAnimateRef = useRef(animate);
|
|
6470
|
-
const setRef =
|
|
6428
|
+
const setRef = React86__default.useCallback(
|
|
6471
6429
|
(node) => {
|
|
6472
6430
|
containerRef.current = node;
|
|
6473
6431
|
if (typeof ref === "function") ref(node);
|
|
@@ -6692,9 +6650,9 @@ function ScoreDisplay({
|
|
|
6692
6650
|
...rest
|
|
6693
6651
|
}) {
|
|
6694
6652
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
6695
|
-
const [displayValue, setDisplayValue] =
|
|
6696
|
-
const [isAnimating, setIsAnimating] =
|
|
6697
|
-
|
|
6653
|
+
const [displayValue, setDisplayValue] = React86.useState(resolvedValue);
|
|
6654
|
+
const [isAnimating, setIsAnimating] = React86.useState(false);
|
|
6655
|
+
React86.useEffect(() => {
|
|
6698
6656
|
if (!animated || displayValue === resolvedValue) {
|
|
6699
6657
|
setDisplayValue(resolvedValue);
|
|
6700
6658
|
return;
|
|
@@ -6764,9 +6722,9 @@ function ControlButton({
|
|
|
6764
6722
|
className
|
|
6765
6723
|
}) {
|
|
6766
6724
|
const eventBus = useEventBus();
|
|
6767
|
-
const [isPressed, setIsPressed] =
|
|
6725
|
+
const [isPressed, setIsPressed] = React86.useState(false);
|
|
6768
6726
|
const actualPressed = pressed ?? isPressed;
|
|
6769
|
-
const handlePointerDown =
|
|
6727
|
+
const handlePointerDown = React86.useCallback(
|
|
6770
6728
|
(e) => {
|
|
6771
6729
|
e.preventDefault();
|
|
6772
6730
|
if (disabled) return;
|
|
@@ -6776,7 +6734,7 @@ function ControlButton({
|
|
|
6776
6734
|
},
|
|
6777
6735
|
[disabled, pressEvent, eventBus, onPress]
|
|
6778
6736
|
);
|
|
6779
|
-
const handlePointerUp =
|
|
6737
|
+
const handlePointerUp = React86.useCallback(
|
|
6780
6738
|
(e) => {
|
|
6781
6739
|
e.preventDefault();
|
|
6782
6740
|
if (disabled) return;
|
|
@@ -6786,7 +6744,7 @@ function ControlButton({
|
|
|
6786
6744
|
},
|
|
6787
6745
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6788
6746
|
);
|
|
6789
|
-
const handlePointerLeave =
|
|
6747
|
+
const handlePointerLeave = React86.useCallback(
|
|
6790
6748
|
(e) => {
|
|
6791
6749
|
if (isPressed) {
|
|
6792
6750
|
setIsPressed(false);
|
|
@@ -6854,7 +6812,7 @@ var init_ControlButton = __esm({
|
|
|
6854
6812
|
}
|
|
6855
6813
|
});
|
|
6856
6814
|
function Sprite({
|
|
6857
|
-
spritesheet,
|
|
6815
|
+
spritesheet = "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
|
|
6858
6816
|
frameWidth,
|
|
6859
6817
|
frameHeight,
|
|
6860
6818
|
frame,
|
|
@@ -7275,8 +7233,8 @@ function XPBar({
|
|
|
7275
7233
|
}) {
|
|
7276
7234
|
const sizes = sizeMap9[size];
|
|
7277
7235
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7278
|
-
const [fillWidth, setFillWidth] =
|
|
7279
|
-
|
|
7236
|
+
const [fillWidth, setFillWidth] = React86.useState(animated ? 0 : percentage);
|
|
7237
|
+
React86.useEffect(() => {
|
|
7280
7238
|
if (!animated) {
|
|
7281
7239
|
setFillWidth(percentage);
|
|
7282
7240
|
return;
|
|
@@ -7534,7 +7492,7 @@ var init_DamageNumber = __esm({
|
|
|
7534
7492
|
function DialogueBubble({
|
|
7535
7493
|
speaker,
|
|
7536
7494
|
text,
|
|
7537
|
-
portrait,
|
|
7495
|
+
portrait = "https://almadar-kflow-assets.web.app/shared/characters/archetypes/00_base_model.png",
|
|
7538
7496
|
position = "bottom",
|
|
7539
7497
|
className
|
|
7540
7498
|
}) {
|
|
@@ -7702,9 +7660,9 @@ function MiniMap({
|
|
|
7702
7660
|
viewportRect,
|
|
7703
7661
|
className
|
|
7704
7662
|
}) {
|
|
7705
|
-
const canvasRef =
|
|
7706
|
-
const frameRef =
|
|
7707
|
-
|
|
7663
|
+
const canvasRef = React86.useRef(null);
|
|
7664
|
+
const frameRef = React86.useRef(0);
|
|
7665
|
+
React86.useEffect(() => {
|
|
7708
7666
|
const canvas = canvasRef.current;
|
|
7709
7667
|
if (!canvas) return;
|
|
7710
7668
|
const ctx = canvas.getContext("2d");
|
|
@@ -7878,7 +7836,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7878
7836
|
}
|
|
7879
7837
|
);
|
|
7880
7838
|
};
|
|
7881
|
-
ErrorBoundary = class extends
|
|
7839
|
+
ErrorBoundary = class extends React86__default.Component {
|
|
7882
7840
|
constructor(props) {
|
|
7883
7841
|
super(props);
|
|
7884
7842
|
__publicField(this, "reset", () => {
|
|
@@ -8153,11 +8111,11 @@ var init_wrapCallbackForEvent = __esm({
|
|
|
8153
8111
|
"runtime/wrapCallbackForEvent.ts"() {
|
|
8154
8112
|
}
|
|
8155
8113
|
});
|
|
8156
|
-
var
|
|
8114
|
+
var sizeStyles7, paddingStyles3, Container;
|
|
8157
8115
|
var init_Container = __esm({
|
|
8158
8116
|
"components/core/molecules/Container.tsx"() {
|
|
8159
8117
|
init_cn();
|
|
8160
|
-
|
|
8118
|
+
sizeStyles7 = {
|
|
8161
8119
|
xs: "max-w-xs",
|
|
8162
8120
|
// 320px
|
|
8163
8121
|
sm: "max-w-screen-sm",
|
|
@@ -8195,7 +8153,7 @@ var init_Container = __esm({
|
|
|
8195
8153
|
{
|
|
8196
8154
|
className: cn(
|
|
8197
8155
|
"w-full",
|
|
8198
|
-
|
|
8156
|
+
sizeStyles7[resolvedSize],
|
|
8199
8157
|
paddingStyles3[padding],
|
|
8200
8158
|
center && "mx-auto",
|
|
8201
8159
|
className
|
|
@@ -8968,8 +8926,8 @@ var init_Tooltip = __esm({
|
|
|
8968
8926
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
8969
8927
|
};
|
|
8970
8928
|
}, []);
|
|
8971
|
-
const triggerElement =
|
|
8972
|
-
const trigger =
|
|
8929
|
+
const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
8930
|
+
const trigger = React86__default.cloneElement(triggerElement, {
|
|
8973
8931
|
ref: triggerRef,
|
|
8974
8932
|
onMouseEnter: handleMouseEnter,
|
|
8975
8933
|
onMouseLeave: handleMouseLeave,
|
|
@@ -9116,8 +9074,8 @@ var init_Popover = __esm({
|
|
|
9116
9074
|
onMouseEnter: handleOpen,
|
|
9117
9075
|
onMouseLeave: handleClose
|
|
9118
9076
|
};
|
|
9119
|
-
const childElement =
|
|
9120
|
-
const triggerElement =
|
|
9077
|
+
const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9078
|
+
const triggerElement = React86__default.cloneElement(
|
|
9121
9079
|
childElement,
|
|
9122
9080
|
{
|
|
9123
9081
|
ref: triggerRef,
|
|
@@ -9243,8 +9201,8 @@ var init_Menu = __esm({
|
|
|
9243
9201
|
};
|
|
9244
9202
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
9245
9203
|
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
9246
|
-
const triggerChild =
|
|
9247
|
-
const triggerElement =
|
|
9204
|
+
const triggerChild = React86__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
9205
|
+
const triggerElement = React86__default.cloneElement(
|
|
9248
9206
|
triggerChild,
|
|
9249
9207
|
{
|
|
9250
9208
|
ref: triggerRef,
|
|
@@ -9651,12 +9609,12 @@ var init_MapView = __esm({
|
|
|
9651
9609
|
shadowSize: [41, 41]
|
|
9652
9610
|
});
|
|
9653
9611
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
9654
|
-
const { useEffect: useEffect72, useRef:
|
|
9612
|
+
const { useEffect: useEffect72, useRef: useRef66, useCallback: useCallback114, useState: useState104 } = React86__default;
|
|
9655
9613
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
9656
9614
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
9657
9615
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
9658
9616
|
const map = useMap();
|
|
9659
|
-
const prevRef =
|
|
9617
|
+
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
9660
9618
|
useEffect72(() => {
|
|
9661
9619
|
const prev = prevRef.current;
|
|
9662
9620
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
@@ -9696,8 +9654,8 @@ var init_MapView = __esm({
|
|
|
9696
9654
|
showAttribution = true
|
|
9697
9655
|
}) {
|
|
9698
9656
|
const eventBus = useEventBus3();
|
|
9699
|
-
const [clickedPosition, setClickedPosition] =
|
|
9700
|
-
const handleMapClick =
|
|
9657
|
+
const [clickedPosition, setClickedPosition] = useState104(null);
|
|
9658
|
+
const handleMapClick = useCallback114((lat, lng) => {
|
|
9701
9659
|
if (showClickedPin) {
|
|
9702
9660
|
setClickedPosition({ lat, lng });
|
|
9703
9661
|
}
|
|
@@ -9706,7 +9664,7 @@ var init_MapView = __esm({
|
|
|
9706
9664
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
9707
9665
|
}
|
|
9708
9666
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
9709
|
-
const handleMarkerClick =
|
|
9667
|
+
const handleMarkerClick = useCallback114((marker) => {
|
|
9710
9668
|
onMarkerClick?.(marker);
|
|
9711
9669
|
if (markerClickEvent) {
|
|
9712
9670
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -9897,7 +9855,7 @@ function InputPattern({
|
|
|
9897
9855
|
fieldName
|
|
9898
9856
|
}) {
|
|
9899
9857
|
const { emit } = useEventBus();
|
|
9900
|
-
const [localValue, setLocalValue] =
|
|
9858
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9901
9859
|
const handleChange = (e) => {
|
|
9902
9860
|
setLocalValue(e.target.value);
|
|
9903
9861
|
if (onChange) {
|
|
@@ -9935,7 +9893,7 @@ function TextareaPattern({
|
|
|
9935
9893
|
fieldName
|
|
9936
9894
|
}) {
|
|
9937
9895
|
const { emit } = useEventBus();
|
|
9938
|
-
const [localValue, setLocalValue] =
|
|
9896
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9939
9897
|
const handleChange = (e) => {
|
|
9940
9898
|
setLocalValue(e.target.value);
|
|
9941
9899
|
if (onChange) {
|
|
@@ -9967,7 +9925,7 @@ function SelectPattern({
|
|
|
9967
9925
|
fieldName
|
|
9968
9926
|
}) {
|
|
9969
9927
|
const { emit } = useEventBus();
|
|
9970
|
-
const [localValue, setLocalValue] =
|
|
9928
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9971
9929
|
const handleChange = (e) => {
|
|
9972
9930
|
setLocalValue(e.target.value);
|
|
9973
9931
|
if (onChange) {
|
|
@@ -9996,7 +9954,7 @@ function CheckboxPattern({
|
|
|
9996
9954
|
className
|
|
9997
9955
|
}) {
|
|
9998
9956
|
const { emit } = useEventBus();
|
|
9999
|
-
const [localChecked, setLocalChecked] =
|
|
9957
|
+
const [localChecked, setLocalChecked] = React86__default.useState(checked);
|
|
10000
9958
|
const handleChange = (e) => {
|
|
10001
9959
|
setLocalChecked(e.target.checked);
|
|
10002
9960
|
if (onChange) {
|
|
@@ -10184,6 +10142,7 @@ var init_ComponentPatterns = __esm({
|
|
|
10184
10142
|
init_ProgressBar();
|
|
10185
10143
|
init_Card();
|
|
10186
10144
|
init_Typography();
|
|
10145
|
+
init_cn();
|
|
10187
10146
|
init_Alert();
|
|
10188
10147
|
init_Tooltip();
|
|
10189
10148
|
init_Popover();
|
|
@@ -10227,8 +10186,8 @@ function ActionButtons({
|
|
|
10227
10186
|
disabled
|
|
10228
10187
|
}) {
|
|
10229
10188
|
const eventBus = useEventBus();
|
|
10230
|
-
const [activeButtons, setActiveButtons] =
|
|
10231
|
-
const handlePress =
|
|
10189
|
+
const [activeButtons, setActiveButtons] = React86.useState(/* @__PURE__ */ new Set());
|
|
10190
|
+
const handlePress = React86.useCallback(
|
|
10232
10191
|
(id) => {
|
|
10233
10192
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
10234
10193
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -10236,7 +10195,7 @@ function ActionButtons({
|
|
|
10236
10195
|
},
|
|
10237
10196
|
[actionEvent, eventBus, onAction]
|
|
10238
10197
|
);
|
|
10239
|
-
const handleRelease =
|
|
10198
|
+
const handleRelease = React86.useCallback(
|
|
10240
10199
|
(id) => {
|
|
10241
10200
|
setActiveButtons((prev) => {
|
|
10242
10201
|
const next = new Set(prev);
|
|
@@ -10517,259 +10476,6 @@ var init_AnimatedCounter = __esm({
|
|
|
10517
10476
|
AnimatedCounter.displayName = "AnimatedCounter";
|
|
10518
10477
|
}
|
|
10519
10478
|
});
|
|
10520
|
-
var ALL_CATEGORY, GridPicker;
|
|
10521
|
-
var init_GridPicker = __esm({
|
|
10522
|
-
"components/core/molecules/GridPicker.tsx"() {
|
|
10523
|
-
"use client";
|
|
10524
|
-
init_cn();
|
|
10525
|
-
init_Input();
|
|
10526
|
-
init_Badge();
|
|
10527
|
-
init_Stack();
|
|
10528
|
-
ALL_CATEGORY = "__all__";
|
|
10529
|
-
GridPicker = ({
|
|
10530
|
-
items,
|
|
10531
|
-
value,
|
|
10532
|
-
onChange,
|
|
10533
|
-
categories,
|
|
10534
|
-
searchPlaceholder,
|
|
10535
|
-
renderThumbnail,
|
|
10536
|
-
cellSize = 32,
|
|
10537
|
-
className
|
|
10538
|
-
}) => {
|
|
10539
|
-
const [search, setSearch] = useState("");
|
|
10540
|
-
const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
|
|
10541
|
-
const gridRef = useRef(null);
|
|
10542
|
-
const categoryChips = useMemo(() => {
|
|
10543
|
-
if (categories !== void 0) return categories;
|
|
10544
|
-
const seen = [];
|
|
10545
|
-
for (const item of items) {
|
|
10546
|
-
if (!seen.includes(item.category)) seen.push(item.category);
|
|
10547
|
-
}
|
|
10548
|
-
return seen;
|
|
10549
|
-
}, [categories, items]);
|
|
10550
|
-
const filtered = useMemo(() => {
|
|
10551
|
-
const needle = search.trim().toLowerCase();
|
|
10552
|
-
return items.filter((item) => {
|
|
10553
|
-
const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
|
|
10554
|
-
const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
|
|
10555
|
-
return matchesCategory && matchesSearch;
|
|
10556
|
-
});
|
|
10557
|
-
}, [items, search, activeCategory]);
|
|
10558
|
-
const select = useCallback(
|
|
10559
|
-
(item) => {
|
|
10560
|
-
onChange(item.id);
|
|
10561
|
-
},
|
|
10562
|
-
[onChange]
|
|
10563
|
-
);
|
|
10564
|
-
const handleKeyDown = useCallback(
|
|
10565
|
-
(e, index) => {
|
|
10566
|
-
const cells = gridRef.current?.querySelectorAll(
|
|
10567
|
-
"[data-gridpicker-cell]"
|
|
10568
|
-
);
|
|
10569
|
-
if (cells === void 0 || cells.length === 0) return;
|
|
10570
|
-
const columns = (() => {
|
|
10571
|
-
const grid = gridRef.current;
|
|
10572
|
-
if (grid === null) return 1;
|
|
10573
|
-
const style = window.getComputedStyle(grid);
|
|
10574
|
-
const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
|
|
10575
|
-
return cols > 0 ? cols : 1;
|
|
10576
|
-
})();
|
|
10577
|
-
let next = -1;
|
|
10578
|
-
if (e.key === "ArrowRight") next = index + 1;
|
|
10579
|
-
else if (e.key === "ArrowLeft") next = index - 1;
|
|
10580
|
-
else if (e.key === "ArrowDown") next = index + columns;
|
|
10581
|
-
else if (e.key === "ArrowUp") next = index - columns;
|
|
10582
|
-
else if (e.key === "Enter" || e.key === " ") {
|
|
10583
|
-
e.preventDefault();
|
|
10584
|
-
select(filtered[index]);
|
|
10585
|
-
return;
|
|
10586
|
-
} else {
|
|
10587
|
-
return;
|
|
10588
|
-
}
|
|
10589
|
-
e.preventDefault();
|
|
10590
|
-
if (next >= 0 && next < cells.length) {
|
|
10591
|
-
cells[next].focus();
|
|
10592
|
-
}
|
|
10593
|
-
},
|
|
10594
|
-
[filtered, select]
|
|
10595
|
-
);
|
|
10596
|
-
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
|
|
10597
|
-
/* @__PURE__ */ jsx(
|
|
10598
|
-
Input,
|
|
10599
|
-
{
|
|
10600
|
-
type: "search",
|
|
10601
|
-
icon: "search",
|
|
10602
|
-
value: search,
|
|
10603
|
-
placeholder: searchPlaceholder,
|
|
10604
|
-
clearable: true,
|
|
10605
|
-
onClear: () => setSearch(""),
|
|
10606
|
-
onChange: (e) => setSearch(e.target.value)
|
|
10607
|
-
}
|
|
10608
|
-
),
|
|
10609
|
-
categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
|
|
10610
|
-
/* @__PURE__ */ jsx(
|
|
10611
|
-
Badge,
|
|
10612
|
-
{
|
|
10613
|
-
variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
|
|
10614
|
-
size: "sm",
|
|
10615
|
-
role: "button",
|
|
10616
|
-
tabIndex: 0,
|
|
10617
|
-
"aria-pressed": activeCategory === ALL_CATEGORY,
|
|
10618
|
-
className: "cursor-pointer",
|
|
10619
|
-
onClick: () => setActiveCategory(ALL_CATEGORY),
|
|
10620
|
-
onKeyDown: (e) => {
|
|
10621
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
10622
|
-
e.preventDefault();
|
|
10623
|
-
setActiveCategory(ALL_CATEGORY);
|
|
10624
|
-
}
|
|
10625
|
-
},
|
|
10626
|
-
children: "All"
|
|
10627
|
-
}
|
|
10628
|
-
),
|
|
10629
|
-
categoryChips.map((category) => /* @__PURE__ */ jsx(
|
|
10630
|
-
Badge,
|
|
10631
|
-
{
|
|
10632
|
-
variant: activeCategory === category ? "primary" : "neutral",
|
|
10633
|
-
size: "sm",
|
|
10634
|
-
role: "button",
|
|
10635
|
-
tabIndex: 0,
|
|
10636
|
-
"aria-pressed": activeCategory === category,
|
|
10637
|
-
className: "cursor-pointer",
|
|
10638
|
-
onClick: () => setActiveCategory(category),
|
|
10639
|
-
onKeyDown: (e) => {
|
|
10640
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
10641
|
-
e.preventDefault();
|
|
10642
|
-
setActiveCategory(category);
|
|
10643
|
-
}
|
|
10644
|
-
},
|
|
10645
|
-
children: category
|
|
10646
|
-
},
|
|
10647
|
-
category
|
|
10648
|
-
))
|
|
10649
|
-
] }),
|
|
10650
|
-
/* @__PURE__ */ jsx(
|
|
10651
|
-
"div",
|
|
10652
|
-
{
|
|
10653
|
-
ref: gridRef,
|
|
10654
|
-
role: "listbox",
|
|
10655
|
-
className: "grid gap-1 overflow-y-auto max-h-64 p-1",
|
|
10656
|
-
style: {
|
|
10657
|
-
gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
|
|
10658
|
-
},
|
|
10659
|
-
children: filtered.map((item, index) => {
|
|
10660
|
-
const selected = item.id === value;
|
|
10661
|
-
return /* @__PURE__ */ jsx(
|
|
10662
|
-
"button",
|
|
10663
|
-
{
|
|
10664
|
-
type: "button",
|
|
10665
|
-
role: "option",
|
|
10666
|
-
"aria-selected": selected,
|
|
10667
|
-
"aria-label": item.label,
|
|
10668
|
-
title: item.label,
|
|
10669
|
-
"data-gridpicker-cell": true,
|
|
10670
|
-
tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
|
|
10671
|
-
onClick: () => select(item),
|
|
10672
|
-
onKeyDown: (e) => handleKeyDown(e, index),
|
|
10673
|
-
className: cn(
|
|
10674
|
-
"flex items-center justify-center rounded-sm",
|
|
10675
|
-
"transition-colors hover:bg-muted",
|
|
10676
|
-
"focus:outline-none focus:ring-1 focus:ring-ring",
|
|
10677
|
-
selected && "bg-primary/10 ring-1 ring-primary"
|
|
10678
|
-
),
|
|
10679
|
-
style: { width: cellSize, height: cellSize },
|
|
10680
|
-
children: renderThumbnail(item)
|
|
10681
|
-
},
|
|
10682
|
-
item.id
|
|
10683
|
-
);
|
|
10684
|
-
})
|
|
10685
|
-
}
|
|
10686
|
-
)
|
|
10687
|
-
] });
|
|
10688
|
-
};
|
|
10689
|
-
GridPicker.displayName = "GridPicker";
|
|
10690
|
-
}
|
|
10691
|
-
});
|
|
10692
|
-
function iconForKind(kind) {
|
|
10693
|
-
if (kind === "audio") return "music";
|
|
10694
|
-
if (kind === "model") return "box";
|
|
10695
|
-
return "file";
|
|
10696
|
-
}
|
|
10697
|
-
var THUMB_PX, IMAGE_KINDS, AssetPicker;
|
|
10698
|
-
var init_AssetPicker = __esm({
|
|
10699
|
-
"components/core/molecules/AssetPicker.tsx"() {
|
|
10700
|
-
"use client";
|
|
10701
|
-
init_GridPicker();
|
|
10702
|
-
init_Icon();
|
|
10703
|
-
THUMB_PX = 32;
|
|
10704
|
-
IMAGE_KINDS = /* @__PURE__ */ new Set([
|
|
10705
|
-
"image",
|
|
10706
|
-
"spritesheet",
|
|
10707
|
-
"scene",
|
|
10708
|
-
"portrait"
|
|
10709
|
-
]);
|
|
10710
|
-
AssetPicker = ({
|
|
10711
|
-
assets,
|
|
10712
|
-
value,
|
|
10713
|
-
onChange,
|
|
10714
|
-
className
|
|
10715
|
-
}) => {
|
|
10716
|
-
const byUrl = useMemo(() => {
|
|
10717
|
-
const map = /* @__PURE__ */ new Map();
|
|
10718
|
-
for (const entry of assets) map.set(entry.url, entry);
|
|
10719
|
-
return map;
|
|
10720
|
-
}, [assets]);
|
|
10721
|
-
const items = useMemo(
|
|
10722
|
-
() => assets.map((entry) => ({
|
|
10723
|
-
id: entry.url,
|
|
10724
|
-
label: entry.name,
|
|
10725
|
-
category: entry.category
|
|
10726
|
-
})),
|
|
10727
|
-
[assets]
|
|
10728
|
-
);
|
|
10729
|
-
const categories = useMemo(() => {
|
|
10730
|
-
const seen = [];
|
|
10731
|
-
for (const entry of assets) {
|
|
10732
|
-
if (!seen.includes(entry.category)) seen.push(entry.category);
|
|
10733
|
-
}
|
|
10734
|
-
return seen;
|
|
10735
|
-
}, [assets]);
|
|
10736
|
-
const renderThumbnail = useCallback(
|
|
10737
|
-
(item) => {
|
|
10738
|
-
const entry = byUrl.get(item.id);
|
|
10739
|
-
if (entry === void 0) return null;
|
|
10740
|
-
if (IMAGE_KINDS.has(entry.kind)) {
|
|
10741
|
-
return /* @__PURE__ */ jsx(
|
|
10742
|
-
"img",
|
|
10743
|
-
{
|
|
10744
|
-
src: entry.thumbnailUrl ?? entry.url,
|
|
10745
|
-
alt: entry.name,
|
|
10746
|
-
loading: "lazy",
|
|
10747
|
-
width: THUMB_PX,
|
|
10748
|
-
height: THUMB_PX,
|
|
10749
|
-
style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
|
|
10750
|
-
}
|
|
10751
|
-
);
|
|
10752
|
-
}
|
|
10753
|
-
return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
|
|
10754
|
-
},
|
|
10755
|
-
[byUrl]
|
|
10756
|
-
);
|
|
10757
|
-
return /* @__PURE__ */ jsx(
|
|
10758
|
-
GridPicker,
|
|
10759
|
-
{
|
|
10760
|
-
items,
|
|
10761
|
-
value,
|
|
10762
|
-
onChange,
|
|
10763
|
-
categories,
|
|
10764
|
-
renderThumbnail,
|
|
10765
|
-
cellSize: THUMB_PX,
|
|
10766
|
-
className
|
|
10767
|
-
}
|
|
10768
|
-
);
|
|
10769
|
-
};
|
|
10770
|
-
AssetPicker.displayName = "AssetPicker";
|
|
10771
|
-
}
|
|
10772
|
-
});
|
|
10773
10479
|
var AuthLayout;
|
|
10774
10480
|
var init_AuthLayout = __esm({
|
|
10775
10481
|
"components/marketing/templates/AuthLayout.tsx"() {
|
|
@@ -13630,7 +13336,7 @@ var init_CodeBlock = __esm({
|
|
|
13630
13336
|
CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
|
|
13631
13337
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13632
13338
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13633
|
-
CodeBlock =
|
|
13339
|
+
CodeBlock = React86__default.memo(
|
|
13634
13340
|
({
|
|
13635
13341
|
code: rawCode,
|
|
13636
13342
|
language = "text",
|
|
@@ -14067,7 +13773,7 @@ var init_MarkdownContent = __esm({
|
|
|
14067
13773
|
init_Box();
|
|
14068
13774
|
init_CodeBlock();
|
|
14069
13775
|
init_cn();
|
|
14070
|
-
MarkdownContent =
|
|
13776
|
+
MarkdownContent = React86__default.memo(
|
|
14071
13777
|
({ content, direction, className }) => {
|
|
14072
13778
|
const { t: _t } = useTranslate();
|
|
14073
13779
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -15163,7 +14869,7 @@ var init_StateMachineView = __esm({
|
|
|
15163
14869
|
style: { top: title ? 30 : 0 },
|
|
15164
14870
|
children: [
|
|
15165
14871
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15166
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14872
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15167
14873
|
StateNode,
|
|
15168
14874
|
{
|
|
15169
14875
|
state,
|
|
@@ -16768,7 +16474,7 @@ var init_Grid = __esm({
|
|
|
16768
16474
|
as: Component = "div"
|
|
16769
16475
|
}) => {
|
|
16770
16476
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
16771
|
-
return
|
|
16477
|
+
return React86__default.createElement(
|
|
16772
16478
|
Component,
|
|
16773
16479
|
{
|
|
16774
16480
|
className: cn(
|
|
@@ -21918,7 +21624,7 @@ function CounterMinimal({
|
|
|
21918
21624
|
Button,
|
|
21919
21625
|
{
|
|
21920
21626
|
variant: "secondary",
|
|
21921
|
-
size:
|
|
21627
|
+
size: sizeStyles8[size].button,
|
|
21922
21628
|
onClick: onDecrement,
|
|
21923
21629
|
disabled: resolved.decrementDisabled,
|
|
21924
21630
|
icon: "minus",
|
|
@@ -21930,7 +21636,7 @@ function CounterMinimal({
|
|
|
21930
21636
|
{
|
|
21931
21637
|
variant: "h1",
|
|
21932
21638
|
className: cn(
|
|
21933
|
-
|
|
21639
|
+
sizeStyles8[size].display,
|
|
21934
21640
|
"font-bold tabular-nums min-w-[3ch] text-center"
|
|
21935
21641
|
),
|
|
21936
21642
|
children: resolved.count
|
|
@@ -21940,7 +21646,7 @@ function CounterMinimal({
|
|
|
21940
21646
|
Button,
|
|
21941
21647
|
{
|
|
21942
21648
|
variant: "secondary",
|
|
21943
|
-
size:
|
|
21649
|
+
size: sizeStyles8[size].button,
|
|
21944
21650
|
onClick: onIncrement,
|
|
21945
21651
|
disabled: resolved.incrementDisabled,
|
|
21946
21652
|
icon: "plus",
|
|
@@ -21975,7 +21681,7 @@ function CounterStandard({
|
|
|
21975
21681
|
{
|
|
21976
21682
|
variant: "h1",
|
|
21977
21683
|
className: cn(
|
|
21978
|
-
|
|
21684
|
+
sizeStyles8[size].display,
|
|
21979
21685
|
"font-bold tabular-nums text-primary-600"
|
|
21980
21686
|
),
|
|
21981
21687
|
children: resolved.count
|
|
@@ -21986,7 +21692,7 @@ function CounterStandard({
|
|
|
21986
21692
|
Button,
|
|
21987
21693
|
{
|
|
21988
21694
|
variant: "secondary",
|
|
21989
|
-
size:
|
|
21695
|
+
size: sizeStyles8[size].button,
|
|
21990
21696
|
onClick: onDecrement,
|
|
21991
21697
|
disabled: resolved.decrementDisabled,
|
|
21992
21698
|
icon: "minus"
|
|
@@ -21996,7 +21702,7 @@ function CounterStandard({
|
|
|
21996
21702
|
Button,
|
|
21997
21703
|
{
|
|
21998
21704
|
variant: "primary",
|
|
21999
|
-
size:
|
|
21705
|
+
size: sizeStyles8[size].button,
|
|
22000
21706
|
onClick: onIncrement,
|
|
22001
21707
|
disabled: resolved.incrementDisabled,
|
|
22002
21708
|
icon: "plus"
|
|
@@ -22042,7 +21748,7 @@ function CounterFull({
|
|
|
22042
21748
|
{
|
|
22043
21749
|
variant: "h1",
|
|
22044
21750
|
className: cn(
|
|
22045
|
-
|
|
21751
|
+
sizeStyles8[size].display,
|
|
22046
21752
|
"font-bold tabular-nums text-primary-600"
|
|
22047
21753
|
),
|
|
22048
21754
|
children: resolved.count
|
|
@@ -22055,7 +21761,7 @@ function CounterFull({
|
|
|
22055
21761
|
Button,
|
|
22056
21762
|
{
|
|
22057
21763
|
variant: "secondary",
|
|
22058
|
-
size:
|
|
21764
|
+
size: sizeStyles8[size].button,
|
|
22059
21765
|
onClick: onDecrement,
|
|
22060
21766
|
disabled: resolved.decrementDisabled,
|
|
22061
21767
|
icon: "minus",
|
|
@@ -22066,7 +21772,7 @@ function CounterFull({
|
|
|
22066
21772
|
Button,
|
|
22067
21773
|
{
|
|
22068
21774
|
variant: "primary",
|
|
22069
|
-
size:
|
|
21775
|
+
size: sizeStyles8[size].button,
|
|
22070
21776
|
onClick: onIncrement,
|
|
22071
21777
|
disabled: resolved.incrementDisabled,
|
|
22072
21778
|
icon: "plus",
|
|
@@ -22086,7 +21792,7 @@ function CounterFull({
|
|
|
22086
21792
|
)
|
|
22087
21793
|
] }) });
|
|
22088
21794
|
}
|
|
22089
|
-
var
|
|
21795
|
+
var sizeStyles8, CounterTemplate;
|
|
22090
21796
|
var init_CounterTemplate = __esm({
|
|
22091
21797
|
"components/core/templates/CounterTemplate.tsx"() {
|
|
22092
21798
|
init_cn();
|
|
@@ -22094,7 +21800,7 @@ var init_CounterTemplate = __esm({
|
|
|
22094
21800
|
init_Stack();
|
|
22095
21801
|
init_Typography();
|
|
22096
21802
|
init_Button();
|
|
22097
|
-
|
|
21803
|
+
sizeStyles8 = {
|
|
22098
21804
|
sm: { display: "text-4xl", button: "sm" },
|
|
22099
21805
|
md: { display: "text-6xl", button: "md" },
|
|
22100
21806
|
lg: { display: "text-8xl", button: "lg" }
|
|
@@ -22128,7 +21834,7 @@ function CraftingRecipe({
|
|
|
22128
21834
|
className
|
|
22129
21835
|
}) {
|
|
22130
21836
|
const eventBus = useEventBus();
|
|
22131
|
-
const handleCraft =
|
|
21837
|
+
const handleCraft = React86.useCallback(() => {
|
|
22132
21838
|
onCraft?.();
|
|
22133
21839
|
if (craftEvent) {
|
|
22134
21840
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -22145,7 +21851,7 @@ function CraftingRecipe({
|
|
|
22145
21851
|
children: [
|
|
22146
21852
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
22147
21853
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
22148
|
-
return /* @__PURE__ */ jsxs(
|
|
21854
|
+
return /* @__PURE__ */ jsxs(React86.Fragment, { children: [
|
|
22149
21855
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
22150
21856
|
ItemSlot,
|
|
22151
21857
|
{
|
|
@@ -22208,8 +21914,8 @@ function DPad({
|
|
|
22208
21914
|
}) {
|
|
22209
21915
|
const eventBus = useEventBus();
|
|
22210
21916
|
const sizes = sizeMap15[size];
|
|
22211
|
-
const [activeDirections, setActiveDirections] =
|
|
22212
|
-
const handlePress =
|
|
21917
|
+
const [activeDirections, setActiveDirections] = React86.useState(/* @__PURE__ */ new Set());
|
|
21918
|
+
const handlePress = React86.useCallback(
|
|
22213
21919
|
(direction) => {
|
|
22214
21920
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
22215
21921
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -22217,7 +21923,7 @@ function DPad({
|
|
|
22217
21923
|
},
|
|
22218
21924
|
[directionEvent, eventBus, onDirection]
|
|
22219
21925
|
);
|
|
22220
|
-
const handleRelease =
|
|
21926
|
+
const handleRelease = React86.useCallback(
|
|
22221
21927
|
(direction) => {
|
|
22222
21928
|
setActiveDirections((prev) => {
|
|
22223
21929
|
const next = new Set(prev);
|
|
@@ -22903,14 +22609,14 @@ function useDataDnd(args) {
|
|
|
22903
22609
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22904
22610
|
const enabled = isZone || Boolean(dndRoot);
|
|
22905
22611
|
const eventBus = useEventBus();
|
|
22906
|
-
const parentRoot =
|
|
22612
|
+
const parentRoot = React86__default.useContext(RootCtx);
|
|
22907
22613
|
const isRoot = enabled && parentRoot === null;
|
|
22908
|
-
const zoneId =
|
|
22614
|
+
const zoneId = React86__default.useId();
|
|
22909
22615
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22910
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22911
|
-
const optimisticOrdersRef =
|
|
22616
|
+
const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
|
|
22617
|
+
const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
|
|
22912
22618
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22913
|
-
const clearOptimisticOrder =
|
|
22619
|
+
const clearOptimisticOrder = React86__default.useCallback((group) => {
|
|
22914
22620
|
setOptimisticOrders((prev) => {
|
|
22915
22621
|
if (!prev.has(group)) return prev;
|
|
22916
22622
|
const next = new Map(prev);
|
|
@@ -22935,7 +22641,7 @@ function useDataDnd(args) {
|
|
|
22935
22641
|
const raw = it[dndItemIdField];
|
|
22936
22642
|
return String(raw ?? `__idx_${idx}`);
|
|
22937
22643
|
}).join("|");
|
|
22938
|
-
const itemIds =
|
|
22644
|
+
const itemIds = React86__default.useMemo(
|
|
22939
22645
|
() => orderedItems.map((it, idx) => {
|
|
22940
22646
|
const raw = it[dndItemIdField];
|
|
22941
22647
|
return raw ?? `__idx_${idx}`;
|
|
@@ -22943,7 +22649,7 @@ function useDataDnd(args) {
|
|
|
22943
22649
|
[itemIdsSignature]
|
|
22944
22650
|
);
|
|
22945
22651
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
22946
|
-
|
|
22652
|
+
React86__default.useEffect(() => {
|
|
22947
22653
|
const root = isRoot ? null : parentRoot;
|
|
22948
22654
|
if (root) {
|
|
22949
22655
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22951,20 +22657,20 @@ function useDataDnd(args) {
|
|
|
22951
22657
|
clearOptimisticOrder(ownGroup);
|
|
22952
22658
|
}
|
|
22953
22659
|
}, [itemsContentSig, ownGroup]);
|
|
22954
|
-
const zonesRef =
|
|
22955
|
-
const registerZone =
|
|
22660
|
+
const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
|
|
22661
|
+
const registerZone = React86__default.useCallback((zoneId2, meta2) => {
|
|
22956
22662
|
zonesRef.current.set(zoneId2, meta2);
|
|
22957
22663
|
}, []);
|
|
22958
|
-
const unregisterZone =
|
|
22664
|
+
const unregisterZone = React86__default.useCallback((zoneId2) => {
|
|
22959
22665
|
zonesRef.current.delete(zoneId2);
|
|
22960
22666
|
}, []);
|
|
22961
|
-
const [activeDrag, setActiveDrag] =
|
|
22962
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22963
|
-
const meta =
|
|
22667
|
+
const [activeDrag, setActiveDrag] = React86__default.useState(null);
|
|
22668
|
+
const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
|
|
22669
|
+
const meta = React86__default.useMemo(
|
|
22964
22670
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22965
22671
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22966
22672
|
);
|
|
22967
|
-
|
|
22673
|
+
React86__default.useEffect(() => {
|
|
22968
22674
|
const target = isRoot ? null : parentRoot;
|
|
22969
22675
|
if (!target) {
|
|
22970
22676
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22983,7 +22689,7 @@ function useDataDnd(args) {
|
|
|
22983
22689
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22984
22690
|
const sensors = useAlmadarDndSensors(true);
|
|
22985
22691
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22986
|
-
const findZoneByItem =
|
|
22692
|
+
const findZoneByItem = React86__default.useCallback(
|
|
22987
22693
|
(id) => {
|
|
22988
22694
|
for (const z of zonesRef.current.values()) {
|
|
22989
22695
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22992,7 +22698,7 @@ function useDataDnd(args) {
|
|
|
22992
22698
|
},
|
|
22993
22699
|
[]
|
|
22994
22700
|
);
|
|
22995
|
-
|
|
22701
|
+
React86__default.useCallback(
|
|
22996
22702
|
(group) => {
|
|
22997
22703
|
for (const z of zonesRef.current.values()) {
|
|
22998
22704
|
if (z.group === group) return z;
|
|
@@ -23001,7 +22707,7 @@ function useDataDnd(args) {
|
|
|
23001
22707
|
},
|
|
23002
22708
|
[]
|
|
23003
22709
|
);
|
|
23004
|
-
const handleDragEnd =
|
|
22710
|
+
const handleDragEnd = React86__default.useCallback(
|
|
23005
22711
|
(event) => {
|
|
23006
22712
|
const { active, over } = event;
|
|
23007
22713
|
const activeIdStr = String(active.id);
|
|
@@ -23092,8 +22798,8 @@ function useDataDnd(args) {
|
|
|
23092
22798
|
},
|
|
23093
22799
|
[eventBus]
|
|
23094
22800
|
);
|
|
23095
|
-
const sortableData =
|
|
23096
|
-
const SortableItem =
|
|
22801
|
+
const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22802
|
+
const SortableItem = React86__default.useCallback(
|
|
23097
22803
|
({ id, children }) => {
|
|
23098
22804
|
const {
|
|
23099
22805
|
attributes,
|
|
@@ -23133,7 +22839,7 @@ function useDataDnd(args) {
|
|
|
23133
22839
|
id: droppableId,
|
|
23134
22840
|
data: sortableData
|
|
23135
22841
|
});
|
|
23136
|
-
const ctx =
|
|
22842
|
+
const ctx = React86__default.useContext(RootCtx);
|
|
23137
22843
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
23138
22844
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
23139
22845
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -23148,7 +22854,7 @@ function useDataDnd(args) {
|
|
|
23148
22854
|
showForeignPlaceholder,
|
|
23149
22855
|
ctxAvailable: ctx != null
|
|
23150
22856
|
});
|
|
23151
|
-
|
|
22857
|
+
React86__default.useEffect(() => {
|
|
23152
22858
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
23153
22859
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
23154
22860
|
return /* @__PURE__ */ jsx(
|
|
@@ -23162,11 +22868,11 @@ function useDataDnd(args) {
|
|
|
23162
22868
|
}
|
|
23163
22869
|
);
|
|
23164
22870
|
};
|
|
23165
|
-
const rootContextValue =
|
|
22871
|
+
const rootContextValue = React86__default.useMemo(
|
|
23166
22872
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
23167
22873
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23168
22874
|
);
|
|
23169
|
-
const handleDragStart =
|
|
22875
|
+
const handleDragStart = React86__default.useCallback((event) => {
|
|
23170
22876
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23171
22877
|
const rect = event.active.rect.current.initial;
|
|
23172
22878
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23185,7 +22891,7 @@ function useDataDnd(args) {
|
|
|
23185
22891
|
isRoot
|
|
23186
22892
|
});
|
|
23187
22893
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23188
|
-
const handleDragOver =
|
|
22894
|
+
const handleDragOver = React86__default.useCallback((event) => {
|
|
23189
22895
|
const { active, over } = event;
|
|
23190
22896
|
const overData = over?.data?.current;
|
|
23191
22897
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23255,7 +22961,7 @@ function useDataDnd(args) {
|
|
|
23255
22961
|
return next;
|
|
23256
22962
|
});
|
|
23257
22963
|
}, []);
|
|
23258
|
-
const handleDragCancel =
|
|
22964
|
+
const handleDragCancel = React86__default.useCallback((event) => {
|
|
23259
22965
|
setActiveDrag(null);
|
|
23260
22966
|
setOverZoneGroup(null);
|
|
23261
22967
|
dndLog.warn("dragCancel", {
|
|
@@ -23263,12 +22969,12 @@ function useDataDnd(args) {
|
|
|
23263
22969
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23264
22970
|
});
|
|
23265
22971
|
}, []);
|
|
23266
|
-
const handleDragEndWithCleanup =
|
|
22972
|
+
const handleDragEndWithCleanup = React86__default.useCallback((event) => {
|
|
23267
22973
|
handleDragEnd(event);
|
|
23268
22974
|
setActiveDrag(null);
|
|
23269
22975
|
setOverZoneGroup(null);
|
|
23270
22976
|
}, [handleDragEnd]);
|
|
23271
|
-
const wrapContainer =
|
|
22977
|
+
const wrapContainer = React86__default.useCallback(
|
|
23272
22978
|
(children) => {
|
|
23273
22979
|
if (!enabled) return children;
|
|
23274
22980
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -23322,7 +23028,7 @@ var init_useDataDnd = __esm({
|
|
|
23322
23028
|
init_useAlmadarDndCollision();
|
|
23323
23029
|
init_Box();
|
|
23324
23030
|
dndLog = createLogger("almadar:ui:dnd");
|
|
23325
|
-
RootCtx =
|
|
23031
|
+
RootCtx = React86__default.createContext(null);
|
|
23326
23032
|
}
|
|
23327
23033
|
});
|
|
23328
23034
|
function fieldLabel2(key) {
|
|
@@ -23842,7 +23548,7 @@ function DataList({
|
|
|
23842
23548
|
}) {
|
|
23843
23549
|
const eventBus = useEventBus();
|
|
23844
23550
|
const { t } = useTranslate();
|
|
23845
|
-
const [visibleCount, setVisibleCount] =
|
|
23551
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
|
|
23846
23552
|
const fieldDefs = fields ?? columns ?? [];
|
|
23847
23553
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23848
23554
|
const dnd = useDataDnd({
|
|
@@ -23861,7 +23567,7 @@ function DataList({
|
|
|
23861
23567
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23862
23568
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23863
23569
|
const hasRenderProp = typeof children === "function";
|
|
23864
|
-
|
|
23570
|
+
React86__default.useEffect(() => {
|
|
23865
23571
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23866
23572
|
const childrenTypeOf = typeof children;
|
|
23867
23573
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23966,7 +23672,7 @@ function DataList({
|
|
|
23966
23672
|
const items2 = data.map((item) => item);
|
|
23967
23673
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
23968
23674
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
23969
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23675
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
23970
23676
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23971
23677
|
group.items.map((itemData, index) => {
|
|
23972
23678
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -24114,7 +23820,7 @@ function DataList({
|
|
|
24114
23820
|
className
|
|
24115
23821
|
),
|
|
24116
23822
|
children: [
|
|
24117
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23823
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
24118
23824
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
24119
23825
|
group.items.map(
|
|
24120
23826
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -25488,7 +25194,7 @@ var init_WizardProgress = __esm({
|
|
|
25488
25194
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
25489
25195
|
const isActive = index === currentStep;
|
|
25490
25196
|
const isCompleted = index < currentStep;
|
|
25491
|
-
return /* @__PURE__ */ jsxs(
|
|
25197
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
25492
25198
|
/* @__PURE__ */ jsx(
|
|
25493
25199
|
"button",
|
|
25494
25200
|
{
|
|
@@ -26099,50 +25805,6 @@ var init_FlipCard = __esm({
|
|
|
26099
25805
|
FlipCard.displayName = "FlipCard";
|
|
26100
25806
|
}
|
|
26101
25807
|
});
|
|
26102
|
-
function pascalToKebab(name) {
|
|
26103
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
26104
|
-
}
|
|
26105
|
-
function kebabToPascal3(name) {
|
|
26106
|
-
return name.split("-").map((part) => /^\d+$/.test(part) ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
26107
|
-
}
|
|
26108
|
-
var ICON_ITEMS, IconPicker;
|
|
26109
|
-
var init_IconPicker = __esm({
|
|
26110
|
-
"components/core/molecules/IconPicker.tsx"() {
|
|
26111
|
-
"use client";
|
|
26112
|
-
init_Icon();
|
|
26113
|
-
init_GridPicker();
|
|
26114
|
-
ICON_ITEMS = (() => {
|
|
26115
|
-
const items = [];
|
|
26116
|
-
for (const [exportName, candidate] of Object.entries(LucideIcons2)) {
|
|
26117
|
-
if (!/^[A-Z]/.test(exportName)) continue;
|
|
26118
|
-
if (exportName.endsWith("Icon")) continue;
|
|
26119
|
-
if (exportName.startsWith("Lucide")) continue;
|
|
26120
|
-
const isComponent = candidate !== null && (typeof candidate === "object" || typeof candidate === "function") && "$$typeof" in candidate;
|
|
26121
|
-
if (!isComponent) continue;
|
|
26122
|
-
const kebab = pascalToKebab(exportName);
|
|
26123
|
-
if (kebabToPascal3(kebab) !== exportName) continue;
|
|
26124
|
-
items.push({ id: kebab, label: kebab, category: "icons" });
|
|
26125
|
-
}
|
|
26126
|
-
return items;
|
|
26127
|
-
})();
|
|
26128
|
-
IconPicker = ({ value, onChange, className }) => {
|
|
26129
|
-
const items = useMemo(() => ICON_ITEMS, []);
|
|
26130
|
-
return /* @__PURE__ */ jsx(
|
|
26131
|
-
GridPicker,
|
|
26132
|
-
{
|
|
26133
|
-
items,
|
|
26134
|
-
value,
|
|
26135
|
-
onChange,
|
|
26136
|
-
searchPlaceholder: "Search icons\u2026",
|
|
26137
|
-
renderThumbnail: (it) => /* @__PURE__ */ jsx(Icon, { name: it.id }),
|
|
26138
|
-
cellSize: 32,
|
|
26139
|
-
className
|
|
26140
|
-
}
|
|
26141
|
-
);
|
|
26142
|
-
};
|
|
26143
|
-
IconPicker.displayName = "IconPicker";
|
|
26144
|
-
}
|
|
26145
|
-
});
|
|
26146
25808
|
function toISODate(d) {
|
|
26147
25809
|
return d.toISOString().slice(0, 10);
|
|
26148
25810
|
}
|
|
@@ -26587,7 +26249,7 @@ function InventoryGrid({
|
|
|
26587
26249
|
const eventBus = useEventBus();
|
|
26588
26250
|
const slotCount = totalSlots ?? items.length;
|
|
26589
26251
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
26590
|
-
const handleSelect =
|
|
26252
|
+
const handleSelect = React86.useCallback(
|
|
26591
26253
|
(id) => {
|
|
26592
26254
|
onSelect?.(id);
|
|
26593
26255
|
if (selectEvent) {
|
|
@@ -26804,31 +26466,31 @@ function GameCanvas2D({
|
|
|
26804
26466
|
assetBaseUrl = "",
|
|
26805
26467
|
className
|
|
26806
26468
|
}) {
|
|
26807
|
-
const canvasRef =
|
|
26808
|
-
const rafRef =
|
|
26809
|
-
const frameRef =
|
|
26810
|
-
const lastTimeRef =
|
|
26811
|
-
const imageCache =
|
|
26469
|
+
const canvasRef = React86.useRef(null);
|
|
26470
|
+
const rafRef = React86.useRef(0);
|
|
26471
|
+
const frameRef = React86.useRef(0);
|
|
26472
|
+
const lastTimeRef = React86.useRef(0);
|
|
26473
|
+
const imageCache = React86.useRef(/* @__PURE__ */ new Map());
|
|
26812
26474
|
const emit = useEmitEvent();
|
|
26813
|
-
const onDrawRef =
|
|
26475
|
+
const onDrawRef = React86.useRef(onDraw);
|
|
26814
26476
|
onDrawRef.current = onDraw;
|
|
26815
|
-
const onTickRef =
|
|
26477
|
+
const onTickRef = React86.useRef(onTick);
|
|
26816
26478
|
onTickRef.current = onTick;
|
|
26817
|
-
const tickEventRef =
|
|
26479
|
+
const tickEventRef = React86.useRef(tickEvent);
|
|
26818
26480
|
tickEventRef.current = tickEvent;
|
|
26819
|
-
const drawEventRef =
|
|
26481
|
+
const drawEventRef = React86.useRef(drawEvent);
|
|
26820
26482
|
drawEventRef.current = drawEvent;
|
|
26821
|
-
const emitRef =
|
|
26483
|
+
const emitRef = React86.useRef(emit);
|
|
26822
26484
|
emitRef.current = emit;
|
|
26823
|
-
const assetBaseUrlRef =
|
|
26485
|
+
const assetBaseUrlRef = React86.useRef(assetBaseUrl);
|
|
26824
26486
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
26825
|
-
const backgroundImageRef =
|
|
26487
|
+
const backgroundImageRef = React86.useRef(backgroundImage);
|
|
26826
26488
|
backgroundImageRef.current = backgroundImage;
|
|
26827
|
-
const widthRef =
|
|
26489
|
+
const widthRef = React86.useRef(width);
|
|
26828
26490
|
widthRef.current = width;
|
|
26829
|
-
const heightRef =
|
|
26491
|
+
const heightRef = React86.useRef(height);
|
|
26830
26492
|
heightRef.current = height;
|
|
26831
|
-
const loadImage =
|
|
26493
|
+
const loadImage = React86.useCallback((url) => {
|
|
26832
26494
|
const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
|
|
26833
26495
|
const cached = imageCache.current.get(fullUrl);
|
|
26834
26496
|
if (cached?.complete && cached.naturalWidth > 0) return cached;
|
|
@@ -26840,7 +26502,7 @@ function GameCanvas2D({
|
|
|
26840
26502
|
}
|
|
26841
26503
|
return null;
|
|
26842
26504
|
}, []);
|
|
26843
|
-
|
|
26505
|
+
React86.useEffect(() => {
|
|
26844
26506
|
const canvas = canvasRef.current;
|
|
26845
26507
|
if (!canvas) return;
|
|
26846
26508
|
const ctx = canvas.getContext("2d");
|
|
@@ -27143,7 +26805,7 @@ function TurnPanel({
|
|
|
27143
26805
|
className
|
|
27144
26806
|
}) {
|
|
27145
26807
|
const eventBus = useEventBus();
|
|
27146
|
-
const handleAction =
|
|
26808
|
+
const handleAction = React86.useCallback(
|
|
27147
26809
|
(event) => {
|
|
27148
26810
|
if (event) {
|
|
27149
26811
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -27289,7 +26951,7 @@ function UnitCommandBar({
|
|
|
27289
26951
|
className
|
|
27290
26952
|
}) {
|
|
27291
26953
|
const eventBus = useEventBus();
|
|
27292
|
-
const handleCommand =
|
|
26954
|
+
const handleCommand = React86.useCallback(
|
|
27293
26955
|
(event) => {
|
|
27294
26956
|
if (event) {
|
|
27295
26957
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -27774,7 +27436,7 @@ function GameMenu({
|
|
|
27774
27436
|
} catch {
|
|
27775
27437
|
}
|
|
27776
27438
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
27777
|
-
const handleOptionClick =
|
|
27439
|
+
const handleOptionClick = React86.useCallback(
|
|
27778
27440
|
(option) => {
|
|
27779
27441
|
if (option.event && eventBus) {
|
|
27780
27442
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -27888,7 +27550,7 @@ function GameOverScreen({
|
|
|
27888
27550
|
} catch {
|
|
27889
27551
|
}
|
|
27890
27552
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
27891
|
-
const handleActionClick =
|
|
27553
|
+
const handleActionClick = React86.useCallback(
|
|
27892
27554
|
(action) => {
|
|
27893
27555
|
if (action.event && eventBus) {
|
|
27894
27556
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -28599,14 +28261,14 @@ function useSafeEventBus5() {
|
|
|
28599
28261
|
} };
|
|
28600
28262
|
}
|
|
28601
28263
|
}
|
|
28602
|
-
var
|
|
28264
|
+
var sizeStyles9, LONG_PRESS_DELAY, LONG_PRESS_INTERVAL, NumberStepper;
|
|
28603
28265
|
var init_NumberStepper = __esm({
|
|
28604
28266
|
"components/core/molecules/NumberStepper.tsx"() {
|
|
28605
28267
|
"use client";
|
|
28606
28268
|
init_cn();
|
|
28607
28269
|
init_Icon();
|
|
28608
28270
|
init_useEventBus();
|
|
28609
|
-
|
|
28271
|
+
sizeStyles9 = {
|
|
28610
28272
|
sm: {
|
|
28611
28273
|
button: "w-7 h-7",
|
|
28612
28274
|
text: "text-sm min-w-[2rem]",
|
|
@@ -28644,7 +28306,7 @@ var init_NumberStepper = __esm({
|
|
|
28644
28306
|
const timeoutRef = useRef(null);
|
|
28645
28307
|
const isAtMin = min !== void 0 && value <= min;
|
|
28646
28308
|
const isAtMax = max !== void 0 && value >= max;
|
|
28647
|
-
const styles =
|
|
28309
|
+
const styles = sizeStyles9[size];
|
|
28648
28310
|
const emitChange = useCallback(
|
|
28649
28311
|
(newValue) => {
|
|
28650
28312
|
const clamped = Math.round(newValue / step) * step;
|
|
@@ -28785,14 +28447,14 @@ function useSafeEventBus6() {
|
|
|
28785
28447
|
} };
|
|
28786
28448
|
}
|
|
28787
28449
|
}
|
|
28788
|
-
var
|
|
28450
|
+
var sizeStyles10, StarRating;
|
|
28789
28451
|
var init_StarRating = __esm({
|
|
28790
28452
|
"components/core/molecules/StarRating.tsx"() {
|
|
28791
28453
|
"use client";
|
|
28792
28454
|
init_cn();
|
|
28793
28455
|
init_Icon();
|
|
28794
28456
|
init_useEventBus();
|
|
28795
|
-
|
|
28457
|
+
sizeStyles10 = {
|
|
28796
28458
|
sm: { star: "w-4 h-4", gap: "gap-0.5" },
|
|
28797
28459
|
md: { star: "w-6 h-6", gap: "gap-1" },
|
|
28798
28460
|
lg: { star: "w-8 h-8", gap: "gap-1.5" }
|
|
@@ -28811,7 +28473,7 @@ var init_StarRating = __esm({
|
|
|
28811
28473
|
}) => {
|
|
28812
28474
|
const [hoverValue, setHoverValue] = useState(null);
|
|
28813
28475
|
const eventBus = useSafeEventBus6();
|
|
28814
|
-
const styles =
|
|
28476
|
+
const styles = sizeStyles10[size];
|
|
28815
28477
|
const displayValue = hoverValue ?? value;
|
|
28816
28478
|
const emitChange = useCallback(
|
|
28817
28479
|
(newValue) => {
|
|
@@ -29365,8 +29027,8 @@ function TableView({
|
|
|
29365
29027
|
}) {
|
|
29366
29028
|
const eventBus = useEventBus();
|
|
29367
29029
|
const { t } = useTranslate();
|
|
29368
|
-
const [visibleCount, setVisibleCount] =
|
|
29369
|
-
const [localSelected, setLocalSelected] =
|
|
29030
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29031
|
+
const [localSelected, setLocalSelected] = React86__default.useState(/* @__PURE__ */ new Set());
|
|
29370
29032
|
const colDefs = columns ?? fields ?? [];
|
|
29371
29033
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
29372
29034
|
const dnd = useDataDnd({
|
|
@@ -29561,12 +29223,12 @@ function TableView({
|
|
|
29561
29223
|
]
|
|
29562
29224
|
}
|
|
29563
29225
|
);
|
|
29564
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
29226
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React86__default.Fragment, { children: rowInner }, id);
|
|
29565
29227
|
};
|
|
29566
29228
|
const items = data.map((row) => row);
|
|
29567
29229
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
29568
29230
|
let runningIndex = 0;
|
|
29569
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
29231
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
29570
29232
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
29571
29233
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
29572
29234
|
] }, gi)) });
|
|
@@ -30918,7 +30580,7 @@ var init_StepFlow = __esm({
|
|
|
30918
30580
|
className
|
|
30919
30581
|
}) => {
|
|
30920
30582
|
if (orientation === "vertical") {
|
|
30921
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
30583
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
30922
30584
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
30923
30585
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30924
30586
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -30929,7 +30591,7 @@ var init_StepFlow = __esm({
|
|
|
30929
30591
|
] })
|
|
30930
30592
|
] }) }, index)) });
|
|
30931
30593
|
}
|
|
30932
|
-
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(
|
|
30594
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
30933
30595
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
30934
30596
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30935
30597
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31738,14 +31400,14 @@ var init_EdgeDecoration = __esm({
|
|
|
31738
31400
|
EdgeDecoration.displayName = "EdgeDecoration";
|
|
31739
31401
|
}
|
|
31740
31402
|
});
|
|
31741
|
-
var
|
|
31403
|
+
var sizeStyles11, VoteStack;
|
|
31742
31404
|
var init_VoteStack = __esm({
|
|
31743
31405
|
"components/core/molecules/VoteStack.tsx"() {
|
|
31744
31406
|
"use client";
|
|
31745
31407
|
init_cn();
|
|
31746
31408
|
init_Icon();
|
|
31747
31409
|
init_useEventBus();
|
|
31748
|
-
|
|
31410
|
+
sizeStyles11 = {
|
|
31749
31411
|
sm: {
|
|
31750
31412
|
button: "w-7 h-7",
|
|
31751
31413
|
text: "text-sm min-w-[2rem]",
|
|
@@ -31773,7 +31435,7 @@ var init_VoteStack = __esm({
|
|
|
31773
31435
|
className,
|
|
31774
31436
|
label
|
|
31775
31437
|
}) => {
|
|
31776
|
-
const styles =
|
|
31438
|
+
const styles = sizeStyles11[size];
|
|
31777
31439
|
const isUp = userVote === "up";
|
|
31778
31440
|
const isDown = userVote === "down";
|
|
31779
31441
|
const eventBus = useEventBus();
|
|
@@ -31905,7 +31567,7 @@ var init_LikertScale = __esm({
|
|
|
31905
31567
|
md: "text-base",
|
|
31906
31568
|
lg: "text-lg"
|
|
31907
31569
|
};
|
|
31908
|
-
LikertScale =
|
|
31570
|
+
LikertScale = React86__default.forwardRef(
|
|
31909
31571
|
({
|
|
31910
31572
|
question,
|
|
31911
31573
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -31917,7 +31579,7 @@ var init_LikertScale = __esm({
|
|
|
31917
31579
|
variant = "radios",
|
|
31918
31580
|
className
|
|
31919
31581
|
}, ref) => {
|
|
31920
|
-
const groupId =
|
|
31582
|
+
const groupId = React86__default.useId();
|
|
31921
31583
|
const eventBus = useEventBus();
|
|
31922
31584
|
const handleSelect = useCallback(
|
|
31923
31585
|
(next) => {
|
|
@@ -32041,7 +31703,7 @@ var init_LikertScale = __esm({
|
|
|
32041
31703
|
LikertScale.displayName = "LikertScale";
|
|
32042
31704
|
}
|
|
32043
31705
|
});
|
|
32044
|
-
var DEFAULT_MATRIX_COLUMNS,
|
|
31706
|
+
var DEFAULT_MATRIX_COLUMNS, sizeStyles12, MatrixQuestion;
|
|
32045
31707
|
var init_MatrixQuestion = __esm({
|
|
32046
31708
|
"components/core/molecules/MatrixQuestion.tsx"() {
|
|
32047
31709
|
"use client";
|
|
@@ -32057,7 +31719,7 @@ var init_MatrixQuestion = __esm({
|
|
|
32057
31719
|
{ value: 4, label: "Agree" },
|
|
32058
31720
|
{ value: 5, label: "Strongly Agree" }
|
|
32059
31721
|
];
|
|
32060
|
-
|
|
31722
|
+
sizeStyles12 = {
|
|
32061
31723
|
sm: {
|
|
32062
31724
|
cell: "px-2 py-1.5 text-xs",
|
|
32063
31725
|
radio: "sm",
|
|
@@ -32080,7 +31742,7 @@ var init_MatrixQuestion = __esm({
|
|
|
32080
31742
|
size = "md",
|
|
32081
31743
|
className
|
|
32082
31744
|
}) => {
|
|
32083
|
-
const styles =
|
|
31745
|
+
const styles = sizeStyles12[size];
|
|
32084
31746
|
const safeRows = rows2 ?? [];
|
|
32085
31747
|
const safeValues = values ?? {};
|
|
32086
31748
|
const eventBus = useEventBus();
|
|
@@ -34225,7 +33887,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
34225
33887
|
"aria-label": t("aria.breadcrumb"),
|
|
34226
33888
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
34227
33889
|
const isLast = idx === items.length - 1;
|
|
34228
|
-
return /* @__PURE__ */ jsxs(
|
|
33890
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
34229
33891
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
34230
33892
|
Icon,
|
|
34231
33893
|
{
|
|
@@ -35189,7 +34851,7 @@ var init_MiniStateMachine = __esm({
|
|
|
35189
34851
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
35190
34852
|
const tc = transitionCounts[s.name] ?? 0;
|
|
35191
34853
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
35192
|
-
return /* @__PURE__ */ jsxs(
|
|
34854
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
35193
34855
|
/* @__PURE__ */ jsx(
|
|
35194
34856
|
AvlState,
|
|
35195
34857
|
{
|
|
@@ -35393,7 +35055,7 @@ var init_PageHeader = __esm({
|
|
|
35393
35055
|
info: "bg-info/10 text-info"
|
|
35394
35056
|
};
|
|
35395
35057
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35396
|
-
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(
|
|
35058
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
35397
35059
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35398
35060
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35399
35061
|
"a",
|
|
@@ -35480,271 +35142,6 @@ var init_PageHeader = __esm({
|
|
|
35480
35142
|
PageHeader.displayName = "PageHeader";
|
|
35481
35143
|
}
|
|
35482
35144
|
});
|
|
35483
|
-
var FormSection, FormLayout, FormActions;
|
|
35484
|
-
var init_FormSection = __esm({
|
|
35485
|
-
"components/core/molecules/FormSection.tsx"() {
|
|
35486
|
-
"use client";
|
|
35487
|
-
init_cn();
|
|
35488
|
-
init_atoms2();
|
|
35489
|
-
init_Box();
|
|
35490
|
-
init_Typography();
|
|
35491
|
-
init_Button();
|
|
35492
|
-
init_Stack();
|
|
35493
|
-
init_Icon();
|
|
35494
|
-
init_useEventBus();
|
|
35495
|
-
FormSection = ({
|
|
35496
|
-
title,
|
|
35497
|
-
description,
|
|
35498
|
-
children,
|
|
35499
|
-
collapsible = false,
|
|
35500
|
-
defaultCollapsed = false,
|
|
35501
|
-
card = false,
|
|
35502
|
-
columns = 1,
|
|
35503
|
-
className
|
|
35504
|
-
}) => {
|
|
35505
|
-
const [collapsed, setCollapsed] = React88__default.useState(defaultCollapsed);
|
|
35506
|
-
const { t } = useTranslate();
|
|
35507
|
-
const eventBus = useEventBus();
|
|
35508
|
-
const gridClass = {
|
|
35509
|
-
1: "grid-cols-1",
|
|
35510
|
-
2: "grid-cols-1 md:grid-cols-2",
|
|
35511
|
-
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
35512
|
-
}[columns];
|
|
35513
|
-
React88__default.useCallback(() => {
|
|
35514
|
-
if (collapsible) {
|
|
35515
|
-
setCollapsed((prev) => !prev);
|
|
35516
|
-
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
35517
|
-
}
|
|
35518
|
-
}, [collapsible, collapsed, eventBus]);
|
|
35519
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35520
|
-
(title || description) && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "mb-4", children: [
|
|
35521
|
-
title && /* @__PURE__ */ jsxs(
|
|
35522
|
-
HStack,
|
|
35523
|
-
{
|
|
35524
|
-
justify: "between",
|
|
35525
|
-
align: "center",
|
|
35526
|
-
className: cn(collapsible && "cursor-pointer"),
|
|
35527
|
-
action: collapsible ? "TOGGLE_COLLAPSE" : void 0,
|
|
35528
|
-
children: [
|
|
35529
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h3", weight: "semibold", children: title }),
|
|
35530
|
-
collapsible && /* @__PURE__ */ jsx(
|
|
35531
|
-
Button,
|
|
35532
|
-
{
|
|
35533
|
-
variant: "ghost",
|
|
35534
|
-
size: "sm",
|
|
35535
|
-
action: "TOGGLE_COLLAPSE",
|
|
35536
|
-
children: /* @__PURE__ */ jsx(
|
|
35537
|
-
Icon,
|
|
35538
|
-
{
|
|
35539
|
-
icon: ChevronDown,
|
|
35540
|
-
size: "sm",
|
|
35541
|
-
className: cn(
|
|
35542
|
-
"text-muted-foreground transition-transform",
|
|
35543
|
-
collapsed && "rotate-180"
|
|
35544
|
-
)
|
|
35545
|
-
}
|
|
35546
|
-
)
|
|
35547
|
-
}
|
|
35548
|
-
)
|
|
35549
|
-
]
|
|
35550
|
-
}
|
|
35551
|
-
),
|
|
35552
|
-
description && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: description })
|
|
35553
|
-
] }),
|
|
35554
|
-
(!collapsible || !collapsed) && /* @__PURE__ */ jsx(Box, { className: cn("grid gap-4", gridClass), children })
|
|
35555
|
-
] });
|
|
35556
|
-
if (card) {
|
|
35557
|
-
return /* @__PURE__ */ jsx(Card, { className: cn("p-6", className), children: content });
|
|
35558
|
-
}
|
|
35559
|
-
return /* @__PURE__ */ jsx(Box, { className, children: content });
|
|
35560
|
-
};
|
|
35561
|
-
FormSection.displayName = "FormSection";
|
|
35562
|
-
FormLayout = ({
|
|
35563
|
-
children,
|
|
35564
|
-
dividers = true,
|
|
35565
|
-
className
|
|
35566
|
-
}) => {
|
|
35567
|
-
return /* @__PURE__ */ jsx(
|
|
35568
|
-
VStack,
|
|
35569
|
-
{
|
|
35570
|
-
gap: "lg",
|
|
35571
|
-
className: cn(
|
|
35572
|
-
dividers && "[&>*+*]:pt-8 [&>*+*]:border-t [&>*+*]:border-border",
|
|
35573
|
-
className
|
|
35574
|
-
),
|
|
35575
|
-
children
|
|
35576
|
-
}
|
|
35577
|
-
);
|
|
35578
|
-
};
|
|
35579
|
-
FormLayout.displayName = "FormLayout";
|
|
35580
|
-
FormActions = ({
|
|
35581
|
-
children,
|
|
35582
|
-
sticky = false,
|
|
35583
|
-
align = "right",
|
|
35584
|
-
className
|
|
35585
|
-
}) => {
|
|
35586
|
-
const alignClass2 = {
|
|
35587
|
-
left: "justify-start",
|
|
35588
|
-
right: "justify-end",
|
|
35589
|
-
between: "justify-between",
|
|
35590
|
-
center: "justify-center"
|
|
35591
|
-
}[align];
|
|
35592
|
-
return /* @__PURE__ */ jsx(
|
|
35593
|
-
HStack,
|
|
35594
|
-
{
|
|
35595
|
-
gap: "sm",
|
|
35596
|
-
align: "center",
|
|
35597
|
-
className: cn(
|
|
35598
|
-
"pt-6 border-t border-border",
|
|
35599
|
-
alignClass2,
|
|
35600
|
-
sticky && "sticky bottom-0 bg-card py-4 -mx-6 px-6 shadow-[0_-4px_6px_-1px_rgb(0,0,0,0.05)]",
|
|
35601
|
-
className
|
|
35602
|
-
),
|
|
35603
|
-
children
|
|
35604
|
-
}
|
|
35605
|
-
);
|
|
35606
|
-
};
|
|
35607
|
-
FormActions.displayName = "FormActions";
|
|
35608
|
-
}
|
|
35609
|
-
});
|
|
35610
|
-
function currentValue(decl, override) {
|
|
35611
|
-
return override !== void 0 ? override : decl.default;
|
|
35612
|
-
}
|
|
35613
|
-
function TextLikeControl({
|
|
35614
|
-
field,
|
|
35615
|
-
numeric,
|
|
35616
|
-
value,
|
|
35617
|
-
onCommit
|
|
35618
|
-
}) {
|
|
35619
|
-
const initial = value === void 0 || value === null ? "" : String(value);
|
|
35620
|
-
const [draft, setDraft] = React88__default.useState(initial);
|
|
35621
|
-
React88__default.useEffect(() => setDraft(initial), [initial]);
|
|
35622
|
-
const commit = () => {
|
|
35623
|
-
if (numeric) {
|
|
35624
|
-
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
35625
|
-
onCommit(field, Number.isNaN(n) ? 0 : n);
|
|
35626
|
-
} else {
|
|
35627
|
-
onCommit(field, draft);
|
|
35628
|
-
}
|
|
35629
|
-
};
|
|
35630
|
-
return /* @__PURE__ */ jsx(
|
|
35631
|
-
Input,
|
|
35632
|
-
{
|
|
35633
|
-
inputType: numeric ? "number" : "text",
|
|
35634
|
-
value: draft,
|
|
35635
|
-
onChange: (e) => setDraft(e.target.value),
|
|
35636
|
-
onBlur: commit,
|
|
35637
|
-
onKeyDown: (e) => {
|
|
35638
|
-
if (e.key === "Enter") commit();
|
|
35639
|
-
}
|
|
35640
|
-
}
|
|
35641
|
-
);
|
|
35642
|
-
}
|
|
35643
|
-
function FieldControl({
|
|
35644
|
-
name,
|
|
35645
|
-
decl,
|
|
35646
|
-
value,
|
|
35647
|
-
onChange,
|
|
35648
|
-
assets
|
|
35649
|
-
}) {
|
|
35650
|
-
let control;
|
|
35651
|
-
const stringValue = typeof value === "string" ? value : void 0;
|
|
35652
|
-
if (decl.type === "icon") {
|
|
35653
|
-
control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
|
|
35654
|
-
} else if (decl.type === "asset") {
|
|
35655
|
-
control = /* @__PURE__ */ jsx(
|
|
35656
|
-
AssetPicker,
|
|
35657
|
-
{
|
|
35658
|
-
assets: assets ?? [],
|
|
35659
|
-
value: stringValue,
|
|
35660
|
-
onChange: (url) => onChange(name, url)
|
|
35661
|
-
}
|
|
35662
|
-
);
|
|
35663
|
-
} else if (decl.type === "boolean") {
|
|
35664
|
-
control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
|
|
35665
|
-
} else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
|
|
35666
|
-
control = /* @__PURE__ */ jsx(
|
|
35667
|
-
Select,
|
|
35668
|
-
{
|
|
35669
|
-
options: decl.values.map((v) => ({ value: v, label: v })),
|
|
35670
|
-
value: typeof value === "string" ? value : "",
|
|
35671
|
-
onChange: (e) => onChange(name, e.target.value)
|
|
35672
|
-
}
|
|
35673
|
-
);
|
|
35674
|
-
} else if (decl.type === "number") {
|
|
35675
|
-
control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
|
|
35676
|
-
} else if (decl.type === "string") {
|
|
35677
|
-
control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
|
|
35678
|
-
} else {
|
|
35679
|
-
control = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
35680
|
-
decl.type,
|
|
35681
|
-
" \u2014 edit in source"
|
|
35682
|
-
] });
|
|
35683
|
-
}
|
|
35684
|
-
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
35685
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", children: decl.label ?? name }),
|
|
35686
|
-
control,
|
|
35687
|
-
decl.description !== void 0 && decl.description !== "" && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: decl.description })
|
|
35688
|
-
] });
|
|
35689
|
-
}
|
|
35690
|
-
var TIER_ORDER, PropertyInspector;
|
|
35691
|
-
var init_PropertyInspector = __esm({
|
|
35692
|
-
"components/core/molecules/PropertyInspector.tsx"() {
|
|
35693
|
-
"use client";
|
|
35694
|
-
init_cn();
|
|
35695
|
-
init_Stack();
|
|
35696
|
-
init_Typography();
|
|
35697
|
-
init_Button();
|
|
35698
|
-
init_Switch();
|
|
35699
|
-
init_Select();
|
|
35700
|
-
init_Input();
|
|
35701
|
-
init_FormSection();
|
|
35702
|
-
init_IconPicker();
|
|
35703
|
-
init_AssetPicker();
|
|
35704
|
-
TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
|
|
35705
|
-
PropertyInspector = ({
|
|
35706
|
-
config,
|
|
35707
|
-
values,
|
|
35708
|
-
onChange,
|
|
35709
|
-
onReset,
|
|
35710
|
-
title,
|
|
35711
|
-
className,
|
|
35712
|
-
assets
|
|
35713
|
-
}) => {
|
|
35714
|
-
const fields = Object.entries(config);
|
|
35715
|
-
const byTier = /* @__PURE__ */ new Map();
|
|
35716
|
-
for (const [name, decl] of fields) {
|
|
35717
|
-
const tier = decl.tier ?? "presentation";
|
|
35718
|
-
const arr = byTier.get(tier) ?? [];
|
|
35719
|
-
arr.push([name, decl]);
|
|
35720
|
-
byTier.set(tier, arr);
|
|
35721
|
-
}
|
|
35722
|
-
const tiers = [...byTier.keys()].sort((a, b) => {
|
|
35723
|
-
const ia = TIER_ORDER.indexOf(a);
|
|
35724
|
-
const ib = TIER_ORDER.indexOf(b);
|
|
35725
|
-
return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
|
|
35726
|
-
});
|
|
35727
|
-
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
|
|
35728
|
-
/* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
|
|
35729
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "bold", children: title ?? "Config" }),
|
|
35730
|
-
onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
|
|
35731
|
-
] }),
|
|
35732
|
-
fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
|
|
35733
|
-
tiers.map((tier) => /* @__PURE__ */ jsx(FormSection, { title: tier, collapsible: true, defaultCollapsed: tier !== "presentation", children: /* @__PURE__ */ jsx(VStack, { gap: "sm", children: byTier.get(tier)?.map(([name, decl]) => /* @__PURE__ */ jsx(
|
|
35734
|
-
FieldControl,
|
|
35735
|
-
{
|
|
35736
|
-
name,
|
|
35737
|
-
decl,
|
|
35738
|
-
value: currentValue(decl, values?.[name]),
|
|
35739
|
-
onChange,
|
|
35740
|
-
assets
|
|
35741
|
-
},
|
|
35742
|
-
name
|
|
35743
|
-
)) }) }, tier))
|
|
35744
|
-
] });
|
|
35745
|
-
};
|
|
35746
|
-
}
|
|
35747
|
-
});
|
|
35748
35145
|
var lookStyles8, Header;
|
|
35749
35146
|
var init_Header = __esm({
|
|
35750
35147
|
"components/core/molecules/Header.tsx"() {
|
|
@@ -36395,7 +35792,7 @@ var init_WizardContainer = __esm({
|
|
|
36395
35792
|
const isCompleted = index < currentStep;
|
|
36396
35793
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36397
35794
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36398
|
-
return /* @__PURE__ */ jsxs(
|
|
35795
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
36399
35796
|
/* @__PURE__ */ jsx(
|
|
36400
35797
|
Button,
|
|
36401
35798
|
{
|
|
@@ -38680,7 +38077,7 @@ var init_DetailPanel = __esm({
|
|
|
38680
38077
|
}
|
|
38681
38078
|
});
|
|
38682
38079
|
function extractTitle(children) {
|
|
38683
|
-
if (!
|
|
38080
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
38684
38081
|
const props = children.props;
|
|
38685
38082
|
if (typeof props.title === "string") {
|
|
38686
38083
|
return props.title;
|
|
@@ -38735,7 +38132,7 @@ function LinearView({
|
|
|
38735
38132
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
38736
38133
|
const isDone = i < currentIdx;
|
|
38737
38134
|
const isCurrent = i === currentIdx;
|
|
38738
|
-
return /* @__PURE__ */ jsxs(
|
|
38135
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
38739
38136
|
i > 0 && /* @__PURE__ */ jsx(
|
|
38740
38137
|
Typography,
|
|
38741
38138
|
{
|
|
@@ -39693,12 +39090,12 @@ var init_Form = __esm({
|
|
|
39693
39090
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
39694
39091
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
39695
39092
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
39696
|
-
const normalizedInitialData =
|
|
39093
|
+
const normalizedInitialData = React86__default.useMemo(() => {
|
|
39697
39094
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
39698
39095
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
39699
39096
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
39700
39097
|
}, [entity, initialData]);
|
|
39701
|
-
const entityDerivedFields =
|
|
39098
|
+
const entityDerivedFields = React86__default.useMemo(() => {
|
|
39702
39099
|
if (fields && fields.length > 0) return void 0;
|
|
39703
39100
|
if (!resolvedEntity) return void 0;
|
|
39704
39101
|
return resolvedEntity.fields.map(
|
|
@@ -39718,16 +39115,16 @@ var init_Form = __esm({
|
|
|
39718
39115
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
39719
39116
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
39720
39117
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
39721
|
-
const [formData, setFormData] =
|
|
39118
|
+
const [formData, setFormData] = React86__default.useState(
|
|
39722
39119
|
normalizedInitialData
|
|
39723
39120
|
);
|
|
39724
|
-
const [collapsedSections, setCollapsedSections] =
|
|
39121
|
+
const [collapsedSections, setCollapsedSections] = React86__default.useState(
|
|
39725
39122
|
/* @__PURE__ */ new Set()
|
|
39726
39123
|
);
|
|
39727
|
-
const [submitError, setSubmitError] =
|
|
39728
|
-
const formRef =
|
|
39124
|
+
const [submitError, setSubmitError] = React86__default.useState(null);
|
|
39125
|
+
const formRef = React86__default.useRef(null);
|
|
39729
39126
|
const formMode = props.mode;
|
|
39730
|
-
const mountedRef =
|
|
39127
|
+
const mountedRef = React86__default.useRef(false);
|
|
39731
39128
|
if (!mountedRef.current) {
|
|
39732
39129
|
mountedRef.current = true;
|
|
39733
39130
|
debug("forms", "mount", {
|
|
@@ -39740,7 +39137,7 @@ var init_Form = __esm({
|
|
|
39740
39137
|
});
|
|
39741
39138
|
}
|
|
39742
39139
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
39743
|
-
const evalContext =
|
|
39140
|
+
const evalContext = React86__default.useMemo(
|
|
39744
39141
|
() => ({
|
|
39745
39142
|
formValues: formData,
|
|
39746
39143
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -39749,7 +39146,7 @@ var init_Form = __esm({
|
|
|
39749
39146
|
}),
|
|
39750
39147
|
[formData, externalContext]
|
|
39751
39148
|
);
|
|
39752
|
-
|
|
39149
|
+
React86__default.useEffect(() => {
|
|
39753
39150
|
debug("forms", "initialData-sync", {
|
|
39754
39151
|
mode: formMode,
|
|
39755
39152
|
normalizedInitialData,
|
|
@@ -39760,7 +39157,7 @@ var init_Form = __esm({
|
|
|
39760
39157
|
setFormData(normalizedInitialData);
|
|
39761
39158
|
}
|
|
39762
39159
|
}, [normalizedInitialData]);
|
|
39763
|
-
const processCalculations =
|
|
39160
|
+
const processCalculations = React86__default.useCallback(
|
|
39764
39161
|
(changedFieldId, newFormData) => {
|
|
39765
39162
|
if (!hiddenCalculations.length) return;
|
|
39766
39163
|
const context = {
|
|
@@ -39785,7 +39182,7 @@ var init_Form = __esm({
|
|
|
39785
39182
|
},
|
|
39786
39183
|
[hiddenCalculations, externalContext, eventBus]
|
|
39787
39184
|
);
|
|
39788
|
-
const checkViolations =
|
|
39185
|
+
const checkViolations = React86__default.useCallback(
|
|
39789
39186
|
(changedFieldId, newFormData) => {
|
|
39790
39187
|
if (!violationTriggers.length) return;
|
|
39791
39188
|
const context = {
|
|
@@ -39823,7 +39220,7 @@ var init_Form = __esm({
|
|
|
39823
39220
|
processCalculations(name, newFormData);
|
|
39824
39221
|
checkViolations(name, newFormData);
|
|
39825
39222
|
};
|
|
39826
|
-
const isFieldVisible =
|
|
39223
|
+
const isFieldVisible = React86__default.useCallback(
|
|
39827
39224
|
(fieldName) => {
|
|
39828
39225
|
const condition = conditionalFields[fieldName];
|
|
39829
39226
|
if (!condition) return true;
|
|
@@ -39831,7 +39228,7 @@ var init_Form = __esm({
|
|
|
39831
39228
|
},
|
|
39832
39229
|
[conditionalFields, evalContext]
|
|
39833
39230
|
);
|
|
39834
|
-
const isSectionVisible =
|
|
39231
|
+
const isSectionVisible = React86__default.useCallback(
|
|
39835
39232
|
(section) => {
|
|
39836
39233
|
if (!section.condition) return true;
|
|
39837
39234
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -39907,7 +39304,7 @@ var init_Form = __esm({
|
|
|
39907
39304
|
eventBus.emit(`UI:${onCancel}`);
|
|
39908
39305
|
}
|
|
39909
39306
|
};
|
|
39910
|
-
const renderField =
|
|
39307
|
+
const renderField = React86__default.useCallback(
|
|
39911
39308
|
(field) => {
|
|
39912
39309
|
const fieldName = field.name || field.field;
|
|
39913
39310
|
if (!fieldName) return null;
|
|
@@ -39916,19 +39313,19 @@ var init_Form = __esm({
|
|
|
39916
39313
|
}
|
|
39917
39314
|
const inputType = determineInputType(field);
|
|
39918
39315
|
const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
|
|
39919
|
-
const
|
|
39316
|
+
const currentValue = formData[fieldName] ?? field.defaultValue ?? "";
|
|
39920
39317
|
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
|
|
39921
39318
|
inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
|
|
39922
39319
|
label,
|
|
39923
39320
|
field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
|
|
39924
39321
|
] }),
|
|
39925
|
-
renderFieldInput(field, fieldName, inputType,
|
|
39322
|
+
renderFieldInput(field, fieldName, inputType, currentValue, label)
|
|
39926
39323
|
] }, fieldName);
|
|
39927
39324
|
},
|
|
39928
39325
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
39929
39326
|
);
|
|
39930
39327
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
39931
|
-
const normalizedFields =
|
|
39328
|
+
const normalizedFields = React86__default.useMemo(() => {
|
|
39932
39329
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
39933
39330
|
return effectiveFields.map((field) => {
|
|
39934
39331
|
if (typeof field === "string") {
|
|
@@ -39951,7 +39348,7 @@ var init_Form = __esm({
|
|
|
39951
39348
|
return field;
|
|
39952
39349
|
});
|
|
39953
39350
|
}, [effectiveFields, resolvedEntity]);
|
|
39954
|
-
const schemaFields =
|
|
39351
|
+
const schemaFields = React86__default.useMemo(() => {
|
|
39955
39352
|
if (normalizedFields.length === 0) return null;
|
|
39956
39353
|
if (isDebugEnabled()) {
|
|
39957
39354
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -39961,7 +39358,7 @@ var init_Form = __esm({
|
|
|
39961
39358
|
}
|
|
39962
39359
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
39963
39360
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
39964
|
-
const sectionElements =
|
|
39361
|
+
const sectionElements = React86__default.useMemo(() => {
|
|
39965
39362
|
if (!sections || sections.length === 0) return null;
|
|
39966
39363
|
return sections.map((section) => {
|
|
39967
39364
|
if (!isSectionVisible(section)) {
|
|
@@ -39997,7 +39394,7 @@ var init_Form = __esm({
|
|
|
39997
39394
|
] }, section.id);
|
|
39998
39395
|
}).filter(Boolean);
|
|
39999
39396
|
}, [sections, isSectionVisible, collapsedSections, renderField, gap]);
|
|
40000
|
-
function renderFieldInput(field, fieldName, inputType,
|
|
39397
|
+
function renderFieldInput(field, fieldName, inputType, currentValue, label) {
|
|
40001
39398
|
const commonProps = {
|
|
40002
39399
|
id: fieldName,
|
|
40003
39400
|
name: fieldName,
|
|
@@ -40014,7 +39411,7 @@ var init_Form = __esm({
|
|
|
40014
39411
|
{
|
|
40015
39412
|
...commonProps,
|
|
40016
39413
|
label: label + (field.required ? " *" : ""),
|
|
40017
|
-
checked: Boolean(
|
|
39414
|
+
checked: Boolean(currentValue),
|
|
40018
39415
|
onChange: (e) => handleChange(fieldName, e.target.checked)
|
|
40019
39416
|
}
|
|
40020
39417
|
);
|
|
@@ -40023,7 +39420,7 @@ var init_Form = __esm({
|
|
|
40023
39420
|
Textarea,
|
|
40024
39421
|
{
|
|
40025
39422
|
...commonProps,
|
|
40026
|
-
value: String(
|
|
39423
|
+
value: String(currentValue),
|
|
40027
39424
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40028
39425
|
minLength: field.min,
|
|
40029
39426
|
maxLength: field.max
|
|
@@ -40036,7 +39433,7 @@ var init_Form = __esm({
|
|
|
40036
39433
|
{
|
|
40037
39434
|
...commonProps,
|
|
40038
39435
|
options,
|
|
40039
|
-
value: String(
|
|
39436
|
+
value: String(currentValue),
|
|
40040
39437
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40041
39438
|
placeholder: field.placeholder || `Select ${label}...`
|
|
40042
39439
|
}
|
|
@@ -40049,7 +39446,7 @@ var init_Form = __esm({
|
|
|
40049
39446
|
RelationSelect,
|
|
40050
39447
|
{
|
|
40051
39448
|
...commonProps,
|
|
40052
|
-
value:
|
|
39449
|
+
value: currentValue ? String(currentValue) : void 0,
|
|
40053
39450
|
onChange: (value) => handleChange(fieldName, value),
|
|
40054
39451
|
options: relationOptions,
|
|
40055
39452
|
isLoading: relationLoading,
|
|
@@ -40065,7 +39462,7 @@ var init_Form = __esm({
|
|
|
40065
39462
|
{
|
|
40066
39463
|
...commonProps,
|
|
40067
39464
|
type: "number",
|
|
40068
|
-
value:
|
|
39465
|
+
value: currentValue !== void 0 && currentValue !== "" ? String(currentValue) : "",
|
|
40069
39466
|
onChange: (e) => handleChange(
|
|
40070
39467
|
fieldName,
|
|
40071
39468
|
e.target.value ? Number(e.target.value) : void 0
|
|
@@ -40080,7 +39477,7 @@ var init_Form = __esm({
|
|
|
40080
39477
|
{
|
|
40081
39478
|
...commonProps,
|
|
40082
39479
|
type: "date",
|
|
40083
|
-
value: formatDateValue(
|
|
39480
|
+
value: formatDateValue(currentValue),
|
|
40084
39481
|
onChange: (e) => handleChange(fieldName, e.target.value)
|
|
40085
39482
|
}
|
|
40086
39483
|
);
|
|
@@ -40090,7 +39487,7 @@ var init_Form = __esm({
|
|
|
40090
39487
|
{
|
|
40091
39488
|
...commonProps,
|
|
40092
39489
|
type: "datetime-local",
|
|
40093
|
-
value: formatDateTimeValue(
|
|
39490
|
+
value: formatDateTimeValue(currentValue),
|
|
40094
39491
|
onChange: (e) => handleChange(fieldName, e.target.value)
|
|
40095
39492
|
}
|
|
40096
39493
|
);
|
|
@@ -40100,7 +39497,7 @@ var init_Form = __esm({
|
|
|
40100
39497
|
{
|
|
40101
39498
|
...commonProps,
|
|
40102
39499
|
type: "email",
|
|
40103
|
-
value: String(
|
|
39500
|
+
value: String(currentValue),
|
|
40104
39501
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40105
39502
|
minLength: field.min,
|
|
40106
39503
|
maxLength: field.max
|
|
@@ -40112,7 +39509,7 @@ var init_Form = __esm({
|
|
|
40112
39509
|
{
|
|
40113
39510
|
...commonProps,
|
|
40114
39511
|
type: "url",
|
|
40115
|
-
value: String(
|
|
39512
|
+
value: String(currentValue),
|
|
40116
39513
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40117
39514
|
minLength: field.min,
|
|
40118
39515
|
maxLength: field.max
|
|
@@ -40124,7 +39521,7 @@ var init_Form = __esm({
|
|
|
40124
39521
|
{
|
|
40125
39522
|
...commonProps,
|
|
40126
39523
|
type: "password",
|
|
40127
|
-
value: String(
|
|
39524
|
+
value: String(currentValue),
|
|
40128
39525
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40129
39526
|
minLength: field.min,
|
|
40130
39527
|
maxLength: field.max
|
|
@@ -40137,7 +39534,7 @@ var init_Form = __esm({
|
|
|
40137
39534
|
{
|
|
40138
39535
|
...commonProps,
|
|
40139
39536
|
type: "text",
|
|
40140
|
-
value: String(
|
|
39537
|
+
value: String(currentValue),
|
|
40141
39538
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40142
39539
|
minLength: field.min,
|
|
40143
39540
|
maxLength: field.max
|
|
@@ -41236,7 +40633,7 @@ var init_List = __esm({
|
|
|
41236
40633
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
41237
40634
|
return [];
|
|
41238
40635
|
}, [entity]);
|
|
41239
|
-
const getItemActions =
|
|
40636
|
+
const getItemActions = React86__default.useCallback(
|
|
41240
40637
|
(item) => {
|
|
41241
40638
|
if (!itemActions) return [];
|
|
41242
40639
|
if (typeof itemActions === "function") {
|
|
@@ -41712,7 +41109,7 @@ var init_MediaGallery = __esm({
|
|
|
41712
41109
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
41713
41110
|
);
|
|
41714
41111
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
41715
|
-
const items =
|
|
41112
|
+
const items = React86__default.useMemo(() => {
|
|
41716
41113
|
if (propItems) return propItems;
|
|
41717
41114
|
if (entityData.length === 0) return [];
|
|
41718
41115
|
return entityData.map((record, idx) => ({
|
|
@@ -41873,7 +41270,7 @@ var init_MediaGallery = __esm({
|
|
|
41873
41270
|
}
|
|
41874
41271
|
});
|
|
41875
41272
|
function extractTitle2(children) {
|
|
41876
|
-
if (!
|
|
41273
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
41877
41274
|
const props = children.props;
|
|
41878
41275
|
if (typeof props.title === "string") {
|
|
41879
41276
|
return props.title;
|
|
@@ -42304,7 +41701,7 @@ var init_debugRegistry = __esm({
|
|
|
42304
41701
|
}
|
|
42305
41702
|
});
|
|
42306
41703
|
function useDebugData() {
|
|
42307
|
-
const [data, setData] =
|
|
41704
|
+
const [data, setData] = React86.useState(() => ({
|
|
42308
41705
|
traits: [],
|
|
42309
41706
|
ticks: [],
|
|
42310
41707
|
guards: [],
|
|
@@ -42318,7 +41715,7 @@ function useDebugData() {
|
|
|
42318
41715
|
},
|
|
42319
41716
|
lastUpdate: Date.now()
|
|
42320
41717
|
}));
|
|
42321
|
-
|
|
41718
|
+
React86.useEffect(() => {
|
|
42322
41719
|
const updateData = () => {
|
|
42323
41720
|
setData({
|
|
42324
41721
|
traits: getAllTraits(),
|
|
@@ -42427,12 +41824,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42427
41824
|
return positions;
|
|
42428
41825
|
}
|
|
42429
41826
|
function WalkMinimap() {
|
|
42430
|
-
const [walkStep, setWalkStep] =
|
|
42431
|
-
const [traits2, setTraits] =
|
|
42432
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42433
|
-
const [completedTraits, setCompletedTraits] =
|
|
42434
|
-
const prevTraitRef =
|
|
42435
|
-
|
|
41827
|
+
const [walkStep, setWalkStep] = React86.useState(null);
|
|
41828
|
+
const [traits2, setTraits] = React86.useState([]);
|
|
41829
|
+
const [coveredEdges, setCoveredEdges] = React86.useState([]);
|
|
41830
|
+
const [completedTraits, setCompletedTraits] = React86.useState(/* @__PURE__ */ new Set());
|
|
41831
|
+
const prevTraitRef = React86.useRef(null);
|
|
41832
|
+
React86.useEffect(() => {
|
|
42436
41833
|
const interval = setInterval(() => {
|
|
42437
41834
|
const w = window;
|
|
42438
41835
|
const step = w.__orbitalWalkStep;
|
|
@@ -42868,15 +42265,15 @@ var init_EntitiesTab = __esm({
|
|
|
42868
42265
|
});
|
|
42869
42266
|
function EventFlowTab({ events: events2 }) {
|
|
42870
42267
|
const { t } = useTranslate();
|
|
42871
|
-
const [filter, setFilter] =
|
|
42872
|
-
const containerRef =
|
|
42873
|
-
const [autoScroll, setAutoScroll] =
|
|
42874
|
-
|
|
42268
|
+
const [filter, setFilter] = React86.useState("all");
|
|
42269
|
+
const containerRef = React86.useRef(null);
|
|
42270
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
42271
|
+
React86.useEffect(() => {
|
|
42875
42272
|
if (autoScroll && containerRef.current) {
|
|
42876
42273
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
42877
42274
|
}
|
|
42878
42275
|
}, [events2.length, autoScroll]);
|
|
42879
|
-
const filteredEvents =
|
|
42276
|
+
const filteredEvents = React86.useMemo(() => {
|
|
42880
42277
|
if (filter === "all") return events2;
|
|
42881
42278
|
return events2.filter((e) => e.type === filter);
|
|
42882
42279
|
}, [events2, filter]);
|
|
@@ -42992,7 +42389,7 @@ var init_EventFlowTab = __esm({
|
|
|
42992
42389
|
});
|
|
42993
42390
|
function GuardsPanel({ guards }) {
|
|
42994
42391
|
const { t } = useTranslate();
|
|
42995
|
-
const [filter, setFilter] =
|
|
42392
|
+
const [filter, setFilter] = React86.useState("all");
|
|
42996
42393
|
if (guards.length === 0) {
|
|
42997
42394
|
return /* @__PURE__ */ jsx(
|
|
42998
42395
|
EmptyState,
|
|
@@ -43005,7 +42402,7 @@ function GuardsPanel({ guards }) {
|
|
|
43005
42402
|
}
|
|
43006
42403
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43007
42404
|
const failedCount = guards.length - passedCount;
|
|
43008
|
-
const filteredGuards =
|
|
42405
|
+
const filteredGuards = React86.useMemo(() => {
|
|
43009
42406
|
if (filter === "all") return guards;
|
|
43010
42407
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43011
42408
|
return guards.filter((g) => !g.result);
|
|
@@ -43168,10 +42565,10 @@ function EffectBadge({ effect }) {
|
|
|
43168
42565
|
}
|
|
43169
42566
|
function TransitionTimeline({ transitions }) {
|
|
43170
42567
|
const { t } = useTranslate();
|
|
43171
|
-
const containerRef =
|
|
43172
|
-
const [autoScroll, setAutoScroll] =
|
|
43173
|
-
const [expandedId, setExpandedId] =
|
|
43174
|
-
|
|
42568
|
+
const containerRef = React86.useRef(null);
|
|
42569
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
42570
|
+
const [expandedId, setExpandedId] = React86.useState(null);
|
|
42571
|
+
React86.useEffect(() => {
|
|
43175
42572
|
if (autoScroll && containerRef.current) {
|
|
43176
42573
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43177
42574
|
}
|
|
@@ -43451,9 +42848,9 @@ function getAllEvents(traits2) {
|
|
|
43451
42848
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43452
42849
|
const eventBus = useEventBus();
|
|
43453
42850
|
const { t } = useTranslate();
|
|
43454
|
-
const [log12, setLog] =
|
|
43455
|
-
const prevStatesRef =
|
|
43456
|
-
|
|
42851
|
+
const [log12, setLog] = React86.useState([]);
|
|
42852
|
+
const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
|
|
42853
|
+
React86.useEffect(() => {
|
|
43457
42854
|
for (const trait of traits2) {
|
|
43458
42855
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43459
42856
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43622,10 +43019,10 @@ function VerifyModePanel({
|
|
|
43622
43019
|
localCount
|
|
43623
43020
|
}) {
|
|
43624
43021
|
const { t } = useTranslate();
|
|
43625
|
-
const [expanded, setExpanded] =
|
|
43626
|
-
const scrollRef =
|
|
43627
|
-
const prevCountRef =
|
|
43628
|
-
|
|
43022
|
+
const [expanded, setExpanded] = React86.useState(true);
|
|
43023
|
+
const scrollRef = React86.useRef(null);
|
|
43024
|
+
const prevCountRef = React86.useRef(0);
|
|
43025
|
+
React86.useEffect(() => {
|
|
43629
43026
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43630
43027
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43631
43028
|
}
|
|
@@ -43682,10 +43079,10 @@ function RuntimeDebugger({
|
|
|
43682
43079
|
schema
|
|
43683
43080
|
}) {
|
|
43684
43081
|
const { t } = useTranslate();
|
|
43685
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43686
|
-
const [isVisible, setIsVisible] =
|
|
43082
|
+
const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43083
|
+
const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43687
43084
|
const debugData = useDebugData();
|
|
43688
|
-
|
|
43085
|
+
React86.useEffect(() => {
|
|
43689
43086
|
if (mode === "inline") return;
|
|
43690
43087
|
return onDebugToggle((enabled) => {
|
|
43691
43088
|
setIsVisible(enabled);
|
|
@@ -43694,7 +43091,7 @@ function RuntimeDebugger({
|
|
|
43694
43091
|
}
|
|
43695
43092
|
});
|
|
43696
43093
|
}, [mode]);
|
|
43697
|
-
|
|
43094
|
+
React86.useEffect(() => {
|
|
43698
43095
|
if (mode === "inline") return;
|
|
43699
43096
|
const handleKeyDown = (e) => {
|
|
43700
43097
|
if (e.key === "`" && isVisible) {
|
|
@@ -44143,7 +43540,7 @@ function SequenceBar({
|
|
|
44143
43540
|
onSlotRemove(index);
|
|
44144
43541
|
}, [onSlotRemove, playing]);
|
|
44145
43542
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
44146
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
43543
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
44147
43544
|
i > 0 && /* @__PURE__ */ jsx(
|
|
44148
43545
|
Typography,
|
|
44149
43546
|
{
|
|
@@ -45101,7 +44498,7 @@ var init_StatCard = __esm({
|
|
|
45101
44498
|
title: propTitle,
|
|
45102
44499
|
value: propValue,
|
|
45103
44500
|
previousValue,
|
|
45104
|
-
currentValue
|
|
44501
|
+
currentValue,
|
|
45105
44502
|
trend: manualTrend,
|
|
45106
44503
|
trendDirection: manualDirection,
|
|
45107
44504
|
invertTrend = false,
|
|
@@ -45122,7 +44519,7 @@ var init_StatCard = __esm({
|
|
|
45122
44519
|
const labelToUse = propLabel ?? propTitle;
|
|
45123
44520
|
const eventBus = useEventBus();
|
|
45124
44521
|
const { t } = useTranslate();
|
|
45125
|
-
const handleActionClick =
|
|
44522
|
+
const handleActionClick = React86__default.useCallback(() => {
|
|
45126
44523
|
if (action?.event) {
|
|
45127
44524
|
eventBus.emit(`UI:${action.event}`, {});
|
|
45128
44525
|
}
|
|
@@ -45133,7 +44530,7 @@ var init_StatCard = __esm({
|
|
|
45133
44530
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
45134
44531
|
const isLoading = externalLoading ?? false;
|
|
45135
44532
|
const error = externalError;
|
|
45136
|
-
const computeMetricValue =
|
|
44533
|
+
const computeMetricValue = React86__default.useCallback(
|
|
45137
44534
|
(metric, items) => {
|
|
45138
44535
|
if (metric.value !== void 0) {
|
|
45139
44536
|
return metric.value;
|
|
@@ -45172,7 +44569,7 @@ var init_StatCard = __esm({
|
|
|
45172
44569
|
},
|
|
45173
44570
|
[]
|
|
45174
44571
|
);
|
|
45175
|
-
const schemaStats =
|
|
44572
|
+
const schemaStats = React86__default.useMemo(() => {
|
|
45176
44573
|
if (!metrics || metrics.length === 0) return null;
|
|
45177
44574
|
return metrics.map((metric) => ({
|
|
45178
44575
|
label: metric.label,
|
|
@@ -45180,13 +44577,13 @@ var init_StatCard = __esm({
|
|
|
45180
44577
|
format: metric.format
|
|
45181
44578
|
}));
|
|
45182
44579
|
}, [metrics, data, computeMetricValue]);
|
|
45183
|
-
const calculatedTrend =
|
|
44580
|
+
const calculatedTrend = React86__default.useMemo(() => {
|
|
45184
44581
|
if (manualTrend !== void 0) return manualTrend;
|
|
45185
|
-
if (previousValue === void 0 ||
|
|
44582
|
+
if (previousValue === void 0 || currentValue === void 0)
|
|
45186
44583
|
return void 0;
|
|
45187
|
-
if (previousValue === 0) return
|
|
45188
|
-
return (
|
|
45189
|
-
}, [manualTrend, previousValue,
|
|
44584
|
+
if (previousValue === 0) return currentValue > 0 ? 100 : 0;
|
|
44585
|
+
return (currentValue - previousValue) / previousValue * 100;
|
|
44586
|
+
}, [manualTrend, previousValue, currentValue]);
|
|
45190
44587
|
if (schemaStats && schemaStats.length > 1) {
|
|
45191
44588
|
if (isLoading) {
|
|
45192
44589
|
return /* @__PURE__ */ jsx(
|
|
@@ -46114,7 +45511,7 @@ var init_Timeline = __esm({
|
|
|
46114
45511
|
}) => {
|
|
46115
45512
|
const { t } = useTranslate();
|
|
46116
45513
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46117
|
-
const items =
|
|
45514
|
+
const items = React86__default.useMemo(() => {
|
|
46118
45515
|
if (propItems) return propItems;
|
|
46119
45516
|
if (entityData.length === 0) return [];
|
|
46120
45517
|
return entityData.map((record, idx) => {
|
|
@@ -46221,7 +45618,7 @@ var init_Timeline = __esm({
|
|
|
46221
45618
|
}
|
|
46222
45619
|
});
|
|
46223
45620
|
function extractToastProps(children) {
|
|
46224
|
-
if (!
|
|
45621
|
+
if (!React86__default.isValidElement(children)) {
|
|
46225
45622
|
if (typeof children === "string") {
|
|
46226
45623
|
return { message: children };
|
|
46227
45624
|
}
|
|
@@ -46259,7 +45656,7 @@ var init_ToastSlot = __esm({
|
|
|
46259
45656
|
eventBus.emit("UI:CLOSE");
|
|
46260
45657
|
};
|
|
46261
45658
|
if (!isVisible) return null;
|
|
46262
|
-
const isCustomContent =
|
|
45659
|
+
const isCustomContent = React86__default.isValidElement(children) && !message;
|
|
46263
45660
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
46264
45661
|
Toast,
|
|
46265
45662
|
{
|
|
@@ -46769,12 +46166,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
46769
46166
|
}
|
|
46770
46167
|
});
|
|
46771
46168
|
function lazyThree(name, loader) {
|
|
46772
|
-
const Lazy =
|
|
46169
|
+
const Lazy = React86__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
46773
46170
|
function ThreeWrapper(props) {
|
|
46774
|
-
return
|
|
46775
|
-
|
|
46171
|
+
return React86__default.createElement(
|
|
46172
|
+
React86__default.Suspense,
|
|
46776
46173
|
{ fallback: null },
|
|
46777
|
-
|
|
46174
|
+
React86__default.createElement(Lazy, props)
|
|
46778
46175
|
);
|
|
46779
46176
|
}
|
|
46780
46177
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -46794,7 +46191,6 @@ var init_component_registry_generated = __esm({
|
|
|
46794
46191
|
init_AnimatedReveal();
|
|
46795
46192
|
init_ArticleSection();
|
|
46796
46193
|
init_Aside();
|
|
46797
|
-
init_AssetPicker();
|
|
46798
46194
|
init_AuthLayout();
|
|
46799
46195
|
init_BattleBoard();
|
|
46800
46196
|
init_BattleTemplate();
|
|
@@ -46894,13 +46290,11 @@ var init_component_registry_generated = __esm({
|
|
|
46894
46290
|
init_GradientDivider();
|
|
46895
46291
|
init_GraphCanvas();
|
|
46896
46292
|
init_GraphView();
|
|
46897
|
-
init_GridPicker();
|
|
46898
46293
|
init_Header();
|
|
46899
46294
|
init_HealthBar();
|
|
46900
46295
|
init_HealthPanel();
|
|
46901
46296
|
init_HeroOrganism();
|
|
46902
46297
|
init_HeroSection();
|
|
46903
|
-
init_IconPicker();
|
|
46904
46298
|
init_InfiniteScrollSentinel();
|
|
46905
46299
|
init_InputGroup();
|
|
46906
46300
|
init_InstallBox();
|
|
@@ -46945,7 +46339,6 @@ var init_component_registry_generated = __esm({
|
|
|
46945
46339
|
init_PricingOrganism();
|
|
46946
46340
|
init_PricingPageTemplate();
|
|
46947
46341
|
init_ProgressDots();
|
|
46948
|
-
init_PropertyInspector();
|
|
46949
46342
|
init_PullQuote();
|
|
46950
46343
|
init_PullToRefresh();
|
|
46951
46344
|
init_QrScanner();
|
|
@@ -47069,7 +46462,6 @@ var init_component_registry_generated = __esm({
|
|
|
47069
46462
|
"AnimatedReveal": AnimatedReveal,
|
|
47070
46463
|
"ArticleSection": ArticleSection,
|
|
47071
46464
|
"Aside": Aside,
|
|
47072
|
-
"AssetPicker": AssetPicker,
|
|
47073
46465
|
"AuthLayout": AuthLayout,
|
|
47074
46466
|
"Avatar": AvatarPattern,
|
|
47075
46467
|
"AvatarPattern": AvatarPattern,
|
|
@@ -47189,7 +46581,6 @@ var init_component_registry_generated = __esm({
|
|
|
47189
46581
|
"GraphView": GraphView,
|
|
47190
46582
|
"Grid": GridPattern,
|
|
47191
46583
|
"GridPattern": GridPattern,
|
|
47192
|
-
"GridPicker": GridPicker,
|
|
47193
46584
|
"HStack": HStackPattern,
|
|
47194
46585
|
"HStackPattern": HStackPattern,
|
|
47195
46586
|
"Header": Header,
|
|
@@ -47199,7 +46590,6 @@ var init_component_registry_generated = __esm({
|
|
|
47199
46590
|
"HeroSection": HeroSection,
|
|
47200
46591
|
"Icon": IconPattern,
|
|
47201
46592
|
"IconPattern": IconPattern,
|
|
47202
|
-
"IconPicker": IconPicker,
|
|
47203
46593
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
47204
46594
|
"Input": InputPattern,
|
|
47205
46595
|
"InputGroup": InputGroup,
|
|
@@ -47256,7 +46646,6 @@ var init_component_registry_generated = __esm({
|
|
|
47256
46646
|
"ProgressBar": ProgressBarPattern,
|
|
47257
46647
|
"ProgressBarPattern": ProgressBarPattern,
|
|
47258
46648
|
"ProgressDots": ProgressDots,
|
|
47259
|
-
"PropertyInspector": PropertyInspector,
|
|
47260
46649
|
"PullQuote": PullQuote,
|
|
47261
46650
|
"PullToRefresh": PullToRefresh,
|
|
47262
46651
|
"QrScanner": QrScanner,
|
|
@@ -47398,7 +46787,7 @@ function SuspenseConfigProvider({
|
|
|
47398
46787
|
config,
|
|
47399
46788
|
children
|
|
47400
46789
|
}) {
|
|
47401
|
-
return
|
|
46790
|
+
return React86__default.createElement(
|
|
47402
46791
|
SuspenseConfigContext.Provider,
|
|
47403
46792
|
{ value: config },
|
|
47404
46793
|
children
|
|
@@ -47888,7 +47277,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47888
47277
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
47889
47278
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
47890
47279
|
}
|
|
47891
|
-
return /* @__PURE__ */ jsx(
|
|
47280
|
+
return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
47892
47281
|
}
|
|
47893
47282
|
if (!child || typeof child !== "object") return null;
|
|
47894
47283
|
const childId = `${parentId}-${index}`;
|
|
@@ -47928,14 +47317,14 @@ function isPatternConfig(value) {
|
|
|
47928
47317
|
if (value === null || value === void 0) return false;
|
|
47929
47318
|
if (typeof value !== "object") return false;
|
|
47930
47319
|
if (Array.isArray(value)) return false;
|
|
47931
|
-
if (
|
|
47320
|
+
if (React86__default.isValidElement(value)) return false;
|
|
47932
47321
|
if (value instanceof Date) return false;
|
|
47933
47322
|
if (typeof value === "function") return false;
|
|
47934
47323
|
const record = value;
|
|
47935
47324
|
return "type" in record && typeof record.type === "string";
|
|
47936
47325
|
}
|
|
47937
47326
|
function isPlainConfigObject(value) {
|
|
47938
|
-
if (
|
|
47327
|
+
if (React86__default.isValidElement(value)) return false;
|
|
47939
47328
|
if (value instanceof Date) return false;
|
|
47940
47329
|
const proto = Object.getPrototypeOf(value);
|
|
47941
47330
|
return proto === Object.prototype || proto === null;
|
|
@@ -48345,7 +47734,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
48345
47734
|
if (Array.isArray(body)) {
|
|
48346
47735
|
return body.map((b) => recur(b));
|
|
48347
47736
|
}
|
|
48348
|
-
if (body !== null && typeof body === "object" && !
|
|
47737
|
+
if (body !== null && typeof body === "object" && !React86__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
48349
47738
|
const out = {};
|
|
48350
47739
|
for (const [k, v] of Object.entries(body)) {
|
|
48351
47740
|
out[k] = recur(v);
|
|
@@ -48364,7 +47753,7 @@ function getSlotContentRenderer2() {
|
|
|
48364
47753
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
48365
47754
|
return (item, index) => {
|
|
48366
47755
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
48367
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
47756
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React86__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
48368
47757
|
return null;
|
|
48369
47758
|
}
|
|
48370
47759
|
const record = resolvedBody;
|
|
@@ -48383,7 +47772,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
48383
47772
|
props: childProps,
|
|
48384
47773
|
priority: 0
|
|
48385
47774
|
};
|
|
48386
|
-
return
|
|
47775
|
+
return React86__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
48387
47776
|
};
|
|
48388
47777
|
}
|
|
48389
47778
|
function convertNode(node, callerKey) {
|
|
@@ -48402,7 +47791,7 @@ function convertNode(node, callerKey) {
|
|
|
48402
47791
|
});
|
|
48403
47792
|
return anyChanged ? mapped : node;
|
|
48404
47793
|
}
|
|
48405
|
-
if (typeof node === "object" && !
|
|
47794
|
+
if (typeof node === "object" && !React86__default.isValidElement(node) && !(node instanceof Date)) {
|
|
48406
47795
|
return convertObjectProps(node);
|
|
48407
47796
|
}
|
|
48408
47797
|
return node;
|