@almadar/ui 5.76.1 → 5.76.4
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 +1817 -1431
- package/dist/avl/index.js +618 -232
- package/dist/components/game/3d/index.cjs +7047 -0
- package/dist/components/game/3d/index.css +503 -0
- package/dist/components/game/3d/index.d.ts +13 -0
- package/dist/components/game/3d/index.js +6971 -0
- package/dist/components/game/3d/patterns.d.ts +20 -0
- package/dist/components/index.cjs +166 -49
- package/dist/components/index.js +166 -40
- package/dist/context/index.cjs +690 -47
- package/dist/context/index.js +682 -2
- package/dist/providers/index.cjs +2196 -1305
- package/dist/providers/index.d.ts +5 -3
- package/dist/providers/index.js +1117 -212
- package/dist/runtime/index.cjs +1678 -1292
- package/dist/runtime/index.js +598 -212
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { EventBusContext, useTraitScope, useEntitySchemaOptional, useEntitySchema, getAllPages, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath,
|
|
1
|
+
import * as React105 from 'react';
|
|
2
|
+
import React105__default, { useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, createContext, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
|
+
import { EventBusContext, useTraitScope, useEntitySchemaOptional, useEntitySchema, getAllPages, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
@@ -937,7 +937,7 @@ var init_Box = __esm({
|
|
|
937
937
|
fixed: "fixed",
|
|
938
938
|
sticky: "sticky"
|
|
939
939
|
};
|
|
940
|
-
Box =
|
|
940
|
+
Box = React105__default.forwardRef(
|
|
941
941
|
({
|
|
942
942
|
padding,
|
|
943
943
|
paddingX,
|
|
@@ -1002,7 +1002,7 @@ var init_Box = __esm({
|
|
|
1002
1002
|
onPointerDown?.(e);
|
|
1003
1003
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
1004
1004
|
const isClickable = action || onClick;
|
|
1005
|
-
return
|
|
1005
|
+
return React105__default.createElement(
|
|
1006
1006
|
Component,
|
|
1007
1007
|
{
|
|
1008
1008
|
ref,
|
|
@@ -1098,7 +1098,7 @@ function loadLib(key, importer) {
|
|
|
1098
1098
|
return p2;
|
|
1099
1099
|
}
|
|
1100
1100
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
1101
|
-
const Lazy =
|
|
1101
|
+
const Lazy = React105__default.lazy(async () => {
|
|
1102
1102
|
const lib = await loadLib(libKey, importer);
|
|
1103
1103
|
const Comp = pick(lib);
|
|
1104
1104
|
if (!Comp) {
|
|
@@ -1108,7 +1108,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
1108
1108
|
return { default: Comp };
|
|
1109
1109
|
});
|
|
1110
1110
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
1111
|
-
|
|
1111
|
+
React105__default.Suspense,
|
|
1112
1112
|
{
|
|
1113
1113
|
fallback: /* @__PURE__ */ jsx(
|
|
1114
1114
|
"span",
|
|
@@ -1835,7 +1835,7 @@ var init_Icon = __esm({
|
|
|
1835
1835
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1836
1836
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1837
1837
|
const family = useIconFamily();
|
|
1838
|
-
const RenderedComponent =
|
|
1838
|
+
const RenderedComponent = React105__default.useMemo(() => {
|
|
1839
1839
|
if (directIcon) return null;
|
|
1840
1840
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1841
1841
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1897,7 +1897,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1897
1897
|
const IconComp = value;
|
|
1898
1898
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1899
1899
|
}
|
|
1900
|
-
if (
|
|
1900
|
+
if (React105__default.isValidElement(value)) {
|
|
1901
1901
|
return value;
|
|
1902
1902
|
}
|
|
1903
1903
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1973,7 +1973,7 @@ var init_Button = __esm({
|
|
|
1973
1973
|
md: "h-icon-default w-icon-default",
|
|
1974
1974
|
lg: "h-icon-default w-icon-default"
|
|
1975
1975
|
};
|
|
1976
|
-
Button =
|
|
1976
|
+
Button = React105__default.forwardRef(
|
|
1977
1977
|
({
|
|
1978
1978
|
className,
|
|
1979
1979
|
variant = "primary",
|
|
@@ -2039,7 +2039,7 @@ var Dialog;
|
|
|
2039
2039
|
var init_Dialog = __esm({
|
|
2040
2040
|
"components/core/atoms/Dialog.tsx"() {
|
|
2041
2041
|
init_cn();
|
|
2042
|
-
Dialog =
|
|
2042
|
+
Dialog = React105__default.forwardRef(
|
|
2043
2043
|
({
|
|
2044
2044
|
role = "dialog",
|
|
2045
2045
|
"aria-modal": ariaModal = true,
|
|
@@ -2157,7 +2157,7 @@ var init_Typography = __esm({
|
|
|
2157
2157
|
}) => {
|
|
2158
2158
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
2159
2159
|
const Component = as || defaultElements[variant];
|
|
2160
|
-
return
|
|
2160
|
+
return React105__default.createElement(
|
|
2161
2161
|
Component,
|
|
2162
2162
|
{
|
|
2163
2163
|
id,
|
|
@@ -2652,7 +2652,7 @@ var init_Badge = __esm({
|
|
|
2652
2652
|
md: "px-2.5 py-1 text-sm",
|
|
2653
2653
|
lg: "px-3 py-1.5 text-base"
|
|
2654
2654
|
};
|
|
2655
|
-
Badge =
|
|
2655
|
+
Badge = React105__default.forwardRef(
|
|
2656
2656
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2657
2657
|
const iconSizes3 = {
|
|
2658
2658
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2988,7 +2988,7 @@ var init_SvgFlow = __esm({
|
|
|
2988
2988
|
width = 100,
|
|
2989
2989
|
height = 100
|
|
2990
2990
|
}) => {
|
|
2991
|
-
const markerId =
|
|
2991
|
+
const markerId = React105__default.useMemo(() => {
|
|
2992
2992
|
flowIdCounter += 1;
|
|
2993
2993
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2994
2994
|
}, []);
|
|
@@ -3581,7 +3581,7 @@ var init_SvgRing = __esm({
|
|
|
3581
3581
|
width = 100,
|
|
3582
3582
|
height = 100
|
|
3583
3583
|
}) => {
|
|
3584
|
-
const gradientId =
|
|
3584
|
+
const gradientId = React105__default.useMemo(() => {
|
|
3585
3585
|
ringIdCounter += 1;
|
|
3586
3586
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3587
3587
|
}, []);
|
|
@@ -3762,7 +3762,7 @@ var init_Input = __esm({
|
|
|
3762
3762
|
init_cn();
|
|
3763
3763
|
init_Icon();
|
|
3764
3764
|
init_useEventBus();
|
|
3765
|
-
Input =
|
|
3765
|
+
Input = React105__default.forwardRef(
|
|
3766
3766
|
({
|
|
3767
3767
|
className,
|
|
3768
3768
|
inputType,
|
|
@@ -3922,7 +3922,7 @@ var Label;
|
|
|
3922
3922
|
var init_Label = __esm({
|
|
3923
3923
|
"components/core/atoms/Label.tsx"() {
|
|
3924
3924
|
init_cn();
|
|
3925
|
-
Label =
|
|
3925
|
+
Label = React105__default.forwardRef(
|
|
3926
3926
|
({ className, required, children, ...props }, ref) => {
|
|
3927
3927
|
return /* @__PURE__ */ jsxs(
|
|
3928
3928
|
"label",
|
|
@@ -3949,7 +3949,7 @@ var init_Textarea = __esm({
|
|
|
3949
3949
|
"components/core/atoms/Textarea.tsx"() {
|
|
3950
3950
|
init_cn();
|
|
3951
3951
|
init_useEventBus();
|
|
3952
|
-
Textarea =
|
|
3952
|
+
Textarea = React105__default.forwardRef(
|
|
3953
3953
|
({ className, error, onChange, ...props }, ref) => {
|
|
3954
3954
|
const eventBus = useEventBus();
|
|
3955
3955
|
const handleChange = (e) => {
|
|
@@ -4188,7 +4188,7 @@ var init_Select = __esm({
|
|
|
4188
4188
|
init_cn();
|
|
4189
4189
|
init_Icon();
|
|
4190
4190
|
init_useEventBus();
|
|
4191
|
-
Select =
|
|
4191
|
+
Select = React105__default.forwardRef(
|
|
4192
4192
|
(props, _ref) => {
|
|
4193
4193
|
const { multiple, searchable, clearable } = props;
|
|
4194
4194
|
if (multiple || searchable || clearable) {
|
|
@@ -4205,7 +4205,7 @@ var init_Checkbox = __esm({
|
|
|
4205
4205
|
"components/core/atoms/Checkbox.tsx"() {
|
|
4206
4206
|
init_cn();
|
|
4207
4207
|
init_useEventBus();
|
|
4208
|
-
Checkbox =
|
|
4208
|
+
Checkbox = React105__default.forwardRef(
|
|
4209
4209
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
4210
4210
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
4211
4211
|
const eventBus = useEventBus();
|
|
@@ -4259,7 +4259,7 @@ var init_Spinner = __esm({
|
|
|
4259
4259
|
md: "h-6 w-6",
|
|
4260
4260
|
lg: "h-8 w-8"
|
|
4261
4261
|
};
|
|
4262
|
-
Spinner =
|
|
4262
|
+
Spinner = React105__default.forwardRef(
|
|
4263
4263
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4264
4264
|
if (overlay) {
|
|
4265
4265
|
return /* @__PURE__ */ jsx(
|
|
@@ -4349,7 +4349,7 @@ var init_Card = __esm({
|
|
|
4349
4349
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4350
4350
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4351
4351
|
};
|
|
4352
|
-
Card =
|
|
4352
|
+
Card = React105__default.forwardRef(
|
|
4353
4353
|
({
|
|
4354
4354
|
className,
|
|
4355
4355
|
variant = "bordered",
|
|
@@ -4397,9 +4397,9 @@ var init_Card = __esm({
|
|
|
4397
4397
|
}
|
|
4398
4398
|
);
|
|
4399
4399
|
Card.displayName = "Card";
|
|
4400
|
-
CardHeader =
|
|
4400
|
+
CardHeader = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4401
4401
|
CardHeader.displayName = "CardHeader";
|
|
4402
|
-
CardTitle =
|
|
4402
|
+
CardTitle = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4403
4403
|
"h3",
|
|
4404
4404
|
{
|
|
4405
4405
|
ref,
|
|
@@ -4412,11 +4412,11 @@ var init_Card = __esm({
|
|
|
4412
4412
|
}
|
|
4413
4413
|
));
|
|
4414
4414
|
CardTitle.displayName = "CardTitle";
|
|
4415
|
-
CardContent =
|
|
4415
|
+
CardContent = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4416
4416
|
CardContent.displayName = "CardContent";
|
|
4417
4417
|
CardBody = CardContent;
|
|
4418
4418
|
CardBody.displayName = "CardBody";
|
|
4419
|
-
CardFooter =
|
|
4419
|
+
CardFooter = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4420
4420
|
"div",
|
|
4421
4421
|
{
|
|
4422
4422
|
ref,
|
|
@@ -4471,7 +4471,7 @@ var init_FilterPill = __esm({
|
|
|
4471
4471
|
md: "w-3.5 h-3.5",
|
|
4472
4472
|
lg: "w-4 h-4"
|
|
4473
4473
|
};
|
|
4474
|
-
FilterPill =
|
|
4474
|
+
FilterPill = React105__default.forwardRef(
|
|
4475
4475
|
({
|
|
4476
4476
|
className,
|
|
4477
4477
|
variant = "default",
|
|
@@ -4600,8 +4600,8 @@ var init_Avatar = __esm({
|
|
|
4600
4600
|
actionPayload
|
|
4601
4601
|
}) => {
|
|
4602
4602
|
const eventBus = useEventBus();
|
|
4603
|
-
const [imgFailed, setImgFailed] =
|
|
4604
|
-
|
|
4603
|
+
const [imgFailed, setImgFailed] = React105__default.useState(false);
|
|
4604
|
+
React105__default.useEffect(() => {
|
|
4605
4605
|
setImgFailed(false);
|
|
4606
4606
|
}, [src]);
|
|
4607
4607
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4714,7 +4714,7 @@ var init_Center = __esm({
|
|
|
4714
4714
|
as: Component = "div"
|
|
4715
4715
|
}) => {
|
|
4716
4716
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4717
|
-
return
|
|
4717
|
+
return React105__default.createElement(Component, {
|
|
4718
4718
|
className: cn(
|
|
4719
4719
|
inline ? "inline-flex" : "flex",
|
|
4720
4720
|
horizontal && "justify-center",
|
|
@@ -4982,7 +4982,7 @@ var init_Radio = __esm({
|
|
|
4982
4982
|
md: "w-2.5 h-2.5",
|
|
4983
4983
|
lg: "w-3 h-3"
|
|
4984
4984
|
};
|
|
4985
|
-
Radio =
|
|
4985
|
+
Radio = React105__default.forwardRef(
|
|
4986
4986
|
({
|
|
4987
4987
|
label,
|
|
4988
4988
|
helperText,
|
|
@@ -4999,12 +4999,12 @@ var init_Radio = __esm({
|
|
|
4999
4999
|
onChange,
|
|
5000
5000
|
...props
|
|
5001
5001
|
}, ref) => {
|
|
5002
|
-
const reactId =
|
|
5002
|
+
const reactId = React105__default.useId();
|
|
5003
5003
|
const baseId = id || `radio-${reactId}`;
|
|
5004
5004
|
const hasError = !!error;
|
|
5005
5005
|
const eventBus = useEventBus();
|
|
5006
|
-
const [selected, setSelected] =
|
|
5007
|
-
|
|
5006
|
+
const [selected, setSelected] = React105__default.useState(value);
|
|
5007
|
+
React105__default.useEffect(() => {
|
|
5008
5008
|
if (value !== void 0) setSelected(value);
|
|
5009
5009
|
}, [value]);
|
|
5010
5010
|
const pick = (next, e) => {
|
|
@@ -5186,7 +5186,7 @@ var init_Switch = __esm({
|
|
|
5186
5186
|
"components/core/atoms/Switch.tsx"() {
|
|
5187
5187
|
"use client";
|
|
5188
5188
|
init_cn();
|
|
5189
|
-
Switch =
|
|
5189
|
+
Switch = React105.forwardRef(
|
|
5190
5190
|
({
|
|
5191
5191
|
checked,
|
|
5192
5192
|
defaultChecked = false,
|
|
@@ -5197,10 +5197,10 @@ var init_Switch = __esm({
|
|
|
5197
5197
|
name,
|
|
5198
5198
|
className
|
|
5199
5199
|
}, ref) => {
|
|
5200
|
-
const [isChecked, setIsChecked] =
|
|
5200
|
+
const [isChecked, setIsChecked] = React105.useState(
|
|
5201
5201
|
checked !== void 0 ? checked : defaultChecked
|
|
5202
5202
|
);
|
|
5203
|
-
|
|
5203
|
+
React105.useEffect(() => {
|
|
5204
5204
|
if (checked !== void 0) {
|
|
5205
5205
|
setIsChecked(checked);
|
|
5206
5206
|
}
|
|
@@ -5359,7 +5359,7 @@ var init_Stack = __esm({
|
|
|
5359
5359
|
};
|
|
5360
5360
|
const isHorizontal = direction === "horizontal";
|
|
5361
5361
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
5362
|
-
return
|
|
5362
|
+
return React105__default.createElement(
|
|
5363
5363
|
Component,
|
|
5364
5364
|
{
|
|
5365
5365
|
className: cn(
|
|
@@ -5559,7 +5559,7 @@ var Aside;
|
|
|
5559
5559
|
var init_Aside = __esm({
|
|
5560
5560
|
"components/core/atoms/Aside.tsx"() {
|
|
5561
5561
|
init_cn();
|
|
5562
|
-
Aside =
|
|
5562
|
+
Aside = React105__default.forwardRef(
|
|
5563
5563
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5564
5564
|
);
|
|
5565
5565
|
Aside.displayName = "Aside";
|
|
@@ -5638,9 +5638,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5638
5638
|
className
|
|
5639
5639
|
}) => {
|
|
5640
5640
|
const { t } = useTranslate();
|
|
5641
|
-
const [isVisible, setIsVisible] =
|
|
5642
|
-
const timeoutRef =
|
|
5643
|
-
const triggerRef =
|
|
5641
|
+
const [isVisible, setIsVisible] = React105__default.useState(false);
|
|
5642
|
+
const timeoutRef = React105__default.useRef(null);
|
|
5643
|
+
const triggerRef = React105__default.useRef(null);
|
|
5644
5644
|
const handleMouseEnter = () => {
|
|
5645
5645
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5646
5646
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5651,7 +5651,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5651
5651
|
};
|
|
5652
5652
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5653
5653
|
const open = isVisible || revealed;
|
|
5654
|
-
|
|
5654
|
+
React105__default.useEffect(() => {
|
|
5655
5655
|
return () => {
|
|
5656
5656
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5657
5657
|
};
|
|
@@ -5861,7 +5861,7 @@ var init_StatusDot = __esm({
|
|
|
5861
5861
|
md: "w-2.5 h-2.5",
|
|
5862
5862
|
lg: "w-3 h-3"
|
|
5863
5863
|
};
|
|
5864
|
-
StatusDot =
|
|
5864
|
+
StatusDot = React105__default.forwardRef(
|
|
5865
5865
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5866
5866
|
return /* @__PURE__ */ jsx(
|
|
5867
5867
|
"span",
|
|
@@ -5915,7 +5915,7 @@ var init_TrendIndicator = __esm({
|
|
|
5915
5915
|
down: "trending-down",
|
|
5916
5916
|
flat: "arrow-right"
|
|
5917
5917
|
};
|
|
5918
|
-
TrendIndicator =
|
|
5918
|
+
TrendIndicator = React105__default.forwardRef(
|
|
5919
5919
|
({
|
|
5920
5920
|
className,
|
|
5921
5921
|
value,
|
|
@@ -5982,7 +5982,7 @@ var init_RangeSlider = __esm({
|
|
|
5982
5982
|
md: "w-4 h-4",
|
|
5983
5983
|
lg: "w-5 h-5"
|
|
5984
5984
|
};
|
|
5985
|
-
RangeSlider =
|
|
5985
|
+
RangeSlider = React105__default.forwardRef(
|
|
5986
5986
|
({
|
|
5987
5987
|
className,
|
|
5988
5988
|
min = 0,
|
|
@@ -6453,7 +6453,7 @@ var init_ContentSection = __esm({
|
|
|
6453
6453
|
md: "py-16",
|
|
6454
6454
|
lg: "py-24"
|
|
6455
6455
|
};
|
|
6456
|
-
ContentSection =
|
|
6456
|
+
ContentSection = React105__default.forwardRef(
|
|
6457
6457
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6458
6458
|
return /* @__PURE__ */ jsx(
|
|
6459
6459
|
Box,
|
|
@@ -6987,7 +6987,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6987
6987
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6988
6988
|
"none": {}
|
|
6989
6989
|
};
|
|
6990
|
-
AnimatedReveal =
|
|
6990
|
+
AnimatedReveal = React105__default.forwardRef(
|
|
6991
6991
|
({
|
|
6992
6992
|
trigger = "scroll",
|
|
6993
6993
|
animation = "fade-up",
|
|
@@ -7147,7 +7147,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7147
7147
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7148
7148
|
"use client";
|
|
7149
7149
|
init_cn();
|
|
7150
|
-
AnimatedGraphic =
|
|
7150
|
+
AnimatedGraphic = React105__default.forwardRef(
|
|
7151
7151
|
({
|
|
7152
7152
|
src,
|
|
7153
7153
|
svgContent,
|
|
@@ -7170,7 +7170,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7170
7170
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7171
7171
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7172
7172
|
const prevAnimateRef = useRef(animate);
|
|
7173
|
-
const setRef =
|
|
7173
|
+
const setRef = React105__default.useCallback(
|
|
7174
7174
|
(node) => {
|
|
7175
7175
|
containerRef.current = node;
|
|
7176
7176
|
if (typeof ref === "function") ref(node);
|
|
@@ -8802,7 +8802,7 @@ function GameCard({
|
|
|
8802
8802
|
className
|
|
8803
8803
|
}) {
|
|
8804
8804
|
const eventBus = useEventBus();
|
|
8805
|
-
const handleClick =
|
|
8805
|
+
const handleClick = React105.useCallback(() => {
|
|
8806
8806
|
if (disabled) return;
|
|
8807
8807
|
onClick?.(id);
|
|
8808
8808
|
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
|
|
@@ -9074,9 +9074,9 @@ function ControlButton({
|
|
|
9074
9074
|
className
|
|
9075
9075
|
}) {
|
|
9076
9076
|
const eventBus = useEventBus();
|
|
9077
|
-
const [isPressed, setIsPressed] =
|
|
9077
|
+
const [isPressed, setIsPressed] = React105.useState(false);
|
|
9078
9078
|
const actualPressed = pressed ?? isPressed;
|
|
9079
|
-
const handlePointerDown =
|
|
9079
|
+
const handlePointerDown = React105.useCallback(
|
|
9080
9080
|
(e) => {
|
|
9081
9081
|
e.preventDefault();
|
|
9082
9082
|
if (disabled) return;
|
|
@@ -9086,7 +9086,7 @@ function ControlButton({
|
|
|
9086
9086
|
},
|
|
9087
9087
|
[disabled, pressEvent, eventBus, onPress]
|
|
9088
9088
|
);
|
|
9089
|
-
const handlePointerUp =
|
|
9089
|
+
const handlePointerUp = React105.useCallback(
|
|
9090
9090
|
(e) => {
|
|
9091
9091
|
e.preventDefault();
|
|
9092
9092
|
if (disabled) return;
|
|
@@ -9096,7 +9096,7 @@ function ControlButton({
|
|
|
9096
9096
|
},
|
|
9097
9097
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
9098
9098
|
);
|
|
9099
|
-
const handlePointerLeave =
|
|
9099
|
+
const handlePointerLeave = React105.useCallback(
|
|
9100
9100
|
(e) => {
|
|
9101
9101
|
if (isPressed) {
|
|
9102
9102
|
setIsPressed(false);
|
|
@@ -10155,8 +10155,8 @@ function MiniMap({
|
|
|
10155
10155
|
viewportRect = DEFAULT_VIEWPORT,
|
|
10156
10156
|
className
|
|
10157
10157
|
}) {
|
|
10158
|
-
const canvasRef =
|
|
10159
|
-
|
|
10158
|
+
const canvasRef = React105.useRef(null);
|
|
10159
|
+
React105.useEffect(() => {
|
|
10160
10160
|
const canvas = canvasRef.current;
|
|
10161
10161
|
if (!canvas) return;
|
|
10162
10162
|
const ctx = canvas.getContext("2d");
|
|
@@ -10306,8 +10306,8 @@ function ControlGrid({
|
|
|
10306
10306
|
className
|
|
10307
10307
|
}) {
|
|
10308
10308
|
const eventBus = useEventBus();
|
|
10309
|
-
const [active, setActive] =
|
|
10310
|
-
const handlePress =
|
|
10309
|
+
const [active, setActive] = React105.useState(/* @__PURE__ */ new Set());
|
|
10310
|
+
const handlePress = React105.useCallback(
|
|
10311
10311
|
(id) => {
|
|
10312
10312
|
setActive((prev) => new Set(prev).add(id));
|
|
10313
10313
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -10319,7 +10319,7 @@ function ControlGrid({
|
|
|
10319
10319
|
},
|
|
10320
10320
|
[kind, actionEvent, directionEvent, eventBus, onAction, onDirection]
|
|
10321
10321
|
);
|
|
10322
|
-
const handleRelease =
|
|
10322
|
+
const handleRelease = React105.useCallback(
|
|
10323
10323
|
(id) => {
|
|
10324
10324
|
setActive((prev) => {
|
|
10325
10325
|
const next = new Set(prev);
|
|
@@ -10580,7 +10580,7 @@ function InventoryGrid({
|
|
|
10580
10580
|
const eventBus = useEventBus();
|
|
10581
10581
|
const slotCount = totalSlots ?? items.length;
|
|
10582
10582
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
10583
|
-
const handleSelect =
|
|
10583
|
+
const handleSelect = React105.useCallback(
|
|
10584
10584
|
(id) => {
|
|
10585
10585
|
onSelect?.(id);
|
|
10586
10586
|
if (selectEvent) {
|
|
@@ -10783,7 +10783,7 @@ function GameMenu({
|
|
|
10783
10783
|
} catch {
|
|
10784
10784
|
}
|
|
10785
10785
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
10786
|
-
const handleOptionClick =
|
|
10786
|
+
const handleOptionClick = React105.useCallback(
|
|
10787
10787
|
(option) => {
|
|
10788
10788
|
if (option.event && eventBus) {
|
|
10789
10789
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -12447,6 +12447,329 @@ var init_useCanvasEffects = __esm({
|
|
|
12447
12447
|
"use client";
|
|
12448
12448
|
}
|
|
12449
12449
|
});
|
|
12450
|
+
function pickPath(entry) {
|
|
12451
|
+
if (Array.isArray(entry.path)) {
|
|
12452
|
+
return entry.path[Math.floor(Math.random() * entry.path.length)];
|
|
12453
|
+
}
|
|
12454
|
+
return entry.path;
|
|
12455
|
+
}
|
|
12456
|
+
function useGameAudio({
|
|
12457
|
+
manifest,
|
|
12458
|
+
baseUrl = "",
|
|
12459
|
+
initialMuted = false,
|
|
12460
|
+
initialVolume = 1
|
|
12461
|
+
}) {
|
|
12462
|
+
const [muted, setMutedState] = useState(initialMuted);
|
|
12463
|
+
const [masterVolume, setMasterVolumeState] = useState(initialVolume);
|
|
12464
|
+
const mutedRef = useRef(muted);
|
|
12465
|
+
const volumeRef = useRef(masterVolume);
|
|
12466
|
+
const manifestRef = useRef(manifest);
|
|
12467
|
+
mutedRef.current = muted;
|
|
12468
|
+
volumeRef.current = masterVolume;
|
|
12469
|
+
manifestRef.current = manifest;
|
|
12470
|
+
const poolsRef = useRef(/* @__PURE__ */ new Map());
|
|
12471
|
+
const getOrCreateElement = useCallback((key) => {
|
|
12472
|
+
const entry = manifestRef.current[key];
|
|
12473
|
+
if (!entry) return null;
|
|
12474
|
+
let pool = poolsRef.current.get(key);
|
|
12475
|
+
if (!pool) {
|
|
12476
|
+
pool = [];
|
|
12477
|
+
poolsRef.current.set(key, pool);
|
|
12478
|
+
}
|
|
12479
|
+
const maxSize = entry.poolSize ?? 1;
|
|
12480
|
+
for (const audio of pool) {
|
|
12481
|
+
if (audio.paused && (audio.ended || audio.currentTime === 0)) {
|
|
12482
|
+
return audio;
|
|
12483
|
+
}
|
|
12484
|
+
}
|
|
12485
|
+
if (pool.length < maxSize) {
|
|
12486
|
+
const src = baseUrl + pickPath(entry);
|
|
12487
|
+
const audio = new Audio(src);
|
|
12488
|
+
audio.loop = entry.loop ?? false;
|
|
12489
|
+
pool.push(audio);
|
|
12490
|
+
return audio;
|
|
12491
|
+
}
|
|
12492
|
+
if (!entry.loop) {
|
|
12493
|
+
let oldest = pool[0];
|
|
12494
|
+
for (const audio of pool) {
|
|
12495
|
+
if (audio.currentTime > oldest.currentTime) {
|
|
12496
|
+
oldest = audio;
|
|
12497
|
+
}
|
|
12498
|
+
}
|
|
12499
|
+
oldest.pause();
|
|
12500
|
+
oldest.currentTime = 0;
|
|
12501
|
+
return oldest;
|
|
12502
|
+
}
|
|
12503
|
+
return null;
|
|
12504
|
+
}, [baseUrl]);
|
|
12505
|
+
const play = useCallback((key) => {
|
|
12506
|
+
if (mutedRef.current) return;
|
|
12507
|
+
const entry = manifestRef.current[key];
|
|
12508
|
+
if (!entry) return;
|
|
12509
|
+
const audio = getOrCreateElement(key);
|
|
12510
|
+
if (!audio) return;
|
|
12511
|
+
audio.volume = Math.min(1, (entry.volume ?? 1) * volumeRef.current);
|
|
12512
|
+
if (!entry.loop) {
|
|
12513
|
+
audio.currentTime = 0;
|
|
12514
|
+
}
|
|
12515
|
+
const promise = audio.play();
|
|
12516
|
+
if (promise) {
|
|
12517
|
+
promise.catch(() => {
|
|
12518
|
+
});
|
|
12519
|
+
}
|
|
12520
|
+
}, [getOrCreateElement]);
|
|
12521
|
+
const stop = useCallback((key) => {
|
|
12522
|
+
const pool = poolsRef.current.get(key);
|
|
12523
|
+
if (!pool) return;
|
|
12524
|
+
for (const audio of pool) {
|
|
12525
|
+
audio.pause();
|
|
12526
|
+
audio.currentTime = 0;
|
|
12527
|
+
}
|
|
12528
|
+
}, []);
|
|
12529
|
+
const currentMusicKeyRef = useRef(null);
|
|
12530
|
+
const currentMusicElRef = useRef(null);
|
|
12531
|
+
const musicFadeRef = useRef(null);
|
|
12532
|
+
const pendingMusicKeyRef = useRef(null);
|
|
12533
|
+
const clearMusicFade = useCallback(() => {
|
|
12534
|
+
if (musicFadeRef.current) {
|
|
12535
|
+
clearInterval(musicFadeRef.current);
|
|
12536
|
+
musicFadeRef.current = null;
|
|
12537
|
+
}
|
|
12538
|
+
}, []);
|
|
12539
|
+
const playMusic = useCallback((key) => {
|
|
12540
|
+
if (key === currentMusicKeyRef.current) return;
|
|
12541
|
+
pendingMusicKeyRef.current = key;
|
|
12542
|
+
const entry = manifestRef.current[key];
|
|
12543
|
+
if (!entry) return;
|
|
12544
|
+
const fadeDurationMs = entry.crossfadeDurationMs ?? 1500;
|
|
12545
|
+
const stepMs = 50;
|
|
12546
|
+
const totalSteps = Math.max(1, fadeDurationMs / stepMs);
|
|
12547
|
+
const targetVolume = Math.min(1, (entry.volume ?? 1) * volumeRef.current);
|
|
12548
|
+
clearMusicFade();
|
|
12549
|
+
const src = baseUrl + (Array.isArray(entry.path) ? entry.path[0] : entry.path);
|
|
12550
|
+
const incoming = new Audio(src);
|
|
12551
|
+
incoming.loop = true;
|
|
12552
|
+
incoming.volume = 0;
|
|
12553
|
+
const outgoing = currentMusicElRef.current;
|
|
12554
|
+
const outgoingStartVol = outgoing?.volume ?? 0;
|
|
12555
|
+
currentMusicKeyRef.current = key;
|
|
12556
|
+
currentMusicElRef.current = incoming;
|
|
12557
|
+
if (!mutedRef.current) {
|
|
12558
|
+
incoming.play().catch(() => {
|
|
12559
|
+
currentMusicKeyRef.current = null;
|
|
12560
|
+
currentMusicElRef.current = outgoing;
|
|
12561
|
+
});
|
|
12562
|
+
}
|
|
12563
|
+
let step = 0;
|
|
12564
|
+
musicFadeRef.current = setInterval(() => {
|
|
12565
|
+
step++;
|
|
12566
|
+
const progress = Math.min(step / totalSteps, 1);
|
|
12567
|
+
incoming.volume = Math.min(1, targetVolume * progress);
|
|
12568
|
+
if (outgoing) {
|
|
12569
|
+
outgoing.volume = Math.max(0, outgoingStartVol * (1 - progress));
|
|
12570
|
+
}
|
|
12571
|
+
if (progress >= 1) {
|
|
12572
|
+
clearMusicFade();
|
|
12573
|
+
if (outgoing) {
|
|
12574
|
+
outgoing.pause();
|
|
12575
|
+
outgoing.src = "";
|
|
12576
|
+
}
|
|
12577
|
+
}
|
|
12578
|
+
}, stepMs);
|
|
12579
|
+
}, [baseUrl, clearMusicFade]);
|
|
12580
|
+
const stopMusic = useCallback((fadeDurationMs = 1e3) => {
|
|
12581
|
+
const outgoing = currentMusicElRef.current;
|
|
12582
|
+
if (!outgoing) return;
|
|
12583
|
+
currentMusicKeyRef.current = null;
|
|
12584
|
+
currentMusicElRef.current = null;
|
|
12585
|
+
pendingMusicKeyRef.current = null;
|
|
12586
|
+
clearMusicFade();
|
|
12587
|
+
const startVolume = outgoing.volume;
|
|
12588
|
+
const stepMs = 50;
|
|
12589
|
+
const totalSteps = Math.max(1, fadeDurationMs / stepMs);
|
|
12590
|
+
let step = 0;
|
|
12591
|
+
musicFadeRef.current = setInterval(() => {
|
|
12592
|
+
step++;
|
|
12593
|
+
const progress = step / totalSteps;
|
|
12594
|
+
outgoing.volume = Math.max(0, startVolume * (1 - progress));
|
|
12595
|
+
if (progress >= 1) {
|
|
12596
|
+
clearMusicFade();
|
|
12597
|
+
outgoing.pause();
|
|
12598
|
+
outgoing.src = "";
|
|
12599
|
+
}
|
|
12600
|
+
}, stepMs);
|
|
12601
|
+
}, [clearMusicFade]);
|
|
12602
|
+
const stopAll = useCallback(() => {
|
|
12603
|
+
for (const pool of poolsRef.current.values()) {
|
|
12604
|
+
for (const audio of pool) {
|
|
12605
|
+
audio.pause();
|
|
12606
|
+
audio.currentTime = 0;
|
|
12607
|
+
}
|
|
12608
|
+
}
|
|
12609
|
+
stopMusic(0);
|
|
12610
|
+
}, [stopMusic]);
|
|
12611
|
+
const setMuted = useCallback((value) => {
|
|
12612
|
+
setMutedState(value);
|
|
12613
|
+
if (value) {
|
|
12614
|
+
for (const [key, pool] of poolsRef.current.entries()) {
|
|
12615
|
+
if (manifestRef.current[key]?.loop) {
|
|
12616
|
+
for (const audio of pool) {
|
|
12617
|
+
if (!audio.paused) audio.pause();
|
|
12618
|
+
}
|
|
12619
|
+
}
|
|
12620
|
+
}
|
|
12621
|
+
currentMusicElRef.current?.pause();
|
|
12622
|
+
} else {
|
|
12623
|
+
for (const [key, pool] of poolsRef.current.entries()) {
|
|
12624
|
+
const entry = manifestRef.current[key];
|
|
12625
|
+
if (entry?.loop && entry?.autostart) {
|
|
12626
|
+
for (const audio of pool) {
|
|
12627
|
+
if (audio.paused) audio.play().catch(() => {
|
|
12628
|
+
});
|
|
12629
|
+
}
|
|
12630
|
+
}
|
|
12631
|
+
}
|
|
12632
|
+
const musicEl = currentMusicElRef.current;
|
|
12633
|
+
if (musicEl) {
|
|
12634
|
+
musicEl.play().catch(() => {
|
|
12635
|
+
});
|
|
12636
|
+
}
|
|
12637
|
+
}
|
|
12638
|
+
}, []);
|
|
12639
|
+
const setMasterVolume = useCallback((volume) => {
|
|
12640
|
+
const clamped = Math.max(0, Math.min(1, volume));
|
|
12641
|
+
setMasterVolumeState(clamped);
|
|
12642
|
+
for (const [key, pool] of poolsRef.current.entries()) {
|
|
12643
|
+
const entryVol = manifestRef.current[key]?.volume ?? 1;
|
|
12644
|
+
for (const audio of pool) {
|
|
12645
|
+
audio.volume = Math.min(1, entryVol * clamped);
|
|
12646
|
+
}
|
|
12647
|
+
}
|
|
12648
|
+
if (!musicFadeRef.current && currentMusicElRef.current) {
|
|
12649
|
+
const key = currentMusicKeyRef.current;
|
|
12650
|
+
const entryVol = key ? manifestRef.current[key]?.volume ?? 1 : 1;
|
|
12651
|
+
currentMusicElRef.current.volume = Math.min(1, entryVol * clamped);
|
|
12652
|
+
}
|
|
12653
|
+
}, []);
|
|
12654
|
+
const unlockedRef = useRef(false);
|
|
12655
|
+
useEffect(() => {
|
|
12656
|
+
const autoKeys = Object.keys(manifest).filter((k) => manifest[k].autostart);
|
|
12657
|
+
const hasPendingMusic = () => pendingMusicKeyRef.current !== null;
|
|
12658
|
+
const hasAutoStart = autoKeys.length > 0;
|
|
12659
|
+
if (!hasAutoStart && !hasPendingMusic()) return;
|
|
12660
|
+
const unlock = () => {
|
|
12661
|
+
if (unlockedRef.current) return;
|
|
12662
|
+
unlockedRef.current = true;
|
|
12663
|
+
if (!mutedRef.current) {
|
|
12664
|
+
for (const key of autoKeys) {
|
|
12665
|
+
play(key);
|
|
12666
|
+
}
|
|
12667
|
+
const pending = pendingMusicKeyRef.current;
|
|
12668
|
+
if (pending && pending !== currentMusicKeyRef.current) {
|
|
12669
|
+
playMusic(pending);
|
|
12670
|
+
}
|
|
12671
|
+
}
|
|
12672
|
+
};
|
|
12673
|
+
document.addEventListener("click", unlock, { once: true });
|
|
12674
|
+
document.addEventListener("keydown", unlock, { once: true });
|
|
12675
|
+
document.addEventListener("touchstart", unlock, { once: true });
|
|
12676
|
+
return () => {
|
|
12677
|
+
document.removeEventListener("click", unlock);
|
|
12678
|
+
document.removeEventListener("keydown", unlock);
|
|
12679
|
+
document.removeEventListener("touchstart", unlock);
|
|
12680
|
+
};
|
|
12681
|
+
}, [manifest, play, playMusic]);
|
|
12682
|
+
useEffect(() => {
|
|
12683
|
+
return () => {
|
|
12684
|
+
clearMusicFade();
|
|
12685
|
+
for (const pool of poolsRef.current.values()) {
|
|
12686
|
+
for (const audio of pool) {
|
|
12687
|
+
audio.pause();
|
|
12688
|
+
audio.src = "";
|
|
12689
|
+
}
|
|
12690
|
+
}
|
|
12691
|
+
poolsRef.current.clear();
|
|
12692
|
+
if (currentMusicElRef.current) {
|
|
12693
|
+
currentMusicElRef.current.pause();
|
|
12694
|
+
currentMusicElRef.current.src = "";
|
|
12695
|
+
currentMusicElRef.current = null;
|
|
12696
|
+
}
|
|
12697
|
+
};
|
|
12698
|
+
}, [clearMusicFade]);
|
|
12699
|
+
return {
|
|
12700
|
+
play,
|
|
12701
|
+
stop,
|
|
12702
|
+
stopAll,
|
|
12703
|
+
playMusic,
|
|
12704
|
+
stopMusic,
|
|
12705
|
+
muted,
|
|
12706
|
+
setMuted,
|
|
12707
|
+
masterVolume,
|
|
12708
|
+
setMasterVolume
|
|
12709
|
+
};
|
|
12710
|
+
}
|
|
12711
|
+
var init_useGameAudio = __esm({
|
|
12712
|
+
"components/game/shared/hooks/useGameAudio.ts"() {
|
|
12713
|
+
"use client";
|
|
12714
|
+
useGameAudio.displayName = "useGameAudio";
|
|
12715
|
+
}
|
|
12716
|
+
});
|
|
12717
|
+
function useGameAudioContextOptional() {
|
|
12718
|
+
return useContext(GameAudioContext);
|
|
12719
|
+
}
|
|
12720
|
+
function GameAudioProvider({
|
|
12721
|
+
manifest,
|
|
12722
|
+
baseUrl = "",
|
|
12723
|
+
children,
|
|
12724
|
+
initialMuted = false
|
|
12725
|
+
}) {
|
|
12726
|
+
const eventBus = useEventBus();
|
|
12727
|
+
const { play, stop, stopAll, playMusic, stopMusic, muted, setMuted, masterVolume, setMasterVolume } = useGameAudio({ manifest, baseUrl, initialMuted });
|
|
12728
|
+
useEffect(() => {
|
|
12729
|
+
const unsubPlay = eventBus.on("UI:PLAY_SOUND", (event) => {
|
|
12730
|
+
const key = event.payload?.key;
|
|
12731
|
+
if (key) play(key);
|
|
12732
|
+
});
|
|
12733
|
+
const unsubStop = eventBus.on("UI:STOP_SOUND", (event) => {
|
|
12734
|
+
const key = event.payload?.key;
|
|
12735
|
+
if (key) {
|
|
12736
|
+
stop(key);
|
|
12737
|
+
} else {
|
|
12738
|
+
stopAll();
|
|
12739
|
+
}
|
|
12740
|
+
});
|
|
12741
|
+
const unsubChangeMusic = eventBus.on("UI:CHANGE_MUSIC", (event) => {
|
|
12742
|
+
const key = event.payload?.key;
|
|
12743
|
+
if (key) {
|
|
12744
|
+
playMusic(key);
|
|
12745
|
+
} else {
|
|
12746
|
+
stopMusic();
|
|
12747
|
+
}
|
|
12748
|
+
});
|
|
12749
|
+
const unsubStopMusic = eventBus.on("UI:STOP_MUSIC", () => {
|
|
12750
|
+
stopMusic();
|
|
12751
|
+
});
|
|
12752
|
+
return () => {
|
|
12753
|
+
unsubPlay();
|
|
12754
|
+
unsubStop();
|
|
12755
|
+
unsubChangeMusic();
|
|
12756
|
+
unsubStopMusic();
|
|
12757
|
+
};
|
|
12758
|
+
}, [eventBus, play, stop, stopAll, playMusic, stopMusic]);
|
|
12759
|
+
const value = { muted, setMuted, masterVolume, setMasterVolume, play, playMusic, stopMusic };
|
|
12760
|
+
return /* @__PURE__ */ jsx(GameAudioContext.Provider, { value, children });
|
|
12761
|
+
}
|
|
12762
|
+
var GameAudioContext;
|
|
12763
|
+
var init_GameAudioProvider = __esm({
|
|
12764
|
+
"components/game/shared/providers/GameAudioProvider.tsx"() {
|
|
12765
|
+
"use client";
|
|
12766
|
+
init_useEventBus();
|
|
12767
|
+
init_useGameAudio();
|
|
12768
|
+
GameAudioContext = createContext(null);
|
|
12769
|
+
GameAudioContext.displayName = "GameAudioContext";
|
|
12770
|
+
GameAudioProvider.displayName = "GameAudioProvider";
|
|
12771
|
+
}
|
|
12772
|
+
});
|
|
12450
12773
|
function GameAudioToggle({
|
|
12451
12774
|
size = "sm",
|
|
12452
12775
|
className
|
|
@@ -12475,6 +12798,7 @@ var init_GameAudioToggle = __esm({
|
|
|
12475
12798
|
"use client";
|
|
12476
12799
|
init_atoms();
|
|
12477
12800
|
init_cn();
|
|
12801
|
+
init_GameAudioProvider();
|
|
12478
12802
|
GameAudioToggle.displayName = "GameAudioToggle";
|
|
12479
12803
|
}
|
|
12480
12804
|
});
|
|
@@ -16142,7 +16466,7 @@ function LinearView({
|
|
|
16142
16466
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
16143
16467
|
const isDone = i < currentIdx;
|
|
16144
16468
|
const isCurrent = i === currentIdx;
|
|
16145
|
-
return /* @__PURE__ */ jsxs(
|
|
16469
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
16146
16470
|
i > 0 && /* @__PURE__ */ jsx(
|
|
16147
16471
|
Typography,
|
|
16148
16472
|
{
|
|
@@ -16670,7 +16994,7 @@ function SequenceBar({
|
|
|
16670
16994
|
onSlotRemove(index);
|
|
16671
16995
|
}, [onSlotRemove, playing]);
|
|
16672
16996
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
16673
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
16997
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
16674
16998
|
i > 0 && /* @__PURE__ */ jsx(
|
|
16675
16999
|
Typography,
|
|
16676
17000
|
{
|
|
@@ -19097,10 +19421,10 @@ function getSlotContentRenderer2() {
|
|
|
19097
19421
|
}
|
|
19098
19422
|
function resolveDescriptor(value, idPrefix) {
|
|
19099
19423
|
if (value === null || value === void 0) return value;
|
|
19100
|
-
if (
|
|
19424
|
+
if (React105__default.isValidElement(value)) return value;
|
|
19101
19425
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
19102
19426
|
if (Array.isArray(value)) {
|
|
19103
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
19427
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React105__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
19104
19428
|
}
|
|
19105
19429
|
if (typeof value === "object") {
|
|
19106
19430
|
const rec = value;
|
|
@@ -19236,7 +19560,7 @@ var init_GameTemplate = __esm({
|
|
|
19236
19560
|
}
|
|
19237
19561
|
});
|
|
19238
19562
|
function asDescriptor(v) {
|
|
19239
|
-
if (Array.isArray(v) ||
|
|
19563
|
+
if (Array.isArray(v) || React105__default.isValidElement(v)) return null;
|
|
19240
19564
|
const o = v;
|
|
19241
19565
|
if (typeof o.type !== "string") return null;
|
|
19242
19566
|
const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
|
|
@@ -19251,10 +19575,10 @@ function getSlotContentRenderer3() {
|
|
|
19251
19575
|
}
|
|
19252
19576
|
function resolveDescriptor2(value, idPrefix) {
|
|
19253
19577
|
if (value === null || value === void 0) return value;
|
|
19254
|
-
if (
|
|
19578
|
+
if (React105__default.isValidElement(value)) return value;
|
|
19255
19579
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
19256
19580
|
if (Array.isArray(value)) {
|
|
19257
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
19581
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React105__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
19258
19582
|
}
|
|
19259
19583
|
if (typeof value === "object" && value !== null) {
|
|
19260
19584
|
const desc = asDescriptor(value);
|
|
@@ -20138,6 +20462,8 @@ var init_CardBattlerTemplate = __esm({
|
|
|
20138
20462
|
CardBattlerTemplate.displayName = "CardBattlerTemplate";
|
|
20139
20463
|
}
|
|
20140
20464
|
});
|
|
20465
|
+
|
|
20466
|
+
// components/game/2d/molecules/index.ts
|
|
20141
20467
|
var init_molecules = __esm({
|
|
20142
20468
|
"components/game/2d/molecules/index.ts"() {
|
|
20143
20469
|
init_shared();
|
|
@@ -20232,7 +20558,7 @@ var init_ErrorBoundary = __esm({
|
|
|
20232
20558
|
}
|
|
20233
20559
|
);
|
|
20234
20560
|
};
|
|
20235
|
-
ErrorBoundary = class extends
|
|
20561
|
+
ErrorBoundary = class extends React105__default.Component {
|
|
20236
20562
|
constructor(props) {
|
|
20237
20563
|
super(props);
|
|
20238
20564
|
__publicField(this, "reset", () => {
|
|
@@ -20514,7 +20840,7 @@ var init_Container = __esm({
|
|
|
20514
20840
|
as: Component = "div"
|
|
20515
20841
|
}) => {
|
|
20516
20842
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
20517
|
-
return
|
|
20843
|
+
return React105__default.createElement(
|
|
20518
20844
|
Component,
|
|
20519
20845
|
{
|
|
20520
20846
|
className: cn(
|
|
@@ -23122,7 +23448,7 @@ var init_CodeBlock = __esm({
|
|
|
23122
23448
|
};
|
|
23123
23449
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
23124
23450
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
23125
|
-
CodeBlock =
|
|
23451
|
+
CodeBlock = React105__default.memo(
|
|
23126
23452
|
({
|
|
23127
23453
|
code: rawCode,
|
|
23128
23454
|
language = "text",
|
|
@@ -23709,7 +24035,7 @@ var init_MarkdownContent = __esm({
|
|
|
23709
24035
|
init_Box();
|
|
23710
24036
|
init_CodeBlock();
|
|
23711
24037
|
init_cn();
|
|
23712
|
-
MarkdownContent =
|
|
24038
|
+
MarkdownContent = React105__default.memo(
|
|
23713
24039
|
({ content, direction = "ltr", className }) => {
|
|
23714
24040
|
const { t: _t } = useTranslate();
|
|
23715
24041
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -24986,7 +25312,7 @@ var init_StateMachineView = __esm({
|
|
|
24986
25312
|
style: { top: title ? 30 : 0 },
|
|
24987
25313
|
children: [
|
|
24988
25314
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
24989
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
25315
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React105__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
24990
25316
|
StateNode2,
|
|
24991
25317
|
{
|
|
24992
25318
|
state,
|
|
@@ -30534,8 +30860,8 @@ var init_Menu = __esm({
|
|
|
30534
30860
|
"bottom-end": "bottom-start"
|
|
30535
30861
|
};
|
|
30536
30862
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
30537
|
-
const triggerChild =
|
|
30538
|
-
const triggerElement =
|
|
30863
|
+
const triggerChild = React105__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
30864
|
+
const triggerElement = React105__default.cloneElement(
|
|
30539
30865
|
triggerChild,
|
|
30540
30866
|
{
|
|
30541
30867
|
ref: triggerRef,
|
|
@@ -30630,14 +30956,14 @@ function useDataDnd(args) {
|
|
|
30630
30956
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
30631
30957
|
const enabled = isZone || Boolean(dndRoot);
|
|
30632
30958
|
const eventBus = useEventBus();
|
|
30633
|
-
const parentRoot =
|
|
30959
|
+
const parentRoot = React105__default.useContext(RootCtx);
|
|
30634
30960
|
const isRoot = enabled && parentRoot === null;
|
|
30635
|
-
const zoneId =
|
|
30961
|
+
const zoneId = React105__default.useId();
|
|
30636
30962
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
30637
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
30638
|
-
const optimisticOrdersRef =
|
|
30963
|
+
const [optimisticOrders, setOptimisticOrders] = React105__default.useState(() => /* @__PURE__ */ new Map());
|
|
30964
|
+
const optimisticOrdersRef = React105__default.useRef(optimisticOrders);
|
|
30639
30965
|
optimisticOrdersRef.current = optimisticOrders;
|
|
30640
|
-
const clearOptimisticOrder =
|
|
30966
|
+
const clearOptimisticOrder = React105__default.useCallback((group) => {
|
|
30641
30967
|
setOptimisticOrders((prev) => {
|
|
30642
30968
|
if (!prev.has(group)) return prev;
|
|
30643
30969
|
const next = new Map(prev);
|
|
@@ -30662,7 +30988,7 @@ function useDataDnd(args) {
|
|
|
30662
30988
|
const raw = it[dndItemIdField];
|
|
30663
30989
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
30664
30990
|
}).join("|");
|
|
30665
|
-
const itemIds =
|
|
30991
|
+
const itemIds = React105__default.useMemo(
|
|
30666
30992
|
() => orderedItems.map((it, idx) => {
|
|
30667
30993
|
const raw = it[dndItemIdField];
|
|
30668
30994
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -30673,7 +30999,7 @@ function useDataDnd(args) {
|
|
|
30673
30999
|
const raw = it[dndItemIdField];
|
|
30674
31000
|
return raw != null ? String(raw) : `__${idx}`;
|
|
30675
31001
|
}).join("|");
|
|
30676
|
-
|
|
31002
|
+
React105__default.useEffect(() => {
|
|
30677
31003
|
const root = isRoot ? null : parentRoot;
|
|
30678
31004
|
if (root) {
|
|
30679
31005
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -30681,20 +31007,20 @@ function useDataDnd(args) {
|
|
|
30681
31007
|
clearOptimisticOrder(ownGroup);
|
|
30682
31008
|
}
|
|
30683
31009
|
}, [itemsContentSig, ownGroup]);
|
|
30684
|
-
const zonesRef =
|
|
30685
|
-
const registerZone =
|
|
31010
|
+
const zonesRef = React105__default.useRef(/* @__PURE__ */ new Map());
|
|
31011
|
+
const registerZone = React105__default.useCallback((zoneId2, meta2) => {
|
|
30686
31012
|
zonesRef.current.set(zoneId2, meta2);
|
|
30687
31013
|
}, []);
|
|
30688
|
-
const unregisterZone =
|
|
31014
|
+
const unregisterZone = React105__default.useCallback((zoneId2) => {
|
|
30689
31015
|
zonesRef.current.delete(zoneId2);
|
|
30690
31016
|
}, []);
|
|
30691
|
-
const [activeDrag, setActiveDrag] =
|
|
30692
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
30693
|
-
const meta =
|
|
31017
|
+
const [activeDrag, setActiveDrag] = React105__default.useState(null);
|
|
31018
|
+
const [overZoneGroup, setOverZoneGroup] = React105__default.useState(null);
|
|
31019
|
+
const meta = React105__default.useMemo(
|
|
30694
31020
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
30695
31021
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
30696
31022
|
);
|
|
30697
|
-
|
|
31023
|
+
React105__default.useEffect(() => {
|
|
30698
31024
|
const target = isRoot ? null : parentRoot;
|
|
30699
31025
|
if (!target) {
|
|
30700
31026
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -30713,7 +31039,7 @@ function useDataDnd(args) {
|
|
|
30713
31039
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
30714
31040
|
const sensors = useAlmadarDndSensors(true);
|
|
30715
31041
|
const collisionDetection = almadarDndCollisionDetection;
|
|
30716
|
-
const findZoneByItem =
|
|
31042
|
+
const findZoneByItem = React105__default.useCallback(
|
|
30717
31043
|
(id) => {
|
|
30718
31044
|
for (const z of zonesRef.current.values()) {
|
|
30719
31045
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -30722,7 +31048,7 @@ function useDataDnd(args) {
|
|
|
30722
31048
|
},
|
|
30723
31049
|
[]
|
|
30724
31050
|
);
|
|
30725
|
-
|
|
31051
|
+
React105__default.useCallback(
|
|
30726
31052
|
(group) => {
|
|
30727
31053
|
for (const z of zonesRef.current.values()) {
|
|
30728
31054
|
if (z.group === group) return z;
|
|
@@ -30731,7 +31057,7 @@ function useDataDnd(args) {
|
|
|
30731
31057
|
},
|
|
30732
31058
|
[]
|
|
30733
31059
|
);
|
|
30734
|
-
const handleDragEnd =
|
|
31060
|
+
const handleDragEnd = React105__default.useCallback(
|
|
30735
31061
|
(event) => {
|
|
30736
31062
|
const { active, over } = event;
|
|
30737
31063
|
const activeIdStr = String(active.id);
|
|
@@ -30822,8 +31148,8 @@ function useDataDnd(args) {
|
|
|
30822
31148
|
},
|
|
30823
31149
|
[eventBus]
|
|
30824
31150
|
);
|
|
30825
|
-
const sortableData =
|
|
30826
|
-
const SortableItem =
|
|
31151
|
+
const sortableData = React105__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
31152
|
+
const SortableItem = React105__default.useCallback(
|
|
30827
31153
|
({ id, children }) => {
|
|
30828
31154
|
const {
|
|
30829
31155
|
attributes,
|
|
@@ -30863,7 +31189,7 @@ function useDataDnd(args) {
|
|
|
30863
31189
|
id: droppableId,
|
|
30864
31190
|
data: sortableData
|
|
30865
31191
|
});
|
|
30866
|
-
const ctx =
|
|
31192
|
+
const ctx = React105__default.useContext(RootCtx);
|
|
30867
31193
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
30868
31194
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
30869
31195
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -30878,7 +31204,7 @@ function useDataDnd(args) {
|
|
|
30878
31204
|
showForeignPlaceholder,
|
|
30879
31205
|
ctxAvailable: ctx != null
|
|
30880
31206
|
});
|
|
30881
|
-
|
|
31207
|
+
React105__default.useEffect(() => {
|
|
30882
31208
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
30883
31209
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
30884
31210
|
return /* @__PURE__ */ jsx(
|
|
@@ -30892,11 +31218,11 @@ function useDataDnd(args) {
|
|
|
30892
31218
|
}
|
|
30893
31219
|
);
|
|
30894
31220
|
};
|
|
30895
|
-
const rootContextValue =
|
|
31221
|
+
const rootContextValue = React105__default.useMemo(
|
|
30896
31222
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
30897
31223
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
30898
31224
|
);
|
|
30899
|
-
const handleDragStart =
|
|
31225
|
+
const handleDragStart = React105__default.useCallback((event) => {
|
|
30900
31226
|
const sourceZone = findZoneByItem(event.active.id);
|
|
30901
31227
|
const rect = event.active.rect.current.initial;
|
|
30902
31228
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -30915,7 +31241,7 @@ function useDataDnd(args) {
|
|
|
30915
31241
|
isRoot
|
|
30916
31242
|
});
|
|
30917
31243
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
30918
|
-
const handleDragOver =
|
|
31244
|
+
const handleDragOver = React105__default.useCallback((event) => {
|
|
30919
31245
|
const { active, over } = event;
|
|
30920
31246
|
const overData = over?.data?.current;
|
|
30921
31247
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -30985,7 +31311,7 @@ function useDataDnd(args) {
|
|
|
30985
31311
|
return next;
|
|
30986
31312
|
});
|
|
30987
31313
|
}, []);
|
|
30988
|
-
const handleDragCancel =
|
|
31314
|
+
const handleDragCancel = React105__default.useCallback((event) => {
|
|
30989
31315
|
setActiveDrag(null);
|
|
30990
31316
|
setOverZoneGroup(null);
|
|
30991
31317
|
dndLog.warn("dragCancel", {
|
|
@@ -30993,12 +31319,12 @@ function useDataDnd(args) {
|
|
|
30993
31319
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
30994
31320
|
});
|
|
30995
31321
|
}, []);
|
|
30996
|
-
const handleDragEndWithCleanup =
|
|
31322
|
+
const handleDragEndWithCleanup = React105__default.useCallback((event) => {
|
|
30997
31323
|
handleDragEnd(event);
|
|
30998
31324
|
setActiveDrag(null);
|
|
30999
31325
|
setOverZoneGroup(null);
|
|
31000
31326
|
}, [handleDragEnd]);
|
|
31001
|
-
const wrapContainer =
|
|
31327
|
+
const wrapContainer = React105__default.useCallback(
|
|
31002
31328
|
(children) => {
|
|
31003
31329
|
if (!enabled) return children;
|
|
31004
31330
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -31052,7 +31378,7 @@ var init_useDataDnd = __esm({
|
|
|
31052
31378
|
init_useAlmadarDndCollision();
|
|
31053
31379
|
init_Box();
|
|
31054
31380
|
dndLog = createLogger("almadar:ui:dnd");
|
|
31055
|
-
RootCtx =
|
|
31381
|
+
RootCtx = React105__default.createContext(null);
|
|
31056
31382
|
}
|
|
31057
31383
|
});
|
|
31058
31384
|
function renderIconInput(icon, props) {
|
|
@@ -31578,7 +31904,7 @@ function DataList({
|
|
|
31578
31904
|
}) {
|
|
31579
31905
|
const eventBus = useEventBus();
|
|
31580
31906
|
const { t } = useTranslate();
|
|
31581
|
-
const [visibleCount, setVisibleCount] =
|
|
31907
|
+
const [visibleCount, setVisibleCount] = React105__default.useState(pageSize || Infinity);
|
|
31582
31908
|
const fieldDefs = fields ?? columns ?? [];
|
|
31583
31909
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31584
31910
|
const dnd = useDataDnd({
|
|
@@ -31597,7 +31923,7 @@ function DataList({
|
|
|
31597
31923
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
31598
31924
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
31599
31925
|
const hasRenderProp = typeof children === "function";
|
|
31600
|
-
|
|
31926
|
+
React105__default.useEffect(() => {
|
|
31601
31927
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
31602
31928
|
const childrenTypeOf = typeof children;
|
|
31603
31929
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -31701,7 +32027,7 @@ function DataList({
|
|
|
31701
32027
|
const items2 = [...data];
|
|
31702
32028
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
31703
32029
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
31704
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
32030
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
31705
32031
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
31706
32032
|
group.items.map((itemData, index) => {
|
|
31707
32033
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -31842,7 +32168,7 @@ function DataList({
|
|
|
31842
32168
|
className
|
|
31843
32169
|
),
|
|
31844
32170
|
children: [
|
|
31845
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
32171
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
31846
32172
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
31847
32173
|
group.items.map(
|
|
31848
32174
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -32571,7 +32897,7 @@ var init_Flex = __esm({
|
|
|
32571
32897
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
32572
32898
|
}
|
|
32573
32899
|
}
|
|
32574
|
-
return
|
|
32900
|
+
return React105__default.createElement(Component, {
|
|
32575
32901
|
className: cn(
|
|
32576
32902
|
inline ? "inline-flex" : "flex",
|
|
32577
32903
|
directionStyles[direction],
|
|
@@ -32690,7 +33016,7 @@ var init_Grid = __esm({
|
|
|
32690
33016
|
as: Component = "div"
|
|
32691
33017
|
}) => {
|
|
32692
33018
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
32693
|
-
return
|
|
33019
|
+
return React105__default.createElement(
|
|
32694
33020
|
Component,
|
|
32695
33021
|
{
|
|
32696
33022
|
className: cn(
|
|
@@ -32886,9 +33212,9 @@ var init_Popover = __esm({
|
|
|
32886
33212
|
onMouseLeave: handleClose,
|
|
32887
33213
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
32888
33214
|
};
|
|
32889
|
-
const childElement =
|
|
33215
|
+
const childElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
32890
33216
|
const childPointerDown = childElement.props.onPointerDown;
|
|
32891
|
-
const triggerElement =
|
|
33217
|
+
const triggerElement = React105__default.cloneElement(
|
|
32892
33218
|
childElement,
|
|
32893
33219
|
{
|
|
32894
33220
|
ref: triggerRef,
|
|
@@ -33490,9 +33816,9 @@ var init_Tooltip = __esm({
|
|
|
33490
33816
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
33491
33817
|
};
|
|
33492
33818
|
}, []);
|
|
33493
|
-
const triggerElement =
|
|
33819
|
+
const triggerElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
33494
33820
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
33495
|
-
const trigger =
|
|
33821
|
+
const trigger = React105__default.cloneElement(triggerElement, {
|
|
33496
33822
|
ref: triggerRef,
|
|
33497
33823
|
onMouseEnter: handleMouseEnter,
|
|
33498
33824
|
onMouseLeave: handleMouseLeave,
|
|
@@ -33582,7 +33908,7 @@ var init_WizardProgress = __esm({
|
|
|
33582
33908
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
33583
33909
|
const isActive = index === currentStep;
|
|
33584
33910
|
const isCompleted = index < currentStep;
|
|
33585
|
-
return /* @__PURE__ */ jsxs(
|
|
33911
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
33586
33912
|
/* @__PURE__ */ jsx(
|
|
33587
33913
|
"button",
|
|
33588
33914
|
{
|
|
@@ -34914,13 +35240,13 @@ var init_MapView = __esm({
|
|
|
34914
35240
|
shadowSize: [41, 41]
|
|
34915
35241
|
});
|
|
34916
35242
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
34917
|
-
const { useEffect:
|
|
35243
|
+
const { useEffect: useEffect74, useRef: useRef76, useCallback: useCallback112, useState: useState107 } = React105__default;
|
|
34918
35244
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
34919
35245
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
34920
35246
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
34921
35247
|
const map = useMap();
|
|
34922
|
-
const prevRef =
|
|
34923
|
-
|
|
35248
|
+
const prevRef = useRef76({ centerLat, centerLng, zoom });
|
|
35249
|
+
useEffect74(() => {
|
|
34924
35250
|
const prev = prevRef.current;
|
|
34925
35251
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
34926
35252
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -34931,7 +35257,7 @@ var init_MapView = __esm({
|
|
|
34931
35257
|
}
|
|
34932
35258
|
function MapClickHandler({ onMapClick }) {
|
|
34933
35259
|
const map = useMap();
|
|
34934
|
-
|
|
35260
|
+
useEffect74(() => {
|
|
34935
35261
|
if (!onMapClick) return;
|
|
34936
35262
|
const handler = (e) => {
|
|
34937
35263
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -34959,8 +35285,8 @@ var init_MapView = __esm({
|
|
|
34959
35285
|
showAttribution = true
|
|
34960
35286
|
}) {
|
|
34961
35287
|
const eventBus = useEventBus2();
|
|
34962
|
-
const [clickedPosition, setClickedPosition] =
|
|
34963
|
-
const handleMapClick =
|
|
35288
|
+
const [clickedPosition, setClickedPosition] = useState107(null);
|
|
35289
|
+
const handleMapClick = useCallback112((lat, lng) => {
|
|
34964
35290
|
if (showClickedPin) {
|
|
34965
35291
|
setClickedPosition({ lat, lng });
|
|
34966
35292
|
}
|
|
@@ -34969,7 +35295,7 @@ var init_MapView = __esm({
|
|
|
34969
35295
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
34970
35296
|
}
|
|
34971
35297
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
34972
|
-
const handleMarkerClick =
|
|
35298
|
+
const handleMarkerClick = useCallback112((marker) => {
|
|
34973
35299
|
onMarkerClick?.(marker);
|
|
34974
35300
|
if (markerClickEvent) {
|
|
34975
35301
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -35829,8 +36155,8 @@ function TableView({
|
|
|
35829
36155
|
}) {
|
|
35830
36156
|
const eventBus = useEventBus();
|
|
35831
36157
|
const { t } = useTranslate();
|
|
35832
|
-
const [visibleCount, setVisibleCount] =
|
|
35833
|
-
const [localSelected, setLocalSelected] =
|
|
36158
|
+
const [visibleCount, setVisibleCount] = React105__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
36159
|
+
const [localSelected, setLocalSelected] = React105__default.useState(/* @__PURE__ */ new Set());
|
|
35834
36160
|
const colDefs = columns ?? fields ?? [];
|
|
35835
36161
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
35836
36162
|
const dnd = useDataDnd({
|
|
@@ -36025,12 +36351,12 @@ function TableView({
|
|
|
36025
36351
|
]
|
|
36026
36352
|
}
|
|
36027
36353
|
);
|
|
36028
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
36354
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React105__default.Fragment, { children: rowInner }, id);
|
|
36029
36355
|
};
|
|
36030
36356
|
const items = Array.from(data);
|
|
36031
36357
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
36032
36358
|
let runningIndex = 0;
|
|
36033
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
36359
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
36034
36360
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
36035
36361
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
36036
36362
|
] }, gi)) });
|
|
@@ -37249,7 +37575,7 @@ var init_StepFlow = __esm({
|
|
|
37249
37575
|
className
|
|
37250
37576
|
}) => {
|
|
37251
37577
|
if (orientation === "vertical") {
|
|
37252
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
37578
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React105__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
37253
37579
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
37254
37580
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
37255
37581
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -37260,7 +37586,7 @@ var init_StepFlow = __esm({
|
|
|
37260
37586
|
] })
|
|
37261
37587
|
] }) }, index)) });
|
|
37262
37588
|
}
|
|
37263
|
-
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(
|
|
37589
|
+
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(React105__default.Fragment, { children: [
|
|
37264
37590
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
37265
37591
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
37266
37592
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -38245,7 +38571,7 @@ var init_LikertScale = __esm({
|
|
|
38245
38571
|
md: "text-base",
|
|
38246
38572
|
lg: "text-lg"
|
|
38247
38573
|
};
|
|
38248
|
-
LikertScale =
|
|
38574
|
+
LikertScale = React105__default.forwardRef(
|
|
38249
38575
|
({
|
|
38250
38576
|
question,
|
|
38251
38577
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -38257,7 +38583,7 @@ var init_LikertScale = __esm({
|
|
|
38257
38583
|
variant = "radios",
|
|
38258
38584
|
className
|
|
38259
38585
|
}, ref) => {
|
|
38260
|
-
const groupId =
|
|
38586
|
+
const groupId = React105__default.useId();
|
|
38261
38587
|
const eventBus = useEventBus();
|
|
38262
38588
|
const handleSelect = useCallback(
|
|
38263
38589
|
(next) => {
|
|
@@ -40539,7 +40865,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
40539
40865
|
"aria-label": t("aria.breadcrumb"),
|
|
40540
40866
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
40541
40867
|
const isLast = idx === items.length - 1;
|
|
40542
|
-
return /* @__PURE__ */ jsxs(
|
|
40868
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
40543
40869
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
40544
40870
|
Icon,
|
|
40545
40871
|
{
|
|
@@ -41408,7 +41734,7 @@ var init_MiniStateMachine = __esm({
|
|
|
41408
41734
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
41409
41735
|
const tc = transitionCounts[s.name] ?? 0;
|
|
41410
41736
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
41411
|
-
return /* @__PURE__ */ jsxs(
|
|
41737
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
41412
41738
|
/* @__PURE__ */ jsx(
|
|
41413
41739
|
AvlState,
|
|
41414
41740
|
{
|
|
@@ -41612,7 +41938,7 @@ var init_PageHeader = __esm({
|
|
|
41612
41938
|
info: "bg-info/10 text-info"
|
|
41613
41939
|
};
|
|
41614
41940
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
41615
|
-
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(
|
|
41941
|
+
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(React105__default.Fragment, { children: [
|
|
41616
41942
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
41617
41943
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
41618
41944
|
"a",
|
|
@@ -41970,7 +42296,7 @@ var init_Section = __esm({
|
|
|
41970
42296
|
as: Component = "section"
|
|
41971
42297
|
}) => {
|
|
41972
42298
|
const hasHeader = title || description || action;
|
|
41973
|
-
return
|
|
42299
|
+
return React105__default.createElement(
|
|
41974
42300
|
Component,
|
|
41975
42301
|
{
|
|
41976
42302
|
className: cn(
|
|
@@ -42336,7 +42662,7 @@ var init_WizardContainer = __esm({
|
|
|
42336
42662
|
const isCompleted = index < currentStep;
|
|
42337
42663
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
42338
42664
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
42339
|
-
return /* @__PURE__ */ jsxs(
|
|
42665
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
42340
42666
|
/* @__PURE__ */ jsx(
|
|
42341
42667
|
Button,
|
|
42342
42668
|
{
|
|
@@ -44769,7 +45095,7 @@ var init_DetailPanel = __esm({
|
|
|
44769
45095
|
}
|
|
44770
45096
|
});
|
|
44771
45097
|
function extractTitle(children) {
|
|
44772
|
-
if (!
|
|
45098
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
44773
45099
|
const props = children.props;
|
|
44774
45100
|
if (typeof props.title === "string") {
|
|
44775
45101
|
return props.title;
|
|
@@ -45115,12 +45441,12 @@ var init_Form = __esm({
|
|
|
45115
45441
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
45116
45442
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
45117
45443
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
45118
|
-
const normalizedInitialData =
|
|
45444
|
+
const normalizedInitialData = React105__default.useMemo(() => {
|
|
45119
45445
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
45120
45446
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
45121
45447
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
45122
45448
|
}, [entity, initialData]);
|
|
45123
|
-
const entityDerivedFields =
|
|
45449
|
+
const entityDerivedFields = React105__default.useMemo(() => {
|
|
45124
45450
|
if (fields && fields.length > 0) return void 0;
|
|
45125
45451
|
if (!resolvedEntity) return void 0;
|
|
45126
45452
|
return resolvedEntity.fields.map(
|
|
@@ -45141,16 +45467,16 @@ var init_Form = __esm({
|
|
|
45141
45467
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
45142
45468
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
45143
45469
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
45144
|
-
const [formData, setFormData] =
|
|
45470
|
+
const [formData, setFormData] = React105__default.useState(
|
|
45145
45471
|
normalizedInitialData
|
|
45146
45472
|
);
|
|
45147
|
-
const [collapsedSections, setCollapsedSections] =
|
|
45473
|
+
const [collapsedSections, setCollapsedSections] = React105__default.useState(
|
|
45148
45474
|
/* @__PURE__ */ new Set()
|
|
45149
45475
|
);
|
|
45150
|
-
const [submitError, setSubmitError] =
|
|
45151
|
-
const formRef =
|
|
45476
|
+
const [submitError, setSubmitError] = React105__default.useState(null);
|
|
45477
|
+
const formRef = React105__default.useRef(null);
|
|
45152
45478
|
const formMode = props.mode;
|
|
45153
|
-
const mountedRef =
|
|
45479
|
+
const mountedRef = React105__default.useRef(false);
|
|
45154
45480
|
if (!mountedRef.current) {
|
|
45155
45481
|
mountedRef.current = true;
|
|
45156
45482
|
debug("forms", "mount", {
|
|
@@ -45163,7 +45489,7 @@ var init_Form = __esm({
|
|
|
45163
45489
|
});
|
|
45164
45490
|
}
|
|
45165
45491
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
45166
|
-
const evalContext =
|
|
45492
|
+
const evalContext = React105__default.useMemo(
|
|
45167
45493
|
() => ({
|
|
45168
45494
|
formValues: formData,
|
|
45169
45495
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -45172,7 +45498,7 @@ var init_Form = __esm({
|
|
|
45172
45498
|
}),
|
|
45173
45499
|
[formData, externalContext]
|
|
45174
45500
|
);
|
|
45175
|
-
|
|
45501
|
+
React105__default.useEffect(() => {
|
|
45176
45502
|
debug("forms", "initialData-sync", {
|
|
45177
45503
|
mode: formMode,
|
|
45178
45504
|
normalizedInitialData,
|
|
@@ -45183,7 +45509,7 @@ var init_Form = __esm({
|
|
|
45183
45509
|
setFormData(normalizedInitialData);
|
|
45184
45510
|
}
|
|
45185
45511
|
}, [normalizedInitialData]);
|
|
45186
|
-
const processCalculations =
|
|
45512
|
+
const processCalculations = React105__default.useCallback(
|
|
45187
45513
|
(changedFieldId, newFormData) => {
|
|
45188
45514
|
if (!hiddenCalculations.length) return;
|
|
45189
45515
|
const context = {
|
|
@@ -45208,7 +45534,7 @@ var init_Form = __esm({
|
|
|
45208
45534
|
},
|
|
45209
45535
|
[hiddenCalculations, externalContext, eventBus]
|
|
45210
45536
|
);
|
|
45211
|
-
const checkViolations =
|
|
45537
|
+
const checkViolations = React105__default.useCallback(
|
|
45212
45538
|
(changedFieldId, newFormData) => {
|
|
45213
45539
|
if (!violationTriggers.length) return;
|
|
45214
45540
|
const context = {
|
|
@@ -45246,7 +45572,7 @@ var init_Form = __esm({
|
|
|
45246
45572
|
processCalculations(name, newFormData);
|
|
45247
45573
|
checkViolations(name, newFormData);
|
|
45248
45574
|
};
|
|
45249
|
-
const isFieldVisible =
|
|
45575
|
+
const isFieldVisible = React105__default.useCallback(
|
|
45250
45576
|
(fieldName) => {
|
|
45251
45577
|
const condition = conditionalFields[fieldName];
|
|
45252
45578
|
if (!condition) return true;
|
|
@@ -45254,7 +45580,7 @@ var init_Form = __esm({
|
|
|
45254
45580
|
},
|
|
45255
45581
|
[conditionalFields, evalContext]
|
|
45256
45582
|
);
|
|
45257
|
-
const isSectionVisible =
|
|
45583
|
+
const isSectionVisible = React105__default.useCallback(
|
|
45258
45584
|
(section) => {
|
|
45259
45585
|
if (!section.condition) return true;
|
|
45260
45586
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -45330,7 +45656,7 @@ var init_Form = __esm({
|
|
|
45330
45656
|
eventBus.emit(`UI:${onCancel}`);
|
|
45331
45657
|
}
|
|
45332
45658
|
};
|
|
45333
|
-
const renderField =
|
|
45659
|
+
const renderField = React105__default.useCallback(
|
|
45334
45660
|
(field) => {
|
|
45335
45661
|
const fieldName = field.name || field.field;
|
|
45336
45662
|
if (!fieldName) return null;
|
|
@@ -45351,7 +45677,7 @@ var init_Form = __esm({
|
|
|
45351
45677
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
45352
45678
|
);
|
|
45353
45679
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
45354
|
-
const normalizedFields =
|
|
45680
|
+
const normalizedFields = React105__default.useMemo(() => {
|
|
45355
45681
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
45356
45682
|
return effectiveFields.map((field) => {
|
|
45357
45683
|
if (typeof field === "string") {
|
|
@@ -45375,7 +45701,7 @@ var init_Form = __esm({
|
|
|
45375
45701
|
return field;
|
|
45376
45702
|
});
|
|
45377
45703
|
}, [effectiveFields, resolvedEntity]);
|
|
45378
|
-
const schemaFields =
|
|
45704
|
+
const schemaFields = React105__default.useMemo(() => {
|
|
45379
45705
|
if (normalizedFields.length === 0) return null;
|
|
45380
45706
|
if (isDebugEnabled()) {
|
|
45381
45707
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -45385,7 +45711,7 @@ var init_Form = __esm({
|
|
|
45385
45711
|
}
|
|
45386
45712
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
45387
45713
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
45388
|
-
const sectionElements =
|
|
45714
|
+
const sectionElements = React105__default.useMemo(() => {
|
|
45389
45715
|
if (!sections || sections.length === 0) return null;
|
|
45390
45716
|
return sections.map((section) => {
|
|
45391
45717
|
if (!isSectionVisible(section)) {
|
|
@@ -46110,7 +46436,7 @@ var init_List = __esm({
|
|
|
46110
46436
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
46111
46437
|
return [];
|
|
46112
46438
|
}, [entity]);
|
|
46113
|
-
const getItemActions =
|
|
46439
|
+
const getItemActions = React105__default.useCallback(
|
|
46114
46440
|
(item) => {
|
|
46115
46441
|
if (!itemActions) return [];
|
|
46116
46442
|
if (typeof itemActions === "function") {
|
|
@@ -46585,7 +46911,7 @@ var init_MediaGallery = __esm({
|
|
|
46585
46911
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
46586
46912
|
);
|
|
46587
46913
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46588
|
-
const items =
|
|
46914
|
+
const items = React105__default.useMemo(() => {
|
|
46589
46915
|
if (propItems) return propItems;
|
|
46590
46916
|
if (entityData.length === 0) return [];
|
|
46591
46917
|
return entityData.map((record, idx) => {
|
|
@@ -46748,7 +47074,7 @@ var init_MediaGallery = __esm({
|
|
|
46748
47074
|
}
|
|
46749
47075
|
});
|
|
46750
47076
|
function extractTitle2(children) {
|
|
46751
|
-
if (!
|
|
47077
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
46752
47078
|
const props = children.props;
|
|
46753
47079
|
if (typeof props.title === "string") {
|
|
46754
47080
|
return props.title;
|
|
@@ -47018,7 +47344,7 @@ var init_debugRegistry = __esm({
|
|
|
47018
47344
|
}
|
|
47019
47345
|
});
|
|
47020
47346
|
function useDebugData() {
|
|
47021
|
-
const [data, setData] =
|
|
47347
|
+
const [data, setData] = React105.useState(() => ({
|
|
47022
47348
|
traits: [],
|
|
47023
47349
|
ticks: [],
|
|
47024
47350
|
guards: [],
|
|
@@ -47032,7 +47358,7 @@ function useDebugData() {
|
|
|
47032
47358
|
},
|
|
47033
47359
|
lastUpdate: Date.now()
|
|
47034
47360
|
}));
|
|
47035
|
-
|
|
47361
|
+
React105.useEffect(() => {
|
|
47036
47362
|
const updateData = () => {
|
|
47037
47363
|
setData({
|
|
47038
47364
|
traits: getAllTraits(),
|
|
@@ -47141,12 +47467,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
47141
47467
|
return positions;
|
|
47142
47468
|
}
|
|
47143
47469
|
function WalkMinimap() {
|
|
47144
|
-
const [walkStep, setWalkStep] =
|
|
47145
|
-
const [traits2, setTraits] =
|
|
47146
|
-
const [coveredEdges, setCoveredEdges] =
|
|
47147
|
-
const [completedTraits, setCompletedTraits] =
|
|
47148
|
-
const prevTraitRef =
|
|
47149
|
-
|
|
47470
|
+
const [walkStep, setWalkStep] = React105.useState(null);
|
|
47471
|
+
const [traits2, setTraits] = React105.useState([]);
|
|
47472
|
+
const [coveredEdges, setCoveredEdges] = React105.useState([]);
|
|
47473
|
+
const [completedTraits, setCompletedTraits] = React105.useState(/* @__PURE__ */ new Set());
|
|
47474
|
+
const prevTraitRef = React105.useRef(null);
|
|
47475
|
+
React105.useEffect(() => {
|
|
47150
47476
|
const interval = setInterval(() => {
|
|
47151
47477
|
const w = window;
|
|
47152
47478
|
const step = w.__orbitalWalkStep;
|
|
@@ -47582,15 +47908,15 @@ var init_EntitiesTab = __esm({
|
|
|
47582
47908
|
});
|
|
47583
47909
|
function EventFlowTab({ events: events2 }) {
|
|
47584
47910
|
const { t } = useTranslate();
|
|
47585
|
-
const [filter, setFilter] =
|
|
47586
|
-
const containerRef =
|
|
47587
|
-
const [autoScroll, setAutoScroll] =
|
|
47588
|
-
|
|
47911
|
+
const [filter, setFilter] = React105.useState("all");
|
|
47912
|
+
const containerRef = React105.useRef(null);
|
|
47913
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
47914
|
+
React105.useEffect(() => {
|
|
47589
47915
|
if (autoScroll && containerRef.current) {
|
|
47590
47916
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47591
47917
|
}
|
|
47592
47918
|
}, [events2.length, autoScroll]);
|
|
47593
|
-
const filteredEvents =
|
|
47919
|
+
const filteredEvents = React105.useMemo(() => {
|
|
47594
47920
|
if (filter === "all") return events2;
|
|
47595
47921
|
return events2.filter((e) => e.type === filter);
|
|
47596
47922
|
}, [events2, filter]);
|
|
@@ -47706,7 +48032,7 @@ var init_EventFlowTab = __esm({
|
|
|
47706
48032
|
});
|
|
47707
48033
|
function GuardsPanel({ guards }) {
|
|
47708
48034
|
const { t } = useTranslate();
|
|
47709
|
-
const [filter, setFilter] =
|
|
48035
|
+
const [filter, setFilter] = React105.useState("all");
|
|
47710
48036
|
if (guards.length === 0) {
|
|
47711
48037
|
return /* @__PURE__ */ jsx(
|
|
47712
48038
|
EmptyState,
|
|
@@ -47719,7 +48045,7 @@ function GuardsPanel({ guards }) {
|
|
|
47719
48045
|
}
|
|
47720
48046
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47721
48047
|
const failedCount = guards.length - passedCount;
|
|
47722
|
-
const filteredGuards =
|
|
48048
|
+
const filteredGuards = React105.useMemo(() => {
|
|
47723
48049
|
if (filter === "all") return guards;
|
|
47724
48050
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47725
48051
|
return guards.filter((g) => !g.result);
|
|
@@ -47882,10 +48208,10 @@ function EffectBadge({ effect }) {
|
|
|
47882
48208
|
}
|
|
47883
48209
|
function TransitionTimeline({ transitions }) {
|
|
47884
48210
|
const { t } = useTranslate();
|
|
47885
|
-
const containerRef =
|
|
47886
|
-
const [autoScroll, setAutoScroll] =
|
|
47887
|
-
const [expandedId, setExpandedId] =
|
|
47888
|
-
|
|
48211
|
+
const containerRef = React105.useRef(null);
|
|
48212
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
48213
|
+
const [expandedId, setExpandedId] = React105.useState(null);
|
|
48214
|
+
React105.useEffect(() => {
|
|
47889
48215
|
if (autoScroll && containerRef.current) {
|
|
47890
48216
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47891
48217
|
}
|
|
@@ -48165,9 +48491,9 @@ function getAllEvents(traits2) {
|
|
|
48165
48491
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
48166
48492
|
const eventBus = useEventBus();
|
|
48167
48493
|
const { t } = useTranslate();
|
|
48168
|
-
const [log9, setLog] =
|
|
48169
|
-
const prevStatesRef =
|
|
48170
|
-
|
|
48494
|
+
const [log9, setLog] = React105.useState([]);
|
|
48495
|
+
const prevStatesRef = React105.useRef(/* @__PURE__ */ new Map());
|
|
48496
|
+
React105.useEffect(() => {
|
|
48171
48497
|
for (const trait of traits2) {
|
|
48172
48498
|
const prev = prevStatesRef.current.get(trait.id);
|
|
48173
48499
|
if (prev && prev !== trait.currentState) {
|
|
@@ -48336,10 +48662,10 @@ function VerifyModePanel({
|
|
|
48336
48662
|
localCount
|
|
48337
48663
|
}) {
|
|
48338
48664
|
const { t } = useTranslate();
|
|
48339
|
-
const [expanded, setExpanded] =
|
|
48340
|
-
const scrollRef =
|
|
48341
|
-
const prevCountRef =
|
|
48342
|
-
|
|
48665
|
+
const [expanded, setExpanded] = React105.useState(true);
|
|
48666
|
+
const scrollRef = React105.useRef(null);
|
|
48667
|
+
const prevCountRef = React105.useRef(0);
|
|
48668
|
+
React105.useEffect(() => {
|
|
48343
48669
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
48344
48670
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
48345
48671
|
}
|
|
@@ -48396,10 +48722,10 @@ function RuntimeDebugger({
|
|
|
48396
48722
|
schema
|
|
48397
48723
|
}) {
|
|
48398
48724
|
const { t } = useTranslate();
|
|
48399
|
-
const [isCollapsed, setIsCollapsed] =
|
|
48400
|
-
const [isVisible, setIsVisible] =
|
|
48725
|
+
const [isCollapsed, setIsCollapsed] = React105.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48726
|
+
const [isVisible, setIsVisible] = React105.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
48401
48727
|
const debugData = useDebugData();
|
|
48402
|
-
|
|
48728
|
+
React105.useEffect(() => {
|
|
48403
48729
|
if (mode === "inline") return;
|
|
48404
48730
|
return onDebugToggle((enabled) => {
|
|
48405
48731
|
setIsVisible(enabled);
|
|
@@ -48408,7 +48734,7 @@ function RuntimeDebugger({
|
|
|
48408
48734
|
}
|
|
48409
48735
|
});
|
|
48410
48736
|
}, [mode]);
|
|
48411
|
-
|
|
48737
|
+
React105.useEffect(() => {
|
|
48412
48738
|
if (mode === "inline") return;
|
|
48413
48739
|
const handleKeyDown = (e) => {
|
|
48414
48740
|
if (e.key === "`" && isVisible) {
|
|
@@ -48928,7 +49254,7 @@ var init_StatCard = __esm({
|
|
|
48928
49254
|
const labelToUse = propLabel ?? propTitle;
|
|
48929
49255
|
const eventBus = useEventBus();
|
|
48930
49256
|
const { t } = useTranslate();
|
|
48931
|
-
const handleActionClick =
|
|
49257
|
+
const handleActionClick = React105__default.useCallback(() => {
|
|
48932
49258
|
if (action?.event) {
|
|
48933
49259
|
eventBus.emit(`UI:${action.event}`, {});
|
|
48934
49260
|
}
|
|
@@ -48939,7 +49265,7 @@ var init_StatCard = __esm({
|
|
|
48939
49265
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
48940
49266
|
const isLoading = externalLoading ?? false;
|
|
48941
49267
|
const error = externalError;
|
|
48942
|
-
const computeMetricValue =
|
|
49268
|
+
const computeMetricValue = React105__default.useCallback(
|
|
48943
49269
|
(metric, items) => {
|
|
48944
49270
|
if (metric.value !== void 0) {
|
|
48945
49271
|
return metric.value;
|
|
@@ -48978,7 +49304,7 @@ var init_StatCard = __esm({
|
|
|
48978
49304
|
},
|
|
48979
49305
|
[]
|
|
48980
49306
|
);
|
|
48981
|
-
const schemaStats =
|
|
49307
|
+
const schemaStats = React105__default.useMemo(() => {
|
|
48982
49308
|
if (!metrics || metrics.length === 0) return null;
|
|
48983
49309
|
return metrics.map((metric) => ({
|
|
48984
49310
|
label: metric.label,
|
|
@@ -48986,7 +49312,7 @@ var init_StatCard = __esm({
|
|
|
48986
49312
|
format: metric.format
|
|
48987
49313
|
}));
|
|
48988
49314
|
}, [metrics, data, computeMetricValue]);
|
|
48989
|
-
const calculatedTrend =
|
|
49315
|
+
const calculatedTrend = React105__default.useMemo(() => {
|
|
48990
49316
|
if (manualTrend !== void 0) return manualTrend;
|
|
48991
49317
|
if (previousValue === void 0 || currentValue === void 0)
|
|
48992
49318
|
return void 0;
|
|
@@ -49626,8 +49952,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
49626
49952
|
] });
|
|
49627
49953
|
};
|
|
49628
49954
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
49629
|
-
const endRef =
|
|
49630
|
-
|
|
49955
|
+
const endRef = React105__default.useRef(null);
|
|
49956
|
+
React105__default.useEffect(() => {
|
|
49631
49957
|
if (!autoScroll) return;
|
|
49632
49958
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
49633
49959
|
}, [activities.length, autoScroll]);
|
|
@@ -49721,7 +50047,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
49721
50047
|
};
|
|
49722
50048
|
SubagentRichCard = ({ subagent }) => {
|
|
49723
50049
|
const { t } = useTranslate();
|
|
49724
|
-
const activities =
|
|
50050
|
+
const activities = React105__default.useMemo(
|
|
49725
50051
|
() => subagentMessagesToActivities(subagent.messages),
|
|
49726
50052
|
[subagent.messages]
|
|
49727
50053
|
);
|
|
@@ -49798,8 +50124,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
49798
50124
|
] });
|
|
49799
50125
|
};
|
|
49800
50126
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
49801
|
-
const endRef =
|
|
49802
|
-
|
|
50127
|
+
const endRef = React105__default.useRef(null);
|
|
50128
|
+
React105__default.useEffect(() => {
|
|
49803
50129
|
if (!autoScroll) return;
|
|
49804
50130
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
49805
50131
|
}, [messages.length, autoScroll]);
|
|
@@ -50229,7 +50555,7 @@ var init_Timeline = __esm({
|
|
|
50229
50555
|
}) => {
|
|
50230
50556
|
const { t } = useTranslate();
|
|
50231
50557
|
const entityData = entity ?? [];
|
|
50232
|
-
const items =
|
|
50558
|
+
const items = React105__default.useMemo(() => {
|
|
50233
50559
|
if (propItems) return propItems;
|
|
50234
50560
|
if (entityData.length === 0) return [];
|
|
50235
50561
|
return entityData.map((record, idx) => {
|
|
@@ -50331,7 +50657,7 @@ var init_Timeline = __esm({
|
|
|
50331
50657
|
}
|
|
50332
50658
|
});
|
|
50333
50659
|
function extractToastProps(children) {
|
|
50334
|
-
if (!
|
|
50660
|
+
if (!React105__default.isValidElement(children)) {
|
|
50335
50661
|
if (typeof children === "string") {
|
|
50336
50662
|
return { message: children };
|
|
50337
50663
|
}
|
|
@@ -50369,7 +50695,7 @@ var init_ToastSlot = __esm({
|
|
|
50369
50695
|
eventBus.emit("UI:CLOSE");
|
|
50370
50696
|
};
|
|
50371
50697
|
if (!isVisible) return null;
|
|
50372
|
-
const isCustomContent =
|
|
50698
|
+
const isCustomContent = React105__default.isValidElement(children) && !message;
|
|
50373
50699
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50374
50700
|
Toast,
|
|
50375
50701
|
{
|
|
@@ -50385,9 +50711,33 @@ var init_ToastSlot = __esm({
|
|
|
50385
50711
|
ToastSlot.displayName = "ToastSlot";
|
|
50386
50712
|
}
|
|
50387
50713
|
});
|
|
50388
|
-
|
|
50389
|
-
|
|
50390
|
-
|
|
50714
|
+
function lazyThree(name, loader) {
|
|
50715
|
+
const Lazy = React105__default.lazy(
|
|
50716
|
+
() => loader().then((m) => {
|
|
50717
|
+
const Resolved = m[name];
|
|
50718
|
+
if (!Resolved) {
|
|
50719
|
+
throw new Error(
|
|
50720
|
+
`[@almadar/ui] 3D component "${name}" was not found in the three subpath bundle.`
|
|
50721
|
+
);
|
|
50722
|
+
}
|
|
50723
|
+
return { default: Resolved };
|
|
50724
|
+
})
|
|
50725
|
+
);
|
|
50726
|
+
function ThreeWrapper(props) {
|
|
50727
|
+
return React105__default.createElement(
|
|
50728
|
+
ThreeBoundary,
|
|
50729
|
+
{ name },
|
|
50730
|
+
React105__default.createElement(
|
|
50731
|
+
React105__default.Suspense,
|
|
50732
|
+
{ fallback: null },
|
|
50733
|
+
React105__default.createElement(Lazy, props)
|
|
50734
|
+
)
|
|
50735
|
+
);
|
|
50736
|
+
}
|
|
50737
|
+
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
50738
|
+
return ThreeWrapper;
|
|
50739
|
+
}
|
|
50740
|
+
var ThreeBoundary, GameBoard3D, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
|
|
50391
50741
|
var init_component_registry_generated = __esm({
|
|
50392
50742
|
"components/core/organisms/component-registry.generated.ts"() {
|
|
50393
50743
|
init_AboutPageTemplate();
|
|
@@ -50498,9 +50848,11 @@ var init_component_registry_generated = __esm({
|
|
|
50498
50848
|
init_Form();
|
|
50499
50849
|
init_FormField();
|
|
50500
50850
|
init_FormSectionHeader();
|
|
50851
|
+
init_GameAudioProvider();
|
|
50501
50852
|
init_GameAudioToggle();
|
|
50502
50853
|
init_GameCard();
|
|
50503
50854
|
init_GameHud();
|
|
50855
|
+
init_GameIcon();
|
|
50504
50856
|
init_GameMenu();
|
|
50505
50857
|
init_GameShell();
|
|
50506
50858
|
init_GameTemplate();
|
|
@@ -50685,6 +51037,33 @@ var init_component_registry_generated = __esm({
|
|
|
50685
51037
|
init_WizardProgress();
|
|
50686
51038
|
init_WorldMapBoard();
|
|
50687
51039
|
init_WorldMapTemplate();
|
|
51040
|
+
ThreeBoundary = class extends React105__default.Component {
|
|
51041
|
+
constructor() {
|
|
51042
|
+
super(...arguments);
|
|
51043
|
+
__publicField(this, "state", { failed: false });
|
|
51044
|
+
}
|
|
51045
|
+
static getDerivedStateFromError() {
|
|
51046
|
+
return { failed: true };
|
|
51047
|
+
}
|
|
51048
|
+
render() {
|
|
51049
|
+
if (this.state.failed) {
|
|
51050
|
+
return React105__default.createElement(
|
|
51051
|
+
"div",
|
|
51052
|
+
{
|
|
51053
|
+
"data-testid": "three-unavailable",
|
|
51054
|
+
style: { padding: 16, fontSize: 13, lineHeight: 1.5, opacity: 0.7 }
|
|
51055
|
+
},
|
|
51056
|
+
`3D pattern "${this.props.name}" requires three.js. Install the optional peers three + @react-three/fiber + @react-three/drei (matching the host React major) to render it.`
|
|
51057
|
+
);
|
|
51058
|
+
}
|
|
51059
|
+
return this.props.children;
|
|
51060
|
+
}
|
|
51061
|
+
};
|
|
51062
|
+
GameBoard3D = lazyThree("GameBoard3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
51063
|
+
GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
51064
|
+
GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
51065
|
+
GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
51066
|
+
GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
50688
51067
|
COMPONENT_REGISTRY = {
|
|
50689
51068
|
"AboutPageTemplate": AboutPageTemplate,
|
|
50690
51069
|
"Accordion": Accordion,
|
|
@@ -50800,9 +51179,16 @@ var init_component_registry_generated = __esm({
|
|
|
50800
51179
|
"Form": Form,
|
|
50801
51180
|
"FormField": FormField,
|
|
50802
51181
|
"FormSectionHeader": FormSectionHeader,
|
|
51182
|
+
"GameAudioProvider": GameAudioProvider,
|
|
50803
51183
|
"GameAudioToggle": GameAudioToggle,
|
|
51184
|
+
"GameBoard3D": GameBoard3D,
|
|
51185
|
+
"GameCanvas3D": GameCanvas3D,
|
|
51186
|
+
"GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
|
|
51187
|
+
"GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
|
|
51188
|
+
"GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
|
|
50804
51189
|
"GameCard": GameCard,
|
|
50805
51190
|
"GameHud": GameHud,
|
|
51191
|
+
"GameIcon": GameIcon,
|
|
50806
51192
|
"GameMenu": GameMenu,
|
|
50807
51193
|
"GameShell": GameShell,
|
|
50808
51194
|
"GameTemplate": GameTemplate,
|
|
@@ -51011,7 +51397,7 @@ function SuspenseConfigProvider({
|
|
|
51011
51397
|
config,
|
|
51012
51398
|
children
|
|
51013
51399
|
}) {
|
|
51014
|
-
return
|
|
51400
|
+
return React105__default.createElement(
|
|
51015
51401
|
SuspenseConfigContext.Provider,
|
|
51016
51402
|
{ value: config },
|
|
51017
51403
|
children
|
|
@@ -51053,7 +51439,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
51053
51439
|
}
|
|
51054
51440
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
51055
51441
|
}
|
|
51056
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
51442
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React105__default.isValidElement(field) && !(field instanceof Date)) {
|
|
51057
51443
|
const obj = field;
|
|
51058
51444
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
51059
51445
|
if (!fieldName) return field;
|
|
@@ -51499,7 +51885,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
51499
51885
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
51500
51886
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
51501
51887
|
}
|
|
51502
|
-
return /* @__PURE__ */ jsx(
|
|
51888
|
+
return /* @__PURE__ */ jsx(React105__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
51503
51889
|
}
|
|
51504
51890
|
if (!child || typeof child !== "object") return null;
|
|
51505
51891
|
const childId = `${parentId}-${index}`;
|
|
@@ -51539,14 +51925,14 @@ function isPatternConfig(value) {
|
|
|
51539
51925
|
if (value === null || value === void 0) return false;
|
|
51540
51926
|
if (typeof value !== "object") return false;
|
|
51541
51927
|
if (Array.isArray(value)) return false;
|
|
51542
|
-
if (
|
|
51928
|
+
if (React105__default.isValidElement(value)) return false;
|
|
51543
51929
|
if (value instanceof Date) return false;
|
|
51544
51930
|
if (typeof value === "function") return false;
|
|
51545
51931
|
const record = value;
|
|
51546
51932
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
51547
51933
|
}
|
|
51548
51934
|
function isPlainConfigObject(value) {
|
|
51549
|
-
if (
|
|
51935
|
+
if (React105__default.isValidElement(value)) return false;
|
|
51550
51936
|
if (value instanceof Date) return false;
|
|
51551
51937
|
const proto = Object.getPrototypeOf(value);
|
|
51552
51938
|
return proto === Object.prototype || proto === null;
|
|
@@ -51672,7 +52058,7 @@ function SlotContentRenderer({
|
|
|
51672
52058
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
51673
52059
|
const slotVal = restProps[slotKey];
|
|
51674
52060
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
51675
|
-
if (
|
|
52061
|
+
if (React105__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
51676
52062
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
51677
52063
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
51678
52064
|
slotVal,
|
|
@@ -51721,7 +52107,7 @@ function SlotContentRenderer({
|
|
|
51721
52107
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
51722
52108
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
51723
52109
|
const sample = resolvedItems[0];
|
|
51724
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
52110
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React105__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
51725
52111
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
51726
52112
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
51727
52113
|
}
|
|
@@ -52012,7 +52398,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
52012
52398
|
if (Array.isArray(body)) {
|
|
52013
52399
|
return body.map((b) => recur(b));
|
|
52014
52400
|
}
|
|
52015
|
-
if (body !== null && typeof body === "object" && !
|
|
52401
|
+
if (body !== null && typeof body === "object" && !React105__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
52016
52402
|
const out = {};
|
|
52017
52403
|
for (const [k, v] of Object.entries(body)) {
|
|
52018
52404
|
out[k] = recur(v);
|
|
@@ -52031,7 +52417,7 @@ function getSlotContentRenderer4() {
|
|
|
52031
52417
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
52032
52418
|
return (item, index) => {
|
|
52033
52419
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
52034
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
52420
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React105__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
52035
52421
|
return null;
|
|
52036
52422
|
}
|
|
52037
52423
|
const record = resolvedBody;
|
|
@@ -52050,7 +52436,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
52050
52436
|
props: childProps,
|
|
52051
52437
|
priority: 0
|
|
52052
52438
|
};
|
|
52053
|
-
return
|
|
52439
|
+
return React105__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
52054
52440
|
};
|
|
52055
52441
|
}
|
|
52056
52442
|
function convertNode(node, callerKey) {
|
|
@@ -52069,7 +52455,7 @@ function convertNode(node, callerKey) {
|
|
|
52069
52455
|
});
|
|
52070
52456
|
return anyChanged ? mapped : node;
|
|
52071
52457
|
}
|
|
52072
|
-
if (typeof node === "object" && !
|
|
52458
|
+
if (typeof node === "object" && !React105__default.isValidElement(node) && !(node instanceof Date)) {
|
|
52073
52459
|
return convertObjectProps(node);
|
|
52074
52460
|
}
|
|
52075
52461
|
return node;
|