@almadar/ui 6.4.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1551 -1338
- package/dist/avl/index.js +504 -291
- package/dist/components/index.cjs +1502 -1466
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +484 -448
- package/dist/providers/index.cjs +1434 -1221
- package/dist/providers/index.js +475 -262
- package/dist/runtime/index.cjs +1399 -1186
- package/dist/runtime/index.js +480 -267
- package/package.json +3 -3
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React89 from 'react';
|
|
2
|
+
import React89__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, RenderSlotProvider, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, TraitScopeProvider, useNavStack, useCurrentPagePath, useRenderSlot, useGameAudioContextOptional, matchPathAmong } from '@almadar/ui/providers';
|
|
4
4
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
5
5
|
import { createContextFromBindings, interpolateValue } from '@almadar/runtime';
|
|
@@ -281,7 +281,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
281
281
|
function isPlainObject(value) {
|
|
282
282
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
283
283
|
if (Array.isArray(value)) return false;
|
|
284
|
-
if (
|
|
284
|
+
if (React89__default.isValidElement(value)) return false;
|
|
285
285
|
if (value instanceof Date) return false;
|
|
286
286
|
if (typeof value === "function") return false;
|
|
287
287
|
return true;
|
|
@@ -290,7 +290,7 @@ function isEvaluatorResolvedData(value) {
|
|
|
290
290
|
return evaluatorResolvedData.has(value);
|
|
291
291
|
}
|
|
292
292
|
function brandResolved(value) {
|
|
293
|
-
if (value !== null && typeof value === "object" && !
|
|
293
|
+
if (value !== null && typeof value === "object" && !React89__default.isValidElement(value) && !(value instanceof Date)) {
|
|
294
294
|
resolvedMarkerFree.add(value);
|
|
295
295
|
}
|
|
296
296
|
}
|
|
@@ -323,7 +323,7 @@ function walkValue(value, scopeTrait, entity, config, state) {
|
|
|
323
323
|
}
|
|
324
324
|
const resolved = resolveMarkerExpression(value.expression, entity, config, state);
|
|
325
325
|
markerResolutionCache.set(value, { entity, config, state, resolved });
|
|
326
|
-
if (resolved !== null && typeof resolved === "object" && !
|
|
326
|
+
if (resolved !== null && typeof resolved === "object" && !React89__default.isValidElement(resolved) && !(resolved instanceof Date)) {
|
|
327
327
|
resolvedMarkerFree.add(resolved);
|
|
328
328
|
evaluatorResolvedData.add(resolved);
|
|
329
329
|
}
|
|
@@ -557,7 +557,7 @@ var init_Box = __esm({
|
|
|
557
557
|
fixed: "fixed",
|
|
558
558
|
sticky: "sticky"
|
|
559
559
|
};
|
|
560
|
-
Box =
|
|
560
|
+
Box = React89__default.forwardRef(
|
|
561
561
|
({
|
|
562
562
|
padding,
|
|
563
563
|
paddingX,
|
|
@@ -622,7 +622,7 @@ var init_Box = __esm({
|
|
|
622
622
|
onPointerDown?.(e);
|
|
623
623
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
624
624
|
const isClickable = action || onClick;
|
|
625
|
-
return
|
|
625
|
+
return React89__default.createElement(
|
|
626
626
|
Component,
|
|
627
627
|
{
|
|
628
628
|
ref,
|
|
@@ -839,7 +839,7 @@ var init_Icon = __esm({
|
|
|
839
839
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
840
840
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
841
841
|
const family = useIconFamily();
|
|
842
|
-
const RenderedComponent =
|
|
842
|
+
const RenderedComponent = React89__default.useMemo(() => {
|
|
843
843
|
if (directIcon) return null;
|
|
844
844
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
845
845
|
}, [directIcon, effectiveName, family]);
|
|
@@ -968,7 +968,7 @@ var init_atlasSlice = __esm({
|
|
|
968
968
|
}
|
|
969
969
|
});
|
|
970
970
|
function useAtlasSliceDataUrl(asset) {
|
|
971
|
-
const [, bump] =
|
|
971
|
+
const [, bump] = React89.useReducer((x) => x + 1, 0);
|
|
972
972
|
if (!isAtlasAsset(asset)) return void 0;
|
|
973
973
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
974
974
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1031,13 +1031,13 @@ function AtlasImage({
|
|
|
1031
1031
|
style,
|
|
1032
1032
|
"aria-hidden": ariaHidden
|
|
1033
1033
|
}) {
|
|
1034
|
-
const [, bump] =
|
|
1035
|
-
const canvasRef =
|
|
1034
|
+
const [, bump] = React89.useReducer((x) => x + 1, 0);
|
|
1035
|
+
const canvasRef = React89.useRef(null);
|
|
1036
1036
|
const sliced = isAtlasAsset(asset);
|
|
1037
1037
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1038
1038
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1039
1039
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1040
|
-
|
|
1040
|
+
React89.useEffect(() => {
|
|
1041
1041
|
const canvas = canvasRef.current;
|
|
1042
1042
|
if (!canvas || !img || !rect) return;
|
|
1043
1043
|
canvas.width = rect.sw;
|
|
@@ -1113,7 +1113,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1113
1113
|
const IconComp = value;
|
|
1114
1114
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1115
1115
|
}
|
|
1116
|
-
if (
|
|
1116
|
+
if (React89__default.isValidElement(value)) {
|
|
1117
1117
|
return value;
|
|
1118
1118
|
}
|
|
1119
1119
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1190,7 +1190,7 @@ var init_Button = __esm({
|
|
|
1190
1190
|
md: "h-icon-default w-icon-default",
|
|
1191
1191
|
lg: "h-icon-default w-icon-default"
|
|
1192
1192
|
};
|
|
1193
|
-
Button =
|
|
1193
|
+
Button = React89__default.forwardRef(
|
|
1194
1194
|
({
|
|
1195
1195
|
className,
|
|
1196
1196
|
variant = "primary",
|
|
@@ -1260,7 +1260,7 @@ var Dialog;
|
|
|
1260
1260
|
var init_Dialog = __esm({
|
|
1261
1261
|
"components/core/atoms/Dialog.tsx"() {
|
|
1262
1262
|
init_cn();
|
|
1263
|
-
Dialog =
|
|
1263
|
+
Dialog = React89__default.forwardRef(
|
|
1264
1264
|
({
|
|
1265
1265
|
role = "dialog",
|
|
1266
1266
|
"aria-modal": ariaModal = true,
|
|
@@ -1471,7 +1471,7 @@ var init_Typography = __esm({
|
|
|
1471
1471
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
1472
1472
|
body = formatValue(body, format);
|
|
1473
1473
|
}
|
|
1474
|
-
return
|
|
1474
|
+
return React89__default.createElement(
|
|
1475
1475
|
Component,
|
|
1476
1476
|
{
|
|
1477
1477
|
id,
|
|
@@ -2033,7 +2033,7 @@ var init_Badge = __esm({
|
|
|
2033
2033
|
md: "px-2.5 py-1 text-sm",
|
|
2034
2034
|
lg: "px-3 py-1.5 text-base"
|
|
2035
2035
|
};
|
|
2036
|
-
Badge =
|
|
2036
|
+
Badge = React89__default.forwardRef(
|
|
2037
2037
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2038
2038
|
const iconSizes3 = {
|
|
2039
2039
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2383,7 +2383,7 @@ var init_SvgFlow = __esm({
|
|
|
2383
2383
|
width = 100,
|
|
2384
2384
|
height = 100
|
|
2385
2385
|
}) => {
|
|
2386
|
-
const markerId =
|
|
2386
|
+
const markerId = React89__default.useMemo(() => {
|
|
2387
2387
|
flowIdCounter += 1;
|
|
2388
2388
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2389
2389
|
}, []);
|
|
@@ -2976,7 +2976,7 @@ var init_SvgRing = __esm({
|
|
|
2976
2976
|
width = 100,
|
|
2977
2977
|
height = 100
|
|
2978
2978
|
}) => {
|
|
2979
|
-
const gradientId =
|
|
2979
|
+
const gradientId = React89__default.useMemo(() => {
|
|
2980
2980
|
ringIdCounter += 1;
|
|
2981
2981
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2982
2982
|
}, []);
|
|
@@ -3157,7 +3157,7 @@ var init_Input = __esm({
|
|
|
3157
3157
|
init_cn();
|
|
3158
3158
|
init_Icon();
|
|
3159
3159
|
init_useEventBus();
|
|
3160
|
-
Input =
|
|
3160
|
+
Input = React89__default.forwardRef(
|
|
3161
3161
|
({
|
|
3162
3162
|
className,
|
|
3163
3163
|
inputType,
|
|
@@ -3181,9 +3181,9 @@ var init_Input = __esm({
|
|
|
3181
3181
|
const eventBus = useEventBus();
|
|
3182
3182
|
const type = inputType || htmlType || "text";
|
|
3183
3183
|
const isDeclarative = typeof onChange === "string";
|
|
3184
|
-
const [localValue, setLocalValue] =
|
|
3185
|
-
const pendingEchoRef =
|
|
3186
|
-
|
|
3184
|
+
const [localValue, setLocalValue] = React89__default.useState(value);
|
|
3185
|
+
const pendingEchoRef = React89__default.useRef(/* @__PURE__ */ new Set());
|
|
3186
|
+
React89__default.useEffect(() => {
|
|
3187
3187
|
if (!isDeclarative) return;
|
|
3188
3188
|
const incoming = value == null ? "" : String(value);
|
|
3189
3189
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -3350,7 +3350,7 @@ var Label;
|
|
|
3350
3350
|
var init_Label = __esm({
|
|
3351
3351
|
"components/core/atoms/Label.tsx"() {
|
|
3352
3352
|
init_cn();
|
|
3353
|
-
Label =
|
|
3353
|
+
Label = React89__default.forwardRef(
|
|
3354
3354
|
({ className, required, children, ...props }, ref) => {
|
|
3355
3355
|
return /* @__PURE__ */ jsxs(
|
|
3356
3356
|
"label",
|
|
@@ -3377,7 +3377,7 @@ var init_Textarea = __esm({
|
|
|
3377
3377
|
"components/core/atoms/Textarea.tsx"() {
|
|
3378
3378
|
init_cn();
|
|
3379
3379
|
init_useEventBus();
|
|
3380
|
-
Textarea =
|
|
3380
|
+
Textarea = React89__default.forwardRef(
|
|
3381
3381
|
({ className, error, onChange, ...props }, ref) => {
|
|
3382
3382
|
const eventBus = useEventBus();
|
|
3383
3383
|
const handleChange = (e) => {
|
|
@@ -3627,7 +3627,7 @@ var init_Select = __esm({
|
|
|
3627
3627
|
init_cn();
|
|
3628
3628
|
init_Icon();
|
|
3629
3629
|
init_useEventBus();
|
|
3630
|
-
Select =
|
|
3630
|
+
Select = React89__default.forwardRef(
|
|
3631
3631
|
(props, _ref) => {
|
|
3632
3632
|
const { multiple, searchable, clearable } = props;
|
|
3633
3633
|
if (multiple || searchable || clearable) {
|
|
@@ -3644,7 +3644,7 @@ var init_Checkbox = __esm({
|
|
|
3644
3644
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3645
3645
|
init_cn();
|
|
3646
3646
|
init_useEventBus();
|
|
3647
|
-
Checkbox =
|
|
3647
|
+
Checkbox = React89__default.forwardRef(
|
|
3648
3648
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3649
3649
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3650
3650
|
const eventBus = useEventBus();
|
|
@@ -3698,7 +3698,7 @@ var init_Spinner = __esm({
|
|
|
3698
3698
|
md: "h-6 w-6",
|
|
3699
3699
|
lg: "h-8 w-8"
|
|
3700
3700
|
};
|
|
3701
|
-
Spinner =
|
|
3701
|
+
Spinner = React89__default.forwardRef(
|
|
3702
3702
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3703
3703
|
if (overlay) {
|
|
3704
3704
|
return /* @__PURE__ */ jsx(
|
|
@@ -3788,7 +3788,7 @@ var init_Card = __esm({
|
|
|
3788
3788
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3789
3789
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3790
3790
|
};
|
|
3791
|
-
Card =
|
|
3791
|
+
Card = React89__default.forwardRef(
|
|
3792
3792
|
({
|
|
3793
3793
|
className,
|
|
3794
3794
|
variant = "bordered",
|
|
@@ -3837,9 +3837,9 @@ var init_Card = __esm({
|
|
|
3837
3837
|
}
|
|
3838
3838
|
);
|
|
3839
3839
|
Card.displayName = "Card";
|
|
3840
|
-
CardHeader =
|
|
3840
|
+
CardHeader = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3841
3841
|
CardHeader.displayName = "CardHeader";
|
|
3842
|
-
CardTitle =
|
|
3842
|
+
CardTitle = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3843
3843
|
"h3",
|
|
3844
3844
|
{
|
|
3845
3845
|
ref,
|
|
@@ -3852,11 +3852,11 @@ var init_Card = __esm({
|
|
|
3852
3852
|
}
|
|
3853
3853
|
));
|
|
3854
3854
|
CardTitle.displayName = "CardTitle";
|
|
3855
|
-
CardContent =
|
|
3855
|
+
CardContent = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3856
3856
|
CardContent.displayName = "CardContent";
|
|
3857
3857
|
CardBody = CardContent;
|
|
3858
3858
|
CardBody.displayName = "CardBody";
|
|
3859
|
-
CardFooter =
|
|
3859
|
+
CardFooter = React89__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3860
3860
|
"div",
|
|
3861
3861
|
{
|
|
3862
3862
|
ref,
|
|
@@ -3943,7 +3943,7 @@ var init_FilterPill = __esm({
|
|
|
3943
3943
|
md: "w-3.5 h-3.5",
|
|
3944
3944
|
lg: "w-4 h-4"
|
|
3945
3945
|
};
|
|
3946
|
-
FilterPill =
|
|
3946
|
+
FilterPill = React89__default.forwardRef(
|
|
3947
3947
|
({
|
|
3948
3948
|
className,
|
|
3949
3949
|
variant = "default",
|
|
@@ -4072,8 +4072,8 @@ var init_Avatar = __esm({
|
|
|
4072
4072
|
actionPayload
|
|
4073
4073
|
}) => {
|
|
4074
4074
|
const eventBus = useEventBus();
|
|
4075
|
-
const [imgFailed, setImgFailed] =
|
|
4076
|
-
|
|
4075
|
+
const [imgFailed, setImgFailed] = React89__default.useState(false);
|
|
4076
|
+
React89__default.useEffect(() => {
|
|
4077
4077
|
setImgFailed(false);
|
|
4078
4078
|
}, [src]);
|
|
4079
4079
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4186,7 +4186,7 @@ var init_Center = __esm({
|
|
|
4186
4186
|
as: Component = "div"
|
|
4187
4187
|
}) => {
|
|
4188
4188
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4189
|
-
return
|
|
4189
|
+
return React89__default.createElement(Component, {
|
|
4190
4190
|
className: cn(
|
|
4191
4191
|
inline ? "inline-flex" : "flex",
|
|
4192
4192
|
horizontal && "justify-center",
|
|
@@ -4454,7 +4454,7 @@ var init_Radio = __esm({
|
|
|
4454
4454
|
md: "w-2.5 h-2.5",
|
|
4455
4455
|
lg: "w-3 h-3"
|
|
4456
4456
|
};
|
|
4457
|
-
Radio =
|
|
4457
|
+
Radio = React89__default.forwardRef(
|
|
4458
4458
|
({
|
|
4459
4459
|
label,
|
|
4460
4460
|
helperText,
|
|
@@ -4471,12 +4471,12 @@ var init_Radio = __esm({
|
|
|
4471
4471
|
onChange,
|
|
4472
4472
|
...props
|
|
4473
4473
|
}, ref) => {
|
|
4474
|
-
const reactId =
|
|
4474
|
+
const reactId = React89__default.useId();
|
|
4475
4475
|
const baseId = id || `radio-${reactId}`;
|
|
4476
4476
|
const hasError = !!error;
|
|
4477
4477
|
const eventBus = useEventBus();
|
|
4478
|
-
const [selected, setSelected] =
|
|
4479
|
-
|
|
4478
|
+
const [selected, setSelected] = React89__default.useState(value);
|
|
4479
|
+
React89__default.useEffect(() => {
|
|
4480
4480
|
if (value !== void 0) setSelected(value);
|
|
4481
4481
|
}, [value]);
|
|
4482
4482
|
const pick = (next, e) => {
|
|
@@ -4658,7 +4658,7 @@ var init_Switch = __esm({
|
|
|
4658
4658
|
"components/core/atoms/Switch.tsx"() {
|
|
4659
4659
|
"use client";
|
|
4660
4660
|
init_cn();
|
|
4661
|
-
Switch =
|
|
4661
|
+
Switch = React89.forwardRef(
|
|
4662
4662
|
({
|
|
4663
4663
|
checked,
|
|
4664
4664
|
defaultChecked = false,
|
|
@@ -4669,10 +4669,10 @@ var init_Switch = __esm({
|
|
|
4669
4669
|
name,
|
|
4670
4670
|
className
|
|
4671
4671
|
}, ref) => {
|
|
4672
|
-
const [isChecked, setIsChecked] =
|
|
4672
|
+
const [isChecked, setIsChecked] = React89.useState(
|
|
4673
4673
|
checked !== void 0 ? checked : defaultChecked
|
|
4674
4674
|
);
|
|
4675
|
-
|
|
4675
|
+
React89.useEffect(() => {
|
|
4676
4676
|
if (checked !== void 0) {
|
|
4677
4677
|
setIsChecked(checked);
|
|
4678
4678
|
}
|
|
@@ -4835,7 +4835,7 @@ var init_Stack = __esm({
|
|
|
4835
4835
|
};
|
|
4836
4836
|
const isHorizontal = direction === "horizontal";
|
|
4837
4837
|
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";
|
|
4838
|
-
return
|
|
4838
|
+
return React89__default.createElement(
|
|
4839
4839
|
Component,
|
|
4840
4840
|
{
|
|
4841
4841
|
className: cn(
|
|
@@ -5035,7 +5035,7 @@ var Aside;
|
|
|
5035
5035
|
var init_Aside = __esm({
|
|
5036
5036
|
"components/core/atoms/Aside.tsx"() {
|
|
5037
5037
|
init_cn();
|
|
5038
|
-
Aside =
|
|
5038
|
+
Aside = React89__default.forwardRef(
|
|
5039
5039
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5040
5040
|
);
|
|
5041
5041
|
Aside.displayName = "Aside";
|
|
@@ -5114,9 +5114,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5114
5114
|
className
|
|
5115
5115
|
}) => {
|
|
5116
5116
|
const { t } = useTranslate();
|
|
5117
|
-
const [isVisible, setIsVisible] =
|
|
5118
|
-
const timeoutRef =
|
|
5119
|
-
const triggerRef =
|
|
5117
|
+
const [isVisible, setIsVisible] = React89__default.useState(false);
|
|
5118
|
+
const timeoutRef = React89__default.useRef(null);
|
|
5119
|
+
const triggerRef = React89__default.useRef(null);
|
|
5120
5120
|
const handleMouseEnter = () => {
|
|
5121
5121
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5122
5122
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5127,7 +5127,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5127
5127
|
};
|
|
5128
5128
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5129
5129
|
const open = isVisible || revealed;
|
|
5130
|
-
|
|
5130
|
+
React89__default.useEffect(() => {
|
|
5131
5131
|
return () => {
|
|
5132
5132
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5133
5133
|
};
|
|
@@ -5337,7 +5337,7 @@ var init_StatusDot = __esm({
|
|
|
5337
5337
|
md: "w-2.5 h-2.5",
|
|
5338
5338
|
lg: "w-3 h-3"
|
|
5339
5339
|
};
|
|
5340
|
-
StatusDot =
|
|
5340
|
+
StatusDot = React89__default.forwardRef(
|
|
5341
5341
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5342
5342
|
return /* @__PURE__ */ jsx(
|
|
5343
5343
|
"span",
|
|
@@ -5391,7 +5391,7 @@ var init_TrendIndicator = __esm({
|
|
|
5391
5391
|
down: "trending-down",
|
|
5392
5392
|
flat: "arrow-right"
|
|
5393
5393
|
};
|
|
5394
|
-
TrendIndicator =
|
|
5394
|
+
TrendIndicator = React89__default.forwardRef(
|
|
5395
5395
|
({
|
|
5396
5396
|
className,
|
|
5397
5397
|
value,
|
|
@@ -5460,7 +5460,7 @@ var init_RangeSlider = __esm({
|
|
|
5460
5460
|
md: "w-4 h-4",
|
|
5461
5461
|
lg: "w-5 h-5"
|
|
5462
5462
|
};
|
|
5463
|
-
RangeSlider =
|
|
5463
|
+
RangeSlider = React89__default.forwardRef(
|
|
5464
5464
|
({
|
|
5465
5465
|
className,
|
|
5466
5466
|
min = 0,
|
|
@@ -6117,7 +6117,7 @@ var init_ContentSection = __esm({
|
|
|
6117
6117
|
md: "py-16",
|
|
6118
6118
|
lg: "py-24"
|
|
6119
6119
|
};
|
|
6120
|
-
ContentSection =
|
|
6120
|
+
ContentSection = React89__default.forwardRef(
|
|
6121
6121
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6122
6122
|
return /* @__PURE__ */ jsx(
|
|
6123
6123
|
Box,
|
|
@@ -6651,7 +6651,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6651
6651
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6652
6652
|
"none": {}
|
|
6653
6653
|
};
|
|
6654
|
-
AnimatedReveal =
|
|
6654
|
+
AnimatedReveal = React89__default.forwardRef(
|
|
6655
6655
|
({
|
|
6656
6656
|
trigger = "scroll",
|
|
6657
6657
|
animation = "fade-up",
|
|
@@ -6811,7 +6811,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6811
6811
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6812
6812
|
"use client";
|
|
6813
6813
|
init_cn();
|
|
6814
|
-
AnimatedGraphic =
|
|
6814
|
+
AnimatedGraphic = React89__default.forwardRef(
|
|
6815
6815
|
({
|
|
6816
6816
|
src,
|
|
6817
6817
|
svgContent,
|
|
@@ -6834,7 +6834,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6834
6834
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6835
6835
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6836
6836
|
const prevAnimateRef = useRef(animate);
|
|
6837
|
-
const setRef =
|
|
6837
|
+
const setRef = React89__default.useCallback(
|
|
6838
6838
|
(node) => {
|
|
6839
6839
|
containerRef.current = node;
|
|
6840
6840
|
if (typeof ref === "function") ref(node);
|
|
@@ -7587,9 +7587,9 @@ function ControlButton({
|
|
|
7587
7587
|
className
|
|
7588
7588
|
}) {
|
|
7589
7589
|
const eventBus = useEventBus();
|
|
7590
|
-
const [isPressed, setIsPressed] =
|
|
7590
|
+
const [isPressed, setIsPressed] = React89.useState(false);
|
|
7591
7591
|
const actualPressed = pressed ?? isPressed;
|
|
7592
|
-
const handlePointerDown =
|
|
7592
|
+
const handlePointerDown = React89.useCallback(
|
|
7593
7593
|
(e) => {
|
|
7594
7594
|
e.preventDefault();
|
|
7595
7595
|
if (disabled) return;
|
|
@@ -7599,7 +7599,7 @@ function ControlButton({
|
|
|
7599
7599
|
},
|
|
7600
7600
|
[disabled, pressEvent, eventBus, onPress]
|
|
7601
7601
|
);
|
|
7602
|
-
const handlePointerUp =
|
|
7602
|
+
const handlePointerUp = React89.useCallback(
|
|
7603
7603
|
(e) => {
|
|
7604
7604
|
e.preventDefault();
|
|
7605
7605
|
if (disabled) return;
|
|
@@ -7609,7 +7609,7 @@ function ControlButton({
|
|
|
7609
7609
|
},
|
|
7610
7610
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7611
7611
|
);
|
|
7612
|
-
const handlePointerLeave =
|
|
7612
|
+
const handlePointerLeave = React89.useCallback(
|
|
7613
7613
|
(e) => {
|
|
7614
7614
|
if (isPressed) {
|
|
7615
7615
|
setIsPressed(false);
|
|
@@ -7868,18 +7868,18 @@ function ControlGrid({
|
|
|
7868
7868
|
className
|
|
7869
7869
|
}) {
|
|
7870
7870
|
const eventBus = useEventBus();
|
|
7871
|
-
const [active, setActive] =
|
|
7872
|
-
const [coarse, setCoarse] =
|
|
7871
|
+
const [active, setActive] = React89.useState(/* @__PURE__ */ new Set());
|
|
7872
|
+
const [coarse, setCoarse] = React89.useState(
|
|
7873
7873
|
() => typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches
|
|
7874
7874
|
);
|
|
7875
|
-
|
|
7875
|
+
React89.useEffect(() => {
|
|
7876
7876
|
if (visibility !== "auto" || typeof window === "undefined") return;
|
|
7877
7877
|
const mq = window.matchMedia("(pointer: coarse)");
|
|
7878
7878
|
const onChange = (e) => setCoarse(e.matches);
|
|
7879
7879
|
mq.addEventListener("change", onChange);
|
|
7880
7880
|
return () => mq.removeEventListener("change", onChange);
|
|
7881
7881
|
}, [visibility]);
|
|
7882
|
-
const handlePress =
|
|
7882
|
+
const handlePress = React89.useCallback(
|
|
7883
7883
|
(id) => {
|
|
7884
7884
|
setActive((prev) => new Set(prev).add(id));
|
|
7885
7885
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7893,7 +7893,7 @@ function ControlGrid({
|
|
|
7893
7893
|
},
|
|
7894
7894
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
7895
7895
|
);
|
|
7896
|
-
const handleRelease =
|
|
7896
|
+
const handleRelease = React89.useCallback(
|
|
7897
7897
|
(id) => {
|
|
7898
7898
|
setActive((prev) => {
|
|
7899
7899
|
const next = new Set(prev);
|
|
@@ -8256,7 +8256,7 @@ function GameMenu({
|
|
|
8256
8256
|
}) {
|
|
8257
8257
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8258
8258
|
const eventBus = useEventBus();
|
|
8259
|
-
const handleOptionClick =
|
|
8259
|
+
const handleOptionClick = React89.useCallback(
|
|
8260
8260
|
(option) => {
|
|
8261
8261
|
if (option.event) {
|
|
8262
8262
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8492,7 +8492,7 @@ function StateGraph({
|
|
|
8492
8492
|
}) {
|
|
8493
8493
|
const eventBus = useEventBus();
|
|
8494
8494
|
const nodes = states ?? [];
|
|
8495
|
-
const positions =
|
|
8495
|
+
const positions = React89.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8496
8496
|
return /* @__PURE__ */ jsxs(
|
|
8497
8497
|
Box,
|
|
8498
8498
|
{
|
|
@@ -8563,8 +8563,8 @@ function MiniMap({
|
|
|
8563
8563
|
tileAssets,
|
|
8564
8564
|
unitAssets
|
|
8565
8565
|
}) {
|
|
8566
|
-
const canvasRef =
|
|
8567
|
-
const imgCacheRef =
|
|
8566
|
+
const canvasRef = React89.useRef(null);
|
|
8567
|
+
const imgCacheRef = React89.useRef(/* @__PURE__ */ new Map());
|
|
8568
8568
|
function loadImg(url) {
|
|
8569
8569
|
const cached = imgCacheRef.current.get(url);
|
|
8570
8570
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8580,7 +8580,7 @@ function MiniMap({
|
|
|
8580
8580
|
imgCacheRef.current.set(url, img);
|
|
8581
8581
|
return null;
|
|
8582
8582
|
}
|
|
8583
|
-
|
|
8583
|
+
React89.useEffect(() => {
|
|
8584
8584
|
const canvas = canvasRef.current;
|
|
8585
8585
|
if (!canvas) return;
|
|
8586
8586
|
const ctx = canvas.getContext("2d");
|
|
@@ -10047,7 +10047,7 @@ function Canvas2D({
|
|
|
10047
10047
|
const registerChildDrawable = useCallback((node) => {
|
|
10048
10048
|
childDrawablesRef.current.push(node);
|
|
10049
10049
|
}, []);
|
|
10050
|
-
const hasJsxChildren =
|
|
10050
|
+
const hasJsxChildren = React89.Children.count(children) > 0;
|
|
10051
10051
|
function isDrawableLayer(node) {
|
|
10052
10052
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
10053
10053
|
}
|
|
@@ -10605,7 +10605,7 @@ function Canvas({
|
|
|
10605
10605
|
if (mode !== "3d") return;
|
|
10606
10606
|
const next = childDrawablesRef.current;
|
|
10607
10607
|
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
10608
|
-
if (next.length === 0 &&
|
|
10608
|
+
if (next.length === 0 && React89.Children.count(children) > 0) return;
|
|
10609
10609
|
setChildDrawables(
|
|
10610
10610
|
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
10611
10611
|
);
|
|
@@ -10643,7 +10643,7 @@ function Canvas({
|
|
|
10643
10643
|
};
|
|
10644
10644
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10645
10645
|
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
10646
|
-
|
|
10646
|
+
React89.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
|
|
10647
10647
|
] });
|
|
10648
10648
|
}
|
|
10649
10649
|
return /* @__PURE__ */ jsx(
|
|
@@ -11068,7 +11068,7 @@ function LinearView({
|
|
|
11068
11068
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
11069
11069
|
const isDone = i < currentIdx;
|
|
11070
11070
|
const isCurrent = i === currentIdx;
|
|
11071
|
-
return /* @__PURE__ */ jsxs(
|
|
11071
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
11072
11072
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11073
11073
|
Typography,
|
|
11074
11074
|
{
|
|
@@ -11603,7 +11603,7 @@ function SequenceBar({
|
|
|
11603
11603
|
else onSlotRemove?.(index);
|
|
11604
11604
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
11605
11605
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
11606
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
11606
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
11607
11607
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11608
11608
|
Typography,
|
|
11609
11609
|
{
|
|
@@ -12454,7 +12454,7 @@ var init_ErrorBoundary = __esm({
|
|
|
12454
12454
|
}
|
|
12455
12455
|
);
|
|
12456
12456
|
};
|
|
12457
|
-
ErrorBoundary = class extends
|
|
12457
|
+
ErrorBoundary = class extends React89__default.Component {
|
|
12458
12458
|
constructor(props) {
|
|
12459
12459
|
super(props);
|
|
12460
12460
|
__publicField(this, "reset", () => {
|
|
@@ -13106,7 +13106,7 @@ var init_Container = __esm({
|
|
|
13106
13106
|
as: Component = "div"
|
|
13107
13107
|
}) => {
|
|
13108
13108
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
13109
|
-
return
|
|
13109
|
+
return React89__default.createElement(
|
|
13110
13110
|
Component,
|
|
13111
13111
|
{
|
|
13112
13112
|
className: cn(
|
|
@@ -17359,7 +17359,7 @@ function useLanguageReady(language) {
|
|
|
17359
17359
|
}, [language]);
|
|
17360
17360
|
return ready;
|
|
17361
17361
|
}
|
|
17362
|
-
var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
17362
|
+
var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, HIGHLIGHT_CAPACITY_BYTES, CodeBlock;
|
|
17363
17363
|
var init_CodeBlock = __esm({
|
|
17364
17364
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
17365
17365
|
init_cn();
|
|
@@ -17592,7 +17592,8 @@ var init_CodeBlock = __esm({
|
|
|
17592
17592
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17593
17593
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17594
17594
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17595
|
-
|
|
17595
|
+
HIGHLIGHT_CAPACITY_BYTES = 512 * 1024;
|
|
17596
|
+
CodeBlock = React89__default.memo(
|
|
17596
17597
|
({
|
|
17597
17598
|
code: rawCode,
|
|
17598
17599
|
language = "text",
|
|
@@ -17622,6 +17623,8 @@ var init_CodeBlock = __esm({
|
|
|
17622
17623
|
const isOrb = language === "orb";
|
|
17623
17624
|
const isLolo = language === "lolo";
|
|
17624
17625
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
17626
|
+
const overCapacity = code.length > HIGHLIGHT_CAPACITY_BYTES;
|
|
17627
|
+
const plainCodeColor = activeStyle['code[class*="language-"]']?.color ?? "#d4d4d4";
|
|
17625
17628
|
const languageReady = useLanguageReady(language);
|
|
17626
17629
|
const eventBus = useEventBus();
|
|
17627
17630
|
const { t } = useTranslate();
|
|
@@ -17688,8 +17691,8 @@ var init_CodeBlock = __esm({
|
|
|
17688
17691
|
const isFoldable = foldableProp ?? true;
|
|
17689
17692
|
const [collapsed, setCollapsed] = useState(() => /* @__PURE__ */ new Set());
|
|
17690
17693
|
const foldRegions = useMemo(
|
|
17691
|
-
() => isFoldable ? computeFoldRegions(code) : [],
|
|
17692
|
-
[code, isFoldable]
|
|
17694
|
+
() => isFoldable && !overCapacity ? computeFoldRegions(code) : [],
|
|
17695
|
+
[code, isFoldable, overCapacity]
|
|
17693
17696
|
);
|
|
17694
17697
|
const foldStartMap = useMemo(() => {
|
|
17695
17698
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -17723,8 +17726,67 @@ var init_CodeBlock = __esm({
|
|
|
17723
17726
|
useEffect(() => {
|
|
17724
17727
|
setCollapsed(/* @__PURE__ */ new Set());
|
|
17725
17728
|
}, [code]);
|
|
17729
|
+
const editableOverCapacity = editableValue.length > HIGHLIGHT_CAPACITY_BYTES;
|
|
17730
|
+
const editableHighlightedElement = useMemo(
|
|
17731
|
+
() => editableOverCapacity ? /* @__PURE__ */ jsx(
|
|
17732
|
+
"div",
|
|
17733
|
+
{
|
|
17734
|
+
style: {
|
|
17735
|
+
padding: "1rem",
|
|
17736
|
+
margin: 0,
|
|
17737
|
+
whiteSpace: "pre",
|
|
17738
|
+
minWidth: "100%",
|
|
17739
|
+
color: plainCodeColor,
|
|
17740
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17741
|
+
fontSize: "13px",
|
|
17742
|
+
lineHeight: "1.5"
|
|
17743
|
+
},
|
|
17744
|
+
children: editableValue || " "
|
|
17745
|
+
}
|
|
17746
|
+
) : /* @__PURE__ */ jsx(
|
|
17747
|
+
SyntaxHighlighter,
|
|
17748
|
+
{
|
|
17749
|
+
PreTag: "div",
|
|
17750
|
+
language,
|
|
17751
|
+
style: activeStyle,
|
|
17752
|
+
wrapLines: errorLines && errorLines.size > 0,
|
|
17753
|
+
lineProps: errorLineProps,
|
|
17754
|
+
customStyle: {
|
|
17755
|
+
backgroundColor: "transparent",
|
|
17756
|
+
borderRadius: 0,
|
|
17757
|
+
padding: "1rem",
|
|
17758
|
+
margin: 0,
|
|
17759
|
+
whiteSpace: "pre",
|
|
17760
|
+
minWidth: "100%",
|
|
17761
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17762
|
+
fontSize: "13px",
|
|
17763
|
+
lineHeight: "1.5"
|
|
17764
|
+
},
|
|
17765
|
+
codeTagProps: {
|
|
17766
|
+
style: {
|
|
17767
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17768
|
+
fontSize: "13px",
|
|
17769
|
+
lineHeight: "1.5"
|
|
17770
|
+
}
|
|
17771
|
+
},
|
|
17772
|
+
children: editableValue || " "
|
|
17773
|
+
}
|
|
17774
|
+
),
|
|
17775
|
+
[editableValue, editableOverCapacity, plainCodeColor, language, activeStyle, errorLines, errorLineProps, languageReady]
|
|
17776
|
+
);
|
|
17726
17777
|
const highlightedElement = useMemo(
|
|
17727
|
-
() => /* @__PURE__ */ jsx(
|
|
17778
|
+
() => overCapacity ? /* @__PURE__ */ jsx(
|
|
17779
|
+
"div",
|
|
17780
|
+
{
|
|
17781
|
+
style: {
|
|
17782
|
+
margin: 0,
|
|
17783
|
+
whiteSpace: "pre",
|
|
17784
|
+
minWidth: "100%",
|
|
17785
|
+
color: plainCodeColor
|
|
17786
|
+
},
|
|
17787
|
+
children: code
|
|
17788
|
+
}
|
|
17789
|
+
) : /* @__PURE__ */ jsx(
|
|
17728
17790
|
SyntaxHighlighter,
|
|
17729
17791
|
{
|
|
17730
17792
|
PreTag: "div",
|
|
@@ -17746,7 +17808,7 @@ var init_CodeBlock = __esm({
|
|
|
17746
17808
|
children: code
|
|
17747
17809
|
}
|
|
17748
17810
|
),
|
|
17749
|
-
[code, language, activeStyle, languageReady]
|
|
17811
|
+
[code, overCapacity, plainCodeColor, language, activeStyle, languageReady]
|
|
17750
17812
|
);
|
|
17751
17813
|
useLayoutEffect(() => {
|
|
17752
17814
|
const container = codeRef.current;
|
|
@@ -18075,35 +18137,7 @@ var init_CodeBlock = __esm({
|
|
|
18075
18137
|
overflow: "hidden",
|
|
18076
18138
|
pointerEvents: "none"
|
|
18077
18139
|
},
|
|
18078
|
-
children:
|
|
18079
|
-
SyntaxHighlighter,
|
|
18080
|
-
{
|
|
18081
|
-
PreTag: "div",
|
|
18082
|
-
language,
|
|
18083
|
-
style: activeStyle,
|
|
18084
|
-
wrapLines: errorLines && errorLines.size > 0,
|
|
18085
|
-
lineProps: errorLineProps,
|
|
18086
|
-
customStyle: {
|
|
18087
|
-
backgroundColor: "transparent",
|
|
18088
|
-
borderRadius: 0,
|
|
18089
|
-
padding: "1rem",
|
|
18090
|
-
margin: 0,
|
|
18091
|
-
whiteSpace: "pre",
|
|
18092
|
-
minWidth: "100%",
|
|
18093
|
-
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
18094
|
-
fontSize: "13px",
|
|
18095
|
-
lineHeight: "1.5"
|
|
18096
|
-
},
|
|
18097
|
-
codeTagProps: {
|
|
18098
|
-
style: {
|
|
18099
|
-
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
18100
|
-
fontSize: "13px",
|
|
18101
|
-
lineHeight: "1.5"
|
|
18102
|
-
}
|
|
18103
|
-
},
|
|
18104
|
-
children: editableValue || " "
|
|
18105
|
-
}
|
|
18106
|
-
)
|
|
18140
|
+
children: editableHighlightedElement
|
|
18107
18141
|
}
|
|
18108
18142
|
),
|
|
18109
18143
|
/* @__PURE__ */ jsx(
|
|
@@ -18187,7 +18221,7 @@ var init_MermaidDiagram = __esm({
|
|
|
18187
18221
|
init_CodeBlock();
|
|
18188
18222
|
init_cn();
|
|
18189
18223
|
mermaidModule = null;
|
|
18190
|
-
MermaidDiagram =
|
|
18224
|
+
MermaidDiagram = React89__default.memo(
|
|
18191
18225
|
({ code, className }) => {
|
|
18192
18226
|
const { resolvedMode } = useTheme();
|
|
18193
18227
|
const containerRef = useRef(null);
|
|
@@ -18245,7 +18279,7 @@ var init_MarkdownContent = __esm({
|
|
|
18245
18279
|
init_CodeBlock();
|
|
18246
18280
|
init_MermaidDiagram();
|
|
18247
18281
|
init_cn();
|
|
18248
|
-
MarkdownContent =
|
|
18282
|
+
MarkdownContent = React89__default.memo(
|
|
18249
18283
|
({ content, direction = "ltr", className }) => {
|
|
18250
18284
|
const { t: _t } = useTranslate();
|
|
18251
18285
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -19575,7 +19609,7 @@ var init_StateMachineView = __esm({
|
|
|
19575
19609
|
style: { top: title ? 30 : 0 },
|
|
19576
19610
|
children: [
|
|
19577
19611
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19578
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19612
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React89__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19579
19613
|
StateNode2,
|
|
19580
19614
|
{
|
|
19581
19615
|
state,
|
|
@@ -24489,6 +24523,183 @@ var init_CodeRunnerPanel = __esm({
|
|
|
24489
24523
|
CodeRunnerPanel.displayName = "CodeRunnerPanel";
|
|
24490
24524
|
}
|
|
24491
24525
|
});
|
|
24526
|
+
function matchesQuery(query, text) {
|
|
24527
|
+
if (!query) return true;
|
|
24528
|
+
let qi = 0;
|
|
24529
|
+
const q = query.toLowerCase();
|
|
24530
|
+
const t = text.toLowerCase();
|
|
24531
|
+
for (let ti = 0; ti < t.length && qi < q.length; ti++) {
|
|
24532
|
+
if (t[ti] === q[qi]) qi++;
|
|
24533
|
+
}
|
|
24534
|
+
return qi === q.length;
|
|
24535
|
+
}
|
|
24536
|
+
function commandMatches(command, query) {
|
|
24537
|
+
if (!query) return true;
|
|
24538
|
+
if (matchesQuery(query, command.label)) return true;
|
|
24539
|
+
return (command.keywords ?? []).some((keyword) => matchesQuery(query, keyword));
|
|
24540
|
+
}
|
|
24541
|
+
var UNGROUPED, CommandPalette;
|
|
24542
|
+
var init_CommandPalette = __esm({
|
|
24543
|
+
"components/core/molecules/CommandPalette.tsx"() {
|
|
24544
|
+
"use client";
|
|
24545
|
+
init_Box();
|
|
24546
|
+
init_Stack();
|
|
24547
|
+
init_Typography();
|
|
24548
|
+
init_Icon();
|
|
24549
|
+
init_Input();
|
|
24550
|
+
init_Badge();
|
|
24551
|
+
init_cn();
|
|
24552
|
+
init_useEventBus();
|
|
24553
|
+
init_Modal();
|
|
24554
|
+
UNGROUPED = /* @__PURE__ */ Symbol("command-palette-ungrouped");
|
|
24555
|
+
CommandPalette = ({
|
|
24556
|
+
open,
|
|
24557
|
+
onOpenChange,
|
|
24558
|
+
commands,
|
|
24559
|
+
onSelect,
|
|
24560
|
+
placeholder = "Type a command...",
|
|
24561
|
+
emptyLabel = "No matching commands",
|
|
24562
|
+
className
|
|
24563
|
+
}) => {
|
|
24564
|
+
const eventBus = useEventBus();
|
|
24565
|
+
const [query, setQuery] = useState("");
|
|
24566
|
+
const [highlightIndex, setHighlightIndex] = useState(0);
|
|
24567
|
+
const filtered = useMemo(
|
|
24568
|
+
() => commands.filter((command) => commandMatches(command, query)),
|
|
24569
|
+
[commands, query]
|
|
24570
|
+
);
|
|
24571
|
+
const groups = useMemo(() => {
|
|
24572
|
+
const order = [];
|
|
24573
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
24574
|
+
for (const command of filtered) {
|
|
24575
|
+
const key = command.group ?? UNGROUPED;
|
|
24576
|
+
if (!byGroup.has(key)) {
|
|
24577
|
+
byGroup.set(key, []);
|
|
24578
|
+
order.push(key);
|
|
24579
|
+
}
|
|
24580
|
+
byGroup.get(key).push(command);
|
|
24581
|
+
}
|
|
24582
|
+
return order.map((key) => ({ group: key === UNGROUPED ? void 0 : key, items: byGroup.get(key) }));
|
|
24583
|
+
}, [filtered]);
|
|
24584
|
+
const resetQuery = useCallback(() => {
|
|
24585
|
+
setQuery("");
|
|
24586
|
+
setHighlightIndex(0);
|
|
24587
|
+
}, []);
|
|
24588
|
+
const handleClose = useCallback(() => {
|
|
24589
|
+
resetQuery();
|
|
24590
|
+
onOpenChange(false);
|
|
24591
|
+
}, [onOpenChange, resetQuery]);
|
|
24592
|
+
const handleSelect = useCallback(
|
|
24593
|
+
(command) => {
|
|
24594
|
+
if (command.disabled) return;
|
|
24595
|
+
if (command.event) eventBus.emit(`UI:${command.event}`, { commandId: command.id });
|
|
24596
|
+
if (command.action) eventBus.emit(`UI:${command.action}`, command.actionPayload ?? {});
|
|
24597
|
+
onSelect?.(command);
|
|
24598
|
+
handleClose();
|
|
24599
|
+
},
|
|
24600
|
+
[eventBus, onSelect, handleClose]
|
|
24601
|
+
);
|
|
24602
|
+
const handleQueryChange = useCallback((e) => {
|
|
24603
|
+
setQuery(e.target.value);
|
|
24604
|
+
setHighlightIndex(0);
|
|
24605
|
+
}, []);
|
|
24606
|
+
const handleKeyDown = useCallback(
|
|
24607
|
+
(e) => {
|
|
24608
|
+
if (filtered.length === 0) return;
|
|
24609
|
+
if (e.key === "ArrowDown") {
|
|
24610
|
+
e.preventDefault();
|
|
24611
|
+
setHighlightIndex((prev) => prev < filtered.length - 1 ? prev + 1 : 0);
|
|
24612
|
+
} else if (e.key === "ArrowUp") {
|
|
24613
|
+
e.preventDefault();
|
|
24614
|
+
setHighlightIndex((prev) => prev > 0 ? prev - 1 : filtered.length - 1);
|
|
24615
|
+
} else if (e.key === "Enter") {
|
|
24616
|
+
e.preventDefault();
|
|
24617
|
+
const command = filtered[highlightIndex];
|
|
24618
|
+
if (command) handleSelect(command);
|
|
24619
|
+
}
|
|
24620
|
+
},
|
|
24621
|
+
[filtered, highlightIndex, handleSelect]
|
|
24622
|
+
);
|
|
24623
|
+
return /* @__PURE__ */ jsx(
|
|
24624
|
+
Modal,
|
|
24625
|
+
{
|
|
24626
|
+
isOpen: open,
|
|
24627
|
+
onClose: handleClose,
|
|
24628
|
+
onExited: resetQuery,
|
|
24629
|
+
showCloseButton: false,
|
|
24630
|
+
size: "md",
|
|
24631
|
+
className,
|
|
24632
|
+
children: /* @__PURE__ */ jsx(Box, { "data-testid": "command-palette", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
24633
|
+
/* @__PURE__ */ jsx(
|
|
24634
|
+
Input,
|
|
24635
|
+
{
|
|
24636
|
+
inputType: "search",
|
|
24637
|
+
placeholder,
|
|
24638
|
+
value: query,
|
|
24639
|
+
onChange: handleQueryChange,
|
|
24640
|
+
onKeyDown: handleKeyDown,
|
|
24641
|
+
leftIcon: "search",
|
|
24642
|
+
clearable: query.length > 0,
|
|
24643
|
+
onClear: resetQuery,
|
|
24644
|
+
autoFocus: true,
|
|
24645
|
+
"data-testid": "command-palette-input"
|
|
24646
|
+
}
|
|
24647
|
+
),
|
|
24648
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx(Box, { className: "px-2 py-6 text-center", "data-testid": "command-palette-empty", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: emptyLabel }) }) : /* @__PURE__ */ jsx(
|
|
24649
|
+
Box,
|
|
24650
|
+
{
|
|
24651
|
+
className: "max-h-80 overflow-y-auto",
|
|
24652
|
+
role: "listbox",
|
|
24653
|
+
"aria-label": placeholder,
|
|
24654
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: groups.map(({ group, items }) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
24655
|
+
group ? /* @__PURE__ */ jsx(
|
|
24656
|
+
Typography,
|
|
24657
|
+
{
|
|
24658
|
+
variant: "caption",
|
|
24659
|
+
color: "muted",
|
|
24660
|
+
className: "px-3 pt-2 pb-1 block",
|
|
24661
|
+
children: group
|
|
24662
|
+
}
|
|
24663
|
+
) : null,
|
|
24664
|
+
items.map((command) => {
|
|
24665
|
+
const index = filtered.indexOf(command);
|
|
24666
|
+
const isHighlighted = index === highlightIndex;
|
|
24667
|
+
return /* @__PURE__ */ jsxs(
|
|
24668
|
+
Box,
|
|
24669
|
+
{
|
|
24670
|
+
as: "button",
|
|
24671
|
+
role: "option",
|
|
24672
|
+
"aria-selected": isHighlighted,
|
|
24673
|
+
"aria-disabled": command.disabled || void 0,
|
|
24674
|
+
"data-testid": `command-palette-item-${command.id}`,
|
|
24675
|
+
onMouseEnter: () => !command.disabled && setHighlightIndex(index),
|
|
24676
|
+
onClick: () => handleSelect(command),
|
|
24677
|
+
className: cn(
|
|
24678
|
+
"w-full flex items-center gap-3 px-3 py-2 text-start rounded-sm",
|
|
24679
|
+
"text-sm transition-colors",
|
|
24680
|
+
"focus:outline-none",
|
|
24681
|
+
isHighlighted && "bg-muted",
|
|
24682
|
+
command.disabled && "opacity-50 cursor-not-allowed"
|
|
24683
|
+
),
|
|
24684
|
+
children: [
|
|
24685
|
+
command.icon ? /* @__PURE__ */ jsx(Icon, { icon: command.icon, size: "sm", className: "flex-shrink-0" }) : null,
|
|
24686
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "flex-1 truncate", children: command.label }),
|
|
24687
|
+
command.shortcut ? /* @__PURE__ */ jsx(Badge, { variant: "neutral", size: "sm", children: command.shortcut }) : null
|
|
24688
|
+
]
|
|
24689
|
+
},
|
|
24690
|
+
command.id
|
|
24691
|
+
);
|
|
24692
|
+
})
|
|
24693
|
+
] }, String(group ?? "__ungrouped__"))) })
|
|
24694
|
+
}
|
|
24695
|
+
)
|
|
24696
|
+
] }) })
|
|
24697
|
+
}
|
|
24698
|
+
);
|
|
24699
|
+
};
|
|
24700
|
+
CommandPalette.displayName = "CommandPalette";
|
|
24701
|
+
}
|
|
24702
|
+
});
|
|
24492
24703
|
function formatCount(count) {
|
|
24493
24704
|
if (count >= 1e3) {
|
|
24494
24705
|
return `${(count / 1e3).toFixed(1)}k`;
|
|
@@ -25764,7 +25975,7 @@ var init_Menu = __esm({
|
|
|
25764
25975
|
"bottom-end": "bottom-start"
|
|
25765
25976
|
};
|
|
25766
25977
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25767
|
-
const triggerElement =
|
|
25978
|
+
const triggerElement = React89__default.isValidElement(trigger) ? React89__default.cloneElement(trigger, {
|
|
25768
25979
|
ref: triggerRef,
|
|
25769
25980
|
onClick: handleToggle
|
|
25770
25981
|
}) : /* @__PURE__ */ jsx(
|
|
@@ -25867,14 +26078,14 @@ function useDataDnd(args) {
|
|
|
25867
26078
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25868
26079
|
const enabled = isZone || Boolean(dndRoot);
|
|
25869
26080
|
const eventBus = useEventBus();
|
|
25870
|
-
const parentRoot =
|
|
26081
|
+
const parentRoot = React89__default.useContext(RootCtx);
|
|
25871
26082
|
const isRoot = enabled && parentRoot === null;
|
|
25872
|
-
const zoneId =
|
|
26083
|
+
const zoneId = React89__default.useId();
|
|
25873
26084
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25874
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25875
|
-
const optimisticOrdersRef =
|
|
26085
|
+
const [optimisticOrders, setOptimisticOrders] = React89__default.useState(() => /* @__PURE__ */ new Map());
|
|
26086
|
+
const optimisticOrdersRef = React89__default.useRef(optimisticOrders);
|
|
25876
26087
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25877
|
-
const clearOptimisticOrder =
|
|
26088
|
+
const clearOptimisticOrder = React89__default.useCallback((group) => {
|
|
25878
26089
|
setOptimisticOrders((prev) => {
|
|
25879
26090
|
if (!prev.has(group)) return prev;
|
|
25880
26091
|
const next = new Map(prev);
|
|
@@ -25899,7 +26110,7 @@ function useDataDnd(args) {
|
|
|
25899
26110
|
const raw = it[dndItemIdField];
|
|
25900
26111
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25901
26112
|
}).join("|");
|
|
25902
|
-
const itemIds =
|
|
26113
|
+
const itemIds = React89__default.useMemo(
|
|
25903
26114
|
() => orderedItems.map((it, idx) => {
|
|
25904
26115
|
const raw = it[dndItemIdField];
|
|
25905
26116
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25910,7 +26121,7 @@ function useDataDnd(args) {
|
|
|
25910
26121
|
const raw = it[dndItemIdField];
|
|
25911
26122
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25912
26123
|
}).join("|");
|
|
25913
|
-
|
|
26124
|
+
React89__default.useEffect(() => {
|
|
25914
26125
|
const root = isRoot ? null : parentRoot;
|
|
25915
26126
|
if (root) {
|
|
25916
26127
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25918,20 +26129,20 @@ function useDataDnd(args) {
|
|
|
25918
26129
|
clearOptimisticOrder(ownGroup);
|
|
25919
26130
|
}
|
|
25920
26131
|
}, [itemsContentSig, ownGroup]);
|
|
25921
|
-
const zonesRef =
|
|
25922
|
-
const registerZone =
|
|
26132
|
+
const zonesRef = React89__default.useRef(/* @__PURE__ */ new Map());
|
|
26133
|
+
const registerZone = React89__default.useCallback((zoneId2, meta2) => {
|
|
25923
26134
|
zonesRef.current.set(zoneId2, meta2);
|
|
25924
26135
|
}, []);
|
|
25925
|
-
const unregisterZone =
|
|
26136
|
+
const unregisterZone = React89__default.useCallback((zoneId2) => {
|
|
25926
26137
|
zonesRef.current.delete(zoneId2);
|
|
25927
26138
|
}, []);
|
|
25928
|
-
const [activeDrag, setActiveDrag] =
|
|
25929
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25930
|
-
const meta =
|
|
26139
|
+
const [activeDrag, setActiveDrag] = React89__default.useState(null);
|
|
26140
|
+
const [overZoneGroup, setOverZoneGroup] = React89__default.useState(null);
|
|
26141
|
+
const meta = React89__default.useMemo(
|
|
25931
26142
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25932
26143
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25933
26144
|
);
|
|
25934
|
-
|
|
26145
|
+
React89__default.useEffect(() => {
|
|
25935
26146
|
const target = isRoot ? null : parentRoot;
|
|
25936
26147
|
if (!target) {
|
|
25937
26148
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25950,7 +26161,7 @@ function useDataDnd(args) {
|
|
|
25950
26161
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25951
26162
|
const sensors = useAlmadarDndSensors(true);
|
|
25952
26163
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25953
|
-
const findZoneByItem =
|
|
26164
|
+
const findZoneByItem = React89__default.useCallback(
|
|
25954
26165
|
(id) => {
|
|
25955
26166
|
for (const z of zonesRef.current.values()) {
|
|
25956
26167
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25959,7 +26170,7 @@ function useDataDnd(args) {
|
|
|
25959
26170
|
},
|
|
25960
26171
|
[]
|
|
25961
26172
|
);
|
|
25962
|
-
|
|
26173
|
+
React89__default.useCallback(
|
|
25963
26174
|
(group) => {
|
|
25964
26175
|
for (const z of zonesRef.current.values()) {
|
|
25965
26176
|
if (z.group === group) return z;
|
|
@@ -25968,7 +26179,7 @@ function useDataDnd(args) {
|
|
|
25968
26179
|
},
|
|
25969
26180
|
[]
|
|
25970
26181
|
);
|
|
25971
|
-
const handleDragEnd =
|
|
26182
|
+
const handleDragEnd = React89__default.useCallback(
|
|
25972
26183
|
(event) => {
|
|
25973
26184
|
const { active, over } = event;
|
|
25974
26185
|
const activeIdStr = String(active.id);
|
|
@@ -26059,8 +26270,8 @@ function useDataDnd(args) {
|
|
|
26059
26270
|
},
|
|
26060
26271
|
[eventBus]
|
|
26061
26272
|
);
|
|
26062
|
-
const sortableData =
|
|
26063
|
-
const SortableItem =
|
|
26273
|
+
const sortableData = React89__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
26274
|
+
const SortableItem = React89__default.useCallback(
|
|
26064
26275
|
({ id, children }) => {
|
|
26065
26276
|
const {
|
|
26066
26277
|
attributes,
|
|
@@ -26100,7 +26311,7 @@ function useDataDnd(args) {
|
|
|
26100
26311
|
id: droppableId,
|
|
26101
26312
|
data: sortableData
|
|
26102
26313
|
});
|
|
26103
|
-
const ctx =
|
|
26314
|
+
const ctx = React89__default.useContext(RootCtx);
|
|
26104
26315
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
26105
26316
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
26106
26317
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -26115,7 +26326,7 @@ function useDataDnd(args) {
|
|
|
26115
26326
|
showForeignPlaceholder,
|
|
26116
26327
|
ctxAvailable: ctx != null
|
|
26117
26328
|
});
|
|
26118
|
-
|
|
26329
|
+
React89__default.useEffect(() => {
|
|
26119
26330
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
26120
26331
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
26121
26332
|
return /* @__PURE__ */ jsx(
|
|
@@ -26129,11 +26340,11 @@ function useDataDnd(args) {
|
|
|
26129
26340
|
}
|
|
26130
26341
|
);
|
|
26131
26342
|
};
|
|
26132
|
-
const rootContextValue =
|
|
26343
|
+
const rootContextValue = React89__default.useMemo(
|
|
26133
26344
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
26134
26345
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
26135
26346
|
);
|
|
26136
|
-
const handleDragStart =
|
|
26347
|
+
const handleDragStart = React89__default.useCallback((event) => {
|
|
26137
26348
|
const sourceZone = findZoneByItem(event.active.id);
|
|
26138
26349
|
const rect = event.active.rect.current.initial;
|
|
26139
26350
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -26152,7 +26363,7 @@ function useDataDnd(args) {
|
|
|
26152
26363
|
isRoot
|
|
26153
26364
|
});
|
|
26154
26365
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
26155
|
-
const handleDragOver =
|
|
26366
|
+
const handleDragOver = React89__default.useCallback((event) => {
|
|
26156
26367
|
const { active, over } = event;
|
|
26157
26368
|
const overData = over?.data?.current;
|
|
26158
26369
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -26222,7 +26433,7 @@ function useDataDnd(args) {
|
|
|
26222
26433
|
return next;
|
|
26223
26434
|
});
|
|
26224
26435
|
}, []);
|
|
26225
|
-
const handleDragCancel =
|
|
26436
|
+
const handleDragCancel = React89__default.useCallback((event) => {
|
|
26226
26437
|
setActiveDrag(null);
|
|
26227
26438
|
setOverZoneGroup(null);
|
|
26228
26439
|
dndLog.warn("dragCancel", {
|
|
@@ -26230,12 +26441,12 @@ function useDataDnd(args) {
|
|
|
26230
26441
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
26231
26442
|
});
|
|
26232
26443
|
}, []);
|
|
26233
|
-
const handleDragEndWithCleanup =
|
|
26444
|
+
const handleDragEndWithCleanup = React89__default.useCallback((event) => {
|
|
26234
26445
|
handleDragEnd(event);
|
|
26235
26446
|
setActiveDrag(null);
|
|
26236
26447
|
setOverZoneGroup(null);
|
|
26237
26448
|
}, [handleDragEnd]);
|
|
26238
|
-
const wrapContainer =
|
|
26449
|
+
const wrapContainer = React89__default.useCallback(
|
|
26239
26450
|
(children) => {
|
|
26240
26451
|
if (!enabled) return children;
|
|
26241
26452
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -26289,7 +26500,7 @@ var init_useDataDnd = __esm({
|
|
|
26289
26500
|
init_useAlmadarDndCollision();
|
|
26290
26501
|
init_Box();
|
|
26291
26502
|
dndLog = createLogger("almadar:ui:dnd");
|
|
26292
|
-
RootCtx =
|
|
26503
|
+
RootCtx = React89__default.createContext(null);
|
|
26293
26504
|
}
|
|
26294
26505
|
});
|
|
26295
26506
|
function renderIconInput(icon, props) {
|
|
@@ -26804,7 +27015,7 @@ function DataList({
|
|
|
26804
27015
|
}) {
|
|
26805
27016
|
const eventBus = useEventBus();
|
|
26806
27017
|
const { t } = useTranslate();
|
|
26807
|
-
const [visibleCount, setVisibleCount] =
|
|
27018
|
+
const [visibleCount, setVisibleCount] = React89__default.useState(pageSize || Infinity);
|
|
26808
27019
|
const fieldDefs = fields ?? columns ?? [];
|
|
26809
27020
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26810
27021
|
const dnd = useDataDnd({
|
|
@@ -26820,14 +27031,14 @@ function DataList({
|
|
|
26820
27031
|
dndRoot
|
|
26821
27032
|
});
|
|
26822
27033
|
const orderedData = dnd.orderedItems;
|
|
26823
|
-
const allData =
|
|
27034
|
+
const allData = React89__default.useMemo(
|
|
26824
27035
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
26825
27036
|
[orderedData, sortBy, sortDirection]
|
|
26826
27037
|
);
|
|
26827
27038
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26828
27039
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26829
27040
|
const hasRenderProp = typeof children === "function";
|
|
26830
|
-
|
|
27041
|
+
React89__default.useEffect(() => {
|
|
26831
27042
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26832
27043
|
const childrenTypeOf = typeof children;
|
|
26833
27044
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26947,7 +27158,7 @@ function DataList({
|
|
|
26947
27158
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
26948
27159
|
};
|
|
26949
27160
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
26950
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
27161
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
26951
27162
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26952
27163
|
group.items.map((itemData, index) => {
|
|
26953
27164
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -27163,7 +27374,7 @@ function DataList({
|
|
|
27163
27374
|
className
|
|
27164
27375
|
),
|
|
27165
27376
|
children: [
|
|
27166
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
27377
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
27167
27378
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
27168
27379
|
group.items.map(
|
|
27169
27380
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -27250,7 +27461,7 @@ var init_FormSection = __esm({
|
|
|
27250
27461
|
columns = 1,
|
|
27251
27462
|
className
|
|
27252
27463
|
}) => {
|
|
27253
|
-
const [collapsed, setCollapsed] =
|
|
27464
|
+
const [collapsed, setCollapsed] = React89__default.useState(defaultCollapsed);
|
|
27254
27465
|
const { t } = useTranslate();
|
|
27255
27466
|
const eventBus = useEventBus();
|
|
27256
27467
|
const gridClass = {
|
|
@@ -27258,7 +27469,7 @@ var init_FormSection = __esm({
|
|
|
27258
27469
|
2: "grid-cols-1 md:grid-cols-2",
|
|
27259
27470
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
27260
27471
|
}[columns];
|
|
27261
|
-
|
|
27472
|
+
React89__default.useCallback(() => {
|
|
27262
27473
|
if (collapsible) {
|
|
27263
27474
|
setCollapsed((prev) => !prev);
|
|
27264
27475
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27918,10 +28129,10 @@ var init_FileTree = __esm({
|
|
|
27918
28129
|
indent = 16
|
|
27919
28130
|
}) => {
|
|
27920
28131
|
const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
|
|
27921
|
-
const byId =
|
|
27922
|
-
const selectedAncestors =
|
|
27923
|
-
const lastSelectedRef =
|
|
27924
|
-
|
|
28132
|
+
const byId = React89__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
|
|
28133
|
+
const selectedAncestors = React89__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
|
|
28134
|
+
const lastSelectedRef = React89__default.useRef(selectedId);
|
|
28135
|
+
React89__default.useEffect(() => {
|
|
27925
28136
|
if (selectedId === lastSelectedRef.current) return;
|
|
27926
28137
|
lastSelectedRef.current = selectedId;
|
|
27927
28138
|
setOverrides((prev) => {
|
|
@@ -28755,7 +28966,7 @@ var init_Flex = __esm({
|
|
|
28755
28966
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
28756
28967
|
}
|
|
28757
28968
|
}
|
|
28758
|
-
return
|
|
28969
|
+
return React89__default.createElement(Component, {
|
|
28759
28970
|
className: cn(
|
|
28760
28971
|
inline ? "inline-flex" : "flex",
|
|
28761
28972
|
directionStyles[direction],
|
|
@@ -28874,7 +29085,7 @@ var init_Grid = __esm({
|
|
|
28874
29085
|
as: Component = "div"
|
|
28875
29086
|
}) => {
|
|
28876
29087
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
28877
|
-
return
|
|
29088
|
+
return React89__default.createElement(
|
|
28878
29089
|
Component,
|
|
28879
29090
|
{
|
|
28880
29091
|
className: cn(
|
|
@@ -29296,9 +29507,9 @@ var init_Popover = __esm({
|
|
|
29296
29507
|
onMouseLeave: handleClose,
|
|
29297
29508
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
29298
29509
|
};
|
|
29299
|
-
const childElement =
|
|
29510
|
+
const childElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29300
29511
|
const childPointerDown = childElement.props.onPointerDown;
|
|
29301
|
-
const triggerElement =
|
|
29512
|
+
const triggerElement = React89__default.cloneElement(
|
|
29302
29513
|
childElement,
|
|
29303
29514
|
{
|
|
29304
29515
|
ref: triggerRef,
|
|
@@ -29912,9 +30123,9 @@ var init_Tooltip = __esm({
|
|
|
29912
30123
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
29913
30124
|
};
|
|
29914
30125
|
}, []);
|
|
29915
|
-
const triggerElement =
|
|
30126
|
+
const triggerElement = React89__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29916
30127
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
29917
|
-
const trigger =
|
|
30128
|
+
const trigger = React89__default.cloneElement(triggerElement, {
|
|
29918
30129
|
ref: triggerRef,
|
|
29919
30130
|
onMouseEnter: handleMouseEnter,
|
|
29920
30131
|
onMouseLeave: handleMouseLeave,
|
|
@@ -30004,7 +30215,7 @@ var init_WizardProgress = __esm({
|
|
|
30004
30215
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
30005
30216
|
const isActive = index === currentStep;
|
|
30006
30217
|
const isCompleted = index < currentStep;
|
|
30007
|
-
return /* @__PURE__ */ jsxs(
|
|
30218
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
30008
30219
|
/* @__PURE__ */ jsx(
|
|
30009
30220
|
"button",
|
|
30010
30221
|
{
|
|
@@ -32663,7 +32874,7 @@ var init_MapView = __esm({
|
|
|
32663
32874
|
shadowSize: [41, 41]
|
|
32664
32875
|
});
|
|
32665
32876
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
32666
|
-
const { useEffect: useEffect68, useRef: useRef67, useCallback:
|
|
32877
|
+
const { useEffect: useEffect68, useRef: useRef67, useCallback: useCallback100, useState: useState102 } = React89__default;
|
|
32667
32878
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
32668
32879
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
32669
32880
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -32708,8 +32919,8 @@ var init_MapView = __esm({
|
|
|
32708
32919
|
showAttribution = true
|
|
32709
32920
|
}) {
|
|
32710
32921
|
const eventBus = useEventBus2();
|
|
32711
|
-
const [clickedPosition, setClickedPosition] =
|
|
32712
|
-
const handleMapClick =
|
|
32922
|
+
const [clickedPosition, setClickedPosition] = useState102(null);
|
|
32923
|
+
const handleMapClick = useCallback100((lat, lng) => {
|
|
32713
32924
|
if (showClickedPin) {
|
|
32714
32925
|
setClickedPosition({ lat, lng });
|
|
32715
32926
|
}
|
|
@@ -32718,7 +32929,7 @@ var init_MapView = __esm({
|
|
|
32718
32929
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
32719
32930
|
}
|
|
32720
32931
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
32721
|
-
const handleMarkerClick =
|
|
32932
|
+
const handleMarkerClick = useCallback100((marker) => {
|
|
32722
32933
|
onMarkerClick?.(marker);
|
|
32723
32934
|
if (markerClickEvent) {
|
|
32724
32935
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -33608,8 +33819,8 @@ function TableView({
|
|
|
33608
33819
|
}) {
|
|
33609
33820
|
const eventBus = useEventBus();
|
|
33610
33821
|
const { t } = useTranslate();
|
|
33611
|
-
const [visibleCount, setVisibleCount] =
|
|
33612
|
-
const [localSelected, setLocalSelected] =
|
|
33822
|
+
const [visibleCount, setVisibleCount] = React89__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
33823
|
+
const [localSelected, setLocalSelected] = React89__default.useState(/* @__PURE__ */ new Set());
|
|
33613
33824
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
33614
33825
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
33615
33826
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -33630,7 +33841,7 @@ function TableView({
|
|
|
33630
33841
|
const hasMore = pageSize > 0 && visibleCount < ordered2.length;
|
|
33631
33842
|
const hasRenderProp = typeof children === "function";
|
|
33632
33843
|
const idField = dndItemIdField ?? "id";
|
|
33633
|
-
|
|
33844
|
+
React89__default.useEffect(() => {
|
|
33634
33845
|
tableViewLog.debug("render", {
|
|
33635
33846
|
rowCount: data.length,
|
|
33636
33847
|
colCount: colDefs.length,
|
|
@@ -33680,7 +33891,7 @@ function TableView({
|
|
|
33680
33891
|
};
|
|
33681
33892
|
eventBus.emit(`UI:${rowClickEvent}`, payload);
|
|
33682
33893
|
};
|
|
33683
|
-
const colFloors =
|
|
33894
|
+
const colFloors = React89__default.useMemo(
|
|
33684
33895
|
() => colDefs.map((col) => {
|
|
33685
33896
|
const longest = data.reduce((widest, row) => {
|
|
33686
33897
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -33823,12 +34034,12 @@ function TableView({
|
|
|
33823
34034
|
]
|
|
33824
34035
|
}
|
|
33825
34036
|
);
|
|
33826
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
34037
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React89__default.Fragment, { children: rowInner }, id);
|
|
33827
34038
|
};
|
|
33828
34039
|
const items = Array.from(data);
|
|
33829
34040
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
33830
34041
|
let runningIndex = 0;
|
|
33831
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34042
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
33832
34043
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
33833
34044
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
33834
34045
|
] }, gi)) });
|
|
@@ -35197,7 +35408,7 @@ var init_StepFlow = __esm({
|
|
|
35197
35408
|
className
|
|
35198
35409
|
}) => {
|
|
35199
35410
|
if (orientation === "vertical") {
|
|
35200
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
35411
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React89__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
35201
35412
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
35202
35413
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
35203
35414
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -35208,7 +35419,7 @@ var init_StepFlow = __esm({
|
|
|
35208
35419
|
] })
|
|
35209
35420
|
] }) }, index)) });
|
|
35210
35421
|
}
|
|
35211
|
-
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(
|
|
35422
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
35212
35423
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
35213
35424
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
35214
35425
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -36198,7 +36409,7 @@ var init_LikertScale = __esm({
|
|
|
36198
36409
|
md: "text-base",
|
|
36199
36410
|
lg: "text-lg"
|
|
36200
36411
|
};
|
|
36201
|
-
LikertScale =
|
|
36412
|
+
LikertScale = React89__default.forwardRef(
|
|
36202
36413
|
({
|
|
36203
36414
|
question,
|
|
36204
36415
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -36210,7 +36421,7 @@ var init_LikertScale = __esm({
|
|
|
36210
36421
|
variant = "radios",
|
|
36211
36422
|
className
|
|
36212
36423
|
}, ref) => {
|
|
36213
|
-
const groupId =
|
|
36424
|
+
const groupId = React89__default.useId();
|
|
36214
36425
|
const eventBus = useEventBus();
|
|
36215
36426
|
const handleSelect = useCallback(
|
|
36216
36427
|
(next) => {
|
|
@@ -38633,7 +38844,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
38633
38844
|
"aria-label": t("aria.breadcrumb"),
|
|
38634
38845
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
38635
38846
|
const isLast = idx === items.length - 1;
|
|
38636
|
-
return /* @__PURE__ */ jsxs(
|
|
38847
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
38637
38848
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
38638
38849
|
Icon,
|
|
38639
38850
|
{
|
|
@@ -39502,7 +39713,7 @@ var init_MiniStateMachine = __esm({
|
|
|
39502
39713
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
39503
39714
|
const tc = transitionCounts[s.name] ?? 0;
|
|
39504
39715
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
39505
|
-
return /* @__PURE__ */ jsxs(
|
|
39716
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
39506
39717
|
/* @__PURE__ */ jsx(
|
|
39507
39718
|
AvlState,
|
|
39508
39719
|
{
|
|
@@ -39707,7 +39918,7 @@ var init_PageHeader = __esm({
|
|
|
39707
39918
|
info: "bg-info/10 text-info"
|
|
39708
39919
|
};
|
|
39709
39920
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
39710
|
-
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(
|
|
39921
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
39711
39922
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
39712
39923
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
39713
39924
|
"a",
|
|
@@ -40065,7 +40276,7 @@ var init_Section = __esm({
|
|
|
40065
40276
|
as: Component = "section"
|
|
40066
40277
|
}) => {
|
|
40067
40278
|
const hasHeader = title || description || action;
|
|
40068
|
-
return
|
|
40279
|
+
return React89__default.createElement(
|
|
40069
40280
|
Component,
|
|
40070
40281
|
{
|
|
40071
40282
|
className: cn(
|
|
@@ -40439,7 +40650,7 @@ var init_WizardContainer = __esm({
|
|
|
40439
40650
|
const isCompleted = index < currentStep;
|
|
40440
40651
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
40441
40652
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
40442
|
-
return /* @__PURE__ */ jsxs(
|
|
40653
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
40443
40654
|
/* @__PURE__ */ jsx(
|
|
40444
40655
|
Button,
|
|
40445
40656
|
{
|
|
@@ -42226,7 +42437,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
42226
42437
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
42227
42438
|
const summary = fieldSummary(unit);
|
|
42228
42439
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
42229
|
-
return /* @__PURE__ */ jsxs(
|
|
42440
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
42230
42441
|
/* @__PURE__ */ jsxs(
|
|
42231
42442
|
Box,
|
|
42232
42443
|
{
|
|
@@ -42323,7 +42534,7 @@ var init_ImportProgress = __esm({
|
|
|
42323
42534
|
PIPELINE.map((key, index) => {
|
|
42324
42535
|
const isComplete = index < currentIndex;
|
|
42325
42536
|
const isActive = index === currentIndex;
|
|
42326
|
-
return /* @__PURE__ */ jsxs(
|
|
42537
|
+
return /* @__PURE__ */ jsxs(React89__default.Fragment, { children: [
|
|
42327
42538
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
42328
42539
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
42329
42540
|
/* @__PURE__ */ jsx(
|
|
@@ -43264,7 +43475,7 @@ var init_DetailPanel = __esm({
|
|
|
43264
43475
|
}) => {
|
|
43265
43476
|
const eventBus = useEventBus();
|
|
43266
43477
|
const { t } = useTranslate();
|
|
43267
|
-
const [titleDraft, setTitleDraft] =
|
|
43478
|
+
const [titleDraft, setTitleDraft] = React89__default.useState(null);
|
|
43268
43479
|
const isFieldDefArray = (arr) => {
|
|
43269
43480
|
if (!arr || arr.length === 0) return false;
|
|
43270
43481
|
const first = arr[0];
|
|
@@ -43730,7 +43941,7 @@ var init_SplitPane = __esm({
|
|
|
43730
43941
|
/* @__PURE__ */ jsx(
|
|
43731
43942
|
"div",
|
|
43732
43943
|
{
|
|
43733
|
-
className: cn("overflow-auto", leftClassName),
|
|
43944
|
+
className: cn("flex flex-col overflow-auto", leftClassName),
|
|
43734
43945
|
style: {
|
|
43735
43946
|
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
43736
43947
|
flexShrink: 0
|
|
@@ -43748,7 +43959,7 @@ var init_SplitPane = __esm({
|
|
|
43748
43959
|
)
|
|
43749
43960
|
}
|
|
43750
43961
|
),
|
|
43751
|
-
/* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
|
|
43962
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex flex-col flex-1 min-h-0 min-w-0 overflow-auto", rightClassName), children: right })
|
|
43752
43963
|
]
|
|
43753
43964
|
}
|
|
43754
43965
|
);
|
|
@@ -43794,7 +44005,7 @@ var init_DockLayout = __esm({
|
|
|
43794
44005
|
const showBottomPanel = Boolean(bottomPanel) && !bottomPanelCollapsed;
|
|
43795
44006
|
const showSecondarySidebar = Boolean(secondarySidebar) && !secondarySidebarCollapsed;
|
|
43796
44007
|
const centerRow = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
43797
|
-
/* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 h-
|
|
44008
|
+
/* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 min-h-0 overflow-auto", mainClassName), children: main }),
|
|
43798
44009
|
showSecondarySidebar && /* @__PURE__ */ jsx(
|
|
43799
44010
|
Box,
|
|
43800
44011
|
{
|
|
@@ -43825,7 +44036,7 @@ var init_DockLayout = __esm({
|
|
|
43825
44036
|
Box,
|
|
43826
44037
|
{
|
|
43827
44038
|
className: cn(
|
|
43828
|
-
"flex-shrink-0 h-
|
|
44039
|
+
"flex-shrink-0 min-h-0 overflow-auto border-r border-border",
|
|
43829
44040
|
railClassName
|
|
43830
44041
|
),
|
|
43831
44042
|
style: { width: railWidth },
|
|
@@ -43874,7 +44085,7 @@ var init_DockLayout = __esm({
|
|
|
43874
44085
|
}
|
|
43875
44086
|
});
|
|
43876
44087
|
function extractTitle(children) {
|
|
43877
|
-
if (!
|
|
44088
|
+
if (!React89__default.isValidElement(children)) return void 0;
|
|
43878
44089
|
const props = children.props;
|
|
43879
44090
|
if (typeof props.title === "string") {
|
|
43880
44091
|
return props.title;
|
|
@@ -44236,7 +44447,7 @@ var init_Form = __esm({
|
|
|
44236
44447
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
44237
44448
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
44238
44449
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
44239
|
-
const normalizedInitialData =
|
|
44450
|
+
const normalizedInitialData = React89__default.useMemo(() => {
|
|
44240
44451
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
44241
44452
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
44242
44453
|
const merged = entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
@@ -44255,7 +44466,7 @@ var init_Form = __esm({
|
|
|
44255
44466
|
}
|
|
44256
44467
|
return normalized;
|
|
44257
44468
|
}, [entity, initialData]);
|
|
44258
|
-
const entityDerivedFields =
|
|
44469
|
+
const entityDerivedFields = React89__default.useMemo(() => {
|
|
44259
44470
|
if (fields && fields.length > 0) return void 0;
|
|
44260
44471
|
if (!resolvedEntity) return void 0;
|
|
44261
44472
|
return resolvedEntity.fields.map(
|
|
@@ -44276,16 +44487,16 @@ var init_Form = __esm({
|
|
|
44276
44487
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
44277
44488
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
44278
44489
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
44279
|
-
const [formData, setFormData] =
|
|
44490
|
+
const [formData, setFormData] = React89__default.useState(
|
|
44280
44491
|
normalizedInitialData
|
|
44281
44492
|
);
|
|
44282
|
-
const [collapsedSections, setCollapsedSections] =
|
|
44493
|
+
const [collapsedSections, setCollapsedSections] = React89__default.useState(
|
|
44283
44494
|
/* @__PURE__ */ new Set()
|
|
44284
44495
|
);
|
|
44285
|
-
const [submitError, setSubmitError] =
|
|
44286
|
-
const formRef =
|
|
44496
|
+
const [submitError, setSubmitError] = React89__default.useState(null);
|
|
44497
|
+
const formRef = React89__default.useRef(null);
|
|
44287
44498
|
const formMode = props.mode;
|
|
44288
|
-
const mountedRef =
|
|
44499
|
+
const mountedRef = React89__default.useRef(false);
|
|
44289
44500
|
if (!mountedRef.current) {
|
|
44290
44501
|
mountedRef.current = true;
|
|
44291
44502
|
debug("forms", "mount", {
|
|
@@ -44298,7 +44509,7 @@ var init_Form = __esm({
|
|
|
44298
44509
|
});
|
|
44299
44510
|
}
|
|
44300
44511
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
44301
|
-
const evalContext =
|
|
44512
|
+
const evalContext = React89__default.useMemo(
|
|
44302
44513
|
() => ({
|
|
44303
44514
|
formValues: formData,
|
|
44304
44515
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -44307,7 +44518,7 @@ var init_Form = __esm({
|
|
|
44307
44518
|
}),
|
|
44308
44519
|
[formData, externalContext]
|
|
44309
44520
|
);
|
|
44310
|
-
|
|
44521
|
+
React89__default.useEffect(() => {
|
|
44311
44522
|
debug("forms", "initialData-sync", {
|
|
44312
44523
|
mode: formMode,
|
|
44313
44524
|
normalizedInitialData,
|
|
@@ -44318,7 +44529,7 @@ var init_Form = __esm({
|
|
|
44318
44529
|
setFormData(normalizedInitialData);
|
|
44319
44530
|
}
|
|
44320
44531
|
}, [normalizedInitialData]);
|
|
44321
|
-
const processCalculations =
|
|
44532
|
+
const processCalculations = React89__default.useCallback(
|
|
44322
44533
|
(changedFieldId, newFormData) => {
|
|
44323
44534
|
if (!hiddenCalculations.length) return;
|
|
44324
44535
|
const context = {
|
|
@@ -44343,7 +44554,7 @@ var init_Form = __esm({
|
|
|
44343
44554
|
},
|
|
44344
44555
|
[hiddenCalculations, externalContext, eventBus]
|
|
44345
44556
|
);
|
|
44346
|
-
const checkViolations =
|
|
44557
|
+
const checkViolations = React89__default.useCallback(
|
|
44347
44558
|
(changedFieldId, newFormData) => {
|
|
44348
44559
|
if (!violationTriggers.length) return;
|
|
44349
44560
|
const context = {
|
|
@@ -44381,7 +44592,7 @@ var init_Form = __esm({
|
|
|
44381
44592
|
processCalculations(name, newFormData);
|
|
44382
44593
|
checkViolations(name, newFormData);
|
|
44383
44594
|
};
|
|
44384
|
-
const isFieldVisible =
|
|
44595
|
+
const isFieldVisible = React89__default.useCallback(
|
|
44385
44596
|
(fieldName2) => {
|
|
44386
44597
|
const condition = conditionalFields[fieldName2];
|
|
44387
44598
|
if (!condition) return true;
|
|
@@ -44389,7 +44600,7 @@ var init_Form = __esm({
|
|
|
44389
44600
|
},
|
|
44390
44601
|
[conditionalFields, evalContext]
|
|
44391
44602
|
);
|
|
44392
|
-
const isSectionVisible =
|
|
44603
|
+
const isSectionVisible = React89__default.useCallback(
|
|
44393
44604
|
(section) => {
|
|
44394
44605
|
if (!section.condition) return true;
|
|
44395
44606
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -44465,7 +44676,7 @@ var init_Form = __esm({
|
|
|
44465
44676
|
eventBus.emit(`UI:${onCancel}`);
|
|
44466
44677
|
}
|
|
44467
44678
|
};
|
|
44468
|
-
const renderField =
|
|
44679
|
+
const renderField = React89__default.useCallback(
|
|
44469
44680
|
(field) => {
|
|
44470
44681
|
const fieldName2 = field.name || field.field;
|
|
44471
44682
|
if (!fieldName2) return null;
|
|
@@ -44487,7 +44698,7 @@ var init_Form = __esm({
|
|
|
44487
44698
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
44488
44699
|
);
|
|
44489
44700
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
44490
|
-
const normalizedFields =
|
|
44701
|
+
const normalizedFields = React89__default.useMemo(() => {
|
|
44491
44702
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
44492
44703
|
return effectiveFields.map((field) => {
|
|
44493
44704
|
if (typeof field === "string") {
|
|
@@ -44522,7 +44733,7 @@ var init_Form = __esm({
|
|
|
44522
44733
|
};
|
|
44523
44734
|
});
|
|
44524
44735
|
}, [effectiveFields, resolvedEntity, fieldOverrides]);
|
|
44525
|
-
const schemaFields =
|
|
44736
|
+
const schemaFields = React89__default.useMemo(() => {
|
|
44526
44737
|
if (normalizedFields.length === 0) return null;
|
|
44527
44738
|
if (isDebugEnabled()) {
|
|
44528
44739
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -44532,7 +44743,7 @@ var init_Form = __esm({
|
|
|
44532
44743
|
}
|
|
44533
44744
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
44534
44745
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
44535
|
-
const sectionElements =
|
|
44746
|
+
const sectionElements = React89__default.useMemo(() => {
|
|
44536
44747
|
if (!sections || sections.length === 0) return null;
|
|
44537
44748
|
return sections.map((section) => {
|
|
44538
44749
|
if (!isSectionVisible(section)) {
|
|
@@ -45368,7 +45579,7 @@ var init_List = __esm({
|
|
|
45368
45579
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
45369
45580
|
return [];
|
|
45370
45581
|
}, [entity]);
|
|
45371
|
-
const getItemActions =
|
|
45582
|
+
const getItemActions = React89__default.useCallback(
|
|
45372
45583
|
(item) => {
|
|
45373
45584
|
if (!itemActions) return [];
|
|
45374
45585
|
if (typeof itemActions === "function") {
|
|
@@ -45850,7 +46061,7 @@ var init_MediaGallery = __esm({
|
|
|
45850
46061
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
45851
46062
|
);
|
|
45852
46063
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45853
|
-
const items =
|
|
46064
|
+
const items = React89__default.useMemo(() => {
|
|
45854
46065
|
if (propItems && propItems.length > 0) return propItems;
|
|
45855
46066
|
if (entityData.length === 0) return [];
|
|
45856
46067
|
return entityData.map((record, idx) => {
|
|
@@ -46015,7 +46226,7 @@ var init_MediaGallery = __esm({
|
|
|
46015
46226
|
}
|
|
46016
46227
|
});
|
|
46017
46228
|
function extractTitle2(children) {
|
|
46018
|
-
if (!
|
|
46229
|
+
if (!React89__default.isValidElement(children)) return void 0;
|
|
46019
46230
|
const props = children.props;
|
|
46020
46231
|
if (typeof props.title === "string") {
|
|
46021
46232
|
return props.title;
|
|
@@ -46270,7 +46481,7 @@ var init_debugRegistry = __esm({
|
|
|
46270
46481
|
}
|
|
46271
46482
|
});
|
|
46272
46483
|
function useDebugData() {
|
|
46273
|
-
const [data, setData] =
|
|
46484
|
+
const [data, setData] = React89.useState(() => ({
|
|
46274
46485
|
traits: [],
|
|
46275
46486
|
ticks: [],
|
|
46276
46487
|
guards: [],
|
|
@@ -46284,7 +46495,7 @@ function useDebugData() {
|
|
|
46284
46495
|
},
|
|
46285
46496
|
lastUpdate: Date.now()
|
|
46286
46497
|
}));
|
|
46287
|
-
|
|
46498
|
+
React89.useEffect(() => {
|
|
46288
46499
|
const updateData = () => {
|
|
46289
46500
|
setData({
|
|
46290
46501
|
traits: getAllTraits(),
|
|
@@ -46393,12 +46604,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
46393
46604
|
return positions;
|
|
46394
46605
|
}
|
|
46395
46606
|
function WalkMinimap() {
|
|
46396
|
-
const [walkStep, setWalkStep] =
|
|
46397
|
-
const [traits2, setTraits] =
|
|
46398
|
-
const [coveredEdges, setCoveredEdges] =
|
|
46399
|
-
const [completedTraits, setCompletedTraits] =
|
|
46400
|
-
const prevTraitRef =
|
|
46401
|
-
|
|
46607
|
+
const [walkStep, setWalkStep] = React89.useState(null);
|
|
46608
|
+
const [traits2, setTraits] = React89.useState([]);
|
|
46609
|
+
const [coveredEdges, setCoveredEdges] = React89.useState([]);
|
|
46610
|
+
const [completedTraits, setCompletedTraits] = React89.useState(/* @__PURE__ */ new Set());
|
|
46611
|
+
const prevTraitRef = React89.useRef(null);
|
|
46612
|
+
React89.useEffect(() => {
|
|
46402
46613
|
const interval = setInterval(() => {
|
|
46403
46614
|
const w = window;
|
|
46404
46615
|
const step = w.__orbitalWalkStep;
|
|
@@ -46834,15 +47045,15 @@ var init_EntitiesTab = __esm({
|
|
|
46834
47045
|
});
|
|
46835
47046
|
function EventFlowTab({ events: events2 }) {
|
|
46836
47047
|
const { t } = useTranslate();
|
|
46837
|
-
const [filter, setFilter] =
|
|
46838
|
-
const containerRef =
|
|
46839
|
-
const [autoScroll, setAutoScroll] =
|
|
46840
|
-
|
|
47048
|
+
const [filter, setFilter] = React89.useState("all");
|
|
47049
|
+
const containerRef = React89.useRef(null);
|
|
47050
|
+
const [autoScroll, setAutoScroll] = React89.useState(true);
|
|
47051
|
+
React89.useEffect(() => {
|
|
46841
47052
|
if (autoScroll && containerRef.current) {
|
|
46842
47053
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46843
47054
|
}
|
|
46844
47055
|
}, [events2.length, autoScroll]);
|
|
46845
|
-
const filteredEvents =
|
|
47056
|
+
const filteredEvents = React89.useMemo(() => {
|
|
46846
47057
|
if (filter === "all") return events2;
|
|
46847
47058
|
return events2.filter((e) => e.type === filter);
|
|
46848
47059
|
}, [events2, filter]);
|
|
@@ -46958,7 +47169,7 @@ var init_EventFlowTab = __esm({
|
|
|
46958
47169
|
});
|
|
46959
47170
|
function GuardsPanel({ guards }) {
|
|
46960
47171
|
const { t } = useTranslate();
|
|
46961
|
-
const [filter, setFilter] =
|
|
47172
|
+
const [filter, setFilter] = React89.useState("all");
|
|
46962
47173
|
if (guards.length === 0) {
|
|
46963
47174
|
return /* @__PURE__ */ jsx(
|
|
46964
47175
|
EmptyState,
|
|
@@ -46971,7 +47182,7 @@ function GuardsPanel({ guards }) {
|
|
|
46971
47182
|
}
|
|
46972
47183
|
const passedCount = guards.filter((g) => g.result).length;
|
|
46973
47184
|
const failedCount = guards.length - passedCount;
|
|
46974
|
-
const filteredGuards =
|
|
47185
|
+
const filteredGuards = React89.useMemo(() => {
|
|
46975
47186
|
if (filter === "all") return guards;
|
|
46976
47187
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
46977
47188
|
return guards.filter((g) => !g.result);
|
|
@@ -47134,10 +47345,10 @@ function EffectBadge({ effect }) {
|
|
|
47134
47345
|
}
|
|
47135
47346
|
function TransitionTimeline({ transitions }) {
|
|
47136
47347
|
const { t } = useTranslate();
|
|
47137
|
-
const containerRef =
|
|
47138
|
-
const [autoScroll, setAutoScroll] =
|
|
47139
|
-
const [expandedId, setExpandedId] =
|
|
47140
|
-
|
|
47348
|
+
const containerRef = React89.useRef(null);
|
|
47349
|
+
const [autoScroll, setAutoScroll] = React89.useState(true);
|
|
47350
|
+
const [expandedId, setExpandedId] = React89.useState(null);
|
|
47351
|
+
React89.useEffect(() => {
|
|
47141
47352
|
if (autoScroll && containerRef.current) {
|
|
47142
47353
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47143
47354
|
}
|
|
@@ -47417,9 +47628,9 @@ function getAllEvents(traits2) {
|
|
|
47417
47628
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
47418
47629
|
const eventBus = useEventBus();
|
|
47419
47630
|
const { t } = useTranslate();
|
|
47420
|
-
const [log13, setLog] =
|
|
47421
|
-
const prevStatesRef =
|
|
47422
|
-
|
|
47631
|
+
const [log13, setLog] = React89.useState([]);
|
|
47632
|
+
const prevStatesRef = React89.useRef(/* @__PURE__ */ new Map());
|
|
47633
|
+
React89.useEffect(() => {
|
|
47423
47634
|
for (const trait of traits2) {
|
|
47424
47635
|
const prev = prevStatesRef.current.get(trait.id);
|
|
47425
47636
|
if (prev && prev !== trait.currentState) {
|
|
@@ -47588,10 +47799,10 @@ function VerifyModePanel({
|
|
|
47588
47799
|
localCount
|
|
47589
47800
|
}) {
|
|
47590
47801
|
const { t } = useTranslate();
|
|
47591
|
-
const [expanded, setExpanded] =
|
|
47592
|
-
const scrollRef =
|
|
47593
|
-
const prevCountRef =
|
|
47594
|
-
|
|
47802
|
+
const [expanded, setExpanded] = React89.useState(true);
|
|
47803
|
+
const scrollRef = React89.useRef(null);
|
|
47804
|
+
const prevCountRef = React89.useRef(0);
|
|
47805
|
+
React89.useEffect(() => {
|
|
47595
47806
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
47596
47807
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
47597
47808
|
}
|
|
@@ -47648,10 +47859,10 @@ function RuntimeDebugger({
|
|
|
47648
47859
|
schema
|
|
47649
47860
|
}) {
|
|
47650
47861
|
const { t } = useTranslate();
|
|
47651
|
-
const [isCollapsed, setIsCollapsed] =
|
|
47652
|
-
const [isVisible, setIsVisible] =
|
|
47862
|
+
const [isCollapsed, setIsCollapsed] = React89.useState(mode === "verify" ? true : defaultCollapsed);
|
|
47863
|
+
const [isVisible, setIsVisible] = React89.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
47653
47864
|
const debugData = useDebugData();
|
|
47654
|
-
|
|
47865
|
+
React89.useEffect(() => {
|
|
47655
47866
|
if (mode === "inline") return;
|
|
47656
47867
|
return onDebugToggle((enabled) => {
|
|
47657
47868
|
setIsVisible(enabled);
|
|
@@ -47660,7 +47871,7 @@ function RuntimeDebugger({
|
|
|
47660
47871
|
}
|
|
47661
47872
|
});
|
|
47662
47873
|
}, [mode]);
|
|
47663
|
-
|
|
47874
|
+
React89.useEffect(() => {
|
|
47664
47875
|
if (mode === "inline") return;
|
|
47665
47876
|
const handleKeyDown = (e) => {
|
|
47666
47877
|
if (e.key === "`" && isVisible) {
|
|
@@ -48091,7 +48302,7 @@ var init_StatCard = __esm({
|
|
|
48091
48302
|
const labelToUse = propLabel ?? propTitle;
|
|
48092
48303
|
const eventBus = useEventBus();
|
|
48093
48304
|
const { t } = useTranslate();
|
|
48094
|
-
const handleActionClick =
|
|
48305
|
+
const handleActionClick = React89__default.useCallback(() => {
|
|
48095
48306
|
if (action?.event) {
|
|
48096
48307
|
eventBus.emit(`UI:${action.event}`, {});
|
|
48097
48308
|
}
|
|
@@ -48102,7 +48313,7 @@ var init_StatCard = __esm({
|
|
|
48102
48313
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
48103
48314
|
const isLoading = externalLoading ?? false;
|
|
48104
48315
|
const error = externalError;
|
|
48105
|
-
const computeMetricValue =
|
|
48316
|
+
const computeMetricValue = React89__default.useCallback(
|
|
48106
48317
|
(metric, items) => {
|
|
48107
48318
|
if (metric.value !== void 0) {
|
|
48108
48319
|
return metric.value;
|
|
@@ -48141,7 +48352,7 @@ var init_StatCard = __esm({
|
|
|
48141
48352
|
},
|
|
48142
48353
|
[]
|
|
48143
48354
|
);
|
|
48144
|
-
const schemaStats =
|
|
48355
|
+
const schemaStats = React89__default.useMemo(() => {
|
|
48145
48356
|
if (!metrics || metrics.length === 0) return null;
|
|
48146
48357
|
return metrics.map((metric) => ({
|
|
48147
48358
|
label: metric.label,
|
|
@@ -48149,7 +48360,7 @@ var init_StatCard = __esm({
|
|
|
48149
48360
|
format: metric.format
|
|
48150
48361
|
}));
|
|
48151
48362
|
}, [metrics, data, computeMetricValue]);
|
|
48152
|
-
const calculatedTrend =
|
|
48363
|
+
const calculatedTrend = React89__default.useMemo(() => {
|
|
48153
48364
|
if (manualTrend !== void 0) return manualTrend;
|
|
48154
48365
|
if (previousValue === void 0 || currentValue === void 0)
|
|
48155
48366
|
return void 0;
|
|
@@ -48789,8 +49000,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
48789
49000
|
] });
|
|
48790
49001
|
};
|
|
48791
49002
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
48792
|
-
const endRef =
|
|
48793
|
-
|
|
49003
|
+
const endRef = React89__default.useRef(null);
|
|
49004
|
+
React89__default.useEffect(() => {
|
|
48794
49005
|
if (!autoScroll) return;
|
|
48795
49006
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
48796
49007
|
}, [activities.length, autoScroll]);
|
|
@@ -48884,7 +49095,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
48884
49095
|
};
|
|
48885
49096
|
SubagentRichCard = ({ subagent }) => {
|
|
48886
49097
|
const { t } = useTranslate();
|
|
48887
|
-
const activities =
|
|
49098
|
+
const activities = React89__default.useMemo(
|
|
48888
49099
|
() => subagentMessagesToActivities(subagent.messages),
|
|
48889
49100
|
[subagent.messages]
|
|
48890
49101
|
);
|
|
@@ -48961,8 +49172,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
48961
49172
|
] });
|
|
48962
49173
|
};
|
|
48963
49174
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
48964
|
-
const endRef =
|
|
48965
|
-
|
|
49175
|
+
const endRef = React89__default.useRef(null);
|
|
49176
|
+
React89__default.useEffect(() => {
|
|
48966
49177
|
if (!autoScroll) return;
|
|
48967
49178
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
48968
49179
|
}, [messages.length, autoScroll]);
|
|
@@ -49397,7 +49608,7 @@ var init_Timeline = __esm({
|
|
|
49397
49608
|
}) => {
|
|
49398
49609
|
const { t } = useTranslate();
|
|
49399
49610
|
const entityData = entity ?? [];
|
|
49400
|
-
const items =
|
|
49611
|
+
const items = React89__default.useMemo(() => {
|
|
49401
49612
|
if (propItems) return propItems;
|
|
49402
49613
|
if (entityData.length === 0) return [];
|
|
49403
49614
|
return entityData.map((record, idx) => {
|
|
@@ -49499,7 +49710,7 @@ var init_Timeline = __esm({
|
|
|
49499
49710
|
}
|
|
49500
49711
|
});
|
|
49501
49712
|
function extractToastProps(children) {
|
|
49502
|
-
if (!
|
|
49713
|
+
if (!React89__default.isValidElement(children)) {
|
|
49503
49714
|
if (typeof children === "string") {
|
|
49504
49715
|
return { message: children };
|
|
49505
49716
|
}
|
|
@@ -49541,7 +49752,7 @@ var init_ToastSlot = __esm({
|
|
|
49541
49752
|
eventBus.emit(`${prefix}CLOSE`);
|
|
49542
49753
|
};
|
|
49543
49754
|
if (!isVisible) return null;
|
|
49544
|
-
const isCustomContent =
|
|
49755
|
+
const isCustomContent = React89__default.isValidElement(children) && !message;
|
|
49545
49756
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
49546
49757
|
Toast,
|
|
49547
49758
|
{
|
|
@@ -49609,6 +49820,7 @@ var init_component_registry_generated = __esm({
|
|
|
49609
49820
|
init_ChoiceButton();
|
|
49610
49821
|
init_CodeBlock();
|
|
49611
49822
|
init_CodeRunnerPanel();
|
|
49823
|
+
init_CommandPalette();
|
|
49612
49824
|
init_CommunityLinks();
|
|
49613
49825
|
init_ConditionalWrapper();
|
|
49614
49826
|
init_ConfettiEffect();
|
|
@@ -49883,6 +50095,7 @@ var init_component_registry_generated = __esm({
|
|
|
49883
50095
|
"ChoiceButton": ChoiceButton,
|
|
49884
50096
|
"CodeBlock": CodeBlock,
|
|
49885
50097
|
"CodeRunnerPanel": CodeRunnerPanel,
|
|
50098
|
+
"CommandPalette": CommandPalette,
|
|
49886
50099
|
"CommunityLinks": CommunityLinks,
|
|
49887
50100
|
"ConditionalWrapper": ConditionalWrapper,
|
|
49888
50101
|
"ConfettiEffect": ConfettiEffect,
|
|
@@ -50131,7 +50344,7 @@ function SuspenseConfigProvider({
|
|
|
50131
50344
|
config,
|
|
50132
50345
|
children
|
|
50133
50346
|
}) {
|
|
50134
|
-
return
|
|
50347
|
+
return React89__default.createElement(
|
|
50135
50348
|
SuspenseConfigContext.Provider,
|
|
50136
50349
|
{ value: config },
|
|
50137
50350
|
children
|
|
@@ -50179,7 +50392,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
50179
50392
|
}
|
|
50180
50393
|
return { name: field, label: humanizeFieldName(field) };
|
|
50181
50394
|
}
|
|
50182
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
50395
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React89__default.isValidElement(field) && !(field instanceof Date)) {
|
|
50183
50396
|
const obj = field;
|
|
50184
50397
|
const fieldName2 = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
50185
50398
|
if (!fieldName2) return field;
|
|
@@ -50232,7 +50445,7 @@ function enrichDetailFields(fields, entityDef) {
|
|
|
50232
50445
|
const meta = metaFor(field);
|
|
50233
50446
|
return meta ? { key: field, ...meta } : field;
|
|
50234
50447
|
}
|
|
50235
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
50448
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React89__default.isValidElement(field) && !(field instanceof Date)) {
|
|
50236
50449
|
const obj = field;
|
|
50237
50450
|
const fieldName2 = typeof obj.key === "string" ? obj.key : typeof obj.name === "string" ? obj.name : void 0;
|
|
50238
50451
|
if (!fieldName2 || obj.type) return field;
|
|
@@ -50691,7 +50904,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
50691
50904
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
50692
50905
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
50693
50906
|
}
|
|
50694
|
-
return /* @__PURE__ */ jsx(
|
|
50907
|
+
return /* @__PURE__ */ jsx(React89__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
50695
50908
|
}
|
|
50696
50909
|
if (!child || typeof child !== "object") return null;
|
|
50697
50910
|
const childId = `${parentId}-${index}`;
|
|
@@ -50748,7 +50961,7 @@ function isPatternConfig(value) {
|
|
|
50748
50961
|
if (value === null || value === void 0) return false;
|
|
50749
50962
|
if (typeof value !== "object") return false;
|
|
50750
50963
|
if (Array.isArray(value)) return false;
|
|
50751
|
-
if (
|
|
50964
|
+
if (React89__default.isValidElement(value)) return false;
|
|
50752
50965
|
if (value instanceof Date) return false;
|
|
50753
50966
|
if (typeof value === "function") return false;
|
|
50754
50967
|
const record = value;
|
|
@@ -50761,9 +50974,9 @@ function renderPatternValue(value) {
|
|
|
50761
50974
|
if (typeof value === "string") return renderPatternChildren(value, () => {
|
|
50762
50975
|
});
|
|
50763
50976
|
if (value instanceof Date) return value.toLocaleString();
|
|
50764
|
-
if (
|
|
50977
|
+
if (React89__default.isValidElement(value)) return value;
|
|
50765
50978
|
if (Array.isArray(value)) {
|
|
50766
|
-
return value.map((item, index) => /* @__PURE__ */ jsx(
|
|
50979
|
+
return value.map((item, index) => /* @__PURE__ */ jsx(React89__default.Fragment, { children: renderPatternValue(item) }, index));
|
|
50767
50980
|
}
|
|
50768
50981
|
if (isPatternConfig(value)) {
|
|
50769
50982
|
const { type, ...props } = value;
|
|
@@ -50773,7 +50986,7 @@ function renderPatternValue(value) {
|
|
|
50773
50986
|
return null;
|
|
50774
50987
|
}
|
|
50775
50988
|
function isPlainConfigObject(value) {
|
|
50776
|
-
if (
|
|
50989
|
+
if (React89__default.isValidElement(value)) return false;
|
|
50777
50990
|
if (value instanceof Date) return false;
|
|
50778
50991
|
const proto = Object.getPrototypeOf(value);
|
|
50779
50992
|
return proto === Object.prototype || proto === null;
|
|
@@ -50947,7 +51160,7 @@ function SlotContentRenderer({
|
|
|
50947
51160
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
50948
51161
|
const slotVal = restProps[slotKey];
|
|
50949
51162
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
50950
|
-
if (
|
|
51163
|
+
if (React89__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
50951
51164
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
50952
51165
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
50953
51166
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -51001,7 +51214,7 @@ function SlotContentRenderer({
|
|
|
51001
51214
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
51002
51215
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
51003
51216
|
const sample = resolvedItems[0];
|
|
51004
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
51217
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React89__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
51005
51218
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
51006
51219
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
51007
51220
|
}
|