@almadar/ui 5.76.1 → 5.76.2
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 +1449 -1428
- package/dist/avl/index.js +250 -229
- package/dist/components/index.cjs +103 -46
- package/dist/components/index.js +103 -37
- package/dist/context/index.cjs +690 -47
- package/dist/context/index.js +682 -2
- package/dist/providers/index.cjs +1828 -1302
- package/dist/providers/index.d.ts +5 -3
- package/dist/providers/index.js +749 -209
- package/dist/runtime/index.cjs +1310 -1289
- package/dist/runtime/index.js +230 -209
- 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,24 @@ var init_useCanvasEffects = __esm({
|
|
|
12447
12447
|
"use client";
|
|
12448
12448
|
}
|
|
12449
12449
|
});
|
|
12450
|
+
var init_useGameAudio = __esm({
|
|
12451
|
+
"components/game/shared/hooks/useGameAudio.ts"() {
|
|
12452
|
+
"use client";
|
|
12453
|
+
}
|
|
12454
|
+
});
|
|
12455
|
+
function useGameAudioContextOptional() {
|
|
12456
|
+
return useContext(GameAudioContext);
|
|
12457
|
+
}
|
|
12458
|
+
var GameAudioContext;
|
|
12459
|
+
var init_GameAudioProvider = __esm({
|
|
12460
|
+
"components/game/shared/providers/GameAudioProvider.tsx"() {
|
|
12461
|
+
"use client";
|
|
12462
|
+
init_useEventBus();
|
|
12463
|
+
init_useGameAudio();
|
|
12464
|
+
GameAudioContext = createContext(null);
|
|
12465
|
+
GameAudioContext.displayName = "GameAudioContext";
|
|
12466
|
+
}
|
|
12467
|
+
});
|
|
12450
12468
|
function GameAudioToggle({
|
|
12451
12469
|
size = "sm",
|
|
12452
12470
|
className
|
|
@@ -12475,6 +12493,7 @@ var init_GameAudioToggle = __esm({
|
|
|
12475
12493
|
"use client";
|
|
12476
12494
|
init_atoms();
|
|
12477
12495
|
init_cn();
|
|
12496
|
+
init_GameAudioProvider();
|
|
12478
12497
|
GameAudioToggle.displayName = "GameAudioToggle";
|
|
12479
12498
|
}
|
|
12480
12499
|
});
|
|
@@ -16142,7 +16161,7 @@ function LinearView({
|
|
|
16142
16161
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
16143
16162
|
const isDone = i < currentIdx;
|
|
16144
16163
|
const isCurrent = i === currentIdx;
|
|
16145
|
-
return /* @__PURE__ */ jsxs(
|
|
16164
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
16146
16165
|
i > 0 && /* @__PURE__ */ jsx(
|
|
16147
16166
|
Typography,
|
|
16148
16167
|
{
|
|
@@ -16670,7 +16689,7 @@ function SequenceBar({
|
|
|
16670
16689
|
onSlotRemove(index);
|
|
16671
16690
|
}, [onSlotRemove, playing]);
|
|
16672
16691
|
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(
|
|
16692
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
16674
16693
|
i > 0 && /* @__PURE__ */ jsx(
|
|
16675
16694
|
Typography,
|
|
16676
16695
|
{
|
|
@@ -19097,10 +19116,10 @@ function getSlotContentRenderer2() {
|
|
|
19097
19116
|
}
|
|
19098
19117
|
function resolveDescriptor(value, idPrefix) {
|
|
19099
19118
|
if (value === null || value === void 0) return value;
|
|
19100
|
-
if (
|
|
19119
|
+
if (React105__default.isValidElement(value)) return value;
|
|
19101
19120
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
19102
19121
|
if (Array.isArray(value)) {
|
|
19103
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
19122
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React105__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
19104
19123
|
}
|
|
19105
19124
|
if (typeof value === "object") {
|
|
19106
19125
|
const rec = value;
|
|
@@ -19236,7 +19255,7 @@ var init_GameTemplate = __esm({
|
|
|
19236
19255
|
}
|
|
19237
19256
|
});
|
|
19238
19257
|
function asDescriptor(v) {
|
|
19239
|
-
if (Array.isArray(v) ||
|
|
19258
|
+
if (Array.isArray(v) || React105__default.isValidElement(v)) return null;
|
|
19240
19259
|
const o = v;
|
|
19241
19260
|
if (typeof o.type !== "string") return null;
|
|
19242
19261
|
const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
|
|
@@ -19251,10 +19270,10 @@ function getSlotContentRenderer3() {
|
|
|
19251
19270
|
}
|
|
19252
19271
|
function resolveDescriptor2(value, idPrefix) {
|
|
19253
19272
|
if (value === null || value === void 0) return value;
|
|
19254
|
-
if (
|
|
19273
|
+
if (React105__default.isValidElement(value)) return value;
|
|
19255
19274
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
19256
19275
|
if (Array.isArray(value)) {
|
|
19257
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
19276
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React105__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
19258
19277
|
}
|
|
19259
19278
|
if (typeof value === "object" && value !== null) {
|
|
19260
19279
|
const desc = asDescriptor(value);
|
|
@@ -20138,6 +20157,8 @@ var init_CardBattlerTemplate = __esm({
|
|
|
20138
20157
|
CardBattlerTemplate.displayName = "CardBattlerTemplate";
|
|
20139
20158
|
}
|
|
20140
20159
|
});
|
|
20160
|
+
|
|
20161
|
+
// components/game/2d/molecules/index.ts
|
|
20141
20162
|
var init_molecules = __esm({
|
|
20142
20163
|
"components/game/2d/molecules/index.ts"() {
|
|
20143
20164
|
init_shared();
|
|
@@ -20232,7 +20253,7 @@ var init_ErrorBoundary = __esm({
|
|
|
20232
20253
|
}
|
|
20233
20254
|
);
|
|
20234
20255
|
};
|
|
20235
|
-
ErrorBoundary = class extends
|
|
20256
|
+
ErrorBoundary = class extends React105__default.Component {
|
|
20236
20257
|
constructor(props) {
|
|
20237
20258
|
super(props);
|
|
20238
20259
|
__publicField(this, "reset", () => {
|
|
@@ -20514,7 +20535,7 @@ var init_Container = __esm({
|
|
|
20514
20535
|
as: Component = "div"
|
|
20515
20536
|
}) => {
|
|
20516
20537
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
20517
|
-
return
|
|
20538
|
+
return React105__default.createElement(
|
|
20518
20539
|
Component,
|
|
20519
20540
|
{
|
|
20520
20541
|
className: cn(
|
|
@@ -23122,7 +23143,7 @@ var init_CodeBlock = __esm({
|
|
|
23122
23143
|
};
|
|
23123
23144
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
23124
23145
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
23125
|
-
CodeBlock =
|
|
23146
|
+
CodeBlock = React105__default.memo(
|
|
23126
23147
|
({
|
|
23127
23148
|
code: rawCode,
|
|
23128
23149
|
language = "text",
|
|
@@ -23709,7 +23730,7 @@ var init_MarkdownContent = __esm({
|
|
|
23709
23730
|
init_Box();
|
|
23710
23731
|
init_CodeBlock();
|
|
23711
23732
|
init_cn();
|
|
23712
|
-
MarkdownContent =
|
|
23733
|
+
MarkdownContent = React105__default.memo(
|
|
23713
23734
|
({ content, direction = "ltr", className }) => {
|
|
23714
23735
|
const { t: _t } = useTranslate();
|
|
23715
23736
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -24986,7 +25007,7 @@ var init_StateMachineView = __esm({
|
|
|
24986
25007
|
style: { top: title ? 30 : 0 },
|
|
24987
25008
|
children: [
|
|
24988
25009
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
24989
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
25010
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React105__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
24990
25011
|
StateNode2,
|
|
24991
25012
|
{
|
|
24992
25013
|
state,
|
|
@@ -30534,8 +30555,8 @@ var init_Menu = __esm({
|
|
|
30534
30555
|
"bottom-end": "bottom-start"
|
|
30535
30556
|
};
|
|
30536
30557
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
30537
|
-
const triggerChild =
|
|
30538
|
-
const triggerElement =
|
|
30558
|
+
const triggerChild = React105__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
30559
|
+
const triggerElement = React105__default.cloneElement(
|
|
30539
30560
|
triggerChild,
|
|
30540
30561
|
{
|
|
30541
30562
|
ref: triggerRef,
|
|
@@ -30630,14 +30651,14 @@ function useDataDnd(args) {
|
|
|
30630
30651
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
30631
30652
|
const enabled = isZone || Boolean(dndRoot);
|
|
30632
30653
|
const eventBus = useEventBus();
|
|
30633
|
-
const parentRoot =
|
|
30654
|
+
const parentRoot = React105__default.useContext(RootCtx);
|
|
30634
30655
|
const isRoot = enabled && parentRoot === null;
|
|
30635
|
-
const zoneId =
|
|
30656
|
+
const zoneId = React105__default.useId();
|
|
30636
30657
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
30637
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
30638
|
-
const optimisticOrdersRef =
|
|
30658
|
+
const [optimisticOrders, setOptimisticOrders] = React105__default.useState(() => /* @__PURE__ */ new Map());
|
|
30659
|
+
const optimisticOrdersRef = React105__default.useRef(optimisticOrders);
|
|
30639
30660
|
optimisticOrdersRef.current = optimisticOrders;
|
|
30640
|
-
const clearOptimisticOrder =
|
|
30661
|
+
const clearOptimisticOrder = React105__default.useCallback((group) => {
|
|
30641
30662
|
setOptimisticOrders((prev) => {
|
|
30642
30663
|
if (!prev.has(group)) return prev;
|
|
30643
30664
|
const next = new Map(prev);
|
|
@@ -30662,7 +30683,7 @@ function useDataDnd(args) {
|
|
|
30662
30683
|
const raw = it[dndItemIdField];
|
|
30663
30684
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
30664
30685
|
}).join("|");
|
|
30665
|
-
const itemIds =
|
|
30686
|
+
const itemIds = React105__default.useMemo(
|
|
30666
30687
|
() => orderedItems.map((it, idx) => {
|
|
30667
30688
|
const raw = it[dndItemIdField];
|
|
30668
30689
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -30673,7 +30694,7 @@ function useDataDnd(args) {
|
|
|
30673
30694
|
const raw = it[dndItemIdField];
|
|
30674
30695
|
return raw != null ? String(raw) : `__${idx}`;
|
|
30675
30696
|
}).join("|");
|
|
30676
|
-
|
|
30697
|
+
React105__default.useEffect(() => {
|
|
30677
30698
|
const root = isRoot ? null : parentRoot;
|
|
30678
30699
|
if (root) {
|
|
30679
30700
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -30681,20 +30702,20 @@ function useDataDnd(args) {
|
|
|
30681
30702
|
clearOptimisticOrder(ownGroup);
|
|
30682
30703
|
}
|
|
30683
30704
|
}, [itemsContentSig, ownGroup]);
|
|
30684
|
-
const zonesRef =
|
|
30685
|
-
const registerZone =
|
|
30705
|
+
const zonesRef = React105__default.useRef(/* @__PURE__ */ new Map());
|
|
30706
|
+
const registerZone = React105__default.useCallback((zoneId2, meta2) => {
|
|
30686
30707
|
zonesRef.current.set(zoneId2, meta2);
|
|
30687
30708
|
}, []);
|
|
30688
|
-
const unregisterZone =
|
|
30709
|
+
const unregisterZone = React105__default.useCallback((zoneId2) => {
|
|
30689
30710
|
zonesRef.current.delete(zoneId2);
|
|
30690
30711
|
}, []);
|
|
30691
|
-
const [activeDrag, setActiveDrag] =
|
|
30692
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
30693
|
-
const meta =
|
|
30712
|
+
const [activeDrag, setActiveDrag] = React105__default.useState(null);
|
|
30713
|
+
const [overZoneGroup, setOverZoneGroup] = React105__default.useState(null);
|
|
30714
|
+
const meta = React105__default.useMemo(
|
|
30694
30715
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
30695
30716
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
30696
30717
|
);
|
|
30697
|
-
|
|
30718
|
+
React105__default.useEffect(() => {
|
|
30698
30719
|
const target = isRoot ? null : parentRoot;
|
|
30699
30720
|
if (!target) {
|
|
30700
30721
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -30713,7 +30734,7 @@ function useDataDnd(args) {
|
|
|
30713
30734
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
30714
30735
|
const sensors = useAlmadarDndSensors(true);
|
|
30715
30736
|
const collisionDetection = almadarDndCollisionDetection;
|
|
30716
|
-
const findZoneByItem =
|
|
30737
|
+
const findZoneByItem = React105__default.useCallback(
|
|
30717
30738
|
(id) => {
|
|
30718
30739
|
for (const z of zonesRef.current.values()) {
|
|
30719
30740
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -30722,7 +30743,7 @@ function useDataDnd(args) {
|
|
|
30722
30743
|
},
|
|
30723
30744
|
[]
|
|
30724
30745
|
);
|
|
30725
|
-
|
|
30746
|
+
React105__default.useCallback(
|
|
30726
30747
|
(group) => {
|
|
30727
30748
|
for (const z of zonesRef.current.values()) {
|
|
30728
30749
|
if (z.group === group) return z;
|
|
@@ -30731,7 +30752,7 @@ function useDataDnd(args) {
|
|
|
30731
30752
|
},
|
|
30732
30753
|
[]
|
|
30733
30754
|
);
|
|
30734
|
-
const handleDragEnd =
|
|
30755
|
+
const handleDragEnd = React105__default.useCallback(
|
|
30735
30756
|
(event) => {
|
|
30736
30757
|
const { active, over } = event;
|
|
30737
30758
|
const activeIdStr = String(active.id);
|
|
@@ -30822,8 +30843,8 @@ function useDataDnd(args) {
|
|
|
30822
30843
|
},
|
|
30823
30844
|
[eventBus]
|
|
30824
30845
|
);
|
|
30825
|
-
const sortableData =
|
|
30826
|
-
const SortableItem =
|
|
30846
|
+
const sortableData = React105__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
30847
|
+
const SortableItem = React105__default.useCallback(
|
|
30827
30848
|
({ id, children }) => {
|
|
30828
30849
|
const {
|
|
30829
30850
|
attributes,
|
|
@@ -30863,7 +30884,7 @@ function useDataDnd(args) {
|
|
|
30863
30884
|
id: droppableId,
|
|
30864
30885
|
data: sortableData
|
|
30865
30886
|
});
|
|
30866
|
-
const ctx =
|
|
30887
|
+
const ctx = React105__default.useContext(RootCtx);
|
|
30867
30888
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
30868
30889
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
30869
30890
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -30878,7 +30899,7 @@ function useDataDnd(args) {
|
|
|
30878
30899
|
showForeignPlaceholder,
|
|
30879
30900
|
ctxAvailable: ctx != null
|
|
30880
30901
|
});
|
|
30881
|
-
|
|
30902
|
+
React105__default.useEffect(() => {
|
|
30882
30903
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
30883
30904
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
30884
30905
|
return /* @__PURE__ */ jsx(
|
|
@@ -30892,11 +30913,11 @@ function useDataDnd(args) {
|
|
|
30892
30913
|
}
|
|
30893
30914
|
);
|
|
30894
30915
|
};
|
|
30895
|
-
const rootContextValue =
|
|
30916
|
+
const rootContextValue = React105__default.useMemo(
|
|
30896
30917
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
30897
30918
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
30898
30919
|
);
|
|
30899
|
-
const handleDragStart =
|
|
30920
|
+
const handleDragStart = React105__default.useCallback((event) => {
|
|
30900
30921
|
const sourceZone = findZoneByItem(event.active.id);
|
|
30901
30922
|
const rect = event.active.rect.current.initial;
|
|
30902
30923
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -30915,7 +30936,7 @@ function useDataDnd(args) {
|
|
|
30915
30936
|
isRoot
|
|
30916
30937
|
});
|
|
30917
30938
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
30918
|
-
const handleDragOver =
|
|
30939
|
+
const handleDragOver = React105__default.useCallback((event) => {
|
|
30919
30940
|
const { active, over } = event;
|
|
30920
30941
|
const overData = over?.data?.current;
|
|
30921
30942
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -30985,7 +31006,7 @@ function useDataDnd(args) {
|
|
|
30985
31006
|
return next;
|
|
30986
31007
|
});
|
|
30987
31008
|
}, []);
|
|
30988
|
-
const handleDragCancel =
|
|
31009
|
+
const handleDragCancel = React105__default.useCallback((event) => {
|
|
30989
31010
|
setActiveDrag(null);
|
|
30990
31011
|
setOverZoneGroup(null);
|
|
30991
31012
|
dndLog.warn("dragCancel", {
|
|
@@ -30993,12 +31014,12 @@ function useDataDnd(args) {
|
|
|
30993
31014
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
30994
31015
|
});
|
|
30995
31016
|
}, []);
|
|
30996
|
-
const handleDragEndWithCleanup =
|
|
31017
|
+
const handleDragEndWithCleanup = React105__default.useCallback((event) => {
|
|
30997
31018
|
handleDragEnd(event);
|
|
30998
31019
|
setActiveDrag(null);
|
|
30999
31020
|
setOverZoneGroup(null);
|
|
31000
31021
|
}, [handleDragEnd]);
|
|
31001
|
-
const wrapContainer =
|
|
31022
|
+
const wrapContainer = React105__default.useCallback(
|
|
31002
31023
|
(children) => {
|
|
31003
31024
|
if (!enabled) return children;
|
|
31004
31025
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -31052,7 +31073,7 @@ var init_useDataDnd = __esm({
|
|
|
31052
31073
|
init_useAlmadarDndCollision();
|
|
31053
31074
|
init_Box();
|
|
31054
31075
|
dndLog = createLogger("almadar:ui:dnd");
|
|
31055
|
-
RootCtx =
|
|
31076
|
+
RootCtx = React105__default.createContext(null);
|
|
31056
31077
|
}
|
|
31057
31078
|
});
|
|
31058
31079
|
function renderIconInput(icon, props) {
|
|
@@ -31578,7 +31599,7 @@ function DataList({
|
|
|
31578
31599
|
}) {
|
|
31579
31600
|
const eventBus = useEventBus();
|
|
31580
31601
|
const { t } = useTranslate();
|
|
31581
|
-
const [visibleCount, setVisibleCount] =
|
|
31602
|
+
const [visibleCount, setVisibleCount] = React105__default.useState(pageSize || Infinity);
|
|
31582
31603
|
const fieldDefs = fields ?? columns ?? [];
|
|
31583
31604
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31584
31605
|
const dnd = useDataDnd({
|
|
@@ -31597,7 +31618,7 @@ function DataList({
|
|
|
31597
31618
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
31598
31619
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
31599
31620
|
const hasRenderProp = typeof children === "function";
|
|
31600
|
-
|
|
31621
|
+
React105__default.useEffect(() => {
|
|
31601
31622
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
31602
31623
|
const childrenTypeOf = typeof children;
|
|
31603
31624
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -31701,7 +31722,7 @@ function DataList({
|
|
|
31701
31722
|
const items2 = [...data];
|
|
31702
31723
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
31703
31724
|
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(
|
|
31725
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
31705
31726
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
31706
31727
|
group.items.map((itemData, index) => {
|
|
31707
31728
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -31842,7 +31863,7 @@ function DataList({
|
|
|
31842
31863
|
className
|
|
31843
31864
|
),
|
|
31844
31865
|
children: [
|
|
31845
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31866
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
31846
31867
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
31847
31868
|
group.items.map(
|
|
31848
31869
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -32571,7 +32592,7 @@ var init_Flex = __esm({
|
|
|
32571
32592
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
32572
32593
|
}
|
|
32573
32594
|
}
|
|
32574
|
-
return
|
|
32595
|
+
return React105__default.createElement(Component, {
|
|
32575
32596
|
className: cn(
|
|
32576
32597
|
inline ? "inline-flex" : "flex",
|
|
32577
32598
|
directionStyles[direction],
|
|
@@ -32690,7 +32711,7 @@ var init_Grid = __esm({
|
|
|
32690
32711
|
as: Component = "div"
|
|
32691
32712
|
}) => {
|
|
32692
32713
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
32693
|
-
return
|
|
32714
|
+
return React105__default.createElement(
|
|
32694
32715
|
Component,
|
|
32695
32716
|
{
|
|
32696
32717
|
className: cn(
|
|
@@ -32886,9 +32907,9 @@ var init_Popover = __esm({
|
|
|
32886
32907
|
onMouseLeave: handleClose,
|
|
32887
32908
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
32888
32909
|
};
|
|
32889
|
-
const childElement =
|
|
32910
|
+
const childElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
32890
32911
|
const childPointerDown = childElement.props.onPointerDown;
|
|
32891
|
-
const triggerElement =
|
|
32912
|
+
const triggerElement = React105__default.cloneElement(
|
|
32892
32913
|
childElement,
|
|
32893
32914
|
{
|
|
32894
32915
|
ref: triggerRef,
|
|
@@ -33490,9 +33511,9 @@ var init_Tooltip = __esm({
|
|
|
33490
33511
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
33491
33512
|
};
|
|
33492
33513
|
}, []);
|
|
33493
|
-
const triggerElement =
|
|
33514
|
+
const triggerElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
33494
33515
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
33495
|
-
const trigger =
|
|
33516
|
+
const trigger = React105__default.cloneElement(triggerElement, {
|
|
33496
33517
|
ref: triggerRef,
|
|
33497
33518
|
onMouseEnter: handleMouseEnter,
|
|
33498
33519
|
onMouseLeave: handleMouseLeave,
|
|
@@ -33582,7 +33603,7 @@ var init_WizardProgress = __esm({
|
|
|
33582
33603
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
33583
33604
|
const isActive = index === currentStep;
|
|
33584
33605
|
const isCompleted = index < currentStep;
|
|
33585
|
-
return /* @__PURE__ */ jsxs(
|
|
33606
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
33586
33607
|
/* @__PURE__ */ jsx(
|
|
33587
33608
|
"button",
|
|
33588
33609
|
{
|
|
@@ -34914,13 +34935,13 @@ var init_MapView = __esm({
|
|
|
34914
34935
|
shadowSize: [41, 41]
|
|
34915
34936
|
});
|
|
34916
34937
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
34917
|
-
const { useEffect:
|
|
34938
|
+
const { useEffect: useEffect74, useRef: useRef76, useCallback: useCallback112, useState: useState107 } = React105__default;
|
|
34918
34939
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
34919
34940
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
34920
34941
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
34921
34942
|
const map = useMap();
|
|
34922
|
-
const prevRef =
|
|
34923
|
-
|
|
34943
|
+
const prevRef = useRef76({ centerLat, centerLng, zoom });
|
|
34944
|
+
useEffect74(() => {
|
|
34924
34945
|
const prev = prevRef.current;
|
|
34925
34946
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
34926
34947
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -34931,7 +34952,7 @@ var init_MapView = __esm({
|
|
|
34931
34952
|
}
|
|
34932
34953
|
function MapClickHandler({ onMapClick }) {
|
|
34933
34954
|
const map = useMap();
|
|
34934
|
-
|
|
34955
|
+
useEffect74(() => {
|
|
34935
34956
|
if (!onMapClick) return;
|
|
34936
34957
|
const handler = (e) => {
|
|
34937
34958
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -34959,8 +34980,8 @@ var init_MapView = __esm({
|
|
|
34959
34980
|
showAttribution = true
|
|
34960
34981
|
}) {
|
|
34961
34982
|
const eventBus = useEventBus2();
|
|
34962
|
-
const [clickedPosition, setClickedPosition] =
|
|
34963
|
-
const handleMapClick =
|
|
34983
|
+
const [clickedPosition, setClickedPosition] = useState107(null);
|
|
34984
|
+
const handleMapClick = useCallback112((lat, lng) => {
|
|
34964
34985
|
if (showClickedPin) {
|
|
34965
34986
|
setClickedPosition({ lat, lng });
|
|
34966
34987
|
}
|
|
@@ -34969,7 +34990,7 @@ var init_MapView = __esm({
|
|
|
34969
34990
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
34970
34991
|
}
|
|
34971
34992
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
34972
|
-
const handleMarkerClick =
|
|
34993
|
+
const handleMarkerClick = useCallback112((marker) => {
|
|
34973
34994
|
onMarkerClick?.(marker);
|
|
34974
34995
|
if (markerClickEvent) {
|
|
34975
34996
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -35829,8 +35850,8 @@ function TableView({
|
|
|
35829
35850
|
}) {
|
|
35830
35851
|
const eventBus = useEventBus();
|
|
35831
35852
|
const { t } = useTranslate();
|
|
35832
|
-
const [visibleCount, setVisibleCount] =
|
|
35833
|
-
const [localSelected, setLocalSelected] =
|
|
35853
|
+
const [visibleCount, setVisibleCount] = React105__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
35854
|
+
const [localSelected, setLocalSelected] = React105__default.useState(/* @__PURE__ */ new Set());
|
|
35834
35855
|
const colDefs = columns ?? fields ?? [];
|
|
35835
35856
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
35836
35857
|
const dnd = useDataDnd({
|
|
@@ -36025,12 +36046,12 @@ function TableView({
|
|
|
36025
36046
|
]
|
|
36026
36047
|
}
|
|
36027
36048
|
);
|
|
36028
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
36049
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React105__default.Fragment, { children: rowInner }, id);
|
|
36029
36050
|
};
|
|
36030
36051
|
const items = Array.from(data);
|
|
36031
36052
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
36032
36053
|
let runningIndex = 0;
|
|
36033
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
36054
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
36034
36055
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
36035
36056
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
36036
36057
|
] }, gi)) });
|
|
@@ -37249,7 +37270,7 @@ var init_StepFlow = __esm({
|
|
|
37249
37270
|
className
|
|
37250
37271
|
}) => {
|
|
37251
37272
|
if (orientation === "vertical") {
|
|
37252
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
37273
|
+
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
37274
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
37254
37275
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
37255
37276
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -37260,7 +37281,7 @@ var init_StepFlow = __esm({
|
|
|
37260
37281
|
] })
|
|
37261
37282
|
] }) }, index)) });
|
|
37262
37283
|
}
|
|
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(
|
|
37284
|
+
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
37285
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
37265
37286
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
37266
37287
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -38245,7 +38266,7 @@ var init_LikertScale = __esm({
|
|
|
38245
38266
|
md: "text-base",
|
|
38246
38267
|
lg: "text-lg"
|
|
38247
38268
|
};
|
|
38248
|
-
LikertScale =
|
|
38269
|
+
LikertScale = React105__default.forwardRef(
|
|
38249
38270
|
({
|
|
38250
38271
|
question,
|
|
38251
38272
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -38257,7 +38278,7 @@ var init_LikertScale = __esm({
|
|
|
38257
38278
|
variant = "radios",
|
|
38258
38279
|
className
|
|
38259
38280
|
}, ref) => {
|
|
38260
|
-
const groupId =
|
|
38281
|
+
const groupId = React105__default.useId();
|
|
38261
38282
|
const eventBus = useEventBus();
|
|
38262
38283
|
const handleSelect = useCallback(
|
|
38263
38284
|
(next) => {
|
|
@@ -40539,7 +40560,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
40539
40560
|
"aria-label": t("aria.breadcrumb"),
|
|
40540
40561
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
40541
40562
|
const isLast = idx === items.length - 1;
|
|
40542
|
-
return /* @__PURE__ */ jsxs(
|
|
40563
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
40543
40564
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
40544
40565
|
Icon,
|
|
40545
40566
|
{
|
|
@@ -41408,7 +41429,7 @@ var init_MiniStateMachine = __esm({
|
|
|
41408
41429
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
41409
41430
|
const tc = transitionCounts[s.name] ?? 0;
|
|
41410
41431
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
41411
|
-
return /* @__PURE__ */ jsxs(
|
|
41432
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
41412
41433
|
/* @__PURE__ */ jsx(
|
|
41413
41434
|
AvlState,
|
|
41414
41435
|
{
|
|
@@ -41612,7 +41633,7 @@ var init_PageHeader = __esm({
|
|
|
41612
41633
|
info: "bg-info/10 text-info"
|
|
41613
41634
|
};
|
|
41614
41635
|
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(
|
|
41636
|
+
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
41637
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
41617
41638
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
41618
41639
|
"a",
|
|
@@ -41970,7 +41991,7 @@ var init_Section = __esm({
|
|
|
41970
41991
|
as: Component = "section"
|
|
41971
41992
|
}) => {
|
|
41972
41993
|
const hasHeader = title || description || action;
|
|
41973
|
-
return
|
|
41994
|
+
return React105__default.createElement(
|
|
41974
41995
|
Component,
|
|
41975
41996
|
{
|
|
41976
41997
|
className: cn(
|
|
@@ -42336,7 +42357,7 @@ var init_WizardContainer = __esm({
|
|
|
42336
42357
|
const isCompleted = index < currentStep;
|
|
42337
42358
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
42338
42359
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
42339
|
-
return /* @__PURE__ */ jsxs(
|
|
42360
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
42340
42361
|
/* @__PURE__ */ jsx(
|
|
42341
42362
|
Button,
|
|
42342
42363
|
{
|
|
@@ -44769,7 +44790,7 @@ var init_DetailPanel = __esm({
|
|
|
44769
44790
|
}
|
|
44770
44791
|
});
|
|
44771
44792
|
function extractTitle(children) {
|
|
44772
|
-
if (!
|
|
44793
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
44773
44794
|
const props = children.props;
|
|
44774
44795
|
if (typeof props.title === "string") {
|
|
44775
44796
|
return props.title;
|
|
@@ -45115,12 +45136,12 @@ var init_Form = __esm({
|
|
|
45115
45136
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
45116
45137
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
45117
45138
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
45118
|
-
const normalizedInitialData =
|
|
45139
|
+
const normalizedInitialData = React105__default.useMemo(() => {
|
|
45119
45140
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
45120
45141
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
45121
45142
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
45122
45143
|
}, [entity, initialData]);
|
|
45123
|
-
const entityDerivedFields =
|
|
45144
|
+
const entityDerivedFields = React105__default.useMemo(() => {
|
|
45124
45145
|
if (fields && fields.length > 0) return void 0;
|
|
45125
45146
|
if (!resolvedEntity) return void 0;
|
|
45126
45147
|
return resolvedEntity.fields.map(
|
|
@@ -45141,16 +45162,16 @@ var init_Form = __esm({
|
|
|
45141
45162
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
45142
45163
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
45143
45164
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
45144
|
-
const [formData, setFormData] =
|
|
45165
|
+
const [formData, setFormData] = React105__default.useState(
|
|
45145
45166
|
normalizedInitialData
|
|
45146
45167
|
);
|
|
45147
|
-
const [collapsedSections, setCollapsedSections] =
|
|
45168
|
+
const [collapsedSections, setCollapsedSections] = React105__default.useState(
|
|
45148
45169
|
/* @__PURE__ */ new Set()
|
|
45149
45170
|
);
|
|
45150
|
-
const [submitError, setSubmitError] =
|
|
45151
|
-
const formRef =
|
|
45171
|
+
const [submitError, setSubmitError] = React105__default.useState(null);
|
|
45172
|
+
const formRef = React105__default.useRef(null);
|
|
45152
45173
|
const formMode = props.mode;
|
|
45153
|
-
const mountedRef =
|
|
45174
|
+
const mountedRef = React105__default.useRef(false);
|
|
45154
45175
|
if (!mountedRef.current) {
|
|
45155
45176
|
mountedRef.current = true;
|
|
45156
45177
|
debug("forms", "mount", {
|
|
@@ -45163,7 +45184,7 @@ var init_Form = __esm({
|
|
|
45163
45184
|
});
|
|
45164
45185
|
}
|
|
45165
45186
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
45166
|
-
const evalContext =
|
|
45187
|
+
const evalContext = React105__default.useMemo(
|
|
45167
45188
|
() => ({
|
|
45168
45189
|
formValues: formData,
|
|
45169
45190
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -45172,7 +45193,7 @@ var init_Form = __esm({
|
|
|
45172
45193
|
}),
|
|
45173
45194
|
[formData, externalContext]
|
|
45174
45195
|
);
|
|
45175
|
-
|
|
45196
|
+
React105__default.useEffect(() => {
|
|
45176
45197
|
debug("forms", "initialData-sync", {
|
|
45177
45198
|
mode: formMode,
|
|
45178
45199
|
normalizedInitialData,
|
|
@@ -45183,7 +45204,7 @@ var init_Form = __esm({
|
|
|
45183
45204
|
setFormData(normalizedInitialData);
|
|
45184
45205
|
}
|
|
45185
45206
|
}, [normalizedInitialData]);
|
|
45186
|
-
const processCalculations =
|
|
45207
|
+
const processCalculations = React105__default.useCallback(
|
|
45187
45208
|
(changedFieldId, newFormData) => {
|
|
45188
45209
|
if (!hiddenCalculations.length) return;
|
|
45189
45210
|
const context = {
|
|
@@ -45208,7 +45229,7 @@ var init_Form = __esm({
|
|
|
45208
45229
|
},
|
|
45209
45230
|
[hiddenCalculations, externalContext, eventBus]
|
|
45210
45231
|
);
|
|
45211
|
-
const checkViolations =
|
|
45232
|
+
const checkViolations = React105__default.useCallback(
|
|
45212
45233
|
(changedFieldId, newFormData) => {
|
|
45213
45234
|
if (!violationTriggers.length) return;
|
|
45214
45235
|
const context = {
|
|
@@ -45246,7 +45267,7 @@ var init_Form = __esm({
|
|
|
45246
45267
|
processCalculations(name, newFormData);
|
|
45247
45268
|
checkViolations(name, newFormData);
|
|
45248
45269
|
};
|
|
45249
|
-
const isFieldVisible =
|
|
45270
|
+
const isFieldVisible = React105__default.useCallback(
|
|
45250
45271
|
(fieldName) => {
|
|
45251
45272
|
const condition = conditionalFields[fieldName];
|
|
45252
45273
|
if (!condition) return true;
|
|
@@ -45254,7 +45275,7 @@ var init_Form = __esm({
|
|
|
45254
45275
|
},
|
|
45255
45276
|
[conditionalFields, evalContext]
|
|
45256
45277
|
);
|
|
45257
|
-
const isSectionVisible =
|
|
45278
|
+
const isSectionVisible = React105__default.useCallback(
|
|
45258
45279
|
(section) => {
|
|
45259
45280
|
if (!section.condition) return true;
|
|
45260
45281
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -45330,7 +45351,7 @@ var init_Form = __esm({
|
|
|
45330
45351
|
eventBus.emit(`UI:${onCancel}`);
|
|
45331
45352
|
}
|
|
45332
45353
|
};
|
|
45333
|
-
const renderField =
|
|
45354
|
+
const renderField = React105__default.useCallback(
|
|
45334
45355
|
(field) => {
|
|
45335
45356
|
const fieldName = field.name || field.field;
|
|
45336
45357
|
if (!fieldName) return null;
|
|
@@ -45351,7 +45372,7 @@ var init_Form = __esm({
|
|
|
45351
45372
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
45352
45373
|
);
|
|
45353
45374
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
45354
|
-
const normalizedFields =
|
|
45375
|
+
const normalizedFields = React105__default.useMemo(() => {
|
|
45355
45376
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
45356
45377
|
return effectiveFields.map((field) => {
|
|
45357
45378
|
if (typeof field === "string") {
|
|
@@ -45375,7 +45396,7 @@ var init_Form = __esm({
|
|
|
45375
45396
|
return field;
|
|
45376
45397
|
});
|
|
45377
45398
|
}, [effectiveFields, resolvedEntity]);
|
|
45378
|
-
const schemaFields =
|
|
45399
|
+
const schemaFields = React105__default.useMemo(() => {
|
|
45379
45400
|
if (normalizedFields.length === 0) return null;
|
|
45380
45401
|
if (isDebugEnabled()) {
|
|
45381
45402
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -45385,7 +45406,7 @@ var init_Form = __esm({
|
|
|
45385
45406
|
}
|
|
45386
45407
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
45387
45408
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
45388
|
-
const sectionElements =
|
|
45409
|
+
const sectionElements = React105__default.useMemo(() => {
|
|
45389
45410
|
if (!sections || sections.length === 0) return null;
|
|
45390
45411
|
return sections.map((section) => {
|
|
45391
45412
|
if (!isSectionVisible(section)) {
|
|
@@ -46110,7 +46131,7 @@ var init_List = __esm({
|
|
|
46110
46131
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
46111
46132
|
return [];
|
|
46112
46133
|
}, [entity]);
|
|
46113
|
-
const getItemActions =
|
|
46134
|
+
const getItemActions = React105__default.useCallback(
|
|
46114
46135
|
(item) => {
|
|
46115
46136
|
if (!itemActions) return [];
|
|
46116
46137
|
if (typeof itemActions === "function") {
|
|
@@ -46585,7 +46606,7 @@ var init_MediaGallery = __esm({
|
|
|
46585
46606
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
46586
46607
|
);
|
|
46587
46608
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46588
|
-
const items =
|
|
46609
|
+
const items = React105__default.useMemo(() => {
|
|
46589
46610
|
if (propItems) return propItems;
|
|
46590
46611
|
if (entityData.length === 0) return [];
|
|
46591
46612
|
return entityData.map((record, idx) => {
|
|
@@ -46748,7 +46769,7 @@ var init_MediaGallery = __esm({
|
|
|
46748
46769
|
}
|
|
46749
46770
|
});
|
|
46750
46771
|
function extractTitle2(children) {
|
|
46751
|
-
if (!
|
|
46772
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
46752
46773
|
const props = children.props;
|
|
46753
46774
|
if (typeof props.title === "string") {
|
|
46754
46775
|
return props.title;
|
|
@@ -47018,7 +47039,7 @@ var init_debugRegistry = __esm({
|
|
|
47018
47039
|
}
|
|
47019
47040
|
});
|
|
47020
47041
|
function useDebugData() {
|
|
47021
|
-
const [data, setData] =
|
|
47042
|
+
const [data, setData] = React105.useState(() => ({
|
|
47022
47043
|
traits: [],
|
|
47023
47044
|
ticks: [],
|
|
47024
47045
|
guards: [],
|
|
@@ -47032,7 +47053,7 @@ function useDebugData() {
|
|
|
47032
47053
|
},
|
|
47033
47054
|
lastUpdate: Date.now()
|
|
47034
47055
|
}));
|
|
47035
|
-
|
|
47056
|
+
React105.useEffect(() => {
|
|
47036
47057
|
const updateData = () => {
|
|
47037
47058
|
setData({
|
|
47038
47059
|
traits: getAllTraits(),
|
|
@@ -47141,12 +47162,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
47141
47162
|
return positions;
|
|
47142
47163
|
}
|
|
47143
47164
|
function WalkMinimap() {
|
|
47144
|
-
const [walkStep, setWalkStep] =
|
|
47145
|
-
const [traits2, setTraits] =
|
|
47146
|
-
const [coveredEdges, setCoveredEdges] =
|
|
47147
|
-
const [completedTraits, setCompletedTraits] =
|
|
47148
|
-
const prevTraitRef =
|
|
47149
|
-
|
|
47165
|
+
const [walkStep, setWalkStep] = React105.useState(null);
|
|
47166
|
+
const [traits2, setTraits] = React105.useState([]);
|
|
47167
|
+
const [coveredEdges, setCoveredEdges] = React105.useState([]);
|
|
47168
|
+
const [completedTraits, setCompletedTraits] = React105.useState(/* @__PURE__ */ new Set());
|
|
47169
|
+
const prevTraitRef = React105.useRef(null);
|
|
47170
|
+
React105.useEffect(() => {
|
|
47150
47171
|
const interval = setInterval(() => {
|
|
47151
47172
|
const w = window;
|
|
47152
47173
|
const step = w.__orbitalWalkStep;
|
|
@@ -47582,15 +47603,15 @@ var init_EntitiesTab = __esm({
|
|
|
47582
47603
|
});
|
|
47583
47604
|
function EventFlowTab({ events: events2 }) {
|
|
47584
47605
|
const { t } = useTranslate();
|
|
47585
|
-
const [filter, setFilter] =
|
|
47586
|
-
const containerRef =
|
|
47587
|
-
const [autoScroll, setAutoScroll] =
|
|
47588
|
-
|
|
47606
|
+
const [filter, setFilter] = React105.useState("all");
|
|
47607
|
+
const containerRef = React105.useRef(null);
|
|
47608
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
47609
|
+
React105.useEffect(() => {
|
|
47589
47610
|
if (autoScroll && containerRef.current) {
|
|
47590
47611
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47591
47612
|
}
|
|
47592
47613
|
}, [events2.length, autoScroll]);
|
|
47593
|
-
const filteredEvents =
|
|
47614
|
+
const filteredEvents = React105.useMemo(() => {
|
|
47594
47615
|
if (filter === "all") return events2;
|
|
47595
47616
|
return events2.filter((e) => e.type === filter);
|
|
47596
47617
|
}, [events2, filter]);
|
|
@@ -47706,7 +47727,7 @@ var init_EventFlowTab = __esm({
|
|
|
47706
47727
|
});
|
|
47707
47728
|
function GuardsPanel({ guards }) {
|
|
47708
47729
|
const { t } = useTranslate();
|
|
47709
|
-
const [filter, setFilter] =
|
|
47730
|
+
const [filter, setFilter] = React105.useState("all");
|
|
47710
47731
|
if (guards.length === 0) {
|
|
47711
47732
|
return /* @__PURE__ */ jsx(
|
|
47712
47733
|
EmptyState,
|
|
@@ -47719,7 +47740,7 @@ function GuardsPanel({ guards }) {
|
|
|
47719
47740
|
}
|
|
47720
47741
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47721
47742
|
const failedCount = guards.length - passedCount;
|
|
47722
|
-
const filteredGuards =
|
|
47743
|
+
const filteredGuards = React105.useMemo(() => {
|
|
47723
47744
|
if (filter === "all") return guards;
|
|
47724
47745
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47725
47746
|
return guards.filter((g) => !g.result);
|
|
@@ -47882,10 +47903,10 @@ function EffectBadge({ effect }) {
|
|
|
47882
47903
|
}
|
|
47883
47904
|
function TransitionTimeline({ transitions }) {
|
|
47884
47905
|
const { t } = useTranslate();
|
|
47885
|
-
const containerRef =
|
|
47886
|
-
const [autoScroll, setAutoScroll] =
|
|
47887
|
-
const [expandedId, setExpandedId] =
|
|
47888
|
-
|
|
47906
|
+
const containerRef = React105.useRef(null);
|
|
47907
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
47908
|
+
const [expandedId, setExpandedId] = React105.useState(null);
|
|
47909
|
+
React105.useEffect(() => {
|
|
47889
47910
|
if (autoScroll && containerRef.current) {
|
|
47890
47911
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47891
47912
|
}
|
|
@@ -48165,9 +48186,9 @@ function getAllEvents(traits2) {
|
|
|
48165
48186
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
48166
48187
|
const eventBus = useEventBus();
|
|
48167
48188
|
const { t } = useTranslate();
|
|
48168
|
-
const [log9, setLog] =
|
|
48169
|
-
const prevStatesRef =
|
|
48170
|
-
|
|
48189
|
+
const [log9, setLog] = React105.useState([]);
|
|
48190
|
+
const prevStatesRef = React105.useRef(/* @__PURE__ */ new Map());
|
|
48191
|
+
React105.useEffect(() => {
|
|
48171
48192
|
for (const trait of traits2) {
|
|
48172
48193
|
const prev = prevStatesRef.current.get(trait.id);
|
|
48173
48194
|
if (prev && prev !== trait.currentState) {
|
|
@@ -48336,10 +48357,10 @@ function VerifyModePanel({
|
|
|
48336
48357
|
localCount
|
|
48337
48358
|
}) {
|
|
48338
48359
|
const { t } = useTranslate();
|
|
48339
|
-
const [expanded, setExpanded] =
|
|
48340
|
-
const scrollRef =
|
|
48341
|
-
const prevCountRef =
|
|
48342
|
-
|
|
48360
|
+
const [expanded, setExpanded] = React105.useState(true);
|
|
48361
|
+
const scrollRef = React105.useRef(null);
|
|
48362
|
+
const prevCountRef = React105.useRef(0);
|
|
48363
|
+
React105.useEffect(() => {
|
|
48343
48364
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
48344
48365
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
48345
48366
|
}
|
|
@@ -48396,10 +48417,10 @@ function RuntimeDebugger({
|
|
|
48396
48417
|
schema
|
|
48397
48418
|
}) {
|
|
48398
48419
|
const { t } = useTranslate();
|
|
48399
|
-
const [isCollapsed, setIsCollapsed] =
|
|
48400
|
-
const [isVisible, setIsVisible] =
|
|
48420
|
+
const [isCollapsed, setIsCollapsed] = React105.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48421
|
+
const [isVisible, setIsVisible] = React105.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
48401
48422
|
const debugData = useDebugData();
|
|
48402
|
-
|
|
48423
|
+
React105.useEffect(() => {
|
|
48403
48424
|
if (mode === "inline") return;
|
|
48404
48425
|
return onDebugToggle((enabled) => {
|
|
48405
48426
|
setIsVisible(enabled);
|
|
@@ -48408,7 +48429,7 @@ function RuntimeDebugger({
|
|
|
48408
48429
|
}
|
|
48409
48430
|
});
|
|
48410
48431
|
}, [mode]);
|
|
48411
|
-
|
|
48432
|
+
React105.useEffect(() => {
|
|
48412
48433
|
if (mode === "inline") return;
|
|
48413
48434
|
const handleKeyDown = (e) => {
|
|
48414
48435
|
if (e.key === "`" && isVisible) {
|
|
@@ -48928,7 +48949,7 @@ var init_StatCard = __esm({
|
|
|
48928
48949
|
const labelToUse = propLabel ?? propTitle;
|
|
48929
48950
|
const eventBus = useEventBus();
|
|
48930
48951
|
const { t } = useTranslate();
|
|
48931
|
-
const handleActionClick =
|
|
48952
|
+
const handleActionClick = React105__default.useCallback(() => {
|
|
48932
48953
|
if (action?.event) {
|
|
48933
48954
|
eventBus.emit(`UI:${action.event}`, {});
|
|
48934
48955
|
}
|
|
@@ -48939,7 +48960,7 @@ var init_StatCard = __esm({
|
|
|
48939
48960
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
48940
48961
|
const isLoading = externalLoading ?? false;
|
|
48941
48962
|
const error = externalError;
|
|
48942
|
-
const computeMetricValue =
|
|
48963
|
+
const computeMetricValue = React105__default.useCallback(
|
|
48943
48964
|
(metric, items) => {
|
|
48944
48965
|
if (metric.value !== void 0) {
|
|
48945
48966
|
return metric.value;
|
|
@@ -48978,7 +48999,7 @@ var init_StatCard = __esm({
|
|
|
48978
48999
|
},
|
|
48979
49000
|
[]
|
|
48980
49001
|
);
|
|
48981
|
-
const schemaStats =
|
|
49002
|
+
const schemaStats = React105__default.useMemo(() => {
|
|
48982
49003
|
if (!metrics || metrics.length === 0) return null;
|
|
48983
49004
|
return metrics.map((metric) => ({
|
|
48984
49005
|
label: metric.label,
|
|
@@ -48986,7 +49007,7 @@ var init_StatCard = __esm({
|
|
|
48986
49007
|
format: metric.format
|
|
48987
49008
|
}));
|
|
48988
49009
|
}, [metrics, data, computeMetricValue]);
|
|
48989
|
-
const calculatedTrend =
|
|
49010
|
+
const calculatedTrend = React105__default.useMemo(() => {
|
|
48990
49011
|
if (manualTrend !== void 0) return manualTrend;
|
|
48991
49012
|
if (previousValue === void 0 || currentValue === void 0)
|
|
48992
49013
|
return void 0;
|
|
@@ -49626,8 +49647,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
49626
49647
|
] });
|
|
49627
49648
|
};
|
|
49628
49649
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
49629
|
-
const endRef =
|
|
49630
|
-
|
|
49650
|
+
const endRef = React105__default.useRef(null);
|
|
49651
|
+
React105__default.useEffect(() => {
|
|
49631
49652
|
if (!autoScroll) return;
|
|
49632
49653
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
49633
49654
|
}, [activities.length, autoScroll]);
|
|
@@ -49721,7 +49742,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
49721
49742
|
};
|
|
49722
49743
|
SubagentRichCard = ({ subagent }) => {
|
|
49723
49744
|
const { t } = useTranslate();
|
|
49724
|
-
const activities =
|
|
49745
|
+
const activities = React105__default.useMemo(
|
|
49725
49746
|
() => subagentMessagesToActivities(subagent.messages),
|
|
49726
49747
|
[subagent.messages]
|
|
49727
49748
|
);
|
|
@@ -49798,8 +49819,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
49798
49819
|
] });
|
|
49799
49820
|
};
|
|
49800
49821
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
49801
|
-
const endRef =
|
|
49802
|
-
|
|
49822
|
+
const endRef = React105__default.useRef(null);
|
|
49823
|
+
React105__default.useEffect(() => {
|
|
49803
49824
|
if (!autoScroll) return;
|
|
49804
49825
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
49805
49826
|
}, [messages.length, autoScroll]);
|
|
@@ -50229,7 +50250,7 @@ var init_Timeline = __esm({
|
|
|
50229
50250
|
}) => {
|
|
50230
50251
|
const { t } = useTranslate();
|
|
50231
50252
|
const entityData = entity ?? [];
|
|
50232
|
-
const items =
|
|
50253
|
+
const items = React105__default.useMemo(() => {
|
|
50233
50254
|
if (propItems) return propItems;
|
|
50234
50255
|
if (entityData.length === 0) return [];
|
|
50235
50256
|
return entityData.map((record, idx) => {
|
|
@@ -50331,7 +50352,7 @@ var init_Timeline = __esm({
|
|
|
50331
50352
|
}
|
|
50332
50353
|
});
|
|
50333
50354
|
function extractToastProps(children) {
|
|
50334
|
-
if (!
|
|
50355
|
+
if (!React105__default.isValidElement(children)) {
|
|
50335
50356
|
if (typeof children === "string") {
|
|
50336
50357
|
return { message: children };
|
|
50337
50358
|
}
|
|
@@ -50369,7 +50390,7 @@ var init_ToastSlot = __esm({
|
|
|
50369
50390
|
eventBus.emit("UI:CLOSE");
|
|
50370
50391
|
};
|
|
50371
50392
|
if (!isVisible) return null;
|
|
50372
|
-
const isCustomContent =
|
|
50393
|
+
const isCustomContent = React105__default.isValidElement(children) && !message;
|
|
50373
50394
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50374
50395
|
Toast,
|
|
50375
50396
|
{
|
|
@@ -51011,7 +51032,7 @@ function SuspenseConfigProvider({
|
|
|
51011
51032
|
config,
|
|
51012
51033
|
children
|
|
51013
51034
|
}) {
|
|
51014
|
-
return
|
|
51035
|
+
return React105__default.createElement(
|
|
51015
51036
|
SuspenseConfigContext.Provider,
|
|
51016
51037
|
{ value: config },
|
|
51017
51038
|
children
|
|
@@ -51053,7 +51074,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
51053
51074
|
}
|
|
51054
51075
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
51055
51076
|
}
|
|
51056
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
51077
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React105__default.isValidElement(field) && !(field instanceof Date)) {
|
|
51057
51078
|
const obj = field;
|
|
51058
51079
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
51059
51080
|
if (!fieldName) return field;
|
|
@@ -51499,7 +51520,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
51499
51520
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
51500
51521
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
51501
51522
|
}
|
|
51502
|
-
return /* @__PURE__ */ jsx(
|
|
51523
|
+
return /* @__PURE__ */ jsx(React105__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
51503
51524
|
}
|
|
51504
51525
|
if (!child || typeof child !== "object") return null;
|
|
51505
51526
|
const childId = `${parentId}-${index}`;
|
|
@@ -51539,14 +51560,14 @@ function isPatternConfig(value) {
|
|
|
51539
51560
|
if (value === null || value === void 0) return false;
|
|
51540
51561
|
if (typeof value !== "object") return false;
|
|
51541
51562
|
if (Array.isArray(value)) return false;
|
|
51542
|
-
if (
|
|
51563
|
+
if (React105__default.isValidElement(value)) return false;
|
|
51543
51564
|
if (value instanceof Date) return false;
|
|
51544
51565
|
if (typeof value === "function") return false;
|
|
51545
51566
|
const record = value;
|
|
51546
51567
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
51547
51568
|
}
|
|
51548
51569
|
function isPlainConfigObject(value) {
|
|
51549
|
-
if (
|
|
51570
|
+
if (React105__default.isValidElement(value)) return false;
|
|
51550
51571
|
if (value instanceof Date) return false;
|
|
51551
51572
|
const proto = Object.getPrototypeOf(value);
|
|
51552
51573
|
return proto === Object.prototype || proto === null;
|
|
@@ -51672,7 +51693,7 @@ function SlotContentRenderer({
|
|
|
51672
51693
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
51673
51694
|
const slotVal = restProps[slotKey];
|
|
51674
51695
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
51675
|
-
if (
|
|
51696
|
+
if (React105__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
51676
51697
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
51677
51698
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
51678
51699
|
slotVal,
|
|
@@ -51721,7 +51742,7 @@ function SlotContentRenderer({
|
|
|
51721
51742
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
51722
51743
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
51723
51744
|
const sample = resolvedItems[0];
|
|
51724
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
51745
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React105__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
51725
51746
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
51726
51747
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
51727
51748
|
}
|
|
@@ -52012,7 +52033,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
52012
52033
|
if (Array.isArray(body)) {
|
|
52013
52034
|
return body.map((b) => recur(b));
|
|
52014
52035
|
}
|
|
52015
|
-
if (body !== null && typeof body === "object" && !
|
|
52036
|
+
if (body !== null && typeof body === "object" && !React105__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
52016
52037
|
const out = {};
|
|
52017
52038
|
for (const [k, v] of Object.entries(body)) {
|
|
52018
52039
|
out[k] = recur(v);
|
|
@@ -52031,7 +52052,7 @@ function getSlotContentRenderer4() {
|
|
|
52031
52052
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
52032
52053
|
return (item, index) => {
|
|
52033
52054
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
52034
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
52055
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React105__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
52035
52056
|
return null;
|
|
52036
52057
|
}
|
|
52037
52058
|
const record = resolvedBody;
|
|
@@ -52050,7 +52071,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
52050
52071
|
props: childProps,
|
|
52051
52072
|
priority: 0
|
|
52052
52073
|
};
|
|
52053
|
-
return
|
|
52074
|
+
return React105__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
52054
52075
|
};
|
|
52055
52076
|
}
|
|
52056
52077
|
function convertNode(node, callerKey) {
|
|
@@ -52069,7 +52090,7 @@ function convertNode(node, callerKey) {
|
|
|
52069
52090
|
});
|
|
52070
52091
|
return anyChanged ? mapped : node;
|
|
52071
52092
|
}
|
|
52072
|
-
if (typeof node === "object" && !
|
|
52093
|
+
if (typeof node === "object" && !React105__default.isValidElement(node) && !(node instanceof Date)) {
|
|
52073
52094
|
return convertObjectProps(node);
|
|
52074
52095
|
}
|
|
52075
52096
|
return node;
|