@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/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React83 from 'react';
|
|
3
|
+
import React83__default, { useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, lazy, createContext, useLayoutEffect, useId, useSyncExternalStore } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
@@ -211,7 +211,7 @@ var init_SvgFlow = __esm({
|
|
|
211
211
|
opacity = 1,
|
|
212
212
|
className
|
|
213
213
|
}) => {
|
|
214
|
-
const markerId =
|
|
214
|
+
const markerId = React83__default.useMemo(() => {
|
|
215
215
|
flowIdCounter += 1;
|
|
216
216
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
217
217
|
}, []);
|
|
@@ -754,7 +754,7 @@ var init_SvgRing = __esm({
|
|
|
754
754
|
className,
|
|
755
755
|
label
|
|
756
756
|
}) => {
|
|
757
|
-
const gradientId =
|
|
757
|
+
const gradientId = React83__default.useMemo(() => {
|
|
758
758
|
ringIdCounter += 1;
|
|
759
759
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
760
760
|
}, []);
|
|
@@ -1836,7 +1836,7 @@ var init_Icon = __esm({
|
|
|
1836
1836
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1837
1837
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1838
1838
|
const family = useIconFamily();
|
|
1839
|
-
const RenderedComponent =
|
|
1839
|
+
const RenderedComponent = React83__default.useMemo(() => {
|
|
1840
1840
|
if (directIcon) return null;
|
|
1841
1841
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1842
1842
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1894,7 +1894,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1894
1894
|
const IconComp = value;
|
|
1895
1895
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1896
1896
|
}
|
|
1897
|
-
if (
|
|
1897
|
+
if (React83__default.isValidElement(value)) {
|
|
1898
1898
|
return value;
|
|
1899
1899
|
}
|
|
1900
1900
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1970,7 +1970,7 @@ var init_Button = __esm({
|
|
|
1970
1970
|
md: "h-icon-default w-icon-default",
|
|
1971
1971
|
lg: "h-icon-default w-icon-default"
|
|
1972
1972
|
};
|
|
1973
|
-
Button =
|
|
1973
|
+
Button = React83__default.forwardRef(
|
|
1974
1974
|
({
|
|
1975
1975
|
className,
|
|
1976
1976
|
variant = "primary",
|
|
@@ -2036,7 +2036,7 @@ var init_Input = __esm({
|
|
|
2036
2036
|
"components/core/atoms/Input.tsx"() {
|
|
2037
2037
|
init_cn();
|
|
2038
2038
|
init_Icon();
|
|
2039
|
-
Input =
|
|
2039
|
+
Input = React83__default.forwardRef(
|
|
2040
2040
|
({
|
|
2041
2041
|
className,
|
|
2042
2042
|
inputType,
|
|
@@ -2157,7 +2157,7 @@ var Label;
|
|
|
2157
2157
|
var init_Label = __esm({
|
|
2158
2158
|
"components/core/atoms/Label.tsx"() {
|
|
2159
2159
|
init_cn();
|
|
2160
|
-
Label =
|
|
2160
|
+
Label = React83__default.forwardRef(
|
|
2161
2161
|
({ className, required, children, ...props }, ref) => {
|
|
2162
2162
|
return /* @__PURE__ */ jsxs(
|
|
2163
2163
|
"label",
|
|
@@ -2183,7 +2183,7 @@ var Textarea;
|
|
|
2183
2183
|
var init_Textarea = __esm({
|
|
2184
2184
|
"components/core/atoms/Textarea.tsx"() {
|
|
2185
2185
|
init_cn();
|
|
2186
|
-
Textarea =
|
|
2186
|
+
Textarea = React83__default.forwardRef(
|
|
2187
2187
|
({ className, error, ...props }, ref) => {
|
|
2188
2188
|
return /* @__PURE__ */ jsx(
|
|
2189
2189
|
"textarea",
|
|
@@ -2213,7 +2213,7 @@ var init_Select = __esm({
|
|
|
2213
2213
|
"components/core/atoms/Select.tsx"() {
|
|
2214
2214
|
init_cn();
|
|
2215
2215
|
init_Icon();
|
|
2216
|
-
Select =
|
|
2216
|
+
Select = React83__default.forwardRef(
|
|
2217
2217
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
2218
2218
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2219
2219
|
/* @__PURE__ */ jsxs(
|
|
@@ -2255,7 +2255,7 @@ var Checkbox;
|
|
|
2255
2255
|
var init_Checkbox = __esm({
|
|
2256
2256
|
"components/core/atoms/Checkbox.tsx"() {
|
|
2257
2257
|
init_cn();
|
|
2258
|
-
Checkbox =
|
|
2258
|
+
Checkbox = React83__default.forwardRef(
|
|
2259
2259
|
({ className, label, id, ...props }, ref) => {
|
|
2260
2260
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2261
2261
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2346,7 +2346,7 @@ var init_Card = __esm({
|
|
|
2346
2346
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
2347
2347
|
"tile-image-first": "p-0 overflow-hidden"
|
|
2348
2348
|
};
|
|
2349
|
-
Card =
|
|
2349
|
+
Card = React83__default.forwardRef(
|
|
2350
2350
|
({
|
|
2351
2351
|
className,
|
|
2352
2352
|
variant = "bordered",
|
|
@@ -2384,9 +2384,9 @@ var init_Card = __esm({
|
|
|
2384
2384
|
}
|
|
2385
2385
|
);
|
|
2386
2386
|
Card.displayName = "Card";
|
|
2387
|
-
CardHeader =
|
|
2387
|
+
CardHeader = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2388
2388
|
CardHeader.displayName = "CardHeader";
|
|
2389
|
-
CardTitle =
|
|
2389
|
+
CardTitle = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2390
2390
|
"h3",
|
|
2391
2391
|
{
|
|
2392
2392
|
ref,
|
|
@@ -2399,11 +2399,11 @@ var init_Card = __esm({
|
|
|
2399
2399
|
}
|
|
2400
2400
|
));
|
|
2401
2401
|
CardTitle.displayName = "CardTitle";
|
|
2402
|
-
CardContent =
|
|
2402
|
+
CardContent = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2403
2403
|
CardContent.displayName = "CardContent";
|
|
2404
2404
|
CardBody = CardContent;
|
|
2405
2405
|
CardBody.displayName = "CardBody";
|
|
2406
|
-
CardFooter =
|
|
2406
|
+
CardFooter = React83__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2407
2407
|
"div",
|
|
2408
2408
|
{
|
|
2409
2409
|
ref,
|
|
@@ -2456,7 +2456,7 @@ var init_Badge = __esm({
|
|
|
2456
2456
|
md: "px-2.5 py-1 text-sm",
|
|
2457
2457
|
lg: "px-3 py-1.5 text-base"
|
|
2458
2458
|
};
|
|
2459
|
-
Badge =
|
|
2459
|
+
Badge = React83__default.forwardRef(
|
|
2460
2460
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2461
2461
|
const iconSizes3 = {
|
|
2462
2462
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2549,7 +2549,7 @@ var init_FilterPill = __esm({
|
|
|
2549
2549
|
md: "w-3.5 h-3.5",
|
|
2550
2550
|
lg: "w-4 h-4"
|
|
2551
2551
|
};
|
|
2552
|
-
FilterPill =
|
|
2552
|
+
FilterPill = React83__default.forwardRef(
|
|
2553
2553
|
({
|
|
2554
2554
|
className,
|
|
2555
2555
|
variant = "default",
|
|
@@ -2626,7 +2626,7 @@ var init_Spinner = __esm({
|
|
|
2626
2626
|
md: "h-6 w-6",
|
|
2627
2627
|
lg: "h-8 w-8"
|
|
2628
2628
|
};
|
|
2629
|
-
Spinner =
|
|
2629
|
+
Spinner = React83__default.forwardRef(
|
|
2630
2630
|
({ className, size = "md", ...props }, ref) => {
|
|
2631
2631
|
return /* @__PURE__ */ jsx(
|
|
2632
2632
|
"div",
|
|
@@ -2705,8 +2705,8 @@ var init_Avatar = __esm({
|
|
|
2705
2705
|
actionPayload
|
|
2706
2706
|
}) => {
|
|
2707
2707
|
const eventBus = useEventBus();
|
|
2708
|
-
const [imgFailed, setImgFailed] =
|
|
2709
|
-
|
|
2708
|
+
const [imgFailed, setImgFailed] = React83__default.useState(false);
|
|
2709
|
+
React83__default.useEffect(() => {
|
|
2710
2710
|
setImgFailed(false);
|
|
2711
2711
|
}, [src]);
|
|
2712
2712
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -2913,7 +2913,7 @@ var init_Box = __esm({
|
|
|
2913
2913
|
fixed: "fixed",
|
|
2914
2914
|
sticky: "sticky"
|
|
2915
2915
|
};
|
|
2916
|
-
Box =
|
|
2916
|
+
Box = React83__default.forwardRef(
|
|
2917
2917
|
({
|
|
2918
2918
|
padding,
|
|
2919
2919
|
paddingX,
|
|
@@ -2963,7 +2963,7 @@ var init_Box = __esm({
|
|
|
2963
2963
|
onMouseLeave?.(e);
|
|
2964
2964
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
2965
2965
|
const isClickable = action || onClick;
|
|
2966
|
-
return
|
|
2966
|
+
return React83__default.createElement(
|
|
2967
2967
|
Component,
|
|
2968
2968
|
{
|
|
2969
2969
|
ref,
|
|
@@ -3285,7 +3285,7 @@ var init_Radio = __esm({
|
|
|
3285
3285
|
md: "w-2.5 h-2.5",
|
|
3286
3286
|
lg: "w-3 h-3"
|
|
3287
3287
|
};
|
|
3288
|
-
Radio =
|
|
3288
|
+
Radio = React83__default.forwardRef(
|
|
3289
3289
|
({
|
|
3290
3290
|
label,
|
|
3291
3291
|
helperText,
|
|
@@ -3302,12 +3302,12 @@ var init_Radio = __esm({
|
|
|
3302
3302
|
onChange,
|
|
3303
3303
|
...props
|
|
3304
3304
|
}, ref) => {
|
|
3305
|
-
const reactId =
|
|
3305
|
+
const reactId = React83__default.useId();
|
|
3306
3306
|
const baseId = id || `radio-${reactId}`;
|
|
3307
3307
|
const hasError = !!error;
|
|
3308
3308
|
const eventBus = useEventBus();
|
|
3309
|
-
const [selected, setSelected] =
|
|
3310
|
-
|
|
3309
|
+
const [selected, setSelected] = React83__default.useState(value);
|
|
3310
|
+
React83__default.useEffect(() => {
|
|
3311
3311
|
if (value !== void 0) setSelected(value);
|
|
3312
3312
|
}, [value]);
|
|
3313
3313
|
const pick = (next, e) => {
|
|
@@ -3489,7 +3489,7 @@ var init_Switch = __esm({
|
|
|
3489
3489
|
"components/core/atoms/Switch.tsx"() {
|
|
3490
3490
|
"use client";
|
|
3491
3491
|
init_cn();
|
|
3492
|
-
Switch =
|
|
3492
|
+
Switch = React83.forwardRef(
|
|
3493
3493
|
({
|
|
3494
3494
|
checked,
|
|
3495
3495
|
defaultChecked = false,
|
|
@@ -3500,10 +3500,10 @@ var init_Switch = __esm({
|
|
|
3500
3500
|
name,
|
|
3501
3501
|
className
|
|
3502
3502
|
}, ref) => {
|
|
3503
|
-
const [isChecked, setIsChecked] =
|
|
3503
|
+
const [isChecked, setIsChecked] = React83.useState(
|
|
3504
3504
|
checked !== void 0 ? checked : defaultChecked
|
|
3505
3505
|
);
|
|
3506
|
-
|
|
3506
|
+
React83.useEffect(() => {
|
|
3507
3507
|
if (checked !== void 0) {
|
|
3508
3508
|
setIsChecked(checked);
|
|
3509
3509
|
}
|
|
@@ -4374,7 +4374,7 @@ var Dialog;
|
|
|
4374
4374
|
var init_Dialog = __esm({
|
|
4375
4375
|
"components/core/atoms/Dialog.tsx"() {
|
|
4376
4376
|
init_cn();
|
|
4377
|
-
Dialog =
|
|
4377
|
+
Dialog = React83__default.forwardRef(
|
|
4378
4378
|
({
|
|
4379
4379
|
role = "dialog",
|
|
4380
4380
|
"aria-modal": ariaModal = true,
|
|
@@ -4400,7 +4400,7 @@ var Aside;
|
|
|
4400
4400
|
var init_Aside = __esm({
|
|
4401
4401
|
"components/core/atoms/Aside.tsx"() {
|
|
4402
4402
|
init_cn();
|
|
4403
|
-
Aside =
|
|
4403
|
+
Aside = React83__default.forwardRef(
|
|
4404
4404
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4405
4405
|
);
|
|
4406
4406
|
Aside.displayName = "Aside";
|
|
@@ -4478,8 +4478,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4478
4478
|
className
|
|
4479
4479
|
}) => {
|
|
4480
4480
|
const { t } = useTranslate();
|
|
4481
|
-
const [isVisible, setIsVisible] =
|
|
4482
|
-
const timeoutRef =
|
|
4481
|
+
const [isVisible, setIsVisible] = React83__default.useState(false);
|
|
4482
|
+
const timeoutRef = React83__default.useRef(null);
|
|
4483
4483
|
const handleMouseEnter = () => {
|
|
4484
4484
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4485
4485
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4488,7 +4488,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4488
4488
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4489
4489
|
setIsVisible(false);
|
|
4490
4490
|
};
|
|
4491
|
-
|
|
4491
|
+
React83__default.useEffect(() => {
|
|
4492
4492
|
return () => {
|
|
4493
4493
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4494
4494
|
};
|
|
@@ -4698,7 +4698,7 @@ var init_StatusDot = __esm({
|
|
|
4698
4698
|
md: "w-2.5 h-2.5",
|
|
4699
4699
|
lg: "w-3 h-3"
|
|
4700
4700
|
};
|
|
4701
|
-
StatusDot =
|
|
4701
|
+
StatusDot = React83__default.forwardRef(
|
|
4702
4702
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4703
4703
|
return /* @__PURE__ */ jsx(
|
|
4704
4704
|
"span",
|
|
@@ -4752,7 +4752,7 @@ var init_TrendIndicator = __esm({
|
|
|
4752
4752
|
down: "trending-down",
|
|
4753
4753
|
flat: "arrow-right"
|
|
4754
4754
|
};
|
|
4755
|
-
TrendIndicator =
|
|
4755
|
+
TrendIndicator = React83__default.forwardRef(
|
|
4756
4756
|
({
|
|
4757
4757
|
className,
|
|
4758
4758
|
value,
|
|
@@ -4819,7 +4819,7 @@ var init_RangeSlider = __esm({
|
|
|
4819
4819
|
md: "w-4 h-4",
|
|
4820
4820
|
lg: "w-5 h-5"
|
|
4821
4821
|
};
|
|
4822
|
-
RangeSlider =
|
|
4822
|
+
RangeSlider = React83__default.forwardRef(
|
|
4823
4823
|
({
|
|
4824
4824
|
className,
|
|
4825
4825
|
min = 0,
|
|
@@ -5415,7 +5415,7 @@ var init_ContentSection = __esm({
|
|
|
5415
5415
|
md: "py-16",
|
|
5416
5416
|
lg: "py-24"
|
|
5417
5417
|
};
|
|
5418
|
-
ContentSection =
|
|
5418
|
+
ContentSection = React83__default.forwardRef(
|
|
5419
5419
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5420
5420
|
return /* @__PURE__ */ jsx(
|
|
5421
5421
|
Box,
|
|
@@ -5949,7 +5949,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5949
5949
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5950
5950
|
"none": {}
|
|
5951
5951
|
};
|
|
5952
|
-
AnimatedReveal =
|
|
5952
|
+
AnimatedReveal = React83__default.forwardRef(
|
|
5953
5953
|
({
|
|
5954
5954
|
trigger = "scroll",
|
|
5955
5955
|
animation = "fade-up",
|
|
@@ -6109,7 +6109,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6109
6109
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6110
6110
|
"use client";
|
|
6111
6111
|
init_cn();
|
|
6112
|
-
AnimatedGraphic =
|
|
6112
|
+
AnimatedGraphic = React83__default.forwardRef(
|
|
6113
6113
|
({
|
|
6114
6114
|
src,
|
|
6115
6115
|
svgContent,
|
|
@@ -6132,7 +6132,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6132
6132
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6133
6133
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6134
6134
|
const prevAnimateRef = useRef(animate);
|
|
6135
|
-
const setRef =
|
|
6135
|
+
const setRef = React83__default.useCallback(
|
|
6136
6136
|
(node) => {
|
|
6137
6137
|
containerRef.current = node;
|
|
6138
6138
|
if (typeof ref === "function") ref(node);
|
|
@@ -6822,7 +6822,7 @@ var init_ErrorBoundary = __esm({
|
|
|
6822
6822
|
}
|
|
6823
6823
|
);
|
|
6824
6824
|
};
|
|
6825
|
-
ErrorBoundary = class extends
|
|
6825
|
+
ErrorBoundary = class extends React83__default.Component {
|
|
6826
6826
|
constructor(props) {
|
|
6827
6827
|
super(props);
|
|
6828
6828
|
__publicField(this, "reset", () => {
|
|
@@ -7885,8 +7885,8 @@ var init_Tooltip = __esm({
|
|
|
7885
7885
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
7886
7886
|
};
|
|
7887
7887
|
}, []);
|
|
7888
|
-
const triggerElement =
|
|
7889
|
-
const trigger =
|
|
7888
|
+
const triggerElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
7889
|
+
const trigger = React83__default.cloneElement(triggerElement, {
|
|
7890
7890
|
ref: triggerRef,
|
|
7891
7891
|
onMouseEnter: handleMouseEnter,
|
|
7892
7892
|
onMouseLeave: handleMouseLeave,
|
|
@@ -8033,8 +8033,8 @@ var init_Popover = __esm({
|
|
|
8033
8033
|
onMouseEnter: handleOpen,
|
|
8034
8034
|
onMouseLeave: handleClose
|
|
8035
8035
|
};
|
|
8036
|
-
const childElement =
|
|
8037
|
-
const triggerElement =
|
|
8036
|
+
const childElement = React83__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
8037
|
+
const triggerElement = React83__default.cloneElement(
|
|
8038
8038
|
childElement,
|
|
8039
8039
|
{
|
|
8040
8040
|
ref: triggerRef,
|
|
@@ -8160,8 +8160,8 @@ var init_Menu = __esm({
|
|
|
8160
8160
|
};
|
|
8161
8161
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
8162
8162
|
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
8163
|
-
const triggerChild =
|
|
8164
|
-
const triggerElement =
|
|
8163
|
+
const triggerChild = React83__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
8164
|
+
const triggerElement = React83__default.cloneElement(
|
|
8165
8165
|
triggerChild,
|
|
8166
8166
|
{
|
|
8167
8167
|
ref: triggerRef,
|
|
@@ -8568,7 +8568,7 @@ var init_MapView = __esm({
|
|
|
8568
8568
|
shadowSize: [41, 41]
|
|
8569
8569
|
});
|
|
8570
8570
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
8571
|
-
const { useEffect: useEffect71, useRef: useRef68, useCallback: useCallback116, useState: useState102 } =
|
|
8571
|
+
const { useEffect: useEffect71, useRef: useRef68, useCallback: useCallback116, useState: useState102 } = React83__default;
|
|
8572
8572
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
8573
8573
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
8574
8574
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -8814,7 +8814,7 @@ function InputPattern({
|
|
|
8814
8814
|
fieldName
|
|
8815
8815
|
}) {
|
|
8816
8816
|
const { emit } = useEventBus();
|
|
8817
|
-
const [localValue, setLocalValue] =
|
|
8817
|
+
const [localValue, setLocalValue] = React83__default.useState(value);
|
|
8818
8818
|
const handleChange = (e) => {
|
|
8819
8819
|
setLocalValue(e.target.value);
|
|
8820
8820
|
if (onChange) {
|
|
@@ -8852,7 +8852,7 @@ function TextareaPattern({
|
|
|
8852
8852
|
fieldName
|
|
8853
8853
|
}) {
|
|
8854
8854
|
const { emit } = useEventBus();
|
|
8855
|
-
const [localValue, setLocalValue] =
|
|
8855
|
+
const [localValue, setLocalValue] = React83__default.useState(value);
|
|
8856
8856
|
const handleChange = (e) => {
|
|
8857
8857
|
setLocalValue(e.target.value);
|
|
8858
8858
|
if (onChange) {
|
|
@@ -8884,7 +8884,7 @@ function SelectPattern({
|
|
|
8884
8884
|
fieldName
|
|
8885
8885
|
}) {
|
|
8886
8886
|
const { emit } = useEventBus();
|
|
8887
|
-
const [localValue, setLocalValue] =
|
|
8887
|
+
const [localValue, setLocalValue] = React83__default.useState(value);
|
|
8888
8888
|
const handleChange = (e) => {
|
|
8889
8889
|
setLocalValue(e.target.value);
|
|
8890
8890
|
if (onChange) {
|
|
@@ -8913,7 +8913,7 @@ function CheckboxPattern({
|
|
|
8913
8913
|
className
|
|
8914
8914
|
}) {
|
|
8915
8915
|
const { emit } = useEventBus();
|
|
8916
|
-
const [localChecked, setLocalChecked] =
|
|
8916
|
+
const [localChecked, setLocalChecked] = React83__default.useState(checked);
|
|
8917
8917
|
const handleChange = (e) => {
|
|
8918
8918
|
setLocalChecked(e.target.checked);
|
|
8919
8919
|
if (onChange) {
|
|
@@ -9226,9 +9226,9 @@ function ControlButton({
|
|
|
9226
9226
|
className
|
|
9227
9227
|
}) {
|
|
9228
9228
|
const eventBus = useEventBus();
|
|
9229
|
-
const [isPressed, setIsPressed] =
|
|
9229
|
+
const [isPressed, setIsPressed] = React83.useState(false);
|
|
9230
9230
|
const actualPressed = pressed ?? isPressed;
|
|
9231
|
-
const handlePointerDown =
|
|
9231
|
+
const handlePointerDown = React83.useCallback(
|
|
9232
9232
|
(e) => {
|
|
9233
9233
|
e.preventDefault();
|
|
9234
9234
|
if (disabled) return;
|
|
@@ -9238,7 +9238,7 @@ function ControlButton({
|
|
|
9238
9238
|
},
|
|
9239
9239
|
[disabled, pressEvent, eventBus, onPress]
|
|
9240
9240
|
);
|
|
9241
|
-
const handlePointerUp =
|
|
9241
|
+
const handlePointerUp = React83.useCallback(
|
|
9242
9242
|
(e) => {
|
|
9243
9243
|
e.preventDefault();
|
|
9244
9244
|
if (disabled) return;
|
|
@@ -9248,7 +9248,7 @@ function ControlButton({
|
|
|
9248
9248
|
},
|
|
9249
9249
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
9250
9250
|
);
|
|
9251
|
-
const handlePointerLeave =
|
|
9251
|
+
const handlePointerLeave = React83.useCallback(
|
|
9252
9252
|
(e) => {
|
|
9253
9253
|
if (isPressed) {
|
|
9254
9254
|
setIsPressed(false);
|
|
@@ -9325,8 +9325,8 @@ function ActionButtons({
|
|
|
9325
9325
|
disabled
|
|
9326
9326
|
}) {
|
|
9327
9327
|
const eventBus = useEventBus();
|
|
9328
|
-
const [activeButtons, setActiveButtons] =
|
|
9329
|
-
const handlePress =
|
|
9328
|
+
const [activeButtons, setActiveButtons] = React83.useState(/* @__PURE__ */ new Set());
|
|
9329
|
+
const handlePress = React83.useCallback(
|
|
9330
9330
|
(id) => {
|
|
9331
9331
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9332
9332
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9334,7 +9334,7 @@ function ActionButtons({
|
|
|
9334
9334
|
},
|
|
9335
9335
|
[actionEvent, eventBus, onAction]
|
|
9336
9336
|
);
|
|
9337
|
-
const handleRelease =
|
|
9337
|
+
const handleRelease = React83.useCallback(
|
|
9338
9338
|
(id) => {
|
|
9339
9339
|
setActiveButtons((prev) => {
|
|
9340
9340
|
const next = new Set(prev);
|
|
@@ -9615,9 +9615,262 @@ var init_AnimatedCounter2 = __esm({
|
|
|
9615
9615
|
AnimatedCounter2.displayName = "AnimatedCounter";
|
|
9616
9616
|
}
|
|
9617
9617
|
});
|
|
9618
|
+
var ALL_CATEGORY, GridPicker;
|
|
9619
|
+
var init_GridPicker = __esm({
|
|
9620
|
+
"components/core/molecules/GridPicker.tsx"() {
|
|
9621
|
+
"use client";
|
|
9622
|
+
init_cn();
|
|
9623
|
+
init_Input();
|
|
9624
|
+
init_Badge();
|
|
9625
|
+
init_Stack();
|
|
9626
|
+
ALL_CATEGORY = "__all__";
|
|
9627
|
+
GridPicker = ({
|
|
9628
|
+
items,
|
|
9629
|
+
value,
|
|
9630
|
+
onChange,
|
|
9631
|
+
categories,
|
|
9632
|
+
searchPlaceholder,
|
|
9633
|
+
renderThumbnail,
|
|
9634
|
+
cellSize = 32,
|
|
9635
|
+
className
|
|
9636
|
+
}) => {
|
|
9637
|
+
const [search, setSearch] = useState("");
|
|
9638
|
+
const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
|
|
9639
|
+
const gridRef = useRef(null);
|
|
9640
|
+
const categoryChips = useMemo(() => {
|
|
9641
|
+
if (categories !== void 0) return categories;
|
|
9642
|
+
const seen = [];
|
|
9643
|
+
for (const item of items) {
|
|
9644
|
+
if (!seen.includes(item.category)) seen.push(item.category);
|
|
9645
|
+
}
|
|
9646
|
+
return seen;
|
|
9647
|
+
}, [categories, items]);
|
|
9648
|
+
const filtered = useMemo(() => {
|
|
9649
|
+
const needle = search.trim().toLowerCase();
|
|
9650
|
+
return items.filter((item) => {
|
|
9651
|
+
const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
|
|
9652
|
+
const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
|
|
9653
|
+
return matchesCategory && matchesSearch;
|
|
9654
|
+
});
|
|
9655
|
+
}, [items, search, activeCategory]);
|
|
9656
|
+
const select = useCallback(
|
|
9657
|
+
(item) => {
|
|
9658
|
+
onChange(item.id);
|
|
9659
|
+
},
|
|
9660
|
+
[onChange]
|
|
9661
|
+
);
|
|
9662
|
+
const handleKeyDown = useCallback(
|
|
9663
|
+
(e, index) => {
|
|
9664
|
+
const cells = gridRef.current?.querySelectorAll(
|
|
9665
|
+
"[data-gridpicker-cell]"
|
|
9666
|
+
);
|
|
9667
|
+
if (cells === void 0 || cells.length === 0) return;
|
|
9668
|
+
const columns = (() => {
|
|
9669
|
+
const grid = gridRef.current;
|
|
9670
|
+
if (grid === null) return 1;
|
|
9671
|
+
const style = window.getComputedStyle(grid);
|
|
9672
|
+
const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
|
|
9673
|
+
return cols > 0 ? cols : 1;
|
|
9674
|
+
})();
|
|
9675
|
+
let next = -1;
|
|
9676
|
+
if (e.key === "ArrowRight") next = index + 1;
|
|
9677
|
+
else if (e.key === "ArrowLeft") next = index - 1;
|
|
9678
|
+
else if (e.key === "ArrowDown") next = index + columns;
|
|
9679
|
+
else if (e.key === "ArrowUp") next = index - columns;
|
|
9680
|
+
else if (e.key === "Enter" || e.key === " ") {
|
|
9681
|
+
e.preventDefault();
|
|
9682
|
+
select(filtered[index]);
|
|
9683
|
+
return;
|
|
9684
|
+
} else {
|
|
9685
|
+
return;
|
|
9686
|
+
}
|
|
9687
|
+
e.preventDefault();
|
|
9688
|
+
if (next >= 0 && next < cells.length) {
|
|
9689
|
+
cells[next].focus();
|
|
9690
|
+
}
|
|
9691
|
+
},
|
|
9692
|
+
[filtered, select]
|
|
9693
|
+
);
|
|
9694
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
|
|
9695
|
+
/* @__PURE__ */ jsx(
|
|
9696
|
+
Input,
|
|
9697
|
+
{
|
|
9698
|
+
type: "search",
|
|
9699
|
+
icon: "search",
|
|
9700
|
+
value: search,
|
|
9701
|
+
placeholder: searchPlaceholder,
|
|
9702
|
+
clearable: true,
|
|
9703
|
+
onClear: () => setSearch(""),
|
|
9704
|
+
onChange: (e) => setSearch(e.target.value)
|
|
9705
|
+
}
|
|
9706
|
+
),
|
|
9707
|
+
categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
|
|
9708
|
+
/* @__PURE__ */ jsx(
|
|
9709
|
+
Badge,
|
|
9710
|
+
{
|
|
9711
|
+
variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
|
|
9712
|
+
size: "sm",
|
|
9713
|
+
role: "button",
|
|
9714
|
+
tabIndex: 0,
|
|
9715
|
+
"aria-pressed": activeCategory === ALL_CATEGORY,
|
|
9716
|
+
className: "cursor-pointer",
|
|
9717
|
+
onClick: () => setActiveCategory(ALL_CATEGORY),
|
|
9718
|
+
onKeyDown: (e) => {
|
|
9719
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
9720
|
+
e.preventDefault();
|
|
9721
|
+
setActiveCategory(ALL_CATEGORY);
|
|
9722
|
+
}
|
|
9723
|
+
},
|
|
9724
|
+
children: "All"
|
|
9725
|
+
}
|
|
9726
|
+
),
|
|
9727
|
+
categoryChips.map((category) => /* @__PURE__ */ jsx(
|
|
9728
|
+
Badge,
|
|
9729
|
+
{
|
|
9730
|
+
variant: activeCategory === category ? "primary" : "neutral",
|
|
9731
|
+
size: "sm",
|
|
9732
|
+
role: "button",
|
|
9733
|
+
tabIndex: 0,
|
|
9734
|
+
"aria-pressed": activeCategory === category,
|
|
9735
|
+
className: "cursor-pointer",
|
|
9736
|
+
onClick: () => setActiveCategory(category),
|
|
9737
|
+
onKeyDown: (e) => {
|
|
9738
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
9739
|
+
e.preventDefault();
|
|
9740
|
+
setActiveCategory(category);
|
|
9741
|
+
}
|
|
9742
|
+
},
|
|
9743
|
+
children: category
|
|
9744
|
+
},
|
|
9745
|
+
category
|
|
9746
|
+
))
|
|
9747
|
+
] }),
|
|
9748
|
+
/* @__PURE__ */ jsx(
|
|
9749
|
+
"div",
|
|
9750
|
+
{
|
|
9751
|
+
ref: gridRef,
|
|
9752
|
+
role: "listbox",
|
|
9753
|
+
className: "grid gap-1 overflow-y-auto max-h-64 p-1",
|
|
9754
|
+
style: {
|
|
9755
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
|
|
9756
|
+
},
|
|
9757
|
+
children: filtered.map((item, index) => {
|
|
9758
|
+
const selected = item.id === value;
|
|
9759
|
+
return /* @__PURE__ */ jsx(
|
|
9760
|
+
"button",
|
|
9761
|
+
{
|
|
9762
|
+
type: "button",
|
|
9763
|
+
role: "option",
|
|
9764
|
+
"aria-selected": selected,
|
|
9765
|
+
"aria-label": item.label,
|
|
9766
|
+
title: item.label,
|
|
9767
|
+
"data-gridpicker-cell": true,
|
|
9768
|
+
tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
|
|
9769
|
+
onClick: () => select(item),
|
|
9770
|
+
onKeyDown: (e) => handleKeyDown(e, index),
|
|
9771
|
+
className: cn(
|
|
9772
|
+
"flex items-center justify-center rounded-sm",
|
|
9773
|
+
"transition-colors hover:bg-muted",
|
|
9774
|
+
"focus:outline-none focus:ring-1 focus:ring-ring",
|
|
9775
|
+
selected && "bg-primary/10 ring-1 ring-primary"
|
|
9776
|
+
),
|
|
9777
|
+
style: { width: cellSize, height: cellSize },
|
|
9778
|
+
children: renderThumbnail(item)
|
|
9779
|
+
},
|
|
9780
|
+
item.id
|
|
9781
|
+
);
|
|
9782
|
+
})
|
|
9783
|
+
}
|
|
9784
|
+
)
|
|
9785
|
+
] });
|
|
9786
|
+
};
|
|
9787
|
+
GridPicker.displayName = "GridPicker";
|
|
9788
|
+
}
|
|
9789
|
+
});
|
|
9790
|
+
function iconForKind(kind) {
|
|
9791
|
+
if (kind === "audio") return "music";
|
|
9792
|
+
if (kind === "model") return "box";
|
|
9793
|
+
return "file";
|
|
9794
|
+
}
|
|
9795
|
+
var THUMB_PX, IMAGE_KINDS, AssetPicker;
|
|
9796
|
+
var init_AssetPicker = __esm({
|
|
9797
|
+
"components/core/molecules/AssetPicker.tsx"() {
|
|
9798
|
+
"use client";
|
|
9799
|
+
init_GridPicker();
|
|
9800
|
+
init_Icon();
|
|
9801
|
+
THUMB_PX = 32;
|
|
9802
|
+
IMAGE_KINDS = /* @__PURE__ */ new Set([
|
|
9803
|
+
"image",
|
|
9804
|
+
"spritesheet",
|
|
9805
|
+
"scene",
|
|
9806
|
+
"portrait"
|
|
9807
|
+
]);
|
|
9808
|
+
AssetPicker = ({
|
|
9809
|
+
assets,
|
|
9810
|
+
value,
|
|
9811
|
+
onChange,
|
|
9812
|
+
className
|
|
9813
|
+
}) => {
|
|
9814
|
+
const byUrl = useMemo(() => {
|
|
9815
|
+
const map = /* @__PURE__ */ new Map();
|
|
9816
|
+
for (const entry of assets) map.set(entry.url, entry);
|
|
9817
|
+
return map;
|
|
9818
|
+
}, [assets]);
|
|
9819
|
+
const items = useMemo(
|
|
9820
|
+
() => assets.map((entry) => ({
|
|
9821
|
+
id: entry.url,
|
|
9822
|
+
label: entry.name,
|
|
9823
|
+
category: entry.category
|
|
9824
|
+
})),
|
|
9825
|
+
[assets]
|
|
9826
|
+
);
|
|
9827
|
+
const categories = useMemo(() => {
|
|
9828
|
+
const seen = [];
|
|
9829
|
+
for (const entry of assets) {
|
|
9830
|
+
if (!seen.includes(entry.category)) seen.push(entry.category);
|
|
9831
|
+
}
|
|
9832
|
+
return seen;
|
|
9833
|
+
}, [assets]);
|
|
9834
|
+
const renderThumbnail = useCallback(
|
|
9835
|
+
(item) => {
|
|
9836
|
+
const entry = byUrl.get(item.id);
|
|
9837
|
+
if (entry === void 0) return null;
|
|
9838
|
+
if (IMAGE_KINDS.has(entry.kind)) {
|
|
9839
|
+
return /* @__PURE__ */ jsx(
|
|
9840
|
+
"img",
|
|
9841
|
+
{
|
|
9842
|
+
src: entry.thumbnailUrl ?? entry.url,
|
|
9843
|
+
alt: entry.name,
|
|
9844
|
+
loading: "lazy",
|
|
9845
|
+
width: THUMB_PX,
|
|
9846
|
+
height: THUMB_PX,
|
|
9847
|
+
style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
|
|
9848
|
+
}
|
|
9849
|
+
);
|
|
9850
|
+
}
|
|
9851
|
+
return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
|
|
9852
|
+
},
|
|
9853
|
+
[byUrl]
|
|
9854
|
+
);
|
|
9855
|
+
return /* @__PURE__ */ jsx(
|
|
9856
|
+
GridPicker,
|
|
9857
|
+
{
|
|
9858
|
+
items,
|
|
9859
|
+
value,
|
|
9860
|
+
onChange,
|
|
9861
|
+
categories,
|
|
9862
|
+
renderThumbnail,
|
|
9863
|
+
cellSize: THUMB_PX,
|
|
9864
|
+
className
|
|
9865
|
+
}
|
|
9866
|
+
);
|
|
9867
|
+
};
|
|
9868
|
+
AssetPicker.displayName = "AssetPicker";
|
|
9869
|
+
}
|
|
9870
|
+
});
|
|
9618
9871
|
var AuthLayout;
|
|
9619
9872
|
var init_AuthLayout = __esm({
|
|
9620
|
-
"components/
|
|
9873
|
+
"components/marketing/templates/AuthLayout.tsx"() {
|
|
9621
9874
|
"use client";
|
|
9622
9875
|
init_cn();
|
|
9623
9876
|
init_Box();
|
|
@@ -12374,7 +12627,7 @@ var init_CodeBlock = __esm({
|
|
|
12374
12627
|
CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
|
|
12375
12628
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
12376
12629
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
12377
|
-
CodeBlock =
|
|
12630
|
+
CodeBlock = React83__default.memo(
|
|
12378
12631
|
({
|
|
12379
12632
|
code: rawCode,
|
|
12380
12633
|
language = "text",
|
|
@@ -12811,7 +13064,7 @@ var init_MarkdownContent = __esm({
|
|
|
12811
13064
|
init_Box();
|
|
12812
13065
|
init_CodeBlock();
|
|
12813
13066
|
init_cn();
|
|
12814
|
-
MarkdownContent =
|
|
13067
|
+
MarkdownContent = React83__default.memo(
|
|
12815
13068
|
({ content, direction, className }) => {
|
|
12816
13069
|
const { t: _t } = useTranslate();
|
|
12817
13070
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -13907,7 +14160,7 @@ var init_StateMachineView = __esm({
|
|
|
13907
14160
|
style: { top: title ? 30 : 0 },
|
|
13908
14161
|
children: [
|
|
13909
14162
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
13910
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14163
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React83__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
13911
14164
|
StateNode,
|
|
13912
14165
|
{
|
|
13913
14166
|
state,
|
|
@@ -15512,7 +15765,7 @@ var init_Grid = __esm({
|
|
|
15512
15765
|
as: Component = "div"
|
|
15513
15766
|
}) => {
|
|
15514
15767
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
15515
|
-
return
|
|
15768
|
+
return React83__default.createElement(
|
|
15516
15769
|
Component,
|
|
15517
15770
|
{
|
|
15518
15771
|
className: cn(
|
|
@@ -18830,7 +19083,7 @@ var init_Carousel = __esm({
|
|
|
18830
19083
|
});
|
|
18831
19084
|
var CaseStudyOrganism;
|
|
18832
19085
|
var init_CaseStudyOrganism = __esm({
|
|
18833
|
-
"components/
|
|
19086
|
+
"components/marketing/organisms/CaseStudyOrganism.tsx"() {
|
|
18834
19087
|
"use client";
|
|
18835
19088
|
init_cn();
|
|
18836
19089
|
init_useEventBus();
|
|
@@ -21050,7 +21303,7 @@ function CraftingRecipe({
|
|
|
21050
21303
|
className
|
|
21051
21304
|
}) {
|
|
21052
21305
|
const eventBus = useEventBus();
|
|
21053
|
-
const handleCraft =
|
|
21306
|
+
const handleCraft = React83.useCallback(() => {
|
|
21054
21307
|
onCraft?.();
|
|
21055
21308
|
if (craftEvent) {
|
|
21056
21309
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -21067,7 +21320,7 @@ function CraftingRecipe({
|
|
|
21067
21320
|
children: [
|
|
21068
21321
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
21069
21322
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
21070
|
-
return /* @__PURE__ */ jsxs(
|
|
21323
|
+
return /* @__PURE__ */ jsxs(React83.Fragment, { children: [
|
|
21071
21324
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
21072
21325
|
ItemSlot,
|
|
21073
21326
|
{
|
|
@@ -21130,8 +21383,8 @@ function DPad({
|
|
|
21130
21383
|
}) {
|
|
21131
21384
|
const eventBus = useEventBus();
|
|
21132
21385
|
const sizes = sizeMap6[size];
|
|
21133
|
-
const [activeDirections, setActiveDirections] =
|
|
21134
|
-
const handlePress =
|
|
21386
|
+
const [activeDirections, setActiveDirections] = React83.useState(/* @__PURE__ */ new Set());
|
|
21387
|
+
const handlePress = React83.useCallback(
|
|
21135
21388
|
(direction) => {
|
|
21136
21389
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21137
21390
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21139,7 +21392,7 @@ function DPad({
|
|
|
21139
21392
|
},
|
|
21140
21393
|
[directionEvent, eventBus, onDirection]
|
|
21141
21394
|
);
|
|
21142
|
-
const handleRelease =
|
|
21395
|
+
const handleRelease = React83.useCallback(
|
|
21143
21396
|
(direction) => {
|
|
21144
21397
|
setActiveDirections((prev) => {
|
|
21145
21398
|
const next = new Set(prev);
|
|
@@ -21874,14 +22127,14 @@ function useDataDnd(args) {
|
|
|
21874
22127
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
21875
22128
|
const enabled = isZone || Boolean(dndRoot);
|
|
21876
22129
|
const eventBus = useEventBus();
|
|
21877
|
-
const parentRoot =
|
|
22130
|
+
const parentRoot = React83__default.useContext(RootCtx);
|
|
21878
22131
|
const isRoot = enabled && parentRoot === null;
|
|
21879
|
-
const zoneId =
|
|
22132
|
+
const zoneId = React83__default.useId();
|
|
21880
22133
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
21881
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
21882
|
-
const optimisticOrdersRef =
|
|
22134
|
+
const [optimisticOrders, setOptimisticOrders] = React83__default.useState(() => /* @__PURE__ */ new Map());
|
|
22135
|
+
const optimisticOrdersRef = React83__default.useRef(optimisticOrders);
|
|
21883
22136
|
optimisticOrdersRef.current = optimisticOrders;
|
|
21884
|
-
const clearOptimisticOrder =
|
|
22137
|
+
const clearOptimisticOrder = React83__default.useCallback((group) => {
|
|
21885
22138
|
setOptimisticOrders((prev) => {
|
|
21886
22139
|
if (!prev.has(group)) return prev;
|
|
21887
22140
|
const next = new Map(prev);
|
|
@@ -21906,7 +22159,7 @@ function useDataDnd(args) {
|
|
|
21906
22159
|
const raw = it[dndItemIdField];
|
|
21907
22160
|
return String(raw ?? `__idx_${idx}`);
|
|
21908
22161
|
}).join("|");
|
|
21909
|
-
const itemIds =
|
|
22162
|
+
const itemIds = React83__default.useMemo(
|
|
21910
22163
|
() => orderedItems.map((it, idx) => {
|
|
21911
22164
|
const raw = it[dndItemIdField];
|
|
21912
22165
|
return raw ?? `__idx_${idx}`;
|
|
@@ -21914,7 +22167,7 @@ function useDataDnd(args) {
|
|
|
21914
22167
|
[itemIdsSignature]
|
|
21915
22168
|
);
|
|
21916
22169
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
21917
|
-
|
|
22170
|
+
React83__default.useEffect(() => {
|
|
21918
22171
|
const root = isRoot ? null : parentRoot;
|
|
21919
22172
|
if (root) {
|
|
21920
22173
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -21922,20 +22175,20 @@ function useDataDnd(args) {
|
|
|
21922
22175
|
clearOptimisticOrder(ownGroup);
|
|
21923
22176
|
}
|
|
21924
22177
|
}, [itemsContentSig, ownGroup]);
|
|
21925
|
-
const zonesRef =
|
|
21926
|
-
const registerZone =
|
|
22178
|
+
const zonesRef = React83__default.useRef(/* @__PURE__ */ new Map());
|
|
22179
|
+
const registerZone = React83__default.useCallback((zoneId2, meta2) => {
|
|
21927
22180
|
zonesRef.current.set(zoneId2, meta2);
|
|
21928
22181
|
}, []);
|
|
21929
|
-
const unregisterZone =
|
|
22182
|
+
const unregisterZone = React83__default.useCallback((zoneId2) => {
|
|
21930
22183
|
zonesRef.current.delete(zoneId2);
|
|
21931
22184
|
}, []);
|
|
21932
|
-
const [activeDrag, setActiveDrag] =
|
|
21933
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
21934
|
-
const meta =
|
|
22185
|
+
const [activeDrag, setActiveDrag] = React83__default.useState(null);
|
|
22186
|
+
const [overZoneGroup, setOverZoneGroup] = React83__default.useState(null);
|
|
22187
|
+
const meta = React83__default.useMemo(
|
|
21935
22188
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
21936
22189
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
21937
22190
|
);
|
|
21938
|
-
|
|
22191
|
+
React83__default.useEffect(() => {
|
|
21939
22192
|
const target = isRoot ? null : parentRoot;
|
|
21940
22193
|
if (!target) {
|
|
21941
22194
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -21954,7 +22207,7 @@ function useDataDnd(args) {
|
|
|
21954
22207
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
21955
22208
|
const sensors = useAlmadarDndSensors(true);
|
|
21956
22209
|
const collisionDetection = almadarDndCollisionDetection;
|
|
21957
|
-
const findZoneByItem =
|
|
22210
|
+
const findZoneByItem = React83__default.useCallback(
|
|
21958
22211
|
(id) => {
|
|
21959
22212
|
for (const z of zonesRef.current.values()) {
|
|
21960
22213
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -21963,7 +22216,7 @@ function useDataDnd(args) {
|
|
|
21963
22216
|
},
|
|
21964
22217
|
[]
|
|
21965
22218
|
);
|
|
21966
|
-
|
|
22219
|
+
React83__default.useCallback(
|
|
21967
22220
|
(group) => {
|
|
21968
22221
|
for (const z of zonesRef.current.values()) {
|
|
21969
22222
|
if (z.group === group) return z;
|
|
@@ -21972,7 +22225,7 @@ function useDataDnd(args) {
|
|
|
21972
22225
|
},
|
|
21973
22226
|
[]
|
|
21974
22227
|
);
|
|
21975
|
-
const handleDragEnd =
|
|
22228
|
+
const handleDragEnd = React83__default.useCallback(
|
|
21976
22229
|
(event) => {
|
|
21977
22230
|
const { active, over } = event;
|
|
21978
22231
|
const activeIdStr = String(active.id);
|
|
@@ -22063,8 +22316,8 @@ function useDataDnd(args) {
|
|
|
22063
22316
|
},
|
|
22064
22317
|
[eventBus]
|
|
22065
22318
|
);
|
|
22066
|
-
const sortableData =
|
|
22067
|
-
const SortableItem =
|
|
22319
|
+
const sortableData = React83__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22320
|
+
const SortableItem = React83__default.useCallback(
|
|
22068
22321
|
({ id, children }) => {
|
|
22069
22322
|
const {
|
|
22070
22323
|
attributes,
|
|
@@ -22104,7 +22357,7 @@ function useDataDnd(args) {
|
|
|
22104
22357
|
id: droppableId,
|
|
22105
22358
|
data: sortableData
|
|
22106
22359
|
});
|
|
22107
|
-
const ctx =
|
|
22360
|
+
const ctx = React83__default.useContext(RootCtx);
|
|
22108
22361
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22109
22362
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22110
22363
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22119,7 +22372,7 @@ function useDataDnd(args) {
|
|
|
22119
22372
|
showForeignPlaceholder,
|
|
22120
22373
|
ctxAvailable: ctx != null
|
|
22121
22374
|
});
|
|
22122
|
-
|
|
22375
|
+
React83__default.useEffect(() => {
|
|
22123
22376
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22124
22377
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22125
22378
|
return /* @__PURE__ */ jsx(
|
|
@@ -22133,11 +22386,11 @@ function useDataDnd(args) {
|
|
|
22133
22386
|
}
|
|
22134
22387
|
);
|
|
22135
22388
|
};
|
|
22136
|
-
const rootContextValue =
|
|
22389
|
+
const rootContextValue = React83__default.useMemo(
|
|
22137
22390
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22138
22391
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22139
22392
|
);
|
|
22140
|
-
const handleDragStart =
|
|
22393
|
+
const handleDragStart = React83__default.useCallback((event) => {
|
|
22141
22394
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22142
22395
|
const rect = event.active.rect.current.initial;
|
|
22143
22396
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22156,7 +22409,7 @@ function useDataDnd(args) {
|
|
|
22156
22409
|
isRoot
|
|
22157
22410
|
});
|
|
22158
22411
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22159
|
-
const handleDragOver =
|
|
22412
|
+
const handleDragOver = React83__default.useCallback((event) => {
|
|
22160
22413
|
const { active, over } = event;
|
|
22161
22414
|
const overData = over?.data?.current;
|
|
22162
22415
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22226,7 +22479,7 @@ function useDataDnd(args) {
|
|
|
22226
22479
|
return next;
|
|
22227
22480
|
});
|
|
22228
22481
|
}, []);
|
|
22229
|
-
const handleDragCancel =
|
|
22482
|
+
const handleDragCancel = React83__default.useCallback((event) => {
|
|
22230
22483
|
setActiveDrag(null);
|
|
22231
22484
|
setOverZoneGroup(null);
|
|
22232
22485
|
dndLog.warn("dragCancel", {
|
|
@@ -22234,12 +22487,12 @@ function useDataDnd(args) {
|
|
|
22234
22487
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22235
22488
|
});
|
|
22236
22489
|
}, []);
|
|
22237
|
-
const handleDragEndWithCleanup =
|
|
22490
|
+
const handleDragEndWithCleanup = React83__default.useCallback((event) => {
|
|
22238
22491
|
handleDragEnd(event);
|
|
22239
22492
|
setActiveDrag(null);
|
|
22240
22493
|
setOverZoneGroup(null);
|
|
22241
22494
|
}, [handleDragEnd]);
|
|
22242
|
-
const wrapContainer =
|
|
22495
|
+
const wrapContainer = React83__default.useCallback(
|
|
22243
22496
|
(children) => {
|
|
22244
22497
|
if (!enabled) return children;
|
|
22245
22498
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22293,7 +22546,7 @@ var init_useDataDnd = __esm({
|
|
|
22293
22546
|
init_useAlmadarDndCollision();
|
|
22294
22547
|
init_Box();
|
|
22295
22548
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22296
|
-
RootCtx =
|
|
22549
|
+
RootCtx = React83__default.createContext(null);
|
|
22297
22550
|
}
|
|
22298
22551
|
});
|
|
22299
22552
|
function fieldLabel2(key) {
|
|
@@ -22813,7 +23066,7 @@ function DataList({
|
|
|
22813
23066
|
}) {
|
|
22814
23067
|
const eventBus = useEventBus();
|
|
22815
23068
|
const { t } = useTranslate();
|
|
22816
|
-
const [visibleCount, setVisibleCount] =
|
|
23069
|
+
const [visibleCount, setVisibleCount] = React83__default.useState(pageSize || Infinity);
|
|
22817
23070
|
const fieldDefs = fields ?? columns ?? [];
|
|
22818
23071
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22819
23072
|
const dnd = useDataDnd({
|
|
@@ -22832,7 +23085,7 @@ function DataList({
|
|
|
22832
23085
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22833
23086
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
22834
23087
|
const hasRenderProp = typeof children === "function";
|
|
22835
|
-
|
|
23088
|
+
React83__default.useEffect(() => {
|
|
22836
23089
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
22837
23090
|
const childrenTypeOf = typeof children;
|
|
22838
23091
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -22937,7 +23190,7 @@ function DataList({
|
|
|
22937
23190
|
const items2 = data.map((item) => item);
|
|
22938
23191
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22939
23192
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
22940
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23193
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
22941
23194
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22942
23195
|
group.items.map((itemData, index) => {
|
|
22943
23196
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23085,7 +23338,7 @@ function DataList({
|
|
|
23085
23338
|
className
|
|
23086
23339
|
),
|
|
23087
23340
|
children: [
|
|
23088
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23341
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
23089
23342
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23090
23343
|
group.items.map(
|
|
23091
23344
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24709,7 +24962,7 @@ var init_WizardProgress = __esm({
|
|
|
24709
24962
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
24710
24963
|
const isActive = index === currentStep;
|
|
24711
24964
|
const isCompleted = index < currentStep;
|
|
24712
|
-
return /* @__PURE__ */ jsxs(
|
|
24965
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
24713
24966
|
/* @__PURE__ */ jsx(
|
|
24714
24967
|
"button",
|
|
24715
24968
|
{
|
|
@@ -25320,259 +25573,6 @@ var init_FlipCard = __esm({
|
|
|
25320
25573
|
FlipCard.displayName = "FlipCard";
|
|
25321
25574
|
}
|
|
25322
25575
|
});
|
|
25323
|
-
var ALL_CATEGORY, GridPicker;
|
|
25324
|
-
var init_GridPicker = __esm({
|
|
25325
|
-
"components/core/molecules/GridPicker.tsx"() {
|
|
25326
|
-
"use client";
|
|
25327
|
-
init_cn();
|
|
25328
|
-
init_Input();
|
|
25329
|
-
init_Badge();
|
|
25330
|
-
init_Stack();
|
|
25331
|
-
ALL_CATEGORY = "__all__";
|
|
25332
|
-
GridPicker = ({
|
|
25333
|
-
items,
|
|
25334
|
-
value,
|
|
25335
|
-
onChange,
|
|
25336
|
-
categories,
|
|
25337
|
-
searchPlaceholder,
|
|
25338
|
-
renderThumbnail,
|
|
25339
|
-
cellSize = 32,
|
|
25340
|
-
className
|
|
25341
|
-
}) => {
|
|
25342
|
-
const [search, setSearch] = useState("");
|
|
25343
|
-
const [activeCategory, setActiveCategory] = useState(ALL_CATEGORY);
|
|
25344
|
-
const gridRef = useRef(null);
|
|
25345
|
-
const categoryChips = useMemo(() => {
|
|
25346
|
-
if (categories !== void 0) return categories;
|
|
25347
|
-
const seen = [];
|
|
25348
|
-
for (const item of items) {
|
|
25349
|
-
if (!seen.includes(item.category)) seen.push(item.category);
|
|
25350
|
-
}
|
|
25351
|
-
return seen;
|
|
25352
|
-
}, [categories, items]);
|
|
25353
|
-
const filtered = useMemo(() => {
|
|
25354
|
-
const needle = search.trim().toLowerCase();
|
|
25355
|
-
return items.filter((item) => {
|
|
25356
|
-
const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
|
|
25357
|
-
const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
|
|
25358
|
-
return matchesCategory && matchesSearch;
|
|
25359
|
-
});
|
|
25360
|
-
}, [items, search, activeCategory]);
|
|
25361
|
-
const select = useCallback(
|
|
25362
|
-
(item) => {
|
|
25363
|
-
onChange(item.id);
|
|
25364
|
-
},
|
|
25365
|
-
[onChange]
|
|
25366
|
-
);
|
|
25367
|
-
const handleKeyDown = useCallback(
|
|
25368
|
-
(e, index) => {
|
|
25369
|
-
const cells = gridRef.current?.querySelectorAll(
|
|
25370
|
-
"[data-gridpicker-cell]"
|
|
25371
|
-
);
|
|
25372
|
-
if (cells === void 0 || cells.length === 0) return;
|
|
25373
|
-
const columns = (() => {
|
|
25374
|
-
const grid = gridRef.current;
|
|
25375
|
-
if (grid === null) return 1;
|
|
25376
|
-
const style = window.getComputedStyle(grid);
|
|
25377
|
-
const cols = style.gridTemplateColumns.split(" ").filter(Boolean).length;
|
|
25378
|
-
return cols > 0 ? cols : 1;
|
|
25379
|
-
})();
|
|
25380
|
-
let next = -1;
|
|
25381
|
-
if (e.key === "ArrowRight") next = index + 1;
|
|
25382
|
-
else if (e.key === "ArrowLeft") next = index - 1;
|
|
25383
|
-
else if (e.key === "ArrowDown") next = index + columns;
|
|
25384
|
-
else if (e.key === "ArrowUp") next = index - columns;
|
|
25385
|
-
else if (e.key === "Enter" || e.key === " ") {
|
|
25386
|
-
e.preventDefault();
|
|
25387
|
-
select(filtered[index]);
|
|
25388
|
-
return;
|
|
25389
|
-
} else {
|
|
25390
|
-
return;
|
|
25391
|
-
}
|
|
25392
|
-
e.preventDefault();
|
|
25393
|
-
if (next >= 0 && next < cells.length) {
|
|
25394
|
-
cells[next].focus();
|
|
25395
|
-
}
|
|
25396
|
-
},
|
|
25397
|
-
[filtered, select]
|
|
25398
|
-
);
|
|
25399
|
-
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("w-full", className), children: [
|
|
25400
|
-
/* @__PURE__ */ jsx(
|
|
25401
|
-
Input,
|
|
25402
|
-
{
|
|
25403
|
-
type: "search",
|
|
25404
|
-
icon: "search",
|
|
25405
|
-
value: search,
|
|
25406
|
-
placeholder: searchPlaceholder,
|
|
25407
|
-
clearable: true,
|
|
25408
|
-
onClear: () => setSearch(""),
|
|
25409
|
-
onChange: (e) => setSearch(e.target.value)
|
|
25410
|
-
}
|
|
25411
|
-
),
|
|
25412
|
-
categoryChips.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "xs", wrap: true, children: [
|
|
25413
|
-
/* @__PURE__ */ jsx(
|
|
25414
|
-
Badge,
|
|
25415
|
-
{
|
|
25416
|
-
variant: activeCategory === ALL_CATEGORY ? "primary" : "neutral",
|
|
25417
|
-
size: "sm",
|
|
25418
|
-
role: "button",
|
|
25419
|
-
tabIndex: 0,
|
|
25420
|
-
"aria-pressed": activeCategory === ALL_CATEGORY,
|
|
25421
|
-
className: "cursor-pointer",
|
|
25422
|
-
onClick: () => setActiveCategory(ALL_CATEGORY),
|
|
25423
|
-
onKeyDown: (e) => {
|
|
25424
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
25425
|
-
e.preventDefault();
|
|
25426
|
-
setActiveCategory(ALL_CATEGORY);
|
|
25427
|
-
}
|
|
25428
|
-
},
|
|
25429
|
-
children: "All"
|
|
25430
|
-
}
|
|
25431
|
-
),
|
|
25432
|
-
categoryChips.map((category) => /* @__PURE__ */ jsx(
|
|
25433
|
-
Badge,
|
|
25434
|
-
{
|
|
25435
|
-
variant: activeCategory === category ? "primary" : "neutral",
|
|
25436
|
-
size: "sm",
|
|
25437
|
-
role: "button",
|
|
25438
|
-
tabIndex: 0,
|
|
25439
|
-
"aria-pressed": activeCategory === category,
|
|
25440
|
-
className: "cursor-pointer",
|
|
25441
|
-
onClick: () => setActiveCategory(category),
|
|
25442
|
-
onKeyDown: (e) => {
|
|
25443
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
25444
|
-
e.preventDefault();
|
|
25445
|
-
setActiveCategory(category);
|
|
25446
|
-
}
|
|
25447
|
-
},
|
|
25448
|
-
children: category
|
|
25449
|
-
},
|
|
25450
|
-
category
|
|
25451
|
-
))
|
|
25452
|
-
] }),
|
|
25453
|
-
/* @__PURE__ */ jsx(
|
|
25454
|
-
"div",
|
|
25455
|
-
{
|
|
25456
|
-
ref: gridRef,
|
|
25457
|
-
role: "listbox",
|
|
25458
|
-
className: "grid gap-1 overflow-y-auto max-h-64 p-1",
|
|
25459
|
-
style: {
|
|
25460
|
-
gridTemplateColumns: `repeat(auto-fill, minmax(${cellSize}px, 1fr))`
|
|
25461
|
-
},
|
|
25462
|
-
children: filtered.map((item, index) => {
|
|
25463
|
-
const selected = item.id === value;
|
|
25464
|
-
return /* @__PURE__ */ jsx(
|
|
25465
|
-
"button",
|
|
25466
|
-
{
|
|
25467
|
-
type: "button",
|
|
25468
|
-
role: "option",
|
|
25469
|
-
"aria-selected": selected,
|
|
25470
|
-
"aria-label": item.label,
|
|
25471
|
-
title: item.label,
|
|
25472
|
-
"data-gridpicker-cell": true,
|
|
25473
|
-
tabIndex: selected || value === void 0 && index === 0 ? 0 : -1,
|
|
25474
|
-
onClick: () => select(item),
|
|
25475
|
-
onKeyDown: (e) => handleKeyDown(e, index),
|
|
25476
|
-
className: cn(
|
|
25477
|
-
"flex items-center justify-center rounded-sm",
|
|
25478
|
-
"transition-colors hover:bg-muted",
|
|
25479
|
-
"focus:outline-none focus:ring-1 focus:ring-ring",
|
|
25480
|
-
selected && "bg-primary/10 ring-1 ring-primary"
|
|
25481
|
-
),
|
|
25482
|
-
style: { width: cellSize, height: cellSize },
|
|
25483
|
-
children: renderThumbnail(item)
|
|
25484
|
-
},
|
|
25485
|
-
item.id
|
|
25486
|
-
);
|
|
25487
|
-
})
|
|
25488
|
-
}
|
|
25489
|
-
)
|
|
25490
|
-
] });
|
|
25491
|
-
};
|
|
25492
|
-
GridPicker.displayName = "GridPicker";
|
|
25493
|
-
}
|
|
25494
|
-
});
|
|
25495
|
-
function iconForKind(kind) {
|
|
25496
|
-
if (kind === "audio") return "music";
|
|
25497
|
-
if (kind === "model") return "box";
|
|
25498
|
-
return "file";
|
|
25499
|
-
}
|
|
25500
|
-
var THUMB_PX, IMAGE_KINDS, AssetPicker;
|
|
25501
|
-
var init_AssetPicker = __esm({
|
|
25502
|
-
"components/core/molecules/AssetPicker.tsx"() {
|
|
25503
|
-
"use client";
|
|
25504
|
-
init_GridPicker();
|
|
25505
|
-
init_Icon();
|
|
25506
|
-
THUMB_PX = 32;
|
|
25507
|
-
IMAGE_KINDS = /* @__PURE__ */ new Set([
|
|
25508
|
-
"image",
|
|
25509
|
-
"spritesheet",
|
|
25510
|
-
"scene",
|
|
25511
|
-
"portrait"
|
|
25512
|
-
]);
|
|
25513
|
-
AssetPicker = ({
|
|
25514
|
-
assets,
|
|
25515
|
-
value,
|
|
25516
|
-
onChange,
|
|
25517
|
-
className
|
|
25518
|
-
}) => {
|
|
25519
|
-
const byUrl = useMemo(() => {
|
|
25520
|
-
const map = /* @__PURE__ */ new Map();
|
|
25521
|
-
for (const entry of assets) map.set(entry.url, entry);
|
|
25522
|
-
return map;
|
|
25523
|
-
}, [assets]);
|
|
25524
|
-
const items = useMemo(
|
|
25525
|
-
() => assets.map((entry) => ({
|
|
25526
|
-
id: entry.url,
|
|
25527
|
-
label: entry.name,
|
|
25528
|
-
category: entry.category
|
|
25529
|
-
})),
|
|
25530
|
-
[assets]
|
|
25531
|
-
);
|
|
25532
|
-
const categories = useMemo(() => {
|
|
25533
|
-
const seen = [];
|
|
25534
|
-
for (const entry of assets) {
|
|
25535
|
-
if (!seen.includes(entry.category)) seen.push(entry.category);
|
|
25536
|
-
}
|
|
25537
|
-
return seen;
|
|
25538
|
-
}, [assets]);
|
|
25539
|
-
const renderThumbnail = useCallback(
|
|
25540
|
-
(item) => {
|
|
25541
|
-
const entry = byUrl.get(item.id);
|
|
25542
|
-
if (entry === void 0) return null;
|
|
25543
|
-
if (IMAGE_KINDS.has(entry.kind)) {
|
|
25544
|
-
return /* @__PURE__ */ jsx(
|
|
25545
|
-
"img",
|
|
25546
|
-
{
|
|
25547
|
-
src: entry.thumbnailUrl ?? entry.url,
|
|
25548
|
-
alt: entry.name,
|
|
25549
|
-
loading: "lazy",
|
|
25550
|
-
width: THUMB_PX,
|
|
25551
|
-
height: THUMB_PX,
|
|
25552
|
-
style: { width: THUMB_PX, height: THUMB_PX, objectFit: "cover" }
|
|
25553
|
-
}
|
|
25554
|
-
);
|
|
25555
|
-
}
|
|
25556
|
-
return /* @__PURE__ */ jsx(Icon, { name: iconForKind(entry.kind), size: "sm" });
|
|
25557
|
-
},
|
|
25558
|
-
[byUrl]
|
|
25559
|
-
);
|
|
25560
|
-
return /* @__PURE__ */ jsx(
|
|
25561
|
-
GridPicker,
|
|
25562
|
-
{
|
|
25563
|
-
items,
|
|
25564
|
-
value,
|
|
25565
|
-
onChange,
|
|
25566
|
-
categories,
|
|
25567
|
-
renderThumbnail,
|
|
25568
|
-
cellSize: THUMB_PX,
|
|
25569
|
-
className
|
|
25570
|
-
}
|
|
25571
|
-
);
|
|
25572
|
-
};
|
|
25573
|
-
AssetPicker.displayName = "AssetPicker";
|
|
25574
|
-
}
|
|
25575
|
-
});
|
|
25576
25576
|
function pascalToKebab(name) {
|
|
25577
25577
|
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
25578
25578
|
}
|
|
@@ -26053,9 +26053,9 @@ function ScoreDisplay({
|
|
|
26053
26053
|
...rest
|
|
26054
26054
|
}) {
|
|
26055
26055
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
26056
|
-
const [displayValue, setDisplayValue] =
|
|
26057
|
-
const [isAnimating, setIsAnimating] =
|
|
26058
|
-
|
|
26056
|
+
const [displayValue, setDisplayValue] = React83.useState(resolvedValue);
|
|
26057
|
+
const [isAnimating, setIsAnimating] = React83.useState(false);
|
|
26058
|
+
React83.useEffect(() => {
|
|
26059
26059
|
if (!animated || displayValue === resolvedValue) {
|
|
26060
26060
|
setDisplayValue(resolvedValue);
|
|
26061
26061
|
return;
|
|
@@ -26202,7 +26202,7 @@ function InventoryGrid({
|
|
|
26202
26202
|
const eventBus = useEventBus();
|
|
26203
26203
|
const slotCount = totalSlots ?? items.length;
|
|
26204
26204
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
26205
|
-
const handleSelect =
|
|
26205
|
+
const handleSelect = React83.useCallback(
|
|
26206
26206
|
(id) => {
|
|
26207
26207
|
onSelect?.(id);
|
|
26208
26208
|
if (selectEvent) {
|
|
@@ -26488,31 +26488,31 @@ function GameCanvas2D({
|
|
|
26488
26488
|
assetBaseUrl = "",
|
|
26489
26489
|
className
|
|
26490
26490
|
}) {
|
|
26491
|
-
const canvasRef =
|
|
26492
|
-
const rafRef =
|
|
26493
|
-
const frameRef =
|
|
26494
|
-
const lastTimeRef =
|
|
26495
|
-
const imageCache =
|
|
26491
|
+
const canvasRef = React83.useRef(null);
|
|
26492
|
+
const rafRef = React83.useRef(0);
|
|
26493
|
+
const frameRef = React83.useRef(0);
|
|
26494
|
+
const lastTimeRef = React83.useRef(0);
|
|
26495
|
+
const imageCache = React83.useRef(/* @__PURE__ */ new Map());
|
|
26496
26496
|
const emit = useEmitEvent();
|
|
26497
|
-
const onDrawRef =
|
|
26497
|
+
const onDrawRef = React83.useRef(onDraw);
|
|
26498
26498
|
onDrawRef.current = onDraw;
|
|
26499
|
-
const onTickRef =
|
|
26499
|
+
const onTickRef = React83.useRef(onTick);
|
|
26500
26500
|
onTickRef.current = onTick;
|
|
26501
|
-
const tickEventRef =
|
|
26501
|
+
const tickEventRef = React83.useRef(tickEvent);
|
|
26502
26502
|
tickEventRef.current = tickEvent;
|
|
26503
|
-
const drawEventRef =
|
|
26503
|
+
const drawEventRef = React83.useRef(drawEvent);
|
|
26504
26504
|
drawEventRef.current = drawEvent;
|
|
26505
|
-
const emitRef =
|
|
26505
|
+
const emitRef = React83.useRef(emit);
|
|
26506
26506
|
emitRef.current = emit;
|
|
26507
|
-
const assetBaseUrlRef =
|
|
26507
|
+
const assetBaseUrlRef = React83.useRef(assetBaseUrl);
|
|
26508
26508
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
26509
|
-
const backgroundImageRef =
|
|
26509
|
+
const backgroundImageRef = React83.useRef(backgroundImage);
|
|
26510
26510
|
backgroundImageRef.current = backgroundImage;
|
|
26511
|
-
const widthRef =
|
|
26511
|
+
const widthRef = React83.useRef(width);
|
|
26512
26512
|
widthRef.current = width;
|
|
26513
|
-
const heightRef =
|
|
26513
|
+
const heightRef = React83.useRef(height);
|
|
26514
26514
|
heightRef.current = height;
|
|
26515
|
-
const loadImage =
|
|
26515
|
+
const loadImage = React83.useCallback((url) => {
|
|
26516
26516
|
const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
|
|
26517
26517
|
const cached = imageCache.current.get(fullUrl);
|
|
26518
26518
|
if (cached?.complete && cached.naturalWidth > 0) return cached;
|
|
@@ -26524,7 +26524,7 @@ function GameCanvas2D({
|
|
|
26524
26524
|
}
|
|
26525
26525
|
return null;
|
|
26526
26526
|
}, []);
|
|
26527
|
-
|
|
26527
|
+
React83.useEffect(() => {
|
|
26528
26528
|
const canvas = canvasRef.current;
|
|
26529
26529
|
if (!canvas) return;
|
|
26530
26530
|
const ctx = canvas.getContext("2d");
|
|
@@ -26879,7 +26879,7 @@ function TurnPanel({
|
|
|
26879
26879
|
className
|
|
26880
26880
|
}) {
|
|
26881
26881
|
const eventBus = useEventBus();
|
|
26882
|
-
const handleAction =
|
|
26882
|
+
const handleAction = React83.useCallback(
|
|
26883
26883
|
(event) => {
|
|
26884
26884
|
if (event) {
|
|
26885
26885
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -27025,7 +27025,7 @@ function UnitCommandBar({
|
|
|
27025
27025
|
className
|
|
27026
27026
|
}) {
|
|
27027
27027
|
const eventBus = useEventBus();
|
|
27028
|
-
const handleCommand =
|
|
27028
|
+
const handleCommand = React83.useCallback(
|
|
27029
27029
|
(event) => {
|
|
27030
27030
|
if (event) {
|
|
27031
27031
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -27510,7 +27510,7 @@ function GameMenu({
|
|
|
27510
27510
|
} catch {
|
|
27511
27511
|
}
|
|
27512
27512
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
27513
|
-
const handleOptionClick =
|
|
27513
|
+
const handleOptionClick = React83.useCallback(
|
|
27514
27514
|
(option) => {
|
|
27515
27515
|
if (option.event && eventBus) {
|
|
27516
27516
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -27624,7 +27624,7 @@ function GameOverScreen({
|
|
|
27624
27624
|
} catch {
|
|
27625
27625
|
}
|
|
27626
27626
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
27627
|
-
const handleActionClick =
|
|
27627
|
+
const handleActionClick = React83.useCallback(
|
|
27628
27628
|
(action) => {
|
|
27629
27629
|
if (action.event && eventBus) {
|
|
27630
27630
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -29123,8 +29123,8 @@ function TableView({
|
|
|
29123
29123
|
}) {
|
|
29124
29124
|
const eventBus = useEventBus();
|
|
29125
29125
|
const { t } = useTranslate();
|
|
29126
|
-
const [visibleCount, setVisibleCount] =
|
|
29127
|
-
const [localSelected, setLocalSelected] =
|
|
29126
|
+
const [visibleCount, setVisibleCount] = React83__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29127
|
+
const [localSelected, setLocalSelected] = React83__default.useState(/* @__PURE__ */ new Set());
|
|
29128
29128
|
const colDefs = columns ?? fields ?? [];
|
|
29129
29129
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
29130
29130
|
const dnd = useDataDnd({
|
|
@@ -29319,12 +29319,12 @@ function TableView({
|
|
|
29319
29319
|
]
|
|
29320
29320
|
}
|
|
29321
29321
|
);
|
|
29322
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
29322
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React83__default.Fragment, { children: rowInner }, id);
|
|
29323
29323
|
};
|
|
29324
29324
|
const items = data.map((row) => row);
|
|
29325
29325
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
29326
29326
|
let runningIndex = 0;
|
|
29327
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
29327
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
29328
29328
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
29329
29329
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
29330
29330
|
] }, gi)) });
|
|
@@ -30676,7 +30676,7 @@ var init_StepFlow = __esm({
|
|
|
30676
30676
|
className
|
|
30677
30677
|
}) => {
|
|
30678
30678
|
if (orientation === "vertical") {
|
|
30679
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
30679
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React83__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
30680
30680
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
30681
30681
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30682
30682
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -30687,7 +30687,7 @@ var init_StepFlow = __esm({
|
|
|
30687
30687
|
] })
|
|
30688
30688
|
] }) }, index)) });
|
|
30689
30689
|
}
|
|
30690
|
-
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(
|
|
30690
|
+
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(React83__default.Fragment, { children: [
|
|
30691
30691
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
30692
30692
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30693
30693
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31663,7 +31663,7 @@ var init_LikertScale = __esm({
|
|
|
31663
31663
|
md: "text-base",
|
|
31664
31664
|
lg: "text-lg"
|
|
31665
31665
|
};
|
|
31666
|
-
LikertScale =
|
|
31666
|
+
LikertScale = React83__default.forwardRef(
|
|
31667
31667
|
({
|
|
31668
31668
|
question,
|
|
31669
31669
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -31675,7 +31675,7 @@ var init_LikertScale = __esm({
|
|
|
31675
31675
|
variant = "radios",
|
|
31676
31676
|
className
|
|
31677
31677
|
}, ref) => {
|
|
31678
|
-
const groupId =
|
|
31678
|
+
const groupId = React83__default.useId();
|
|
31679
31679
|
const eventBus = useEventBus();
|
|
31680
31680
|
const handleSelect = useCallback(
|
|
31681
31681
|
(next) => {
|
|
@@ -33983,7 +33983,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
33983
33983
|
"aria-label": t("aria.breadcrumb"),
|
|
33984
33984
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
33985
33985
|
const isLast = idx === items.length - 1;
|
|
33986
|
-
return /* @__PURE__ */ jsxs(
|
|
33986
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
33987
33987
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
33988
33988
|
Icon,
|
|
33989
33989
|
{
|
|
@@ -34594,7 +34594,7 @@ var init_GradientDivider = __esm({
|
|
|
34594
34594
|
});
|
|
34595
34595
|
var MarketingFooter;
|
|
34596
34596
|
var init_MarketingFooter = __esm({
|
|
34597
|
-
"components/
|
|
34597
|
+
"components/marketing/molecules/MarketingFooter.tsx"() {
|
|
34598
34598
|
"use client";
|
|
34599
34599
|
init_cn();
|
|
34600
34600
|
init_Box();
|
|
@@ -34664,7 +34664,7 @@ var init_MarketingFooter = __esm({
|
|
|
34664
34664
|
});
|
|
34665
34665
|
var PullQuote;
|
|
34666
34666
|
var init_PullQuote = __esm({
|
|
34667
|
-
"components/
|
|
34667
|
+
"components/marketing/molecules/PullQuote.tsx"() {
|
|
34668
34668
|
"use client";
|
|
34669
34669
|
init_cn();
|
|
34670
34670
|
init_Box();
|
|
@@ -34947,7 +34947,7 @@ var init_MiniStateMachine = __esm({
|
|
|
34947
34947
|
const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
|
|
34948
34948
|
const tc = transitionCounts[s.name] ?? 0;
|
|
34949
34949
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
34950
|
-
return /* @__PURE__ */ jsxs(
|
|
34950
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
34951
34951
|
/* @__PURE__ */ jsx(
|
|
34952
34952
|
AvlState,
|
|
34953
34953
|
{
|
|
@@ -35151,7 +35151,7 @@ var init_PageHeader = __esm({
|
|
|
35151
35151
|
info: "bg-info/10 text-info"
|
|
35152
35152
|
};
|
|
35153
35153
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35154
|
-
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(
|
|
35154
|
+
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(React83__default.Fragment, { children: [
|
|
35155
35155
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35156
35156
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35157
35157
|
"a",
|
|
@@ -35260,7 +35260,7 @@ var init_FormSection = __esm({
|
|
|
35260
35260
|
columns = 1,
|
|
35261
35261
|
className
|
|
35262
35262
|
}) => {
|
|
35263
|
-
const [collapsed, setCollapsed] =
|
|
35263
|
+
const [collapsed, setCollapsed] = React83__default.useState(defaultCollapsed);
|
|
35264
35264
|
const { t } = useTranslate();
|
|
35265
35265
|
const eventBus = useEventBus();
|
|
35266
35266
|
const gridClass = {
|
|
@@ -35268,7 +35268,7 @@ var init_FormSection = __esm({
|
|
|
35268
35268
|
2: "grid-cols-1 md:grid-cols-2",
|
|
35269
35269
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
35270
35270
|
}[columns];
|
|
35271
|
-
|
|
35271
|
+
React83__default.useCallback(() => {
|
|
35272
35272
|
if (collapsible) {
|
|
35273
35273
|
setCollapsed((prev) => !prev);
|
|
35274
35274
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -35375,8 +35375,8 @@ function TextLikeControl({
|
|
|
35375
35375
|
onCommit
|
|
35376
35376
|
}) {
|
|
35377
35377
|
const initial = value === void 0 || value === null ? "" : String(value);
|
|
35378
|
-
const [draft, setDraft] =
|
|
35379
|
-
|
|
35378
|
+
const [draft, setDraft] = React83__default.useState(initial);
|
|
35379
|
+
React83__default.useEffect(() => setDraft(initial), [initial]);
|
|
35380
35380
|
const commit = () => {
|
|
35381
35381
|
if (numeric) {
|
|
35382
35382
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -35407,21 +35407,17 @@ function FieldControl({
|
|
|
35407
35407
|
}) {
|
|
35408
35408
|
let control;
|
|
35409
35409
|
const stringValue = typeof value === "string" ? value : void 0;
|
|
35410
|
-
if (decl.
|
|
35410
|
+
if (decl.type === "icon") {
|
|
35411
35411
|
control = /* @__PURE__ */ jsx(IconPicker, { value: stringValue, onChange: (icon) => onChange(name, icon) });
|
|
35412
|
-
} else if (decl.
|
|
35413
|
-
control = /* @__PURE__ */ jsx(AssetPicker, { assets, value: stringValue, onChange: (url) => onChange(name, url) });
|
|
35414
|
-
} else if (decl.control === "color" && decl.values !== void 0 && decl.values.length > 0) {
|
|
35412
|
+
} else if (decl.type === "asset") {
|
|
35415
35413
|
control = /* @__PURE__ */ jsx(
|
|
35416
|
-
|
|
35414
|
+
AssetPicker,
|
|
35417
35415
|
{
|
|
35418
|
-
|
|
35419
|
-
value: stringValue
|
|
35420
|
-
onChange: (
|
|
35416
|
+
assets: assets ?? [],
|
|
35417
|
+
value: stringValue,
|
|
35418
|
+
onChange: (url) => onChange(name, url)
|
|
35421
35419
|
}
|
|
35422
35420
|
);
|
|
35423
|
-
} else if (decl.control === "asset" || decl.control === "color") {
|
|
35424
|
-
control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
|
|
35425
35421
|
} else if (decl.type === "boolean") {
|
|
35426
35422
|
control = /* @__PURE__ */ jsx(Switch, { checked: value === true, onChange: (c) => onChange(name, c) });
|
|
35427
35423
|
} else if (decl.type === "string" && decl.values !== void 0 && decl.values.length > 0) {
|
|
@@ -36157,7 +36153,7 @@ var init_WizardContainer = __esm({
|
|
|
36157
36153
|
const isCompleted = index < currentStep;
|
|
36158
36154
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36159
36155
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36160
|
-
return /* @__PURE__ */ jsxs(
|
|
36156
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
36161
36157
|
/* @__PURE__ */ jsx(
|
|
36162
36158
|
Button,
|
|
36163
36159
|
{
|
|
@@ -38604,7 +38600,7 @@ var init_DialogueBubble = __esm({
|
|
|
38604
38600
|
}
|
|
38605
38601
|
});
|
|
38606
38602
|
function extractTitle(children) {
|
|
38607
|
-
if (!
|
|
38603
|
+
if (!React83__default.isValidElement(children)) return void 0;
|
|
38608
38604
|
const props = children.props;
|
|
38609
38605
|
if (typeof props.title === "string") {
|
|
38610
38606
|
return props.title;
|
|
@@ -38716,7 +38712,7 @@ function LinearView({
|
|
|
38716
38712
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
38717
38713
|
const isDone = i < currentIdx;
|
|
38718
38714
|
const isCurrent = i === currentIdx;
|
|
38719
|
-
return /* @__PURE__ */ jsxs(
|
|
38715
|
+
return /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
38720
38716
|
i > 0 && /* @__PURE__ */ jsx(
|
|
38721
38717
|
Typography,
|
|
38722
38718
|
{
|
|
@@ -39426,7 +39422,7 @@ var init_FeatureDetailPageTemplate = __esm({
|
|
|
39426
39422
|
});
|
|
39427
39423
|
var FeatureGridOrganism;
|
|
39428
39424
|
var init_FeatureGridOrganism = __esm({
|
|
39429
|
-
"components/
|
|
39425
|
+
"components/marketing/organisms/FeatureGridOrganism.tsx"() {
|
|
39430
39426
|
"use client";
|
|
39431
39427
|
init_cn();
|
|
39432
39428
|
init_useEventBus();
|
|
@@ -39674,12 +39670,12 @@ var init_Form = __esm({
|
|
|
39674
39670
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
39675
39671
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
39676
39672
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
39677
|
-
const normalizedInitialData =
|
|
39673
|
+
const normalizedInitialData = React83__default.useMemo(() => {
|
|
39678
39674
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
39679
39675
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
39680
39676
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
39681
39677
|
}, [entity, initialData]);
|
|
39682
|
-
const entityDerivedFields =
|
|
39678
|
+
const entityDerivedFields = React83__default.useMemo(() => {
|
|
39683
39679
|
if (fields && fields.length > 0) return void 0;
|
|
39684
39680
|
if (!resolvedEntity) return void 0;
|
|
39685
39681
|
return resolvedEntity.fields.map(
|
|
@@ -39699,16 +39695,16 @@ var init_Form = __esm({
|
|
|
39699
39695
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
39700
39696
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
39701
39697
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
39702
|
-
const [formData, setFormData] =
|
|
39698
|
+
const [formData, setFormData] = React83__default.useState(
|
|
39703
39699
|
normalizedInitialData
|
|
39704
39700
|
);
|
|
39705
|
-
const [collapsedSections, setCollapsedSections] =
|
|
39701
|
+
const [collapsedSections, setCollapsedSections] = React83__default.useState(
|
|
39706
39702
|
/* @__PURE__ */ new Set()
|
|
39707
39703
|
);
|
|
39708
|
-
const [submitError, setSubmitError] =
|
|
39709
|
-
const formRef =
|
|
39704
|
+
const [submitError, setSubmitError] = React83__default.useState(null);
|
|
39705
|
+
const formRef = React83__default.useRef(null);
|
|
39710
39706
|
const formMode = props.mode;
|
|
39711
|
-
const mountedRef =
|
|
39707
|
+
const mountedRef = React83__default.useRef(false);
|
|
39712
39708
|
if (!mountedRef.current) {
|
|
39713
39709
|
mountedRef.current = true;
|
|
39714
39710
|
debug("forms", "mount", {
|
|
@@ -39721,7 +39717,7 @@ var init_Form = __esm({
|
|
|
39721
39717
|
});
|
|
39722
39718
|
}
|
|
39723
39719
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
39724
|
-
const evalContext =
|
|
39720
|
+
const evalContext = React83__default.useMemo(
|
|
39725
39721
|
() => ({
|
|
39726
39722
|
formValues: formData,
|
|
39727
39723
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -39730,7 +39726,7 @@ var init_Form = __esm({
|
|
|
39730
39726
|
}),
|
|
39731
39727
|
[formData, externalContext]
|
|
39732
39728
|
);
|
|
39733
|
-
|
|
39729
|
+
React83__default.useEffect(() => {
|
|
39734
39730
|
debug("forms", "initialData-sync", {
|
|
39735
39731
|
mode: formMode,
|
|
39736
39732
|
normalizedInitialData,
|
|
@@ -39741,7 +39737,7 @@ var init_Form = __esm({
|
|
|
39741
39737
|
setFormData(normalizedInitialData);
|
|
39742
39738
|
}
|
|
39743
39739
|
}, [normalizedInitialData]);
|
|
39744
|
-
const processCalculations =
|
|
39740
|
+
const processCalculations = React83__default.useCallback(
|
|
39745
39741
|
(changedFieldId, newFormData) => {
|
|
39746
39742
|
if (!hiddenCalculations.length) return;
|
|
39747
39743
|
const context = {
|
|
@@ -39766,7 +39762,7 @@ var init_Form = __esm({
|
|
|
39766
39762
|
},
|
|
39767
39763
|
[hiddenCalculations, externalContext, eventBus]
|
|
39768
39764
|
);
|
|
39769
|
-
const checkViolations =
|
|
39765
|
+
const checkViolations = React83__default.useCallback(
|
|
39770
39766
|
(changedFieldId, newFormData) => {
|
|
39771
39767
|
if (!violationTriggers.length) return;
|
|
39772
39768
|
const context = {
|
|
@@ -39804,7 +39800,7 @@ var init_Form = __esm({
|
|
|
39804
39800
|
processCalculations(name, newFormData);
|
|
39805
39801
|
checkViolations(name, newFormData);
|
|
39806
39802
|
};
|
|
39807
|
-
const isFieldVisible =
|
|
39803
|
+
const isFieldVisible = React83__default.useCallback(
|
|
39808
39804
|
(fieldName) => {
|
|
39809
39805
|
const condition = conditionalFields[fieldName];
|
|
39810
39806
|
if (!condition) return true;
|
|
@@ -39812,7 +39808,7 @@ var init_Form = __esm({
|
|
|
39812
39808
|
},
|
|
39813
39809
|
[conditionalFields, evalContext]
|
|
39814
39810
|
);
|
|
39815
|
-
const isSectionVisible =
|
|
39811
|
+
const isSectionVisible = React83__default.useCallback(
|
|
39816
39812
|
(section) => {
|
|
39817
39813
|
if (!section.condition) return true;
|
|
39818
39814
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -39888,7 +39884,7 @@ var init_Form = __esm({
|
|
|
39888
39884
|
eventBus.emit(`UI:${onCancel}`);
|
|
39889
39885
|
}
|
|
39890
39886
|
};
|
|
39891
|
-
const renderField =
|
|
39887
|
+
const renderField = React83__default.useCallback(
|
|
39892
39888
|
(field) => {
|
|
39893
39889
|
const fieldName = field.name || field.field;
|
|
39894
39890
|
if (!fieldName) return null;
|
|
@@ -39909,7 +39905,7 @@ var init_Form = __esm({
|
|
|
39909
39905
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
39910
39906
|
);
|
|
39911
39907
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
39912
|
-
const normalizedFields =
|
|
39908
|
+
const normalizedFields = React83__default.useMemo(() => {
|
|
39913
39909
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
39914
39910
|
return effectiveFields.map((field) => {
|
|
39915
39911
|
if (typeof field === "string") {
|
|
@@ -39932,7 +39928,7 @@ var init_Form = __esm({
|
|
|
39932
39928
|
return field;
|
|
39933
39929
|
});
|
|
39934
39930
|
}, [effectiveFields, resolvedEntity]);
|
|
39935
|
-
const schemaFields =
|
|
39931
|
+
const schemaFields = React83__default.useMemo(() => {
|
|
39936
39932
|
if (normalizedFields.length === 0) return null;
|
|
39937
39933
|
if (isDebugEnabled()) {
|
|
39938
39934
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -39942,7 +39938,7 @@ var init_Form = __esm({
|
|
|
39942
39938
|
}
|
|
39943
39939
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
39944
39940
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
39945
|
-
const sectionElements =
|
|
39941
|
+
const sectionElements = React83__default.useMemo(() => {
|
|
39946
39942
|
if (!sections || sections.length === 0) return null;
|
|
39947
39943
|
return sections.map((section) => {
|
|
39948
39944
|
if (!isSectionVisible(section)) {
|
|
@@ -40780,7 +40776,7 @@ var init_GenericAppTemplate = __esm({
|
|
|
40780
40776
|
});
|
|
40781
40777
|
var HeroOrganism, _HeroClickInterceptor;
|
|
40782
40778
|
var init_HeroOrganism = __esm({
|
|
40783
|
-
"components/
|
|
40779
|
+
"components/marketing/organisms/HeroOrganism.tsx"() {
|
|
40784
40780
|
"use client";
|
|
40785
40781
|
init_cn();
|
|
40786
40782
|
init_useEventBus();
|
|
@@ -41224,7 +41220,7 @@ var init_List = __esm({
|
|
|
41224
41220
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
41225
41221
|
return [];
|
|
41226
41222
|
}, [entity]);
|
|
41227
|
-
const getItemActions =
|
|
41223
|
+
const getItemActions = React83__default.useCallback(
|
|
41228
41224
|
(item) => {
|
|
41229
41225
|
if (!itemActions) return [];
|
|
41230
41226
|
if (typeof itemActions === "function") {
|
|
@@ -41700,7 +41696,7 @@ var init_MediaGallery = __esm({
|
|
|
41700
41696
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
41701
41697
|
);
|
|
41702
41698
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
41703
|
-
const items =
|
|
41699
|
+
const items = React83__default.useMemo(() => {
|
|
41704
41700
|
if (propItems) return propItems;
|
|
41705
41701
|
if (entityData.length === 0) return [];
|
|
41706
41702
|
return entityData.map((record, idx) => ({
|
|
@@ -41870,9 +41866,9 @@ function MiniMap({
|
|
|
41870
41866
|
viewportRect,
|
|
41871
41867
|
className
|
|
41872
41868
|
}) {
|
|
41873
|
-
const canvasRef =
|
|
41874
|
-
const frameRef =
|
|
41875
|
-
|
|
41869
|
+
const canvasRef = React83.useRef(null);
|
|
41870
|
+
const frameRef = React83.useRef(0);
|
|
41871
|
+
React83.useEffect(() => {
|
|
41876
41872
|
const canvas = canvasRef.current;
|
|
41877
41873
|
if (!canvas) return;
|
|
41878
41874
|
const ctx = canvas.getContext("2d");
|
|
@@ -41954,7 +41950,7 @@ var init_MiniMap = __esm({
|
|
|
41954
41950
|
}
|
|
41955
41951
|
});
|
|
41956
41952
|
function extractTitle2(children) {
|
|
41957
|
-
if (!
|
|
41953
|
+
if (!React83__default.isValidElement(children)) return void 0;
|
|
41958
41954
|
const props = children.props;
|
|
41959
41955
|
if (typeof props.title === "string") {
|
|
41960
41956
|
return props.title;
|
|
@@ -42411,7 +42407,7 @@ var init_debugRegistry = __esm({
|
|
|
42411
42407
|
}
|
|
42412
42408
|
});
|
|
42413
42409
|
function useDebugData() {
|
|
42414
|
-
const [data, setData] =
|
|
42410
|
+
const [data, setData] = React83.useState(() => ({
|
|
42415
42411
|
traits: [],
|
|
42416
42412
|
ticks: [],
|
|
42417
42413
|
guards: [],
|
|
@@ -42425,7 +42421,7 @@ function useDebugData() {
|
|
|
42425
42421
|
},
|
|
42426
42422
|
lastUpdate: Date.now()
|
|
42427
42423
|
}));
|
|
42428
|
-
|
|
42424
|
+
React83.useEffect(() => {
|
|
42429
42425
|
const updateData = () => {
|
|
42430
42426
|
setData({
|
|
42431
42427
|
traits: getAllTraits(),
|
|
@@ -42534,12 +42530,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42534
42530
|
return positions;
|
|
42535
42531
|
}
|
|
42536
42532
|
function WalkMinimap() {
|
|
42537
|
-
const [walkStep, setWalkStep] =
|
|
42538
|
-
const [traits2, setTraits] =
|
|
42539
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42540
|
-
const [completedTraits, setCompletedTraits] =
|
|
42541
|
-
const prevTraitRef =
|
|
42542
|
-
|
|
42533
|
+
const [walkStep, setWalkStep] = React83.useState(null);
|
|
42534
|
+
const [traits2, setTraits] = React83.useState([]);
|
|
42535
|
+
const [coveredEdges, setCoveredEdges] = React83.useState([]);
|
|
42536
|
+
const [completedTraits, setCompletedTraits] = React83.useState(/* @__PURE__ */ new Set());
|
|
42537
|
+
const prevTraitRef = React83.useRef(null);
|
|
42538
|
+
React83.useEffect(() => {
|
|
42543
42539
|
const interval = setInterval(() => {
|
|
42544
42540
|
const w = window;
|
|
42545
42541
|
const step = w.__orbitalWalkStep;
|
|
@@ -42975,15 +42971,15 @@ var init_EntitiesTab = __esm({
|
|
|
42975
42971
|
});
|
|
42976
42972
|
function EventFlowTab({ events: events2 }) {
|
|
42977
42973
|
const { t } = useTranslate();
|
|
42978
|
-
const [filter, setFilter] =
|
|
42979
|
-
const containerRef =
|
|
42980
|
-
const [autoScroll, setAutoScroll] =
|
|
42981
|
-
|
|
42974
|
+
const [filter, setFilter] = React83.useState("all");
|
|
42975
|
+
const containerRef = React83.useRef(null);
|
|
42976
|
+
const [autoScroll, setAutoScroll] = React83.useState(true);
|
|
42977
|
+
React83.useEffect(() => {
|
|
42982
42978
|
if (autoScroll && containerRef.current) {
|
|
42983
42979
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
42984
42980
|
}
|
|
42985
42981
|
}, [events2.length, autoScroll]);
|
|
42986
|
-
const filteredEvents =
|
|
42982
|
+
const filteredEvents = React83.useMemo(() => {
|
|
42987
42983
|
if (filter === "all") return events2;
|
|
42988
42984
|
return events2.filter((e) => e.type === filter);
|
|
42989
42985
|
}, [events2, filter]);
|
|
@@ -43099,7 +43095,7 @@ var init_EventFlowTab = __esm({
|
|
|
43099
43095
|
});
|
|
43100
43096
|
function GuardsPanel({ guards }) {
|
|
43101
43097
|
const { t } = useTranslate();
|
|
43102
|
-
const [filter, setFilter] =
|
|
43098
|
+
const [filter, setFilter] = React83.useState("all");
|
|
43103
43099
|
if (guards.length === 0) {
|
|
43104
43100
|
return /* @__PURE__ */ jsx(
|
|
43105
43101
|
EmptyState,
|
|
@@ -43112,7 +43108,7 @@ function GuardsPanel({ guards }) {
|
|
|
43112
43108
|
}
|
|
43113
43109
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43114
43110
|
const failedCount = guards.length - passedCount;
|
|
43115
|
-
const filteredGuards =
|
|
43111
|
+
const filteredGuards = React83.useMemo(() => {
|
|
43116
43112
|
if (filter === "all") return guards;
|
|
43117
43113
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43118
43114
|
return guards.filter((g) => !g.result);
|
|
@@ -43275,10 +43271,10 @@ function EffectBadge({ effect }) {
|
|
|
43275
43271
|
}
|
|
43276
43272
|
function TransitionTimeline({ transitions }) {
|
|
43277
43273
|
const { t } = useTranslate();
|
|
43278
|
-
const containerRef =
|
|
43279
|
-
const [autoScroll, setAutoScroll] =
|
|
43280
|
-
const [expandedId, setExpandedId] =
|
|
43281
|
-
|
|
43274
|
+
const containerRef = React83.useRef(null);
|
|
43275
|
+
const [autoScroll, setAutoScroll] = React83.useState(true);
|
|
43276
|
+
const [expandedId, setExpandedId] = React83.useState(null);
|
|
43277
|
+
React83.useEffect(() => {
|
|
43282
43278
|
if (autoScroll && containerRef.current) {
|
|
43283
43279
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43284
43280
|
}
|
|
@@ -43558,9 +43554,9 @@ function getAllEvents(traits2) {
|
|
|
43558
43554
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43559
43555
|
const eventBus = useEventBus();
|
|
43560
43556
|
const { t } = useTranslate();
|
|
43561
|
-
const [log8, setLog] =
|
|
43562
|
-
const prevStatesRef =
|
|
43563
|
-
|
|
43557
|
+
const [log8, setLog] = React83.useState([]);
|
|
43558
|
+
const prevStatesRef = React83.useRef(/* @__PURE__ */ new Map());
|
|
43559
|
+
React83.useEffect(() => {
|
|
43564
43560
|
for (const trait of traits2) {
|
|
43565
43561
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43566
43562
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43729,10 +43725,10 @@ function VerifyModePanel({
|
|
|
43729
43725
|
localCount
|
|
43730
43726
|
}) {
|
|
43731
43727
|
const { t } = useTranslate();
|
|
43732
|
-
const [expanded, setExpanded] =
|
|
43733
|
-
const scrollRef =
|
|
43734
|
-
const prevCountRef =
|
|
43735
|
-
|
|
43728
|
+
const [expanded, setExpanded] = React83.useState(true);
|
|
43729
|
+
const scrollRef = React83.useRef(null);
|
|
43730
|
+
const prevCountRef = React83.useRef(0);
|
|
43731
|
+
React83.useEffect(() => {
|
|
43736
43732
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43737
43733
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43738
43734
|
}
|
|
@@ -43789,10 +43785,10 @@ function RuntimeDebugger({
|
|
|
43789
43785
|
schema
|
|
43790
43786
|
}) {
|
|
43791
43787
|
const { t } = useTranslate();
|
|
43792
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43793
|
-
const [isVisible, setIsVisible] =
|
|
43788
|
+
const [isCollapsed, setIsCollapsed] = React83.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43789
|
+
const [isVisible, setIsVisible] = React83.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43794
43790
|
const debugData = useDebugData();
|
|
43795
|
-
|
|
43791
|
+
React83.useEffect(() => {
|
|
43796
43792
|
if (mode === "inline") return;
|
|
43797
43793
|
return onDebugToggle((enabled) => {
|
|
43798
43794
|
setIsVisible(enabled);
|
|
@@ -43801,7 +43797,7 @@ function RuntimeDebugger({
|
|
|
43801
43797
|
}
|
|
43802
43798
|
});
|
|
43803
43799
|
}, [mode]);
|
|
43804
|
-
|
|
43800
|
+
React83.useEffect(() => {
|
|
43805
43801
|
if (mode === "inline") return;
|
|
43806
43802
|
const handleKeyDown = (e) => {
|
|
43807
43803
|
if (e.key === "`" && isVisible) {
|
|
@@ -44250,7 +44246,7 @@ function SequenceBar({
|
|
|
44250
44246
|
onSlotRemove(index);
|
|
44251
44247
|
}, [onSlotRemove, playing]);
|
|
44252
44248
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
44253
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
44249
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React83__default.Fragment, { children: [
|
|
44254
44250
|
i > 0 && /* @__PURE__ */ jsx(
|
|
44255
44251
|
Typography,
|
|
44256
44252
|
{
|
|
@@ -44526,7 +44522,7 @@ var init_SequencerBoard = __esm({
|
|
|
44526
44522
|
});
|
|
44527
44523
|
var ShowcaseOrganism;
|
|
44528
44524
|
var init_ShowcaseOrganism = __esm({
|
|
44529
|
-
"components/
|
|
44525
|
+
"components/marketing/organisms/ShowcaseOrganism.tsx"() {
|
|
44530
44526
|
"use client";
|
|
44531
44527
|
init_cn();
|
|
44532
44528
|
init_useEventBus();
|
|
@@ -45340,7 +45336,7 @@ var init_StatCard = __esm({
|
|
|
45340
45336
|
const labelToUse = propLabel ?? propTitle;
|
|
45341
45337
|
const eventBus = useEventBus();
|
|
45342
45338
|
const { t } = useTranslate();
|
|
45343
|
-
const handleActionClick =
|
|
45339
|
+
const handleActionClick = React83__default.useCallback(() => {
|
|
45344
45340
|
if (action?.event) {
|
|
45345
45341
|
eventBus.emit(`UI:${action.event}`, {});
|
|
45346
45342
|
}
|
|
@@ -45351,7 +45347,7 @@ var init_StatCard = __esm({
|
|
|
45351
45347
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
45352
45348
|
const isLoading = externalLoading ?? false;
|
|
45353
45349
|
const error = externalError;
|
|
45354
|
-
const computeMetricValue =
|
|
45350
|
+
const computeMetricValue = React83__default.useCallback(
|
|
45355
45351
|
(metric, items) => {
|
|
45356
45352
|
if (metric.value !== void 0) {
|
|
45357
45353
|
return metric.value;
|
|
@@ -45390,7 +45386,7 @@ var init_StatCard = __esm({
|
|
|
45390
45386
|
},
|
|
45391
45387
|
[]
|
|
45392
45388
|
);
|
|
45393
|
-
const schemaStats =
|
|
45389
|
+
const schemaStats = React83__default.useMemo(() => {
|
|
45394
45390
|
if (!metrics || metrics.length === 0) return null;
|
|
45395
45391
|
return metrics.map((metric) => ({
|
|
45396
45392
|
label: metric.label,
|
|
@@ -45398,7 +45394,7 @@ var init_StatCard = __esm({
|
|
|
45398
45394
|
format: metric.format
|
|
45399
45395
|
}));
|
|
45400
45396
|
}, [metrics, data, computeMetricValue]);
|
|
45401
|
-
const calculatedTrend =
|
|
45397
|
+
const calculatedTrend = React83__default.useMemo(() => {
|
|
45402
45398
|
if (manualTrend !== void 0) return manualTrend;
|
|
45403
45399
|
if (previousValue === void 0 || currentValue2 === void 0)
|
|
45404
45400
|
return void 0;
|
|
@@ -46133,7 +46129,7 @@ var init_StatusEffect = __esm({
|
|
|
46133
46129
|
});
|
|
46134
46130
|
var StepFlowOrganism;
|
|
46135
46131
|
var init_StepFlowOrganism = __esm({
|
|
46136
|
-
"components/
|
|
46132
|
+
"components/marketing/organisms/StepFlowOrganism.tsx"() {
|
|
46137
46133
|
"use client";
|
|
46138
46134
|
init_cn();
|
|
46139
46135
|
init_Stack();
|
|
@@ -46403,7 +46399,7 @@ var init_Timeline = __esm({
|
|
|
46403
46399
|
}) => {
|
|
46404
46400
|
const { t } = useTranslate();
|
|
46405
46401
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46406
|
-
const items =
|
|
46402
|
+
const items = React83__default.useMemo(() => {
|
|
46407
46403
|
if (propItems) return propItems;
|
|
46408
46404
|
if (entityData.length === 0) return [];
|
|
46409
46405
|
return entityData.map((record, idx) => {
|
|
@@ -46560,7 +46556,7 @@ var init_TimerDisplay = __esm({
|
|
|
46560
46556
|
}
|
|
46561
46557
|
});
|
|
46562
46558
|
function extractToastProps(children) {
|
|
46563
|
-
if (!
|
|
46559
|
+
if (!React83__default.isValidElement(children)) {
|
|
46564
46560
|
if (typeof children === "string") {
|
|
46565
46561
|
return { message: children };
|
|
46566
46562
|
}
|
|
@@ -46598,7 +46594,7 @@ var init_ToastSlot = __esm({
|
|
|
46598
46594
|
eventBus.emit("UI:CLOSE");
|
|
46599
46595
|
};
|
|
46600
46596
|
if (!isVisible) return null;
|
|
46601
|
-
const isCustomContent =
|
|
46597
|
+
const isCustomContent = React83__default.isValidElement(children) && !message;
|
|
46602
46598
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
46603
46599
|
Toast,
|
|
46604
46600
|
{
|
|
@@ -47118,8 +47114,8 @@ function XPBar({
|
|
|
47118
47114
|
}) {
|
|
47119
47115
|
const sizes = sizeMap18[size];
|
|
47120
47116
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
47121
|
-
const [fillWidth, setFillWidth] =
|
|
47122
|
-
|
|
47117
|
+
const [fillWidth, setFillWidth] = React83.useState(animated ? 0 : percentage);
|
|
47118
|
+
React83.useEffect(() => {
|
|
47123
47119
|
if (!animated) {
|
|
47124
47120
|
setFillWidth(percentage);
|
|
47125
47121
|
return;
|
|
@@ -47186,12 +47182,12 @@ var init_XPBar = __esm({
|
|
|
47186
47182
|
}
|
|
47187
47183
|
});
|
|
47188
47184
|
function lazyThree(name, loader) {
|
|
47189
|
-
const Lazy =
|
|
47185
|
+
const Lazy = React83__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
47190
47186
|
function ThreeWrapper(props) {
|
|
47191
|
-
return
|
|
47192
|
-
|
|
47187
|
+
return React83__default.createElement(
|
|
47188
|
+
React83__default.Suspense,
|
|
47193
47189
|
{ fallback: null },
|
|
47194
|
-
|
|
47190
|
+
React83__default.createElement(Lazy, props)
|
|
47195
47191
|
);
|
|
47196
47192
|
}
|
|
47197
47193
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -47211,6 +47207,7 @@ var init_component_registry_generated = __esm({
|
|
|
47211
47207
|
init_AnimatedReveal();
|
|
47212
47208
|
init_ArticleSection();
|
|
47213
47209
|
init_Aside();
|
|
47210
|
+
init_AssetPicker();
|
|
47214
47211
|
init_AuthLayout();
|
|
47215
47212
|
init_BattleBoard();
|
|
47216
47213
|
init_BattleTemplate();
|
|
@@ -47310,11 +47307,13 @@ var init_component_registry_generated = __esm({
|
|
|
47310
47307
|
init_GradientDivider();
|
|
47311
47308
|
init_GraphCanvas();
|
|
47312
47309
|
init_GraphView();
|
|
47310
|
+
init_GridPicker();
|
|
47313
47311
|
init_Header();
|
|
47314
47312
|
init_HealthBar();
|
|
47315
47313
|
init_HealthPanel();
|
|
47316
47314
|
init_HeroOrganism();
|
|
47317
47315
|
init_HeroSection();
|
|
47316
|
+
init_IconPicker();
|
|
47318
47317
|
init_InfiniteScrollSentinel();
|
|
47319
47318
|
init_InputGroup();
|
|
47320
47319
|
init_InstallBox();
|
|
@@ -47359,6 +47358,7 @@ var init_component_registry_generated = __esm({
|
|
|
47359
47358
|
init_PricingOrganism();
|
|
47360
47359
|
init_PricingPageTemplate();
|
|
47361
47360
|
init_ProgressDots();
|
|
47361
|
+
init_PropertyInspector();
|
|
47362
47362
|
init_PullQuote();
|
|
47363
47363
|
init_PullToRefresh();
|
|
47364
47364
|
init_QrScanner();
|
|
@@ -47482,6 +47482,7 @@ var init_component_registry_generated = __esm({
|
|
|
47482
47482
|
"AnimatedReveal": AnimatedReveal,
|
|
47483
47483
|
"ArticleSection": ArticleSection,
|
|
47484
47484
|
"Aside": Aside,
|
|
47485
|
+
"AssetPicker": AssetPicker,
|
|
47485
47486
|
"AuthLayout": AuthLayout,
|
|
47486
47487
|
"Avatar": AvatarPattern,
|
|
47487
47488
|
"AvatarPattern": AvatarPattern,
|
|
@@ -47601,6 +47602,7 @@ var init_component_registry_generated = __esm({
|
|
|
47601
47602
|
"GraphView": GraphView,
|
|
47602
47603
|
"Grid": GridPattern,
|
|
47603
47604
|
"GridPattern": GridPattern,
|
|
47605
|
+
"GridPicker": GridPicker,
|
|
47604
47606
|
"HStack": HStackPattern,
|
|
47605
47607
|
"HStackPattern": HStackPattern,
|
|
47606
47608
|
"Header": Header,
|
|
@@ -47610,6 +47612,7 @@ var init_component_registry_generated = __esm({
|
|
|
47610
47612
|
"HeroSection": HeroSection,
|
|
47611
47613
|
"Icon": IconPattern,
|
|
47612
47614
|
"IconPattern": IconPattern,
|
|
47615
|
+
"IconPicker": IconPicker,
|
|
47613
47616
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
47614
47617
|
"Input": InputPattern,
|
|
47615
47618
|
"InputGroup": InputGroup,
|
|
@@ -47666,6 +47669,7 @@ var init_component_registry_generated = __esm({
|
|
|
47666
47669
|
"ProgressBar": ProgressBarPattern,
|
|
47667
47670
|
"ProgressBarPattern": ProgressBarPattern,
|
|
47668
47671
|
"ProgressDots": ProgressDots,
|
|
47672
|
+
"PropertyInspector": PropertyInspector,
|
|
47669
47673
|
"PullQuote": PullQuote,
|
|
47670
47674
|
"PullToRefresh": PullToRefresh,
|
|
47671
47675
|
"QrScanner": QrScanner,
|
|
@@ -47807,7 +47811,7 @@ function SuspenseConfigProvider({
|
|
|
47807
47811
|
config,
|
|
47808
47812
|
children
|
|
47809
47813
|
}) {
|
|
47810
|
-
return
|
|
47814
|
+
return React83__default.createElement(
|
|
47811
47815
|
SuspenseConfigContext.Provider,
|
|
47812
47816
|
{ value: config },
|
|
47813
47817
|
children
|
|
@@ -48297,7 +48301,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
48297
48301
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
48298
48302
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
48299
48303
|
}
|
|
48300
|
-
return /* @__PURE__ */ jsx(
|
|
48304
|
+
return /* @__PURE__ */ jsx(React83__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
48301
48305
|
}
|
|
48302
48306
|
if (!child || typeof child !== "object") return null;
|
|
48303
48307
|
const childId = `${parentId}-${index}`;
|
|
@@ -48337,14 +48341,14 @@ function isPatternConfig(value) {
|
|
|
48337
48341
|
if (value === null || value === void 0) return false;
|
|
48338
48342
|
if (typeof value !== "object") return false;
|
|
48339
48343
|
if (Array.isArray(value)) return false;
|
|
48340
|
-
if (
|
|
48344
|
+
if (React83__default.isValidElement(value)) return false;
|
|
48341
48345
|
if (value instanceof Date) return false;
|
|
48342
48346
|
if (typeof value === "function") return false;
|
|
48343
48347
|
const record = value;
|
|
48344
48348
|
return "type" in record && typeof record.type === "string";
|
|
48345
48349
|
}
|
|
48346
48350
|
function isPlainConfigObject(value) {
|
|
48347
|
-
if (
|
|
48351
|
+
if (React83__default.isValidElement(value)) return false;
|
|
48348
48352
|
if (value instanceof Date) return false;
|
|
48349
48353
|
const proto = Object.getPrototypeOf(value);
|
|
48350
48354
|
return proto === Object.prototype || proto === null;
|