@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/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React87 from 'react';
|
|
2
|
+
import React87__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useSyncExternalStore, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, RenderSlotProvider, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, CurrentPagePathProvider, NavStackProvider, OrbitalProvider, TraitScopeProvider, useNavStack, ServerBridgeProvider, useCurrentPagePath, useRenderSlot, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
@@ -927,7 +927,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
927
927
|
function isPlainObject(value) {
|
|
928
928
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
929
929
|
if (Array.isArray(value)) return false;
|
|
930
|
-
if (
|
|
930
|
+
if (React87__default.isValidElement(value)) return false;
|
|
931
931
|
if (value instanceof Date) return false;
|
|
932
932
|
if (typeof value === "function") return false;
|
|
933
933
|
return true;
|
|
@@ -936,7 +936,7 @@ function isEvaluatorResolvedData(value) {
|
|
|
936
936
|
return evaluatorResolvedData.has(value);
|
|
937
937
|
}
|
|
938
938
|
function brandResolved(value) {
|
|
939
|
-
if (value !== null && typeof value === "object" && !
|
|
939
|
+
if (value !== null && typeof value === "object" && !React87__default.isValidElement(value) && !(value instanceof Date)) {
|
|
940
940
|
resolvedMarkerFree.add(value);
|
|
941
941
|
}
|
|
942
942
|
}
|
|
@@ -969,7 +969,7 @@ function walkValue(value, scopeTrait, entity, config, state) {
|
|
|
969
969
|
}
|
|
970
970
|
const resolved = resolveMarkerExpression(value.expression, entity, config, state);
|
|
971
971
|
markerResolutionCache.set(value, { entity, config, state, resolved });
|
|
972
|
-
if (resolved !== null && typeof resolved === "object" && !
|
|
972
|
+
if (resolved !== null && typeof resolved === "object" && !React87__default.isValidElement(resolved) && !(resolved instanceof Date)) {
|
|
973
973
|
resolvedMarkerFree.add(resolved);
|
|
974
974
|
evaluatorResolvedData.add(resolved);
|
|
975
975
|
}
|
|
@@ -1156,7 +1156,7 @@ var init_Box = __esm({
|
|
|
1156
1156
|
fixed: "fixed",
|
|
1157
1157
|
sticky: "sticky"
|
|
1158
1158
|
};
|
|
1159
|
-
Box =
|
|
1159
|
+
Box = React87__default.forwardRef(
|
|
1160
1160
|
({
|
|
1161
1161
|
padding,
|
|
1162
1162
|
paddingX,
|
|
@@ -1221,7 +1221,7 @@ var init_Box = __esm({
|
|
|
1221
1221
|
onPointerDown?.(e);
|
|
1222
1222
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
1223
1223
|
const isClickable = action || onClick;
|
|
1224
|
-
return
|
|
1224
|
+
return React87__default.createElement(
|
|
1225
1225
|
Component,
|
|
1226
1226
|
{
|
|
1227
1227
|
ref,
|
|
@@ -1438,7 +1438,7 @@ var init_Icon = __esm({
|
|
|
1438
1438
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1439
1439
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1440
1440
|
const family = useIconFamily();
|
|
1441
|
-
const RenderedComponent =
|
|
1441
|
+
const RenderedComponent = React87__default.useMemo(() => {
|
|
1442
1442
|
if (directIcon) return null;
|
|
1443
1443
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1444
1444
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1567,7 +1567,7 @@ var init_atlasSlice = __esm({
|
|
|
1567
1567
|
}
|
|
1568
1568
|
});
|
|
1569
1569
|
function useAtlasSliceDataUrl(asset) {
|
|
1570
|
-
const [, bump] =
|
|
1570
|
+
const [, bump] = React87.useReducer((x) => x + 1, 0);
|
|
1571
1571
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1572
1572
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1573
1573
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1630,13 +1630,13 @@ function AtlasImage({
|
|
|
1630
1630
|
style,
|
|
1631
1631
|
"aria-hidden": ariaHidden
|
|
1632
1632
|
}) {
|
|
1633
|
-
const [, bump] =
|
|
1634
|
-
const canvasRef =
|
|
1633
|
+
const [, bump] = React87.useReducer((x) => x + 1, 0);
|
|
1634
|
+
const canvasRef = React87.useRef(null);
|
|
1635
1635
|
const sliced = isAtlasAsset(asset);
|
|
1636
1636
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1637
1637
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1638
1638
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1639
|
-
|
|
1639
|
+
React87.useEffect(() => {
|
|
1640
1640
|
const canvas = canvasRef.current;
|
|
1641
1641
|
if (!canvas || !img || !rect) return;
|
|
1642
1642
|
canvas.width = rect.sw;
|
|
@@ -1712,7 +1712,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1712
1712
|
const IconComp = value;
|
|
1713
1713
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1714
1714
|
}
|
|
1715
|
-
if (
|
|
1715
|
+
if (React87__default.isValidElement(value)) {
|
|
1716
1716
|
return value;
|
|
1717
1717
|
}
|
|
1718
1718
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1789,7 +1789,7 @@ var init_Button = __esm({
|
|
|
1789
1789
|
md: "h-icon-default w-icon-default",
|
|
1790
1790
|
lg: "h-icon-default w-icon-default"
|
|
1791
1791
|
};
|
|
1792
|
-
Button =
|
|
1792
|
+
Button = React87__default.forwardRef(
|
|
1793
1793
|
({
|
|
1794
1794
|
className,
|
|
1795
1795
|
variant = "primary",
|
|
@@ -1859,7 +1859,7 @@ var Dialog;
|
|
|
1859
1859
|
var init_Dialog = __esm({
|
|
1860
1860
|
"components/core/atoms/Dialog.tsx"() {
|
|
1861
1861
|
init_cn();
|
|
1862
|
-
Dialog =
|
|
1862
|
+
Dialog = React87__default.forwardRef(
|
|
1863
1863
|
({
|
|
1864
1864
|
role = "dialog",
|
|
1865
1865
|
"aria-modal": ariaModal = true,
|
|
@@ -2070,7 +2070,7 @@ var init_Typography = __esm({
|
|
|
2070
2070
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
2071
2071
|
body = formatValue(body, format);
|
|
2072
2072
|
}
|
|
2073
|
-
return
|
|
2073
|
+
return React87__default.createElement(
|
|
2074
2074
|
Component,
|
|
2075
2075
|
{
|
|
2076
2076
|
id,
|
|
@@ -2632,7 +2632,7 @@ var init_Badge = __esm({
|
|
|
2632
2632
|
md: "px-2.5 py-1 text-sm",
|
|
2633
2633
|
lg: "px-3 py-1.5 text-base"
|
|
2634
2634
|
};
|
|
2635
|
-
Badge =
|
|
2635
|
+
Badge = React87__default.forwardRef(
|
|
2636
2636
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2637
2637
|
const iconSizes3 = {
|
|
2638
2638
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2982,7 +2982,7 @@ var init_SvgFlow = __esm({
|
|
|
2982
2982
|
width = 100,
|
|
2983
2983
|
height = 100
|
|
2984
2984
|
}) => {
|
|
2985
|
-
const markerId =
|
|
2985
|
+
const markerId = React87__default.useMemo(() => {
|
|
2986
2986
|
flowIdCounter += 1;
|
|
2987
2987
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2988
2988
|
}, []);
|
|
@@ -3575,7 +3575,7 @@ var init_SvgRing = __esm({
|
|
|
3575
3575
|
width = 100,
|
|
3576
3576
|
height = 100
|
|
3577
3577
|
}) => {
|
|
3578
|
-
const gradientId =
|
|
3578
|
+
const gradientId = React87__default.useMemo(() => {
|
|
3579
3579
|
ringIdCounter += 1;
|
|
3580
3580
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3581
3581
|
}, []);
|
|
@@ -3756,7 +3756,7 @@ var init_Input = __esm({
|
|
|
3756
3756
|
init_cn();
|
|
3757
3757
|
init_Icon();
|
|
3758
3758
|
init_useEventBus();
|
|
3759
|
-
Input =
|
|
3759
|
+
Input = React87__default.forwardRef(
|
|
3760
3760
|
({
|
|
3761
3761
|
className,
|
|
3762
3762
|
inputType,
|
|
@@ -3780,9 +3780,9 @@ var init_Input = __esm({
|
|
|
3780
3780
|
const eventBus = useEventBus();
|
|
3781
3781
|
const type = inputType || htmlType || "text";
|
|
3782
3782
|
const isDeclarative = typeof onChange === "string";
|
|
3783
|
-
const [localValue, setLocalValue] =
|
|
3784
|
-
const pendingEchoRef =
|
|
3785
|
-
|
|
3783
|
+
const [localValue, setLocalValue] = React87__default.useState(value);
|
|
3784
|
+
const pendingEchoRef = React87__default.useRef(/* @__PURE__ */ new Set());
|
|
3785
|
+
React87__default.useEffect(() => {
|
|
3786
3786
|
if (!isDeclarative) return;
|
|
3787
3787
|
const incoming = value == null ? "" : String(value);
|
|
3788
3788
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -3949,7 +3949,7 @@ var Label;
|
|
|
3949
3949
|
var init_Label = __esm({
|
|
3950
3950
|
"components/core/atoms/Label.tsx"() {
|
|
3951
3951
|
init_cn();
|
|
3952
|
-
Label =
|
|
3952
|
+
Label = React87__default.forwardRef(
|
|
3953
3953
|
({ className, required, children, ...props }, ref) => {
|
|
3954
3954
|
return /* @__PURE__ */ jsxs(
|
|
3955
3955
|
"label",
|
|
@@ -3976,7 +3976,7 @@ var init_Textarea = __esm({
|
|
|
3976
3976
|
"components/core/atoms/Textarea.tsx"() {
|
|
3977
3977
|
init_cn();
|
|
3978
3978
|
init_useEventBus();
|
|
3979
|
-
Textarea =
|
|
3979
|
+
Textarea = React87__default.forwardRef(
|
|
3980
3980
|
({ className, error, onChange, ...props }, ref) => {
|
|
3981
3981
|
const eventBus = useEventBus();
|
|
3982
3982
|
const handleChange = (e) => {
|
|
@@ -4226,7 +4226,7 @@ var init_Select = __esm({
|
|
|
4226
4226
|
init_cn();
|
|
4227
4227
|
init_Icon();
|
|
4228
4228
|
init_useEventBus();
|
|
4229
|
-
Select =
|
|
4229
|
+
Select = React87__default.forwardRef(
|
|
4230
4230
|
(props, _ref) => {
|
|
4231
4231
|
const { multiple, searchable, clearable } = props;
|
|
4232
4232
|
if (multiple || searchable || clearable) {
|
|
@@ -4243,7 +4243,7 @@ var init_Checkbox = __esm({
|
|
|
4243
4243
|
"components/core/atoms/Checkbox.tsx"() {
|
|
4244
4244
|
init_cn();
|
|
4245
4245
|
init_useEventBus();
|
|
4246
|
-
Checkbox =
|
|
4246
|
+
Checkbox = React87__default.forwardRef(
|
|
4247
4247
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
4248
4248
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
4249
4249
|
const eventBus = useEventBus();
|
|
@@ -4297,7 +4297,7 @@ var init_Spinner = __esm({
|
|
|
4297
4297
|
md: "h-6 w-6",
|
|
4298
4298
|
lg: "h-8 w-8"
|
|
4299
4299
|
};
|
|
4300
|
-
Spinner =
|
|
4300
|
+
Spinner = React87__default.forwardRef(
|
|
4301
4301
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4302
4302
|
if (overlay) {
|
|
4303
4303
|
return /* @__PURE__ */ jsx(
|
|
@@ -4387,7 +4387,7 @@ var init_Card = __esm({
|
|
|
4387
4387
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4388
4388
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4389
4389
|
};
|
|
4390
|
-
Card =
|
|
4390
|
+
Card = React87__default.forwardRef(
|
|
4391
4391
|
({
|
|
4392
4392
|
className,
|
|
4393
4393
|
variant = "bordered",
|
|
@@ -4436,9 +4436,9 @@ var init_Card = __esm({
|
|
|
4436
4436
|
}
|
|
4437
4437
|
);
|
|
4438
4438
|
Card.displayName = "Card";
|
|
4439
|
-
CardHeader =
|
|
4439
|
+
CardHeader = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4440
4440
|
CardHeader.displayName = "CardHeader";
|
|
4441
|
-
CardTitle =
|
|
4441
|
+
CardTitle = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4442
4442
|
"h3",
|
|
4443
4443
|
{
|
|
4444
4444
|
ref,
|
|
@@ -4451,11 +4451,11 @@ var init_Card = __esm({
|
|
|
4451
4451
|
}
|
|
4452
4452
|
));
|
|
4453
4453
|
CardTitle.displayName = "CardTitle";
|
|
4454
|
-
CardContent =
|
|
4454
|
+
CardContent = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4455
4455
|
CardContent.displayName = "CardContent";
|
|
4456
4456
|
CardBody = CardContent;
|
|
4457
4457
|
CardBody.displayName = "CardBody";
|
|
4458
|
-
CardFooter =
|
|
4458
|
+
CardFooter = React87__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4459
4459
|
"div",
|
|
4460
4460
|
{
|
|
4461
4461
|
ref,
|
|
@@ -4542,7 +4542,7 @@ var init_FilterPill = __esm({
|
|
|
4542
4542
|
md: "w-3.5 h-3.5",
|
|
4543
4543
|
lg: "w-4 h-4"
|
|
4544
4544
|
};
|
|
4545
|
-
FilterPill =
|
|
4545
|
+
FilterPill = React87__default.forwardRef(
|
|
4546
4546
|
({
|
|
4547
4547
|
className,
|
|
4548
4548
|
variant = "default",
|
|
@@ -4671,8 +4671,8 @@ var init_Avatar = __esm({
|
|
|
4671
4671
|
actionPayload
|
|
4672
4672
|
}) => {
|
|
4673
4673
|
const eventBus = useEventBus();
|
|
4674
|
-
const [imgFailed, setImgFailed] =
|
|
4675
|
-
|
|
4674
|
+
const [imgFailed, setImgFailed] = React87__default.useState(false);
|
|
4675
|
+
React87__default.useEffect(() => {
|
|
4676
4676
|
setImgFailed(false);
|
|
4677
4677
|
}, [src]);
|
|
4678
4678
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4785,7 +4785,7 @@ var init_Center = __esm({
|
|
|
4785
4785
|
as: Component = "div"
|
|
4786
4786
|
}) => {
|
|
4787
4787
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4788
|
-
return
|
|
4788
|
+
return React87__default.createElement(Component, {
|
|
4789
4789
|
className: cn(
|
|
4790
4790
|
inline ? "inline-flex" : "flex",
|
|
4791
4791
|
horizontal && "justify-center",
|
|
@@ -5053,7 +5053,7 @@ var init_Radio = __esm({
|
|
|
5053
5053
|
md: "w-2.5 h-2.5",
|
|
5054
5054
|
lg: "w-3 h-3"
|
|
5055
5055
|
};
|
|
5056
|
-
Radio =
|
|
5056
|
+
Radio = React87__default.forwardRef(
|
|
5057
5057
|
({
|
|
5058
5058
|
label,
|
|
5059
5059
|
helperText,
|
|
@@ -5070,12 +5070,12 @@ var init_Radio = __esm({
|
|
|
5070
5070
|
onChange,
|
|
5071
5071
|
...props
|
|
5072
5072
|
}, ref) => {
|
|
5073
|
-
const reactId =
|
|
5073
|
+
const reactId = React87__default.useId();
|
|
5074
5074
|
const baseId = id || `radio-${reactId}`;
|
|
5075
5075
|
const hasError = !!error;
|
|
5076
5076
|
const eventBus = useEventBus();
|
|
5077
|
-
const [selected, setSelected] =
|
|
5078
|
-
|
|
5077
|
+
const [selected, setSelected] = React87__default.useState(value);
|
|
5078
|
+
React87__default.useEffect(() => {
|
|
5079
5079
|
if (value !== void 0) setSelected(value);
|
|
5080
5080
|
}, [value]);
|
|
5081
5081
|
const pick = (next, e) => {
|
|
@@ -5257,7 +5257,7 @@ var init_Switch = __esm({
|
|
|
5257
5257
|
"components/core/atoms/Switch.tsx"() {
|
|
5258
5258
|
"use client";
|
|
5259
5259
|
init_cn();
|
|
5260
|
-
Switch =
|
|
5260
|
+
Switch = React87.forwardRef(
|
|
5261
5261
|
({
|
|
5262
5262
|
checked,
|
|
5263
5263
|
defaultChecked = false,
|
|
@@ -5268,10 +5268,10 @@ var init_Switch = __esm({
|
|
|
5268
5268
|
name,
|
|
5269
5269
|
className
|
|
5270
5270
|
}, ref) => {
|
|
5271
|
-
const [isChecked, setIsChecked] =
|
|
5271
|
+
const [isChecked, setIsChecked] = React87.useState(
|
|
5272
5272
|
checked !== void 0 ? checked : defaultChecked
|
|
5273
5273
|
);
|
|
5274
|
-
|
|
5274
|
+
React87.useEffect(() => {
|
|
5275
5275
|
if (checked !== void 0) {
|
|
5276
5276
|
setIsChecked(checked);
|
|
5277
5277
|
}
|
|
@@ -5434,7 +5434,7 @@ var init_Stack = __esm({
|
|
|
5434
5434
|
};
|
|
5435
5435
|
const isHorizontal = direction === "horizontal";
|
|
5436
5436
|
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";
|
|
5437
|
-
return
|
|
5437
|
+
return React87__default.createElement(
|
|
5438
5438
|
Component,
|
|
5439
5439
|
{
|
|
5440
5440
|
className: cn(
|
|
@@ -5634,7 +5634,7 @@ var Aside;
|
|
|
5634
5634
|
var init_Aside = __esm({
|
|
5635
5635
|
"components/core/atoms/Aside.tsx"() {
|
|
5636
5636
|
init_cn();
|
|
5637
|
-
Aside =
|
|
5637
|
+
Aside = React87__default.forwardRef(
|
|
5638
5638
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5639
5639
|
);
|
|
5640
5640
|
Aside.displayName = "Aside";
|
|
@@ -5713,9 +5713,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5713
5713
|
className
|
|
5714
5714
|
}) => {
|
|
5715
5715
|
const { t } = useTranslate();
|
|
5716
|
-
const [isVisible, setIsVisible] =
|
|
5717
|
-
const timeoutRef =
|
|
5718
|
-
const triggerRef =
|
|
5716
|
+
const [isVisible, setIsVisible] = React87__default.useState(false);
|
|
5717
|
+
const timeoutRef = React87__default.useRef(null);
|
|
5718
|
+
const triggerRef = React87__default.useRef(null);
|
|
5719
5719
|
const handleMouseEnter = () => {
|
|
5720
5720
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5721
5721
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5726,7 +5726,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5726
5726
|
};
|
|
5727
5727
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5728
5728
|
const open = isVisible || revealed;
|
|
5729
|
-
|
|
5729
|
+
React87__default.useEffect(() => {
|
|
5730
5730
|
return () => {
|
|
5731
5731
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5732
5732
|
};
|
|
@@ -5936,7 +5936,7 @@ var init_StatusDot = __esm({
|
|
|
5936
5936
|
md: "w-2.5 h-2.5",
|
|
5937
5937
|
lg: "w-3 h-3"
|
|
5938
5938
|
};
|
|
5939
|
-
StatusDot =
|
|
5939
|
+
StatusDot = React87__default.forwardRef(
|
|
5940
5940
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5941
5941
|
return /* @__PURE__ */ jsx(
|
|
5942
5942
|
"span",
|
|
@@ -5990,7 +5990,7 @@ var init_TrendIndicator = __esm({
|
|
|
5990
5990
|
down: "trending-down",
|
|
5991
5991
|
flat: "arrow-right"
|
|
5992
5992
|
};
|
|
5993
|
-
TrendIndicator =
|
|
5993
|
+
TrendIndicator = React87__default.forwardRef(
|
|
5994
5994
|
({
|
|
5995
5995
|
className,
|
|
5996
5996
|
value,
|
|
@@ -6059,7 +6059,7 @@ var init_RangeSlider = __esm({
|
|
|
6059
6059
|
md: "w-4 h-4",
|
|
6060
6060
|
lg: "w-5 h-5"
|
|
6061
6061
|
};
|
|
6062
|
-
RangeSlider =
|
|
6062
|
+
RangeSlider = React87__default.forwardRef(
|
|
6063
6063
|
({
|
|
6064
6064
|
className,
|
|
6065
6065
|
min = 0,
|
|
@@ -6681,7 +6681,7 @@ var init_ContentSection = __esm({
|
|
|
6681
6681
|
md: "py-16",
|
|
6682
6682
|
lg: "py-24"
|
|
6683
6683
|
};
|
|
6684
|
-
ContentSection =
|
|
6684
|
+
ContentSection = React87__default.forwardRef(
|
|
6685
6685
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6686
6686
|
return /* @__PURE__ */ jsx(
|
|
6687
6687
|
Box,
|
|
@@ -7215,7 +7215,7 @@ var init_AnimatedReveal = __esm({
|
|
|
7215
7215
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
7216
7216
|
"none": {}
|
|
7217
7217
|
};
|
|
7218
|
-
AnimatedReveal =
|
|
7218
|
+
AnimatedReveal = React87__default.forwardRef(
|
|
7219
7219
|
({
|
|
7220
7220
|
trigger = "scroll",
|
|
7221
7221
|
animation = "fade-up",
|
|
@@ -7375,7 +7375,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7375
7375
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7376
7376
|
"use client";
|
|
7377
7377
|
init_cn();
|
|
7378
|
-
AnimatedGraphic =
|
|
7378
|
+
AnimatedGraphic = React87__default.forwardRef(
|
|
7379
7379
|
({
|
|
7380
7380
|
src,
|
|
7381
7381
|
svgContent,
|
|
@@ -7398,7 +7398,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7398
7398
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7399
7399
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7400
7400
|
const prevAnimateRef = useRef(animate);
|
|
7401
|
-
const setRef =
|
|
7401
|
+
const setRef = React87__default.useCallback(
|
|
7402
7402
|
(node) => {
|
|
7403
7403
|
containerRef.current = node;
|
|
7404
7404
|
if (typeof ref === "function") ref(node);
|
|
@@ -8150,9 +8150,9 @@ function ControlButton({
|
|
|
8150
8150
|
className
|
|
8151
8151
|
}) {
|
|
8152
8152
|
const eventBus = useEventBus();
|
|
8153
|
-
const [isPressed, setIsPressed] =
|
|
8153
|
+
const [isPressed, setIsPressed] = React87.useState(false);
|
|
8154
8154
|
const actualPressed = pressed ?? isPressed;
|
|
8155
|
-
const handlePointerDown =
|
|
8155
|
+
const handlePointerDown = React87.useCallback(
|
|
8156
8156
|
(e) => {
|
|
8157
8157
|
e.preventDefault();
|
|
8158
8158
|
if (disabled) return;
|
|
@@ -8162,7 +8162,7 @@ function ControlButton({
|
|
|
8162
8162
|
},
|
|
8163
8163
|
[disabled, pressEvent, eventBus, onPress]
|
|
8164
8164
|
);
|
|
8165
|
-
const handlePointerUp =
|
|
8165
|
+
const handlePointerUp = React87.useCallback(
|
|
8166
8166
|
(e) => {
|
|
8167
8167
|
e.preventDefault();
|
|
8168
8168
|
if (disabled) return;
|
|
@@ -8172,7 +8172,7 @@ function ControlButton({
|
|
|
8172
8172
|
},
|
|
8173
8173
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8174
8174
|
);
|
|
8175
|
-
const handlePointerLeave =
|
|
8175
|
+
const handlePointerLeave = React87.useCallback(
|
|
8176
8176
|
(e) => {
|
|
8177
8177
|
if (isPressed) {
|
|
8178
8178
|
setIsPressed(false);
|
|
@@ -8431,18 +8431,18 @@ function ControlGrid({
|
|
|
8431
8431
|
className
|
|
8432
8432
|
}) {
|
|
8433
8433
|
const eventBus = useEventBus();
|
|
8434
|
-
const [active, setActive] =
|
|
8435
|
-
const [coarse, setCoarse] =
|
|
8434
|
+
const [active, setActive] = React87.useState(/* @__PURE__ */ new Set());
|
|
8435
|
+
const [coarse, setCoarse] = React87.useState(
|
|
8436
8436
|
() => typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches
|
|
8437
8437
|
);
|
|
8438
|
-
|
|
8438
|
+
React87.useEffect(() => {
|
|
8439
8439
|
if (visibility !== "auto" || typeof window === "undefined") return;
|
|
8440
8440
|
const mq = window.matchMedia("(pointer: coarse)");
|
|
8441
8441
|
const onChange = (e) => setCoarse(e.matches);
|
|
8442
8442
|
mq.addEventListener("change", onChange);
|
|
8443
8443
|
return () => mq.removeEventListener("change", onChange);
|
|
8444
8444
|
}, [visibility]);
|
|
8445
|
-
const handlePress =
|
|
8445
|
+
const handlePress = React87.useCallback(
|
|
8446
8446
|
(id) => {
|
|
8447
8447
|
setActive((prev) => new Set(prev).add(id));
|
|
8448
8448
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8456,7 +8456,7 @@ function ControlGrid({
|
|
|
8456
8456
|
},
|
|
8457
8457
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8458
8458
|
);
|
|
8459
|
-
const handleRelease =
|
|
8459
|
+
const handleRelease = React87.useCallback(
|
|
8460
8460
|
(id) => {
|
|
8461
8461
|
setActive((prev) => {
|
|
8462
8462
|
const next = new Set(prev);
|
|
@@ -8819,7 +8819,7 @@ function GameMenu({
|
|
|
8819
8819
|
}) {
|
|
8820
8820
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8821
8821
|
const eventBus = useEventBus();
|
|
8822
|
-
const handleOptionClick =
|
|
8822
|
+
const handleOptionClick = React87.useCallback(
|
|
8823
8823
|
(option) => {
|
|
8824
8824
|
if (option.event) {
|
|
8825
8825
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -9055,7 +9055,7 @@ function StateGraph({
|
|
|
9055
9055
|
}) {
|
|
9056
9056
|
const eventBus = useEventBus();
|
|
9057
9057
|
const nodes = states ?? [];
|
|
9058
|
-
const positions =
|
|
9058
|
+
const positions = React87.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
9059
9059
|
return /* @__PURE__ */ jsxs(
|
|
9060
9060
|
Box,
|
|
9061
9061
|
{
|
|
@@ -9126,8 +9126,8 @@ function MiniMap({
|
|
|
9126
9126
|
tileAssets,
|
|
9127
9127
|
unitAssets
|
|
9128
9128
|
}) {
|
|
9129
|
-
const canvasRef =
|
|
9130
|
-
const imgCacheRef =
|
|
9129
|
+
const canvasRef = React87.useRef(null);
|
|
9130
|
+
const imgCacheRef = React87.useRef(/* @__PURE__ */ new Map());
|
|
9131
9131
|
function loadImg(url) {
|
|
9132
9132
|
const cached = imgCacheRef.current.get(url);
|
|
9133
9133
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -9143,7 +9143,7 @@ function MiniMap({
|
|
|
9143
9143
|
imgCacheRef.current.set(url, img);
|
|
9144
9144
|
return null;
|
|
9145
9145
|
}
|
|
9146
|
-
|
|
9146
|
+
React87.useEffect(() => {
|
|
9147
9147
|
const canvas = canvasRef.current;
|
|
9148
9148
|
if (!canvas) return;
|
|
9149
9149
|
const ctx = canvas.getContext("2d");
|
|
@@ -10503,7 +10503,7 @@ function Canvas2D({
|
|
|
10503
10503
|
const registerChildDrawable = useCallback((node) => {
|
|
10504
10504
|
childDrawablesRef.current.push(node);
|
|
10505
10505
|
}, []);
|
|
10506
|
-
const hasJsxChildren =
|
|
10506
|
+
const hasJsxChildren = React87.Children.count(children) > 0;
|
|
10507
10507
|
function isDrawableLayer(node) {
|
|
10508
10508
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
10509
10509
|
}
|
|
@@ -11061,7 +11061,7 @@ function Canvas({
|
|
|
11061
11061
|
if (mode !== "3d") return;
|
|
11062
11062
|
const next = childDrawablesRef.current;
|
|
11063
11063
|
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
11064
|
-
if (next.length === 0 &&
|
|
11064
|
+
if (next.length === 0 && React87.Children.count(children) > 0) return;
|
|
11065
11065
|
setChildDrawables(
|
|
11066
11066
|
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
11067
11067
|
);
|
|
@@ -11099,7 +11099,7 @@ function Canvas({
|
|
|
11099
11099
|
};
|
|
11100
11100
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11101
11101
|
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
11102
|
-
|
|
11102
|
+
React87.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 }) })
|
|
11103
11103
|
] });
|
|
11104
11104
|
}
|
|
11105
11105
|
return /* @__PURE__ */ jsx(
|
|
@@ -11257,7 +11257,7 @@ function LinearView({
|
|
|
11257
11257
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
11258
11258
|
const isDone = i < currentIdx;
|
|
11259
11259
|
const isCurrent = i === currentIdx;
|
|
11260
|
-
return /* @__PURE__ */ jsxs(
|
|
11260
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
11261
11261
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11262
11262
|
Typography,
|
|
11263
11263
|
{
|
|
@@ -11792,7 +11792,7 @@ function SequenceBar({
|
|
|
11792
11792
|
else onSlotRemove?.(index);
|
|
11793
11793
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
11794
11794
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
11795
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
11795
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
11796
11796
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11797
11797
|
Typography,
|
|
11798
11798
|
{
|
|
@@ -12639,7 +12639,7 @@ var init_ErrorBoundary = __esm({
|
|
|
12639
12639
|
}
|
|
12640
12640
|
);
|
|
12641
12641
|
};
|
|
12642
|
-
ErrorBoundary = class extends
|
|
12642
|
+
ErrorBoundary = class extends React87__default.Component {
|
|
12643
12643
|
constructor(props) {
|
|
12644
12644
|
super(props);
|
|
12645
12645
|
__publicField(this, "reset", () => {
|
|
@@ -12908,7 +12908,7 @@ var init_Container = __esm({
|
|
|
12908
12908
|
as: Component = "div"
|
|
12909
12909
|
}) => {
|
|
12910
12910
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
12911
|
-
return
|
|
12911
|
+
return React87__default.createElement(
|
|
12912
12912
|
Component,
|
|
12913
12913
|
{
|
|
12914
12914
|
className: cn(
|
|
@@ -17161,7 +17161,7 @@ function useLanguageReady(language) {
|
|
|
17161
17161
|
}, [language]);
|
|
17162
17162
|
return ready;
|
|
17163
17163
|
}
|
|
17164
|
-
var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
17164
|
+
var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, HIGHLIGHT_CAPACITY_BYTES, CodeBlock;
|
|
17165
17165
|
var init_CodeBlock = __esm({
|
|
17166
17166
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
17167
17167
|
init_cn();
|
|
@@ -17394,7 +17394,8 @@ var init_CodeBlock = __esm({
|
|
|
17394
17394
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17395
17395
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17396
17396
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17397
|
-
|
|
17397
|
+
HIGHLIGHT_CAPACITY_BYTES = 512 * 1024;
|
|
17398
|
+
CodeBlock = React87__default.memo(
|
|
17398
17399
|
({
|
|
17399
17400
|
code: rawCode,
|
|
17400
17401
|
language = "text",
|
|
@@ -17424,6 +17425,8 @@ var init_CodeBlock = __esm({
|
|
|
17424
17425
|
const isOrb = language === "orb";
|
|
17425
17426
|
const isLolo = language === "lolo";
|
|
17426
17427
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
17428
|
+
const overCapacity = code.length > HIGHLIGHT_CAPACITY_BYTES;
|
|
17429
|
+
const plainCodeColor = activeStyle['code[class*="language-"]']?.color ?? "#d4d4d4";
|
|
17427
17430
|
const languageReady = useLanguageReady(language);
|
|
17428
17431
|
const eventBus = useEventBus();
|
|
17429
17432
|
const { t } = useTranslate();
|
|
@@ -17490,8 +17493,8 @@ var init_CodeBlock = __esm({
|
|
|
17490
17493
|
const isFoldable = foldableProp ?? true;
|
|
17491
17494
|
const [collapsed, setCollapsed] = useState(() => /* @__PURE__ */ new Set());
|
|
17492
17495
|
const foldRegions = useMemo(
|
|
17493
|
-
() => isFoldable ? computeFoldRegions(code) : [],
|
|
17494
|
-
[code, isFoldable]
|
|
17496
|
+
() => isFoldable && !overCapacity ? computeFoldRegions(code) : [],
|
|
17497
|
+
[code, isFoldable, overCapacity]
|
|
17495
17498
|
);
|
|
17496
17499
|
const foldStartMap = useMemo(() => {
|
|
17497
17500
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -17525,8 +17528,67 @@ var init_CodeBlock = __esm({
|
|
|
17525
17528
|
useEffect(() => {
|
|
17526
17529
|
setCollapsed(/* @__PURE__ */ new Set());
|
|
17527
17530
|
}, [code]);
|
|
17531
|
+
const editableOverCapacity = editableValue.length > HIGHLIGHT_CAPACITY_BYTES;
|
|
17532
|
+
const editableHighlightedElement = useMemo(
|
|
17533
|
+
() => editableOverCapacity ? /* @__PURE__ */ jsx(
|
|
17534
|
+
"div",
|
|
17535
|
+
{
|
|
17536
|
+
style: {
|
|
17537
|
+
padding: "1rem",
|
|
17538
|
+
margin: 0,
|
|
17539
|
+
whiteSpace: "pre",
|
|
17540
|
+
minWidth: "100%",
|
|
17541
|
+
color: plainCodeColor,
|
|
17542
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17543
|
+
fontSize: "13px",
|
|
17544
|
+
lineHeight: "1.5"
|
|
17545
|
+
},
|
|
17546
|
+
children: editableValue || " "
|
|
17547
|
+
}
|
|
17548
|
+
) : /* @__PURE__ */ jsx(
|
|
17549
|
+
SyntaxHighlighter,
|
|
17550
|
+
{
|
|
17551
|
+
PreTag: "div",
|
|
17552
|
+
language,
|
|
17553
|
+
style: activeStyle,
|
|
17554
|
+
wrapLines: errorLines && errorLines.size > 0,
|
|
17555
|
+
lineProps: errorLineProps,
|
|
17556
|
+
customStyle: {
|
|
17557
|
+
backgroundColor: "transparent",
|
|
17558
|
+
borderRadius: 0,
|
|
17559
|
+
padding: "1rem",
|
|
17560
|
+
margin: 0,
|
|
17561
|
+
whiteSpace: "pre",
|
|
17562
|
+
minWidth: "100%",
|
|
17563
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17564
|
+
fontSize: "13px",
|
|
17565
|
+
lineHeight: "1.5"
|
|
17566
|
+
},
|
|
17567
|
+
codeTagProps: {
|
|
17568
|
+
style: {
|
|
17569
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17570
|
+
fontSize: "13px",
|
|
17571
|
+
lineHeight: "1.5"
|
|
17572
|
+
}
|
|
17573
|
+
},
|
|
17574
|
+
children: editableValue || " "
|
|
17575
|
+
}
|
|
17576
|
+
),
|
|
17577
|
+
[editableValue, editableOverCapacity, plainCodeColor, language, activeStyle, errorLines, errorLineProps, languageReady]
|
|
17578
|
+
);
|
|
17528
17579
|
const highlightedElement = useMemo(
|
|
17529
|
-
() => /* @__PURE__ */ jsx(
|
|
17580
|
+
() => overCapacity ? /* @__PURE__ */ jsx(
|
|
17581
|
+
"div",
|
|
17582
|
+
{
|
|
17583
|
+
style: {
|
|
17584
|
+
margin: 0,
|
|
17585
|
+
whiteSpace: "pre",
|
|
17586
|
+
minWidth: "100%",
|
|
17587
|
+
color: plainCodeColor
|
|
17588
|
+
},
|
|
17589
|
+
children: code
|
|
17590
|
+
}
|
|
17591
|
+
) : /* @__PURE__ */ jsx(
|
|
17530
17592
|
SyntaxHighlighter,
|
|
17531
17593
|
{
|
|
17532
17594
|
PreTag: "div",
|
|
@@ -17548,7 +17610,7 @@ var init_CodeBlock = __esm({
|
|
|
17548
17610
|
children: code
|
|
17549
17611
|
}
|
|
17550
17612
|
),
|
|
17551
|
-
[code, language, activeStyle, languageReady]
|
|
17613
|
+
[code, overCapacity, plainCodeColor, language, activeStyle, languageReady]
|
|
17552
17614
|
);
|
|
17553
17615
|
useLayoutEffect(() => {
|
|
17554
17616
|
const container = codeRef.current;
|
|
@@ -17877,35 +17939,7 @@ var init_CodeBlock = __esm({
|
|
|
17877
17939
|
overflow: "hidden",
|
|
17878
17940
|
pointerEvents: "none"
|
|
17879
17941
|
},
|
|
17880
|
-
children:
|
|
17881
|
-
SyntaxHighlighter,
|
|
17882
|
-
{
|
|
17883
|
-
PreTag: "div",
|
|
17884
|
-
language,
|
|
17885
|
-
style: activeStyle,
|
|
17886
|
-
wrapLines: errorLines && errorLines.size > 0,
|
|
17887
|
-
lineProps: errorLineProps,
|
|
17888
|
-
customStyle: {
|
|
17889
|
-
backgroundColor: "transparent",
|
|
17890
|
-
borderRadius: 0,
|
|
17891
|
-
padding: "1rem",
|
|
17892
|
-
margin: 0,
|
|
17893
|
-
whiteSpace: "pre",
|
|
17894
|
-
minWidth: "100%",
|
|
17895
|
-
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17896
|
-
fontSize: "13px",
|
|
17897
|
-
lineHeight: "1.5"
|
|
17898
|
-
},
|
|
17899
|
-
codeTagProps: {
|
|
17900
|
-
style: {
|
|
17901
|
-
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Courier New", monospace',
|
|
17902
|
-
fontSize: "13px",
|
|
17903
|
-
lineHeight: "1.5"
|
|
17904
|
-
}
|
|
17905
|
-
},
|
|
17906
|
-
children: editableValue || " "
|
|
17907
|
-
}
|
|
17908
|
-
)
|
|
17942
|
+
children: editableHighlightedElement
|
|
17909
17943
|
}
|
|
17910
17944
|
),
|
|
17911
17945
|
/* @__PURE__ */ jsx(
|
|
@@ -17989,7 +18023,7 @@ var init_MermaidDiagram = __esm({
|
|
|
17989
18023
|
init_CodeBlock();
|
|
17990
18024
|
init_cn();
|
|
17991
18025
|
mermaidModule = null;
|
|
17992
|
-
MermaidDiagram =
|
|
18026
|
+
MermaidDiagram = React87__default.memo(
|
|
17993
18027
|
({ code, className }) => {
|
|
17994
18028
|
const { resolvedMode } = useTheme();
|
|
17995
18029
|
const containerRef = useRef(null);
|
|
@@ -18047,7 +18081,7 @@ var init_MarkdownContent = __esm({
|
|
|
18047
18081
|
init_CodeBlock();
|
|
18048
18082
|
init_MermaidDiagram();
|
|
18049
18083
|
init_cn();
|
|
18050
|
-
MarkdownContent =
|
|
18084
|
+
MarkdownContent = React87__default.memo(
|
|
18051
18085
|
({ content, direction = "ltr", className }) => {
|
|
18052
18086
|
const { t: _t } = useTranslate();
|
|
18053
18087
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -19327,7 +19361,7 @@ var init_StateMachineView = __esm({
|
|
|
19327
19361
|
style: { top: title ? 30 : 0 },
|
|
19328
19362
|
children: [
|
|
19329
19363
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19330
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19364
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React87__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19331
19365
|
StateNode2,
|
|
19332
19366
|
{
|
|
19333
19367
|
state,
|
|
@@ -24174,6 +24208,183 @@ var init_CodeRunnerPanel = __esm({
|
|
|
24174
24208
|
CodeRunnerPanel.displayName = "CodeRunnerPanel";
|
|
24175
24209
|
}
|
|
24176
24210
|
});
|
|
24211
|
+
function matchesQuery(query, text) {
|
|
24212
|
+
if (!query) return true;
|
|
24213
|
+
let qi = 0;
|
|
24214
|
+
const q = query.toLowerCase();
|
|
24215
|
+
const t = text.toLowerCase();
|
|
24216
|
+
for (let ti = 0; ti < t.length && qi < q.length; ti++) {
|
|
24217
|
+
if (t[ti] === q[qi]) qi++;
|
|
24218
|
+
}
|
|
24219
|
+
return qi === q.length;
|
|
24220
|
+
}
|
|
24221
|
+
function commandMatches(command, query) {
|
|
24222
|
+
if (!query) return true;
|
|
24223
|
+
if (matchesQuery(query, command.label)) return true;
|
|
24224
|
+
return (command.keywords ?? []).some((keyword) => matchesQuery(query, keyword));
|
|
24225
|
+
}
|
|
24226
|
+
var UNGROUPED, CommandPalette;
|
|
24227
|
+
var init_CommandPalette = __esm({
|
|
24228
|
+
"components/core/molecules/CommandPalette.tsx"() {
|
|
24229
|
+
"use client";
|
|
24230
|
+
init_Box();
|
|
24231
|
+
init_Stack();
|
|
24232
|
+
init_Typography();
|
|
24233
|
+
init_Icon();
|
|
24234
|
+
init_Input();
|
|
24235
|
+
init_Badge();
|
|
24236
|
+
init_cn();
|
|
24237
|
+
init_useEventBus();
|
|
24238
|
+
init_Modal();
|
|
24239
|
+
UNGROUPED = /* @__PURE__ */ Symbol("command-palette-ungrouped");
|
|
24240
|
+
CommandPalette = ({
|
|
24241
|
+
open,
|
|
24242
|
+
onOpenChange,
|
|
24243
|
+
commands,
|
|
24244
|
+
onSelect,
|
|
24245
|
+
placeholder = "Type a command...",
|
|
24246
|
+
emptyLabel = "No matching commands",
|
|
24247
|
+
className
|
|
24248
|
+
}) => {
|
|
24249
|
+
const eventBus = useEventBus();
|
|
24250
|
+
const [query, setQuery] = useState("");
|
|
24251
|
+
const [highlightIndex, setHighlightIndex] = useState(0);
|
|
24252
|
+
const filtered = useMemo(
|
|
24253
|
+
() => commands.filter((command) => commandMatches(command, query)),
|
|
24254
|
+
[commands, query]
|
|
24255
|
+
);
|
|
24256
|
+
const groups = useMemo(() => {
|
|
24257
|
+
const order = [];
|
|
24258
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
24259
|
+
for (const command of filtered) {
|
|
24260
|
+
const key = command.group ?? UNGROUPED;
|
|
24261
|
+
if (!byGroup.has(key)) {
|
|
24262
|
+
byGroup.set(key, []);
|
|
24263
|
+
order.push(key);
|
|
24264
|
+
}
|
|
24265
|
+
byGroup.get(key).push(command);
|
|
24266
|
+
}
|
|
24267
|
+
return order.map((key) => ({ group: key === UNGROUPED ? void 0 : key, items: byGroup.get(key) }));
|
|
24268
|
+
}, [filtered]);
|
|
24269
|
+
const resetQuery = useCallback(() => {
|
|
24270
|
+
setQuery("");
|
|
24271
|
+
setHighlightIndex(0);
|
|
24272
|
+
}, []);
|
|
24273
|
+
const handleClose = useCallback(() => {
|
|
24274
|
+
resetQuery();
|
|
24275
|
+
onOpenChange(false);
|
|
24276
|
+
}, [onOpenChange, resetQuery]);
|
|
24277
|
+
const handleSelect = useCallback(
|
|
24278
|
+
(command) => {
|
|
24279
|
+
if (command.disabled) return;
|
|
24280
|
+
if (command.event) eventBus.emit(`UI:${command.event}`, { commandId: command.id });
|
|
24281
|
+
if (command.action) eventBus.emit(`UI:${command.action}`, command.actionPayload ?? {});
|
|
24282
|
+
onSelect?.(command);
|
|
24283
|
+
handleClose();
|
|
24284
|
+
},
|
|
24285
|
+
[eventBus, onSelect, handleClose]
|
|
24286
|
+
);
|
|
24287
|
+
const handleQueryChange = useCallback((e) => {
|
|
24288
|
+
setQuery(e.target.value);
|
|
24289
|
+
setHighlightIndex(0);
|
|
24290
|
+
}, []);
|
|
24291
|
+
const handleKeyDown = useCallback(
|
|
24292
|
+
(e) => {
|
|
24293
|
+
if (filtered.length === 0) return;
|
|
24294
|
+
if (e.key === "ArrowDown") {
|
|
24295
|
+
e.preventDefault();
|
|
24296
|
+
setHighlightIndex((prev) => prev < filtered.length - 1 ? prev + 1 : 0);
|
|
24297
|
+
} else if (e.key === "ArrowUp") {
|
|
24298
|
+
e.preventDefault();
|
|
24299
|
+
setHighlightIndex((prev) => prev > 0 ? prev - 1 : filtered.length - 1);
|
|
24300
|
+
} else if (e.key === "Enter") {
|
|
24301
|
+
e.preventDefault();
|
|
24302
|
+
const command = filtered[highlightIndex];
|
|
24303
|
+
if (command) handleSelect(command);
|
|
24304
|
+
}
|
|
24305
|
+
},
|
|
24306
|
+
[filtered, highlightIndex, handleSelect]
|
|
24307
|
+
);
|
|
24308
|
+
return /* @__PURE__ */ jsx(
|
|
24309
|
+
Modal,
|
|
24310
|
+
{
|
|
24311
|
+
isOpen: open,
|
|
24312
|
+
onClose: handleClose,
|
|
24313
|
+
onExited: resetQuery,
|
|
24314
|
+
showCloseButton: false,
|
|
24315
|
+
size: "md",
|
|
24316
|
+
className,
|
|
24317
|
+
children: /* @__PURE__ */ jsx(Box, { "data-testid": "command-palette", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
24318
|
+
/* @__PURE__ */ jsx(
|
|
24319
|
+
Input,
|
|
24320
|
+
{
|
|
24321
|
+
inputType: "search",
|
|
24322
|
+
placeholder,
|
|
24323
|
+
value: query,
|
|
24324
|
+
onChange: handleQueryChange,
|
|
24325
|
+
onKeyDown: handleKeyDown,
|
|
24326
|
+
leftIcon: "search",
|
|
24327
|
+
clearable: query.length > 0,
|
|
24328
|
+
onClear: resetQuery,
|
|
24329
|
+
autoFocus: true,
|
|
24330
|
+
"data-testid": "command-palette-input"
|
|
24331
|
+
}
|
|
24332
|
+
),
|
|
24333
|
+
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(
|
|
24334
|
+
Box,
|
|
24335
|
+
{
|
|
24336
|
+
className: "max-h-80 overflow-y-auto",
|
|
24337
|
+
role: "listbox",
|
|
24338
|
+
"aria-label": placeholder,
|
|
24339
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: groups.map(({ group, items }) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
24340
|
+
group ? /* @__PURE__ */ jsx(
|
|
24341
|
+
Typography,
|
|
24342
|
+
{
|
|
24343
|
+
variant: "caption",
|
|
24344
|
+
color: "muted",
|
|
24345
|
+
className: "px-3 pt-2 pb-1 block",
|
|
24346
|
+
children: group
|
|
24347
|
+
}
|
|
24348
|
+
) : null,
|
|
24349
|
+
items.map((command) => {
|
|
24350
|
+
const index = filtered.indexOf(command);
|
|
24351
|
+
const isHighlighted = index === highlightIndex;
|
|
24352
|
+
return /* @__PURE__ */ jsxs(
|
|
24353
|
+
Box,
|
|
24354
|
+
{
|
|
24355
|
+
as: "button",
|
|
24356
|
+
role: "option",
|
|
24357
|
+
"aria-selected": isHighlighted,
|
|
24358
|
+
"aria-disabled": command.disabled || void 0,
|
|
24359
|
+
"data-testid": `command-palette-item-${command.id}`,
|
|
24360
|
+
onMouseEnter: () => !command.disabled && setHighlightIndex(index),
|
|
24361
|
+
onClick: () => handleSelect(command),
|
|
24362
|
+
className: cn(
|
|
24363
|
+
"w-full flex items-center gap-3 px-3 py-2 text-start rounded-sm",
|
|
24364
|
+
"text-sm transition-colors",
|
|
24365
|
+
"focus:outline-none",
|
|
24366
|
+
isHighlighted && "bg-muted",
|
|
24367
|
+
command.disabled && "opacity-50 cursor-not-allowed"
|
|
24368
|
+
),
|
|
24369
|
+
children: [
|
|
24370
|
+
command.icon ? /* @__PURE__ */ jsx(Icon, { icon: command.icon, size: "sm", className: "flex-shrink-0" }) : null,
|
|
24371
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "flex-1 truncate", children: command.label }),
|
|
24372
|
+
command.shortcut ? /* @__PURE__ */ jsx(Badge, { variant: "neutral", size: "sm", children: command.shortcut }) : null
|
|
24373
|
+
]
|
|
24374
|
+
},
|
|
24375
|
+
command.id
|
|
24376
|
+
);
|
|
24377
|
+
})
|
|
24378
|
+
] }, String(group ?? "__ungrouped__"))) })
|
|
24379
|
+
}
|
|
24380
|
+
)
|
|
24381
|
+
] }) })
|
|
24382
|
+
}
|
|
24383
|
+
);
|
|
24384
|
+
};
|
|
24385
|
+
CommandPalette.displayName = "CommandPalette";
|
|
24386
|
+
}
|
|
24387
|
+
});
|
|
24177
24388
|
function formatCount(count) {
|
|
24178
24389
|
if (count >= 1e3) {
|
|
24179
24390
|
return `${(count / 1e3).toFixed(1)}k`;
|
|
@@ -25435,7 +25646,7 @@ var init_Menu = __esm({
|
|
|
25435
25646
|
"bottom-end": "bottom-start"
|
|
25436
25647
|
};
|
|
25437
25648
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25438
|
-
const triggerElement =
|
|
25649
|
+
const triggerElement = React87__default.isValidElement(trigger) ? React87__default.cloneElement(trigger, {
|
|
25439
25650
|
ref: triggerRef,
|
|
25440
25651
|
onClick: handleToggle
|
|
25441
25652
|
}) : /* @__PURE__ */ jsx(
|
|
@@ -25538,14 +25749,14 @@ function useDataDnd(args) {
|
|
|
25538
25749
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25539
25750
|
const enabled = isZone || Boolean(dndRoot);
|
|
25540
25751
|
const eventBus = useEventBus();
|
|
25541
|
-
const parentRoot =
|
|
25752
|
+
const parentRoot = React87__default.useContext(RootCtx);
|
|
25542
25753
|
const isRoot = enabled && parentRoot === null;
|
|
25543
|
-
const zoneId =
|
|
25754
|
+
const zoneId = React87__default.useId();
|
|
25544
25755
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25545
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25546
|
-
const optimisticOrdersRef =
|
|
25756
|
+
const [optimisticOrders, setOptimisticOrders] = React87__default.useState(() => /* @__PURE__ */ new Map());
|
|
25757
|
+
const optimisticOrdersRef = React87__default.useRef(optimisticOrders);
|
|
25547
25758
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25548
|
-
const clearOptimisticOrder =
|
|
25759
|
+
const clearOptimisticOrder = React87__default.useCallback((group) => {
|
|
25549
25760
|
setOptimisticOrders((prev) => {
|
|
25550
25761
|
if (!prev.has(group)) return prev;
|
|
25551
25762
|
const next = new Map(prev);
|
|
@@ -25570,7 +25781,7 @@ function useDataDnd(args) {
|
|
|
25570
25781
|
const raw = it[dndItemIdField];
|
|
25571
25782
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25572
25783
|
}).join("|");
|
|
25573
|
-
const itemIds =
|
|
25784
|
+
const itemIds = React87__default.useMemo(
|
|
25574
25785
|
() => orderedItems.map((it, idx) => {
|
|
25575
25786
|
const raw = it[dndItemIdField];
|
|
25576
25787
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25581,7 +25792,7 @@ function useDataDnd(args) {
|
|
|
25581
25792
|
const raw = it[dndItemIdField];
|
|
25582
25793
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25583
25794
|
}).join("|");
|
|
25584
|
-
|
|
25795
|
+
React87__default.useEffect(() => {
|
|
25585
25796
|
const root = isRoot ? null : parentRoot;
|
|
25586
25797
|
if (root) {
|
|
25587
25798
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25589,20 +25800,20 @@ function useDataDnd(args) {
|
|
|
25589
25800
|
clearOptimisticOrder(ownGroup);
|
|
25590
25801
|
}
|
|
25591
25802
|
}, [itemsContentSig, ownGroup]);
|
|
25592
|
-
const zonesRef =
|
|
25593
|
-
const registerZone =
|
|
25803
|
+
const zonesRef = React87__default.useRef(/* @__PURE__ */ new Map());
|
|
25804
|
+
const registerZone = React87__default.useCallback((zoneId2, meta2) => {
|
|
25594
25805
|
zonesRef.current.set(zoneId2, meta2);
|
|
25595
25806
|
}, []);
|
|
25596
|
-
const unregisterZone =
|
|
25807
|
+
const unregisterZone = React87__default.useCallback((zoneId2) => {
|
|
25597
25808
|
zonesRef.current.delete(zoneId2);
|
|
25598
25809
|
}, []);
|
|
25599
|
-
const [activeDrag, setActiveDrag] =
|
|
25600
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25601
|
-
const meta =
|
|
25810
|
+
const [activeDrag, setActiveDrag] = React87__default.useState(null);
|
|
25811
|
+
const [overZoneGroup, setOverZoneGroup] = React87__default.useState(null);
|
|
25812
|
+
const meta = React87__default.useMemo(
|
|
25602
25813
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25603
25814
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25604
25815
|
);
|
|
25605
|
-
|
|
25816
|
+
React87__default.useEffect(() => {
|
|
25606
25817
|
const target = isRoot ? null : parentRoot;
|
|
25607
25818
|
if (!target) {
|
|
25608
25819
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25621,7 +25832,7 @@ function useDataDnd(args) {
|
|
|
25621
25832
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25622
25833
|
const sensors = useAlmadarDndSensors(true);
|
|
25623
25834
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25624
|
-
const findZoneByItem =
|
|
25835
|
+
const findZoneByItem = React87__default.useCallback(
|
|
25625
25836
|
(id) => {
|
|
25626
25837
|
for (const z of zonesRef.current.values()) {
|
|
25627
25838
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25630,7 +25841,7 @@ function useDataDnd(args) {
|
|
|
25630
25841
|
},
|
|
25631
25842
|
[]
|
|
25632
25843
|
);
|
|
25633
|
-
|
|
25844
|
+
React87__default.useCallback(
|
|
25634
25845
|
(group) => {
|
|
25635
25846
|
for (const z of zonesRef.current.values()) {
|
|
25636
25847
|
if (z.group === group) return z;
|
|
@@ -25639,7 +25850,7 @@ function useDataDnd(args) {
|
|
|
25639
25850
|
},
|
|
25640
25851
|
[]
|
|
25641
25852
|
);
|
|
25642
|
-
const handleDragEnd =
|
|
25853
|
+
const handleDragEnd = React87__default.useCallback(
|
|
25643
25854
|
(event) => {
|
|
25644
25855
|
const { active, over } = event;
|
|
25645
25856
|
const activeIdStr = String(active.id);
|
|
@@ -25730,8 +25941,8 @@ function useDataDnd(args) {
|
|
|
25730
25941
|
},
|
|
25731
25942
|
[eventBus]
|
|
25732
25943
|
);
|
|
25733
|
-
const sortableData =
|
|
25734
|
-
const SortableItem =
|
|
25944
|
+
const sortableData = React87__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25945
|
+
const SortableItem = React87__default.useCallback(
|
|
25735
25946
|
({ id, children }) => {
|
|
25736
25947
|
const {
|
|
25737
25948
|
attributes,
|
|
@@ -25771,7 +25982,7 @@ function useDataDnd(args) {
|
|
|
25771
25982
|
id: droppableId,
|
|
25772
25983
|
data: sortableData
|
|
25773
25984
|
});
|
|
25774
|
-
const ctx =
|
|
25985
|
+
const ctx = React87__default.useContext(RootCtx);
|
|
25775
25986
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25776
25987
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25777
25988
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25786,7 +25997,7 @@ function useDataDnd(args) {
|
|
|
25786
25997
|
showForeignPlaceholder,
|
|
25787
25998
|
ctxAvailable: ctx != null
|
|
25788
25999
|
});
|
|
25789
|
-
|
|
26000
|
+
React87__default.useEffect(() => {
|
|
25790
26001
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25791
26002
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25792
26003
|
return /* @__PURE__ */ jsx(
|
|
@@ -25800,11 +26011,11 @@ function useDataDnd(args) {
|
|
|
25800
26011
|
}
|
|
25801
26012
|
);
|
|
25802
26013
|
};
|
|
25803
|
-
const rootContextValue =
|
|
26014
|
+
const rootContextValue = React87__default.useMemo(
|
|
25804
26015
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25805
26016
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25806
26017
|
);
|
|
25807
|
-
const handleDragStart =
|
|
26018
|
+
const handleDragStart = React87__default.useCallback((event) => {
|
|
25808
26019
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25809
26020
|
const rect = event.active.rect.current.initial;
|
|
25810
26021
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25823,7 +26034,7 @@ function useDataDnd(args) {
|
|
|
25823
26034
|
isRoot
|
|
25824
26035
|
});
|
|
25825
26036
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25826
|
-
const handleDragOver =
|
|
26037
|
+
const handleDragOver = React87__default.useCallback((event) => {
|
|
25827
26038
|
const { active, over } = event;
|
|
25828
26039
|
const overData = over?.data?.current;
|
|
25829
26040
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25893,7 +26104,7 @@ function useDataDnd(args) {
|
|
|
25893
26104
|
return next;
|
|
25894
26105
|
});
|
|
25895
26106
|
}, []);
|
|
25896
|
-
const handleDragCancel =
|
|
26107
|
+
const handleDragCancel = React87__default.useCallback((event) => {
|
|
25897
26108
|
setActiveDrag(null);
|
|
25898
26109
|
setOverZoneGroup(null);
|
|
25899
26110
|
dndLog.warn("dragCancel", {
|
|
@@ -25901,12 +26112,12 @@ function useDataDnd(args) {
|
|
|
25901
26112
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25902
26113
|
});
|
|
25903
26114
|
}, []);
|
|
25904
|
-
const handleDragEndWithCleanup =
|
|
26115
|
+
const handleDragEndWithCleanup = React87__default.useCallback((event) => {
|
|
25905
26116
|
handleDragEnd(event);
|
|
25906
26117
|
setActiveDrag(null);
|
|
25907
26118
|
setOverZoneGroup(null);
|
|
25908
26119
|
}, [handleDragEnd]);
|
|
25909
|
-
const wrapContainer =
|
|
26120
|
+
const wrapContainer = React87__default.useCallback(
|
|
25910
26121
|
(children) => {
|
|
25911
26122
|
if (!enabled) return children;
|
|
25912
26123
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25960,7 +26171,7 @@ var init_useDataDnd = __esm({
|
|
|
25960
26171
|
init_useAlmadarDndCollision();
|
|
25961
26172
|
init_Box();
|
|
25962
26173
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25963
|
-
RootCtx =
|
|
26174
|
+
RootCtx = React87__default.createContext(null);
|
|
25964
26175
|
}
|
|
25965
26176
|
});
|
|
25966
26177
|
function renderIconInput(icon, props) {
|
|
@@ -26475,7 +26686,7 @@ function DataList({
|
|
|
26475
26686
|
}) {
|
|
26476
26687
|
const eventBus = useEventBus();
|
|
26477
26688
|
const { t } = useTranslate();
|
|
26478
|
-
const [visibleCount, setVisibleCount] =
|
|
26689
|
+
const [visibleCount, setVisibleCount] = React87__default.useState(pageSize || Infinity);
|
|
26479
26690
|
const fieldDefs = fields ?? columns ?? [];
|
|
26480
26691
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26481
26692
|
const dnd = useDataDnd({
|
|
@@ -26491,14 +26702,14 @@ function DataList({
|
|
|
26491
26702
|
dndRoot
|
|
26492
26703
|
});
|
|
26493
26704
|
const orderedData = dnd.orderedItems;
|
|
26494
|
-
const allData =
|
|
26705
|
+
const allData = React87__default.useMemo(
|
|
26495
26706
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
26496
26707
|
[orderedData, sortBy, sortDirection]
|
|
26497
26708
|
);
|
|
26498
26709
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26499
26710
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26500
26711
|
const hasRenderProp = typeof children === "function";
|
|
26501
|
-
|
|
26712
|
+
React87__default.useEffect(() => {
|
|
26502
26713
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26503
26714
|
const childrenTypeOf = typeof children;
|
|
26504
26715
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26618,7 +26829,7 @@ function DataList({
|
|
|
26618
26829
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
26619
26830
|
};
|
|
26620
26831
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
26621
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26832
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
26622
26833
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26623
26834
|
group.items.map((itemData, index) => {
|
|
26624
26835
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26834,7 +27045,7 @@ function DataList({
|
|
|
26834
27045
|
className
|
|
26835
27046
|
),
|
|
26836
27047
|
children: [
|
|
26837
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
27048
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
26838
27049
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26839
27050
|
group.items.map(
|
|
26840
27051
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26921,7 +27132,7 @@ var init_FormSection = __esm({
|
|
|
26921
27132
|
columns = 1,
|
|
26922
27133
|
className
|
|
26923
27134
|
}) => {
|
|
26924
|
-
const [collapsed, setCollapsed] =
|
|
27135
|
+
const [collapsed, setCollapsed] = React87__default.useState(defaultCollapsed);
|
|
26925
27136
|
const { t } = useTranslate();
|
|
26926
27137
|
const eventBus = useEventBus();
|
|
26927
27138
|
const gridClass = {
|
|
@@ -26929,7 +27140,7 @@ var init_FormSection = __esm({
|
|
|
26929
27140
|
2: "grid-cols-1 md:grid-cols-2",
|
|
26930
27141
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
26931
27142
|
}[columns];
|
|
26932
|
-
|
|
27143
|
+
React87__default.useCallback(() => {
|
|
26933
27144
|
if (collapsible) {
|
|
26934
27145
|
setCollapsed((prev) => !prev);
|
|
26935
27146
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27483,10 +27694,10 @@ var init_FileTree = __esm({
|
|
|
27483
27694
|
indent = 16
|
|
27484
27695
|
}) => {
|
|
27485
27696
|
const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
|
|
27486
|
-
const byId =
|
|
27487
|
-
const selectedAncestors =
|
|
27488
|
-
const lastSelectedRef =
|
|
27489
|
-
|
|
27697
|
+
const byId = React87__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
|
|
27698
|
+
const selectedAncestors = React87__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
|
|
27699
|
+
const lastSelectedRef = React87__default.useRef(selectedId);
|
|
27700
|
+
React87__default.useEffect(() => {
|
|
27490
27701
|
if (selectedId === lastSelectedRef.current) return;
|
|
27491
27702
|
lastSelectedRef.current = selectedId;
|
|
27492
27703
|
setOverrides((prev) => {
|
|
@@ -28256,7 +28467,7 @@ var init_Flex = __esm({
|
|
|
28256
28467
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
28257
28468
|
}
|
|
28258
28469
|
}
|
|
28259
|
-
return
|
|
28470
|
+
return React87__default.createElement(Component, {
|
|
28260
28471
|
className: cn(
|
|
28261
28472
|
inline ? "inline-flex" : "flex",
|
|
28262
28473
|
directionStyles[direction],
|
|
@@ -28375,7 +28586,7 @@ var init_Grid = __esm({
|
|
|
28375
28586
|
as: Component = "div"
|
|
28376
28587
|
}) => {
|
|
28377
28588
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
28378
|
-
return
|
|
28589
|
+
return React87__default.createElement(
|
|
28379
28590
|
Component,
|
|
28380
28591
|
{
|
|
28381
28592
|
className: cn(
|
|
@@ -28797,9 +29008,9 @@ var init_Popover = __esm({
|
|
|
28797
29008
|
onMouseLeave: handleClose,
|
|
28798
29009
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
28799
29010
|
};
|
|
28800
|
-
const childElement =
|
|
29011
|
+
const childElement = React87__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28801
29012
|
const childPointerDown = childElement.props.onPointerDown;
|
|
28802
|
-
const triggerElement =
|
|
29013
|
+
const triggerElement = React87__default.cloneElement(
|
|
28803
29014
|
childElement,
|
|
28804
29015
|
{
|
|
28805
29016
|
ref: triggerRef,
|
|
@@ -29413,9 +29624,9 @@ var init_Tooltip = __esm({
|
|
|
29413
29624
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
29414
29625
|
};
|
|
29415
29626
|
}, []);
|
|
29416
|
-
const triggerElement =
|
|
29627
|
+
const triggerElement = React87__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29417
29628
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
29418
|
-
const trigger =
|
|
29629
|
+
const trigger = React87__default.cloneElement(triggerElement, {
|
|
29419
29630
|
ref: triggerRef,
|
|
29420
29631
|
onMouseEnter: handleMouseEnter,
|
|
29421
29632
|
onMouseLeave: handleMouseLeave,
|
|
@@ -29505,7 +29716,7 @@ var init_WizardProgress = __esm({
|
|
|
29505
29716
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
29506
29717
|
const isActive = index === currentStep;
|
|
29507
29718
|
const isCompleted = index < currentStep;
|
|
29508
|
-
return /* @__PURE__ */ jsxs(
|
|
29719
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
29509
29720
|
/* @__PURE__ */ jsx(
|
|
29510
29721
|
"button",
|
|
29511
29722
|
{
|
|
@@ -32164,7 +32375,7 @@ var init_MapView = __esm({
|
|
|
32164
32375
|
shadowSize: [41, 41]
|
|
32165
32376
|
});
|
|
32166
32377
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
32167
|
-
const { useEffect: useEffect64, useRef: useRef65, useCallback:
|
|
32378
|
+
const { useEffect: useEffect64, useRef: useRef65, useCallback: useCallback93, useState: useState99 } = React87__default;
|
|
32168
32379
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
32169
32380
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
32170
32381
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -32209,8 +32420,8 @@ var init_MapView = __esm({
|
|
|
32209
32420
|
showAttribution = true
|
|
32210
32421
|
}) {
|
|
32211
32422
|
const eventBus = useEventBus2();
|
|
32212
|
-
const [clickedPosition, setClickedPosition] =
|
|
32213
|
-
const handleMapClick =
|
|
32423
|
+
const [clickedPosition, setClickedPosition] = useState99(null);
|
|
32424
|
+
const handleMapClick = useCallback93((lat, lng) => {
|
|
32214
32425
|
if (showClickedPin) {
|
|
32215
32426
|
setClickedPosition({ lat, lng });
|
|
32216
32427
|
}
|
|
@@ -32219,7 +32430,7 @@ var init_MapView = __esm({
|
|
|
32219
32430
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
32220
32431
|
}
|
|
32221
32432
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
32222
|
-
const handleMarkerClick =
|
|
32433
|
+
const handleMarkerClick = useCallback93((marker) => {
|
|
32223
32434
|
onMarkerClick?.(marker);
|
|
32224
32435
|
if (markerClickEvent) {
|
|
32225
32436
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -33109,8 +33320,8 @@ function TableView({
|
|
|
33109
33320
|
}) {
|
|
33110
33321
|
const eventBus = useEventBus();
|
|
33111
33322
|
const { t } = useTranslate();
|
|
33112
|
-
const [visibleCount, setVisibleCount] =
|
|
33113
|
-
const [localSelected, setLocalSelected] =
|
|
33323
|
+
const [visibleCount, setVisibleCount] = React87__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
33324
|
+
const [localSelected, setLocalSelected] = React87__default.useState(/* @__PURE__ */ new Set());
|
|
33114
33325
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
33115
33326
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
33116
33327
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -33131,7 +33342,7 @@ function TableView({
|
|
|
33131
33342
|
const hasMore = pageSize > 0 && visibleCount < ordered2.length;
|
|
33132
33343
|
const hasRenderProp = typeof children === "function";
|
|
33133
33344
|
const idField = dndItemIdField ?? "id";
|
|
33134
|
-
|
|
33345
|
+
React87__default.useEffect(() => {
|
|
33135
33346
|
tableViewLog.debug("render", {
|
|
33136
33347
|
rowCount: data.length,
|
|
33137
33348
|
colCount: colDefs.length,
|
|
@@ -33181,7 +33392,7 @@ function TableView({
|
|
|
33181
33392
|
};
|
|
33182
33393
|
eventBus.emit(`UI:${rowClickEvent}`, payload);
|
|
33183
33394
|
};
|
|
33184
|
-
const colFloors =
|
|
33395
|
+
const colFloors = React87__default.useMemo(
|
|
33185
33396
|
() => colDefs.map((col) => {
|
|
33186
33397
|
const longest = data.reduce((widest, row) => {
|
|
33187
33398
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -33324,12 +33535,12 @@ function TableView({
|
|
|
33324
33535
|
]
|
|
33325
33536
|
}
|
|
33326
33537
|
);
|
|
33327
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
33538
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React87__default.Fragment, { children: rowInner }, id);
|
|
33328
33539
|
};
|
|
33329
33540
|
const items = Array.from(data);
|
|
33330
33541
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
33331
33542
|
let runningIndex = 0;
|
|
33332
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
33543
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
33333
33544
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
33334
33545
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
33335
33546
|
] }, gi)) });
|
|
@@ -34560,7 +34771,7 @@ var init_StepFlow = __esm({
|
|
|
34560
34771
|
className
|
|
34561
34772
|
}) => {
|
|
34562
34773
|
if (orientation === "vertical") {
|
|
34563
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
34774
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React87__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
34564
34775
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
34565
34776
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34566
34777
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -34571,7 +34782,7 @@ var init_StepFlow = __esm({
|
|
|
34571
34782
|
] })
|
|
34572
34783
|
] }) }, index)) });
|
|
34573
34784
|
}
|
|
34574
|
-
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(
|
|
34785
|
+
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(React87__default.Fragment, { children: [
|
|
34575
34786
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
34576
34787
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34577
34788
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -35561,7 +35772,7 @@ var init_LikertScale = __esm({
|
|
|
35561
35772
|
md: "text-base",
|
|
35562
35773
|
lg: "text-lg"
|
|
35563
35774
|
};
|
|
35564
|
-
LikertScale =
|
|
35775
|
+
LikertScale = React87__default.forwardRef(
|
|
35565
35776
|
({
|
|
35566
35777
|
question,
|
|
35567
35778
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -35573,7 +35784,7 @@ var init_LikertScale = __esm({
|
|
|
35573
35784
|
variant = "radios",
|
|
35574
35785
|
className
|
|
35575
35786
|
}, ref) => {
|
|
35576
|
-
const groupId =
|
|
35787
|
+
const groupId = React87__default.useId();
|
|
35577
35788
|
const eventBus = useEventBus();
|
|
35578
35789
|
const handleSelect = useCallback(
|
|
35579
35790
|
(next) => {
|
|
@@ -37996,7 +38207,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
37996
38207
|
"aria-label": t("aria.breadcrumb"),
|
|
37997
38208
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
37998
38209
|
const isLast = idx === items.length - 1;
|
|
37999
|
-
return /* @__PURE__ */ jsxs(
|
|
38210
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
38000
38211
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
38001
38212
|
Icon,
|
|
38002
38213
|
{
|
|
@@ -38865,7 +39076,7 @@ var init_MiniStateMachine = __esm({
|
|
|
38865
39076
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
38866
39077
|
const tc = transitionCounts[s.name] ?? 0;
|
|
38867
39078
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
38868
|
-
return /* @__PURE__ */ jsxs(
|
|
39079
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
38869
39080
|
/* @__PURE__ */ jsx(
|
|
38870
39081
|
AvlState,
|
|
38871
39082
|
{
|
|
@@ -39070,7 +39281,7 @@ var init_PageHeader = __esm({
|
|
|
39070
39281
|
info: "bg-info/10 text-info"
|
|
39071
39282
|
};
|
|
39072
39283
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
39073
|
-
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(
|
|
39284
|
+
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(React87__default.Fragment, { children: [
|
|
39074
39285
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
39075
39286
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
39076
39287
|
"a",
|
|
@@ -39428,7 +39639,7 @@ var init_Section = __esm({
|
|
|
39428
39639
|
as: Component = "section"
|
|
39429
39640
|
}) => {
|
|
39430
39641
|
const hasHeader = title || description || action;
|
|
39431
|
-
return
|
|
39642
|
+
return React87__default.createElement(
|
|
39432
39643
|
Component,
|
|
39433
39644
|
{
|
|
39434
39645
|
className: cn(
|
|
@@ -39802,7 +40013,7 @@ var init_WizardContainer = __esm({
|
|
|
39802
40013
|
const isCompleted = index < currentStep;
|
|
39803
40014
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
39804
40015
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
39805
|
-
return /* @__PURE__ */ jsxs(
|
|
40016
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
39806
40017
|
/* @__PURE__ */ jsx(
|
|
39807
40018
|
Button,
|
|
39808
40019
|
{
|
|
@@ -41589,7 +41800,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
41589
41800
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
41590
41801
|
const summary = fieldSummary(unit);
|
|
41591
41802
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
41592
|
-
return /* @__PURE__ */ jsxs(
|
|
41803
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
41593
41804
|
/* @__PURE__ */ jsxs(
|
|
41594
41805
|
Box,
|
|
41595
41806
|
{
|
|
@@ -41686,7 +41897,7 @@ var init_ImportProgress = __esm({
|
|
|
41686
41897
|
PIPELINE.map((key, index) => {
|
|
41687
41898
|
const isComplete = index < currentIndex;
|
|
41688
41899
|
const isActive = index === currentIndex;
|
|
41689
|
-
return /* @__PURE__ */ jsxs(
|
|
41900
|
+
return /* @__PURE__ */ jsxs(React87__default.Fragment, { children: [
|
|
41690
41901
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
41691
41902
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
41692
41903
|
/* @__PURE__ */ jsx(
|
|
@@ -42627,7 +42838,7 @@ var init_DetailPanel = __esm({
|
|
|
42627
42838
|
}) => {
|
|
42628
42839
|
const eventBus = useEventBus();
|
|
42629
42840
|
const { t } = useTranslate();
|
|
42630
|
-
const [titleDraft, setTitleDraft] =
|
|
42841
|
+
const [titleDraft, setTitleDraft] = React87__default.useState(null);
|
|
42631
42842
|
const isFieldDefArray = (arr) => {
|
|
42632
42843
|
if (!arr || arr.length === 0) return false;
|
|
42633
42844
|
const first = arr[0];
|
|
@@ -43093,7 +43304,7 @@ var init_SplitPane = __esm({
|
|
|
43093
43304
|
/* @__PURE__ */ jsx(
|
|
43094
43305
|
"div",
|
|
43095
43306
|
{
|
|
43096
|
-
className: cn("overflow-auto", leftClassName),
|
|
43307
|
+
className: cn("flex flex-col overflow-auto", leftClassName),
|
|
43097
43308
|
style: {
|
|
43098
43309
|
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
43099
43310
|
flexShrink: 0
|
|
@@ -43111,7 +43322,7 @@ var init_SplitPane = __esm({
|
|
|
43111
43322
|
)
|
|
43112
43323
|
}
|
|
43113
43324
|
),
|
|
43114
|
-
/* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
|
|
43325
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex flex-col flex-1 min-h-0 min-w-0 overflow-auto", rightClassName), children: right })
|
|
43115
43326
|
]
|
|
43116
43327
|
}
|
|
43117
43328
|
);
|
|
@@ -43157,7 +43368,7 @@ var init_DockLayout = __esm({
|
|
|
43157
43368
|
const showBottomPanel = Boolean(bottomPanel) && !bottomPanelCollapsed;
|
|
43158
43369
|
const showSecondarySidebar = Boolean(secondarySidebar) && !secondarySidebarCollapsed;
|
|
43159
43370
|
const centerRow = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
43160
|
-
/* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 h-
|
|
43371
|
+
/* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 min-h-0 overflow-auto", mainClassName), children: main }),
|
|
43161
43372
|
showSecondarySidebar && /* @__PURE__ */ jsx(
|
|
43162
43373
|
Box,
|
|
43163
43374
|
{
|
|
@@ -43188,7 +43399,7 @@ var init_DockLayout = __esm({
|
|
|
43188
43399
|
Box,
|
|
43189
43400
|
{
|
|
43190
43401
|
className: cn(
|
|
43191
|
-
"flex-shrink-0 h-
|
|
43402
|
+
"flex-shrink-0 min-h-0 overflow-auto border-r border-border",
|
|
43192
43403
|
railClassName
|
|
43193
43404
|
),
|
|
43194
43405
|
style: { width: railWidth },
|
|
@@ -43237,7 +43448,7 @@ var init_DockLayout = __esm({
|
|
|
43237
43448
|
}
|
|
43238
43449
|
});
|
|
43239
43450
|
function extractTitle(children) {
|
|
43240
|
-
if (!
|
|
43451
|
+
if (!React87__default.isValidElement(children)) return void 0;
|
|
43241
43452
|
const props = children.props;
|
|
43242
43453
|
if (typeof props.title === "string") {
|
|
43243
43454
|
return props.title;
|
|
@@ -43599,7 +43810,7 @@ var init_Form = __esm({
|
|
|
43599
43810
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
43600
43811
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
43601
43812
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
43602
|
-
const normalizedInitialData =
|
|
43813
|
+
const normalizedInitialData = React87__default.useMemo(() => {
|
|
43603
43814
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
43604
43815
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
43605
43816
|
const merged = entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
@@ -43618,7 +43829,7 @@ var init_Form = __esm({
|
|
|
43618
43829
|
}
|
|
43619
43830
|
return normalized;
|
|
43620
43831
|
}, [entity, initialData]);
|
|
43621
|
-
const entityDerivedFields =
|
|
43832
|
+
const entityDerivedFields = React87__default.useMemo(() => {
|
|
43622
43833
|
if (fields && fields.length > 0) return void 0;
|
|
43623
43834
|
if (!resolvedEntity) return void 0;
|
|
43624
43835
|
return resolvedEntity.fields.map(
|
|
@@ -43639,16 +43850,16 @@ var init_Form = __esm({
|
|
|
43639
43850
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
43640
43851
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
43641
43852
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
43642
|
-
const [formData, setFormData] =
|
|
43853
|
+
const [formData, setFormData] = React87__default.useState(
|
|
43643
43854
|
normalizedInitialData
|
|
43644
43855
|
);
|
|
43645
|
-
const [collapsedSections, setCollapsedSections] =
|
|
43856
|
+
const [collapsedSections, setCollapsedSections] = React87__default.useState(
|
|
43646
43857
|
/* @__PURE__ */ new Set()
|
|
43647
43858
|
);
|
|
43648
|
-
const [submitError, setSubmitError] =
|
|
43649
|
-
const formRef =
|
|
43859
|
+
const [submitError, setSubmitError] = React87__default.useState(null);
|
|
43860
|
+
const formRef = React87__default.useRef(null);
|
|
43650
43861
|
const formMode = props.mode;
|
|
43651
|
-
const mountedRef =
|
|
43862
|
+
const mountedRef = React87__default.useRef(false);
|
|
43652
43863
|
if (!mountedRef.current) {
|
|
43653
43864
|
mountedRef.current = true;
|
|
43654
43865
|
debug("forms", "mount", {
|
|
@@ -43661,7 +43872,7 @@ var init_Form = __esm({
|
|
|
43661
43872
|
});
|
|
43662
43873
|
}
|
|
43663
43874
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
43664
|
-
const evalContext =
|
|
43875
|
+
const evalContext = React87__default.useMemo(
|
|
43665
43876
|
() => ({
|
|
43666
43877
|
formValues: formData,
|
|
43667
43878
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -43670,7 +43881,7 @@ var init_Form = __esm({
|
|
|
43670
43881
|
}),
|
|
43671
43882
|
[formData, externalContext]
|
|
43672
43883
|
);
|
|
43673
|
-
|
|
43884
|
+
React87__default.useEffect(() => {
|
|
43674
43885
|
debug("forms", "initialData-sync", {
|
|
43675
43886
|
mode: formMode,
|
|
43676
43887
|
normalizedInitialData,
|
|
@@ -43681,7 +43892,7 @@ var init_Form = __esm({
|
|
|
43681
43892
|
setFormData(normalizedInitialData);
|
|
43682
43893
|
}
|
|
43683
43894
|
}, [normalizedInitialData]);
|
|
43684
|
-
const processCalculations =
|
|
43895
|
+
const processCalculations = React87__default.useCallback(
|
|
43685
43896
|
(changedFieldId, newFormData) => {
|
|
43686
43897
|
if (!hiddenCalculations.length) return;
|
|
43687
43898
|
const context = {
|
|
@@ -43706,7 +43917,7 @@ var init_Form = __esm({
|
|
|
43706
43917
|
},
|
|
43707
43918
|
[hiddenCalculations, externalContext, eventBus]
|
|
43708
43919
|
);
|
|
43709
|
-
const checkViolations =
|
|
43920
|
+
const checkViolations = React87__default.useCallback(
|
|
43710
43921
|
(changedFieldId, newFormData) => {
|
|
43711
43922
|
if (!violationTriggers.length) return;
|
|
43712
43923
|
const context = {
|
|
@@ -43744,7 +43955,7 @@ var init_Form = __esm({
|
|
|
43744
43955
|
processCalculations(name, newFormData);
|
|
43745
43956
|
checkViolations(name, newFormData);
|
|
43746
43957
|
};
|
|
43747
|
-
const isFieldVisible =
|
|
43958
|
+
const isFieldVisible = React87__default.useCallback(
|
|
43748
43959
|
(fieldName2) => {
|
|
43749
43960
|
const condition = conditionalFields[fieldName2];
|
|
43750
43961
|
if (!condition) return true;
|
|
@@ -43752,7 +43963,7 @@ var init_Form = __esm({
|
|
|
43752
43963
|
},
|
|
43753
43964
|
[conditionalFields, evalContext]
|
|
43754
43965
|
);
|
|
43755
|
-
const isSectionVisible =
|
|
43966
|
+
const isSectionVisible = React87__default.useCallback(
|
|
43756
43967
|
(section) => {
|
|
43757
43968
|
if (!section.condition) return true;
|
|
43758
43969
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -43828,7 +44039,7 @@ var init_Form = __esm({
|
|
|
43828
44039
|
eventBus.emit(`UI:${onCancel}`);
|
|
43829
44040
|
}
|
|
43830
44041
|
};
|
|
43831
|
-
const renderField =
|
|
44042
|
+
const renderField = React87__default.useCallback(
|
|
43832
44043
|
(field) => {
|
|
43833
44044
|
const fieldName2 = field.name || field.field;
|
|
43834
44045
|
if (!fieldName2) return null;
|
|
@@ -43850,7 +44061,7 @@ var init_Form = __esm({
|
|
|
43850
44061
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
43851
44062
|
);
|
|
43852
44063
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
43853
|
-
const normalizedFields =
|
|
44064
|
+
const normalizedFields = React87__default.useMemo(() => {
|
|
43854
44065
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
43855
44066
|
return effectiveFields.map((field) => {
|
|
43856
44067
|
if (typeof field === "string") {
|
|
@@ -43885,7 +44096,7 @@ var init_Form = __esm({
|
|
|
43885
44096
|
};
|
|
43886
44097
|
});
|
|
43887
44098
|
}, [effectiveFields, resolvedEntity, fieldOverrides]);
|
|
43888
|
-
const schemaFields =
|
|
44099
|
+
const schemaFields = React87__default.useMemo(() => {
|
|
43889
44100
|
if (normalizedFields.length === 0) return null;
|
|
43890
44101
|
if (isDebugEnabled()) {
|
|
43891
44102
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -43895,7 +44106,7 @@ var init_Form = __esm({
|
|
|
43895
44106
|
}
|
|
43896
44107
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
43897
44108
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
43898
|
-
const sectionElements =
|
|
44109
|
+
const sectionElements = React87__default.useMemo(() => {
|
|
43899
44110
|
if (!sections || sections.length === 0) return null;
|
|
43900
44111
|
return sections.map((section) => {
|
|
43901
44112
|
if (!isSectionVisible(section)) {
|
|
@@ -44731,7 +44942,7 @@ var init_List = __esm({
|
|
|
44731
44942
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
44732
44943
|
return [];
|
|
44733
44944
|
}, [entity]);
|
|
44734
|
-
const getItemActions =
|
|
44945
|
+
const getItemActions = React87__default.useCallback(
|
|
44735
44946
|
(item) => {
|
|
44736
44947
|
if (!itemActions) return [];
|
|
44737
44948
|
if (typeof itemActions === "function") {
|
|
@@ -45213,7 +45424,7 @@ var init_MediaGallery = __esm({
|
|
|
45213
45424
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
45214
45425
|
);
|
|
45215
45426
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45216
|
-
const items =
|
|
45427
|
+
const items = React87__default.useMemo(() => {
|
|
45217
45428
|
if (propItems && propItems.length > 0) return propItems;
|
|
45218
45429
|
if (entityData.length === 0) return [];
|
|
45219
45430
|
return entityData.map((record, idx) => {
|
|
@@ -45378,7 +45589,7 @@ var init_MediaGallery = __esm({
|
|
|
45378
45589
|
}
|
|
45379
45590
|
});
|
|
45380
45591
|
function extractTitle2(children) {
|
|
45381
|
-
if (!
|
|
45592
|
+
if (!React87__default.isValidElement(children)) return void 0;
|
|
45382
45593
|
const props = children.props;
|
|
45383
45594
|
if (typeof props.title === "string") {
|
|
45384
45595
|
return props.title;
|
|
@@ -45652,7 +45863,7 @@ var init_debugRegistry = __esm({
|
|
|
45652
45863
|
}
|
|
45653
45864
|
});
|
|
45654
45865
|
function useDebugData() {
|
|
45655
|
-
const [data, setData] =
|
|
45866
|
+
const [data, setData] = React87.useState(() => ({
|
|
45656
45867
|
traits: [],
|
|
45657
45868
|
ticks: [],
|
|
45658
45869
|
guards: [],
|
|
@@ -45666,7 +45877,7 @@ function useDebugData() {
|
|
|
45666
45877
|
},
|
|
45667
45878
|
lastUpdate: Date.now()
|
|
45668
45879
|
}));
|
|
45669
|
-
|
|
45880
|
+
React87.useEffect(() => {
|
|
45670
45881
|
const updateData = () => {
|
|
45671
45882
|
setData({
|
|
45672
45883
|
traits: getAllTraits(),
|
|
@@ -45775,12 +45986,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
45775
45986
|
return positions;
|
|
45776
45987
|
}
|
|
45777
45988
|
function WalkMinimap() {
|
|
45778
|
-
const [walkStep, setWalkStep] =
|
|
45779
|
-
const [traits2, setTraits] =
|
|
45780
|
-
const [coveredEdges, setCoveredEdges] =
|
|
45781
|
-
const [completedTraits, setCompletedTraits] =
|
|
45782
|
-
const prevTraitRef =
|
|
45783
|
-
|
|
45989
|
+
const [walkStep, setWalkStep] = React87.useState(null);
|
|
45990
|
+
const [traits2, setTraits] = React87.useState([]);
|
|
45991
|
+
const [coveredEdges, setCoveredEdges] = React87.useState([]);
|
|
45992
|
+
const [completedTraits, setCompletedTraits] = React87.useState(/* @__PURE__ */ new Set());
|
|
45993
|
+
const prevTraitRef = React87.useRef(null);
|
|
45994
|
+
React87.useEffect(() => {
|
|
45784
45995
|
const interval = setInterval(() => {
|
|
45785
45996
|
const w = window;
|
|
45786
45997
|
const step = w.__orbitalWalkStep;
|
|
@@ -46216,15 +46427,15 @@ var init_EntitiesTab = __esm({
|
|
|
46216
46427
|
});
|
|
46217
46428
|
function EventFlowTab({ events: events2 }) {
|
|
46218
46429
|
const { t } = useTranslate();
|
|
46219
|
-
const [filter, setFilter] =
|
|
46220
|
-
const containerRef =
|
|
46221
|
-
const [autoScroll, setAutoScroll] =
|
|
46222
|
-
|
|
46430
|
+
const [filter, setFilter] = React87.useState("all");
|
|
46431
|
+
const containerRef = React87.useRef(null);
|
|
46432
|
+
const [autoScroll, setAutoScroll] = React87.useState(true);
|
|
46433
|
+
React87.useEffect(() => {
|
|
46223
46434
|
if (autoScroll && containerRef.current) {
|
|
46224
46435
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46225
46436
|
}
|
|
46226
46437
|
}, [events2.length, autoScroll]);
|
|
46227
|
-
const filteredEvents =
|
|
46438
|
+
const filteredEvents = React87.useMemo(() => {
|
|
46228
46439
|
if (filter === "all") return events2;
|
|
46229
46440
|
return events2.filter((e) => e.type === filter);
|
|
46230
46441
|
}, [events2, filter]);
|
|
@@ -46340,7 +46551,7 @@ var init_EventFlowTab = __esm({
|
|
|
46340
46551
|
});
|
|
46341
46552
|
function GuardsPanel({ guards }) {
|
|
46342
46553
|
const { t } = useTranslate();
|
|
46343
|
-
const [filter, setFilter] =
|
|
46554
|
+
const [filter, setFilter] = React87.useState("all");
|
|
46344
46555
|
if (guards.length === 0) {
|
|
46345
46556
|
return /* @__PURE__ */ jsx(
|
|
46346
46557
|
EmptyState,
|
|
@@ -46353,7 +46564,7 @@ function GuardsPanel({ guards }) {
|
|
|
46353
46564
|
}
|
|
46354
46565
|
const passedCount = guards.filter((g) => g.result).length;
|
|
46355
46566
|
const failedCount = guards.length - passedCount;
|
|
46356
|
-
const filteredGuards =
|
|
46567
|
+
const filteredGuards = React87.useMemo(() => {
|
|
46357
46568
|
if (filter === "all") return guards;
|
|
46358
46569
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
46359
46570
|
return guards.filter((g) => !g.result);
|
|
@@ -46516,10 +46727,10 @@ function EffectBadge({ effect }) {
|
|
|
46516
46727
|
}
|
|
46517
46728
|
function TransitionTimeline({ transitions }) {
|
|
46518
46729
|
const { t } = useTranslate();
|
|
46519
|
-
const containerRef =
|
|
46520
|
-
const [autoScroll, setAutoScroll] =
|
|
46521
|
-
const [expandedId, setExpandedId] =
|
|
46522
|
-
|
|
46730
|
+
const containerRef = React87.useRef(null);
|
|
46731
|
+
const [autoScroll, setAutoScroll] = React87.useState(true);
|
|
46732
|
+
const [expandedId, setExpandedId] = React87.useState(null);
|
|
46733
|
+
React87.useEffect(() => {
|
|
46523
46734
|
if (autoScroll && containerRef.current) {
|
|
46524
46735
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46525
46736
|
}
|
|
@@ -46799,9 +47010,9 @@ function getAllEvents(traits2) {
|
|
|
46799
47010
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
46800
47011
|
const eventBus = useEventBus();
|
|
46801
47012
|
const { t } = useTranslate();
|
|
46802
|
-
const [log9, setLog] =
|
|
46803
|
-
const prevStatesRef =
|
|
46804
|
-
|
|
47013
|
+
const [log9, setLog] = React87.useState([]);
|
|
47014
|
+
const prevStatesRef = React87.useRef(/* @__PURE__ */ new Map());
|
|
47015
|
+
React87.useEffect(() => {
|
|
46805
47016
|
for (const trait of traits2) {
|
|
46806
47017
|
const prev = prevStatesRef.current.get(trait.id);
|
|
46807
47018
|
if (prev && prev !== trait.currentState) {
|
|
@@ -46970,10 +47181,10 @@ function VerifyModePanel({
|
|
|
46970
47181
|
localCount
|
|
46971
47182
|
}) {
|
|
46972
47183
|
const { t } = useTranslate();
|
|
46973
|
-
const [expanded, setExpanded] =
|
|
46974
|
-
const scrollRef =
|
|
46975
|
-
const prevCountRef =
|
|
46976
|
-
|
|
47184
|
+
const [expanded, setExpanded] = React87.useState(true);
|
|
47185
|
+
const scrollRef = React87.useRef(null);
|
|
47186
|
+
const prevCountRef = React87.useRef(0);
|
|
47187
|
+
React87.useEffect(() => {
|
|
46977
47188
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
46978
47189
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
46979
47190
|
}
|
|
@@ -47030,10 +47241,10 @@ function RuntimeDebugger({
|
|
|
47030
47241
|
schema
|
|
47031
47242
|
}) {
|
|
47032
47243
|
const { t } = useTranslate();
|
|
47033
|
-
const [isCollapsed, setIsCollapsed] =
|
|
47034
|
-
const [isVisible, setIsVisible] =
|
|
47244
|
+
const [isCollapsed, setIsCollapsed] = React87.useState(mode === "verify" ? true : defaultCollapsed);
|
|
47245
|
+
const [isVisible, setIsVisible] = React87.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
47035
47246
|
const debugData = useDebugData();
|
|
47036
|
-
|
|
47247
|
+
React87.useEffect(() => {
|
|
47037
47248
|
if (mode === "inline") return;
|
|
47038
47249
|
return onDebugToggle((enabled) => {
|
|
47039
47250
|
setIsVisible(enabled);
|
|
@@ -47042,7 +47253,7 @@ function RuntimeDebugger({
|
|
|
47042
47253
|
}
|
|
47043
47254
|
});
|
|
47044
47255
|
}, [mode]);
|
|
47045
|
-
|
|
47256
|
+
React87.useEffect(() => {
|
|
47046
47257
|
if (mode === "inline") return;
|
|
47047
47258
|
const handleKeyDown = (e) => {
|
|
47048
47259
|
if (e.key === "`" && isVisible) {
|
|
@@ -47473,7 +47684,7 @@ var init_StatCard = __esm({
|
|
|
47473
47684
|
const labelToUse = propLabel ?? propTitle;
|
|
47474
47685
|
const eventBus = useEventBus();
|
|
47475
47686
|
const { t } = useTranslate();
|
|
47476
|
-
const handleActionClick =
|
|
47687
|
+
const handleActionClick = React87__default.useCallback(() => {
|
|
47477
47688
|
if (action?.event) {
|
|
47478
47689
|
eventBus.emit(`UI:${action.event}`, {});
|
|
47479
47690
|
}
|
|
@@ -47484,7 +47695,7 @@ var init_StatCard = __esm({
|
|
|
47484
47695
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
47485
47696
|
const isLoading = externalLoading ?? false;
|
|
47486
47697
|
const error = externalError;
|
|
47487
|
-
const computeMetricValue =
|
|
47698
|
+
const computeMetricValue = React87__default.useCallback(
|
|
47488
47699
|
(metric, items) => {
|
|
47489
47700
|
if (metric.value !== void 0) {
|
|
47490
47701
|
return metric.value;
|
|
@@ -47523,7 +47734,7 @@ var init_StatCard = __esm({
|
|
|
47523
47734
|
},
|
|
47524
47735
|
[]
|
|
47525
47736
|
);
|
|
47526
|
-
const schemaStats =
|
|
47737
|
+
const schemaStats = React87__default.useMemo(() => {
|
|
47527
47738
|
if (!metrics || metrics.length === 0) return null;
|
|
47528
47739
|
return metrics.map((metric) => ({
|
|
47529
47740
|
label: metric.label,
|
|
@@ -47531,7 +47742,7 @@ var init_StatCard = __esm({
|
|
|
47531
47742
|
format: metric.format
|
|
47532
47743
|
}));
|
|
47533
47744
|
}, [metrics, data, computeMetricValue]);
|
|
47534
|
-
const calculatedTrend =
|
|
47745
|
+
const calculatedTrend = React87__default.useMemo(() => {
|
|
47535
47746
|
if (manualTrend !== void 0) return manualTrend;
|
|
47536
47747
|
if (previousValue === void 0 || currentValue === void 0)
|
|
47537
47748
|
return void 0;
|
|
@@ -48171,8 +48382,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
48171
48382
|
] });
|
|
48172
48383
|
};
|
|
48173
48384
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
48174
|
-
const endRef =
|
|
48175
|
-
|
|
48385
|
+
const endRef = React87__default.useRef(null);
|
|
48386
|
+
React87__default.useEffect(() => {
|
|
48176
48387
|
if (!autoScroll) return;
|
|
48177
48388
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
48178
48389
|
}, [activities.length, autoScroll]);
|
|
@@ -48266,7 +48477,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
48266
48477
|
};
|
|
48267
48478
|
SubagentRichCard = ({ subagent }) => {
|
|
48268
48479
|
const { t } = useTranslate();
|
|
48269
|
-
const activities =
|
|
48480
|
+
const activities = React87__default.useMemo(
|
|
48270
48481
|
() => subagentMessagesToActivities(subagent.messages),
|
|
48271
48482
|
[subagent.messages]
|
|
48272
48483
|
);
|
|
@@ -48343,8 +48554,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
48343
48554
|
] });
|
|
48344
48555
|
};
|
|
48345
48556
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
48346
|
-
const endRef =
|
|
48347
|
-
|
|
48557
|
+
const endRef = React87__default.useRef(null);
|
|
48558
|
+
React87__default.useEffect(() => {
|
|
48348
48559
|
if (!autoScroll) return;
|
|
48349
48560
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
48350
48561
|
}, [messages.length, autoScroll]);
|
|
@@ -48779,7 +48990,7 @@ var init_Timeline = __esm({
|
|
|
48779
48990
|
}) => {
|
|
48780
48991
|
const { t } = useTranslate();
|
|
48781
48992
|
const entityData = entity ?? [];
|
|
48782
|
-
const items =
|
|
48993
|
+
const items = React87__default.useMemo(() => {
|
|
48783
48994
|
if (propItems) return propItems;
|
|
48784
48995
|
if (entityData.length === 0) return [];
|
|
48785
48996
|
return entityData.map((record, idx) => {
|
|
@@ -48881,7 +49092,7 @@ var init_Timeline = __esm({
|
|
|
48881
49092
|
}
|
|
48882
49093
|
});
|
|
48883
49094
|
function extractToastProps(children) {
|
|
48884
|
-
if (!
|
|
49095
|
+
if (!React87__default.isValidElement(children)) {
|
|
48885
49096
|
if (typeof children === "string") {
|
|
48886
49097
|
return { message: children };
|
|
48887
49098
|
}
|
|
@@ -48923,7 +49134,7 @@ var init_ToastSlot = __esm({
|
|
|
48923
49134
|
eventBus.emit(`${prefix}CLOSE`);
|
|
48924
49135
|
};
|
|
48925
49136
|
if (!isVisible) return null;
|
|
48926
|
-
const isCustomContent =
|
|
49137
|
+
const isCustomContent = React87__default.isValidElement(children) && !message;
|
|
48927
49138
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
48928
49139
|
Toast,
|
|
48929
49140
|
{
|
|
@@ -48991,6 +49202,7 @@ var init_component_registry_generated = __esm({
|
|
|
48991
49202
|
init_ChoiceButton();
|
|
48992
49203
|
init_CodeBlock();
|
|
48993
49204
|
init_CodeRunnerPanel();
|
|
49205
|
+
init_CommandPalette();
|
|
48994
49206
|
init_CommunityLinks();
|
|
48995
49207
|
init_ConditionalWrapper();
|
|
48996
49208
|
init_ConfettiEffect();
|
|
@@ -49265,6 +49477,7 @@ var init_component_registry_generated = __esm({
|
|
|
49265
49477
|
"ChoiceButton": ChoiceButton,
|
|
49266
49478
|
"CodeBlock": CodeBlock,
|
|
49267
49479
|
"CodeRunnerPanel": CodeRunnerPanel,
|
|
49480
|
+
"CommandPalette": CommandPalette,
|
|
49268
49481
|
"CommunityLinks": CommunityLinks,
|
|
49269
49482
|
"ConditionalWrapper": ConditionalWrapper,
|
|
49270
49483
|
"ConfettiEffect": ConfettiEffect,
|
|
@@ -49513,7 +49726,7 @@ function SuspenseConfigProvider({
|
|
|
49513
49726
|
config,
|
|
49514
49727
|
children
|
|
49515
49728
|
}) {
|
|
49516
|
-
return
|
|
49729
|
+
return React87__default.createElement(
|
|
49517
49730
|
SuspenseConfigContext.Provider,
|
|
49518
49731
|
{ value: config },
|
|
49519
49732
|
children
|
|
@@ -49561,7 +49774,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
49561
49774
|
}
|
|
49562
49775
|
return { name: field, label: humanizeFieldName(field) };
|
|
49563
49776
|
}
|
|
49564
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
49777
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React87__default.isValidElement(field) && !(field instanceof Date)) {
|
|
49565
49778
|
const obj = field;
|
|
49566
49779
|
const fieldName2 = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
49567
49780
|
if (!fieldName2) return field;
|
|
@@ -49614,7 +49827,7 @@ function enrichDetailFields(fields, entityDef) {
|
|
|
49614
49827
|
const meta = metaFor(field);
|
|
49615
49828
|
return meta ? { key: field, ...meta } : field;
|
|
49616
49829
|
}
|
|
49617
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
49830
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React87__default.isValidElement(field) && !(field instanceof Date)) {
|
|
49618
49831
|
const obj = field;
|
|
49619
49832
|
const fieldName2 = typeof obj.key === "string" ? obj.key : typeof obj.name === "string" ? obj.name : void 0;
|
|
49620
49833
|
if (!fieldName2 || obj.type) return field;
|
|
@@ -50073,7 +50286,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
50073
50286
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
50074
50287
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
50075
50288
|
}
|
|
50076
|
-
return /* @__PURE__ */ jsx(
|
|
50289
|
+
return /* @__PURE__ */ jsx(React87__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
50077
50290
|
}
|
|
50078
50291
|
if (!child || typeof child !== "object") return null;
|
|
50079
50292
|
const childId = `${parentId}-${index}`;
|
|
@@ -50130,7 +50343,7 @@ function isPatternConfig(value) {
|
|
|
50130
50343
|
if (value === null || value === void 0) return false;
|
|
50131
50344
|
if (typeof value !== "object") return false;
|
|
50132
50345
|
if (Array.isArray(value)) return false;
|
|
50133
|
-
if (
|
|
50346
|
+
if (React87__default.isValidElement(value)) return false;
|
|
50134
50347
|
if (value instanceof Date) return false;
|
|
50135
50348
|
if (typeof value === "function") return false;
|
|
50136
50349
|
const record = value;
|
|
@@ -50143,9 +50356,9 @@ function renderPatternValue(value) {
|
|
|
50143
50356
|
if (typeof value === "string") return renderPatternChildren(value, () => {
|
|
50144
50357
|
});
|
|
50145
50358
|
if (value instanceof Date) return value.toLocaleString();
|
|
50146
|
-
if (
|
|
50359
|
+
if (React87__default.isValidElement(value)) return value;
|
|
50147
50360
|
if (Array.isArray(value)) {
|
|
50148
|
-
return value.map((item, index) => /* @__PURE__ */ jsx(
|
|
50361
|
+
return value.map((item, index) => /* @__PURE__ */ jsx(React87__default.Fragment, { children: renderPatternValue(item) }, index));
|
|
50149
50362
|
}
|
|
50150
50363
|
if (isPatternConfig(value)) {
|
|
50151
50364
|
const { type, ...props } = value;
|
|
@@ -50155,7 +50368,7 @@ function renderPatternValue(value) {
|
|
|
50155
50368
|
return null;
|
|
50156
50369
|
}
|
|
50157
50370
|
function isPlainConfigObject(value) {
|
|
50158
|
-
if (
|
|
50371
|
+
if (React87__default.isValidElement(value)) return false;
|
|
50159
50372
|
if (value instanceof Date) return false;
|
|
50160
50373
|
const proto = Object.getPrototypeOf(value);
|
|
50161
50374
|
return proto === Object.prototype || proto === null;
|
|
@@ -50329,7 +50542,7 @@ function SlotContentRenderer({
|
|
|
50329
50542
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
50330
50543
|
const slotVal = restProps[slotKey];
|
|
50331
50544
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
50332
|
-
if (
|
|
50545
|
+
if (React87__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
50333
50546
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
50334
50547
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
50335
50548
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -50383,7 +50596,7 @@ function SlotContentRenderer({
|
|
|
50383
50596
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
50384
50597
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
50385
50598
|
const sample = resolvedItems[0];
|
|
50386
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
50599
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React87__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
50387
50600
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
50388
50601
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
50389
50602
|
}
|
|
@@ -50776,7 +50989,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
50776
50989
|
}
|
|
50777
50990
|
return substituted;
|
|
50778
50991
|
}
|
|
50779
|
-
if (body !== null && typeof body === "object" && !
|
|
50992
|
+
if (body !== null && typeof body === "object" && !React87__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
50780
50993
|
const out = {};
|
|
50781
50994
|
for (const [k, v] of Object.entries(body)) {
|
|
50782
50995
|
out[k] = recur(v);
|
|
@@ -50809,7 +51022,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
50809
51022
|
}
|
|
50810
51023
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
50811
51024
|
}
|
|
50812
|
-
if (value !== null && typeof value === "object" && !
|
|
51025
|
+
if (value !== null && typeof value === "object" && !React87__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
50813
51026
|
const out = {};
|
|
50814
51027
|
for (const [k, v] of Object.entries(value)) {
|
|
50815
51028
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -50823,7 +51036,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
50823
51036
|
const resolvedBody = deferLambdaEntityExprs(
|
|
50824
51037
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
50825
51038
|
);
|
|
50826
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
51039
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React87__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
50827
51040
|
return null;
|
|
50828
51041
|
}
|
|
50829
51042
|
const record = resolvedBody;
|
|
@@ -50842,7 +51055,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
50842
51055
|
props: childProps,
|
|
50843
51056
|
priority: 0
|
|
50844
51057
|
};
|
|
50845
|
-
return
|
|
51058
|
+
return React87__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
50846
51059
|
};
|
|
50847
51060
|
}
|
|
50848
51061
|
function convertNode(node, callerKey) {
|
|
@@ -50862,7 +51075,7 @@ function convertNode(node, callerKey) {
|
|
|
50862
51075
|
});
|
|
50863
51076
|
return anyChanged ? mapped : node;
|
|
50864
51077
|
}
|
|
50865
|
-
if (typeof node === "object" && !
|
|
51078
|
+
if (typeof node === "object" && !React87__default.isValidElement(node) && !(node instanceof Date)) {
|
|
50866
51079
|
return convertObjectProps(node);
|
|
50867
51080
|
}
|
|
50868
51081
|
return node;
|