@almadar/ui 4.34.0 → 4.35.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 +1537 -1479
- package/dist/avl/index.js +457 -399
- package/dist/components/atoms/FilterPill.d.ts +18 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/index.cjs +4382 -1512
- package/dist/components/index.js +3490 -620
- package/dist/components/molecules/BranchingLogicBuilder.d.ts +23 -0
- package/dist/components/molecules/LikertScale.d.ts +29 -0
- package/dist/components/molecules/MapView.d.ts +22 -0
- package/dist/components/molecules/MatrixQuestion.d.ts +29 -0
- package/dist/components/molecules/OptionConstraintGroup.d.ts +38 -0
- package/dist/components/molecules/PositionedCanvas.d.ts +32 -0
- package/dist/components/molecules/QrScanner.d.ts +17 -0
- package/dist/components/molecules/ReplyTree.d.ts +29 -0
- package/dist/components/molecules/RichBlockEditor.d.ts +27 -0
- package/dist/components/molecules/VersionDiff.d.ts +44 -0
- package/dist/components/molecules/VoteStack.d.ts +23 -0
- package/dist/components/molecules/index.d.ts +11 -1
- 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 +1146 -1104
- package/dist/providers/index.js +414 -372
- package/dist/runtime/createClientEffectHandlers.d.ts +9 -1
- package/dist/runtime/index.cjs +1203 -1145
- package/dist/runtime/index.js +439 -381
- 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,
|
|
@@ -10155,7 +10155,7 @@ var init_MapView = __esm({
|
|
|
10155
10155
|
import('leaflet')
|
|
10156
10156
|
]);
|
|
10157
10157
|
await import('leaflet/dist/leaflet.css');
|
|
10158
|
-
const { MapContainer, TileLayer, Marker, Popup, useMap } = reactLeaflet;
|
|
10158
|
+
const { MapContainer, TileLayer, Marker, Polyline, Popup, useMap } = reactLeaflet;
|
|
10159
10159
|
const L = leafletMod.default;
|
|
10160
10160
|
const defaultIcon = L.icon({
|
|
10161
10161
|
iconUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",
|
|
@@ -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 }) {
|
|
@@ -10198,6 +10198,7 @@ var init_MapView = __esm({
|
|
|
10198
10198
|
}
|
|
10199
10199
|
function MapViewInner({
|
|
10200
10200
|
markers = [],
|
|
10201
|
+
routes = [],
|
|
10201
10202
|
centerLat = 51.505,
|
|
10202
10203
|
centerLng = -0.09,
|
|
10203
10204
|
zoom = 13,
|
|
@@ -10266,6 +10267,20 @@ var init_MapView = __esm({
|
|
|
10266
10267
|
] }) : null
|
|
10267
10268
|
},
|
|
10268
10269
|
marker.id
|
|
10270
|
+
)),
|
|
10271
|
+
routes.map((route) => /* @__PURE__ */ jsx(
|
|
10272
|
+
Polyline,
|
|
10273
|
+
{
|
|
10274
|
+
positions: route.waypoints.map((wp) => [wp.lat, wp.lng]),
|
|
10275
|
+
pathOptions: {
|
|
10276
|
+
color: route.color ?? "var(--primary, #2563eb)",
|
|
10277
|
+
weight: route.weight ?? 4,
|
|
10278
|
+
opacity: route.opacity ?? 0.8,
|
|
10279
|
+
dashArray: route.dashArray
|
|
10280
|
+
},
|
|
10281
|
+
children: route.label ? /* @__PURE__ */ jsx(Popup, { children: /* @__PURE__ */ jsx(Typography2, { variant: "body2", children: route.label }) }) : null
|
|
10282
|
+
},
|
|
10283
|
+
route.id
|
|
10269
10284
|
))
|
|
10270
10285
|
]
|
|
10271
10286
|
},
|
|
@@ -10398,7 +10413,7 @@ function InputPattern({
|
|
|
10398
10413
|
fieldName
|
|
10399
10414
|
}) {
|
|
10400
10415
|
const { emit } = useEventBus();
|
|
10401
|
-
const [localValue, setLocalValue] =
|
|
10416
|
+
const [localValue, setLocalValue] = React119__default.useState(value);
|
|
10402
10417
|
const handleChange = (e) => {
|
|
10403
10418
|
setLocalValue(e.target.value);
|
|
10404
10419
|
if (onChange) {
|
|
@@ -10436,7 +10451,7 @@ function TextareaPattern({
|
|
|
10436
10451
|
fieldName
|
|
10437
10452
|
}) {
|
|
10438
10453
|
const { emit } = useEventBus();
|
|
10439
|
-
const [localValue, setLocalValue] =
|
|
10454
|
+
const [localValue, setLocalValue] = React119__default.useState(value);
|
|
10440
10455
|
const handleChange = (e) => {
|
|
10441
10456
|
setLocalValue(e.target.value);
|
|
10442
10457
|
if (onChange) {
|
|
@@ -10468,7 +10483,7 @@ function SelectPattern({
|
|
|
10468
10483
|
fieldName
|
|
10469
10484
|
}) {
|
|
10470
10485
|
const { emit } = useEventBus();
|
|
10471
|
-
const [localValue, setLocalValue] =
|
|
10486
|
+
const [localValue, setLocalValue] = React119__default.useState(value);
|
|
10472
10487
|
const handleChange = (e) => {
|
|
10473
10488
|
setLocalValue(e.target.value);
|
|
10474
10489
|
if (onChange) {
|
|
@@ -10497,7 +10512,7 @@ function CheckboxPattern({
|
|
|
10497
10512
|
className
|
|
10498
10513
|
}) {
|
|
10499
10514
|
const { emit } = useEventBus();
|
|
10500
|
-
const [localChecked, setLocalChecked] =
|
|
10515
|
+
const [localChecked, setLocalChecked] = React119__default.useState(checked);
|
|
10501
10516
|
const handleChange = (e) => {
|
|
10502
10517
|
setLocalChecked(e.target.checked);
|
|
10503
10518
|
if (onChange) {
|
|
@@ -10728,8 +10743,8 @@ function ActionButtons({
|
|
|
10728
10743
|
disabled
|
|
10729
10744
|
}) {
|
|
10730
10745
|
const eventBus = useEventBus();
|
|
10731
|
-
const [activeButtons, setActiveButtons] =
|
|
10732
|
-
const handlePress =
|
|
10746
|
+
const [activeButtons, setActiveButtons] = React119.useState(/* @__PURE__ */ new Set());
|
|
10747
|
+
const handlePress = React119.useCallback(
|
|
10733
10748
|
(id) => {
|
|
10734
10749
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
10735
10750
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -10737,7 +10752,7 @@ function ActionButtons({
|
|
|
10737
10752
|
},
|
|
10738
10753
|
[actionEvent, eventBus, onAction]
|
|
10739
10754
|
);
|
|
10740
|
-
const handleRelease =
|
|
10755
|
+
const handleRelease = React119.useCallback(
|
|
10741
10756
|
(id) => {
|
|
10742
10757
|
setActiveButtons((prev) => {
|
|
10743
10758
|
const next = new Set(prev);
|
|
@@ -12804,7 +12819,7 @@ var init_MarkdownContent = __esm({
|
|
|
12804
12819
|
init_Box();
|
|
12805
12820
|
init_useTranslate();
|
|
12806
12821
|
init_cn();
|
|
12807
|
-
MarkdownContent =
|
|
12822
|
+
MarkdownContent = React119__default.memo(
|
|
12808
12823
|
({ content, direction, className }) => {
|
|
12809
12824
|
const { t: _t } = useTranslate();
|
|
12810
12825
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -13021,7 +13036,7 @@ var init_CodeBlock = __esm({
|
|
|
13021
13036
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
13022
13037
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13023
13038
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13024
|
-
CodeBlock =
|
|
13039
|
+
CodeBlock = React119__default.memo(
|
|
13025
13040
|
({
|
|
13026
13041
|
code: rawCode,
|
|
13027
13042
|
language = "text",
|
|
@@ -14330,7 +14345,7 @@ var init_StateMachineView = __esm({
|
|
|
14330
14345
|
style: { top: title ? 30 : 0 },
|
|
14331
14346
|
children: [
|
|
14332
14347
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14333
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14348
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React119__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14334
14349
|
StateNode,
|
|
14335
14350
|
{
|
|
14336
14351
|
state,
|
|
@@ -20117,7 +20132,7 @@ function CraftingRecipe({
|
|
|
20117
20132
|
className
|
|
20118
20133
|
}) {
|
|
20119
20134
|
const eventBus = useEventBus();
|
|
20120
|
-
const handleCraft =
|
|
20135
|
+
const handleCraft = React119.useCallback(() => {
|
|
20121
20136
|
onCraft?.();
|
|
20122
20137
|
if (craftEvent) {
|
|
20123
20138
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -20134,7 +20149,7 @@ function CraftingRecipe({
|
|
|
20134
20149
|
children: [
|
|
20135
20150
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
20136
20151
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
20137
|
-
return /* @__PURE__ */ jsxs(
|
|
20152
|
+
return /* @__PURE__ */ jsxs(React119.Fragment, { children: [
|
|
20138
20153
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
20139
20154
|
ItemSlot,
|
|
20140
20155
|
{
|
|
@@ -20428,8 +20443,8 @@ function DPad({
|
|
|
20428
20443
|
}) {
|
|
20429
20444
|
const eventBus = useEventBus();
|
|
20430
20445
|
const sizes = sizeMap15[size];
|
|
20431
|
-
const [activeDirections, setActiveDirections] =
|
|
20432
|
-
const handlePress =
|
|
20446
|
+
const [activeDirections, setActiveDirections] = React119.useState(/* @__PURE__ */ new Set());
|
|
20447
|
+
const handlePress = React119.useCallback(
|
|
20433
20448
|
(direction) => {
|
|
20434
20449
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
20435
20450
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -20437,7 +20452,7 @@ function DPad({
|
|
|
20437
20452
|
},
|
|
20438
20453
|
[directionEvent, eventBus, onDirection]
|
|
20439
20454
|
);
|
|
20440
|
-
const handleRelease =
|
|
20455
|
+
const handleRelease = React119.useCallback(
|
|
20441
20456
|
(direction) => {
|
|
20442
20457
|
setActiveDirections((prev) => {
|
|
20443
20458
|
const next = new Set(prev);
|
|
@@ -20569,6 +20584,19 @@ var init_useAuthContext = __esm({
|
|
|
20569
20584
|
"hooks/useAuthContext.ts"() {
|
|
20570
20585
|
}
|
|
20571
20586
|
});
|
|
20587
|
+
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
20588
|
+
var init_CurrentPagePathContext = __esm({
|
|
20589
|
+
"context/CurrentPagePathContext.tsx"() {
|
|
20590
|
+
"use client";
|
|
20591
|
+
CurrentPagePathContext = createContext(void 0);
|
|
20592
|
+
CurrentPagePathProvider = ({
|
|
20593
|
+
value,
|
|
20594
|
+
children
|
|
20595
|
+
}) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
|
|
20596
|
+
CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
|
|
20597
|
+
useCurrentPagePath = () => useContext(CurrentPagePathContext);
|
|
20598
|
+
}
|
|
20599
|
+
});
|
|
20572
20600
|
var DashboardLayout, NavLink;
|
|
20573
20601
|
var init_DashboardLayout = __esm({
|
|
20574
20602
|
"components/templates/DashboardLayout.tsx"() {
|
|
@@ -20582,6 +20610,7 @@ var init_DashboardLayout = __esm({
|
|
|
20582
20610
|
init_useAuthContext();
|
|
20583
20611
|
init_useEventBus();
|
|
20584
20612
|
init_useTranslate();
|
|
20613
|
+
init_CurrentPagePathContext();
|
|
20585
20614
|
DashboardLayout = ({
|
|
20586
20615
|
appName = "{{APP_TITLE}}",
|
|
20587
20616
|
logo,
|
|
@@ -20598,6 +20627,7 @@ var init_DashboardLayout = __esm({
|
|
|
20598
20627
|
showThemeToggle = true,
|
|
20599
20628
|
sidebarFooter,
|
|
20600
20629
|
onSignOut: onSignOutProp,
|
|
20630
|
+
currentPath,
|
|
20601
20631
|
children
|
|
20602
20632
|
}) => {
|
|
20603
20633
|
const eventBus = useEventBus();
|
|
@@ -20618,259 +20648,271 @@ var init_DashboardLayout = __esm({
|
|
|
20618
20648
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
20619
20649
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
20620
20650
|
const location = useLocation();
|
|
20651
|
+
const ctxPagePath = useCurrentPagePath();
|
|
20652
|
+
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
20621
20653
|
const { signOut: authSignOut } = useAuthContext();
|
|
20622
20654
|
const user = userProp || (null);
|
|
20623
20655
|
const { t } = useTranslate();
|
|
20624
20656
|
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"
|
|
20657
|
+
return /* @__PURE__ */ jsxs(
|
|
20658
|
+
HStack,
|
|
20659
|
+
{
|
|
20660
|
+
gap: "none",
|
|
20661
|
+
className: "min-h-screen w-full bg-background dark:bg-background items-stretch",
|
|
20662
|
+
children: [
|
|
20663
|
+
sidebarOpen && /* @__PURE__ */ jsx(
|
|
20664
|
+
Box,
|
|
20665
|
+
{
|
|
20666
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
20667
|
+
onClick: () => setSidebarOpen(false)
|
|
20668
|
+
}
|
|
20641
20669
|
),
|
|
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,
|
|
20670
|
+
/* @__PURE__ */ jsxs(
|
|
20671
|
+
Box,
|
|
20672
|
+
{
|
|
20673
|
+
as: "aside",
|
|
20674
|
+
className: cn(
|
|
20675
|
+
"z-30 w-64 flex-shrink-0 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
20676
|
+
"fixed inset-y-0 left-0 lg:static lg:translate-x-0 lg:h-auto",
|
|
20677
|
+
"transform transition-transform duration-200 ease-in-out",
|
|
20678
|
+
"flex flex-col",
|
|
20679
|
+
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
20680
|
+
),
|
|
20681
|
+
children: [
|
|
20682
|
+
/* @__PURE__ */ jsxs(
|
|
20683
|
+
HStack,
|
|
20690
20684
|
{
|
|
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);
|
|
20685
|
+
align: "center",
|
|
20686
|
+
justify: "between",
|
|
20687
|
+
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
20688
|
+
children: [
|
|
20689
|
+
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
20690
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
20691
|
+
Typography,
|
|
20692
|
+
{
|
|
20693
|
+
variant: "small",
|
|
20694
|
+
className: "text-white font-bold text-sm",
|
|
20695
|
+
as: "span",
|
|
20696
|
+
children: appName.charAt(0).toUpperCase()
|
|
20697
|
+
}
|
|
20698
|
+
) }),
|
|
20699
|
+
/* @__PURE__ */ jsx(
|
|
20700
|
+
Typography,
|
|
20701
|
+
{
|
|
20702
|
+
variant: "label",
|
|
20703
|
+
className: "font-semibold text-foreground dark:text-foreground",
|
|
20704
|
+
as: "span",
|
|
20705
|
+
children: appName
|
|
20736
20706
|
}
|
|
20707
|
+
)
|
|
20708
|
+
] }),
|
|
20709
|
+
/* @__PURE__ */ jsx(
|
|
20710
|
+
Button,
|
|
20711
|
+
{
|
|
20712
|
+
variant: "ghost",
|
|
20713
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20714
|
+
onClick: () => setSidebarOpen(false),
|
|
20715
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
20737
20716
|
}
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20717
|
+
)
|
|
20718
|
+
]
|
|
20719
|
+
}
|
|
20720
|
+
),
|
|
20721
|
+
/* @__PURE__ */ jsx(
|
|
20722
|
+
VStack,
|
|
20723
|
+
{
|
|
20724
|
+
as: "nav",
|
|
20725
|
+
gap: "none",
|
|
20726
|
+
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
20727
|
+
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
20728
|
+
NavLink,
|
|
20746
20729
|
{
|
|
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
|
-
]
|
|
20730
|
+
item,
|
|
20731
|
+
currentPath: activePath
|
|
20765
20732
|
},
|
|
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(
|
|
20733
|
+
item.href
|
|
20734
|
+
))
|
|
20735
|
+
}
|
|
20736
|
+
),
|
|
20737
|
+
sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
|
|
20738
|
+
]
|
|
20739
|
+
}
|
|
20740
|
+
),
|
|
20741
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
|
|
20742
|
+
/* @__PURE__ */ jsx(
|
|
20743
|
+
Box,
|
|
20744
|
+
{
|
|
20745
|
+
as: "header",
|
|
20746
|
+
className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
|
|
20747
|
+
children: /* @__PURE__ */ jsxs(
|
|
20748
|
+
HStack,
|
|
20749
|
+
{
|
|
20750
|
+
align: "center",
|
|
20751
|
+
justify: "between",
|
|
20752
|
+
className: "h-full px-3 sm:px-4 gap-2 sm:gap-4",
|
|
20753
|
+
children: [
|
|
20754
|
+
/* @__PURE__ */ jsx(
|
|
20790
20755
|
Button,
|
|
20791
20756
|
{
|
|
20792
20757
|
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
|
-
]
|
|
20758
|
+
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",
|
|
20759
|
+
onClick: () => setSidebarOpen(true),
|
|
20760
|
+
"aria-label": "Open sidebar",
|
|
20761
|
+
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
20816
20762
|
}
|
|
20817
20763
|
),
|
|
20818
|
-
|
|
20764
|
+
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 min-w-0 xl:max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20765
|
+
/* @__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
20766
|
/* @__PURE__ */ jsx(
|
|
20820
|
-
|
|
20767
|
+
Input,
|
|
20768
|
+
{
|
|
20769
|
+
type: "search",
|
|
20770
|
+
placeholder: t("common.search"),
|
|
20771
|
+
className: "pl-10 w-full",
|
|
20772
|
+
onKeyDown: (e) => {
|
|
20773
|
+
if (e.key === "Enter") {
|
|
20774
|
+
handleSearchSubmit(e.target.value);
|
|
20775
|
+
}
|
|
20776
|
+
}
|
|
20777
|
+
}
|
|
20778
|
+
)
|
|
20779
|
+
] }) }),
|
|
20780
|
+
!searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
|
|
20781
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
20782
|
+
headerActions,
|
|
20783
|
+
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
20784
|
+
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
20785
|
+
Button,
|
|
20786
|
+
{
|
|
20787
|
+
variant: "ghost",
|
|
20788
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
20789
|
+
onClick: () => handleTopBarActionClick(action.event),
|
|
20790
|
+
"aria-label": action.label ?? action.icon,
|
|
20791
|
+
children: [
|
|
20792
|
+
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20793
|
+
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
20794
|
+
Box,
|
|
20795
|
+
{
|
|
20796
|
+
as: "span",
|
|
20797
|
+
className: cn(
|
|
20798
|
+
"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",
|
|
20799
|
+
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
20800
|
+
),
|
|
20801
|
+
children: action.badge
|
|
20802
|
+
}
|
|
20803
|
+
)
|
|
20804
|
+
]
|
|
20805
|
+
},
|
|
20806
|
+
`${action.event}-${idx}`
|
|
20807
|
+
)),
|
|
20808
|
+
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
20809
|
+
Button,
|
|
20821
20810
|
{
|
|
20822
|
-
|
|
20823
|
-
|
|
20811
|
+
variant: "ghost",
|
|
20812
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
20813
|
+
onClick: handleNotificationClick,
|
|
20814
|
+
"aria-label": t("common.notifications"),
|
|
20815
|
+
children: [
|
|
20816
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20817
|
+
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
20818
|
+
Box,
|
|
20819
|
+
{
|
|
20820
|
+
as: "span",
|
|
20821
|
+
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",
|
|
20822
|
+
children: unreadCount > 99 ? "99+" : unreadCount
|
|
20823
|
+
}
|
|
20824
|
+
)
|
|
20825
|
+
]
|
|
20824
20826
|
}
|
|
20825
20827
|
),
|
|
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
|
-
] }),
|
|
20828
|
+
user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20847
20829
|
/* @__PURE__ */ jsxs(
|
|
20848
20830
|
Button,
|
|
20849
20831
|
{
|
|
20850
20832
|
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",
|
|
20833
|
+
className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
|
|
20834
|
+
onClick: () => setUserMenuOpen(!userMenuOpen),
|
|
20856
20835
|
children: [
|
|
20857
|
-
/* @__PURE__ */ jsx(
|
|
20858
|
-
|
|
20836
|
+
/* @__PURE__ */ jsx(
|
|
20837
|
+
Avatar,
|
|
20838
|
+
{
|
|
20839
|
+
src: user.avatar,
|
|
20840
|
+
alt: user.name,
|
|
20841
|
+
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
20842
|
+
size: "sm"
|
|
20843
|
+
}
|
|
20844
|
+
),
|
|
20845
|
+
/* @__PURE__ */ jsx(
|
|
20846
|
+
Typography,
|
|
20847
|
+
{
|
|
20848
|
+
variant: "small",
|
|
20849
|
+
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20850
|
+
as: "span",
|
|
20851
|
+
children: user.name
|
|
20852
|
+
}
|
|
20853
|
+
),
|
|
20854
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20859
20855
|
]
|
|
20860
20856
|
}
|
|
20861
|
-
)
|
|
20857
|
+
),
|
|
20858
|
+
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20859
|
+
/* @__PURE__ */ jsx(
|
|
20860
|
+
Box,
|
|
20861
|
+
{
|
|
20862
|
+
className: "fixed inset-0 z-20",
|
|
20863
|
+
onClick: () => setUserMenuOpen(false)
|
|
20864
|
+
}
|
|
20865
|
+
),
|
|
20866
|
+
/* @__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: [
|
|
20867
|
+
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
20868
|
+
/* @__PURE__ */ jsx(
|
|
20869
|
+
Typography,
|
|
20870
|
+
{
|
|
20871
|
+
variant: "small",
|
|
20872
|
+
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
20873
|
+
as: "p",
|
|
20874
|
+
children: user.name
|
|
20875
|
+
}
|
|
20876
|
+
),
|
|
20877
|
+
/* @__PURE__ */ jsx(
|
|
20878
|
+
Typography,
|
|
20879
|
+
{
|
|
20880
|
+
variant: "caption",
|
|
20881
|
+
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
20882
|
+
as: "p",
|
|
20883
|
+
children: user.email
|
|
20884
|
+
}
|
|
20885
|
+
)
|
|
20886
|
+
] }),
|
|
20887
|
+
/* @__PURE__ */ jsxs(
|
|
20888
|
+
Button,
|
|
20889
|
+
{
|
|
20890
|
+
variant: "ghost",
|
|
20891
|
+
onClick: () => {
|
|
20892
|
+
setUserMenuOpen(false);
|
|
20893
|
+
handleSignOut?.();
|
|
20894
|
+
},
|
|
20895
|
+
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",
|
|
20896
|
+
children: [
|
|
20897
|
+
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
20898
|
+
t("auth.signOut")
|
|
20899
|
+
]
|
|
20900
|
+
}
|
|
20901
|
+
)
|
|
20902
|
+
] })
|
|
20903
|
+
] })
|
|
20862
20904
|
] })
|
|
20863
20905
|
] })
|
|
20864
|
-
]
|
|
20865
|
-
|
|
20866
|
-
|
|
20906
|
+
]
|
|
20907
|
+
}
|
|
20908
|
+
)
|
|
20867
20909
|
}
|
|
20868
|
-
)
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20910
|
+
),
|
|
20911
|
+
/* @__PURE__ */ jsx(Box, { as: "main", className: "flex-1 p-3 sm:p-4 md:p-6", children })
|
|
20912
|
+
] })
|
|
20913
|
+
]
|
|
20914
|
+
}
|
|
20915
|
+
);
|
|
20874
20916
|
};
|
|
20875
20917
|
DashboardLayout.displayName = "DashboardLayout";
|
|
20876
20918
|
NavLink = ({
|
|
@@ -21364,13 +21406,13 @@ function DataList({
|
|
|
21364
21406
|
}) {
|
|
21365
21407
|
const eventBus = useEventBus();
|
|
21366
21408
|
const { t } = useTranslate();
|
|
21367
|
-
const [visibleCount, setVisibleCount] =
|
|
21409
|
+
const [visibleCount, setVisibleCount] = React119__default.useState(pageSize || Infinity);
|
|
21368
21410
|
const fieldDefs = fields ?? columns ?? [];
|
|
21369
21411
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
21370
21412
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
21371
21413
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
21372
21414
|
const hasRenderProp = typeof children === "function";
|
|
21373
|
-
|
|
21415
|
+
React119__default.useEffect(() => {
|
|
21374
21416
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
21375
21417
|
const childrenTypeOf = typeof children;
|
|
21376
21418
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -21426,7 +21468,7 @@ function DataList({
|
|
|
21426
21468
|
const items2 = data.map((item) => item);
|
|
21427
21469
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
21428
21470
|
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(
|
|
21471
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
21430
21472
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
21431
21473
|
group.items.map((itemData, index) => {
|
|
21432
21474
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -21617,7 +21659,7 @@ function DataList({
|
|
|
21617
21659
|
className
|
|
21618
21660
|
),
|
|
21619
21661
|
children: [
|
|
21620
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
21662
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
21621
21663
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
21622
21664
|
group.items.map(
|
|
21623
21665
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -22764,7 +22806,7 @@ var init_WizardProgress = __esm({
|
|
|
22764
22806
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
22765
22807
|
const isActive = index === currentStep;
|
|
22766
22808
|
const isCompleted = index < currentStep;
|
|
22767
|
-
return /* @__PURE__ */ jsxs(
|
|
22809
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
22768
22810
|
/* @__PURE__ */ jsx(
|
|
22769
22811
|
"button",
|
|
22770
22812
|
{
|
|
@@ -23675,7 +23717,7 @@ function InventoryGrid({
|
|
|
23675
23717
|
const eventBus = useEventBus();
|
|
23676
23718
|
const slotCount = totalSlots ?? items.length;
|
|
23677
23719
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
23678
|
-
const handleSelect =
|
|
23720
|
+
const handleSelect = React119.useCallback(
|
|
23679
23721
|
(id) => {
|
|
23680
23722
|
onSelect?.(id);
|
|
23681
23723
|
if (selectEvent) {
|
|
@@ -23888,15 +23930,15 @@ function GameCanvas2D({
|
|
|
23888
23930
|
fps = 60,
|
|
23889
23931
|
className
|
|
23890
23932
|
}) {
|
|
23891
|
-
const canvasRef =
|
|
23892
|
-
const rafRef =
|
|
23893
|
-
const frameRef =
|
|
23894
|
-
const lastTimeRef =
|
|
23895
|
-
const onDrawRef =
|
|
23933
|
+
const canvasRef = React119.useRef(null);
|
|
23934
|
+
const rafRef = React119.useRef(0);
|
|
23935
|
+
const frameRef = React119.useRef(0);
|
|
23936
|
+
const lastTimeRef = React119.useRef(0);
|
|
23937
|
+
const onDrawRef = React119.useRef(onDraw);
|
|
23896
23938
|
onDrawRef.current = onDraw;
|
|
23897
|
-
const onTickRef =
|
|
23939
|
+
const onTickRef = React119.useRef(onTick);
|
|
23898
23940
|
onTickRef.current = onTick;
|
|
23899
|
-
|
|
23941
|
+
React119.useEffect(() => {
|
|
23900
23942
|
const canvas = canvasRef.current;
|
|
23901
23943
|
if (!canvas) return;
|
|
23902
23944
|
const ctx = canvas.getContext("2d");
|
|
@@ -24185,7 +24227,7 @@ function TurnPanel({
|
|
|
24185
24227
|
className
|
|
24186
24228
|
}) {
|
|
24187
24229
|
const eventBus = useEventBus();
|
|
24188
|
-
const handleAction =
|
|
24230
|
+
const handleAction = React119.useCallback(
|
|
24189
24231
|
(event) => {
|
|
24190
24232
|
if (event) {
|
|
24191
24233
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -24331,7 +24373,7 @@ function UnitCommandBar({
|
|
|
24331
24373
|
className
|
|
24332
24374
|
}) {
|
|
24333
24375
|
const eventBus = useEventBus();
|
|
24334
|
-
const handleCommand =
|
|
24376
|
+
const handleCommand = React119.useCallback(
|
|
24335
24377
|
(event) => {
|
|
24336
24378
|
if (event) {
|
|
24337
24379
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -24816,7 +24858,7 @@ function GameMenu({
|
|
|
24816
24858
|
} catch {
|
|
24817
24859
|
}
|
|
24818
24860
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
24819
|
-
const handleOptionClick =
|
|
24861
|
+
const handleOptionClick = React119.useCallback(
|
|
24820
24862
|
(option) => {
|
|
24821
24863
|
if (option.event && eventBus) {
|
|
24822
24864
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -24930,7 +24972,7 @@ function GameOverScreen({
|
|
|
24930
24972
|
} catch {
|
|
24931
24973
|
}
|
|
24932
24974
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
24933
|
-
const handleActionClick =
|
|
24975
|
+
const handleActionClick = React119.useCallback(
|
|
24934
24976
|
(action) => {
|
|
24935
24977
|
if (action.event && eventBus) {
|
|
24936
24978
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -28419,7 +28461,7 @@ var init_DocumentViewer = __esm({
|
|
|
28419
28461
|
}
|
|
28420
28462
|
});
|
|
28421
28463
|
function extractTitle(children) {
|
|
28422
|
-
if (!
|
|
28464
|
+
if (!React119__default.isValidElement(children)) return void 0;
|
|
28423
28465
|
const props = children.props;
|
|
28424
28466
|
if (typeof props.title === "string") {
|
|
28425
28467
|
return props.title;
|
|
@@ -28474,7 +28516,7 @@ function LinearView({
|
|
|
28474
28516
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
28475
28517
|
const isDone = i < currentIdx;
|
|
28476
28518
|
const isCurrent = i === currentIdx;
|
|
28477
|
-
return /* @__PURE__ */ jsxs(
|
|
28519
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
28478
28520
|
i > 0 && /* @__PURE__ */ jsx(
|
|
28479
28521
|
Typography,
|
|
28480
28522
|
{
|
|
@@ -29258,12 +29300,12 @@ var init_Form = __esm({
|
|
|
29258
29300
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
29259
29301
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
29260
29302
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
29261
|
-
const normalizedInitialData =
|
|
29303
|
+
const normalizedInitialData = React119__default.useMemo(() => {
|
|
29262
29304
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
29263
29305
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
29264
29306
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
29265
29307
|
}, [entity, initialData]);
|
|
29266
|
-
const entityDerivedFields =
|
|
29308
|
+
const entityDerivedFields = React119__default.useMemo(() => {
|
|
29267
29309
|
if (fields && fields.length > 0) return void 0;
|
|
29268
29310
|
if (!resolvedEntity) return void 0;
|
|
29269
29311
|
return resolvedEntity.fields.map(
|
|
@@ -29282,16 +29324,16 @@ var init_Form = __esm({
|
|
|
29282
29324
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
29283
29325
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
29284
29326
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
29285
|
-
const [formData, setFormData] =
|
|
29327
|
+
const [formData, setFormData] = React119__default.useState(
|
|
29286
29328
|
normalizedInitialData
|
|
29287
29329
|
);
|
|
29288
|
-
const [collapsedSections, setCollapsedSections] =
|
|
29330
|
+
const [collapsedSections, setCollapsedSections] = React119__default.useState(
|
|
29289
29331
|
/* @__PURE__ */ new Set()
|
|
29290
29332
|
);
|
|
29291
|
-
const [submitError, setSubmitError] =
|
|
29292
|
-
const formRef =
|
|
29333
|
+
const [submitError, setSubmitError] = React119__default.useState(null);
|
|
29334
|
+
const formRef = React119__default.useRef(null);
|
|
29293
29335
|
const formMode = props.mode;
|
|
29294
|
-
const mountedRef =
|
|
29336
|
+
const mountedRef = React119__default.useRef(false);
|
|
29295
29337
|
if (!mountedRef.current) {
|
|
29296
29338
|
mountedRef.current = true;
|
|
29297
29339
|
debug("forms", "mount", {
|
|
@@ -29304,7 +29346,7 @@ var init_Form = __esm({
|
|
|
29304
29346
|
});
|
|
29305
29347
|
}
|
|
29306
29348
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
29307
|
-
const evalContext =
|
|
29349
|
+
const evalContext = React119__default.useMemo(
|
|
29308
29350
|
() => ({
|
|
29309
29351
|
formValues: formData,
|
|
29310
29352
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -29313,7 +29355,7 @@ var init_Form = __esm({
|
|
|
29313
29355
|
}),
|
|
29314
29356
|
[formData, externalContext]
|
|
29315
29357
|
);
|
|
29316
|
-
|
|
29358
|
+
React119__default.useEffect(() => {
|
|
29317
29359
|
debug("forms", "initialData-sync", {
|
|
29318
29360
|
mode: formMode,
|
|
29319
29361
|
normalizedInitialData,
|
|
@@ -29324,7 +29366,7 @@ var init_Form = __esm({
|
|
|
29324
29366
|
setFormData(normalizedInitialData);
|
|
29325
29367
|
}
|
|
29326
29368
|
}, [normalizedInitialData]);
|
|
29327
|
-
const processCalculations =
|
|
29369
|
+
const processCalculations = React119__default.useCallback(
|
|
29328
29370
|
(changedFieldId, newFormData) => {
|
|
29329
29371
|
if (!hiddenCalculations.length) return;
|
|
29330
29372
|
const context = {
|
|
@@ -29349,7 +29391,7 @@ var init_Form = __esm({
|
|
|
29349
29391
|
},
|
|
29350
29392
|
[hiddenCalculations, externalContext, eventBus]
|
|
29351
29393
|
);
|
|
29352
|
-
const checkViolations =
|
|
29394
|
+
const checkViolations = React119__default.useCallback(
|
|
29353
29395
|
(changedFieldId, newFormData) => {
|
|
29354
29396
|
if (!violationTriggers.length) return;
|
|
29355
29397
|
const context = {
|
|
@@ -29387,7 +29429,7 @@ var init_Form = __esm({
|
|
|
29387
29429
|
processCalculations(name, newFormData);
|
|
29388
29430
|
checkViolations(name, newFormData);
|
|
29389
29431
|
};
|
|
29390
|
-
const isFieldVisible =
|
|
29432
|
+
const isFieldVisible = React119__default.useCallback(
|
|
29391
29433
|
(fieldName) => {
|
|
29392
29434
|
const condition = conditionalFields[fieldName];
|
|
29393
29435
|
if (!condition) return true;
|
|
@@ -29395,7 +29437,7 @@ var init_Form = __esm({
|
|
|
29395
29437
|
},
|
|
29396
29438
|
[conditionalFields, evalContext]
|
|
29397
29439
|
);
|
|
29398
|
-
const isSectionVisible =
|
|
29440
|
+
const isSectionVisible = React119__default.useCallback(
|
|
29399
29441
|
(section) => {
|
|
29400
29442
|
if (!section.condition) return true;
|
|
29401
29443
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -29471,7 +29513,7 @@ var init_Form = __esm({
|
|
|
29471
29513
|
eventBus.emit(`UI:${onCancel}`);
|
|
29472
29514
|
}
|
|
29473
29515
|
};
|
|
29474
|
-
const renderField =
|
|
29516
|
+
const renderField = React119__default.useCallback(
|
|
29475
29517
|
(field) => {
|
|
29476
29518
|
const fieldName = field.name || field.field;
|
|
29477
29519
|
if (!fieldName) return null;
|
|
@@ -29492,7 +29534,7 @@ var init_Form = __esm({
|
|
|
29492
29534
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
29493
29535
|
);
|
|
29494
29536
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
29495
|
-
const normalizedFields =
|
|
29537
|
+
const normalizedFields = React119__default.useMemo(() => {
|
|
29496
29538
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
29497
29539
|
return effectiveFields.map((field) => {
|
|
29498
29540
|
if (typeof field === "string") {
|
|
@@ -29514,7 +29556,7 @@ var init_Form = __esm({
|
|
|
29514
29556
|
return field;
|
|
29515
29557
|
});
|
|
29516
29558
|
}, [effectiveFields, resolvedEntity]);
|
|
29517
|
-
const schemaFields =
|
|
29559
|
+
const schemaFields = React119__default.useMemo(() => {
|
|
29518
29560
|
if (normalizedFields.length === 0) return null;
|
|
29519
29561
|
if (isDebugEnabled()) {
|
|
29520
29562
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -29524,7 +29566,7 @@ var init_Form = __esm({
|
|
|
29524
29566
|
}
|
|
29525
29567
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
29526
29568
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
29527
|
-
const sectionElements =
|
|
29569
|
+
const sectionElements = React119__default.useMemo(() => {
|
|
29528
29570
|
if (!sections || sections.length === 0) return null;
|
|
29529
29571
|
return sections.map((section) => {
|
|
29530
29572
|
if (!isSectionVisible(section)) {
|
|
@@ -31056,7 +31098,7 @@ var init_List = __esm({
|
|
|
31056
31098
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
31057
31099
|
return [];
|
|
31058
31100
|
}, [entity]);
|
|
31059
|
-
const getItemActions =
|
|
31101
|
+
const getItemActions = React119__default.useCallback(
|
|
31060
31102
|
(item) => {
|
|
31061
31103
|
if (!itemActions) return [];
|
|
31062
31104
|
if (typeof itemActions === "function") {
|
|
@@ -31493,7 +31535,7 @@ var init_MediaGallery = __esm({
|
|
|
31493
31535
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
31494
31536
|
);
|
|
31495
31537
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
31496
|
-
const items =
|
|
31538
|
+
const items = React119__default.useMemo(() => {
|
|
31497
31539
|
if (propItems) return propItems;
|
|
31498
31540
|
if (entityData.length === 0) return [];
|
|
31499
31541
|
return entityData.map((record, idx) => ({
|
|
@@ -31657,7 +31699,7 @@ var init_MediaGallery = __esm({
|
|
|
31657
31699
|
}
|
|
31658
31700
|
});
|
|
31659
31701
|
function extractTitle2(children) {
|
|
31660
|
-
if (!
|
|
31702
|
+
if (!React119__default.isValidElement(children)) return void 0;
|
|
31661
31703
|
const props = children.props;
|
|
31662
31704
|
if (typeof props.title === "string") {
|
|
31663
31705
|
return props.title;
|
|
@@ -32370,7 +32412,7 @@ var init_PageHeader = __esm({
|
|
|
32370
32412
|
info: "bg-info/10 text-info"
|
|
32371
32413
|
};
|
|
32372
32414
|
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(
|
|
32415
|
+
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
32416
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
32375
32417
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
32376
32418
|
"a",
|
|
@@ -32563,7 +32605,7 @@ var init_debugRegistry = __esm({
|
|
|
32563
32605
|
}
|
|
32564
32606
|
});
|
|
32565
32607
|
function useDebugData() {
|
|
32566
|
-
const [data, setData] =
|
|
32608
|
+
const [data, setData] = React119.useState(() => ({
|
|
32567
32609
|
traits: [],
|
|
32568
32610
|
ticks: [],
|
|
32569
32611
|
guards: [],
|
|
@@ -32577,7 +32619,7 @@ function useDebugData() {
|
|
|
32577
32619
|
},
|
|
32578
32620
|
lastUpdate: Date.now()
|
|
32579
32621
|
}));
|
|
32580
|
-
|
|
32622
|
+
React119.useEffect(() => {
|
|
32581
32623
|
const updateData = () => {
|
|
32582
32624
|
setData({
|
|
32583
32625
|
traits: getAllTraits(),
|
|
@@ -32686,12 +32728,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
32686
32728
|
return positions;
|
|
32687
32729
|
}
|
|
32688
32730
|
function WalkMinimap() {
|
|
32689
|
-
const [walkStep, setWalkStep] =
|
|
32690
|
-
const [traits2, setTraits] =
|
|
32691
|
-
const [coveredEdges, setCoveredEdges] =
|
|
32692
|
-
const [completedTraits, setCompletedTraits] =
|
|
32693
|
-
const prevTraitRef =
|
|
32694
|
-
|
|
32731
|
+
const [walkStep, setWalkStep] = React119.useState(null);
|
|
32732
|
+
const [traits2, setTraits] = React119.useState([]);
|
|
32733
|
+
const [coveredEdges, setCoveredEdges] = React119.useState([]);
|
|
32734
|
+
const [completedTraits, setCompletedTraits] = React119.useState(/* @__PURE__ */ new Set());
|
|
32735
|
+
const prevTraitRef = React119.useRef(null);
|
|
32736
|
+
React119.useEffect(() => {
|
|
32695
32737
|
const interval = setInterval(() => {
|
|
32696
32738
|
const w = window;
|
|
32697
32739
|
const step = w.__orbitalWalkStep;
|
|
@@ -33138,15 +33180,15 @@ var init_EntitiesTab = __esm({
|
|
|
33138
33180
|
}
|
|
33139
33181
|
});
|
|
33140
33182
|
function EventFlowTab({ events: events2 }) {
|
|
33141
|
-
const [filter, setFilter] =
|
|
33142
|
-
const containerRef =
|
|
33143
|
-
const [autoScroll, setAutoScroll] =
|
|
33144
|
-
|
|
33183
|
+
const [filter, setFilter] = React119.useState("all");
|
|
33184
|
+
const containerRef = React119.useRef(null);
|
|
33185
|
+
const [autoScroll, setAutoScroll] = React119.useState(true);
|
|
33186
|
+
React119.useEffect(() => {
|
|
33145
33187
|
if (autoScroll && containerRef.current) {
|
|
33146
33188
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
33147
33189
|
}
|
|
33148
33190
|
}, [events2.length, autoScroll]);
|
|
33149
|
-
const filteredEvents =
|
|
33191
|
+
const filteredEvents = React119.useMemo(() => {
|
|
33150
33192
|
if (filter === "all") return events2;
|
|
33151
33193
|
return events2.filter((e) => e.type === filter);
|
|
33152
33194
|
}, [events2, filter]);
|
|
@@ -33265,7 +33307,7 @@ var init_EventFlowTab = __esm({
|
|
|
33265
33307
|
}
|
|
33266
33308
|
});
|
|
33267
33309
|
function GuardsPanel({ guards }) {
|
|
33268
|
-
const [filter, setFilter] =
|
|
33310
|
+
const [filter, setFilter] = React119.useState("all");
|
|
33269
33311
|
if (guards.length === 0) {
|
|
33270
33312
|
return /* @__PURE__ */ jsx(
|
|
33271
33313
|
EmptyState,
|
|
@@ -33278,7 +33320,7 @@ function GuardsPanel({ guards }) {
|
|
|
33278
33320
|
}
|
|
33279
33321
|
const passedCount = guards.filter((g) => g.result).length;
|
|
33280
33322
|
const failedCount = guards.length - passedCount;
|
|
33281
|
-
const filteredGuards =
|
|
33323
|
+
const filteredGuards = React119.useMemo(() => {
|
|
33282
33324
|
if (filter === "all") return guards;
|
|
33283
33325
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
33284
33326
|
return guards.filter((g) => !g.result);
|
|
@@ -33439,10 +33481,10 @@ function EffectBadge({ effect }) {
|
|
|
33439
33481
|
] });
|
|
33440
33482
|
}
|
|
33441
33483
|
function TransitionTimeline({ transitions }) {
|
|
33442
|
-
const containerRef =
|
|
33443
|
-
const [autoScroll, setAutoScroll] =
|
|
33444
|
-
const [expandedId, setExpandedId] =
|
|
33445
|
-
|
|
33484
|
+
const containerRef = React119.useRef(null);
|
|
33485
|
+
const [autoScroll, setAutoScroll] = React119.useState(true);
|
|
33486
|
+
const [expandedId, setExpandedId] = React119.useState(null);
|
|
33487
|
+
React119.useEffect(() => {
|
|
33446
33488
|
if (autoScroll && containerRef.current) {
|
|
33447
33489
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
33448
33490
|
}
|
|
@@ -33728,9 +33770,9 @@ function getAllEvents(traits2) {
|
|
|
33728
33770
|
}
|
|
33729
33771
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
33730
33772
|
const eventBus = useEventBus();
|
|
33731
|
-
const [log4, setLog] =
|
|
33732
|
-
const prevStatesRef =
|
|
33733
|
-
|
|
33773
|
+
const [log4, setLog] = React119.useState([]);
|
|
33774
|
+
const prevStatesRef = React119.useRef(/* @__PURE__ */ new Map());
|
|
33775
|
+
React119.useEffect(() => {
|
|
33734
33776
|
for (const trait of traits2) {
|
|
33735
33777
|
const prev = prevStatesRef.current.get(trait.id);
|
|
33736
33778
|
if (prev && prev !== trait.currentState) {
|
|
@@ -33900,10 +33942,10 @@ function VerifyModePanel({
|
|
|
33900
33942
|
serverCount,
|
|
33901
33943
|
localCount
|
|
33902
33944
|
}) {
|
|
33903
|
-
const [expanded, setExpanded] =
|
|
33904
|
-
const scrollRef =
|
|
33905
|
-
const prevCountRef =
|
|
33906
|
-
|
|
33945
|
+
const [expanded, setExpanded] = React119.useState(true);
|
|
33946
|
+
const scrollRef = React119.useRef(null);
|
|
33947
|
+
const prevCountRef = React119.useRef(0);
|
|
33948
|
+
React119.useEffect(() => {
|
|
33907
33949
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
33908
33950
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
33909
33951
|
}
|
|
@@ -33969,10 +34011,10 @@ function RuntimeDebugger({
|
|
|
33969
34011
|
defaultTab,
|
|
33970
34012
|
schema
|
|
33971
34013
|
}) {
|
|
33972
|
-
const [isCollapsed, setIsCollapsed] =
|
|
33973
|
-
const [isVisible, setIsVisible] =
|
|
34014
|
+
const [isCollapsed, setIsCollapsed] = React119.useState(mode === "verify" ? true : defaultCollapsed);
|
|
34015
|
+
const [isVisible, setIsVisible] = React119.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
33974
34016
|
const debugData = useDebugData();
|
|
33975
|
-
|
|
34017
|
+
React119.useEffect(() => {
|
|
33976
34018
|
if (mode === "inline") return;
|
|
33977
34019
|
return onDebugToggle((enabled) => {
|
|
33978
34020
|
setIsVisible(enabled);
|
|
@@ -33981,7 +34023,7 @@ function RuntimeDebugger({
|
|
|
33981
34023
|
}
|
|
33982
34024
|
});
|
|
33983
34025
|
}, [mode]);
|
|
33984
|
-
|
|
34026
|
+
React119.useEffect(() => {
|
|
33985
34027
|
if (mode === "inline") return;
|
|
33986
34028
|
const handleKeyDown = (e) => {
|
|
33987
34029
|
if (e.key === "`" && isVisible) {
|
|
@@ -34530,7 +34572,7 @@ function SequenceBar({
|
|
|
34530
34572
|
onSlotRemove(index);
|
|
34531
34573
|
}, [onSlotRemove, playing]);
|
|
34532
34574
|
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(
|
|
34575
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
34534
34576
|
i > 0 && /* @__PURE__ */ jsx(
|
|
34535
34577
|
Typography,
|
|
34536
34578
|
{
|
|
@@ -35875,7 +35917,7 @@ var init_StatCard = __esm({
|
|
|
35875
35917
|
const labelToUse = propLabel ?? propTitle;
|
|
35876
35918
|
const eventBus = useEventBus();
|
|
35877
35919
|
const { t } = useTranslate();
|
|
35878
|
-
const handleActionClick =
|
|
35920
|
+
const handleActionClick = React119__default.useCallback(() => {
|
|
35879
35921
|
if (action?.event) {
|
|
35880
35922
|
eventBus.emit(`UI:${action.event}`, {});
|
|
35881
35923
|
}
|
|
@@ -35886,7 +35928,7 @@ var init_StatCard = __esm({
|
|
|
35886
35928
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
35887
35929
|
const isLoading = externalLoading ?? false;
|
|
35888
35930
|
const error = externalError;
|
|
35889
|
-
const computeMetricValue =
|
|
35931
|
+
const computeMetricValue = React119__default.useCallback(
|
|
35890
35932
|
(metric, items) => {
|
|
35891
35933
|
if (metric.value !== void 0) {
|
|
35892
35934
|
return metric.value;
|
|
@@ -35925,7 +35967,7 @@ var init_StatCard = __esm({
|
|
|
35925
35967
|
},
|
|
35926
35968
|
[]
|
|
35927
35969
|
);
|
|
35928
|
-
const schemaStats =
|
|
35970
|
+
const schemaStats = React119__default.useMemo(() => {
|
|
35929
35971
|
if (!metrics || metrics.length === 0) return null;
|
|
35930
35972
|
return metrics.map((metric) => ({
|
|
35931
35973
|
label: metric.label,
|
|
@@ -35933,7 +35975,7 @@ var init_StatCard = __esm({
|
|
|
35933
35975
|
format: metric.format
|
|
35934
35976
|
}));
|
|
35935
35977
|
}, [metrics, data, computeMetricValue]);
|
|
35936
|
-
const calculatedTrend =
|
|
35978
|
+
const calculatedTrend = React119__default.useMemo(() => {
|
|
35937
35979
|
if (manualTrend !== void 0) return manualTrend;
|
|
35938
35980
|
if (previousValue === void 0 || currentValue === void 0)
|
|
35939
35981
|
return void 0;
|
|
@@ -36917,7 +36959,7 @@ var init_Timeline = __esm({
|
|
|
36917
36959
|
}) => {
|
|
36918
36960
|
const { t } = useTranslate();
|
|
36919
36961
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
36920
|
-
const items =
|
|
36962
|
+
const items = React119__default.useMemo(() => {
|
|
36921
36963
|
if (propItems) return propItems;
|
|
36922
36964
|
if (entityData.length === 0) return [];
|
|
36923
36965
|
return entityData.map((record, idx) => {
|
|
@@ -37024,7 +37066,7 @@ var init_Timeline = __esm({
|
|
|
37024
37066
|
}
|
|
37025
37067
|
});
|
|
37026
37068
|
function extractToastProps(children) {
|
|
37027
|
-
if (!
|
|
37069
|
+
if (!React119__default.isValidElement(children)) {
|
|
37028
37070
|
if (typeof children === "string") {
|
|
37029
37071
|
return { message: children };
|
|
37030
37072
|
}
|
|
@@ -37062,7 +37104,7 @@ var init_ToastSlot = __esm({
|
|
|
37062
37104
|
eventBus.emit("UI:CLOSE");
|
|
37063
37105
|
};
|
|
37064
37106
|
if (!isVisible) return null;
|
|
37065
|
-
const isCustomContent =
|
|
37107
|
+
const isCustomContent = React119__default.isValidElement(children) && !message;
|
|
37066
37108
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
37067
37109
|
Toast,
|
|
37068
37110
|
{
|
|
@@ -37331,7 +37373,7 @@ var init_WizardContainer = __esm({
|
|
|
37331
37373
|
const isCompleted = index < currentStep;
|
|
37332
37374
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37333
37375
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37334
|
-
return /* @__PURE__ */ jsxs(
|
|
37376
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
37335
37377
|
/* @__PURE__ */ jsx(
|
|
37336
37378
|
Button,
|
|
37337
37379
|
{
|
|
@@ -39520,7 +39562,7 @@ function UnitRenderer({
|
|
|
39520
39562
|
onAnimationStateChange,
|
|
39521
39563
|
animationSpeed = 1
|
|
39522
39564
|
}) {
|
|
39523
|
-
const handleUnitClick =
|
|
39565
|
+
const handleUnitClick = React119__default.useCallback(
|
|
39524
39566
|
(unit) => {
|
|
39525
39567
|
onUnitClick?.(unit);
|
|
39526
39568
|
},
|
|
@@ -42714,7 +42756,7 @@ var init_Avl3DViewer = __esm({
|
|
|
42714
42756
|
const handleTraitClick = useCallback((name) => {
|
|
42715
42757
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
42716
42758
|
}, []);
|
|
42717
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
42759
|
+
const [highlightedTrait, setHighlightedTrait] = React119__default.useState(null);
|
|
42718
42760
|
const handleTransitionClick = useCallback((index) => {
|
|
42719
42761
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
42720
42762
|
}, []);
|
|
@@ -42801,7 +42843,7 @@ var init_Avl3DViewer = __esm({
|
|
|
42801
42843
|
gap: "xs",
|
|
42802
42844
|
align: "center",
|
|
42803
42845
|
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(
|
|
42846
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
42805
42847
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
42806
42848
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
42807
42849
|
Box,
|
|
@@ -43179,12 +43221,12 @@ var init_three = __esm({
|
|
|
43179
43221
|
}
|
|
43180
43222
|
});
|
|
43181
43223
|
function lazyThree(name, loader) {
|
|
43182
|
-
const Lazy =
|
|
43224
|
+
const Lazy = React119__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
43183
43225
|
function ThreeWrapper(props) {
|
|
43184
|
-
return
|
|
43185
|
-
|
|
43226
|
+
return React119__default.createElement(
|
|
43227
|
+
React119__default.Suspense,
|
|
43186
43228
|
{ fallback: null },
|
|
43187
|
-
|
|
43229
|
+
React119__default.createElement(Lazy, props)
|
|
43188
43230
|
);
|
|
43189
43231
|
}
|
|
43190
43232
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -43672,7 +43714,7 @@ function SuspenseConfigProvider({
|
|
|
43672
43714
|
config,
|
|
43673
43715
|
children
|
|
43674
43716
|
}) {
|
|
43675
|
-
return
|
|
43717
|
+
return React119__default.createElement(
|
|
43676
43718
|
SuspenseConfigContext.Provider,
|
|
43677
43719
|
{ value: config },
|
|
43678
43720
|
children
|
|
@@ -44155,7 +44197,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
44155
44197
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
44156
44198
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
44157
44199
|
}
|
|
44158
|
-
return /* @__PURE__ */ jsx(
|
|
44200
|
+
return /* @__PURE__ */ jsx(React119__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
44159
44201
|
}
|
|
44160
44202
|
if (!child || typeof child !== "object") return null;
|
|
44161
44203
|
const childId = `${parentId}-${index}`;
|
|
@@ -44192,14 +44234,14 @@ function isPatternConfig(value) {
|
|
|
44192
44234
|
if (value === null || value === void 0) return false;
|
|
44193
44235
|
if (typeof value !== "object") return false;
|
|
44194
44236
|
if (Array.isArray(value)) return false;
|
|
44195
|
-
if (
|
|
44237
|
+
if (React119__default.isValidElement(value)) return false;
|
|
44196
44238
|
if (value instanceof Date) return false;
|
|
44197
44239
|
if (typeof value === "function") return false;
|
|
44198
44240
|
const record = value;
|
|
44199
44241
|
return "type" in record && typeof record.type === "string";
|
|
44200
44242
|
}
|
|
44201
44243
|
function isPlainConfigObject(value) {
|
|
44202
|
-
if (
|
|
44244
|
+
if (React119__default.isValidElement(value)) return false;
|
|
44203
44245
|
if (value instanceof Date) return false;
|
|
44204
44246
|
const proto = Object.getPrototypeOf(value);
|
|
44205
44247
|
return proto === Object.prototype || proto === null;
|
|
@@ -44860,7 +44902,7 @@ var AvlTransition = ({
|
|
|
44860
44902
|
opacity = 1,
|
|
44861
44903
|
className
|
|
44862
44904
|
}) => {
|
|
44863
|
-
const ids =
|
|
44905
|
+
const ids = React119__default.useMemo(() => {
|
|
44864
44906
|
avlTransitionId += 1;
|
|
44865
44907
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
44866
44908
|
}, []);
|
|
@@ -45621,7 +45663,7 @@ var AvlStateMachine = ({
|
|
|
45621
45663
|
color = "var(--color-primary)",
|
|
45622
45664
|
animated = false
|
|
45623
45665
|
}) => {
|
|
45624
|
-
const ids =
|
|
45666
|
+
const ids = React119__default.useMemo(() => {
|
|
45625
45667
|
avlSmId += 1;
|
|
45626
45668
|
const base = `avl-sm-${avlSmId}`;
|
|
45627
45669
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -45816,7 +45858,7 @@ var AvlOrbitalUnit = ({
|
|
|
45816
45858
|
color = "var(--color-primary)",
|
|
45817
45859
|
animated = false
|
|
45818
45860
|
}) => {
|
|
45819
|
-
const ids =
|
|
45861
|
+
const ids = React119__default.useMemo(() => {
|
|
45820
45862
|
avlOuId += 1;
|
|
45821
45863
|
const base = `avl-ou-${avlOuId}`;
|
|
45822
45864
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -45908,7 +45950,7 @@ var AvlClosedCircuit = ({
|
|
|
45908
45950
|
color = "var(--color-primary)",
|
|
45909
45951
|
animated = false
|
|
45910
45952
|
}) => {
|
|
45911
|
-
const ids =
|
|
45953
|
+
const ids = React119__default.useMemo(() => {
|
|
45912
45954
|
avlCcId += 1;
|
|
45913
45955
|
const base = `avl-cc-${avlCcId}`;
|
|
45914
45956
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -46061,7 +46103,7 @@ var AvlEmitListen = ({
|
|
|
46061
46103
|
color = "var(--color-primary)",
|
|
46062
46104
|
animated = false
|
|
46063
46105
|
}) => {
|
|
46064
|
-
const ids =
|
|
46106
|
+
const ids = React119__default.useMemo(() => {
|
|
46065
46107
|
avlElId += 1;
|
|
46066
46108
|
const base = `avl-el-${avlElId}`;
|
|
46067
46109
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -46334,7 +46376,7 @@ function renderNode(node, color, glowId) {
|
|
|
46334
46376
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
46335
46377
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
46336
46378
|
const nc = nodeColor(node.type, color);
|
|
46337
|
-
return /* @__PURE__ */ jsxs(
|
|
46379
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
46338
46380
|
node.children.map((child, i) => {
|
|
46339
46381
|
const childR = Math.max(
|
|
46340
46382
|
child.type === "operator" ? 20 : 16,
|
|
@@ -46391,7 +46433,7 @@ var AvlExprTree = ({
|
|
|
46391
46433
|
className,
|
|
46392
46434
|
color = "var(--color-primary)"
|
|
46393
46435
|
}) => {
|
|
46394
|
-
const ids =
|
|
46436
|
+
const ids = React119__default.useMemo(() => {
|
|
46395
46437
|
avlEtId += 1;
|
|
46396
46438
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
46397
46439
|
}, []);
|
|
@@ -47365,7 +47407,7 @@ var SystemNode = ({ data }) => {
|
|
|
47365
47407
|
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
47408
|
const tc = transitionCounts[s.name] ?? 0;
|
|
47367
47409
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
47368
|
-
return /* @__PURE__ */ jsxs(
|
|
47410
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
47369
47411
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
47370
47412
|
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
47413
|
] }, s.name);
|
|
@@ -47405,7 +47447,7 @@ var MiniStateMachine = ({ data, className }) => {
|
|
|
47405
47447
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
47406
47448
|
const tc = transitionCounts[s.name] ?? 0;
|
|
47407
47449
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
47408
|
-
return /* @__PURE__ */ jsxs(
|
|
47450
|
+
return /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
47409
47451
|
/* @__PURE__ */ jsx(
|
|
47410
47452
|
AvlState,
|
|
47411
47453
|
{
|
|
@@ -48867,7 +48909,7 @@ function resolveLambdaBindings(body, argName, arg) {
|
|
|
48867
48909
|
if (Array.isArray(body)) {
|
|
48868
48910
|
return body.map((b) => resolveLambdaBindings(b, argName, arg));
|
|
48869
48911
|
}
|
|
48870
|
-
if (body !== null && typeof body === "object" && !
|
|
48912
|
+
if (body !== null && typeof body === "object" && !React119__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
48871
48913
|
const out = {};
|
|
48872
48914
|
for (const [k, v] of Object.entries(body)) {
|
|
48873
48915
|
out[k] = resolveLambdaBindings(v, argName, arg);
|
|
@@ -48886,7 +48928,7 @@ function getSlotContentRenderer2() {
|
|
|
48886
48928
|
function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
48887
48929
|
return (item, index) => {
|
|
48888
48930
|
const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
|
|
48889
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
48931
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React119__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
48890
48932
|
return null;
|
|
48891
48933
|
}
|
|
48892
48934
|
const record = resolvedBody;
|
|
@@ -48904,7 +48946,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
|
48904
48946
|
props: childProps,
|
|
48905
48947
|
priority: 0
|
|
48906
48948
|
};
|
|
48907
|
-
return
|
|
48949
|
+
return React119__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
48908
48950
|
};
|
|
48909
48951
|
}
|
|
48910
48952
|
function convertNode(node, callerKey) {
|
|
@@ -48923,7 +48965,7 @@ function convertNode(node, callerKey) {
|
|
|
48923
48965
|
});
|
|
48924
48966
|
return anyChanged ? mapped : node;
|
|
48925
48967
|
}
|
|
48926
|
-
if (typeof node === "object" && !
|
|
48968
|
+
if (typeof node === "object" && !React119__default.isValidElement(node) && !(node instanceof Date)) {
|
|
48927
48969
|
return convertObjectProps(node);
|
|
48928
48970
|
}
|
|
48929
48971
|
return node;
|
|
@@ -48959,7 +49001,7 @@ init_logger();
|
|
|
48959
49001
|
|
|
48960
49002
|
// runtime/createClientEffectHandlers.ts
|
|
48961
49003
|
function createClientEffectHandlers(options) {
|
|
48962
|
-
const { eventBus, slotSetter, navigate, notify } = options;
|
|
49004
|
+
const { eventBus, slotSetter, navigate, notify, callService } = options;
|
|
48963
49005
|
return {
|
|
48964
49006
|
emit: (event, payload) => {
|
|
48965
49007
|
const prefixedEvent = event.startsWith("UI:") ? event : `UI:${event}`;
|
|
@@ -48971,9 +49013,24 @@ function createClientEffectHandlers(options) {
|
|
|
48971
49013
|
set: () => {
|
|
48972
49014
|
console.warn("[ClientEffectHandlers] set is server-side only, ignored on client");
|
|
48973
49015
|
},
|
|
48974
|
-
callService: async () => {
|
|
48975
|
-
|
|
48976
|
-
|
|
49016
|
+
callService: async (service, action, params) => {
|
|
49017
|
+
if (callService) return callService(service, action, params);
|
|
49018
|
+
const mockId = `mock_${service}_${action}_${Math.random().toString(36).slice(2, 10)}`;
|
|
49019
|
+
const paramsEcho = {};
|
|
49020
|
+
if (params) {
|
|
49021
|
+
for (const [k, v] of Object.entries(params)) {
|
|
49022
|
+
if (v !== void 0 && (typeof v === "string" || typeof v === "number" || typeof v === "boolean" || v === null || v instanceof Date)) {
|
|
49023
|
+
paramsEcho[k] = v;
|
|
49024
|
+
}
|
|
49025
|
+
}
|
|
49026
|
+
}
|
|
49027
|
+
return {
|
|
49028
|
+
id: mockId,
|
|
49029
|
+
clientSecret: `secret_${mockId}`,
|
|
49030
|
+
success: true,
|
|
49031
|
+
status: "succeeded",
|
|
49032
|
+
...paramsEcho
|
|
49033
|
+
};
|
|
48977
49034
|
},
|
|
48978
49035
|
renderUI: (slot, pattern, props) => {
|
|
48979
49036
|
if (pattern === null) {
|
|
@@ -49356,7 +49413,8 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
49356
49413
|
}
|
|
49357
49414
|
},
|
|
49358
49415
|
navigate: optionsRef.current?.navigate,
|
|
49359
|
-
notify: optionsRef.current?.notify
|
|
49416
|
+
notify: optionsRef.current?.notify,
|
|
49417
|
+
callService: optionsRef.current?.callService
|
|
49360
49418
|
});
|
|
49361
49419
|
const persistence = optionsRef.current?.persistence;
|
|
49362
49420
|
let handlers = clientHandlers;
|
|
@@ -50893,7 +50951,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
50893
50951
|
}
|
|
50894
50952
|
);
|
|
50895
50953
|
};
|
|
50896
|
-
var OrbPreviewNode =
|
|
50954
|
+
var OrbPreviewNode = React119__default.memo(OrbPreviewNodeInner);
|
|
50897
50955
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
50898
50956
|
var EventFlowEdgeInner = (props) => {
|
|
50899
50957
|
const {
|
|
@@ -50970,7 +51028,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
50970
51028
|
) })
|
|
50971
51029
|
] });
|
|
50972
51030
|
};
|
|
50973
|
-
var EventFlowEdge =
|
|
51031
|
+
var EventFlowEdge = React119__default.memo(EventFlowEdgeInner);
|
|
50974
51032
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
50975
51033
|
|
|
50976
51034
|
// components/molecules/avl/BehaviorComposeNode.tsx
|
|
@@ -51109,7 +51167,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
51109
51167
|
}
|
|
51110
51168
|
);
|
|
51111
51169
|
};
|
|
51112
|
-
var BehaviorComposeNode =
|
|
51170
|
+
var BehaviorComposeNode = React119__default.memo(BehaviorComposeNodeInner);
|
|
51113
51171
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
51114
51172
|
|
|
51115
51173
|
// components/molecules/avl/avl-behavior-compose-converter.ts
|
|
@@ -52041,7 +52099,7 @@ var ZoomBreadcrumb = ({
|
|
|
52041
52099
|
if (eventName && band === "detail") {
|
|
52042
52100
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
52043
52101
|
}
|
|
52044
|
-
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(
|
|
52102
|
+
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: [
|
|
52045
52103
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
52046
52104
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
52047
52105
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -52500,7 +52558,7 @@ var EventWireOverlay = ({
|
|
|
52500
52558
|
containerW,
|
|
52501
52559
|
containerH
|
|
52502
52560
|
}) => {
|
|
52503
|
-
const ids =
|
|
52561
|
+
const ids = React119__default.useMemo(() => {
|
|
52504
52562
|
avlOczWireId += 1;
|
|
52505
52563
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
52506
52564
|
}, []);
|
|
@@ -52818,7 +52876,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
52818
52876
|
borderRadius: 6,
|
|
52819
52877
|
border: `1px solid ${color}`
|
|
52820
52878
|
},
|
|
52821
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
52879
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React119__default.Fragment, { children: [
|
|
52822
52880
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
52823
52881
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
52824
52882
|
Box,
|