@almadar/ui 4.31.0 → 4.33.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 +1500 -1473
- package/dist/avl/index.js +420 -393
- package/dist/components/index.cjs +1305 -1278
- package/dist/components/index.js +406 -379
- package/dist/components/templates/DashboardLayout.d.ts +7 -0
- package/dist/context/CurrentPagePathContext.d.ts +9 -0
- package/dist/context/index.cjs +10 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.js +8 -1
- package/dist/providers/index.cjs +1130 -1103
- package/dist/providers/index.js +398 -371
- package/dist/runtime/index.cjs +1166 -1139
- package/dist/runtime/index.js +402 -375
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { OrbitControls as OrbitControls$1, Grid as Grid$1, Stars, Sparkles, Html, RoundedBox } from '@react-three/drei';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React119 from 'react';
|
|
4
|
+
import React119__default, { createContext, useContext, useRef, useState, useCallback, useMemo, useEffect, Suspense, useLayoutEffect, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
5
5
|
import * as LucideIcons from 'lucide-react';
|
|
6
6
|
import { Loader2, ChevronDown, X, Check, Copy, AlertTriangle, Info, AlertCircle, CheckCircle, List, Printer, ChevronRight, ChevronLeft, Code, FileText, WrapText, Trash2, Menu as Menu$1, Search, Bell, LogOut, ZoomOut, ZoomIn, Download, FileQuestion, Inbox, XCircle, Filter, Plus, Pause, Play, RotateCcw, Package, Calendar, Pencil, Eye, MoreHorizontal, Image as Image$1, Upload, Minus, ArrowLeft, HelpCircle, ChevronUp, Eraser, Star, TrendingUp, TrendingDown, ArrowUp, ArrowDown, MoreVertical, Sun, Moon, Circle, Clock, CheckCircle2, ArrowRight, FileWarning, SkipForward, Bug, Send, Wrench, User, Tag, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
7
7
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
@@ -3336,7 +3336,7 @@ var init_Box = __esm({
|
|
|
3336
3336
|
fixed: "fixed",
|
|
3337
3337
|
sticky: "sticky"
|
|
3338
3338
|
};
|
|
3339
|
-
Box =
|
|
3339
|
+
Box = React119__default.forwardRef(
|
|
3340
3340
|
({
|
|
3341
3341
|
padding,
|
|
3342
3342
|
paddingX,
|
|
@@ -5067,7 +5067,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5067
5067
|
const IconComp = value;
|
|
5068
5068
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5069
5069
|
}
|
|
5070
|
-
if (
|
|
5070
|
+
if (React119__default.isValidElement(value)) {
|
|
5071
5071
|
return value;
|
|
5072
5072
|
}
|
|
5073
5073
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -5143,7 +5143,7 @@ var init_Button = __esm({
|
|
|
5143
5143
|
md: "h-4 w-4",
|
|
5144
5144
|
lg: "h-5 w-5"
|
|
5145
5145
|
};
|
|
5146
|
-
Button =
|
|
5146
|
+
Button = React119__default.forwardRef(
|
|
5147
5147
|
({
|
|
5148
5148
|
className,
|
|
5149
5149
|
variant = "primary",
|
|
@@ -5246,7 +5246,7 @@ var init_Badge = __esm({
|
|
|
5246
5246
|
md: "px-2.5 py-1 text-sm",
|
|
5247
5247
|
lg: "px-3 py-1.5 text-base"
|
|
5248
5248
|
};
|
|
5249
|
-
Badge =
|
|
5249
|
+
Badge = React119__default.forwardRef(
|
|
5250
5250
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
5251
5251
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
5252
5252
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -5406,7 +5406,7 @@ var Input;
|
|
|
5406
5406
|
var init_Input = __esm({
|
|
5407
5407
|
"components/atoms/Input.tsx"() {
|
|
5408
5408
|
init_cn();
|
|
5409
|
-
Input =
|
|
5409
|
+
Input = React119__default.forwardRef(
|
|
5410
5410
|
({
|
|
5411
5411
|
className,
|
|
5412
5412
|
inputType,
|
|
@@ -5524,7 +5524,7 @@ var Label;
|
|
|
5524
5524
|
var init_Label = __esm({
|
|
5525
5525
|
"components/atoms/Label.tsx"() {
|
|
5526
5526
|
init_cn();
|
|
5527
|
-
Label =
|
|
5527
|
+
Label = React119__default.forwardRef(
|
|
5528
5528
|
({ className, required, children, ...props }, ref) => {
|
|
5529
5529
|
return /* @__PURE__ */ jsxs(
|
|
5530
5530
|
"label",
|
|
@@ -5550,7 +5550,7 @@ var Textarea;
|
|
|
5550
5550
|
var init_Textarea = __esm({
|
|
5551
5551
|
"components/atoms/Textarea.tsx"() {
|
|
5552
5552
|
init_cn();
|
|
5553
|
-
Textarea =
|
|
5553
|
+
Textarea = React119__default.forwardRef(
|
|
5554
5554
|
({ className, error, ...props }, ref) => {
|
|
5555
5555
|
return /* @__PURE__ */ jsx(
|
|
5556
5556
|
"textarea",
|
|
@@ -5579,7 +5579,7 @@ var Select;
|
|
|
5579
5579
|
var init_Select = __esm({
|
|
5580
5580
|
"components/atoms/Select.tsx"() {
|
|
5581
5581
|
init_cn();
|
|
5582
|
-
Select =
|
|
5582
|
+
Select = React119__default.forwardRef(
|
|
5583
5583
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
5584
5584
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
5585
5585
|
/* @__PURE__ */ jsxs(
|
|
@@ -5621,7 +5621,7 @@ var Checkbox;
|
|
|
5621
5621
|
var init_Checkbox = __esm({
|
|
5622
5622
|
"components/atoms/Checkbox.tsx"() {
|
|
5623
5623
|
init_cn();
|
|
5624
|
-
Checkbox =
|
|
5624
|
+
Checkbox = React119__default.forwardRef(
|
|
5625
5625
|
({ className, label, id, ...props }, ref) => {
|
|
5626
5626
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
5627
5627
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -5703,7 +5703,7 @@ var init_Card = __esm({
|
|
|
5703
5703
|
md: "shadow",
|
|
5704
5704
|
lg: "shadow-lg"
|
|
5705
5705
|
};
|
|
5706
|
-
Card =
|
|
5706
|
+
Card = React119__default.forwardRef(
|
|
5707
5707
|
({
|
|
5708
5708
|
className,
|
|
5709
5709
|
variant = "bordered",
|
|
@@ -5739,9 +5739,9 @@ var init_Card = __esm({
|
|
|
5739
5739
|
}
|
|
5740
5740
|
);
|
|
5741
5741
|
Card.displayName = "Card";
|
|
5742
|
-
CardHeader =
|
|
5742
|
+
CardHeader = React119__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
5743
5743
|
CardHeader.displayName = "CardHeader";
|
|
5744
|
-
CardTitle =
|
|
5744
|
+
CardTitle = React119__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5745
5745
|
"h3",
|
|
5746
5746
|
{
|
|
5747
5747
|
ref,
|
|
@@ -5754,11 +5754,11 @@ var init_Card = __esm({
|
|
|
5754
5754
|
}
|
|
5755
5755
|
));
|
|
5756
5756
|
CardTitle.displayName = "CardTitle";
|
|
5757
|
-
CardContent =
|
|
5757
|
+
CardContent = React119__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
5758
5758
|
CardContent.displayName = "CardContent";
|
|
5759
5759
|
CardBody = CardContent;
|
|
5760
5760
|
CardBody.displayName = "CardBody";
|
|
5761
|
-
CardFooter =
|
|
5761
|
+
CardFooter = React119__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5762
5762
|
"div",
|
|
5763
5763
|
{
|
|
5764
5764
|
ref,
|
|
@@ -5779,7 +5779,7 @@ var init_Spinner = __esm({
|
|
|
5779
5779
|
md: "h-6 w-6",
|
|
5780
5780
|
lg: "h-8 w-8"
|
|
5781
5781
|
};
|
|
5782
|
-
Spinner =
|
|
5782
|
+
Spinner = React119__default.forwardRef(
|
|
5783
5783
|
({ className, size = "md", ...props }, ref) => {
|
|
5784
5784
|
return /* @__PURE__ */ jsx(
|
|
5785
5785
|
"div",
|
|
@@ -6227,7 +6227,7 @@ var Radio;
|
|
|
6227
6227
|
var init_Radio = __esm({
|
|
6228
6228
|
"components/atoms/Radio.tsx"() {
|
|
6229
6229
|
init_cn();
|
|
6230
|
-
Radio =
|
|
6230
|
+
Radio = React119__default.forwardRef(
|
|
6231
6231
|
({
|
|
6232
6232
|
label,
|
|
6233
6233
|
helperText,
|
|
@@ -6338,7 +6338,7 @@ var init_Switch = __esm({
|
|
|
6338
6338
|
"components/atoms/Switch.tsx"() {
|
|
6339
6339
|
"use client";
|
|
6340
6340
|
init_cn();
|
|
6341
|
-
Switch =
|
|
6341
|
+
Switch = React119.forwardRef(
|
|
6342
6342
|
({
|
|
6343
6343
|
checked,
|
|
6344
6344
|
defaultChecked = false,
|
|
@@ -6349,10 +6349,10 @@ var init_Switch = __esm({
|
|
|
6349
6349
|
name,
|
|
6350
6350
|
className
|
|
6351
6351
|
}, ref) => {
|
|
6352
|
-
const [isChecked, setIsChecked] =
|
|
6352
|
+
const [isChecked, setIsChecked] = React119.useState(
|
|
6353
6353
|
checked !== void 0 ? checked : defaultChecked
|
|
6354
6354
|
);
|
|
6355
|
-
|
|
6355
|
+
React119.useEffect(() => {
|
|
6356
6356
|
if (checked !== void 0) {
|
|
6357
6357
|
setIsChecked(checked);
|
|
6358
6358
|
}
|
|
@@ -6686,8 +6686,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6686
6686
|
position = "top",
|
|
6687
6687
|
className
|
|
6688
6688
|
}) => {
|
|
6689
|
-
const [isVisible, setIsVisible] =
|
|
6690
|
-
const timeoutRef =
|
|
6689
|
+
const [isVisible, setIsVisible] = React119__default.useState(false);
|
|
6690
|
+
const timeoutRef = React119__default.useRef(null);
|
|
6691
6691
|
const handleMouseEnter = () => {
|
|
6692
6692
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6693
6693
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -6696,7 +6696,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6696
6696
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6697
6697
|
setIsVisible(false);
|
|
6698
6698
|
};
|
|
6699
|
-
|
|
6699
|
+
React119__default.useEffect(() => {
|
|
6700
6700
|
return () => {
|
|
6701
6701
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6702
6702
|
};
|
|
@@ -6906,7 +6906,7 @@ var init_StatusDot = __esm({
|
|
|
6906
6906
|
md: "w-2.5 h-2.5",
|
|
6907
6907
|
lg: "w-3 h-3"
|
|
6908
6908
|
};
|
|
6909
|
-
StatusDot =
|
|
6909
|
+
StatusDot = React119__default.forwardRef(
|
|
6910
6910
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
6911
6911
|
return /* @__PURE__ */ jsx(
|
|
6912
6912
|
"span",
|
|
@@ -6959,7 +6959,7 @@ var init_TrendIndicator = __esm({
|
|
|
6959
6959
|
down: TrendingDown,
|
|
6960
6960
|
flat: ArrowRight
|
|
6961
6961
|
};
|
|
6962
|
-
TrendIndicator =
|
|
6962
|
+
TrendIndicator = React119__default.forwardRef(
|
|
6963
6963
|
({
|
|
6964
6964
|
className,
|
|
6965
6965
|
value,
|
|
@@ -7026,7 +7026,7 @@ var init_RangeSlider = __esm({
|
|
|
7026
7026
|
md: "w-4 h-4",
|
|
7027
7027
|
lg: "w-5 h-5"
|
|
7028
7028
|
};
|
|
7029
|
-
RangeSlider =
|
|
7029
|
+
RangeSlider = React119__default.forwardRef(
|
|
7030
7030
|
({
|
|
7031
7031
|
className,
|
|
7032
7032
|
min = 0,
|
|
@@ -7673,9 +7673,9 @@ function ScoreDisplay({
|
|
|
7673
7673
|
...rest
|
|
7674
7674
|
}) {
|
|
7675
7675
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
7676
|
-
const [displayValue, setDisplayValue] =
|
|
7677
|
-
const [isAnimating, setIsAnimating] =
|
|
7678
|
-
|
|
7676
|
+
const [displayValue, setDisplayValue] = React119.useState(resolvedValue);
|
|
7677
|
+
const [isAnimating, setIsAnimating] = React119.useState(false);
|
|
7678
|
+
React119.useEffect(() => {
|
|
7679
7679
|
if (!animated || displayValue === resolvedValue) {
|
|
7680
7680
|
setDisplayValue(resolvedValue);
|
|
7681
7681
|
return;
|
|
@@ -7745,9 +7745,9 @@ function ControlButton({
|
|
|
7745
7745
|
className
|
|
7746
7746
|
}) {
|
|
7747
7747
|
const eventBus = useEventBus();
|
|
7748
|
-
const [isPressed, setIsPressed] =
|
|
7748
|
+
const [isPressed, setIsPressed] = React119.useState(false);
|
|
7749
7749
|
const actualPressed = pressed ?? isPressed;
|
|
7750
|
-
const handlePointerDown =
|
|
7750
|
+
const handlePointerDown = React119.useCallback(
|
|
7751
7751
|
(e) => {
|
|
7752
7752
|
e.preventDefault();
|
|
7753
7753
|
if (disabled) return;
|
|
@@ -7757,7 +7757,7 @@ function ControlButton({
|
|
|
7757
7757
|
},
|
|
7758
7758
|
[disabled, pressEvent, eventBus, onPress]
|
|
7759
7759
|
);
|
|
7760
|
-
const handlePointerUp =
|
|
7760
|
+
const handlePointerUp = React119.useCallback(
|
|
7761
7761
|
(e) => {
|
|
7762
7762
|
e.preventDefault();
|
|
7763
7763
|
if (disabled) return;
|
|
@@ -7767,7 +7767,7 @@ function ControlButton({
|
|
|
7767
7767
|
},
|
|
7768
7768
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7769
7769
|
);
|
|
7770
|
-
const handlePointerLeave =
|
|
7770
|
+
const handlePointerLeave = React119.useCallback(
|
|
7771
7771
|
(e) => {
|
|
7772
7772
|
if (isPressed) {
|
|
7773
7773
|
setIsPressed(false);
|
|
@@ -8665,9 +8665,9 @@ function MiniMap({
|
|
|
8665
8665
|
viewportRect,
|
|
8666
8666
|
className
|
|
8667
8667
|
}) {
|
|
8668
|
-
const canvasRef =
|
|
8669
|
-
const frameRef =
|
|
8670
|
-
|
|
8668
|
+
const canvasRef = React119.useRef(null);
|
|
8669
|
+
const frameRef = React119.useRef(0);
|
|
8670
|
+
React119.useEffect(() => {
|
|
8671
8671
|
const canvas = canvasRef.current;
|
|
8672
8672
|
if (!canvas) return;
|
|
8673
8673
|
const ctx = canvas.getContext("2d");
|
|
@@ -8960,7 +8960,7 @@ var init_ErrorBoundary = __esm({
|
|
|
8960
8960
|
"use client";
|
|
8961
8961
|
init_cn();
|
|
8962
8962
|
init_ErrorState();
|
|
8963
|
-
ErrorBoundary = class extends
|
|
8963
|
+
ErrorBoundary = class extends React119__default.Component {
|
|
8964
8964
|
constructor(props) {
|
|
8965
8965
|
super(props);
|
|
8966
8966
|
__publicField(this, "reset", () => {
|
|
@@ -9407,8 +9407,8 @@ var init_Tooltip = __esm({
|
|
|
9407
9407
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
9408
9408
|
};
|
|
9409
9409
|
}, []);
|
|
9410
|
-
const triggerElement =
|
|
9411
|
-
const trigger =
|
|
9410
|
+
const triggerElement = React119__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9411
|
+
const trigger = React119__default.cloneElement(triggerElement, {
|
|
9412
9412
|
ref: triggerRef,
|
|
9413
9413
|
onMouseEnter: handleMouseEnter,
|
|
9414
9414
|
onMouseLeave: handleMouseLeave,
|
|
@@ -9529,8 +9529,8 @@ var init_Popover = __esm({
|
|
|
9529
9529
|
onMouseEnter: handleOpen,
|
|
9530
9530
|
onMouseLeave: handleClose
|
|
9531
9531
|
};
|
|
9532
|
-
const childElement =
|
|
9533
|
-
const triggerElement =
|
|
9532
|
+
const childElement = React119__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9533
|
+
const triggerElement = React119__default.cloneElement(
|
|
9534
9534
|
childElement,
|
|
9535
9535
|
{
|
|
9536
9536
|
ref: triggerRef,
|
|
@@ -9647,8 +9647,8 @@ var init_Menu = __esm({
|
|
|
9647
9647
|
"bottom-start": "top-full left-0 mt-2",
|
|
9648
9648
|
"bottom-end": "top-full right-0 mt-2"
|
|
9649
9649
|
};
|
|
9650
|
-
const triggerChild =
|
|
9651
|
-
const triggerElement =
|
|
9650
|
+
const triggerChild = React119__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
9651
|
+
const triggerElement = React119__default.cloneElement(
|
|
9652
9652
|
triggerChild,
|
|
9653
9653
|
{
|
|
9654
9654
|
ref: triggerRef,
|
|
@@ -10167,7 +10167,7 @@ var init_MapView = __esm({
|
|
|
10167
10167
|
shadowSize: [41, 41]
|
|
10168
10168
|
});
|
|
10169
10169
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
10170
|
-
const { useEffect: useEffect81, useRef: useRef81, useCallback: useCallback105, useState: useState107 } =
|
|
10170
|
+
const { useEffect: useEffect81, useRef: useRef81, useCallback: useCallback105, useState: useState107 } = React119__default;
|
|
10171
10171
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
10172
10172
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
10173
10173
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -10398,7 +10398,7 @@ function InputPattern({
|
|
|
10398
10398
|
fieldName
|
|
10399
10399
|
}) {
|
|
10400
10400
|
const { emit } = useEventBus();
|
|
10401
|
-
const [localValue, setLocalValue] =
|
|
10401
|
+
const [localValue, setLocalValue] = React119__default.useState(value);
|
|
10402
10402
|
const handleChange = (e) => {
|
|
10403
10403
|
setLocalValue(e.target.value);
|
|
10404
10404
|
if (onChange) {
|
|
@@ -10436,7 +10436,7 @@ function TextareaPattern({
|
|
|
10436
10436
|
fieldName
|
|
10437
10437
|
}) {
|
|
10438
10438
|
const { emit } = useEventBus();
|
|
10439
|
-
const [localValue, setLocalValue] =
|
|
10439
|
+
const [localValue, setLocalValue] = React119__default.useState(value);
|
|
10440
10440
|
const handleChange = (e) => {
|
|
10441
10441
|
setLocalValue(e.target.value);
|
|
10442
10442
|
if (onChange) {
|
|
@@ -10468,7 +10468,7 @@ function SelectPattern({
|
|
|
10468
10468
|
fieldName
|
|
10469
10469
|
}) {
|
|
10470
10470
|
const { emit } = useEventBus();
|
|
10471
|
-
const [localValue, setLocalValue] =
|
|
10471
|
+
const [localValue, setLocalValue] = React119__default.useState(value);
|
|
10472
10472
|
const handleChange = (e) => {
|
|
10473
10473
|
setLocalValue(e.target.value);
|
|
10474
10474
|
if (onChange) {
|
|
@@ -10497,7 +10497,7 @@ function CheckboxPattern({
|
|
|
10497
10497
|
className
|
|
10498
10498
|
}) {
|
|
10499
10499
|
const { emit } = useEventBus();
|
|
10500
|
-
const [localChecked, setLocalChecked] =
|
|
10500
|
+
const [localChecked, setLocalChecked] = React119__default.useState(checked);
|
|
10501
10501
|
const handleChange = (e) => {
|
|
10502
10502
|
setLocalChecked(e.target.checked);
|
|
10503
10503
|
if (onChange) {
|
|
@@ -10728,8 +10728,8 @@ function ActionButtons({
|
|
|
10728
10728
|
disabled
|
|
10729
10729
|
}) {
|
|
10730
10730
|
const eventBus = useEventBus();
|
|
10731
|
-
const [activeButtons, setActiveButtons] =
|
|
10732
|
-
const handlePress =
|
|
10731
|
+
const [activeButtons, setActiveButtons] = React119.useState(/* @__PURE__ */ new Set());
|
|
10732
|
+
const handlePress = React119.useCallback(
|
|
10733
10733
|
(id) => {
|
|
10734
10734
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
10735
10735
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -10737,7 +10737,7 @@ function ActionButtons({
|
|
|
10737
10737
|
},
|
|
10738
10738
|
[actionEvent, eventBus, onAction]
|
|
10739
10739
|
);
|
|
10740
|
-
const handleRelease =
|
|
10740
|
+
const handleRelease = React119.useCallback(
|
|
10741
10741
|
(id) => {
|
|
10742
10742
|
setActiveButtons((prev) => {
|
|
10743
10743
|
const next = new Set(prev);
|
|
@@ -12804,7 +12804,7 @@ var init_MarkdownContent = __esm({
|
|
|
12804
12804
|
init_Box();
|
|
12805
12805
|
init_useTranslate();
|
|
12806
12806
|
init_cn();
|
|
12807
|
-
MarkdownContent =
|
|
12807
|
+
MarkdownContent = React119__default.memo(
|
|
12808
12808
|
({ content, direction, className }) => {
|
|
12809
12809
|
const { t: _t } = useTranslate();
|
|
12810
12810
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -13021,7 +13021,7 @@ var init_CodeBlock = __esm({
|
|
|
13021
13021
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
13022
13022
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13023
13023
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13024
|
-
CodeBlock =
|
|
13024
|
+
CodeBlock = React119__default.memo(
|
|
13025
13025
|
({
|
|
13026
13026
|
code: rawCode,
|
|
13027
13027
|
language = "text",
|
|
@@ -14330,7 +14330,7 @@ var init_StateMachineView = __esm({
|
|
|
14330
14330
|
style: { top: title ? 30 : 0 },
|
|
14331
14331
|
children: [
|
|
14332
14332
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14333
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14333
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React119__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14334
14334
|
StateNode,
|
|
14335
14335
|
{
|
|
14336
14336
|
state,
|
|
@@ -20117,7 +20117,7 @@ function CraftingRecipe({
|
|
|
20117
20117
|
className
|
|
20118
20118
|
}) {
|
|
20119
20119
|
const eventBus = useEventBus();
|
|
20120
|
-
const handleCraft =
|
|
20120
|
+
const handleCraft = React119.useCallback(() => {
|
|
20121
20121
|
onCraft?.();
|
|
20122
20122
|
if (craftEvent) {
|
|
20123
20123
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -20134,7 +20134,7 @@ function CraftingRecipe({
|
|
|
20134
20134
|
children: [
|
|
20135
20135
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
20136
20136
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
20137
|
-
return /* @__PURE__ */ jsxs(
|
|
20137
|
+
return /* @__PURE__ */ jsxs(React119.Fragment, { children: [
|
|
20138
20138
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
20139
20139
|
ItemSlot,
|
|
20140
20140
|
{
|
|
@@ -20428,8 +20428,8 @@ function DPad({
|
|
|
20428
20428
|
}) {
|
|
20429
20429
|
const eventBus = useEventBus();
|
|
20430
20430
|
const sizes = sizeMap15[size];
|
|
20431
|
-
const [activeDirections, setActiveDirections] =
|
|
20432
|
-
const handlePress =
|
|
20431
|
+
const [activeDirections, setActiveDirections] = React119.useState(/* @__PURE__ */ new Set());
|
|
20432
|
+
const handlePress = React119.useCallback(
|
|
20433
20433
|
(direction) => {
|
|
20434
20434
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
20435
20435
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -20437,7 +20437,7 @@ function DPad({
|
|
|
20437
20437
|
},
|
|
20438
20438
|
[directionEvent, eventBus, onDirection]
|
|
20439
20439
|
);
|
|
20440
|
-
const handleRelease =
|
|
20440
|
+
const handleRelease = React119.useCallback(
|
|
20441
20441
|
(direction) => {
|
|
20442
20442
|
setActiveDirections((prev) => {
|
|
20443
20443
|
const next = new Set(prev);
|
|
@@ -20569,6 +20569,19 @@ var init_useAuthContext = __esm({
|
|
|
20569
20569
|
"hooks/useAuthContext.ts"() {
|
|
20570
20570
|
}
|
|
20571
20571
|
});
|
|
20572
|
+
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
20573
|
+
var init_CurrentPagePathContext = __esm({
|
|
20574
|
+
"context/CurrentPagePathContext.tsx"() {
|
|
20575
|
+
"use client";
|
|
20576
|
+
CurrentPagePathContext = createContext(void 0);
|
|
20577
|
+
CurrentPagePathProvider = ({
|
|
20578
|
+
value,
|
|
20579
|
+
children
|
|
20580
|
+
}) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
|
|
20581
|
+
CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
|
|
20582
|
+
useCurrentPagePath = () => useContext(CurrentPagePathContext);
|
|
20583
|
+
}
|
|
20584
|
+
});
|
|
20572
20585
|
var DashboardLayout, NavLink;
|
|
20573
20586
|
var init_DashboardLayout = __esm({
|
|
20574
20587
|
"components/templates/DashboardLayout.tsx"() {
|
|
@@ -20582,6 +20595,7 @@ var init_DashboardLayout = __esm({
|
|
|
20582
20595
|
init_useAuthContext();
|
|
20583
20596
|
init_useEventBus();
|
|
20584
20597
|
init_useTranslate();
|
|
20598
|
+
init_CurrentPagePathContext();
|
|
20585
20599
|
DashboardLayout = ({
|
|
20586
20600
|
appName = "{{APP_TITLE}}",
|
|
20587
20601
|
logo,
|
|
@@ -20598,6 +20612,7 @@ var init_DashboardLayout = __esm({
|
|
|
20598
20612
|
showThemeToggle = true,
|
|
20599
20613
|
sidebarFooter,
|
|
20600
20614
|
onSignOut: onSignOutProp,
|
|
20615
|
+
currentPath,
|
|
20601
20616
|
children
|
|
20602
20617
|
}) => {
|
|
20603
20618
|
const eventBus = useEventBus();
|
|
@@ -20618,259 +20633,271 @@ var init_DashboardLayout = __esm({
|
|
|
20618
20633
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
20619
20634
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
20620
20635
|
const location = useLocation();
|
|
20636
|
+
const ctxPagePath = useCurrentPagePath();
|
|
20637
|
+
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
20621
20638
|
const { signOut: authSignOut } = useAuthContext();
|
|
20622
20639
|
const user = userProp || (null);
|
|
20623
20640
|
const { t } = useTranslate();
|
|
20624
20641
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
20625
|
-
return /* @__PURE__ */ jsxs(
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
className: cn(
|
|
20638
|
-
"fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
20639
|
-
"transform transition-transform duration-200 ease-in-out lg:translate-x-0",
|
|
20640
|
-
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
20642
|
+
return /* @__PURE__ */ jsxs(
|
|
20643
|
+
HStack,
|
|
20644
|
+
{
|
|
20645
|
+
gap: "none",
|
|
20646
|
+
className: "min-h-screen w-full bg-background dark:bg-background items-stretch",
|
|
20647
|
+
children: [
|
|
20648
|
+
sidebarOpen && /* @__PURE__ */ jsx(
|
|
20649
|
+
Box,
|
|
20650
|
+
{
|
|
20651
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
20652
|
+
onClick: () => setSidebarOpen(false)
|
|
20653
|
+
}
|
|
20641
20654
|
),
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
as: "span",
|
|
20657
|
-
children: appName.charAt(0).toUpperCase()
|
|
20658
|
-
}
|
|
20659
|
-
) }),
|
|
20660
|
-
/* @__PURE__ */ jsx(
|
|
20661
|
-
Typography,
|
|
20662
|
-
{
|
|
20663
|
-
variant: "label",
|
|
20664
|
-
className: "font-semibold text-foreground dark:text-foreground",
|
|
20665
|
-
as: "span",
|
|
20666
|
-
children: appName
|
|
20667
|
-
}
|
|
20668
|
-
)
|
|
20669
|
-
] }),
|
|
20670
|
-
/* @__PURE__ */ jsx(
|
|
20671
|
-
Button,
|
|
20672
|
-
{
|
|
20673
|
-
variant: "ghost",
|
|
20674
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20675
|
-
onClick: () => setSidebarOpen(false),
|
|
20676
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
20677
|
-
}
|
|
20678
|
-
)
|
|
20679
|
-
]
|
|
20680
|
-
}
|
|
20681
|
-
),
|
|
20682
|
-
/* @__PURE__ */ jsx(
|
|
20683
|
-
VStack,
|
|
20684
|
-
{
|
|
20685
|
-
as: "nav",
|
|
20686
|
-
gap: "none",
|
|
20687
|
-
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
20688
|
-
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
20689
|
-
NavLink,
|
|
20655
|
+
/* @__PURE__ */ jsxs(
|
|
20656
|
+
Box,
|
|
20657
|
+
{
|
|
20658
|
+
as: "aside",
|
|
20659
|
+
className: cn(
|
|
20660
|
+
"z-30 w-64 flex-shrink-0 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
20661
|
+
"fixed inset-y-0 left-0 lg:static lg:translate-x-0 lg:h-auto",
|
|
20662
|
+
"transform transition-transform duration-200 ease-in-out",
|
|
20663
|
+
"flex flex-col",
|
|
20664
|
+
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
20665
|
+
),
|
|
20666
|
+
children: [
|
|
20667
|
+
/* @__PURE__ */ jsxs(
|
|
20668
|
+
HStack,
|
|
20690
20669
|
{
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
20696
|
-
|
|
20697
|
-
|
|
20698
|
-
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20712
|
-
justify: "between",
|
|
20713
|
-
className: "h-full px-4 gap-4",
|
|
20714
|
-
children: [
|
|
20715
|
-
/* @__PURE__ */ jsx(
|
|
20716
|
-
Button,
|
|
20717
|
-
{
|
|
20718
|
-
variant: "ghost",
|
|
20719
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
20720
|
-
onClick: () => setSidebarOpen(true),
|
|
20721
|
-
"aria-label": "Open sidebar",
|
|
20722
|
-
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
20723
|
-
}
|
|
20724
|
-
),
|
|
20725
|
-
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20726
|
-
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
20727
|
-
/* @__PURE__ */ jsx(
|
|
20728
|
-
Input,
|
|
20729
|
-
{
|
|
20730
|
-
type: "search",
|
|
20731
|
-
placeholder: t("common.search"),
|
|
20732
|
-
className: "pl-10 w-full",
|
|
20733
|
-
onKeyDown: (e) => {
|
|
20734
|
-
if (e.key === "Enter") {
|
|
20735
|
-
handleSearchSubmit(e.target.value);
|
|
20670
|
+
align: "center",
|
|
20671
|
+
justify: "between",
|
|
20672
|
+
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
20673
|
+
children: [
|
|
20674
|
+
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
20675
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
20676
|
+
Typography,
|
|
20677
|
+
{
|
|
20678
|
+
variant: "small",
|
|
20679
|
+
className: "text-white font-bold text-sm",
|
|
20680
|
+
as: "span",
|
|
20681
|
+
children: appName.charAt(0).toUpperCase()
|
|
20682
|
+
}
|
|
20683
|
+
) }),
|
|
20684
|
+
/* @__PURE__ */ jsx(
|
|
20685
|
+
Typography,
|
|
20686
|
+
{
|
|
20687
|
+
variant: "label",
|
|
20688
|
+
className: "font-semibold text-foreground dark:text-foreground",
|
|
20689
|
+
as: "span",
|
|
20690
|
+
children: appName
|
|
20736
20691
|
}
|
|
20692
|
+
)
|
|
20693
|
+
] }),
|
|
20694
|
+
/* @__PURE__ */ jsx(
|
|
20695
|
+
Button,
|
|
20696
|
+
{
|
|
20697
|
+
variant: "ghost",
|
|
20698
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20699
|
+
onClick: () => setSidebarOpen(false),
|
|
20700
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
20737
20701
|
}
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20702
|
+
)
|
|
20703
|
+
]
|
|
20704
|
+
}
|
|
20705
|
+
),
|
|
20706
|
+
/* @__PURE__ */ jsx(
|
|
20707
|
+
VStack,
|
|
20708
|
+
{
|
|
20709
|
+
as: "nav",
|
|
20710
|
+
gap: "none",
|
|
20711
|
+
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
20712
|
+
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
20713
|
+
NavLink,
|
|
20746
20714
|
{
|
|
20747
|
-
|
|
20748
|
-
|
|
20749
|
-
onClick: () => handleTopBarActionClick(action.event),
|
|
20750
|
-
"aria-label": action.label ?? action.icon,
|
|
20751
|
-
children: [
|
|
20752
|
-
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20753
|
-
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
20754
|
-
Box,
|
|
20755
|
-
{
|
|
20756
|
-
as: "span",
|
|
20757
|
-
className: cn(
|
|
20758
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
20759
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
20760
|
-
),
|
|
20761
|
-
children: action.badge
|
|
20762
|
-
}
|
|
20763
|
-
)
|
|
20764
|
-
]
|
|
20715
|
+
item,
|
|
20716
|
+
currentPath: activePath
|
|
20765
20717
|
},
|
|
20766
|
-
|
|
20767
|
-
))
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
20778
|
-
|
|
20779
|
-
|
|
20780
|
-
|
|
20781
|
-
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
|
|
20787
|
-
|
|
20788
|
-
user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20789
|
-
/* @__PURE__ */ jsxs(
|
|
20718
|
+
item.href
|
|
20719
|
+
))
|
|
20720
|
+
}
|
|
20721
|
+
),
|
|
20722
|
+
sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
|
|
20723
|
+
]
|
|
20724
|
+
}
|
|
20725
|
+
),
|
|
20726
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
|
|
20727
|
+
/* @__PURE__ */ jsx(
|
|
20728
|
+
Box,
|
|
20729
|
+
{
|
|
20730
|
+
as: "header",
|
|
20731
|
+
className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
|
|
20732
|
+
children: /* @__PURE__ */ jsxs(
|
|
20733
|
+
HStack,
|
|
20734
|
+
{
|
|
20735
|
+
align: "center",
|
|
20736
|
+
justify: "between",
|
|
20737
|
+
className: "h-full px-3 sm:px-4 gap-2 sm:gap-4",
|
|
20738
|
+
children: [
|
|
20739
|
+
/* @__PURE__ */ jsx(
|
|
20790
20740
|
Button,
|
|
20791
20741
|
{
|
|
20792
20742
|
variant: "ghost",
|
|
20793
|
-
className: "
|
|
20794
|
-
onClick: () =>
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
Avatar,
|
|
20798
|
-
{
|
|
20799
|
-
src: user.avatar,
|
|
20800
|
-
alt: user.name,
|
|
20801
|
-
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
20802
|
-
size: "sm"
|
|
20803
|
-
}
|
|
20804
|
-
),
|
|
20805
|
-
/* @__PURE__ */ jsx(
|
|
20806
|
-
Typography,
|
|
20807
|
-
{
|
|
20808
|
-
variant: "small",
|
|
20809
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20810
|
-
as: "span",
|
|
20811
|
-
children: user.name
|
|
20812
|
-
}
|
|
20813
|
-
),
|
|
20814
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20815
|
-
]
|
|
20743
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
20744
|
+
onClick: () => setSidebarOpen(true),
|
|
20745
|
+
"aria-label": "Open sidebar",
|
|
20746
|
+
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
20816
20747
|
}
|
|
20817
20748
|
),
|
|
20818
|
-
|
|
20749
|
+
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 min-w-0 xl:max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20750
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
20819
20751
|
/* @__PURE__ */ jsx(
|
|
20820
|
-
|
|
20752
|
+
Input,
|
|
20821
20753
|
{
|
|
20822
|
-
|
|
20823
|
-
|
|
20754
|
+
type: "search",
|
|
20755
|
+
placeholder: t("common.search"),
|
|
20756
|
+
className: "pl-10 w-full",
|
|
20757
|
+
onKeyDown: (e) => {
|
|
20758
|
+
if (e.key === "Enter") {
|
|
20759
|
+
handleSearchSubmit(e.target.value);
|
|
20760
|
+
}
|
|
20761
|
+
}
|
|
20762
|
+
}
|
|
20763
|
+
)
|
|
20764
|
+
] }) }),
|
|
20765
|
+
!searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
|
|
20766
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
20767
|
+
headerActions,
|
|
20768
|
+
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
20769
|
+
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
20770
|
+
Button,
|
|
20771
|
+
{
|
|
20772
|
+
variant: "ghost",
|
|
20773
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
20774
|
+
onClick: () => handleTopBarActionClick(action.event),
|
|
20775
|
+
"aria-label": action.label ?? action.icon,
|
|
20776
|
+
children: [
|
|
20777
|
+
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20778
|
+
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
20779
|
+
Box,
|
|
20780
|
+
{
|
|
20781
|
+
as: "span",
|
|
20782
|
+
className: cn(
|
|
20783
|
+
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
20784
|
+
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
20785
|
+
),
|
|
20786
|
+
children: action.badge
|
|
20787
|
+
}
|
|
20788
|
+
)
|
|
20789
|
+
]
|
|
20790
|
+
},
|
|
20791
|
+
`${action.event}-${idx}`
|
|
20792
|
+
)),
|
|
20793
|
+
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
20794
|
+
Button,
|
|
20795
|
+
{
|
|
20796
|
+
variant: "ghost",
|
|
20797
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
20798
|
+
onClick: handleNotificationClick,
|
|
20799
|
+
"aria-label": t("common.notifications"),
|
|
20800
|
+
children: [
|
|
20801
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20802
|
+
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
20803
|
+
Box,
|
|
20804
|
+
{
|
|
20805
|
+
as: "span",
|
|
20806
|
+
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
20807
|
+
children: unreadCount > 99 ? "99+" : unreadCount
|
|
20808
|
+
}
|
|
20809
|
+
)
|
|
20810
|
+
]
|
|
20824
20811
|
}
|
|
20825
20812
|
),
|
|
20826
|
-
/* @__PURE__ */ jsxs(Box, { className: "
|
|
20827
|
-
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
20828
|
-
/* @__PURE__ */ jsx(
|
|
20829
|
-
Typography,
|
|
20830
|
-
{
|
|
20831
|
-
variant: "small",
|
|
20832
|
-
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
20833
|
-
as: "p",
|
|
20834
|
-
children: user.name
|
|
20835
|
-
}
|
|
20836
|
-
),
|
|
20837
|
-
/* @__PURE__ */ jsx(
|
|
20838
|
-
Typography,
|
|
20839
|
-
{
|
|
20840
|
-
variant: "caption",
|
|
20841
|
-
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
20842
|
-
as: "p",
|
|
20843
|
-
children: user.email
|
|
20844
|
-
}
|
|
20845
|
-
)
|
|
20846
|
-
] }),
|
|
20813
|
+
user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20847
20814
|
/* @__PURE__ */ jsxs(
|
|
20848
20815
|
Button,
|
|
20849
20816
|
{
|
|
20850
20817
|
variant: "ghost",
|
|
20851
|
-
|
|
20852
|
-
|
|
20853
|
-
handleSignOut?.();
|
|
20854
|
-
},
|
|
20855
|
-
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
20818
|
+
className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
|
|
20819
|
+
onClick: () => setUserMenuOpen(!userMenuOpen),
|
|
20856
20820
|
children: [
|
|
20857
|
-
/* @__PURE__ */ jsx(
|
|
20858
|
-
|
|
20821
|
+
/* @__PURE__ */ jsx(
|
|
20822
|
+
Avatar,
|
|
20823
|
+
{
|
|
20824
|
+
src: user.avatar,
|
|
20825
|
+
alt: user.name,
|
|
20826
|
+
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
20827
|
+
size: "sm"
|
|
20828
|
+
}
|
|
20829
|
+
),
|
|
20830
|
+
/* @__PURE__ */ jsx(
|
|
20831
|
+
Typography,
|
|
20832
|
+
{
|
|
20833
|
+
variant: "small",
|
|
20834
|
+
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20835
|
+
as: "span",
|
|
20836
|
+
children: user.name
|
|
20837
|
+
}
|
|
20838
|
+
),
|
|
20839
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20859
20840
|
]
|
|
20860
20841
|
}
|
|
20861
|
-
)
|
|
20842
|
+
),
|
|
20843
|
+
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20844
|
+
/* @__PURE__ */ jsx(
|
|
20845
|
+
Box,
|
|
20846
|
+
{
|
|
20847
|
+
className: "fixed inset-0 z-20",
|
|
20848
|
+
onClick: () => setUserMenuOpen(false)
|
|
20849
|
+
}
|
|
20850
|
+
),
|
|
20851
|
+
/* @__PURE__ */ jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
|
|
20852
|
+
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
20853
|
+
/* @__PURE__ */ jsx(
|
|
20854
|
+
Typography,
|
|
20855
|
+
{
|
|
20856
|
+
variant: "small",
|
|
20857
|
+
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
20858
|
+
as: "p",
|
|
20859
|
+
children: user.name
|
|
20860
|
+
}
|
|
20861
|
+
),
|
|
20862
|
+
/* @__PURE__ */ jsx(
|
|
20863
|
+
Typography,
|
|
20864
|
+
{
|
|
20865
|
+
variant: "caption",
|
|
20866
|
+
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
20867
|
+
as: "p",
|
|
20868
|
+
children: user.email
|
|
20869
|
+
}
|
|
20870
|
+
)
|
|
20871
|
+
] }),
|
|
20872
|
+
/* @__PURE__ */ jsxs(
|
|
20873
|
+
Button,
|
|
20874
|
+
{
|
|
20875
|
+
variant: "ghost",
|
|
20876
|
+
onClick: () => {
|
|
20877
|
+
setUserMenuOpen(false);
|
|
20878
|
+
handleSignOut?.();
|
|
20879
|
+
},
|
|
20880
|
+
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
20881
|
+
children: [
|
|
20882
|
+
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
20883
|
+
t("auth.signOut")
|
|
20884
|
+
]
|
|
20885
|
+
}
|
|
20886
|
+
)
|
|
20887
|
+
] })
|
|
20888
|
+
] })
|
|
20862
20889
|
] })
|
|
20863
20890
|
] })
|
|
20864
|
-
]
|
|
20865
|
-
|
|
20866
|
-
|
|
20891
|
+
]
|
|
20892
|
+
}
|
|
20893
|
+
)
|
|
20867
20894
|
}
|
|
20868
|
-
)
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20895
|
+
),
|
|
20896
|
+
/* @__PURE__ */ jsx(Box, { as: "main", className: "flex-1 p-3 sm:p-4 md:p-6", children })
|
|
20897
|
+
] })
|
|
20898
|
+
]
|
|
20899
|
+
}
|
|
20900
|
+
);
|
|
20874
20901
|
};
|
|
20875
20902
|
DashboardLayout.displayName = "DashboardLayout";
|
|
20876
20903
|
NavLink = ({
|
|
@@ -21364,13 +21391,13 @@ function DataList({
|
|
|
21364
21391
|
}) {
|
|
21365
21392
|
const eventBus = useEventBus();
|
|
21366
21393
|
const { t } = useTranslate();
|
|
21367
|
-
const [visibleCount, setVisibleCount] =
|
|
21394
|
+
const [visibleCount, setVisibleCount] = React119__default.useState(pageSize || Infinity);
|
|
21368
21395
|
const fieldDefs = fields ?? columns ?? [];
|
|
21369
21396
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
21370
21397
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
21371
21398
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
21372
21399
|
const hasRenderProp = typeof children === "function";
|
|
21373
|
-
|
|
21400
|
+
React119__default.useEffect(() => {
|
|
21374
21401
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
21375
21402
|
const childrenTypeOf = typeof children;
|
|
21376
21403
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -21426,7 +21453,7 @@ function DataList({
|
|
|
21426
21453
|
const items2 = data.map((item) => item);
|
|
21427
21454
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
21428
21455
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
21429
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
21456
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
21430
21457
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
21431
21458
|
group.items.map((itemData, index) => {
|
|
21432
21459
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -21617,7 +21644,7 @@ function DataList({
|
|
|
21617
21644
|
className
|
|
21618
21645
|
),
|
|
21619
21646
|
children: [
|
|
21620
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
21647
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
21621
21648
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
21622
21649
|
group.items.map(
|
|
21623
21650
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -22764,7 +22791,7 @@ var init_WizardProgress = __esm({
|
|
|
22764
22791
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
22765
22792
|
const isActive = index === currentStep;
|
|
22766
22793
|
const isCompleted = index < currentStep;
|
|
22767
|
-
return /* @__PURE__ */ jsxs(
|
|
22794
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
22768
22795
|
/* @__PURE__ */ jsx(
|
|
22769
22796
|
"button",
|
|
22770
22797
|
{
|
|
@@ -23675,7 +23702,7 @@ function InventoryGrid({
|
|
|
23675
23702
|
const eventBus = useEventBus();
|
|
23676
23703
|
const slotCount = totalSlots ?? items.length;
|
|
23677
23704
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
23678
|
-
const handleSelect =
|
|
23705
|
+
const handleSelect = React119.useCallback(
|
|
23679
23706
|
(id) => {
|
|
23680
23707
|
onSelect?.(id);
|
|
23681
23708
|
if (selectEvent) {
|
|
@@ -23888,15 +23915,15 @@ function GameCanvas2D({
|
|
|
23888
23915
|
fps = 60,
|
|
23889
23916
|
className
|
|
23890
23917
|
}) {
|
|
23891
|
-
const canvasRef =
|
|
23892
|
-
const rafRef =
|
|
23893
|
-
const frameRef =
|
|
23894
|
-
const lastTimeRef =
|
|
23895
|
-
const onDrawRef =
|
|
23918
|
+
const canvasRef = React119.useRef(null);
|
|
23919
|
+
const rafRef = React119.useRef(0);
|
|
23920
|
+
const frameRef = React119.useRef(0);
|
|
23921
|
+
const lastTimeRef = React119.useRef(0);
|
|
23922
|
+
const onDrawRef = React119.useRef(onDraw);
|
|
23896
23923
|
onDrawRef.current = onDraw;
|
|
23897
|
-
const onTickRef =
|
|
23924
|
+
const onTickRef = React119.useRef(onTick);
|
|
23898
23925
|
onTickRef.current = onTick;
|
|
23899
|
-
|
|
23926
|
+
React119.useEffect(() => {
|
|
23900
23927
|
const canvas = canvasRef.current;
|
|
23901
23928
|
if (!canvas) return;
|
|
23902
23929
|
const ctx = canvas.getContext("2d");
|
|
@@ -24185,7 +24212,7 @@ function TurnPanel({
|
|
|
24185
24212
|
className
|
|
24186
24213
|
}) {
|
|
24187
24214
|
const eventBus = useEventBus();
|
|
24188
|
-
const handleAction =
|
|
24215
|
+
const handleAction = React119.useCallback(
|
|
24189
24216
|
(event) => {
|
|
24190
24217
|
if (event) {
|
|
24191
24218
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -24331,7 +24358,7 @@ function UnitCommandBar({
|
|
|
24331
24358
|
className
|
|
24332
24359
|
}) {
|
|
24333
24360
|
const eventBus = useEventBus();
|
|
24334
|
-
const handleCommand =
|
|
24361
|
+
const handleCommand = React119.useCallback(
|
|
24335
24362
|
(event) => {
|
|
24336
24363
|
if (event) {
|
|
24337
24364
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -24816,7 +24843,7 @@ function GameMenu({
|
|
|
24816
24843
|
} catch {
|
|
24817
24844
|
}
|
|
24818
24845
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
24819
|
-
const handleOptionClick =
|
|
24846
|
+
const handleOptionClick = React119.useCallback(
|
|
24820
24847
|
(option) => {
|
|
24821
24848
|
if (option.event && eventBus) {
|
|
24822
24849
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -24930,7 +24957,7 @@ function GameOverScreen({
|
|
|
24930
24957
|
} catch {
|
|
24931
24958
|
}
|
|
24932
24959
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
24933
|
-
const handleActionClick =
|
|
24960
|
+
const handleActionClick = React119.useCallback(
|
|
24934
24961
|
(action) => {
|
|
24935
24962
|
if (action.event && eventBus) {
|
|
24936
24963
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -28419,7 +28446,7 @@ var init_DocumentViewer = __esm({
|
|
|
28419
28446
|
}
|
|
28420
28447
|
});
|
|
28421
28448
|
function extractTitle(children) {
|
|
28422
|
-
if (!
|
|
28449
|
+
if (!React119__default.isValidElement(children)) return void 0;
|
|
28423
28450
|
const props = children.props;
|
|
28424
28451
|
if (typeof props.title === "string") {
|
|
28425
28452
|
return props.title;
|
|
@@ -28474,7 +28501,7 @@ function LinearView({
|
|
|
28474
28501
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
28475
28502
|
const isDone = i < currentIdx;
|
|
28476
28503
|
const isCurrent = i === currentIdx;
|
|
28477
|
-
return /* @__PURE__ */ jsxs(
|
|
28504
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
28478
28505
|
i > 0 && /* @__PURE__ */ jsx(
|
|
28479
28506
|
Typography,
|
|
28480
28507
|
{
|
|
@@ -29258,12 +29285,12 @@ var init_Form = __esm({
|
|
|
29258
29285
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
29259
29286
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
29260
29287
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
29261
|
-
const normalizedInitialData =
|
|
29288
|
+
const normalizedInitialData = React119__default.useMemo(() => {
|
|
29262
29289
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
29263
29290
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
29264
29291
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
29265
29292
|
}, [entity, initialData]);
|
|
29266
|
-
const entityDerivedFields =
|
|
29293
|
+
const entityDerivedFields = React119__default.useMemo(() => {
|
|
29267
29294
|
if (fields && fields.length > 0) return void 0;
|
|
29268
29295
|
if (!resolvedEntity) return void 0;
|
|
29269
29296
|
return resolvedEntity.fields.map(
|
|
@@ -29282,16 +29309,16 @@ var init_Form = __esm({
|
|
|
29282
29309
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
29283
29310
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
29284
29311
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
29285
|
-
const [formData, setFormData] =
|
|
29312
|
+
const [formData, setFormData] = React119__default.useState(
|
|
29286
29313
|
normalizedInitialData
|
|
29287
29314
|
);
|
|
29288
|
-
const [collapsedSections, setCollapsedSections] =
|
|
29315
|
+
const [collapsedSections, setCollapsedSections] = React119__default.useState(
|
|
29289
29316
|
/* @__PURE__ */ new Set()
|
|
29290
29317
|
);
|
|
29291
|
-
const [submitError, setSubmitError] =
|
|
29292
|
-
const formRef =
|
|
29318
|
+
const [submitError, setSubmitError] = React119__default.useState(null);
|
|
29319
|
+
const formRef = React119__default.useRef(null);
|
|
29293
29320
|
const formMode = props.mode;
|
|
29294
|
-
const mountedRef =
|
|
29321
|
+
const mountedRef = React119__default.useRef(false);
|
|
29295
29322
|
if (!mountedRef.current) {
|
|
29296
29323
|
mountedRef.current = true;
|
|
29297
29324
|
debug("forms", "mount", {
|
|
@@ -29304,7 +29331,7 @@ var init_Form = __esm({
|
|
|
29304
29331
|
});
|
|
29305
29332
|
}
|
|
29306
29333
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
29307
|
-
const evalContext =
|
|
29334
|
+
const evalContext = React119__default.useMemo(
|
|
29308
29335
|
() => ({
|
|
29309
29336
|
formValues: formData,
|
|
29310
29337
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -29313,7 +29340,7 @@ var init_Form = __esm({
|
|
|
29313
29340
|
}),
|
|
29314
29341
|
[formData, externalContext]
|
|
29315
29342
|
);
|
|
29316
|
-
|
|
29343
|
+
React119__default.useEffect(() => {
|
|
29317
29344
|
debug("forms", "initialData-sync", {
|
|
29318
29345
|
mode: formMode,
|
|
29319
29346
|
normalizedInitialData,
|
|
@@ -29324,7 +29351,7 @@ var init_Form = __esm({
|
|
|
29324
29351
|
setFormData(normalizedInitialData);
|
|
29325
29352
|
}
|
|
29326
29353
|
}, [normalizedInitialData]);
|
|
29327
|
-
const processCalculations =
|
|
29354
|
+
const processCalculations = React119__default.useCallback(
|
|
29328
29355
|
(changedFieldId, newFormData) => {
|
|
29329
29356
|
if (!hiddenCalculations.length) return;
|
|
29330
29357
|
const context = {
|
|
@@ -29349,7 +29376,7 @@ var init_Form = __esm({
|
|
|
29349
29376
|
},
|
|
29350
29377
|
[hiddenCalculations, externalContext, eventBus]
|
|
29351
29378
|
);
|
|
29352
|
-
const checkViolations =
|
|
29379
|
+
const checkViolations = React119__default.useCallback(
|
|
29353
29380
|
(changedFieldId, newFormData) => {
|
|
29354
29381
|
if (!violationTriggers.length) return;
|
|
29355
29382
|
const context = {
|
|
@@ -29387,7 +29414,7 @@ var init_Form = __esm({
|
|
|
29387
29414
|
processCalculations(name, newFormData);
|
|
29388
29415
|
checkViolations(name, newFormData);
|
|
29389
29416
|
};
|
|
29390
|
-
const isFieldVisible =
|
|
29417
|
+
const isFieldVisible = React119__default.useCallback(
|
|
29391
29418
|
(fieldName) => {
|
|
29392
29419
|
const condition = conditionalFields[fieldName];
|
|
29393
29420
|
if (!condition) return true;
|
|
@@ -29395,7 +29422,7 @@ var init_Form = __esm({
|
|
|
29395
29422
|
},
|
|
29396
29423
|
[conditionalFields, evalContext]
|
|
29397
29424
|
);
|
|
29398
|
-
const isSectionVisible =
|
|
29425
|
+
const isSectionVisible = React119__default.useCallback(
|
|
29399
29426
|
(section) => {
|
|
29400
29427
|
if (!section.condition) return true;
|
|
29401
29428
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -29471,7 +29498,7 @@ var init_Form = __esm({
|
|
|
29471
29498
|
eventBus.emit(`UI:${onCancel}`);
|
|
29472
29499
|
}
|
|
29473
29500
|
};
|
|
29474
|
-
const renderField =
|
|
29501
|
+
const renderField = React119__default.useCallback(
|
|
29475
29502
|
(field) => {
|
|
29476
29503
|
const fieldName = field.name || field.field;
|
|
29477
29504
|
if (!fieldName) return null;
|
|
@@ -29492,7 +29519,7 @@ var init_Form = __esm({
|
|
|
29492
29519
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
29493
29520
|
);
|
|
29494
29521
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
29495
|
-
const normalizedFields =
|
|
29522
|
+
const normalizedFields = React119__default.useMemo(() => {
|
|
29496
29523
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
29497
29524
|
return effectiveFields.map((field) => {
|
|
29498
29525
|
if (typeof field === "string") {
|
|
@@ -29514,7 +29541,7 @@ var init_Form = __esm({
|
|
|
29514
29541
|
return field;
|
|
29515
29542
|
});
|
|
29516
29543
|
}, [effectiveFields, resolvedEntity]);
|
|
29517
|
-
const schemaFields =
|
|
29544
|
+
const schemaFields = React119__default.useMemo(() => {
|
|
29518
29545
|
if (normalizedFields.length === 0) return null;
|
|
29519
29546
|
if (isDebugEnabled()) {
|
|
29520
29547
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -29524,7 +29551,7 @@ var init_Form = __esm({
|
|
|
29524
29551
|
}
|
|
29525
29552
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
29526
29553
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
29527
|
-
const sectionElements =
|
|
29554
|
+
const sectionElements = React119__default.useMemo(() => {
|
|
29528
29555
|
if (!sections || sections.length === 0) return null;
|
|
29529
29556
|
return sections.map((section) => {
|
|
29530
29557
|
if (!isSectionVisible(section)) {
|
|
@@ -31056,7 +31083,7 @@ var init_List = __esm({
|
|
|
31056
31083
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
31057
31084
|
return [];
|
|
31058
31085
|
}, [entity]);
|
|
31059
|
-
const getItemActions =
|
|
31086
|
+
const getItemActions = React119__default.useCallback(
|
|
31060
31087
|
(item) => {
|
|
31061
31088
|
if (!itemActions) return [];
|
|
31062
31089
|
if (typeof itemActions === "function") {
|
|
@@ -31493,7 +31520,7 @@ var init_MediaGallery = __esm({
|
|
|
31493
31520
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
31494
31521
|
);
|
|
31495
31522
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
31496
|
-
const items =
|
|
31523
|
+
const items = React119__default.useMemo(() => {
|
|
31497
31524
|
if (propItems) return propItems;
|
|
31498
31525
|
if (entityData.length === 0) return [];
|
|
31499
31526
|
return entityData.map((record, idx) => ({
|
|
@@ -31657,7 +31684,7 @@ var init_MediaGallery = __esm({
|
|
|
31657
31684
|
}
|
|
31658
31685
|
});
|
|
31659
31686
|
function extractTitle2(children) {
|
|
31660
|
-
if (!
|
|
31687
|
+
if (!React119__default.isValidElement(children)) return void 0;
|
|
31661
31688
|
const props = children.props;
|
|
31662
31689
|
if (typeof props.title === "string") {
|
|
31663
31690
|
return props.title;
|
|
@@ -32370,7 +32397,7 @@ var init_PageHeader = __esm({
|
|
|
32370
32397
|
info: "bg-info/10 text-info"
|
|
32371
32398
|
};
|
|
32372
32399
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
32373
|
-
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(
|
|
32400
|
+
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(React119__default.Fragment, { children: [
|
|
32374
32401
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
32375
32402
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
32376
32403
|
"a",
|
|
@@ -32563,7 +32590,7 @@ var init_debugRegistry = __esm({
|
|
|
32563
32590
|
}
|
|
32564
32591
|
});
|
|
32565
32592
|
function useDebugData() {
|
|
32566
|
-
const [data, setData] =
|
|
32593
|
+
const [data, setData] = React119.useState(() => ({
|
|
32567
32594
|
traits: [],
|
|
32568
32595
|
ticks: [],
|
|
32569
32596
|
guards: [],
|
|
@@ -32577,7 +32604,7 @@ function useDebugData() {
|
|
|
32577
32604
|
},
|
|
32578
32605
|
lastUpdate: Date.now()
|
|
32579
32606
|
}));
|
|
32580
|
-
|
|
32607
|
+
React119.useEffect(() => {
|
|
32581
32608
|
const updateData = () => {
|
|
32582
32609
|
setData({
|
|
32583
32610
|
traits: getAllTraits(),
|
|
@@ -32686,12 +32713,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
32686
32713
|
return positions;
|
|
32687
32714
|
}
|
|
32688
32715
|
function WalkMinimap() {
|
|
32689
|
-
const [walkStep, setWalkStep] =
|
|
32690
|
-
const [traits2, setTraits] =
|
|
32691
|
-
const [coveredEdges, setCoveredEdges] =
|
|
32692
|
-
const [completedTraits, setCompletedTraits] =
|
|
32693
|
-
const prevTraitRef =
|
|
32694
|
-
|
|
32716
|
+
const [walkStep, setWalkStep] = React119.useState(null);
|
|
32717
|
+
const [traits2, setTraits] = React119.useState([]);
|
|
32718
|
+
const [coveredEdges, setCoveredEdges] = React119.useState([]);
|
|
32719
|
+
const [completedTraits, setCompletedTraits] = React119.useState(/* @__PURE__ */ new Set());
|
|
32720
|
+
const prevTraitRef = React119.useRef(null);
|
|
32721
|
+
React119.useEffect(() => {
|
|
32695
32722
|
const interval = setInterval(() => {
|
|
32696
32723
|
const w = window;
|
|
32697
32724
|
const step = w.__orbitalWalkStep;
|
|
@@ -33138,15 +33165,15 @@ var init_EntitiesTab = __esm({
|
|
|
33138
33165
|
}
|
|
33139
33166
|
});
|
|
33140
33167
|
function EventFlowTab({ events: events2 }) {
|
|
33141
|
-
const [filter, setFilter] =
|
|
33142
|
-
const containerRef =
|
|
33143
|
-
const [autoScroll, setAutoScroll] =
|
|
33144
|
-
|
|
33168
|
+
const [filter, setFilter] = React119.useState("all");
|
|
33169
|
+
const containerRef = React119.useRef(null);
|
|
33170
|
+
const [autoScroll, setAutoScroll] = React119.useState(true);
|
|
33171
|
+
React119.useEffect(() => {
|
|
33145
33172
|
if (autoScroll && containerRef.current) {
|
|
33146
33173
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
33147
33174
|
}
|
|
33148
33175
|
}, [events2.length, autoScroll]);
|
|
33149
|
-
const filteredEvents =
|
|
33176
|
+
const filteredEvents = React119.useMemo(() => {
|
|
33150
33177
|
if (filter === "all") return events2;
|
|
33151
33178
|
return events2.filter((e) => e.type === filter);
|
|
33152
33179
|
}, [events2, filter]);
|
|
@@ -33265,7 +33292,7 @@ var init_EventFlowTab = __esm({
|
|
|
33265
33292
|
}
|
|
33266
33293
|
});
|
|
33267
33294
|
function GuardsPanel({ guards }) {
|
|
33268
|
-
const [filter, setFilter] =
|
|
33295
|
+
const [filter, setFilter] = React119.useState("all");
|
|
33269
33296
|
if (guards.length === 0) {
|
|
33270
33297
|
return /* @__PURE__ */ jsx(
|
|
33271
33298
|
EmptyState,
|
|
@@ -33278,7 +33305,7 @@ function GuardsPanel({ guards }) {
|
|
|
33278
33305
|
}
|
|
33279
33306
|
const passedCount = guards.filter((g) => g.result).length;
|
|
33280
33307
|
const failedCount = guards.length - passedCount;
|
|
33281
|
-
const filteredGuards =
|
|
33308
|
+
const filteredGuards = React119.useMemo(() => {
|
|
33282
33309
|
if (filter === "all") return guards;
|
|
33283
33310
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
33284
33311
|
return guards.filter((g) => !g.result);
|
|
@@ -33439,10 +33466,10 @@ function EffectBadge({ effect }) {
|
|
|
33439
33466
|
] });
|
|
33440
33467
|
}
|
|
33441
33468
|
function TransitionTimeline({ transitions }) {
|
|
33442
|
-
const containerRef =
|
|
33443
|
-
const [autoScroll, setAutoScroll] =
|
|
33444
|
-
const [expandedId, setExpandedId] =
|
|
33445
|
-
|
|
33469
|
+
const containerRef = React119.useRef(null);
|
|
33470
|
+
const [autoScroll, setAutoScroll] = React119.useState(true);
|
|
33471
|
+
const [expandedId, setExpandedId] = React119.useState(null);
|
|
33472
|
+
React119.useEffect(() => {
|
|
33446
33473
|
if (autoScroll && containerRef.current) {
|
|
33447
33474
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
33448
33475
|
}
|
|
@@ -33728,9 +33755,9 @@ function getAllEvents(traits2) {
|
|
|
33728
33755
|
}
|
|
33729
33756
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
33730
33757
|
const eventBus = useEventBus();
|
|
33731
|
-
const [log4, setLog] =
|
|
33732
|
-
const prevStatesRef =
|
|
33733
|
-
|
|
33758
|
+
const [log4, setLog] = React119.useState([]);
|
|
33759
|
+
const prevStatesRef = React119.useRef(/* @__PURE__ */ new Map());
|
|
33760
|
+
React119.useEffect(() => {
|
|
33734
33761
|
for (const trait of traits2) {
|
|
33735
33762
|
const prev = prevStatesRef.current.get(trait.id);
|
|
33736
33763
|
if (prev && prev !== trait.currentState) {
|
|
@@ -33900,10 +33927,10 @@ function VerifyModePanel({
|
|
|
33900
33927
|
serverCount,
|
|
33901
33928
|
localCount
|
|
33902
33929
|
}) {
|
|
33903
|
-
const [expanded, setExpanded] =
|
|
33904
|
-
const scrollRef =
|
|
33905
|
-
const prevCountRef =
|
|
33906
|
-
|
|
33930
|
+
const [expanded, setExpanded] = React119.useState(true);
|
|
33931
|
+
const scrollRef = React119.useRef(null);
|
|
33932
|
+
const prevCountRef = React119.useRef(0);
|
|
33933
|
+
React119.useEffect(() => {
|
|
33907
33934
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
33908
33935
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
33909
33936
|
}
|
|
@@ -33969,10 +33996,10 @@ function RuntimeDebugger({
|
|
|
33969
33996
|
defaultTab,
|
|
33970
33997
|
schema
|
|
33971
33998
|
}) {
|
|
33972
|
-
const [isCollapsed, setIsCollapsed] =
|
|
33973
|
-
const [isVisible, setIsVisible] =
|
|
33999
|
+
const [isCollapsed, setIsCollapsed] = React119.useState(mode === "verify" ? true : defaultCollapsed);
|
|
34000
|
+
const [isVisible, setIsVisible] = React119.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
33974
34001
|
const debugData = useDebugData();
|
|
33975
|
-
|
|
34002
|
+
React119.useEffect(() => {
|
|
33976
34003
|
if (mode === "inline") return;
|
|
33977
34004
|
return onDebugToggle((enabled) => {
|
|
33978
34005
|
setIsVisible(enabled);
|
|
@@ -33981,7 +34008,7 @@ function RuntimeDebugger({
|
|
|
33981
34008
|
}
|
|
33982
34009
|
});
|
|
33983
34010
|
}, [mode]);
|
|
33984
|
-
|
|
34011
|
+
React119.useEffect(() => {
|
|
33985
34012
|
if (mode === "inline") return;
|
|
33986
34013
|
const handleKeyDown = (e) => {
|
|
33987
34014
|
if (e.key === "`" && isVisible) {
|
|
@@ -34530,7 +34557,7 @@ function SequenceBar({
|
|
|
34530
34557
|
onSlotRemove(index);
|
|
34531
34558
|
}, [onSlotRemove, playing]);
|
|
34532
34559
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
34533
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
34560
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
34534
34561
|
i > 0 && /* @__PURE__ */ jsx(
|
|
34535
34562
|
Typography,
|
|
34536
34563
|
{
|
|
@@ -35875,7 +35902,7 @@ var init_StatCard = __esm({
|
|
|
35875
35902
|
const labelToUse = propLabel ?? propTitle;
|
|
35876
35903
|
const eventBus = useEventBus();
|
|
35877
35904
|
const { t } = useTranslate();
|
|
35878
|
-
const handleActionClick =
|
|
35905
|
+
const handleActionClick = React119__default.useCallback(() => {
|
|
35879
35906
|
if (action?.event) {
|
|
35880
35907
|
eventBus.emit(`UI:${action.event}`, {});
|
|
35881
35908
|
}
|
|
@@ -35886,7 +35913,7 @@ var init_StatCard = __esm({
|
|
|
35886
35913
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
35887
35914
|
const isLoading = externalLoading ?? false;
|
|
35888
35915
|
const error = externalError;
|
|
35889
|
-
const computeMetricValue =
|
|
35916
|
+
const computeMetricValue = React119__default.useCallback(
|
|
35890
35917
|
(metric, items) => {
|
|
35891
35918
|
if (metric.value !== void 0) {
|
|
35892
35919
|
return metric.value;
|
|
@@ -35925,7 +35952,7 @@ var init_StatCard = __esm({
|
|
|
35925
35952
|
},
|
|
35926
35953
|
[]
|
|
35927
35954
|
);
|
|
35928
|
-
const schemaStats =
|
|
35955
|
+
const schemaStats = React119__default.useMemo(() => {
|
|
35929
35956
|
if (!metrics || metrics.length === 0) return null;
|
|
35930
35957
|
return metrics.map((metric) => ({
|
|
35931
35958
|
label: metric.label,
|
|
@@ -35933,7 +35960,7 @@ var init_StatCard = __esm({
|
|
|
35933
35960
|
format: metric.format
|
|
35934
35961
|
}));
|
|
35935
35962
|
}, [metrics, data, computeMetricValue]);
|
|
35936
|
-
const calculatedTrend =
|
|
35963
|
+
const calculatedTrend = React119__default.useMemo(() => {
|
|
35937
35964
|
if (manualTrend !== void 0) return manualTrend;
|
|
35938
35965
|
if (previousValue === void 0 || currentValue === void 0)
|
|
35939
35966
|
return void 0;
|
|
@@ -36917,7 +36944,7 @@ var init_Timeline = __esm({
|
|
|
36917
36944
|
}) => {
|
|
36918
36945
|
const { t } = useTranslate();
|
|
36919
36946
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
36920
|
-
const items =
|
|
36947
|
+
const items = React119__default.useMemo(() => {
|
|
36921
36948
|
if (propItems) return propItems;
|
|
36922
36949
|
if (entityData.length === 0) return [];
|
|
36923
36950
|
return entityData.map((record, idx) => {
|
|
@@ -37024,7 +37051,7 @@ var init_Timeline = __esm({
|
|
|
37024
37051
|
}
|
|
37025
37052
|
});
|
|
37026
37053
|
function extractToastProps(children) {
|
|
37027
|
-
if (!
|
|
37054
|
+
if (!React119__default.isValidElement(children)) {
|
|
37028
37055
|
if (typeof children === "string") {
|
|
37029
37056
|
return { message: children };
|
|
37030
37057
|
}
|
|
@@ -37062,7 +37089,7 @@ var init_ToastSlot = __esm({
|
|
|
37062
37089
|
eventBus.emit("UI:CLOSE");
|
|
37063
37090
|
};
|
|
37064
37091
|
if (!isVisible) return null;
|
|
37065
|
-
const isCustomContent =
|
|
37092
|
+
const isCustomContent = React119__default.isValidElement(children) && !message;
|
|
37066
37093
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
37067
37094
|
Toast,
|
|
37068
37095
|
{
|
|
@@ -37331,7 +37358,7 @@ var init_WizardContainer = __esm({
|
|
|
37331
37358
|
const isCompleted = index < currentStep;
|
|
37332
37359
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37333
37360
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37334
|
-
return /* @__PURE__ */ jsxs(
|
|
37361
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
37335
37362
|
/* @__PURE__ */ jsx(
|
|
37336
37363
|
Button,
|
|
37337
37364
|
{
|
|
@@ -39520,7 +39547,7 @@ function UnitRenderer({
|
|
|
39520
39547
|
onAnimationStateChange,
|
|
39521
39548
|
animationSpeed = 1
|
|
39522
39549
|
}) {
|
|
39523
|
-
const handleUnitClick =
|
|
39550
|
+
const handleUnitClick = React119__default.useCallback(
|
|
39524
39551
|
(unit) => {
|
|
39525
39552
|
onUnitClick?.(unit);
|
|
39526
39553
|
},
|
|
@@ -42714,7 +42741,7 @@ var init_Avl3DViewer = __esm({
|
|
|
42714
42741
|
const handleTraitClick = useCallback((name) => {
|
|
42715
42742
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
42716
42743
|
}, []);
|
|
42717
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
42744
|
+
const [highlightedTrait, setHighlightedTrait] = React119__default.useState(null);
|
|
42718
42745
|
const handleTransitionClick = useCallback((index) => {
|
|
42719
42746
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
42720
42747
|
}, []);
|
|
@@ -42801,7 +42828,7 @@ var init_Avl3DViewer = __esm({
|
|
|
42801
42828
|
gap: "xs",
|
|
42802
42829
|
align: "center",
|
|
42803
42830
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
42804
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
42831
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
42805
42832
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
42806
42833
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
42807
42834
|
Box,
|
|
@@ -43179,12 +43206,12 @@ var init_three = __esm({
|
|
|
43179
43206
|
}
|
|
43180
43207
|
});
|
|
43181
43208
|
function lazyThree(name, loader) {
|
|
43182
|
-
const Lazy =
|
|
43209
|
+
const Lazy = React119__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
43183
43210
|
function ThreeWrapper(props) {
|
|
43184
|
-
return
|
|
43185
|
-
|
|
43211
|
+
return React119__default.createElement(
|
|
43212
|
+
React119__default.Suspense,
|
|
43186
43213
|
{ fallback: null },
|
|
43187
|
-
|
|
43214
|
+
React119__default.createElement(Lazy, props)
|
|
43188
43215
|
);
|
|
43189
43216
|
}
|
|
43190
43217
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -43672,7 +43699,7 @@ function SuspenseConfigProvider({
|
|
|
43672
43699
|
config,
|
|
43673
43700
|
children
|
|
43674
43701
|
}) {
|
|
43675
|
-
return
|
|
43702
|
+
return React119__default.createElement(
|
|
43676
43703
|
SuspenseConfigContext.Provider,
|
|
43677
43704
|
{ value: config },
|
|
43678
43705
|
children
|
|
@@ -44155,7 +44182,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
44155
44182
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
44156
44183
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
44157
44184
|
}
|
|
44158
|
-
return /* @__PURE__ */ jsx(
|
|
44185
|
+
return /* @__PURE__ */ jsx(React119__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
44159
44186
|
}
|
|
44160
44187
|
if (!child || typeof child !== "object") return null;
|
|
44161
44188
|
const childId = `${parentId}-${index}`;
|
|
@@ -44192,14 +44219,14 @@ function isPatternConfig(value) {
|
|
|
44192
44219
|
if (value === null || value === void 0) return false;
|
|
44193
44220
|
if (typeof value !== "object") return false;
|
|
44194
44221
|
if (Array.isArray(value)) return false;
|
|
44195
|
-
if (
|
|
44222
|
+
if (React119__default.isValidElement(value)) return false;
|
|
44196
44223
|
if (value instanceof Date) return false;
|
|
44197
44224
|
if (typeof value === "function") return false;
|
|
44198
44225
|
const record = value;
|
|
44199
44226
|
return "type" in record && typeof record.type === "string";
|
|
44200
44227
|
}
|
|
44201
44228
|
function isPlainConfigObject(value) {
|
|
44202
|
-
if (
|
|
44229
|
+
if (React119__default.isValidElement(value)) return false;
|
|
44203
44230
|
if (value instanceof Date) return false;
|
|
44204
44231
|
const proto = Object.getPrototypeOf(value);
|
|
44205
44232
|
return proto === Object.prototype || proto === null;
|
|
@@ -44860,7 +44887,7 @@ var AvlTransition = ({
|
|
|
44860
44887
|
opacity = 1,
|
|
44861
44888
|
className
|
|
44862
44889
|
}) => {
|
|
44863
|
-
const ids =
|
|
44890
|
+
const ids = React119__default.useMemo(() => {
|
|
44864
44891
|
avlTransitionId += 1;
|
|
44865
44892
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
44866
44893
|
}, []);
|
|
@@ -45621,7 +45648,7 @@ var AvlStateMachine = ({
|
|
|
45621
45648
|
color = "var(--color-primary)",
|
|
45622
45649
|
animated = false
|
|
45623
45650
|
}) => {
|
|
45624
|
-
const ids =
|
|
45651
|
+
const ids = React119__default.useMemo(() => {
|
|
45625
45652
|
avlSmId += 1;
|
|
45626
45653
|
const base = `avl-sm-${avlSmId}`;
|
|
45627
45654
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -45816,7 +45843,7 @@ var AvlOrbitalUnit = ({
|
|
|
45816
45843
|
color = "var(--color-primary)",
|
|
45817
45844
|
animated = false
|
|
45818
45845
|
}) => {
|
|
45819
|
-
const ids =
|
|
45846
|
+
const ids = React119__default.useMemo(() => {
|
|
45820
45847
|
avlOuId += 1;
|
|
45821
45848
|
const base = `avl-ou-${avlOuId}`;
|
|
45822
45849
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -45908,7 +45935,7 @@ var AvlClosedCircuit = ({
|
|
|
45908
45935
|
color = "var(--color-primary)",
|
|
45909
45936
|
animated = false
|
|
45910
45937
|
}) => {
|
|
45911
|
-
const ids =
|
|
45938
|
+
const ids = React119__default.useMemo(() => {
|
|
45912
45939
|
avlCcId += 1;
|
|
45913
45940
|
const base = `avl-cc-${avlCcId}`;
|
|
45914
45941
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -46061,7 +46088,7 @@ var AvlEmitListen = ({
|
|
|
46061
46088
|
color = "var(--color-primary)",
|
|
46062
46089
|
animated = false
|
|
46063
46090
|
}) => {
|
|
46064
|
-
const ids =
|
|
46091
|
+
const ids = React119__default.useMemo(() => {
|
|
46065
46092
|
avlElId += 1;
|
|
46066
46093
|
const base = `avl-el-${avlElId}`;
|
|
46067
46094
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -46334,7 +46361,7 @@ function renderNode(node, color, glowId) {
|
|
|
46334
46361
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
46335
46362
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
46336
46363
|
const nc = nodeColor(node.type, color);
|
|
46337
|
-
return /* @__PURE__ */ jsxs(
|
|
46364
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
46338
46365
|
node.children.map((child, i) => {
|
|
46339
46366
|
const childR = Math.max(
|
|
46340
46367
|
child.type === "operator" ? 20 : 16,
|
|
@@ -46391,7 +46418,7 @@ var AvlExprTree = ({
|
|
|
46391
46418
|
className,
|
|
46392
46419
|
color = "var(--color-primary)"
|
|
46393
46420
|
}) => {
|
|
46394
|
-
const ids =
|
|
46421
|
+
const ids = React119__default.useMemo(() => {
|
|
46395
46422
|
avlEtId += 1;
|
|
46396
46423
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
46397
46424
|
}, []);
|
|
@@ -47365,7 +47392,7 @@ var SystemNode = ({ data }) => {
|
|
|
47365
47392
|
stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
|
|
47366
47393
|
const tc = transitionCounts[s.name] ?? 0;
|
|
47367
47394
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
47368
|
-
return /* @__PURE__ */ jsxs(
|
|
47395
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
47369
47396
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
47370
47397
|
i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
|
|
47371
47398
|
] }, s.name);
|
|
@@ -47405,7 +47432,7 @@ var MiniStateMachine = ({ data, className }) => {
|
|
|
47405
47432
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
47406
47433
|
const tc = transitionCounts[s.name] ?? 0;
|
|
47407
47434
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
47408
|
-
return /* @__PURE__ */ jsxs(
|
|
47435
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
47409
47436
|
/* @__PURE__ */ jsx(
|
|
47410
47437
|
AvlState,
|
|
47411
47438
|
{
|
|
@@ -48867,7 +48894,7 @@ function resolveLambdaBindings(body, argName, arg) {
|
|
|
48867
48894
|
if (Array.isArray(body)) {
|
|
48868
48895
|
return body.map((b) => resolveLambdaBindings(b, argName, arg));
|
|
48869
48896
|
}
|
|
48870
|
-
if (body !== null && typeof body === "object" && !
|
|
48897
|
+
if (body !== null && typeof body === "object" && !React119__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
48871
48898
|
const out = {};
|
|
48872
48899
|
for (const [k, v] of Object.entries(body)) {
|
|
48873
48900
|
out[k] = resolveLambdaBindings(v, argName, arg);
|
|
@@ -48886,7 +48913,7 @@ function getSlotContentRenderer2() {
|
|
|
48886
48913
|
function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
48887
48914
|
return (item, index) => {
|
|
48888
48915
|
const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
|
|
48889
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
48916
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React119__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
48890
48917
|
return null;
|
|
48891
48918
|
}
|
|
48892
48919
|
const record = resolvedBody;
|
|
@@ -48904,7 +48931,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
|
48904
48931
|
props: childProps,
|
|
48905
48932
|
priority: 0
|
|
48906
48933
|
};
|
|
48907
|
-
return
|
|
48934
|
+
return React119__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
48908
48935
|
};
|
|
48909
48936
|
}
|
|
48910
48937
|
function convertNode(node, callerKey) {
|
|
@@ -48923,7 +48950,7 @@ function convertNode(node, callerKey) {
|
|
|
48923
48950
|
});
|
|
48924
48951
|
return anyChanged ? mapped : node;
|
|
48925
48952
|
}
|
|
48926
|
-
if (typeof node === "object" && !
|
|
48953
|
+
if (typeof node === "object" && !React119__default.isValidElement(node) && !(node instanceof Date)) {
|
|
48927
48954
|
return convertObjectProps(node);
|
|
48928
48955
|
}
|
|
48929
48956
|
return node;
|
|
@@ -50909,7 +50936,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
50909
50936
|
}
|
|
50910
50937
|
);
|
|
50911
50938
|
};
|
|
50912
|
-
var OrbPreviewNode =
|
|
50939
|
+
var OrbPreviewNode = React119__default.memo(OrbPreviewNodeInner);
|
|
50913
50940
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
50914
50941
|
var EventFlowEdgeInner = (props) => {
|
|
50915
50942
|
const {
|
|
@@ -50986,7 +51013,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
50986
51013
|
) })
|
|
50987
51014
|
] });
|
|
50988
51015
|
};
|
|
50989
|
-
var EventFlowEdge =
|
|
51016
|
+
var EventFlowEdge = React119__default.memo(EventFlowEdgeInner);
|
|
50990
51017
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
50991
51018
|
|
|
50992
51019
|
// components/molecules/avl/BehaviorComposeNode.tsx
|
|
@@ -51125,7 +51152,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
51125
51152
|
}
|
|
51126
51153
|
);
|
|
51127
51154
|
};
|
|
51128
|
-
var BehaviorComposeNode =
|
|
51155
|
+
var BehaviorComposeNode = React119__default.memo(BehaviorComposeNodeInner);
|
|
51129
51156
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
51130
51157
|
|
|
51131
51158
|
// components/molecules/avl/avl-behavior-compose-converter.ts
|
|
@@ -52057,7 +52084,7 @@ var ZoomBreadcrumb = ({
|
|
|
52057
52084
|
if (eventName && band === "detail") {
|
|
52058
52085
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
52059
52086
|
}
|
|
52060
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
52087
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
52061
52088
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
52062
52089
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
52063
52090
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -52516,7 +52543,7 @@ var EventWireOverlay = ({
|
|
|
52516
52543
|
containerW,
|
|
52517
52544
|
containerH
|
|
52518
52545
|
}) => {
|
|
52519
|
-
const ids =
|
|
52546
|
+
const ids = React119__default.useMemo(() => {
|
|
52520
52547
|
avlOczWireId += 1;
|
|
52521
52548
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
52522
52549
|
}, []);
|
|
@@ -52834,7 +52861,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
52834
52861
|
borderRadius: 6,
|
|
52835
52862
|
border: `1px solid ${color}`
|
|
52836
52863
|
},
|
|
52837
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
52864
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
52838
52865
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
52839
52866
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
52840
52867
|
Box,
|