@almadar/ui 5.24.0 → 5.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1906 -1336
- package/dist/avl/index.js +840 -270
- package/dist/components/core/molecules/PropertyInspector.d.ts +3 -2
- package/dist/components/core/molecules/index.d.ts +2 -2
- package/dist/components/core/organisms/index.d.ts +5 -5
- package/dist/components/core/templates/index.d.ts +1 -1
- package/dist/components/index.cjs +1395 -1391
- package/dist/components/index.js +492 -488
- package/dist/components/{core → marketing}/organisms/CaseStudyOrganism.d.ts +1 -1
- package/dist/components/{core → marketing}/organisms/FeatureGridOrganism.d.ts +1 -1
- package/dist/components/{core → marketing}/organisms/HeroOrganism.d.ts +1 -1
- package/dist/components/{core → marketing}/organisms/ShowcaseOrganism.d.ts +1 -1
- package/dist/components/{core → marketing}/organisms/StepFlowOrganism.d.ts +1 -1
- package/dist/marketing/index.d.ts +4 -4
- package/dist/providers/index.cjs +1729 -1159
- package/dist/providers/index.js +814 -244
- package/dist/runtime/index.cjs +1769 -1199
- package/dist/runtime/index.js +818 -248
- package/package.json +2 -2
- /package/dist/components/{core → marketing}/molecules/MarketingFooter.d.ts +0 -0
- /package/dist/components/{core → marketing}/molecules/PullQuote.d.ts +0 -0
- /package/dist/components/{core → marketing}/templates/AuthLayout.d.ts +0 -0
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React89 from 'react';
|
|
2
|
+
import React89__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
|
|
3
3
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
@@ -657,7 +657,7 @@ var init_Box = __esm({
|
|
|
657
657
|
fixed: "fixed",
|
|
658
658
|
sticky: "sticky"
|
|
659
659
|
};
|
|
660
|
-
Box =
|
|
660
|
+
Box = React89__default.forwardRef(
|
|
661
661
|
({
|
|
662
662
|
padding,
|
|
663
663
|
paddingX,
|
|
@@ -707,7 +707,7 @@ var init_Box = __esm({
|
|
|
707
707
|
onMouseLeave?.(e);
|
|
708
708
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
709
709
|
const isClickable = action || onClick;
|
|
710
|
-
return
|
|
710
|
+
return React89__default.createElement(
|
|
711
711
|
Component,
|
|
712
712
|
{
|
|
713
713
|
ref,
|
|
@@ -1490,7 +1490,7 @@ var init_Icon = __esm({
|
|
|
1490
1490
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1491
1491
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1492
1492
|
const family = useIconFamily();
|
|
1493
|
-
const RenderedComponent =
|
|
1493
|
+
const RenderedComponent = React89__default.useMemo(() => {
|
|
1494
1494
|
if (directIcon) return null;
|
|
1495
1495
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1496
1496
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1548,7 +1548,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1548
1548
|
const IconComp = value;
|
|
1549
1549
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1550
1550
|
}
|
|
1551
|
-
if (
|
|
1551
|
+
if (React89__default.isValidElement(value)) {
|
|
1552
1552
|
return value;
|
|
1553
1553
|
}
|
|
1554
1554
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1624,7 +1624,7 @@ var init_Button = __esm({
|
|
|
1624
1624
|
md: "h-icon-default w-icon-default",
|
|
1625
1625
|
lg: "h-icon-default w-icon-default"
|
|
1626
1626
|
};
|
|
1627
|
-
Button =
|
|
1627
|
+
Button = React89__default.forwardRef(
|
|
1628
1628
|
({
|
|
1629
1629
|
className,
|
|
1630
1630
|
variant = "primary",
|
|
@@ -1689,7 +1689,7 @@ var Dialog;
|
|
|
1689
1689
|
var init_Dialog = __esm({
|
|
1690
1690
|
"components/core/atoms/Dialog.tsx"() {
|
|
1691
1691
|
init_cn();
|
|
1692
|
-
Dialog =
|
|
1692
|
+
Dialog = React89__default.forwardRef(
|
|
1693
1693
|
({
|
|
1694
1694
|
role = "dialog",
|
|
1695
1695
|
"aria-modal": ariaModal = true,
|
|
@@ -2353,7 +2353,7 @@ var init_Badge = __esm({
|
|
|
2353
2353
|
md: "px-2.5 py-1 text-sm",
|
|
2354
2354
|
lg: "px-3 py-1.5 text-base"
|
|
2355
2355
|
};
|
|
2356
|
-
Badge =
|
|
2356
|
+
Badge = React89__default.forwardRef(
|
|
2357
2357
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2358
2358
|
const iconSizes3 = {
|
|
2359
2359
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2669,7 +2669,7 @@ var init_SvgFlow = __esm({
|
|
|
2669
2669
|
opacity = 1,
|
|
2670
2670
|
className
|
|
2671
2671
|
}) => {
|
|
2672
|
-
const markerId =
|
|
2672
|
+
const markerId = React89__default.useMemo(() => {
|
|
2673
2673
|
flowIdCounter += 1;
|
|
2674
2674
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2675
2675
|
}, []);
|
|
@@ -3212,7 +3212,7 @@ var init_SvgRing = __esm({
|
|
|
3212
3212
|
className,
|
|
3213
3213
|
label
|
|
3214
3214
|
}) => {
|
|
3215
|
-
const gradientId =
|
|
3215
|
+
const gradientId = React89__default.useMemo(() => {
|
|
3216
3216
|
ringIdCounter += 1;
|
|
3217
3217
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3218
3218
|
}, []);
|
|
@@ -3374,7 +3374,7 @@ var init_Input = __esm({
|
|
|
3374
3374
|
"components/core/atoms/Input.tsx"() {
|
|
3375
3375
|
init_cn();
|
|
3376
3376
|
init_Icon();
|
|
3377
|
-
Input =
|
|
3377
|
+
Input = React89__default.forwardRef(
|
|
3378
3378
|
({
|
|
3379
3379
|
className,
|
|
3380
3380
|
inputType,
|
|
@@ -3495,7 +3495,7 @@ var Label;
|
|
|
3495
3495
|
var init_Label = __esm({
|
|
3496
3496
|
"components/core/atoms/Label.tsx"() {
|
|
3497
3497
|
init_cn();
|
|
3498
|
-
Label =
|
|
3498
|
+
Label = React89__default.forwardRef(
|
|
3499
3499
|
({ className, required, children, ...props }, ref) => {
|
|
3500
3500
|
return /* @__PURE__ */ jsxs(
|
|
3501
3501
|
"label",
|
|
@@ -3521,7 +3521,7 @@ var Textarea;
|
|
|
3521
3521
|
var init_Textarea = __esm({
|
|
3522
3522
|
"components/core/atoms/Textarea.tsx"() {
|
|
3523
3523
|
init_cn();
|
|
3524
|
-
Textarea =
|
|
3524
|
+
Textarea = React89__default.forwardRef(
|
|
3525
3525
|
({ className, error, ...props }, ref) => {
|
|
3526
3526
|
return /* @__PURE__ */ jsx(
|
|
3527
3527
|
"textarea",
|
|
@@ -3551,7 +3551,7 @@ var init_Select = __esm({
|
|
|
3551
3551
|
"components/core/atoms/Select.tsx"() {
|
|
3552
3552
|
init_cn();
|
|
3553
3553
|
init_Icon();
|
|
3554
|
-
Select =
|
|
3554
|
+
Select = React89__default.forwardRef(
|
|
3555
3555
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
3556
3556
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3557
3557
|
/* @__PURE__ */ jsxs(
|
|
@@ -3593,7 +3593,7 @@ var Checkbox;
|
|
|
3593
3593
|
var init_Checkbox = __esm({
|
|
3594
3594
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3595
3595
|
init_cn();
|
|
3596
|
-
Checkbox =
|
|
3596
|
+
Checkbox = React89__default.forwardRef(
|
|
3597
3597
|
({ className, label, id, ...props }, ref) => {
|
|
3598
3598
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3599
3599
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -3684,7 +3684,7 @@ var init_Card = __esm({
|
|
|
3684
3684
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3685
3685
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3686
3686
|
};
|
|
3687
|
-
Card =
|
|
3687
|
+
Card = React89__default.forwardRef(
|
|
3688
3688
|
({
|
|
3689
3689
|
className,
|
|
3690
3690
|
variant = "bordered",
|
|
@@ -3722,9 +3722,9 @@ var init_Card = __esm({
|
|
|
3722
3722
|
}
|
|
3723
3723
|
);
|
|
3724
3724
|
Card.displayName = "Card";
|
|
3725
|
-
CardHeader =
|
|
3725
|
+
CardHeader = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3726
3726
|
CardHeader.displayName = "CardHeader";
|
|
3727
|
-
CardTitle =
|
|
3727
|
+
CardTitle = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3728
3728
|
"h3",
|
|
3729
3729
|
{
|
|
3730
3730
|
ref,
|
|
@@ -3737,11 +3737,11 @@ var init_Card = __esm({
|
|
|
3737
3737
|
}
|
|
3738
3738
|
));
|
|
3739
3739
|
CardTitle.displayName = "CardTitle";
|
|
3740
|
-
CardContent =
|
|
3740
|
+
CardContent = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3741
3741
|
CardContent.displayName = "CardContent";
|
|
3742
3742
|
CardBody = CardContent;
|
|
3743
3743
|
CardBody.displayName = "CardBody";
|
|
3744
|
-
CardFooter =
|
|
3744
|
+
CardFooter = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3745
3745
|
"div",
|
|
3746
3746
|
{
|
|
3747
3747
|
ref,
|
|
@@ -3796,7 +3796,7 @@ var init_FilterPill = __esm({
|
|
|
3796
3796
|
md: "w-3.5 h-3.5",
|
|
3797
3797
|
lg: "w-4 h-4"
|
|
3798
3798
|
};
|
|
3799
|
-
FilterPill =
|
|
3799
|
+
FilterPill = React89__default.forwardRef(
|
|
3800
3800
|
({
|
|
3801
3801
|
className,
|
|
3802
3802
|
variant = "default",
|
|
@@ -3873,7 +3873,7 @@ var init_Spinner = __esm({
|
|
|
3873
3873
|
md: "h-6 w-6",
|
|
3874
3874
|
lg: "h-8 w-8"
|
|
3875
3875
|
};
|
|
3876
|
-
Spinner =
|
|
3876
|
+
Spinner = React89__default.forwardRef(
|
|
3877
3877
|
({ className, size = "md", ...props }, ref) => {
|
|
3878
3878
|
return /* @__PURE__ */ jsx(
|
|
3879
3879
|
"div",
|
|
@@ -3952,8 +3952,8 @@ var init_Avatar = __esm({
|
|
|
3952
3952
|
actionPayload
|
|
3953
3953
|
}) => {
|
|
3954
3954
|
const eventBus = useEventBus();
|
|
3955
|
-
const [imgFailed, setImgFailed] =
|
|
3956
|
-
|
|
3955
|
+
const [imgFailed, setImgFailed] = React89__default.useState(false);
|
|
3956
|
+
React89__default.useEffect(() => {
|
|
3957
3957
|
setImgFailed(false);
|
|
3958
3958
|
}, [src]);
|
|
3959
3959
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4338,7 +4338,7 @@ var init_Radio = __esm({
|
|
|
4338
4338
|
md: "w-2.5 h-2.5",
|
|
4339
4339
|
lg: "w-3 h-3"
|
|
4340
4340
|
};
|
|
4341
|
-
Radio =
|
|
4341
|
+
Radio = React89__default.forwardRef(
|
|
4342
4342
|
({
|
|
4343
4343
|
label,
|
|
4344
4344
|
helperText,
|
|
@@ -4355,12 +4355,12 @@ var init_Radio = __esm({
|
|
|
4355
4355
|
onChange,
|
|
4356
4356
|
...props
|
|
4357
4357
|
}, ref) => {
|
|
4358
|
-
const reactId =
|
|
4358
|
+
const reactId = React89__default.useId();
|
|
4359
4359
|
const baseId = id || `radio-${reactId}`;
|
|
4360
4360
|
const hasError = !!error;
|
|
4361
4361
|
const eventBus = useEventBus();
|
|
4362
|
-
const [selected, setSelected] =
|
|
4363
|
-
|
|
4362
|
+
const [selected, setSelected] = React89__default.useState(value);
|
|
4363
|
+
React89__default.useEffect(() => {
|
|
4364
4364
|
if (value !== void 0) setSelected(value);
|
|
4365
4365
|
}, [value]);
|
|
4366
4366
|
const pick = (next, e) => {
|
|
@@ -4542,7 +4542,7 @@ var init_Switch = __esm({
|
|
|
4542
4542
|
"components/core/atoms/Switch.tsx"() {
|
|
4543
4543
|
"use client";
|
|
4544
4544
|
init_cn();
|
|
4545
|
-
Switch =
|
|
4545
|
+
Switch = React89.forwardRef(
|
|
4546
4546
|
({
|
|
4547
4547
|
checked,
|
|
4548
4548
|
defaultChecked = false,
|
|
@@ -4553,10 +4553,10 @@ var init_Switch = __esm({
|
|
|
4553
4553
|
name,
|
|
4554
4554
|
className
|
|
4555
4555
|
}, ref) => {
|
|
4556
|
-
const [isChecked, setIsChecked] =
|
|
4556
|
+
const [isChecked, setIsChecked] = React89.useState(
|
|
4557
4557
|
checked !== void 0 ? checked : defaultChecked
|
|
4558
4558
|
);
|
|
4559
|
-
|
|
4559
|
+
React89.useEffect(() => {
|
|
4560
4560
|
if (checked !== void 0) {
|
|
4561
4561
|
setIsChecked(checked);
|
|
4562
4562
|
}
|
|
@@ -4912,7 +4912,7 @@ var Aside;
|
|
|
4912
4912
|
var init_Aside = __esm({
|
|
4913
4913
|
"components/core/atoms/Aside.tsx"() {
|
|
4914
4914
|
init_cn();
|
|
4915
|
-
Aside =
|
|
4915
|
+
Aside = React89__default.forwardRef(
|
|
4916
4916
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4917
4917
|
);
|
|
4918
4918
|
Aside.displayName = "Aside";
|
|
@@ -4990,8 +4990,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4990
4990
|
className
|
|
4991
4991
|
}) => {
|
|
4992
4992
|
const { t } = useTranslate();
|
|
4993
|
-
const [isVisible, setIsVisible] =
|
|
4994
|
-
const timeoutRef =
|
|
4993
|
+
const [isVisible, setIsVisible] = React89__default.useState(false);
|
|
4994
|
+
const timeoutRef = React89__default.useRef(null);
|
|
4995
4995
|
const handleMouseEnter = () => {
|
|
4996
4996
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4997
4997
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5000,7 +5000,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5000
5000
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5001
5001
|
setIsVisible(false);
|
|
5002
5002
|
};
|
|
5003
|
-
|
|
5003
|
+
React89__default.useEffect(() => {
|
|
5004
5004
|
return () => {
|
|
5005
5005
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5006
5006
|
};
|
|
@@ -5210,7 +5210,7 @@ var init_StatusDot = __esm({
|
|
|
5210
5210
|
md: "w-2.5 h-2.5",
|
|
5211
5211
|
lg: "w-3 h-3"
|
|
5212
5212
|
};
|
|
5213
|
-
StatusDot =
|
|
5213
|
+
StatusDot = React89__default.forwardRef(
|
|
5214
5214
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5215
5215
|
return /* @__PURE__ */ jsx(
|
|
5216
5216
|
"span",
|
|
@@ -5264,7 +5264,7 @@ var init_TrendIndicator = __esm({
|
|
|
5264
5264
|
down: "trending-down",
|
|
5265
5265
|
flat: "arrow-right"
|
|
5266
5266
|
};
|
|
5267
|
-
TrendIndicator =
|
|
5267
|
+
TrendIndicator = React89__default.forwardRef(
|
|
5268
5268
|
({
|
|
5269
5269
|
className,
|
|
5270
5270
|
value,
|
|
@@ -5331,7 +5331,7 @@ var init_RangeSlider = __esm({
|
|
|
5331
5331
|
md: "w-4 h-4",
|
|
5332
5332
|
lg: "w-5 h-5"
|
|
5333
5333
|
};
|
|
5334
|
-
RangeSlider =
|
|
5334
|
+
RangeSlider = React89__default.forwardRef(
|
|
5335
5335
|
({
|
|
5336
5336
|
className,
|
|
5337
5337
|
min = 0,
|
|
@@ -5839,7 +5839,7 @@ var init_ContentSection = __esm({
|
|
|
5839
5839
|
md: "py-16",
|
|
5840
5840
|
lg: "py-24"
|
|
5841
5841
|
};
|
|
5842
|
-
ContentSection =
|
|
5842
|
+
ContentSection = React89__default.forwardRef(
|
|
5843
5843
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5844
5844
|
return /* @__PURE__ */ jsx(
|
|
5845
5845
|
Box,
|
|
@@ -6373,7 +6373,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6373
6373
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6374
6374
|
"none": {}
|
|
6375
6375
|
};
|
|
6376
|
-
AnimatedReveal =
|
|
6376
|
+
AnimatedReveal = React89__default.forwardRef(
|
|
6377
6377
|
({
|
|
6378
6378
|
trigger = "scroll",
|
|
6379
6379
|
animation = "fade-up",
|
|
@@ -6533,7 +6533,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6533
6533
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6534
6534
|
"use client";
|
|
6535
6535
|
init_cn();
|
|
6536
|
-
AnimatedGraphic =
|
|
6536
|
+
AnimatedGraphic = React89__default.forwardRef(
|
|
6537
6537
|
({
|
|
6538
6538
|
src,
|
|
6539
6539
|
svgContent,
|
|
@@ -6556,7 +6556,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6556
6556
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6557
6557
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6558
6558
|
const prevAnimateRef = useRef(animate);
|
|
6559
|
-
const setRef =
|
|
6559
|
+
const setRef = React89__default.useCallback(
|
|
6560
6560
|
(node) => {
|
|
6561
6561
|
containerRef.current = node;
|
|
6562
6562
|
if (typeof ref === "function") ref(node);
|
|
@@ -6781,9 +6781,9 @@ function ScoreDisplay({
|
|
|
6781
6781
|
...rest
|
|
6782
6782
|
}) {
|
|
6783
6783
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
6784
|
-
const [displayValue, setDisplayValue] =
|
|
6785
|
-
const [isAnimating, setIsAnimating] =
|
|
6786
|
-
|
|
6784
|
+
const [displayValue, setDisplayValue] = React89.useState(resolvedValue);
|
|
6785
|
+
const [isAnimating, setIsAnimating] = React89.useState(false);
|
|
6786
|
+
React89.useEffect(() => {
|
|
6787
6787
|
if (!animated || displayValue === resolvedValue) {
|
|
6788
6788
|
setDisplayValue(resolvedValue);
|
|
6789
6789
|
return;
|
|
@@ -6853,9 +6853,9 @@ function ControlButton({
|
|
|
6853
6853
|
className
|
|
6854
6854
|
}) {
|
|
6855
6855
|
const eventBus = useEventBus();
|
|
6856
|
-
const [isPressed, setIsPressed] =
|
|
6856
|
+
const [isPressed, setIsPressed] = React89.useState(false);
|
|
6857
6857
|
const actualPressed = pressed ?? isPressed;
|
|
6858
|
-
const handlePointerDown =
|
|
6858
|
+
const handlePointerDown = React89.useCallback(
|
|
6859
6859
|
(e) => {
|
|
6860
6860
|
e.preventDefault();
|
|
6861
6861
|
if (disabled) return;
|
|
@@ -6865,7 +6865,7 @@ function ControlButton({
|
|
|
6865
6865
|
},
|
|
6866
6866
|
[disabled, pressEvent, eventBus, onPress]
|
|
6867
6867
|
);
|
|
6868
|
-
const handlePointerUp =
|
|
6868
|
+
const handlePointerUp = React89.useCallback(
|
|
6869
6869
|
(e) => {
|
|
6870
6870
|
e.preventDefault();
|
|
6871
6871
|
if (disabled) return;
|
|
@@ -6875,7 +6875,7 @@ function ControlButton({
|
|
|
6875
6875
|
},
|
|
6876
6876
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6877
6877
|
);
|
|
6878
|
-
const handlePointerLeave =
|
|
6878
|
+
const handlePointerLeave = React89.useCallback(
|
|
6879
6879
|
(e) => {
|
|
6880
6880
|
if (isPressed) {
|
|
6881
6881
|
setIsPressed(false);
|
|
@@ -7364,8 +7364,8 @@ function XPBar({
|
|
|
7364
7364
|
}) {
|
|
7365
7365
|
const sizes = sizeMap9[size];
|
|
7366
7366
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7367
|
-
const [fillWidth, setFillWidth] =
|
|
7368
|
-
|
|
7367
|
+
const [fillWidth, setFillWidth] = React89.useState(animated ? 0 : percentage);
|
|
7368
|
+
React89.useEffect(() => {
|
|
7369
7369
|
if (!animated) {
|
|
7370
7370
|
setFillWidth(percentage);
|
|
7371
7371
|
return;
|
|
@@ -7791,9 +7791,9 @@ function MiniMap({
|
|
|
7791
7791
|
viewportRect,
|
|
7792
7792
|
className
|
|
7793
7793
|
}) {
|
|
7794
|
-
const canvasRef =
|
|
7795
|
-
const frameRef =
|
|
7796
|
-
|
|
7794
|
+
const canvasRef = React89.useRef(null);
|
|
7795
|
+
const frameRef = React89.useRef(0);
|
|
7796
|
+
React89.useEffect(() => {
|
|
7797
7797
|
const canvas = canvasRef.current;
|
|
7798
7798
|
if (!canvas) return;
|
|
7799
7799
|
const ctx = canvas.getContext("2d");
|
|
@@ -7967,7 +7967,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7967
7967
|
}
|
|
7968
7968
|
);
|
|
7969
7969
|
};
|
|
7970
|
-
ErrorBoundary = class extends
|
|
7970
|
+
ErrorBoundary = class extends React89__default.Component {
|
|
7971
7971
|
constructor(props) {
|
|
7972
7972
|
super(props);
|
|
7973
7973
|
__publicField(this, "reset", () => {
|
|
@@ -9413,8 +9413,8 @@ var init_Tooltip = __esm({
|
|
|
9413
9413
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
9414
9414
|
};
|
|
9415
9415
|
}, []);
|
|
9416
|
-
const triggerElement =
|
|
9417
|
-
const trigger =
|
|
9416
|
+
const triggerElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9417
|
+
const trigger = React89__default.cloneElement(triggerElement, {
|
|
9418
9418
|
ref: triggerRef,
|
|
9419
9419
|
onMouseEnter: handleMouseEnter,
|
|
9420
9420
|
onMouseLeave: handleMouseLeave,
|
|
@@ -9561,8 +9561,8 @@ var init_Popover = __esm({
|
|
|
9561
9561
|
onMouseEnter: handleOpen,
|
|
9562
9562
|
onMouseLeave: handleClose
|
|
9563
9563
|
};
|
|
9564
|
-
const childElement =
|
|
9565
|
-
const triggerElement =
|
|
9564
|
+
const childElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9565
|
+
const triggerElement = React89__default.cloneElement(
|
|
9566
9566
|
childElement,
|
|
9567
9567
|
{
|
|
9568
9568
|
ref: triggerRef,
|
|
@@ -9688,8 +9688,8 @@ var init_Menu = __esm({
|
|
|
9688
9688
|
};
|
|
9689
9689
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
9690
9690
|
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
9691
|
-
const triggerChild =
|
|
9692
|
-
const triggerElement =
|
|
9691
|
+
const triggerChild = React89__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
9692
|
+
const triggerElement = React89__default.cloneElement(
|
|
9693
9693
|
triggerChild,
|
|
9694
9694
|
{
|
|
9695
9695
|
ref: triggerRef,
|
|
@@ -10096,12 +10096,12 @@ var init_MapView = __esm({
|
|
|
10096
10096
|
shadowSize: [41, 41]
|
|
10097
10097
|
});
|
|
10098
10098
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
10099
|
-
const { useEffect: useEffect71, useRef:
|
|
10099
|
+
const { useEffect: useEffect71, useRef: useRef67, useCallback: useCallback116, useState: useState102 } = React89__default;
|
|
10100
10100
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
10101
10101
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
10102
10102
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
10103
10103
|
const map = useMap();
|
|
10104
|
-
const prevRef =
|
|
10104
|
+
const prevRef = useRef67({ centerLat, centerLng, zoom });
|
|
10105
10105
|
useEffect71(() => {
|
|
10106
10106
|
const prev = prevRef.current;
|
|
10107
10107
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
@@ -10141,8 +10141,8 @@ var init_MapView = __esm({
|
|
|
10141
10141
|
showAttribution = true
|
|
10142
10142
|
}) {
|
|
10143
10143
|
const eventBus = useEventBus2();
|
|
10144
|
-
const [clickedPosition, setClickedPosition] =
|
|
10145
|
-
const handleMapClick =
|
|
10144
|
+
const [clickedPosition, setClickedPosition] = useState102(null);
|
|
10145
|
+
const handleMapClick = useCallback116((lat, lng) => {
|
|
10146
10146
|
if (showClickedPin) {
|
|
10147
10147
|
setClickedPosition({ lat, lng });
|
|
10148
10148
|
}
|
|
@@ -10151,7 +10151,7 @@ var init_MapView = __esm({
|
|
|
10151
10151
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
10152
10152
|
}
|
|
10153
10153
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
10154
|
-
const handleMarkerClick =
|
|
10154
|
+
const handleMarkerClick = useCallback116((marker) => {
|
|
10155
10155
|
onMarkerClick?.(marker);
|
|
10156
10156
|
if (markerClickEvent) {
|
|
10157
10157
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -10342,7 +10342,7 @@ function InputPattern({
|
|
|
10342
10342
|
fieldName
|
|
10343
10343
|
}) {
|
|
10344
10344
|
const { emit } = useEventBus();
|
|
10345
|
-
const [localValue, setLocalValue] =
|
|
10345
|
+
const [localValue, setLocalValue] = React89__default.useState(value);
|
|
10346
10346
|
const handleChange = (e) => {
|
|
10347
10347
|
setLocalValue(e.target.value);
|
|
10348
10348
|
if (onChange) {
|
|
@@ -10380,7 +10380,7 @@ function TextareaPattern({
|
|
|
10380
10380
|
fieldName
|
|
10381
10381
|
}) {
|
|
10382
10382
|
const { emit } = useEventBus();
|
|
10383
|
-
const [localValue, setLocalValue] =
|
|
10383
|
+
const [localValue, setLocalValue] = React89__default.useState(value);
|
|
10384
10384
|
const handleChange = (e) => {
|
|
10385
10385
|
setLocalValue(e.target.value);
|
|
10386
10386
|
if (onChange) {
|
|
@@ -10412,7 +10412,7 @@ function SelectPattern({
|
|
|
10412
10412
|
fieldName
|
|
10413
10413
|
}) {
|
|
10414
10414
|
const { emit } = useEventBus();
|
|
10415
|
-
const [localValue, setLocalValue] =
|
|
10415
|
+
const [localValue, setLocalValue] = React89__default.useState(value);
|
|
10416
10416
|
const handleChange = (e) => {
|
|
10417
10417
|
setLocalValue(e.target.value);
|
|
10418
10418
|
if (onChange) {
|
|
@@ -10441,7 +10441,7 @@ function CheckboxPattern({
|
|
|
10441
10441
|
className
|
|
10442
10442
|
}) {
|
|
10443
10443
|
const { emit } = useEventBus();
|
|
10444
|
-
const [localChecked, setLocalChecked] =
|
|
10444
|
+
const [localChecked, setLocalChecked] = React89__default.useState(checked);
|
|
10445
10445
|
const handleChange = (e) => {
|
|
10446
10446
|
setLocalChecked(e.target.checked);
|
|
10447
10447
|
if (onChange) {
|
|
@@ -10672,8 +10672,8 @@ function ActionButtons({
|
|
|
10672
10672
|
disabled
|
|
10673
10673
|
}) {
|
|
10674
10674
|
const eventBus = useEventBus();
|
|
10675
|
-
const [activeButtons, setActiveButtons] =
|
|
10676
|
-
const handlePress =
|
|
10675
|
+
const [activeButtons, setActiveButtons] = React89.useState(/* @__PURE__ */ new Set());
|
|
10676
|
+
const handlePress = React89.useCallback(
|
|
10677
10677
|
(id) => {
|
|
10678
10678
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
10679
10679
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -10681,7 +10681,7 @@ function ActionButtons({
|
|
|
10681
10681
|
},
|
|
10682
10682
|
[actionEvent, eventBus, onAction]
|
|
10683
10683
|
);
|
|
10684
|
-
const handleRelease =
|
|
10684
|
+
const handleRelease = React89.useCallback(
|
|
10685
10685
|
(id) => {
|
|
10686
10686
|
setActiveButtons((prev) => {
|
|
10687
10687
|
const next = new Set(prev);
|
|
@@ -10962,9 +10962,262 @@ var init_AnimatedCounter = __esm({
|
|
|
10962
10962
|
AnimatedCounter.displayName = "AnimatedCounter";
|
|
10963
10963
|
}
|
|
10964
10964
|
});
|
|
10965
|
+
var ALL_CATEGORY, GridPicker;
|
|
10966
|
+
var init_GridPicker = __esm({
|
|
10967
|
+
"components/core/molecules/GridPicker.tsx"() {
|
|
10968
|
+
"use client";
|
|
10969
|
+
init_cn();
|
|
10970
|
+
init_Input();
|
|
10971
|
+
init_Badge();
|
|
10972
|
+
init_Stack();
|
|
10973
|
+
ALL_CATEGORY = "__all__";
|
|
10974
|
+
GridPicker = ({
|
|
10975
|
+
items,
|
|
10976
|
+
value,
|
|
10977
|
+
onChange,
|
|
10978
|
+
categories,
|
|
10979
|
+
searchPlaceholder,
|
|
10980
|
+
renderThumbnail,
|
|
10981
|
+
cellSize = 32,
|
|
10982
|
+
className
|
|
10983
|
+
}) => {
|
|
10984
|
+
const [search, setSearch] = useState("");
|
|
10985
|
+
const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
|
|
10986
|
+
const gridRef = useRef(null);
|
|
10987
|
+
const categoryChips = useMemo(() => {
|
|
10988
|
+
if (categories !== void 0) return categories;
|
|
10989
|
+
const seen = [];
|
|
10990
|
+
for (const item of items) {
|
|
10991
|
+
if (!seen.includes(item.category)) seen.push(item.category);
|
|
10992
|
+
}
|
|
10993
|
+
return seen;
|
|
10994
|
+
}, [categories, items]);
|
|
10995
|
+
const filtered = useMemo(() => {
|
|
10996
|
+
const needle = search.trim().toLowerCase();
|
|
10997
|
+
return items.filter((item) => {
|
|
10998
|
+
const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
|
|
10999
|
+
const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
|
|
11000
|
+
return matchesCategory && matchesSearch;
|
|
11001
|
+
});
|
|
11002
|
+
}, [items, search, activeCategory]);
|
|
11003
|
+
const select = useCallback(
|
|
11004
|
+
(item) => {
|
|
11005
|
+
onChange(item.id);
|
|
11006
|
+
},
|
|
11007
|
+
[onChange]
|
|
11008
|
+
);
|
|
11009
|
+
const handleKeyDown = useCallback(
|
|
11010
|
+
(e, index) => {
|
|
11011
|
+
const cells = gridRef.current?.querySelectorAll(
|
|
11012
|
+
"[data-gridpicker-cell]"
|
|
11013
|
+
);
|
|
11014
|
+
if (cells === void 0 || cells.length === 0) return;
|
|
11015
|
+
const columns = (() => {
|
|
11016
|
+
const grid = gridRef.current;
|
|
11017
|
+
if (grid === null) return 1;
|
|
11018
|
+
const style = window.getComputedStyle(grid);
|
|
11019
|
+
const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
|
|
11020
|
+
return cols > 0 ? cols : 1;
|
|
11021
|
+
})();
|
|
11022
|
+
let next = -1;
|
|
11023
|
+
if (e.key === "ArrowRight") next = index + 1;
|
|
11024
|
+
else if (e.key === "ArrowLeft") next = index - 1;
|
|
11025
|
+
else if (e.key === "ArrowDown") next = index + columns;
|
|
11026
|
+
else if (e.key === "ArrowUp") next = index - columns;
|
|
11027
|
+
else if (e.key === "Enter" || e.key === " ") {
|
|
11028
|
+
e.preventDefault();
|
|
11029
|
+
select(filtered[index]);
|
|
11030
|
+
return;
|
|
11031
|
+
} else {
|
|
11032
|
+
return;
|
|
11033
|
+
}
|
|
11034
|
+
e.preventDefault();
|
|
11035
|
+
if (next >= 0 && next < cells.length) {
|
|
11036
|
+
cells[next].focus();
|
|
11037
|
+
}
|
|
11038
|
+
},
|
|
11039
|
+
[filtered, select]
|
|
11040
|
+
);
|
|
11041
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
|
|
11042
|
+
/* @__PURE__ */ jsx(
|
|
11043
|
+
Input,
|
|
11044
|
+
{
|
|
11045
|
+
type: "search",
|
|
11046
|
+
icon: "search",
|
|
11047
|
+
value: search,
|
|
11048
|
+
placeholder: searchPlaceholder,
|
|
11049
|
+
clearable: true,
|
|
11050
|
+
onClear: () => setSearch(""),
|
|
11051
|
+
onChange: (e) => setSearch(e.target.value)
|
|
11052
|
+
}
|
|
11053
|
+
),
|
|
11054
|
+
categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
|
|
11055
|
+
/* @__PURE__ */ jsx(
|
|
11056
|
+
Badge,
|
|
11057
|
+
{
|
|
11058
|
+
variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
|
|
11059
|
+
size: "sm",
|
|
11060
|
+
role: "button",
|
|
11061
|
+
tabIndex: 0,
|
|
11062
|
+
"aria-pressed": activeCategory === ALL_CATEGORY,
|
|
11063
|
+
className: "cursor-pointer",
|
|
11064
|
+
onClick: () => setActiveCategory(ALL_CATEGORY),
|
|
11065
|
+
onKeyDown: (e) => {
|
|
11066
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
11067
|
+
e.preventDefault();
|
|
11068
|
+
setActiveCategory(ALL_CATEGORY);
|
|
11069
|
+
}
|
|
11070
|
+
},
|
|
11071
|
+
children: "All"
|
|
11072
|
+
}
|
|
11073
|
+
),
|
|
11074
|
+
categoryChips.map((category) => /* @__PURE__ */ jsx(
|
|
11075
|
+
Badge,
|
|
11076
|
+
{
|
|
11077
|
+
variant: activeCategory === category ? "primary" : "neutral",
|
|
11078
|
+
size: "sm",
|
|
11079
|
+
role: "button",
|
|
11080
|
+
tabIndex: 0,
|
|
11081
|
+
"aria-pressed": activeCategory === category,
|
|
11082
|
+
className: "cursor-pointer",
|
|
11083
|
+
onClick: () => setActiveCategory(category),
|
|
11084
|
+
onKeyDown: (e) => {
|
|
11085
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
11086
|
+
e.preventDefault();
|
|
11087
|
+
setActiveCategory(category);
|
|
11088
|
+
}
|
|
11089
|
+
},
|
|
11090
|
+
children: category
|
|
11091
|
+
},
|
|
11092
|
+
category
|
|
11093
|
+
))
|
|
11094
|
+
] }),
|
|
11095
|
+
/* @__PURE__ */ jsx(
|
|
11096
|
+
"div",
|
|
11097
|
+
{
|
|
11098
|
+
ref: gridRef,
|
|
11099
|
+
role: "listbox",
|
|
11100
|
+
className: "grid gap-1 overflow-y-auto max-h-64 p-1",
|
|
11101
|
+
style: {
|
|
11102
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
|
|
11103
|
+
},
|
|
11104
|
+
children: filtered.map((item, index) => {
|
|
11105
|
+
const selected = item.id === value;
|
|
11106
|
+
return /* @__PURE__ */ jsx(
|
|
11107
|
+
"button",
|
|
11108
|
+
{
|
|
11109
|
+
type: "button",
|
|
11110
|
+
role: "option",
|
|
11111
|
+
"aria-selected": selected,
|
|
11112
|
+
"aria-label": item.label,
|
|
11113
|
+
title: item.label,
|
|
11114
|
+
"data-gridpicker-cell": true,
|
|
11115
|
+
tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
|
|
11116
|
+
onClick: () => select(item),
|
|
11117
|
+
onKeyDown: (e) => handleKeyDown(e, index),
|
|
11118
|
+
className: cn(
|
|
11119
|
+
"flex items-center justify-center rounded-sm",
|
|
11120
|
+
"transition-colors hover:bg-muted",
|
|
11121
|
+
"focus:outline-none focus:ring-1 focus:ring-ring",
|
|
11122
|
+
selected && "bg-primary/10 ring-1 ring-primary"
|
|
11123
|
+
),
|
|
11124
|
+
style: { width: cellSize, height: cellSize },
|
|
11125
|
+
children: renderThumbnail(item)
|
|
11126
|
+
},
|
|
11127
|
+
item.id
|
|
11128
|
+
);
|
|
11129
|
+
})
|
|
11130
|
+
}
|
|
11131
|
+
)
|
|
11132
|
+
] });
|
|
11133
|
+
};
|
|
11134
|
+
GridPicker.displayName = "GridPicker";
|
|
11135
|
+
}
|
|
11136
|
+
});
|
|
11137
|
+
function iconForKind(kind) {
|
|
11138
|
+
if (kind === "audio") return "music";
|
|
11139
|
+
if (kind === "model") return "box";
|
|
11140
|
+
return "file";
|
|
11141
|
+
}
|
|
11142
|
+
var THUMB_PX, IMAGE_KINDS, AssetPicker;
|
|
11143
|
+
var init_AssetPicker = __esm({
|
|
11144
|
+
"components/core/molecules/AssetPicker.tsx"() {
|
|
11145
|
+
"use client";
|
|
11146
|
+
init_GridPicker();
|
|
11147
|
+
init_Icon();
|
|
11148
|
+
THUMB_PX = 32;
|
|
11149
|
+
IMAGE_KINDS = /* @__PURE__ */ new Set([
|
|
11150
|
+
"image",
|
|
11151
|
+
"spritesheet",
|
|
11152
|
+
"scene",
|
|
11153
|
+
"portrait"
|
|
11154
|
+
]);
|
|
11155
|
+
AssetPicker = ({
|
|
11156
|
+
assets,
|
|
11157
|
+
value,
|
|
11158
|
+
onChange,
|
|
11159
|
+
className
|
|
11160
|
+
}) => {
|
|
11161
|
+
const byUrl = useMemo(() => {
|
|
11162
|
+
const map = /* @__PURE__ */ new Map();
|
|
11163
|
+
for (const entry of assets) map.set(entry.url, entry);
|
|
11164
|
+
return map;
|
|
11165
|
+
}, [assets]);
|
|
11166
|
+
const items = useMemo(
|
|
11167
|
+
() => assets.map((entry) => ({
|
|
11168
|
+
id: entry.url,
|
|
11169
|
+
label: entry.name,
|
|
11170
|
+
category: entry.category
|
|
11171
|
+
})),
|
|
11172
|
+
[assets]
|
|
11173
|
+
);
|
|
11174
|
+
const categories = useMemo(() => {
|
|
11175
|
+
const seen = [];
|
|
11176
|
+
for (const entry of assets) {
|
|
11177
|
+
if (!seen.includes(entry.category)) seen.push(entry.category);
|
|
11178
|
+
}
|
|
11179
|
+
return seen;
|
|
11180
|
+
}, [assets]);
|
|
11181
|
+
const renderThumbnail = useCallback(
|
|
11182
|
+
(item) => {
|
|
11183
|
+
const entry = byUrl.get(item.id);
|
|
11184
|
+
if (entry === void 0) return null;
|
|
11185
|
+
if (IMAGE_KINDS.has(entry.kind)) {
|
|
11186
|
+
return /* @__PURE__ */ jsx(
|
|
11187
|
+
"img",
|
|
11188
|
+
{
|
|
11189
|
+
src: entry.thumbnailUrl ?? entry.url,
|
|
11190
|
+
alt: entry.name,
|
|
11191
|
+
loading: "lazy",
|
|
11192
|
+
width: THUMB_PX,
|
|
11193
|
+
height: THUMB_PX,
|
|
11194
|
+
style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
|
|
11195
|
+
}
|
|
11196
|
+
);
|
|
11197
|
+
}
|
|
11198
|
+
return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
|
|
11199
|
+
},
|
|
11200
|
+
[byUrl]
|
|
11201
|
+
);
|
|
11202
|
+
return /* @__PURE__ */ jsx(
|
|
11203
|
+
GridPicker,
|
|
11204
|
+
{
|
|
11205
|
+
items,
|
|
11206
|
+
value,
|
|
11207
|
+
onChange,
|
|
11208
|
+
categories,
|
|
11209
|
+
renderThumbnail,
|
|
11210
|
+
cellSize: THUMB_PX,
|
|
11211
|
+
className
|
|
11212
|
+
}
|
|
11213
|
+
);
|
|
11214
|
+
};
|
|
11215
|
+
AssetPicker.displayName = "AssetPicker";
|
|
11216
|
+
}
|
|
11217
|
+
});
|
|
10965
11218
|
var AuthLayout;
|
|
10966
11219
|
var init_AuthLayout = __esm({
|
|
10967
|
-
"components/
|
|
11220
|
+
"components/marketing/templates/AuthLayout.tsx"() {
|
|
10968
11221
|
"use client";
|
|
10969
11222
|
init_cn();
|
|
10970
11223
|
init_Box();
|
|
@@ -13810,7 +14063,7 @@ var init_CodeBlock = __esm({
|
|
|
13810
14063
|
CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
|
|
13811
14064
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13812
14065
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13813
|
-
CodeBlock =
|
|
14066
|
+
CodeBlock = React89__default.memo(
|
|
13814
14067
|
({
|
|
13815
14068
|
code: rawCode,
|
|
13816
14069
|
language = "text",
|
|
@@ -14247,7 +14500,7 @@ var init_MarkdownContent = __esm({
|
|
|
14247
14500
|
init_Box();
|
|
14248
14501
|
init_CodeBlock();
|
|
14249
14502
|
init_cn();
|
|
14250
|
-
MarkdownContent =
|
|
14503
|
+
MarkdownContent = React89__default.memo(
|
|
14251
14504
|
({ content, direction, className }) => {
|
|
14252
14505
|
const { t: _t } = useTranslate();
|
|
14253
14506
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -15343,7 +15596,7 @@ var init_StateMachineView = __esm({
|
|
|
15343
15596
|
style: { top: title ? 30 : 0 },
|
|
15344
15597
|
children: [
|
|
15345
15598
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15346
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15599
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React89__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15347
15600
|
StateNode,
|
|
15348
15601
|
{
|
|
15349
15602
|
state,
|
|
@@ -16948,7 +17201,7 @@ var init_Grid = __esm({
|
|
|
16948
17201
|
as: Component = "div"
|
|
16949
17202
|
}) => {
|
|
16950
17203
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
16951
|
-
return
|
|
17204
|
+
return React89__default.createElement(
|
|
16952
17205
|
Component,
|
|
16953
17206
|
{
|
|
16954
17207
|
className: cn(
|
|
@@ -20266,7 +20519,7 @@ var init_Carousel = __esm({
|
|
|
20266
20519
|
});
|
|
20267
20520
|
var CaseStudyOrganism;
|
|
20268
20521
|
var init_CaseStudyOrganism = __esm({
|
|
20269
|
-
"components/
|
|
20522
|
+
"components/marketing/organisms/CaseStudyOrganism.tsx"() {
|
|
20270
20523
|
"use client";
|
|
20271
20524
|
init_cn();
|
|
20272
20525
|
init_useEventBus();
|
|
@@ -22308,7 +22561,7 @@ function CraftingRecipe({
|
|
|
22308
22561
|
className
|
|
22309
22562
|
}) {
|
|
22310
22563
|
const eventBus = useEventBus();
|
|
22311
|
-
const handleCraft =
|
|
22564
|
+
const handleCraft = React89.useCallback(() => {
|
|
22312
22565
|
onCraft?.();
|
|
22313
22566
|
if (craftEvent) {
|
|
22314
22567
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -22325,7 +22578,7 @@ function CraftingRecipe({
|
|
|
22325
22578
|
children: [
|
|
22326
22579
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
22327
22580
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
22328
|
-
return /* @__PURE__ */ jsxs(
|
|
22581
|
+
return /* @__PURE__ */ jsxs(React89.Fragment, { children: [
|
|
22329
22582
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
22330
22583
|
ItemSlot,
|
|
22331
22584
|
{
|
|
@@ -22388,8 +22641,8 @@ function DPad({
|
|
|
22388
22641
|
}) {
|
|
22389
22642
|
const eventBus = useEventBus();
|
|
22390
22643
|
const sizes = sizeMap15[size];
|
|
22391
|
-
const [activeDirections, setActiveDirections] =
|
|
22392
|
-
const handlePress =
|
|
22644
|
+
const [activeDirections, setActiveDirections] = React89.useState(/* @__PURE__ */ new Set());
|
|
22645
|
+
const handlePress = React89.useCallback(
|
|
22393
22646
|
(direction) => {
|
|
22394
22647
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
22395
22648
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -22397,7 +22650,7 @@ function DPad({
|
|
|
22397
22650
|
},
|
|
22398
22651
|
[directionEvent, eventBus, onDirection]
|
|
22399
22652
|
);
|
|
22400
|
-
const handleRelease =
|
|
22653
|
+
const handleRelease = React89.useCallback(
|
|
22401
22654
|
(direction) => {
|
|
22402
22655
|
setActiveDirections((prev) => {
|
|
22403
22656
|
const next = new Set(prev);
|
|
@@ -23083,14 +23336,14 @@ function useDataDnd(args) {
|
|
|
23083
23336
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
23084
23337
|
const enabled = isZone || Boolean(dndRoot);
|
|
23085
23338
|
const eventBus = useEventBus();
|
|
23086
|
-
const parentRoot =
|
|
23339
|
+
const parentRoot = React89__default.useContext(RootCtx);
|
|
23087
23340
|
const isRoot = enabled && parentRoot === null;
|
|
23088
|
-
const zoneId =
|
|
23341
|
+
const zoneId = React89__default.useId();
|
|
23089
23342
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
23090
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
23091
|
-
const optimisticOrdersRef =
|
|
23343
|
+
const [optimisticOrders, setOptimisticOrders] = React89__default.useState(() => /* @__PURE__ */ new Map());
|
|
23344
|
+
const optimisticOrdersRef = React89__default.useRef(optimisticOrders);
|
|
23092
23345
|
optimisticOrdersRef.current = optimisticOrders;
|
|
23093
|
-
const clearOptimisticOrder =
|
|
23346
|
+
const clearOptimisticOrder = React89__default.useCallback((group) => {
|
|
23094
23347
|
setOptimisticOrders((prev) => {
|
|
23095
23348
|
if (!prev.has(group)) return prev;
|
|
23096
23349
|
const next = new Map(prev);
|
|
@@ -23115,7 +23368,7 @@ function useDataDnd(args) {
|
|
|
23115
23368
|
const raw = it[dndItemIdField];
|
|
23116
23369
|
return String(raw ?? `__idx_${idx}`);
|
|
23117
23370
|
}).join("|");
|
|
23118
|
-
const itemIds =
|
|
23371
|
+
const itemIds = React89__default.useMemo(
|
|
23119
23372
|
() => orderedItems.map((it, idx) => {
|
|
23120
23373
|
const raw = it[dndItemIdField];
|
|
23121
23374
|
return raw ?? `__idx_${idx}`;
|
|
@@ -23123,7 +23376,7 @@ function useDataDnd(args) {
|
|
|
23123
23376
|
[itemIdsSignature]
|
|
23124
23377
|
);
|
|
23125
23378
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
23126
|
-
|
|
23379
|
+
React89__default.useEffect(() => {
|
|
23127
23380
|
const root = isRoot ? null : parentRoot;
|
|
23128
23381
|
if (root) {
|
|
23129
23382
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -23131,20 +23384,20 @@ function useDataDnd(args) {
|
|
|
23131
23384
|
clearOptimisticOrder(ownGroup);
|
|
23132
23385
|
}
|
|
23133
23386
|
}, [itemsContentSig, ownGroup]);
|
|
23134
|
-
const zonesRef =
|
|
23135
|
-
const registerZone =
|
|
23387
|
+
const zonesRef = React89__default.useRef(/* @__PURE__ */ new Map());
|
|
23388
|
+
const registerZone = React89__default.useCallback((zoneId2, meta2) => {
|
|
23136
23389
|
zonesRef.current.set(zoneId2, meta2);
|
|
23137
23390
|
}, []);
|
|
23138
|
-
const unregisterZone =
|
|
23391
|
+
const unregisterZone = React89__default.useCallback((zoneId2) => {
|
|
23139
23392
|
zonesRef.current.delete(zoneId2);
|
|
23140
23393
|
}, []);
|
|
23141
|
-
const [activeDrag, setActiveDrag] =
|
|
23142
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
23143
|
-
const meta =
|
|
23394
|
+
const [activeDrag, setActiveDrag] = React89__default.useState(null);
|
|
23395
|
+
const [overZoneGroup, setOverZoneGroup] = React89__default.useState(null);
|
|
23396
|
+
const meta = React89__default.useMemo(
|
|
23144
23397
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
23145
23398
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
23146
23399
|
);
|
|
23147
|
-
|
|
23400
|
+
React89__default.useEffect(() => {
|
|
23148
23401
|
const target = isRoot ? null : parentRoot;
|
|
23149
23402
|
if (!target) {
|
|
23150
23403
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -23163,7 +23416,7 @@ function useDataDnd(args) {
|
|
|
23163
23416
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
23164
23417
|
const sensors = useAlmadarDndSensors(true);
|
|
23165
23418
|
const collisionDetection = almadarDndCollisionDetection;
|
|
23166
|
-
const findZoneByItem =
|
|
23419
|
+
const findZoneByItem = React89__default.useCallback(
|
|
23167
23420
|
(id) => {
|
|
23168
23421
|
for (const z of zonesRef.current.values()) {
|
|
23169
23422
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -23172,7 +23425,7 @@ function useDataDnd(args) {
|
|
|
23172
23425
|
},
|
|
23173
23426
|
[]
|
|
23174
23427
|
);
|
|
23175
|
-
|
|
23428
|
+
React89__default.useCallback(
|
|
23176
23429
|
(group) => {
|
|
23177
23430
|
for (const z of zonesRef.current.values()) {
|
|
23178
23431
|
if (z.group === group) return z;
|
|
@@ -23181,7 +23434,7 @@ function useDataDnd(args) {
|
|
|
23181
23434
|
},
|
|
23182
23435
|
[]
|
|
23183
23436
|
);
|
|
23184
|
-
const handleDragEnd =
|
|
23437
|
+
const handleDragEnd = React89__default.useCallback(
|
|
23185
23438
|
(event) => {
|
|
23186
23439
|
const { active, over } = event;
|
|
23187
23440
|
const activeIdStr = String(active.id);
|
|
@@ -23272,8 +23525,8 @@ function useDataDnd(args) {
|
|
|
23272
23525
|
},
|
|
23273
23526
|
[eventBus]
|
|
23274
23527
|
);
|
|
23275
|
-
const sortableData =
|
|
23276
|
-
const SortableItem =
|
|
23528
|
+
const sortableData = React89__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
23529
|
+
const SortableItem = React89__default.useCallback(
|
|
23277
23530
|
({ id, children }) => {
|
|
23278
23531
|
const {
|
|
23279
23532
|
attributes,
|
|
@@ -23313,7 +23566,7 @@ function useDataDnd(args) {
|
|
|
23313
23566
|
id: droppableId,
|
|
23314
23567
|
data: sortableData
|
|
23315
23568
|
});
|
|
23316
|
-
const ctx =
|
|
23569
|
+
const ctx = React89__default.useContext(RootCtx);
|
|
23317
23570
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
23318
23571
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
23319
23572
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -23328,7 +23581,7 @@ function useDataDnd(args) {
|
|
|
23328
23581
|
showForeignPlaceholder,
|
|
23329
23582
|
ctxAvailable: ctx != null
|
|
23330
23583
|
});
|
|
23331
|
-
|
|
23584
|
+
React89__default.useEffect(() => {
|
|
23332
23585
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
23333
23586
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
23334
23587
|
return /* @__PURE__ */ jsx(
|
|
@@ -23342,11 +23595,11 @@ function useDataDnd(args) {
|
|
|
23342
23595
|
}
|
|
23343
23596
|
);
|
|
23344
23597
|
};
|
|
23345
|
-
const rootContextValue =
|
|
23598
|
+
const rootContextValue = React89__default.useMemo(
|
|
23346
23599
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
23347
23600
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23348
23601
|
);
|
|
23349
|
-
const handleDragStart =
|
|
23602
|
+
const handleDragStart = React89__default.useCallback((event) => {
|
|
23350
23603
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23351
23604
|
const rect = event.active.rect.current.initial;
|
|
23352
23605
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23365,7 +23618,7 @@ function useDataDnd(args) {
|
|
|
23365
23618
|
isRoot
|
|
23366
23619
|
});
|
|
23367
23620
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23368
|
-
const handleDragOver =
|
|
23621
|
+
const handleDragOver = React89__default.useCallback((event) => {
|
|
23369
23622
|
const { active, over } = event;
|
|
23370
23623
|
const overData = over?.data?.current;
|
|
23371
23624
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23435,7 +23688,7 @@ function useDataDnd(args) {
|
|
|
23435
23688
|
return next;
|
|
23436
23689
|
});
|
|
23437
23690
|
}, []);
|
|
23438
|
-
const handleDragCancel =
|
|
23691
|
+
const handleDragCancel = React89__default.useCallback((event) => {
|
|
23439
23692
|
setActiveDrag(null);
|
|
23440
23693
|
setOverZoneGroup(null);
|
|
23441
23694
|
dndLog.warn("dragCancel", {
|
|
@@ -23443,12 +23696,12 @@ function useDataDnd(args) {
|
|
|
23443
23696
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23444
23697
|
});
|
|
23445
23698
|
}, []);
|
|
23446
|
-
const handleDragEndWithCleanup =
|
|
23699
|
+
const handleDragEndWithCleanup = React89__default.useCallback((event) => {
|
|
23447
23700
|
handleDragEnd(event);
|
|
23448
23701
|
setActiveDrag(null);
|
|
23449
23702
|
setOverZoneGroup(null);
|
|
23450
23703
|
}, [handleDragEnd]);
|
|
23451
|
-
const wrapContainer =
|
|
23704
|
+
const wrapContainer = React89__default.useCallback(
|
|
23452
23705
|
(children) => {
|
|
23453
23706
|
if (!enabled) return children;
|
|
23454
23707
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -23502,7 +23755,7 @@ var init_useDataDnd = __esm({
|
|
|
23502
23755
|
init_useAlmadarDndCollision();
|
|
23503
23756
|
init_Box();
|
|
23504
23757
|
dndLog = createLogger("almadar:ui:dnd");
|
|
23505
|
-
RootCtx =
|
|
23758
|
+
RootCtx = React89__default.createContext(null);
|
|
23506
23759
|
}
|
|
23507
23760
|
});
|
|
23508
23761
|
function fieldLabel2(key) {
|
|
@@ -24022,7 +24275,7 @@ function DataList({
|
|
|
24022
24275
|
}) {
|
|
24023
24276
|
const eventBus = useEventBus();
|
|
24024
24277
|
const { t } = useTranslate();
|
|
24025
|
-
const [visibleCount, setVisibleCount] =
|
|
24278
|
+
const [visibleCount, setVisibleCount] = React89__default.useState(pageSize || Infinity);
|
|
24026
24279
|
const fieldDefs = fields ?? columns ?? [];
|
|
24027
24280
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
24028
24281
|
const dnd = useDataDnd({
|
|
@@ -24041,7 +24294,7 @@ function DataList({
|
|
|
24041
24294
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
24042
24295
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
24043
24296
|
const hasRenderProp = typeof children === "function";
|
|
24044
|
-
|
|
24297
|
+
React89__default.useEffect(() => {
|
|
24045
24298
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
24046
24299
|
const childrenTypeOf = typeof children;
|
|
24047
24300
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -24146,7 +24399,7 @@ function DataList({
|
|
|
24146
24399
|
const items2 = data.map((item) => item);
|
|
24147
24400
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
24148
24401
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
24149
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24402
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
24150
24403
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
24151
24404
|
group.items.map((itemData, index) => {
|
|
24152
24405
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -24294,7 +24547,7 @@ function DataList({
|
|
|
24294
24547
|
className
|
|
24295
24548
|
),
|
|
24296
24549
|
children: [
|
|
24297
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24550
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
24298
24551
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
24299
24552
|
group.items.map(
|
|
24300
24553
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -25668,7 +25921,7 @@ var init_WizardProgress = __esm({
|
|
|
25668
25921
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
25669
25922
|
const isActive = index === currentStep;
|
|
25670
25923
|
const isCompleted = index < currentStep;
|
|
25671
|
-
return /* @__PURE__ */ jsxs(
|
|
25924
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
25672
25925
|
/* @__PURE__ */ jsx(
|
|
25673
25926
|
"button",
|
|
25674
25927
|
{
|
|
@@ -26279,6 +26532,50 @@ var init_FlipCard = __esm({
|
|
|
26279
26532
|
FlipCard.displayName = "FlipCard";
|
|
26280
26533
|
}
|
|
26281
26534
|
});
|
|
26535
|
+
function pascalToKebab(name) {
|
|
26536
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
26537
|
+
}
|
|
26538
|
+
function kebabToPascal3(name) {
|
|
26539
|
+
return name.split("-").map((part) => /^\d+$/.test(part) ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
26540
|
+
}
|
|
26541
|
+
var ICON_ITEMS, IconPicker;
|
|
26542
|
+
var init_IconPicker = __esm({
|
|
26543
|
+
"components/core/molecules/IconPicker.tsx"() {
|
|
26544
|
+
"use client";
|
|
26545
|
+
init_Icon();
|
|
26546
|
+
init_GridPicker();
|
|
26547
|
+
ICON_ITEMS = (() => {
|
|
26548
|
+
const items = [];
|
|
26549
|
+
for (const [exportName, candidate] of Object.entries(LucideIcons2)) {
|
|
26550
|
+
if (!/^[A-Z]/.test(exportName)) continue;
|
|
26551
|
+
if (exportName.endsWith("Icon")) continue;
|
|
26552
|
+
if (exportName.startsWith("Lucide")) continue;
|
|
26553
|
+
const isComponent = candidate !== null && (typeof candidate === "object" || typeof candidate === "function") && "$$typeof" in candidate;
|
|
26554
|
+
if (!isComponent) continue;
|
|
26555
|
+
const kebab = pascalToKebab(exportName);
|
|
26556
|
+
if (kebabToPascal3(kebab) !== exportName) continue;
|
|
26557
|
+
items.push({ id: kebab, label: kebab, category: "icons" });
|
|
26558
|
+
}
|
|
26559
|
+
return items;
|
|
26560
|
+
})();
|
|
26561
|
+
IconPicker = ({ value, onChange, className }) => {
|
|
26562
|
+
const items = useMemo(() => ICON_ITEMS, []);
|
|
26563
|
+
return /* @__PURE__ */ jsx(
|
|
26564
|
+
GridPicker,
|
|
26565
|
+
{
|
|
26566
|
+
items,
|
|
26567
|
+
value,
|
|
26568
|
+
onChange,
|
|
26569
|
+
searchPlaceholder: "Search icons\u2026",
|
|
26570
|
+
renderThumbnail: (it) => /* @__PURE__ */ jsx(Icon, { name: it.id }),
|
|
26571
|
+
cellSize: 32,
|
|
26572
|
+
className
|
|
26573
|
+
}
|
|
26574
|
+
);
|
|
26575
|
+
};
|
|
26576
|
+
IconPicker.displayName = "IconPicker";
|
|
26577
|
+
}
|
|
26578
|
+
});
|
|
26282
26579
|
function toISODate(d) {
|
|
26283
26580
|
return d.toISOString().slice(0, 10);
|
|
26284
26581
|
}
|
|
@@ -26723,7 +27020,7 @@ function InventoryGrid({
|
|
|
26723
27020
|
const eventBus = useEventBus();
|
|
26724
27021
|
const slotCount = totalSlots ?? items.length;
|
|
26725
27022
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
26726
|
-
const handleSelect =
|
|
27023
|
+
const handleSelect = React89.useCallback(
|
|
26727
27024
|
(id) => {
|
|
26728
27025
|
onSelect?.(id);
|
|
26729
27026
|
if (selectEvent) {
|
|
@@ -26940,31 +27237,31 @@ function GameCanvas2D({
|
|
|
26940
27237
|
assetBaseUrl = "",
|
|
26941
27238
|
className
|
|
26942
27239
|
}) {
|
|
26943
|
-
const canvasRef =
|
|
26944
|
-
const rafRef =
|
|
26945
|
-
const frameRef =
|
|
26946
|
-
const lastTimeRef =
|
|
26947
|
-
const imageCache =
|
|
27240
|
+
const canvasRef = React89.useRef(null);
|
|
27241
|
+
const rafRef = React89.useRef(0);
|
|
27242
|
+
const frameRef = React89.useRef(0);
|
|
27243
|
+
const lastTimeRef = React89.useRef(0);
|
|
27244
|
+
const imageCache = React89.useRef(/* @__PURE__ */ new Map());
|
|
26948
27245
|
const emit = useEmitEvent();
|
|
26949
|
-
const onDrawRef =
|
|
27246
|
+
const onDrawRef = React89.useRef(onDraw);
|
|
26950
27247
|
onDrawRef.current = onDraw;
|
|
26951
|
-
const onTickRef =
|
|
27248
|
+
const onTickRef = React89.useRef(onTick);
|
|
26952
27249
|
onTickRef.current = onTick;
|
|
26953
|
-
const tickEventRef =
|
|
27250
|
+
const tickEventRef = React89.useRef(tickEvent);
|
|
26954
27251
|
tickEventRef.current = tickEvent;
|
|
26955
|
-
const drawEventRef =
|
|
27252
|
+
const drawEventRef = React89.useRef(drawEvent);
|
|
26956
27253
|
drawEventRef.current = drawEvent;
|
|
26957
|
-
const emitRef =
|
|
27254
|
+
const emitRef = React89.useRef(emit);
|
|
26958
27255
|
emitRef.current = emit;
|
|
26959
|
-
const assetBaseUrlRef =
|
|
27256
|
+
const assetBaseUrlRef = React89.useRef(assetBaseUrl);
|
|
26960
27257
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
26961
|
-
const backgroundImageRef =
|
|
27258
|
+
const backgroundImageRef = React89.useRef(backgroundImage);
|
|
26962
27259
|
backgroundImageRef.current = backgroundImage;
|
|
26963
|
-
const widthRef =
|
|
27260
|
+
const widthRef = React89.useRef(width);
|
|
26964
27261
|
widthRef.current = width;
|
|
26965
|
-
const heightRef =
|
|
27262
|
+
const heightRef = React89.useRef(height);
|
|
26966
27263
|
heightRef.current = height;
|
|
26967
|
-
const loadImage =
|
|
27264
|
+
const loadImage = React89.useCallback((url) => {
|
|
26968
27265
|
const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
|
|
26969
27266
|
const cached = imageCache.current.get(fullUrl);
|
|
26970
27267
|
if (cached?.complete && cached.naturalWidth > 0) return cached;
|
|
@@ -26976,7 +27273,7 @@ function GameCanvas2D({
|
|
|
26976
27273
|
}
|
|
26977
27274
|
return null;
|
|
26978
27275
|
}, []);
|
|
26979
|
-
|
|
27276
|
+
React89.useEffect(() => {
|
|
26980
27277
|
const canvas = canvasRef.current;
|
|
26981
27278
|
if (!canvas) return;
|
|
26982
27279
|
const ctx = canvas.getContext("2d");
|
|
@@ -27279,7 +27576,7 @@ function TurnPanel({
|
|
|
27279
27576
|
className
|
|
27280
27577
|
}) {
|
|
27281
27578
|
const eventBus = useEventBus();
|
|
27282
|
-
const handleAction =
|
|
27579
|
+
const handleAction = React89.useCallback(
|
|
27283
27580
|
(event) => {
|
|
27284
27581
|
if (event) {
|
|
27285
27582
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -27425,7 +27722,7 @@ function UnitCommandBar({
|
|
|
27425
27722
|
className
|
|
27426
27723
|
}) {
|
|
27427
27724
|
const eventBus = useEventBus();
|
|
27428
|
-
const handleCommand =
|
|
27725
|
+
const handleCommand = React89.useCallback(
|
|
27429
27726
|
(event) => {
|
|
27430
27727
|
if (event) {
|
|
27431
27728
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -27910,7 +28207,7 @@ function GameMenu({
|
|
|
27910
28207
|
} catch {
|
|
27911
28208
|
}
|
|
27912
28209
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
27913
|
-
const handleOptionClick =
|
|
28210
|
+
const handleOptionClick = React89.useCallback(
|
|
27914
28211
|
(option) => {
|
|
27915
28212
|
if (option.event && eventBus) {
|
|
27916
28213
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -28024,7 +28321,7 @@ function GameOverScreen({
|
|
|
28024
28321
|
} catch {
|
|
28025
28322
|
}
|
|
28026
28323
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
28027
|
-
const handleActionClick =
|
|
28324
|
+
const handleActionClick = React89.useCallback(
|
|
28028
28325
|
(action) => {
|
|
28029
28326
|
if (action.event && eventBus) {
|
|
28030
28327
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -29501,8 +29798,8 @@ function TableView({
|
|
|
29501
29798
|
}) {
|
|
29502
29799
|
const eventBus = useEventBus();
|
|
29503
29800
|
const { t } = useTranslate();
|
|
29504
|
-
const [visibleCount, setVisibleCount] =
|
|
29505
|
-
const [localSelected, setLocalSelected] =
|
|
29801
|
+
const [visibleCount, setVisibleCount] = React89__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29802
|
+
const [localSelected, setLocalSelected] = React89__default.useState(/* @__PURE__ */ new Set());
|
|
29506
29803
|
const colDefs = columns ?? fields ?? [];
|
|
29507
29804
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
29508
29805
|
const dnd = useDataDnd({
|
|
@@ -29697,12 +29994,12 @@ function TableView({
|
|
|
29697
29994
|
]
|
|
29698
29995
|
}
|
|
29699
29996
|
);
|
|
29700
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
29997
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React89__default.Fragment, { children: rowInner }, id);
|
|
29701
29998
|
};
|
|
29702
29999
|
const items = data.map((row) => row);
|
|
29703
30000
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
29704
30001
|
let runningIndex = 0;
|
|
29705
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
30002
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
29706
30003
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
29707
30004
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
29708
30005
|
] }, gi)) });
|
|
@@ -31054,7 +31351,7 @@ var init_StepFlow = __esm({
|
|
|
31054
31351
|
className
|
|
31055
31352
|
}) => {
|
|
31056
31353
|
if (orientation === "vertical") {
|
|
31057
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
31354
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React89__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
31058
31355
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
31059
31356
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31060
31357
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -31065,7 +31362,7 @@ var init_StepFlow = __esm({
|
|
|
31065
31362
|
] })
|
|
31066
31363
|
] }) }, index)) });
|
|
31067
31364
|
}
|
|
31068
|
-
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(
|
|
31365
|
+
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(React89__default.Fragment, { children: [
|
|
31069
31366
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
31070
31367
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31071
31368
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -32041,7 +32338,7 @@ var init_LikertScale = __esm({
|
|
|
32041
32338
|
md: "text-base",
|
|
32042
32339
|
lg: "text-lg"
|
|
32043
32340
|
};
|
|
32044
|
-
LikertScale =
|
|
32341
|
+
LikertScale = React89__default.forwardRef(
|
|
32045
32342
|
({
|
|
32046
32343
|
question,
|
|
32047
32344
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -32053,7 +32350,7 @@ var init_LikertScale = __esm({
|
|
|
32053
32350
|
variant = "radios",
|
|
32054
32351
|
className
|
|
32055
32352
|
}, ref) => {
|
|
32056
|
-
const groupId =
|
|
32353
|
+
const groupId = React89__default.useId();
|
|
32057
32354
|
const eventBus = useEventBus();
|
|
32058
32355
|
const handleSelect = useCallback(
|
|
32059
32356
|
(next) => {
|
|
@@ -34361,7 +34658,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
34361
34658
|
"aria-label": t("aria.breadcrumb"),
|
|
34362
34659
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
34363
34660
|
const isLast = idx === items.length - 1;
|
|
34364
|
-
return /* @__PURE__ */ jsxs(
|
|
34661
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
34365
34662
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
34366
34663
|
Icon,
|
|
34367
34664
|
{
|
|
@@ -34972,7 +35269,7 @@ var init_GradientDivider = __esm({
|
|
|
34972
35269
|
});
|
|
34973
35270
|
var MarketingFooter;
|
|
34974
35271
|
var init_MarketingFooter = __esm({
|
|
34975
|
-
"components/
|
|
35272
|
+
"components/marketing/molecules/MarketingFooter.tsx"() {
|
|
34976
35273
|
"use client";
|
|
34977
35274
|
init_cn();
|
|
34978
35275
|
init_Box();
|
|
@@ -35042,7 +35339,7 @@ var init_MarketingFooter = __esm({
|
|
|
35042
35339
|
});
|
|
35043
35340
|
var PullQuote;
|
|
35044
35341
|
var init_PullQuote = __esm({
|
|
35045
|
-
"components/
|
|
35342
|
+
"components/marketing/molecules/PullQuote.tsx"() {
|
|
35046
35343
|
"use client";
|
|
35047
35344
|
init_cn();
|
|
35048
35345
|
init_Box();
|
|
@@ -35325,7 +35622,7 @@ var init_MiniStateMachine = __esm({
|
|
|
35325
35622
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
35326
35623
|
const tc = transitionCounts[s.name] ?? 0;
|
|
35327
35624
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
35328
|
-
return /* @__PURE__ */ jsxs(
|
|
35625
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
35329
35626
|
/* @__PURE__ */ jsx(
|
|
35330
35627
|
AvlState,
|
|
35331
35628
|
{
|
|
@@ -35529,7 +35826,7 @@ var init_PageHeader = __esm({
|
|
|
35529
35826
|
info: "bg-info/10 text-info"
|
|
35530
35827
|
};
|
|
35531
35828
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35532
|
-
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(
|
|
35829
|
+
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(React89__default.Fragment, { children: [
|
|
35533
35830
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35534
35831
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35535
35832
|
"a",
|
|
@@ -35616,6 +35913,271 @@ var init_PageHeader = __esm({
|
|
|
35616
35913
|
PageHeader.displayName = "PageHeader";
|
|
35617
35914
|
}
|
|
35618
35915
|
});
|
|
35916
|
+
var FormSection, FormLayout, FormActions;
|
|
35917
|
+
var init_FormSection = __esm({
|
|
35918
|
+
"components/core/molecules/FormSection.tsx"() {
|
|
35919
|
+
"use client";
|
|
35920
|
+
init_cn();
|
|
35921
|
+
init_atoms2();
|
|
35922
|
+
init_Box();
|
|
35923
|
+
init_Typography();
|
|
35924
|
+
init_Button();
|
|
35925
|
+
init_Stack();
|
|
35926
|
+
init_Icon();
|
|
35927
|
+
init_useEventBus();
|
|
35928
|
+
FormSection = ({
|
|
35929
|
+
title,
|
|
35930
|
+
description,
|
|
35931
|
+
children,
|
|
35932
|
+
collapsible = false,
|
|
35933
|
+
defaultCollapsed = false,
|
|
35934
|
+
card = false,
|
|
35935
|
+
columns = 1,
|
|
35936
|
+
className
|
|
35937
|
+
}) => {
|
|
35938
|
+
const [collapsed, setCollapsed] = React89__default.useState(defaultCollapsed);
|
|
35939
|
+
const { t } = useTranslate();
|
|
35940
|
+
const eventBus = useEventBus();
|
|
35941
|
+
const gridClass = {
|
|
35942
|
+
1: "grid-cols-1",
|
|
35943
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
35944
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
35945
|
+
}[columns];
|
|
35946
|
+
React89__default.useCallback(() => {
|
|
35947
|
+
if (collapsible) {
|
|
35948
|
+
setCollapsed((prev) => !prev);
|
|
35949
|
+
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
35950
|
+
}
|
|
35951
|
+
}, [collapsible, collapsed, eventBus]);
|
|
35952
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35953
|
+
(title || description) && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "mb-4", children: [
|
|
35954
|
+
title && /* @__PURE__ */ jsxs(
|
|
35955
|
+
HStack,
|
|
35956
|
+
{
|
|
35957
|
+
justify: "between",
|
|
35958
|
+
align: "center",
|
|
35959
|
+
className: cn(collapsible && "cursor-pointer"),
|
|
35960
|
+
action: collapsible ? "TOGGLE_COLLAPSE" : void 0,
|
|
35961
|
+
children: [
|
|
35962
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h3", weight: "semibold", children: title }),
|
|
35963
|
+
collapsible && /* @__PURE__ */ jsx(
|
|
35964
|
+
Button,
|
|
35965
|
+
{
|
|
35966
|
+
variant: "ghost",
|
|
35967
|
+
size: "sm",
|
|
35968
|
+
action: "TOGGLE_COLLAPSE",
|
|
35969
|
+
children: /* @__PURE__ */ jsx(
|
|
35970
|
+
Icon,
|
|
35971
|
+
{
|
|
35972
|
+
icon: ChevronDown,
|
|
35973
|
+
size: "sm",
|
|
35974
|
+
className: cn(
|
|
35975
|
+
"text-muted-foreground transition-transform",
|
|
35976
|
+
collapsed && "rotate-180"
|
|
35977
|
+
)
|
|
35978
|
+
}
|
|
35979
|
+
)
|
|
35980
|
+
}
|
|
35981
|
+
)
|
|
35982
|
+
]
|
|
35983
|
+
}
|
|
35984
|
+
),
|
|
35985
|
+
description && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: description })
|
|
35986
|
+
] }),
|
|
35987
|
+
(!collapsible || !collapsed) && /* @__PURE__ */ jsx(Box, { className: cn("grid gap-4", gridClass), children })
|
|
35988
|
+
] });
|
|
35989
|
+
if (card) {
|
|
35990
|
+
return /* @__PURE__ */ jsx(Card, { className: cn("p-6", className), children: content });
|
|
35991
|
+
}
|
|
35992
|
+
return /* @__PURE__ */ jsx(Box, { className, children: content });
|
|
35993
|
+
};
|
|
35994
|
+
FormSection.displayName = "FormSection";
|
|
35995
|
+
FormLayout = ({
|
|
35996
|
+
children,
|
|
35997
|
+
dividers = true,
|
|
35998
|
+
className
|
|
35999
|
+
}) => {
|
|
36000
|
+
return /* @__PURE__ */ jsx(
|
|
36001
|
+
VStack,
|
|
36002
|
+
{
|
|
36003
|
+
gap: "lg",
|
|
36004
|
+
className: cn(
|
|
36005
|
+
dividers && "[&>*+*]:pt-8 [&>*+*]:border-t [&>*+*]:border-border",
|
|
36006
|
+
className
|
|
36007
|
+
),
|
|
36008
|
+
children
|
|
36009
|
+
}
|
|
36010
|
+
);
|
|
36011
|
+
};
|
|
36012
|
+
FormLayout.displayName = "FormLayout";
|
|
36013
|
+
FormActions = ({
|
|
36014
|
+
children,
|
|
36015
|
+
sticky = false,
|
|
36016
|
+
align = "right",
|
|
36017
|
+
className
|
|
36018
|
+
}) => {
|
|
36019
|
+
const alignClass2 = {
|
|
36020
|
+
left: "justify-start",
|
|
36021
|
+
right: "justify-end",
|
|
36022
|
+
between: "justify-between",
|
|
36023
|
+
center: "justify-center"
|
|
36024
|
+
}[align];
|
|
36025
|
+
return /* @__PURE__ */ jsx(
|
|
36026
|
+
HStack,
|
|
36027
|
+
{
|
|
36028
|
+
gap: "sm",
|
|
36029
|
+
align: "center",
|
|
36030
|
+
className: cn(
|
|
36031
|
+
"pt-6 border-t border-border",
|
|
36032
|
+
alignClass2,
|
|
36033
|
+
sticky && "sticky bottom-0 bg-card py-4 -mx-6 px-6 shadow-[0_-4px_6px_-1px_rgb(0,0,0,0.05)]",
|
|
36034
|
+
className
|
|
36035
|
+
),
|
|
36036
|
+
children
|
|
36037
|
+
}
|
|
36038
|
+
);
|
|
36039
|
+
};
|
|
36040
|
+
FormActions.displayName = "FormActions";
|
|
36041
|
+
}
|
|
36042
|
+
});
|
|
36043
|
+
function currentValue(decl, override) {
|
|
36044
|
+
return override !== void 0 ? override : decl.default;
|
|
36045
|
+
}
|
|
36046
|
+
function TextLikeControl({
|
|
36047
|
+
field,
|
|
36048
|
+
numeric,
|
|
36049
|
+
value,
|
|
36050
|
+
onCommit
|
|
36051
|
+
}) {
|
|
36052
|
+
const initial = value === void 0 || value === null ? "" : String(value);
|
|
36053
|
+
const [draft, setDraft] = React89__default.useState(initial);
|
|
36054
|
+
React89__default.useEffect(() => setDraft(initial), [initial]);
|
|
36055
|
+
const commit = () => {
|
|
36056
|
+
if (numeric) {
|
|
36057
|
+
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
36058
|
+
onCommit(field, Number.isNaN(n) ? 0 : n);
|
|
36059
|
+
} else {
|
|
36060
|
+
onCommit(field, draft);
|
|
36061
|
+
}
|
|
36062
|
+
};
|
|
36063
|
+
return /* @__PURE__ */ jsx(
|
|
36064
|
+
Input,
|
|
36065
|
+
{
|
|
36066
|
+
inputType: numeric ? "number" : "text",
|
|
36067
|
+
value: draft,
|
|
36068
|
+
onChange: (e) => setDraft(e.target.value),
|
|
36069
|
+
onBlur: commit,
|
|
36070
|
+
onKeyDown: (e) => {
|
|
36071
|
+
if (e.key === "Enter") commit();
|
|
36072
|
+
}
|
|
36073
|
+
}
|
|
36074
|
+
);
|
|
36075
|
+
}
|
|
36076
|
+
function FieldControl({
|
|
36077
|
+
name,
|
|
36078
|
+
decl,
|
|
36079
|
+
value,
|
|
36080
|
+
onChange,
|
|
36081
|
+
assets
|
|
36082
|
+
}) {
|
|
36083
|
+
let control;
|
|
36084
|
+
const stringValue = typeof value === "string" ? value : void 0;
|
|
36085
|
+
if (decl.type === "icon") {
|
|
36086
|
+
control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
|
|
36087
|
+
} else if (decl.type === "asset") {
|
|
36088
|
+
control = /* @__PURE__ */ jsx(
|
|
36089
|
+
AssetPicker,
|
|
36090
|
+
{
|
|
36091
|
+
assets: assets ?? [],
|
|
36092
|
+
value: stringValue,
|
|
36093
|
+
onChange: (url) => onChange(name, url)
|
|
36094
|
+
}
|
|
36095
|
+
);
|
|
36096
|
+
} else if (decl.type === "boolean") {
|
|
36097
|
+
control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
|
|
36098
|
+
} else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
|
|
36099
|
+
control = /* @__PURE__ */ jsx(
|
|
36100
|
+
Select,
|
|
36101
|
+
{
|
|
36102
|
+
options: decl.values.map((v) => ({ value: v, label: v })),
|
|
36103
|
+
value: typeof value === "string" ? value : "",
|
|
36104
|
+
onChange: (e) => onChange(name, e.target.value)
|
|
36105
|
+
}
|
|
36106
|
+
);
|
|
36107
|
+
} else if (decl.type === "number") {
|
|
36108
|
+
control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
|
|
36109
|
+
} else if (decl.type === "string") {
|
|
36110
|
+
control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
|
|
36111
|
+
} else {
|
|
36112
|
+
control = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
36113
|
+
decl.type,
|
|
36114
|
+
" \u2014 edit in source"
|
|
36115
|
+
] });
|
|
36116
|
+
}
|
|
36117
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
36118
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", children: decl.label ?? name }),
|
|
36119
|
+
control,
|
|
36120
|
+
decl.description !== void 0 && decl.description !== "" && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: decl.description })
|
|
36121
|
+
] });
|
|
36122
|
+
}
|
|
36123
|
+
var TIER_ORDER, PropertyInspector;
|
|
36124
|
+
var init_PropertyInspector = __esm({
|
|
36125
|
+
"components/core/molecules/PropertyInspector.tsx"() {
|
|
36126
|
+
"use client";
|
|
36127
|
+
init_cn();
|
|
36128
|
+
init_Stack();
|
|
36129
|
+
init_Typography();
|
|
36130
|
+
init_Button();
|
|
36131
|
+
init_Switch();
|
|
36132
|
+
init_Select();
|
|
36133
|
+
init_Input();
|
|
36134
|
+
init_FormSection();
|
|
36135
|
+
init_IconPicker();
|
|
36136
|
+
init_AssetPicker();
|
|
36137
|
+
TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
|
|
36138
|
+
PropertyInspector = ({
|
|
36139
|
+
config,
|
|
36140
|
+
values,
|
|
36141
|
+
onChange,
|
|
36142
|
+
onReset,
|
|
36143
|
+
title,
|
|
36144
|
+
className,
|
|
36145
|
+
assets
|
|
36146
|
+
}) => {
|
|
36147
|
+
const fields = Object.entries(config);
|
|
36148
|
+
const byTier = /* @__PURE__ */ new Map();
|
|
36149
|
+
for (const [name, decl] of fields) {
|
|
36150
|
+
const tier = decl.tier ?? "presentation";
|
|
36151
|
+
const arr = byTier.get(tier) ?? [];
|
|
36152
|
+
arr.push([name, decl]);
|
|
36153
|
+
byTier.set(tier, arr);
|
|
36154
|
+
}
|
|
36155
|
+
const tiers = [...byTier.keys()].sort((a, b) => {
|
|
36156
|
+
const ia = TIER_ORDER.indexOf(a);
|
|
36157
|
+
const ib = TIER_ORDER.indexOf(b);
|
|
36158
|
+
return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib);
|
|
36159
|
+
});
|
|
36160
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
|
|
36161
|
+
/* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
|
|
36162
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "bold", children: title ?? "Config" }),
|
|
36163
|
+
onReset !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", icon: "rotate-ccw", label: "Reset", onClick: onReset })
|
|
36164
|
+
] }),
|
|
36165
|
+
fields.length === 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "No configurable properties." }),
|
|
36166
|
+
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(
|
|
36167
|
+
FieldControl,
|
|
36168
|
+
{
|
|
36169
|
+
name,
|
|
36170
|
+
decl,
|
|
36171
|
+
value: currentValue(decl, values?.[name]),
|
|
36172
|
+
onChange,
|
|
36173
|
+
assets
|
|
36174
|
+
},
|
|
36175
|
+
name
|
|
36176
|
+
)) }) }, tier))
|
|
36177
|
+
] });
|
|
36178
|
+
};
|
|
36179
|
+
}
|
|
36180
|
+
});
|
|
35619
36181
|
var lookStyles8, Header;
|
|
35620
36182
|
var init_Header = __esm({
|
|
35621
36183
|
"components/core/molecules/Header.tsx"() {
|
|
@@ -36266,7 +36828,7 @@ var init_WizardContainer = __esm({
|
|
|
36266
36828
|
const isCompleted = index < currentStep;
|
|
36267
36829
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36268
36830
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36269
|
-
return /* @__PURE__ */ jsxs(
|
|
36831
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
36270
36832
|
/* @__PURE__ */ jsx(
|
|
36271
36833
|
Button,
|
|
36272
36834
|
{
|
|
@@ -38551,7 +39113,7 @@ var init_DetailPanel = __esm({
|
|
|
38551
39113
|
}
|
|
38552
39114
|
});
|
|
38553
39115
|
function extractTitle(children) {
|
|
38554
|
-
if (!
|
|
39116
|
+
if (!React89__default.isValidElement(children)) return void 0;
|
|
38555
39117
|
const props = children.props;
|
|
38556
39118
|
if (typeof props.title === "string") {
|
|
38557
39119
|
return props.title;
|
|
@@ -38606,7 +39168,7 @@ function LinearView({
|
|
|
38606
39168
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
38607
39169
|
const isDone = i < currentIdx;
|
|
38608
39170
|
const isCurrent = i === currentIdx;
|
|
38609
|
-
return /* @__PURE__ */ jsxs(
|
|
39171
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
38610
39172
|
i > 0 && /* @__PURE__ */ jsx(
|
|
38611
39173
|
Typography,
|
|
38612
39174
|
{
|
|
@@ -39316,7 +39878,7 @@ var init_FeatureDetailPageTemplate = __esm({
|
|
|
39316
39878
|
});
|
|
39317
39879
|
var FeatureGridOrganism;
|
|
39318
39880
|
var init_FeatureGridOrganism = __esm({
|
|
39319
|
-
"components/
|
|
39881
|
+
"components/marketing/organisms/FeatureGridOrganism.tsx"() {
|
|
39320
39882
|
"use client";
|
|
39321
39883
|
init_cn();
|
|
39322
39884
|
init_useEventBus();
|
|
@@ -39564,12 +40126,12 @@ var init_Form = __esm({
|
|
|
39564
40126
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
39565
40127
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
39566
40128
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
39567
|
-
const normalizedInitialData =
|
|
40129
|
+
const normalizedInitialData = React89__default.useMemo(() => {
|
|
39568
40130
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
39569
40131
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
39570
40132
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
39571
40133
|
}, [entity, initialData]);
|
|
39572
|
-
const entityDerivedFields =
|
|
40134
|
+
const entityDerivedFields = React89__default.useMemo(() => {
|
|
39573
40135
|
if (fields && fields.length > 0) return void 0;
|
|
39574
40136
|
if (!resolvedEntity) return void 0;
|
|
39575
40137
|
return resolvedEntity.fields.map(
|
|
@@ -39589,16 +40151,16 @@ var init_Form = __esm({
|
|
|
39589
40151
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
39590
40152
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
39591
40153
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
39592
|
-
const [formData, setFormData] =
|
|
40154
|
+
const [formData, setFormData] = React89__default.useState(
|
|
39593
40155
|
normalizedInitialData
|
|
39594
40156
|
);
|
|
39595
|
-
const [collapsedSections, setCollapsedSections] =
|
|
40157
|
+
const [collapsedSections, setCollapsedSections] = React89__default.useState(
|
|
39596
40158
|
/* @__PURE__ */ new Set()
|
|
39597
40159
|
);
|
|
39598
|
-
const [submitError, setSubmitError] =
|
|
39599
|
-
const formRef =
|
|
40160
|
+
const [submitError, setSubmitError] = React89__default.useState(null);
|
|
40161
|
+
const formRef = React89__default.useRef(null);
|
|
39600
40162
|
const formMode = props.mode;
|
|
39601
|
-
const mountedRef =
|
|
40163
|
+
const mountedRef = React89__default.useRef(false);
|
|
39602
40164
|
if (!mountedRef.current) {
|
|
39603
40165
|
mountedRef.current = true;
|
|
39604
40166
|
debug("forms", "mount", {
|
|
@@ -39611,7 +40173,7 @@ var init_Form = __esm({
|
|
|
39611
40173
|
});
|
|
39612
40174
|
}
|
|
39613
40175
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
39614
|
-
const evalContext =
|
|
40176
|
+
const evalContext = React89__default.useMemo(
|
|
39615
40177
|
() => ({
|
|
39616
40178
|
formValues: formData,
|
|
39617
40179
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -39620,7 +40182,7 @@ var init_Form = __esm({
|
|
|
39620
40182
|
}),
|
|
39621
40183
|
[formData, externalContext]
|
|
39622
40184
|
);
|
|
39623
|
-
|
|
40185
|
+
React89__default.useEffect(() => {
|
|
39624
40186
|
debug("forms", "initialData-sync", {
|
|
39625
40187
|
mode: formMode,
|
|
39626
40188
|
normalizedInitialData,
|
|
@@ -39631,7 +40193,7 @@ var init_Form = __esm({
|
|
|
39631
40193
|
setFormData(normalizedInitialData);
|
|
39632
40194
|
}
|
|
39633
40195
|
}, [normalizedInitialData]);
|
|
39634
|
-
const processCalculations =
|
|
40196
|
+
const processCalculations = React89__default.useCallback(
|
|
39635
40197
|
(changedFieldId, newFormData) => {
|
|
39636
40198
|
if (!hiddenCalculations.length) return;
|
|
39637
40199
|
const context = {
|
|
@@ -39656,7 +40218,7 @@ var init_Form = __esm({
|
|
|
39656
40218
|
},
|
|
39657
40219
|
[hiddenCalculations, externalContext, eventBus]
|
|
39658
40220
|
);
|
|
39659
|
-
const checkViolations =
|
|
40221
|
+
const checkViolations = React89__default.useCallback(
|
|
39660
40222
|
(changedFieldId, newFormData) => {
|
|
39661
40223
|
if (!violationTriggers.length) return;
|
|
39662
40224
|
const context = {
|
|
@@ -39694,7 +40256,7 @@ var init_Form = __esm({
|
|
|
39694
40256
|
processCalculations(name, newFormData);
|
|
39695
40257
|
checkViolations(name, newFormData);
|
|
39696
40258
|
};
|
|
39697
|
-
const isFieldVisible =
|
|
40259
|
+
const isFieldVisible = React89__default.useCallback(
|
|
39698
40260
|
(fieldName) => {
|
|
39699
40261
|
const condition = conditionalFields[fieldName];
|
|
39700
40262
|
if (!condition) return true;
|
|
@@ -39702,7 +40264,7 @@ var init_Form = __esm({
|
|
|
39702
40264
|
},
|
|
39703
40265
|
[conditionalFields, evalContext]
|
|
39704
40266
|
);
|
|
39705
|
-
const isSectionVisible =
|
|
40267
|
+
const isSectionVisible = React89__default.useCallback(
|
|
39706
40268
|
(section) => {
|
|
39707
40269
|
if (!section.condition) return true;
|
|
39708
40270
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -39778,7 +40340,7 @@ var init_Form = __esm({
|
|
|
39778
40340
|
eventBus.emit(`UI:${onCancel}`);
|
|
39779
40341
|
}
|
|
39780
40342
|
};
|
|
39781
|
-
const renderField =
|
|
40343
|
+
const renderField = React89__default.useCallback(
|
|
39782
40344
|
(field) => {
|
|
39783
40345
|
const fieldName = field.name || field.field;
|
|
39784
40346
|
if (!fieldName) return null;
|
|
@@ -39787,19 +40349,19 @@ var init_Form = __esm({
|
|
|
39787
40349
|
}
|
|
39788
40350
|
const inputType = determineInputType(field);
|
|
39789
40351
|
const label = field.label || fieldName.charAt(0).toUpperCase() + fieldName.slice(1).replace(/([A-Z])/g, " $1");
|
|
39790
|
-
const
|
|
40352
|
+
const currentValue2 = formData[fieldName] ?? field.defaultValue ?? "";
|
|
39791
40353
|
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", "data-field": fieldName, children: [
|
|
39792
40354
|
inputType !== "checkbox" && /* @__PURE__ */ jsxs(Typography, { as: "label", variant: "label", weight: "bold", children: [
|
|
39793
40355
|
label,
|
|
39794
40356
|
field.required && /* @__PURE__ */ jsx(Typography, { as: "span", color: "error", className: "ml-1", children: "*" })
|
|
39795
40357
|
] }),
|
|
39796
|
-
renderFieldInput(field, fieldName, inputType,
|
|
40358
|
+
renderFieldInput(field, fieldName, inputType, currentValue2, label)
|
|
39797
40359
|
] }, fieldName);
|
|
39798
40360
|
},
|
|
39799
40361
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
39800
40362
|
);
|
|
39801
40363
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
39802
|
-
const normalizedFields =
|
|
40364
|
+
const normalizedFields = React89__default.useMemo(() => {
|
|
39803
40365
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
39804
40366
|
return effectiveFields.map((field) => {
|
|
39805
40367
|
if (typeof field === "string") {
|
|
@@ -39822,7 +40384,7 @@ var init_Form = __esm({
|
|
|
39822
40384
|
return field;
|
|
39823
40385
|
});
|
|
39824
40386
|
}, [effectiveFields, resolvedEntity]);
|
|
39825
|
-
const schemaFields =
|
|
40387
|
+
const schemaFields = React89__default.useMemo(() => {
|
|
39826
40388
|
if (normalizedFields.length === 0) return null;
|
|
39827
40389
|
if (isDebugEnabled()) {
|
|
39828
40390
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -39832,7 +40394,7 @@ var init_Form = __esm({
|
|
|
39832
40394
|
}
|
|
39833
40395
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
39834
40396
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
39835
|
-
const sectionElements =
|
|
40397
|
+
const sectionElements = React89__default.useMemo(() => {
|
|
39836
40398
|
if (!sections || sections.length === 0) return null;
|
|
39837
40399
|
return sections.map((section) => {
|
|
39838
40400
|
if (!isSectionVisible(section)) {
|
|
@@ -39868,7 +40430,7 @@ var init_Form = __esm({
|
|
|
39868
40430
|
] }, section.id);
|
|
39869
40431
|
}).filter(Boolean);
|
|
39870
40432
|
}, [sections, isSectionVisible, collapsedSections, renderField, gap]);
|
|
39871
|
-
function renderFieldInput(field, fieldName, inputType,
|
|
40433
|
+
function renderFieldInput(field, fieldName, inputType, currentValue2, label) {
|
|
39872
40434
|
const commonProps = {
|
|
39873
40435
|
id: fieldName,
|
|
39874
40436
|
name: fieldName,
|
|
@@ -39885,7 +40447,7 @@ var init_Form = __esm({
|
|
|
39885
40447
|
{
|
|
39886
40448
|
...commonProps,
|
|
39887
40449
|
label: label + (field.required ? " *" : ""),
|
|
39888
|
-
checked: Boolean(
|
|
40450
|
+
checked: Boolean(currentValue2),
|
|
39889
40451
|
onChange: (e) => handleChange(fieldName, e.target.checked)
|
|
39890
40452
|
}
|
|
39891
40453
|
);
|
|
@@ -39894,7 +40456,7 @@ var init_Form = __esm({
|
|
|
39894
40456
|
Textarea,
|
|
39895
40457
|
{
|
|
39896
40458
|
...commonProps,
|
|
39897
|
-
value: String(
|
|
40459
|
+
value: String(currentValue2),
|
|
39898
40460
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
39899
40461
|
minLength: field.min,
|
|
39900
40462
|
maxLength: field.max
|
|
@@ -39907,7 +40469,7 @@ var init_Form = __esm({
|
|
|
39907
40469
|
{
|
|
39908
40470
|
...commonProps,
|
|
39909
40471
|
options,
|
|
39910
|
-
value: String(
|
|
40472
|
+
value: String(currentValue2),
|
|
39911
40473
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
39912
40474
|
placeholder: field.placeholder || `Select ${label}...`
|
|
39913
40475
|
}
|
|
@@ -39920,7 +40482,7 @@ var init_Form = __esm({
|
|
|
39920
40482
|
RelationSelect,
|
|
39921
40483
|
{
|
|
39922
40484
|
...commonProps,
|
|
39923
|
-
value:
|
|
40485
|
+
value: currentValue2 ? String(currentValue2) : void 0,
|
|
39924
40486
|
onChange: (value) => handleChange(fieldName, value),
|
|
39925
40487
|
options: relationOptions,
|
|
39926
40488
|
isLoading: relationLoading,
|
|
@@ -39936,7 +40498,7 @@ var init_Form = __esm({
|
|
|
39936
40498
|
{
|
|
39937
40499
|
...commonProps,
|
|
39938
40500
|
type: "number",
|
|
39939
|
-
value:
|
|
40501
|
+
value: currentValue2 !== void 0 && currentValue2 !== "" ? String(currentValue2) : "",
|
|
39940
40502
|
onChange: (e) => handleChange(
|
|
39941
40503
|
fieldName,
|
|
39942
40504
|
e.target.value ? Number(e.target.value) : void 0
|
|
@@ -39951,7 +40513,7 @@ var init_Form = __esm({
|
|
|
39951
40513
|
{
|
|
39952
40514
|
...commonProps,
|
|
39953
40515
|
type: "date",
|
|
39954
|
-
value: formatDateValue(
|
|
40516
|
+
value: formatDateValue(currentValue2),
|
|
39955
40517
|
onChange: (e) => handleChange(fieldName, e.target.value)
|
|
39956
40518
|
}
|
|
39957
40519
|
);
|
|
@@ -39961,7 +40523,7 @@ var init_Form = __esm({
|
|
|
39961
40523
|
{
|
|
39962
40524
|
...commonProps,
|
|
39963
40525
|
type: "datetime-local",
|
|
39964
|
-
value: formatDateTimeValue(
|
|
40526
|
+
value: formatDateTimeValue(currentValue2),
|
|
39965
40527
|
onChange: (e) => handleChange(fieldName, e.target.value)
|
|
39966
40528
|
}
|
|
39967
40529
|
);
|
|
@@ -39971,7 +40533,7 @@ var init_Form = __esm({
|
|
|
39971
40533
|
{
|
|
39972
40534
|
...commonProps,
|
|
39973
40535
|
type: "email",
|
|
39974
|
-
value: String(
|
|
40536
|
+
value: String(currentValue2),
|
|
39975
40537
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
39976
40538
|
minLength: field.min,
|
|
39977
40539
|
maxLength: field.max
|
|
@@ -39983,7 +40545,7 @@ var init_Form = __esm({
|
|
|
39983
40545
|
{
|
|
39984
40546
|
...commonProps,
|
|
39985
40547
|
type: "url",
|
|
39986
|
-
value: String(
|
|
40548
|
+
value: String(currentValue2),
|
|
39987
40549
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
39988
40550
|
minLength: field.min,
|
|
39989
40551
|
maxLength: field.max
|
|
@@ -39995,7 +40557,7 @@ var init_Form = __esm({
|
|
|
39995
40557
|
{
|
|
39996
40558
|
...commonProps,
|
|
39997
40559
|
type: "password",
|
|
39998
|
-
value: String(
|
|
40560
|
+
value: String(currentValue2),
|
|
39999
40561
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40000
40562
|
minLength: field.min,
|
|
40001
40563
|
maxLength: field.max
|
|
@@ -40008,7 +40570,7 @@ var init_Form = __esm({
|
|
|
40008
40570
|
{
|
|
40009
40571
|
...commonProps,
|
|
40010
40572
|
type: "text",
|
|
40011
|
-
value: String(
|
|
40573
|
+
value: String(currentValue2),
|
|
40012
40574
|
onChange: (e) => handleChange(fieldName, e.target.value),
|
|
40013
40575
|
minLength: field.min,
|
|
40014
40576
|
maxLength: field.max
|
|
@@ -40663,7 +41225,7 @@ var init_GenericAppTemplate = __esm({
|
|
|
40663
41225
|
});
|
|
40664
41226
|
var HeroOrganism, _HeroClickInterceptor;
|
|
40665
41227
|
var init_HeroOrganism = __esm({
|
|
40666
|
-
"components/
|
|
41228
|
+
"components/marketing/organisms/HeroOrganism.tsx"() {
|
|
40667
41229
|
"use client";
|
|
40668
41230
|
init_cn();
|
|
40669
41231
|
init_useEventBus();
|
|
@@ -41107,7 +41669,7 @@ var init_List = __esm({
|
|
|
41107
41669
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
41108
41670
|
return [];
|
|
41109
41671
|
}, [entity]);
|
|
41110
|
-
const getItemActions =
|
|
41672
|
+
const getItemActions = React89__default.useCallback(
|
|
41111
41673
|
(item) => {
|
|
41112
41674
|
if (!itemActions) return [];
|
|
41113
41675
|
if (typeof itemActions === "function") {
|
|
@@ -41583,7 +42145,7 @@ var init_MediaGallery = __esm({
|
|
|
41583
42145
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
41584
42146
|
);
|
|
41585
42147
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
41586
|
-
const items =
|
|
42148
|
+
const items = React89__default.useMemo(() => {
|
|
41587
42149
|
if (propItems) return propItems;
|
|
41588
42150
|
if (entityData.length === 0) return [];
|
|
41589
42151
|
return entityData.map((record, idx) => ({
|
|
@@ -41744,7 +42306,7 @@ var init_MediaGallery = __esm({
|
|
|
41744
42306
|
}
|
|
41745
42307
|
});
|
|
41746
42308
|
function extractTitle2(children) {
|
|
41747
|
-
if (!
|
|
42309
|
+
if (!React89__default.isValidElement(children)) return void 0;
|
|
41748
42310
|
const props = children.props;
|
|
41749
42311
|
if (typeof props.title === "string") {
|
|
41750
42312
|
return props.title;
|
|
@@ -42156,7 +42718,7 @@ var init_debugRegistry = __esm({
|
|
|
42156
42718
|
}
|
|
42157
42719
|
});
|
|
42158
42720
|
function useDebugData() {
|
|
42159
|
-
const [data, setData] =
|
|
42721
|
+
const [data, setData] = React89.useState(() => ({
|
|
42160
42722
|
traits: [],
|
|
42161
42723
|
ticks: [],
|
|
42162
42724
|
guards: [],
|
|
@@ -42170,7 +42732,7 @@ function useDebugData() {
|
|
|
42170
42732
|
},
|
|
42171
42733
|
lastUpdate: Date.now()
|
|
42172
42734
|
}));
|
|
42173
|
-
|
|
42735
|
+
React89.useEffect(() => {
|
|
42174
42736
|
const updateData = () => {
|
|
42175
42737
|
setData({
|
|
42176
42738
|
traits: getAllTraits(),
|
|
@@ -42279,12 +42841,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42279
42841
|
return positions;
|
|
42280
42842
|
}
|
|
42281
42843
|
function WalkMinimap() {
|
|
42282
|
-
const [walkStep, setWalkStep] =
|
|
42283
|
-
const [traits2, setTraits] =
|
|
42284
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42285
|
-
const [completedTraits, setCompletedTraits] =
|
|
42286
|
-
const prevTraitRef =
|
|
42287
|
-
|
|
42844
|
+
const [walkStep, setWalkStep] = React89.useState(null);
|
|
42845
|
+
const [traits2, setTraits] = React89.useState([]);
|
|
42846
|
+
const [coveredEdges, setCoveredEdges] = React89.useState([]);
|
|
42847
|
+
const [completedTraits, setCompletedTraits] = React89.useState(/* @__PURE__ */ new Set());
|
|
42848
|
+
const prevTraitRef = React89.useRef(null);
|
|
42849
|
+
React89.useEffect(() => {
|
|
42288
42850
|
const interval = setInterval(() => {
|
|
42289
42851
|
const w = window;
|
|
42290
42852
|
const step = w.__orbitalWalkStep;
|
|
@@ -42720,15 +43282,15 @@ var init_EntitiesTab = __esm({
|
|
|
42720
43282
|
});
|
|
42721
43283
|
function EventFlowTab({ events: events2 }) {
|
|
42722
43284
|
const { t } = useTranslate();
|
|
42723
|
-
const [filter, setFilter] =
|
|
42724
|
-
const containerRef =
|
|
42725
|
-
const [autoScroll, setAutoScroll] =
|
|
42726
|
-
|
|
43285
|
+
const [filter, setFilter] = React89.useState("all");
|
|
43286
|
+
const containerRef = React89.useRef(null);
|
|
43287
|
+
const [autoScroll, setAutoScroll] = React89.useState(true);
|
|
43288
|
+
React89.useEffect(() => {
|
|
42727
43289
|
if (autoScroll && containerRef.current) {
|
|
42728
43290
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
42729
43291
|
}
|
|
42730
43292
|
}, [events2.length, autoScroll]);
|
|
42731
|
-
const filteredEvents =
|
|
43293
|
+
const filteredEvents = React89.useMemo(() => {
|
|
42732
43294
|
if (filter === "all") return events2;
|
|
42733
43295
|
return events2.filter((e) => e.type === filter);
|
|
42734
43296
|
}, [events2, filter]);
|
|
@@ -42844,7 +43406,7 @@ var init_EventFlowTab = __esm({
|
|
|
42844
43406
|
});
|
|
42845
43407
|
function GuardsPanel({ guards }) {
|
|
42846
43408
|
const { t } = useTranslate();
|
|
42847
|
-
const [filter, setFilter] =
|
|
43409
|
+
const [filter, setFilter] = React89.useState("all");
|
|
42848
43410
|
if (guards.length === 0) {
|
|
42849
43411
|
return /* @__PURE__ */ jsx(
|
|
42850
43412
|
EmptyState,
|
|
@@ -42857,7 +43419,7 @@ function GuardsPanel({ guards }) {
|
|
|
42857
43419
|
}
|
|
42858
43420
|
const passedCount = guards.filter((g) => g.result).length;
|
|
42859
43421
|
const failedCount = guards.length - passedCount;
|
|
42860
|
-
const filteredGuards =
|
|
43422
|
+
const filteredGuards = React89.useMemo(() => {
|
|
42861
43423
|
if (filter === "all") return guards;
|
|
42862
43424
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
42863
43425
|
return guards.filter((g) => !g.result);
|
|
@@ -43020,10 +43582,10 @@ function EffectBadge({ effect }) {
|
|
|
43020
43582
|
}
|
|
43021
43583
|
function TransitionTimeline({ transitions }) {
|
|
43022
43584
|
const { t } = useTranslate();
|
|
43023
|
-
const containerRef =
|
|
43024
|
-
const [autoScroll, setAutoScroll] =
|
|
43025
|
-
const [expandedId, setExpandedId] =
|
|
43026
|
-
|
|
43585
|
+
const containerRef = React89.useRef(null);
|
|
43586
|
+
const [autoScroll, setAutoScroll] = React89.useState(true);
|
|
43587
|
+
const [expandedId, setExpandedId] = React89.useState(null);
|
|
43588
|
+
React89.useEffect(() => {
|
|
43027
43589
|
if (autoScroll && containerRef.current) {
|
|
43028
43590
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43029
43591
|
}
|
|
@@ -43303,9 +43865,9 @@ function getAllEvents(traits2) {
|
|
|
43303
43865
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43304
43866
|
const eventBus = useEventBus();
|
|
43305
43867
|
const { t } = useTranslate();
|
|
43306
|
-
const [log12, setLog] =
|
|
43307
|
-
const prevStatesRef =
|
|
43308
|
-
|
|
43868
|
+
const [log12, setLog] = React89.useState([]);
|
|
43869
|
+
const prevStatesRef = React89.useRef(/* @__PURE__ */ new Map());
|
|
43870
|
+
React89.useEffect(() => {
|
|
43309
43871
|
for (const trait of traits2) {
|
|
43310
43872
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43311
43873
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43474,10 +44036,10 @@ function VerifyModePanel({
|
|
|
43474
44036
|
localCount
|
|
43475
44037
|
}) {
|
|
43476
44038
|
const { t } = useTranslate();
|
|
43477
|
-
const [expanded, setExpanded] =
|
|
43478
|
-
const scrollRef =
|
|
43479
|
-
const prevCountRef =
|
|
43480
|
-
|
|
44039
|
+
const [expanded, setExpanded] = React89.useState(true);
|
|
44040
|
+
const scrollRef = React89.useRef(null);
|
|
44041
|
+
const prevCountRef = React89.useRef(0);
|
|
44042
|
+
React89.useEffect(() => {
|
|
43481
44043
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43482
44044
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43483
44045
|
}
|
|
@@ -43534,10 +44096,10 @@ function RuntimeDebugger({
|
|
|
43534
44096
|
schema
|
|
43535
44097
|
}) {
|
|
43536
44098
|
const { t } = useTranslate();
|
|
43537
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43538
|
-
const [isVisible, setIsVisible] =
|
|
44099
|
+
const [isCollapsed, setIsCollapsed] = React89.useState(mode === "verify" ? true : defaultCollapsed);
|
|
44100
|
+
const [isVisible, setIsVisible] = React89.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43539
44101
|
const debugData = useDebugData();
|
|
43540
|
-
|
|
44102
|
+
React89.useEffect(() => {
|
|
43541
44103
|
if (mode === "inline") return;
|
|
43542
44104
|
return onDebugToggle((enabled) => {
|
|
43543
44105
|
setIsVisible(enabled);
|
|
@@ -43546,7 +44108,7 @@ function RuntimeDebugger({
|
|
|
43546
44108
|
}
|
|
43547
44109
|
});
|
|
43548
44110
|
}, [mode]);
|
|
43549
|
-
|
|
44111
|
+
React89.useEffect(() => {
|
|
43550
44112
|
if (mode === "inline") return;
|
|
43551
44113
|
const handleKeyDown = (e) => {
|
|
43552
44114
|
if (e.key === "`" && isVisible) {
|
|
@@ -43995,7 +44557,7 @@ function SequenceBar({
|
|
|
43995
44557
|
onSlotRemove(index);
|
|
43996
44558
|
}, [onSlotRemove, playing]);
|
|
43997
44559
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
43998
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
44560
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
43999
44561
|
i > 0 && /* @__PURE__ */ jsx(
|
|
44000
44562
|
Typography,
|
|
44001
44563
|
{
|
|
@@ -44271,7 +44833,7 @@ var init_SequencerBoard = __esm({
|
|
|
44271
44833
|
});
|
|
44272
44834
|
var ShowcaseOrganism;
|
|
44273
44835
|
var init_ShowcaseOrganism = __esm({
|
|
44274
|
-
"components/
|
|
44836
|
+
"components/marketing/organisms/ShowcaseOrganism.tsx"() {
|
|
44275
44837
|
"use client";
|
|
44276
44838
|
init_cn();
|
|
44277
44839
|
init_useEventBus();
|
|
@@ -44953,7 +45515,7 @@ var init_StatCard = __esm({
|
|
|
44953
45515
|
title: propTitle,
|
|
44954
45516
|
value: propValue,
|
|
44955
45517
|
previousValue,
|
|
44956
|
-
currentValue,
|
|
45518
|
+
currentValue: currentValue2,
|
|
44957
45519
|
trend: manualTrend,
|
|
44958
45520
|
trendDirection: manualDirection,
|
|
44959
45521
|
invertTrend = false,
|
|
@@ -44974,7 +45536,7 @@ var init_StatCard = __esm({
|
|
|
44974
45536
|
const labelToUse = propLabel ?? propTitle;
|
|
44975
45537
|
const eventBus = useEventBus();
|
|
44976
45538
|
const { t } = useTranslate();
|
|
44977
|
-
const handleActionClick =
|
|
45539
|
+
const handleActionClick = React89__default.useCallback(() => {
|
|
44978
45540
|
if (action?.event) {
|
|
44979
45541
|
eventBus.emit(`UI:${action.event}`, {});
|
|
44980
45542
|
}
|
|
@@ -44985,7 +45547,7 @@ var init_StatCard = __esm({
|
|
|
44985
45547
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
44986
45548
|
const isLoading = externalLoading ?? false;
|
|
44987
45549
|
const error = externalError;
|
|
44988
|
-
const computeMetricValue =
|
|
45550
|
+
const computeMetricValue = React89__default.useCallback(
|
|
44989
45551
|
(metric, items) => {
|
|
44990
45552
|
if (metric.value !== void 0) {
|
|
44991
45553
|
return metric.value;
|
|
@@ -45024,7 +45586,7 @@ var init_StatCard = __esm({
|
|
|
45024
45586
|
},
|
|
45025
45587
|
[]
|
|
45026
45588
|
);
|
|
45027
|
-
const schemaStats =
|
|
45589
|
+
const schemaStats = React89__default.useMemo(() => {
|
|
45028
45590
|
if (!metrics || metrics.length === 0) return null;
|
|
45029
45591
|
return metrics.map((metric) => ({
|
|
45030
45592
|
label: metric.label,
|
|
@@ -45032,13 +45594,13 @@ var init_StatCard = __esm({
|
|
|
45032
45594
|
format: metric.format
|
|
45033
45595
|
}));
|
|
45034
45596
|
}, [metrics, data, computeMetricValue]);
|
|
45035
|
-
const calculatedTrend =
|
|
45597
|
+
const calculatedTrend = React89__default.useMemo(() => {
|
|
45036
45598
|
if (manualTrend !== void 0) return manualTrend;
|
|
45037
|
-
if (previousValue === void 0 ||
|
|
45599
|
+
if (previousValue === void 0 || currentValue2 === void 0)
|
|
45038
45600
|
return void 0;
|
|
45039
|
-
if (previousValue === 0) return
|
|
45040
|
-
return (
|
|
45041
|
-
}, [manualTrend, previousValue,
|
|
45601
|
+
if (previousValue === 0) return currentValue2 > 0 ? 100 : 0;
|
|
45602
|
+
return (currentValue2 - previousValue) / previousValue * 100;
|
|
45603
|
+
}, [manualTrend, previousValue, currentValue2]);
|
|
45042
45604
|
if (schemaStats && schemaStats.length > 1) {
|
|
45043
45605
|
if (isLoading) {
|
|
45044
45606
|
return /* @__PURE__ */ jsx(
|
|
@@ -45696,7 +46258,7 @@ var init_StatsOrganism = __esm({
|
|
|
45696
46258
|
});
|
|
45697
46259
|
var StepFlowOrganism;
|
|
45698
46260
|
var init_StepFlowOrganism = __esm({
|
|
45699
|
-
"components/
|
|
46261
|
+
"components/marketing/organisms/StepFlowOrganism.tsx"() {
|
|
45700
46262
|
"use client";
|
|
45701
46263
|
init_cn();
|
|
45702
46264
|
init_Stack();
|
|
@@ -45966,7 +46528,7 @@ var init_Timeline = __esm({
|
|
|
45966
46528
|
}) => {
|
|
45967
46529
|
const { t } = useTranslate();
|
|
45968
46530
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45969
|
-
const items =
|
|
46531
|
+
const items = React89__default.useMemo(() => {
|
|
45970
46532
|
if (propItems) return propItems;
|
|
45971
46533
|
if (entityData.length === 0) return [];
|
|
45972
46534
|
return entityData.map((record, idx) => {
|
|
@@ -46073,7 +46635,7 @@ var init_Timeline = __esm({
|
|
|
46073
46635
|
}
|
|
46074
46636
|
});
|
|
46075
46637
|
function extractToastProps(children) {
|
|
46076
|
-
if (!
|
|
46638
|
+
if (!React89__default.isValidElement(children)) {
|
|
46077
46639
|
if (typeof children === "string") {
|
|
46078
46640
|
return { message: children };
|
|
46079
46641
|
}
|
|
@@ -46111,7 +46673,7 @@ var init_ToastSlot = __esm({
|
|
|
46111
46673
|
eventBus.emit("UI:CLOSE");
|
|
46112
46674
|
};
|
|
46113
46675
|
if (!isVisible) return null;
|
|
46114
|
-
const isCustomContent =
|
|
46676
|
+
const isCustomContent = React89__default.isValidElement(children) && !message;
|
|
46115
46677
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
46116
46678
|
Toast,
|
|
46117
46679
|
{
|
|
@@ -46621,12 +47183,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
46621
47183
|
}
|
|
46622
47184
|
});
|
|
46623
47185
|
function lazyThree(name, loader) {
|
|
46624
|
-
const Lazy =
|
|
47186
|
+
const Lazy = React89__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
46625
47187
|
function ThreeWrapper(props) {
|
|
46626
|
-
return
|
|
46627
|
-
|
|
47188
|
+
return React89__default.createElement(
|
|
47189
|
+
React89__default.Suspense,
|
|
46628
47190
|
{ fallback: null },
|
|
46629
|
-
|
|
47191
|
+
React89__default.createElement(Lazy, props)
|
|
46630
47192
|
);
|
|
46631
47193
|
}
|
|
46632
47194
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -46646,6 +47208,7 @@ var init_component_registry_generated = __esm({
|
|
|
46646
47208
|
init_AnimatedReveal();
|
|
46647
47209
|
init_ArticleSection();
|
|
46648
47210
|
init_Aside();
|
|
47211
|
+
init_AssetPicker();
|
|
46649
47212
|
init_AuthLayout();
|
|
46650
47213
|
init_BattleBoard();
|
|
46651
47214
|
init_BattleTemplate();
|
|
@@ -46745,11 +47308,13 @@ var init_component_registry_generated = __esm({
|
|
|
46745
47308
|
init_GradientDivider();
|
|
46746
47309
|
init_GraphCanvas();
|
|
46747
47310
|
init_GraphView();
|
|
47311
|
+
init_GridPicker();
|
|
46748
47312
|
init_Header();
|
|
46749
47313
|
init_HealthBar();
|
|
46750
47314
|
init_HealthPanel();
|
|
46751
47315
|
init_HeroOrganism();
|
|
46752
47316
|
init_HeroSection();
|
|
47317
|
+
init_IconPicker();
|
|
46753
47318
|
init_InfiniteScrollSentinel();
|
|
46754
47319
|
init_InputGroup();
|
|
46755
47320
|
init_InstallBox();
|
|
@@ -46794,6 +47359,7 @@ var init_component_registry_generated = __esm({
|
|
|
46794
47359
|
init_PricingOrganism();
|
|
46795
47360
|
init_PricingPageTemplate();
|
|
46796
47361
|
init_ProgressDots();
|
|
47362
|
+
init_PropertyInspector();
|
|
46797
47363
|
init_PullQuote();
|
|
46798
47364
|
init_PullToRefresh();
|
|
46799
47365
|
init_QrScanner();
|
|
@@ -46917,6 +47483,7 @@ var init_component_registry_generated = __esm({
|
|
|
46917
47483
|
"AnimatedReveal": AnimatedReveal,
|
|
46918
47484
|
"ArticleSection": ArticleSection,
|
|
46919
47485
|
"Aside": Aside,
|
|
47486
|
+
"AssetPicker": AssetPicker,
|
|
46920
47487
|
"AuthLayout": AuthLayout,
|
|
46921
47488
|
"Avatar": AvatarPattern,
|
|
46922
47489
|
"AvatarPattern": AvatarPattern,
|
|
@@ -47036,6 +47603,7 @@ var init_component_registry_generated = __esm({
|
|
|
47036
47603
|
"GraphView": GraphView,
|
|
47037
47604
|
"Grid": GridPattern,
|
|
47038
47605
|
"GridPattern": GridPattern,
|
|
47606
|
+
"GridPicker": GridPicker,
|
|
47039
47607
|
"HStack": HStackPattern,
|
|
47040
47608
|
"HStackPattern": HStackPattern,
|
|
47041
47609
|
"Header": Header,
|
|
@@ -47045,6 +47613,7 @@ var init_component_registry_generated = __esm({
|
|
|
47045
47613
|
"HeroSection": HeroSection,
|
|
47046
47614
|
"Icon": IconPattern,
|
|
47047
47615
|
"IconPattern": IconPattern,
|
|
47616
|
+
"IconPicker": IconPicker,
|
|
47048
47617
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
47049
47618
|
"Input": InputPattern,
|
|
47050
47619
|
"InputGroup": InputGroup,
|
|
@@ -47101,6 +47670,7 @@ var init_component_registry_generated = __esm({
|
|
|
47101
47670
|
"ProgressBar": ProgressBarPattern,
|
|
47102
47671
|
"ProgressBarPattern": ProgressBarPattern,
|
|
47103
47672
|
"ProgressDots": ProgressDots,
|
|
47673
|
+
"PropertyInspector": PropertyInspector,
|
|
47104
47674
|
"PullQuote": PullQuote,
|
|
47105
47675
|
"PullToRefresh": PullToRefresh,
|
|
47106
47676
|
"QrScanner": QrScanner,
|
|
@@ -47242,7 +47812,7 @@ function SuspenseConfigProvider({
|
|
|
47242
47812
|
config,
|
|
47243
47813
|
children
|
|
47244
47814
|
}) {
|
|
47245
|
-
return
|
|
47815
|
+
return React89__default.createElement(
|
|
47246
47816
|
SuspenseConfigContext.Provider,
|
|
47247
47817
|
{ value: config },
|
|
47248
47818
|
children
|
|
@@ -47732,7 +48302,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47732
48302
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
47733
48303
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
47734
48304
|
}
|
|
47735
|
-
return /* @__PURE__ */ jsx(
|
|
48305
|
+
return /* @__PURE__ */ jsx(React89__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
47736
48306
|
}
|
|
47737
48307
|
if (!child || typeof child !== "object") return null;
|
|
47738
48308
|
const childId = `${parentId}-${index}`;
|
|
@@ -47772,14 +48342,14 @@ function isPatternConfig(value) {
|
|
|
47772
48342
|
if (value === null || value === void 0) return false;
|
|
47773
48343
|
if (typeof value !== "object") return false;
|
|
47774
48344
|
if (Array.isArray(value)) return false;
|
|
47775
|
-
if (
|
|
48345
|
+
if (React89__default.isValidElement(value)) return false;
|
|
47776
48346
|
if (value instanceof Date) return false;
|
|
47777
48347
|
if (typeof value === "function") return false;
|
|
47778
48348
|
const record = value;
|
|
47779
48349
|
return "type" in record && typeof record.type === "string";
|
|
47780
48350
|
}
|
|
47781
48351
|
function isPlainConfigObject(value) {
|
|
47782
|
-
if (
|
|
48352
|
+
if (React89__default.isValidElement(value)) return false;
|
|
47783
48353
|
if (value instanceof Date) return false;
|
|
47784
48354
|
const proto = Object.getPrototypeOf(value);
|
|
47785
48355
|
return proto === Object.prototype || proto === null;
|